/*
 * 会員ダッシュボード (dev2 の現行実装) の見た目の再現。
 * 値は unified_frontend/src/app/globals.css と各コンポーネントの Tailwind クラスを px に直して写した。
 * 「推測」と書いたものはコードで確かめられなかった値 (README の一覧にも載せている)。
 * 色は変数 (トークン) 経由。生の hex はブランド色とモック専用の操作部品だけ。
 */

/* ── トークン (globals.css :root[data-layout="new"] と .dark) ───────── */
:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.22 0 0);
  --card: oklch(0.985 0 0);
  --muted: oklch(0.935 0 0);
  --muted-foreground: oklch(0.4 0 0);
  --border: oklch(0.76 0 0);
  --bg-hover: oklch(0.915 0 0);
  --bg-selected: oklch(0.895 0 0);
  --text-primary: var(--foreground);
  --text-secondary: oklch(0.25 0 0);
  --text-muted: oklch(0.4 0 0);
  --border-subtle: oklch(0.78 0 0);
  --border-default: oklch(0.6 0 0);
  --accent-pill: #333333;
  --accent-pill-text: #ffffff;
  --accent-pill-deep: color-mix(in srgb, var(--accent-pill) 45%, var(--text-primary));
  --glass-rgb: 232, 232, 232;
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.2);
  --radius: 10px;
  --radius-bento: 16px;
  --stamp: #e8461e;
  --destructive: #dc2626; /* 推測: --destructive の実値は未確認 */
  --popover: #ffffff;
  --dialog-card: #efefef; /* --portal-card-body-bg (light) */
  --map-empty: #e5e7eb;
  --map-heat-1: #ffffb2; --map-heat-2: #fecc5c; --map-heat-3: #fd8d3c; --map-heat-4: #f03b20; --map-heat-5: #bd0026;
  --map-stroke: #fff;
  color-scheme: light;
}
html[data-theme="dark"] {
  --background: #000;
  --foreground: #e4e6e7;
  --card: oklch(0.205 0 0);
  --muted: oklch(0.269 0 0); /* 推測: dark の --muted は未確認 */
  --muted-foreground: #adb3b8;
  --border: oklch(0.35 0 0); /* 推測 */
  --bg-hover: oklch(0.24 0 0);
  --bg-selected: oklch(0.305 0 0);
  --text-secondary: oklch(0.85 0 0);
  --text-muted: #9299a0;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-default: rgba(255, 255, 255, 0.16);
  --accent-pill: #d1d1d1;
  --accent-pill-text: #000;
  --accent-pill-deep: color-mix(in srgb, var(--accent-pill) 65%, var(--text-primary));
  --glass-rgb: 26, 26, 26;
  --hairline: rgba(255, 255, 255, 0.1);
  --hairline-strong: rgba(255, 255, 255, 0.26);
  --popover: oklch(0.205 0 0);
  --dialog-card: #3d3d3d;
  --map-empty: #1f2226;
  --map-heat-1: #fed976; --map-heat-2: #feb24c; --map-heat-3: #fd8d3c; --map-heat-4: #fc4e2a; --map-heat-5: #e31a1c;
  color-scheme: dark;
}
@media (max-width: 767.98px) { :root { --radius-bento: 10px; } }

/* ── ベース ─────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font-family: "Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg.i { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tnum { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.only-md { display: none; }
@media (min-width: 768px) { .only-md { display: block; } .only-sm { display: none !important; } }

/* ── カード ─────────────────────────────────────────────── */
.card {
  position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden;
  background-color: rgb(var(--glass-rgb)); border: 1px solid transparent; border-radius: var(--radius-bento);
  --border-subtle: var(--hairline); --border: var(--hairline); --border-default: var(--hairline-strong);
  min-width: 0;
}
.card-chip { background: color-mix(in srgb, currentColor 12%, transparent); }
.hr-top { border-top: 1px solid var(--border-subtle); }
.hairline-top { border-top: 1px solid var(--hairline); }
.muted { color: var(--text-muted); }
.sec { color: var(--text-secondary); }

/* ── ページ枠 ───────────────────────────────────────────── */
.frame { position: relative; margin: 0 auto; width: 100%; max-width: 80rem; padding: 0 12px 160px; }
.frame-inner { position: relative; }
@media (min-width: 768px) { .frame { padding-left: 20px; padding-right: 20px; } }
@media (min-width: 1024px) {
  /* .dashboard-frame: 左端は 166px (--nav-logo-end) で止め、右は 40px まで寄る。推測: 計算式は要約から。 */
  .frame { max-width: none; padding-left: max(166px, calc((100vw - 1200px) / 2)); padding-right: max(40px, calc((100vw - 1200px) / 2)); }
}
.grid2 { display: block; }
@media (min-width: 768px) {
  .grid2 { display: grid; grid-template-columns: 2fr 5fr; column-gap: 32px; align-items: start; }
}
.left { display: none; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .left { display: flex; position: sticky; top: 56px; } }
.right-rows { display: none; }
@media (min-width: 768px) { .right-rows { display: block; } }
.brow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 4px; position: relative; }
.brow:first-child { margin-top: 0; }
.cell { position: relative; min-width: 0; display: flex; flex-direction: column; }
.cell > .card, .cell > .snsgrid, .cell > .vgrid { flex: 1 1 auto; }
.span1 { grid-column: span 1; } .span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: span 4; }
.unit-4 { aspect-ratio: 4 / 1; } .unit-3 { aspect-ratio: 3 / 1; } .unit-2 { aspect-ratio: 2 / 1; } .unit-1 { aspect-ratio: 1 / 1; }
.hidden-card { opacity: 0.4; }
.mstack { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 768px) { .mstack { display: none; } }

/* ── ヘッダー画像 (表紙) ────────────────────────────────── */
.cover { position: relative; display: none; width: 100%; overflow: hidden; }
@media (min-width: 768px) { .cover { display: block; aspect-ratio: 16 / 9; } }
@media (min-width: 1024px) { .cover { aspect-ratio: auto; height: 100vh; } }
.cover .art { position: absolute; inset: 0; }
.cover[data-v="img"] .art { background: radial-gradient(60% 80% at 25% 35%, #6c7fa8 0, transparent 60%), radial-gradient(50% 70% at 78% 60%, #b98a72 0, transparent 60%), linear-gradient(135deg, #46526b, #8a7466); }
.cover[data-v="bright"] .art { background: radial-gradient(60% 80% at 25% 35%, #fff 0, transparent 60%), linear-gradient(135deg, #f1efe9, #dfe6ee); }
.cover[data-v="dark"] .art { background: radial-gradient(60% 80% at 70% 40%, #2a2f45 0, transparent 60%), linear-gradient(135deg, #07080c, #181a24); }
.cover .label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 14px; letter-spacing: .3em; opacity: .7; color: #fff; mix-blend-mode: normal; }
.cover[data-v="bright"] .label { color: #000; }
.cover-gap { height: 44px; } /* 推測: 表紙の下端〜グリッドの上端 (pt-10 + md:mt-1) */
.mtitle { display: block; padding: 20px 0 0; text-align: center; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; color: var(--text-primary); position: fixed; top: 0; left: 0; right: 0; z-index: 30; pointer-events: none; padding-top: 20px; }
.mtitle-img { display: block; width: 100%; aspect-ratio: 6.4 / 1; background: linear-gradient(90deg, #6c7fa8, #b98a72); color: #fff; display: flex; align-items: center; justify-content: center; letter-spacing: .3em; font-size: 12px; }
@media (min-width: 768px) { .mtitle, .mtitle-img, .mspace { display: none; } }
.mspace { height: 56px; } /* 推測: 挨拶ブロックの確保 (mobile) */

/* ── 浮くもの (ロゴ・トグル・アバター) ─────────────────── */
.logo { position: fixed; left: 0; top: 10px; height: 56px; padding-left: 16px; display: none; align-items: center; font-weight: 800; letter-spacing: .12em; font-size: 20px; z-index: 40; color: var(--text-primary); } /* 推測: 実装は PortalWordmark (SVG) */
@media (min-width: 1024px) { .logo { display: flex; } }
.logo[data-tone="light"] { color: #fff; } .logo[data-tone="dark"] { color: #000; }
.toggles { position: fixed; left: 16px; z-index: 40; display: none; flex-direction: column; gap: 8px; }
@media (min-width: 1024px) { .toggles { display: flex; } }
.tg { display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 16px; }
.sw { position: relative; width: 44px; height: 24px; border-radius: 9999px; border: 2px solid transparent; background: #e4e6e7; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 9999px; background: #fff; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); transition: transform .15s; }
.sw[aria-checked="true"] { background: #181a1b; } .sw[aria-checked="true"]::after { transform: translateX(20px); }
.avatar-fixed { position: fixed; left: 16px; bottom: 24px; z-index: 40; width: 40px; height: 40px; border-radius: 9999px; background: var(--muted); display: none; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; } /* 推測: 左下の設定アバターの大きさ */
@media (min-width: 1024px) { .avatar-fixed { display: flex; } }

/* ── 下部メニュー (glass-bar) ───────────────────────────── */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; justify-content: center; padding-bottom: 24px; pointer-events: none; }
@media (min-width: 768px) { .bnav { display: flex; } }
.glass-bar { position: relative; isolation: isolate; border: 1px solid transparent; border-radius: 9999px; box-shadow: 0 0 21px -8px rgba(255,255,255,.3); pointer-events: auto; display: flex; gap: 4px; padding: 4px; color: var(--foreground); }
.glass-bar::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; box-shadow: inset 0 0 12px -4px rgba(255,255,255,.7); }
.glass-bar::after { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); } /* 歪みフィルタ (#glass-distortion) は Chrome 専用なので省略 */
html[data-theme="dark"] .glass-bar--plain::after, .glass-bar[data-tone="dark"]::after { -webkit-backdrop-filter: blur(15px) contrast(.5) brightness(.55); backdrop-filter: blur(15px) contrast(.5) brightness(.55); }
html:not([data-theme="dark"]) .glass-bar--plain::after { -webkit-backdrop-filter: blur(15px) contrast(.4) brightness(1.9); backdrop-filter: blur(15px) contrast(.4) brightness(1.9); }
html:not([data-theme="dark"]) .glass-bar--plain { border-color: color-mix(in srgb, currentColor 15%, transparent); }
.glass-bar[data-ctone="light"] { color: #fff; } .glass-bar[data-ctone="dark"] { color: #000; }
.glass-bar-active { background-color: color-mix(in srgb, currentColor 24%, transparent); }
.bnav a, .bnav button.ni { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 9999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.nbadge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9999px; background: var(--destructive); color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.mnav { position: fixed; left: 0; right: 0; bottom: 12px; z-index: 40; display: flex; justify-content: center; pointer-events: none; } /* 推測: 下余白 */
@media (min-width: 768px) { .mnav { display: none; } }
.mnav .glass-bar { height: 52px; gap: 2px; align-items: center; }
.mnav .mi { position: relative; width: 48px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 9999px; font-size: 22px; } /* 推測: 項目の 48px */
.mnav .mi svg.i { stroke-width: 1.6; } .mnav .mi.on svg.i { stroke-width: 2; }
.mnav .nbadge { position: absolute; top: 2px; right: 4px; }

/* ── 左カラム ──────────────────────────────────────────── */
.mcard { position: relative; aspect-ratio: 728 / 1000; border-radius: var(--radius-bento); overflow: hidden; width: 100%; cursor: zoom-in; background: #2a3a5c; }
.mcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard .noise { position: absolute; inset: 0; opacity: .08; pointer-events: none; background-image: repeating-radial-gradient(circle at 17% 32%, #fff 0 .5px, transparent .5px 3px); } /* 推測: .holo-card-noise の近似 */
.mcard .frameimg { position: absolute; inset: 0; pointer-events: none; }
.tiltwrap { perspective: 800px; }
.mcard-rot { transition: transform .08s linear; will-change: transform; transform-style: flat; }
.idrow { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ident { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 8px; }
.ident .nm { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -0.025em; }
.ident .idc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.ident .qr { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.ident .since { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.avatar { width: 80px; height: 80px; flex: none; border-radius: 9999px; background: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: var(--muted-foreground); }
.roles { display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; }
.roles hr { width: 100%; border: 0; border-top: 1px solid var(--border-default); margin: 0; }
.roles .hd { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 9999px; border: 1px solid var(--border-subtle); padding: 2px 8px; font-size: 12px; font-weight: 500; color: var(--text-primary); }
.pill i { width: 8px; height: 8px; border-radius: 9999px; display: block; }
.mem-block { position: relative; }
.eye { position: absolute; z-index: 10; width: 28px; height: 28px; border-radius: 9999px; background: var(--background); display: none; align-items: center; justify-content: center; font-size: 14px; color: var(--muted-foreground); }
[data-admin="1"] .eye { display: flex; }
.mem-block.off { opacity: .4; }
.snsrow { display: flex; flex-wrap: wrap; gap: 6px; }
.snsrow a { width: 36px; height: 36px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-primary); }
.snsrow a svg { width: 18px; height: 18px; }

/* ── 管理者ビューの部品 ─────────────────────────────────── */
.chips { display: none; }
@media (min-width: 768px) { [data-admin="1"] .chips { display: flex; } }
.chip { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 6px; font-size: 14px; color: var(--text-muted); }
.chip:hover { background: var(--bg-hover); color: var(--text-primary); }
.chip[disabled], .chip.dis { opacity: .3; pointer-events: none; }
.chip.w { font-size: 12px; font-weight: 600; }
.gutter { position: absolute; left: -28px; top: 4px; flex-direction: column; align-items: center; gap: 4px; z-index: 20; }
.later { position: absolute; top: 4px; right: 4px; z-index: 20; flex-direction: column; align-items: flex-end; gap: 4px; }
.later .chip { background: rgba(0,0,0,.05); color: var(--text-muted); backdrop-filter: blur(4px); }
html[data-theme="dark"] .later .chip { background: rgba(255,255,255,.1); }
.later .arr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.hlabel { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; letter-spacing: .1em; color: var(--text-muted); }
.cell.is-hidden .hlabel { display: flex; }
.sbar { display: none; margin-bottom: 4px; align-items: center; justify-content: space-between; gap: 8px; border-radius: 6px; background: var(--bg-hover); padding: 4px 8px; font-size: 12px; color: var(--text-muted); }
[data-admin="1"] .sbar { display: flex; }
@media (min-width: 768px) { .sbar { display: none !important; } }
.sbar .chip { display: inline-flex; width: 28px; height: 28px; }

/* ── ステータスカード ───────────────────────────────────── */
.statgrid { display: grid; gap: 4px; }
.statgrid .cell { aspect-ratio: 1 / 1; min-height: 0; }
.stat { flex: 1; display: flex; flex-direction: column; height: 100%; padding: 16px; }
.stat .lb { text-align: center; font-size: 13px; font-weight: 600; color: var(--foreground); }
.stat .nbody { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.stat .num { font-size: 56px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .unit { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.stat .lnk { border-top: 1px solid var(--border-subtle); padding-top: 10px; text-align: center; font-size: 12px; line-height: 1.25; color: var(--foreground); display: flex; align-items: center; justify-content: center; gap: 2px; }
.stat .ms2 { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 70px; }
.stat .ms2 b { font-size: 36px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.stat .ms2 small, .stat .num1 small { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.stat .foot { display: flex; align-items: baseline; justify-content: center; gap: 8px; border-top: 1px solid var(--border-subtle); padding-top: 10px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.plancard { min-height: 120px; height: 100%; }
.plancard .top { display: flex; justify-content: center; padding: 12px; }
.plancard .tn { border-radius: 9999px; padding: 4px 10px; font-size: 11.5px; font-weight: 500; }
.plancard .pn { padding: 0 24px; font-size: 18px; font-weight: 600; text-align: center; }
.plancard .mid { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; }
.plancard .bt { margin-top: auto; padding: 0 16px 16px; }
.plancard .bt span { display: flex; align-items: center; justify-content: center; gap: 2px; border-top: 1px solid var(--border-subtle); padding-top: 10px; font-size: 12px; line-height: 1.25; color: var(--text-secondary); }

/* ── SNS カード群 ──────────────────────────────────────── */
.snsgrid { display: grid; gap: 4px; }
.snscard { aspect-ratio: 1 / 1; display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius-bento); padding: 12px 8px; background-color: rgb(var(--glass-rgb)); border: 1px solid transparent; min-width: 0; }
.snscard .ic { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-primary); }
.snscard .ic svg { width: 48px; height: 48px; }
.snscard .nm { text-align: center; font-size: 13px; font-weight: 400; line-height: 1.25; color: var(--foreground); }

/* ── お知らせ・イベント ─────────────────────────────────── */
.listcard { min-height: 235px; flex: 1; padding: 14px 18px; }
.nrow { display: grid; grid-template-columns: 14px 1fr; gap: 8px; padding: 7px 0; }
.nrow + .nrow { border-top: 1px solid var(--hairline); }
.nrow .dot { padding-top: 6px; } .nrow .dot i { display: block; width: 6px; height: 6px; border-radius: 9999px; background: var(--foreground); }
.nrow .tt { font-size: 12.5px; line-height: 1.4; }
.nrow .mt { margin-top: 2px; font-size: 10.5px; color: var(--text-muted); }
.nfoot { margin-top: 8px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--hairline); padding-top: 8px; }
.nfoot .rd { border: 1px solid var(--hairline-strong); border-radius: 9999px; padding: 4px 10px; font-size: 10.5px; }
.nfoot .all { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--text-muted); }
.empty-t { font-size: 12px; color: var(--text-muted); }
.evbody { display: flex; flex: 1; align-items: stretch; gap: 20px; }
.evlist { display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: space-evenly; }
.evrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 8px 0; }
.evrow + .evrow { border-top: 1px solid var(--hairline); }
.evrow .n { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.evrow .l { margin-top: 2px; font-size: 10.5px; color: var(--text-secondary); }
.evrow .d { font-size: 11.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.mcal { width: 240px; flex: none; align-self: center; border-left: 1px solid var(--hairline); padding-left: 20px; }
.mcal .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.mcal .hd button { width: 24px; height: 24px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.mcal .g { display: grid; grid-template-columns: repeat(7, 1fr); }
.mcal .wd { padding: 4px 0; text-align: center; font-size: 10px; color: var(--text-muted); }
.mcal .dc { position: relative; height: 36px; display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.mcal .dc span { width: 24px; height: 24px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.mcal .dc.out { color: var(--text-muted); opacity: .5; }
.mcal .dc.today span { background: var(--accent-pill); color: var(--accent-pill-text); font-weight: 600; }
.mcal .dc.ev::after { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 9999px; background: var(--accent-pill-deep); }
.mcal.solo { width: 100%; border-left: 0; padding-left: 0; } /* EventsCalendarCard（モバイルのカレンダー単体）は線も左の余白も持たない */
.cal-only { display: none; }

/* ── ポイントステータス ─────────────────────────────────── */
.pcard { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 8px; min-height: 0; }
.pcard.ring { gap: 4px; }
.pcard .lb { display: block; font-size: 13px; font-weight: 600; }
.pcard .lv { font-size: 16px; font-weight: 600; }
.pcard .arc { margin: auto; width: 100%; max-width: 280px; transform: translateY(-8px); position: relative; }
.pcard .arc svg { width: 100%; display: block; }
.pcard .arc .val { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: -24%; }
.pcard .arc .val b { font-size: 36px; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pcard .arc .val small { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.pcard .foot { border-top: 1px solid var(--border-subtle); padding-top: 10px; font-size: 12px; line-height: 1.25; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard .row2 { display: flex; flex: 1; min-height: 0; align-items: center; gap: 12px; }
.pcard .row2 .rg { aspect-ratio: 1 / 1; height: 100%; flex: none; }
.pcard .row2 .rg { position: relative; }
.pcard .row2 .rg svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pcard .row2 .tx { display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: center; gap: 2px; }
.pcard .row2 .tx .rm { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .row2 .tx .gl { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.pcard .sq { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pcard .sq .t1 { text-align: center; font-size: 13px; font-weight: 600; }
.pcard .sq .rg { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.pcard .sq .rg { position: relative; }
.pcard .sq .rg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pcard .sq .gl { margin-top: 4px; border-top: 1px solid var(--border-subtle); padding-top: 8px; text-align: center; font-size: 12px; }

/* ── 近くのファン ───────────────────────────────────────── */
.afcard { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 8px; min-height: 0; }
.afcard.u { padding: 12px; gap: 4px; }
.afcard .ttl { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.afcard .ttl b { font-size: 13px; font-weight: 600; }
.afcard .ttl small { font-size: 12px; color: var(--muted-foreground); }
.afmap { position: relative; overflow: hidden; border-radius: 8px; background: var(--background); height: 288px; }
.afcard.u .afmap { flex: 1; height: auto; min-height: 0; }
.afmap > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.afmap .zoom { position: absolute; right: 4px; top: 4px; display: flex; gap: 4px; }
.afmap .zoom span { width: 28px; height: 28px; border-radius: 6px; background: color-mix(in srgb, var(--background) 80%, transparent); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.afmap .note { position: absolute; left: 4px; right: 4px; bottom: 4px; border-radius: 6px; background: color-mix(in srgb, var(--background) 80%, transparent); padding: 2px 8px; font-size: 12px; }

/* ── 動画・バナー ──────────────────────────────────────── */
.vgrid { display: grid; gap: 4px; }
.vtile { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 8px; background: var(--muted); }
.vtile .pl { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); font-size: 24px; }
.vtile .pl svg { margin-left: 2px; fill: currentColor; }
.vtile .tt { position: absolute; left: 8px; right: 8px; bottom: 6px; font-size: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); } /* 推測: タイトル表示の有無は未確認 */
.more { display: flex; width: 100%; align-items: center; justify-content: center; gap: 4px; border-radius: 8px; padding: 8px 0; font-size: 14px; color: var(--muted-foreground); background-color: rgb(var(--glass-rgb)); }
.bnr { display: block; width: 100%; border-radius: 8px; overflow: hidden; color: #fff; font-weight: 700; letter-spacing: .12em; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 8%; font-size: clamp(10px, 2.6vw, 16px); line-height: 1.3; } /* 実物は画像。文字は仮置きの印なので枠からはみ出さない大きさにする */

/* ── 会場特典 ──────────────────────────────────────────── */
.vbgrid { display: grid; gap: 4px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .vbgrid { grid-template-columns: repeat(3, 1fr); } }
.vb { padding: 12px 16px; gap: 8px; }
.vb input { height: 40px; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--hairline-strong); text-align: center; color: var(--foreground); outline: 0; font: inherit; }
.vb input.code { font-family: ui-monospace, "Geist Mono", monospace; font-size: 16px; letter-spacing: .1em; }
.vb input.pass { font-size: 14px; }
.vb input::placeholder { color: var(--text-primary); opacity: .6; }
.vb .btn { height: 36px; width: 100%; border-radius: 9999px; border: 1px solid var(--foreground); display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; }
.vb .tk { display: flex; align-items: center; gap: 8px; }
.vb .tk .th { width: 40px; height: 40px; border-radius: 6px; background: var(--muted); flex: none; }
.vb .tk b { display: block; font-size: 12px; font-weight: 500; } .vb .tk small { font-size: 10px; color: var(--text-muted); }
.vb .tk .st { margin-left: auto; border-radius: 9999px; padding: 2px 6px; font-size: 10px; background: color-mix(in srgb, currentColor 12%, transparent); }

/* ── Lyric Room ────────────────────────────────────────── */
.lyr { padding: 14px 18px; }
.lyr .hl { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.lyr .lead { margin-top: 4px; color: var(--text-muted); font-size: 14px; }
.lyr .rec { margin-top: 8px; }
.lyr .rr { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.lyr .rr .s { min-width: 0; flex: 1; } .lyr .rr .s b { display: block; font-size: 13px; font-weight: 600; } .lyr .rr .s small { font-size: 12px; color: var(--text-muted); }
.lyr .lv { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-family: ui-monospace, "Geist Mono", monospace; font-size: 12px; }
.lyr .lv .bar { height: 4px; flex: 1; border-radius: 9999px; background: var(--border); overflow: hidden; } .lyr .lv .bar i { display: block; height: 100%; background: var(--foreground); }
.lyr .op { margin-top: 12px; display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 12px; }

/* ── チェキ ────────────────────────────────────────────── */
.ckgrid { display: grid; gap: 4px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ckgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .ckgrid { grid-template-columns: repeat(3, 1fr); } }
.bk { padding: 16px; gap: 12px; }
.bk .hd { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.bk .hd .no { font-family: ui-monospace, "Geist Mono", monospace; font-size: 11px; }
.bk .stc { margin-left: auto; border-radius: 9999px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.bk .stc.pending { background: #fef3c7; color: #92400e; } /* 推測: pending は amber */
.bk .stc.confirmed { background: #dcfce7; color: #166534; } /* 推測: confirmed は green */
html[data-theme="dark"] .bk .stc.pending { background: rgba(245,158,11,.2); color: #fcd34d; }
html[data-theme="dark"] .bk .stc.confirmed { background: rgba(34,197,94,.2); color: #86efac; }
.bk .ev { font-size: 14px; font-weight: 600; } .bk .dt { margin-top: 2px; font-size: 11px; color: var(--text-muted); }
.bk .dl { border-top: 1px solid var(--border-subtle); padding-top: 8px; font-size: 12px; display: grid; gap: 4px; }
.bk .dl div { display: flex; justify-content: space-between; gap: 8px; } .bk .dl span:first-child { color: var(--text-muted); }
.bk .ac { display: flex; gap: 8px; padding-top: 4px; }
.bk .ac button { height: 32px; flex: 1; border: 1px solid var(--border-default); border-radius: 6px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.bk .ac button.cx { color: var(--destructive); }

/* ── プラン訴求 ─────────────────────────────────────────── */
.upg { position: relative; aspect-ratio: 1.618 / 1; }
@media (min-width: 768px) { .upg { aspect-ratio: 3.2 / 1; } }
.upg pre { position: absolute; inset: 0; margin: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-family: ui-monospace, "Geist Mono", monospace; line-height: 1; color: color-mix(in srgb, var(--foreground) 70%, transparent); white-space: pre; }
.upg .ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 24px; text-align: center; }
.upg .ov p { margin: 0; max-width: 28rem; font-size: 13px; line-height: 1.625; color: color-mix(in srgb, var(--foreground) 80%, transparent); }
.solid { display: inline-flex; align-items: center; gap: 2px; border-radius: 9999px; background: var(--foreground); color: var(--background); padding: 8px 20px; font-size: 14px; font-weight: 500; } /* 推測: ui-components の solid Button の寸法 */

/* ── やることカード ─────────────────────────────────────── */
.todo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.tcard { position: relative; padding: 20px; width: 100%; min-width: 0; }
.tcard .hd { display: flex; align-items: center; gap: 16px; }
.tcard .hd h3 { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.375; text-wrap: balance; }
.tcard .bd { margin-top: 12px; font-size: 14px; line-height: 1.625; color: var(--text-secondary); }
.tcard .bt { margin-top: auto; display: flex; align-items: flex-end; gap: 16px; padding-top: 16px; }
.tcard .pg { display: flex; flex: 1; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.tcard .ovl { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.orb { width: 48px; height: 48px; border-radius: 9999px; overflow: hidden; flex: none; position: relative; background: var(--muted); }
.orb img { width: 100%; height: 100%; object-fit: fill; display: block; }
.orb.s40 { width: 40px; height: 40px; }
.gauge { display: flex; width: 100%; gap: 4px; }
.gauge i { display: block; height: 6px; flex: 1; border-radius: 9999px; background: var(--border); position: relative; overflow: hidden; }
.gauge i b { position: absolute; inset: 0; width: 0; background: var(--foreground); border-radius: inherit; transition: width .7s; }
.gauge i.on b { width: 100%; }
.vabtn { margin-left: auto; border-radius: 9999px; border: 1px solid var(--border-default); padding: 4px 16px; font-size: 14px; white-space: nowrap; position: relative; z-index: 2; }
.tcard:hover .vabtn { background: var(--bg-hover); }
.cmp { display: flex; flex-direction: row; width: 100%; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-bento); text-align: left; }
.cmp .col { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.cmp .lab { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-secondary); }
.cmp .sm { font-size: 16px; line-height: 1.375; }
.cmp .gr { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cmp .gauge i { height: 4px; } /* 推測: 細いゲージの高さ */
.cmp > svg.i { width: 16px; height: 16px; }
.mtodo { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
@media (min-width: 768px) { .mtodo { display: none; } }
.dstamp { position: absolute; display: flex; align-items: center; justify-content: center; transform: rotate(-12deg); border: 8px double var(--stamp); color: var(--stamp); border-radius: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; pointer-events: none; }

/* ── ダイアログ ─────────────────────────────────────────── */
.ovl-bg { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.5); padding: 16px; }
.ovl-bg.open { display: flex; }
.dlg { position: relative; width: calc(100% - 3rem); max-width: 42rem; max-height: calc(100vh - 48px); overflow: auto; border-radius: var(--radius-bento); background: var(--popover); color: var(--foreground); padding: 16px; --border-subtle: var(--hairline); }
@media (min-width: 640px) { .dlg { padding: 24px; } }
.dlg .dh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dlg .dh h2 { margin: 0; font-size: 18px; font-weight: 600; }
.dlg .xb { width: 36px; height: 36px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.dlg ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lrow { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 16px; border-radius: var(--radius-bento); background: var(--dialog-card); min-width: 0; overflow: hidden; --border: var(--hairline); }
.lrow.done { opacity: .6; }
.lrow .col { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.lrow .tb { min-height: 40px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.lrow .tb .lb { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.lrow .tb .t { font-size: 18px; line-height: 1.25; }
.lrow .b { font-size: 14px; line-height: 1.625; color: var(--text-secondary); }
.lrow .bt { display: flex; align-items: flex-end; gap: 16px; padding-top: 8px; }
.lrow .pg { display: flex; flex: 1; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.lrow .act { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border-radius: 9999px; background: var(--foreground); color: var(--background); padding: 6px 16px; font-size: 14px; }
.lrow .dstamp { left: auto; right: 16px; top: 16px; height: 32px; width: 160px; border-width: 4px; font-size: 16px; border-radius: 6px; }
.stampbig { position: relative; height: 112px; display: flex; align-items: center; justify-content: center; margin: 12px 0; }
@media (min-width: 768px) { .stampbig { height: 128px; } }
.stampbig .dstamp { position: static; width: 256px; height: 56px; font-size: 30px; }
@media (min-width: 768px) { .stampbig .dstamp { width: 288px; height: 64px; font-size: 36px; } }
.dlg .allc { text-align: center; font-size: 16px; font-weight: 700; }
.enl .dlg { background: transparent; padding: 0; max-width: none; width: auto; overflow: visible; }
.enl .xclose { position: absolute; right: 0; top: -44px; width: 36px; height: 36px; color: #fff; font-size: 22px; }
.enl .bigcard { width: min(100vw - 32px, 28rem, calc((100dvh - 11rem) * .728)); }
.qrwrap { background: #fff; border-radius: var(--radius-bento); padding: 24px; color: #000; text-align: center; width: min(100vw - 32px, 42rem); }
.qrwrap .qrimg { image-rendering: pixelated; width: 100%; max-width: 560px; margin: 0 auto; display: block; }
.qrwrap .qid { margin-top: 12px; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.simple h3 { font-size: 14px; margin: 0 0 4px; } .simple .it { border-top: 1px solid var(--hairline); padding: 8px 0; font-size: 13px; }

/* ── 演出 (TodoCelebration) ─────────────────────────────── */
.cele { position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 0 16px; background: color-mix(in srgb, var(--background) 60%, transparent); backdrop-filter: blur(4px); }
.cele.open { display: flex; }
.cele .cwrap { display: flex; width: 100%; max-width: 20rem; flex-direction: column; gap: 4px; }
@media (min-width: 768px) { .cele .cwrap { max-width: 42rem; flex-direction: row; justify-content: center; } }
.cele .tcard { background-color: rgb(var(--glass-rgb)); border-radius: var(--radius-bento); }
.cele .dstamp { left: 50%; top: 50%; width: 256px; height: 56px; margin: -28px 0 0 -128px; font-size: 30px; opacity: 0; }
@media (min-width: 768px) { .cele .dstamp { width: 288px; height: 64px; margin: -32px 0 0 -144px; font-size: 36px; } }
.cele .nxt { opacity: 0; display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; background: var(--foreground); color: var(--background); padding: 8px 32px; font-size: 14px; font-weight: 500; }

/* ── 操作パネル (モックの一部ではない) ──────────────────── */
#ctl { position: fixed; right: 8px; top: 8px; z-index: 100; width: 300px; max-height: calc(100vh - 16px); overflow: auto; background: #111; color: #eee; border-radius: 10px; font: 12px/1.45 system-ui, sans-serif; box-shadow: 0 6px 30px rgba(0,0,0,.4); }
#ctl.min { width: auto; } #ctl.min .body { display: none; }
#ctl .bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; cursor: pointer; font-weight: 600; position: sticky; top: 0; background: #111; }
#ctl .body { padding: 0 10px 10px; }
#ctl h4 { margin: 12px 0 4px; font-size: 11px; color: #9aa; letter-spacing: .08em; text-transform: uppercase; }
#ctl .r { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 2px 0; }
#ctl .r > label.t { flex: 1 1 100%; color: #bbb; }
#ctl .seg button, #ctl .btn { background: #2a2a2a; color: #eee; border-radius: 5px; padding: 3px 8px; font-size: 12px; }
#ctl .seg button.on { background: #4a5cae; }
#ctl .ck { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; white-space: nowrap; }
#ctl .cardrow { display: grid; grid-template-columns: 1fr auto auto auto; gap: 4px; align-items: center; padding: 2px 0; border-top: 1px solid #222; }
#ctl input[type=color] { width: 28px; height: 20px; padding: 0; border: 0; background: none; }
#ctl .mini { font-size: 11px; color: #999; }

.cell[class*="unit-"] > .card { flex: 1 1 0; min-height: 0; }
.pcard { overflow: hidden; }
.pcard .row2 { min-height: 0; }
