/* =====================================================================
   16期BNIゲーム ― 表紙の世界観（黒い石・立ちのぼる炎・金）の画面デザイン
   ・チーム／個人画面：黒い石の背景＋明るい紙色の入力カード
   ・管理画面：明るい作業面＋ブランドの上部バー
   ・週次発表：全面の黒い石のステージ
   ===================================================================== */

/* 数字と「TOP」用の書体（SIL Open Font License・同じサイトから配信） */
@font-face {
  font-family: "Bebas Neue";
  src: url("/fonts/bebas-neue-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 石 */
  --stone-950: #101113;
  --stone-900: #191B1F;
  --stone-850: #1F2125;
  --stone-800: #292C31;
  --stone-700: #3A3D43;
  /* 紙・文字 */
  --paper: #FAF8F3;
  --paper-2: #F1EDE4;
  --paper-3: #E8E2D6;
  --ink: #202226;
  --ink-2: #55585E;
  --line: #E3DED3;
  --line-strong: #CFC8BA;
  --text-on-dark: #F7F4ED;
  --muted-on-dark: #B9B6AF;
  --line-on-dark: rgb(255 255 255 / .10);
  /* 炎 */
  --flame-yellow: #FFB547;
  --flame-orange: #FF792B;
  --flame-red: #D93627;
  --action: #B92D20;
  --action-2: #9C2216;
  /* 金 */
  --gold: #D9B66F;
  --gold-2: #F0D79A;
  --gold-deep: #A7823A;
  --gold-ink: #765319;
  /* 状態 */
  --success: #176A4B;
  --warning: #8B510F;
  --danger: #B42332;
  /* 形 */
  --r-input: 8px;
  --r-btn: 10px;
  --r-card: 12px;
  --r-hero: 16px;
  --shadow-paper: 0 6px 20px rgb(0 0 0 / .12);
  --shadow-dark: 0 10px 30px rgb(0 0 0 / .45);
  /* 動き */
  --e-out: cubic-bezier(.2, .8, .2, 1);
  --e-io: ease-in-out;
  /* 書体 */
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --font-display: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
  --font-serif-en: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  /* 文脈ごとの色（黒い背景では明るく、紙のカードでは濃く） */
  --fg: var(--ink);
  --fg-muted: var(--ink-2);
  --focus: var(--gold-ink);

  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--paper-2);
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------------------------------------------------
   質感：黒い石（静止した背景。スクロールしても描き直さない固定の層）
   --------------------------------------------------------------------- */
.stone, body.theme-dark::before, body.presenting::before {
  background-color: var(--stone-950);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .075 0 0 0 0'/%3E%3C/filter%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0 0 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(116deg, transparent 0 19px, rgb(255 255 255 / .016) 20px, transparent 21px 47px),
    radial-gradient(ellipse 70% 50% at 18% 8%, #2E2F34, transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 30%, #24252A, transparent 65%),
    radial-gradient(ellipse 80% 60% at 50% 110%, #2A1A14, transparent 70%),
    linear-gradient(145deg, #1C1D20, #101113 70%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 72px; }
body { margin: 0; min-height: 100vh; line-height: 1.65; background: var(--paper-2); color: var(--fg); }
html:has(body.theme-dark), html:has(body.presenting) { background: var(--stone-950); }
body.theme-dark { background: var(--stone-950); --fg: var(--text-on-dark); --fg-muted: var(--muted-on-dark); --focus: var(--gold); }
body.theme-dark::before, body.presenting::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
a { color: var(--action); text-underline-offset: 3px; }
.theme-dark a { color: var(--gold-2); }
.theme-dark a.btn { color: var(--ink); }
.theme-dark a.btn.primary { color: #fff; }
.theme-dark .card a:not(.btn) { color: var(--action); }
h1 { font-size: 1.55rem; line-height: 1.3; margin: .2em 0; letter-spacing: .02em; }
h2 { font-size: 1.05rem; margin: 1.8em 0 .7em; letter-spacing: .03em; }
h3 { font-size: 1rem; margin: 0 0 .4em; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: rgb(217 182 111 / .45); }
.num, .stat-value, .member-points, .big-points, .rank-no, .rank-avg { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 黒い背景の上の見出し：明朝＋金の短い線 */
.theme-dark #app > h1, .theme-dark #app > section > h2, .theme-dark #app > h2 {
  font-family: var(--font-mincho); font-weight: 700; color: var(--text-on-dark);
}
.theme-dark #app > section > h2, .theme-dark #app > h2 { display: flex; align-items: center; gap: 10px; }
.theme-dark #app > section > h2::before, .theme-dark #app > h2::before {
  content: ""; flex: none; width: 18px; height: 2px; background: linear-gradient(90deg, var(--gold), var(--flame-orange));
}

/* ---------------------------------------------------------------------
   上部バー：黒い石＋下端の炎の線＋金の「TOP」
   --------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 6px 16px;
  color: var(--text-on-dark);
  background: radial-gradient(ellipse 30% 160% at 18% 150%, rgb(255 121 43 / .42), transparent 70%), radial-gradient(ellipse 36% 160% at 70% 150%, rgb(217 54 39 / .34), transparent 70%), linear-gradient(180deg, #17181B, #0E0F11);
  box-shadow: 0 1px 0 rgb(255 255 255 / .06), 0 8px 24px rgb(0 0 0 / .35);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--flame-red) 20%, var(--flame-orange) 50%, var(--gold) 80%, transparent);
  opacity: .85;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.theme-dark .wordmark, .wordmark:visited { color: inherit; }
.wm-top {
  font-family: var(--font-display); font-size: 2.05rem; line-height: 1; letter-spacing: .02em; padding-top: 3px;
  display: inline-block; transform: scaleY(1.12); transform-origin: bottom;
  background: linear-gradient(180deg, #FFF3D1 0%, var(--gold-2) 35%, var(--gold) 60%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wm-sub { display: grid; line-height: 1.15; }
.wm-sub b { font-weight: 800; font-size: .86rem; letter-spacing: .06em; }
.wm-sub small { font-family: var(--font-display); font-size: .78rem; letter-spacing: .18em; color: var(--muted-on-dark); }
.topbar .slogan { margin-left: auto; font-family: var(--font-mincho); font-size: .8rem; letter-spacing: .12em; color: var(--muted-on-dark); }
.topbar .operator { margin-left: auto; font-size: .75rem; color: var(--muted-on-dark); }
@media (max-width: 520px) {
  .topbar .slogan { display: none; }
}

/* 読み込み中：上端の炎の線が伸びる */
.route-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, var(--flame-red), var(--flame-orange), var(--gold)); transform-origin: left; transform: scaleX(0); }
.is-routing .route-progress { opacity: 1; animation: progress 2.4s var(--e-out) forwards; }
@keyframes progress { 0% { transform: scaleX(0); } 100% { transform: scaleX(.85); } }
#app { transition: opacity .2s ease; }
.is-routing #app { opacity: .55; transition-delay: .15s; }

/* ---------------------------------------------------------------------
   配置・文字
   --------------------------------------------------------------------- */
.container { max-width: 720px; margin: 0 auto; padding: 16px 16px 96px; }
.loading { color: var(--fg-muted); display: flex; align-items: center; gap: 10px; }
.muted { color: var(--fg-muted); }
.center { text-align: center; }
.error { color: var(--danger); font-weight: 700; }
.theme-dark #app > .error { color: #FF9A8F; }
.hint { color: var(--fg-muted); font-size: .84rem; margin: .35em 0; line-height: 1.6; }
.lead { color: var(--fg-muted); margin: .2em 0 1em; }
.back { display: inline-flex; align-items: center; min-height: 40px; margin: 0 0 4px; text-decoration: none; font-weight: 700; font-size: .92rem; }
.theme-dark .back { color: var(--gold-2); }
.eyebrow { margin: 0; font-family: var(--font-display); font-size: 1rem; letter-spacing: .2em; color: var(--gold); line-height: 1.2; }
.eyebrow .ja { font-family: var(--font-sans); font-size: .72rem; letter-spacing: .08em; margin-left: .6em; color: var(--muted-on-dark); }

/* ---------------------------------------------------------------------
   ボタン（押した手応え：縮む・沈む）
   --------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: var(--r-btn); border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  font: inherit; font-weight: 700; line-height: 1.3; text-decoration: none; text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform .12s var(--e-out), box-shadow .18s var(--e-out), background-color .18s ease, border-color .18s ease, filter .18s ease;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.97); }
.btn.primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(180deg, #D13A26 0%, var(--action) 55%, var(--action-2) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 6px 16px rgb(185 45 32 / .35);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.primary:active:not(:disabled) { box-shadow: inset 0 2px 6px rgb(0 0 0 / .3), 0 2px 6px rgb(185 45 32 / .3); }
.btn.gold {
  border-color: transparent; color: #2A1D06;
  background: linear-gradient(180deg, #F6DFA4, var(--gold) 55%, #BE9549);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 6px 18px rgb(217 182 111 / .25);
}
.btn.ghost, .theme-dark #app > .actions .btn:not(.primary), .theme-dark .hero .btn:not(.primary) {
  background: rgb(255 255 255 / .04); color: var(--text-on-dark); border-color: rgb(255 255 255 / .22);
}
.btn.ghost:hover { border-color: var(--gold); }
.btn.danger { color: var(--danger); border-color: #E7B8BD; background: #fff; }
.btn.small { min-height: 40px; padding: 4px 12px; font-size: .86rem; }
.btn.block { width: 100%; }
.btn.lg { min-height: 52px; font-size: 1.05rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn.is-busy { opacity: .9; cursor: progress; }
.spinner { width: 1em; height: 1em; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions, .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.linklike { padding: 6px 10px; border-radius: 8px; border: 0; background: none; color: inherit; font: inherit; font-weight: 700;
  font-size: .85rem; cursor: pointer; }

/* ---------------------------------------------------------------------
   カード（紙＝入力・承認／黒＝一覧）
   --------------------------------------------------------------------- */
.card {
  --fg: var(--ink); --fg-muted: var(--ink-2); --focus: var(--gold-ink);
  position: relative; background: var(--paper); color: var(--ink); border-radius: var(--r-card);
  box-shadow: var(--shadow-paper); padding: 16px; margin: 12px 0;
}
.theme-dark .card { border: 1px solid rgb(255 255 255 / .6); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.dark {
  --fg: var(--text-on-dark); --fg-muted: var(--muted-on-dark); --focus: var(--gold);
  background: linear-gradient(180deg, rgb(255 255 255 / .045), rgb(255 255 255 / .015)), var(--stone-900);
  color: var(--text-on-dark); border: 1px solid var(--line-on-dark); box-shadow: none;
}
.error-card { border-left: 6px solid var(--danger); }
.error-card h1 { font-size: 1.15rem; color: var(--danger); }

/* ---------------------------------------------------------------------
   ヒーロー（チーム・個人）：石の面＋下から立ちのぼる炎＋火の粉
   --------------------------------------------------------------------- */
.hero {
  --fg: var(--text-on-dark); --fg-muted: var(--muted-on-dark); --focus: var(--gold);
  position: relative; isolation: isolate; overflow: hidden; margin: 4px 0 16px; padding: 20px 18px 18px;
  border-radius: var(--r-hero); color: var(--text-on-dark);
  border: 1px solid rgb(217 182 111 / .28);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), var(--shadow-dark);
}
.hero.stone { background-color: #141518; }
.hero-flames { position: absolute; inset: auto -10% -6% -10%; height: 78%; z-index: -1; pointer-events: none; transform-origin: bottom;
  opacity: .95; }
.hero-flames::before, .hero-flames::after { content: ""; position: absolute; inset: 0; }
/* 炎の舌：縦に長い楕円のぼかしグラデーションを重ねる（フィルターは使わない） */
.hero-flames::before {
  background:
    radial-gradient(ellipse 9% 46% at 14% 100%, rgb(255 181 71 / .55), transparent 70%),
    radial-gradient(ellipse 12% 62% at 30% 100%, rgb(255 121 43 / .55), transparent 72%),
    radial-gradient(ellipse 8% 40% at 44% 100%, rgb(255 196 92 / .45), transparent 70%),
    radial-gradient(ellipse 13% 70% at 60% 100%, rgb(255 121 43 / .5), transparent 72%),
    radial-gradient(ellipse 9% 48% at 76% 100%, rgb(255 181 71 / .5), transparent 70%),
    radial-gradient(ellipse 12% 58% at 90% 100%, rgb(217 54 39 / .55), transparent 72%);
  animation: flicker-a 3.4s var(--e-io) infinite alternate;
  transform-origin: bottom;
}
.hero-flames::after {
  background:
    radial-gradient(ellipse 60% 55% at 30% 100%, rgb(255 121 43 / .42), transparent 62%),
    radial-gradient(ellipse 55% 60% at 75% 100%, rgb(217 54 39 / .45), transparent 64%),
    linear-gradient(0deg, rgb(120 22 12 / .55), transparent 45%);
  animation: flicker-b 4.6s var(--e-io) infinite alternate;
  transform-origin: bottom;
}
@keyframes flicker-a { 0% { transform: scaleY(1); opacity: .9; } 50% { transform: scaleY(1.07) translateX(.6%); opacity: 1; } 100% { transform: scaleY(.96) translateX(-.6%); opacity: .82; } }
@keyframes flicker-b { 0% { opacity: .85; transform: scaleY(1); } 100% { opacity: 1; transform: scaleY(1.04); } }
/* 本文が読めるよう、上半分は暗く保つ */
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(12 12 14 / .55) 0%, rgb(12 12 14 / .2) 55%, transparent 100%); }
.hero-embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.enter .hero-flames { animation: ignite .9s var(--e-out) both; }
@keyframes ignite { from { opacity: 0; transform: translateY(14%) scaleY(.7); } to { opacity: .95; transform: none; } }

.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start; }
.hero-title { min-width: 0; }
.title-row { display: flex; align-items: center; gap: 12px; }
.badge16.sm { width: 52px; height: 52px; }
.badge16.sm .badge16-no { font-size: 1.6rem; }
.badge16.sm .badge16-sub { font-size: .42rem; }
.num { position: relative; display: inline-block; }
.hero h1 { position: relative; margin: 6px 0 2px; font-family: var(--font-mincho); font-weight: 800; font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1.15; letter-spacing: .04em; text-shadow: 0 2px 18px rgb(0 0 0 / .6); word-break: keep-all; overflow-wrap: anywhere; }
/* 筆の跡（名前の下の黒い帯） */
.brush { position: relative; display: inline-block; padding: 0 .25em; }
.brush::before { content: ""; position: absolute; left: -.35em; right: -.5em; top: 38%; bottom: -12%; z-index: -1; transform: rotate(-1.5deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M8 30 C40 16 92 12 150 15 C222 10 300 8 392 18 C400 28 394 40 380 45 C300 53 226 49 150 51 C92 54 42 55 12 49 C0 44 1 36 8 30Z' fill='%23050506' fill-opacity='.82'/%3E%3Cpath d='M24 25 C96 18 210 16 368 21 M30 44 C120 46 230 44 360 38' stroke='%23000' stroke-opacity='.45' stroke-width='3' fill='none'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.hero .industry { margin: 0; color: var(--muted-on-dark); font-size: .9rem; }

/* 金の16thバッジ */
.badge16 { position: relative; flex: none; display: inline-grid; place-items: center; align-content: center; width: 62px; height: 62px; border-radius: 50%;
  color: #2A1D06; transform: rotate(-8deg);
  background: radial-gradient(circle at 35% 30%, #FFF0C4 0%, var(--gold-2) 22%, var(--gold) 55%, #9C7631 100%);
  box-shadow: 0 0 0 2px #1a1408, 0 0 0 3px rgb(240 215 154 / .8), 0 6px 18px rgb(0 0 0 / .5), inset 0 -3px 6px rgb(90 60 10 / .45); }
.badge16::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgb(60 40 5 / .45); }
.badge16-no { font-family: var(--font-display); font-size: 1.9rem; line-height: .9; display: inline-flex; align-items: flex-start; }
.badge16-th { font-size: .62em; margin-left: 1px; line-height: 1; }
.badge16-sub { font-family: var(--font-serif-en); font-style: italic; font-weight: 700; font-size: .5rem; letter-spacing: .08em; line-height: 1; margin-top: 1px; }
.enter .badge16 { animation: badge-in .7s var(--e-out) .15s both; }
@keyframes badge-in { from { opacity: 0; transform: rotate(-40deg) scale(.6); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

/* 縦書きのスローガン（白の明朝） */
.v-slogan { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; justify-items: center; column-gap: 2px;
  font-family: var(--font-mincho); color: #fff; text-shadow: 0 2px 10px rgb(0 0 0 / .7); }
.v-col { writing-mode: vertical-rl; text-orientation: upright; font-weight: 700; font-size: 1rem; letter-spacing: .14em; line-height: 1.25; }
.v-col:first-child { grid-column: 2; grid-row: 1; }
.v-col:nth-child(2) { grid-column: 1; grid-row: 1; padding-top: 1.3em; }
.v-we { grid-column: 1 / span 2; grid-row: 2; margin-top: 6px; font-family: var(--font-display); font-size: .82rem; letter-spacing: .22em; color: var(--gold-2); white-space: nowrap; }
.hero .v-slogan { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 420px) {
  .hero .v-col { font-size: .8rem; letter-spacing: .08em; }
  .hero .v-we { font-size: .7rem; letter-spacing: .14em; }
}

/* ヒーローの数字 */
.hero-stats { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; margin-top: 14px; }
.stat { position: relative; border-radius: 12px; padding: 10px 12px; text-align: left;
  background: linear-gradient(180deg, rgb(16 17 19 / .72), rgb(16 17 19 / .5)); border: 1px solid rgb(255 255 255 / .1); }
.stat.main { border-color: rgb(217 182 111 / .45); box-shadow: inset 0 0 24px rgb(217 182 111 / .08); }
.stat-label { display: block; font-size: .72rem; color: var(--muted-on-dark); letter-spacing: .06em; }
.stat-value { display: inline-flex; align-items: baseline; gap: 2px; font-family: var(--font-display); font-weight: 400; font-size: 2.3rem; line-height: 1;
  letter-spacing: .02em; color: #fff; }
.stat.main .stat-value { font-size: 3.1rem; background: linear-gradient(180deg, #FFF6DD, var(--gold-2) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-value small, .big-points small { font-family: var(--font-display); font-size: .5em; margin-left: .15em; color: var(--gold); -webkit-text-fill-color: var(--gold); }
.deadline { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 6px 12px; border-radius: 999px; font-size: .84rem; font-weight: 700;
  background: rgb(16 17 19 / .62); border: 1px solid rgb(255 121 43 / .4); color: #FFD9B8; }
.deadline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--flame-orange); box-shadow: 0 0 10px var(--flame-orange); flex: none; }
.deadline .num { font-weight: 800; color: #fff; white-space: nowrap; }
.hero .deadline { border-radius: 14px; flex-wrap: wrap; row-gap: 0; }
.deadline .dl-label { white-space: nowrap; }
/* テスト週の案内（点数はゲーム開始日に0点から始まる） */
.test-note { position: relative; margin: 8px 0 0; }
.badge.test { white-space: normal; background: #E7ECF7; color: #2C3E6B; font-size: .78rem; }

/* 個人の点数 */
.points-line { position: relative; display: flex; align-items: flex-end; gap: 10px; margin: 8px 0 4px; }
.big-points { position: relative; margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 4rem; line-height: .95; letter-spacing: .02em;
  background: linear-gradient(180deg, #FFF6DD, var(--gold-2) 45%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.points-caption { font-size: .78rem; color: var(--muted-on-dark); padding-bottom: 8px; }
.delta-float { position: absolute; left: 100%; top: 0; margin-left: 6px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .04em; line-height: 1.2; color: #2A1D06;
  -webkit-text-fill-color: #2A1D06; background: linear-gradient(180deg, #FFE6A8, var(--gold)); box-shadow: 0 0 18px rgb(255 181 71 / .55);
  animation: delta-up 1.8s var(--e-out) forwards; }
@keyframes delta-up { 0% { opacity: 0; transform: translateY(10px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.08); }
  70% { opacity: 1; transform: translateY(-14px) scale(1); } 100% { opacity: 0; transform: translateY(-30px); } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { display: inline-block; font-size: .74rem; padding: 3px 10px; border-radius: 999px; font-weight: 700; background: var(--paper-2); color: var(--ink); }
.hero .chip { background: rgb(16 17 19 / .6); color: var(--text-on-dark); border: 1px solid rgb(255 255 255 / .12); }
.chip.muted { color: var(--ink-2); font-weight: 400; }

/* ---------------------------------------------------------------------
   バッジ
   --------------------------------------------------------------------- */
.badge, .tag { display: inline-block; font-size: .72rem; line-height: 1.5; padding: 2px 9px; border-radius: 999px; font-weight: 700; white-space: nowrap;
  background: #EFE8D8; color: var(--gold-ink); vertical-align: middle; }
.badge.alert { background: var(--action); color: #fff; box-shadow: 0 0 0 0 rgb(255 121 43 / .6); }
.enter .badge.alert, .badge.alert.ring { animation: ring .6s var(--e-out) .4s 1 both; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgb(255 121 43 / .7); } 100% { box-shadow: 0 0 0 10px rgb(255 121 43 / 0); } }
.badge.wait { background: #E7ECF7; color: #2C3E6B; }
.badge.warn { background: #FCEBCF; color: var(--warning); }
.badge.ok { background: #DDEFE6; color: var(--success); }
.badge.muted { background: #ECEAE5; color: #55585E; }
.tag.leader { margin-left: 8px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2A1D06; font-size: .66rem; }

/* ---------------------------------------------------------------------
   チーム画面：メンバー一覧（黒いカード）
   --------------------------------------------------------------------- */
.member-list, .pick-list, .plain-list { list-style: none; margin: 0; padding: 0; }
.member-list { display: grid; gap: 8px; }
.member-row {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; min-height: 64px; padding: 12px 14px 12px 16px;
  border-radius: var(--r-card); text-decoration: none; color: var(--text-on-dark);
  background: linear-gradient(180deg, rgb(255 255 255 / .05), rgb(255 255 255 / .015)), var(--stone-900);
  border: 1px solid var(--line-on-dark);
  transition: transform .16s var(--e-out), border-color .2s ease, background-color .2s ease;
}
.theme-dark a.member-row { color: var(--text-on-dark); }
.member-row::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--flame-orange), var(--flame-red)); opacity: 0; transition: opacity .2s ease; }
.member-row:hover { border-color: rgb(217 182 111 / .45); }
.member-row:hover::before, .member-row.me::before { opacity: 1; }
.member-row:active { transform: scale(.985); }
.member-row::after { content: "›"; position: absolute; right: 10px; top: 50%; transform: translateY(-52%); color: var(--muted-on-dark); font-size: 1.2rem; }
.member-row.me { border-color: rgb(217 182 111 / .6); box-shadow: 0 0 0 1px rgb(217 182 111 / .25), 0 8px 24px rgb(0 0 0 / .35); }
.member-name { font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; flex-wrap: wrap; }
.member-points { grid-row: 1 / span 2; grid-column: 2; align-self: center; margin-right: 16px; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--gold-2); }
.member-points small { font-size: .55em; margin-left: 2px; color: var(--gold); }
.member-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.member-badges .badge.muted { background: rgb(255 255 255 / .08); color: var(--muted-on-dark); }

/* 前回のあなた（すぐ個人画面へ） */
  background: linear-gradient(90deg, rgb(217 182 111 / .16), rgb(217 182 111 / .04)); border: 1px solid rgb(217 182 111 / .4); }

/* ---------------------------------------------------------------------
   個人画面：今すること
   --------------------------------------------------------------------- */
.todo { padding: 0; overflow: hidden; border-top: 4px solid var(--flame-orange); }
.todo-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px 6px; }
.todo-head h2 { margin: 0; font-family: var(--font-mincho); font-size: 1.15rem; }
.todo-head .hint { margin: 0; }
.todo-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.todo-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 10px; }
.todo-item + .todo-item { border-top: 1px solid var(--line); }
.todo-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 800; font-size: .95rem;
  background: var(--paper-2); color: var(--ink-2); }
.todo-item.urgent .todo-icon { background: var(--action); color: #fff; }
.todo-item.warn .todo-icon { background: #FCEBCF; color: var(--warning); }
.todo-item.go .todo-icon { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2A1D06; }
.todo-text { min-width: 0; }
.todo-text strong { display: block; font-size: .95rem; line-height: 1.4; }
.todo-text small { display: block; color: var(--ink-2); font-size: .78rem; line-height: 1.4; }
@media (max-width: 420px) {
  .todo-item { grid-template-columns: 32px 1fr; }
  .todo-item .btn { grid-column: 1 / -1; width: 100%; }
  .todo-icon { width: 32px; height: 32px; }
}

/* ---------------------------------------------------------------------
   1to1のカード（届いた承認依頼・自分が出したもの）
   --------------------------------------------------------------------- */
.request { border-left: 6px solid var(--action); }
.enter .request, .request.pop { animation: req-glow 1.6s var(--e-out) .3s 1 both; }
@keyframes req-glow { 0% { box-shadow: 0 0 0 0 rgb(255 121 43 / .55), var(--shadow-paper); } 100% { box-shadow: 0 0 0 14px rgb(255 121 43 / 0), var(--shadow-paper); } }
.request .who { font-size: 1.02rem; margin: 0 0 4px; }
.request .meta, .ooo-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; color: var(--ink-2); font-size: .9rem; }
.ooo-date { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .04em; color: var(--ink); line-height: 1; }
.status-pending { border-left: 6px solid #4A5E92; }
.status-rejected { border-left: 6px solid var(--warning); }
.status-expired { border-left: 6px solid #C9C4BA; opacity: .82; }
.card .who .badge { margin-left: 8px; }
.reject-box { margin-top: 12px; padding: 12px; background: #FFF4E8; border: 1px solid #F3D3B0; border-radius: 10px; }
.reject-box .row { margin: 8px 0 0; }
.reject-box .row input { flex: 1 1 180px; }
.reject-box .hint { margin-top: 0; }
.card.is-done { border-left-color: var(--success); }
.done-line { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; color: var(--success); }
.done-check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--success); color: #fff; font-size: 1.1rem;
  animation: pop-in .35s var(--e-out) both; }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.card.is-busy { opacity: .75; }

/* ---------------------------------------------------------------------
   フォーム（紙のカードの上）
   --------------------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { font-weight: 700; font-size: .9rem; color: var(--fg); }
input[type=text], input[type=search], input[type=date], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: var(--r-input); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgb(217 182 111 / .35); }
input[aria-invalid=true] { border-color: var(--danger); box-shadow: 0 0 0 3px rgb(180 35 50 / .15); }
textarea { resize: vertical; }
/* iOS: 日付・検索欄が他の欄と同じ高さ・見た目になるように */
input[type=date], input[type=search] { -webkit-appearance: none; appearance: none; }
input::-webkit-date-and-time-value { text-align: left; }
input[type=radio], input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--action); flex: none; }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row .radio { flex: 1 1 140px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-input); background: #fff; cursor: pointer; }
.radio-row .radio:has(input:checked) { border-color: var(--action); background: #FFF4F0; font-weight: 700; }
.form-error { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: var(--r-input);
  background: #FDECEE; border: 1px solid #F1BEC4; color: var(--danger); font-weight: 700; font-size: .9rem; }
.form-error::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .8rem; }
.note-box { padding: 10px 12px; border-radius: var(--r-input); background: var(--paper-2); font-size: .85rem; color: var(--ink-2); }
.note-box strong { color: var(--ink); }

/* 相手選び */
.search-status { margin: 0; font-size: .82rem; color: var(--ink-2); min-height: 1.4em; }
.pick { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; min-height: 48px; padding: 10px 12px; margin: 4px 0;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .14s var(--e-out), background-color .14s var(--e-out), transform .12s var(--e-out); }
.pick:hover { border-color: var(--line-strong); }
.pick:active { transform: scale(.99); }
.pick.on { border-color: var(--action); background: #FFF4F0; font-weight: 800; }
.pick.on::after { content: "✓"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--action); color: #fff; font-size: .8rem;
  animation: pop-in .14s var(--e-out) both; }
.pick small { color: var(--ink-2); margin-left: auto; }
.pick-list { max-height: 300px; overflow: auto; padding-right: 2px; overscroll-behavior: contain; }
.chosen { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-input); font-weight: 800; color: var(--ink-2);
  background: var(--paper-2); border: 1px dashed var(--line-strong); }
.chosen.on { color: var(--action); background: #FFF4F0; border: 1px solid #F2C6BA; animation: fade-in .14s var(--e-out); }
@keyframes fade-in { from { opacity: .3; } to { opacity: 1; } }

/* ---------------------------------------------------------------------
   リストの記入
   --------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 12px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; font-size: .78rem; font-weight: 700; line-height: 1.3;
  background: rgb(255 255 255 / .05); border: 1px solid var(--line-on-dark); color: var(--muted-on-dark); }
.steps li::before { counter-increment: step; content: counter(step); flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-family: var(--font-display); font-size: .95rem; background: rgb(255 255 255 / .1); color: var(--text-on-dark); }
.steps li.now { color: #fff; border-color: rgb(255 121 43 / .55); background: rgb(255 121 43 / .12); }
.steps li.now::before { background: linear-gradient(180deg, var(--flame-orange), var(--flame-red)); }
.steps li.done::before { content: "✓"; background: var(--success); }
.list-progress { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.list-progress .bar { flex: 1; }
.list-row { position: relative; display: grid; grid-template-columns: 2em 1fr; gap: 6px 8px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); }
.list-row textarea { grid-column: 2; }
.list-no { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink-2); padding-top: 6px; text-align: center; line-height: 1; }
.list-row.filled .list-no { color: var(--success); }
.list-row.filled .list-no::after { content: "✓"; display: block; font-family: var(--font-sans); font-size: .7rem; margin-top: 2px; }
.list-row.flash { animation: flash .65s var(--e-out) 1; }
@keyframes flash { 0% { background: #FBEFCB; } 100% { background: transparent; } }
.ai-tag { grid-column: 2; justify-self: start; font-size: .7rem; font-weight: 700; color: var(--gold-ink); background: #F8EDCF; border: 1px solid #E8D29A; border-radius: 999px; padding: 1px 8px; }
.ai-box { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: linear-gradient(180deg, #FFF9EC, #FBF2DF); border: 1px solid #EAD9AE; }
.ai-box .row { margin: 0; }
.ai-status { display: flex; gap: 8px; align-items: center; margin: 0; font-size: .86rem; font-weight: 700; color: var(--gold-ink); }
.ai-status.error { color: var(--danger); }
.ai-status.ok { color: var(--success); }
.rows-box { border: 0; padding: 0; margin: 0; min-width: 0; }
.rows-box:disabled { opacity: .6; }
.save-bar { display: grid; gap: 6px; }

.item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
a.item { color: inherit; text-decoration: none; min-height: 52px; }
a.item > :first-child { flex: 1; min-width: 0; font-weight: 700; }
a.item::after { content: "›"; color: var(--ink-2); margin-left: 8px; font-size: 1.1rem; }
.theme-dark .card a.item { color: var(--ink); }
.item .meter { display: inline-flex; align-items: center; gap: 6px; }
details.help { border: 1px solid var(--line-on-dark); background: rgb(255 255 255 / .03); color: var(--text-on-dark); box-shadow: none; }
.theme-dark details.help.card { --fg: var(--text-on-dark); --fg-muted: var(--muted-on-dark); background: var(--stone-900); color: var(--text-on-dark); border-color: var(--line-on-dark); }
details.help summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
details.help ul { padding-left: 1.2em; font-size: .88rem; color: var(--muted-on-dark); }
details.help li { margin: 6px 0; }

/* リストの提出: 同一人物の確認と、提出済みの内容 */
.dup-card { border-left: 6px solid var(--warning); }
.dup-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--warning); }
.dup-list { margin: 6px 0; padding-left: 1.2em; }
.dup-list li { margin: 4px 0; }
.submit-status { display: flex; gap: 8px; align-items: center; margin: 0; font-size: .86rem; font-weight: 700; color: var(--gold-ink); }
.success-card { border-left: 6px solid var(--success); background: linear-gradient(90deg, #EAF5EF, var(--paper) 60%); }
.success-card h3 { color: var(--success); }
.enter .success-card, .success-card.pop { animation: rise .4s var(--e-out) both; }
details.sub { border-bottom: 1px solid var(--line); }
details.sub:last-child { border-bottom: 0; }
details.sub > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 10px 0; cursor: pointer; list-style: none; }
details.sub > summary::-webkit-details-marker { display: none; }
details.sub > summary::after { content: "▾"; color: var(--ink-2); transition: transform .2s var(--e-out); }
details.sub[open] > summary::after { transform: rotate(180deg); }
details.sub > summary > :first-child { flex: 1; min-width: 0; }
.sub-body { padding: 0 0 10px; font-size: .88rem; }
.sub-body ol { margin: 4px 0 8px; padding-left: 1.6em; }
.sub-body li { margin: 2px 0; }
.sub-row { display: flex; align-items: flex-start; gap: 8px; border-bottom: 1px solid var(--line); }
.sub-row:last-child { border-bottom: 0; }
.sub-row > details.sub { flex: 1; min-width: 0; border-bottom: 0; }
.sub-row > .btn { margin-top: 8px; flex: none; }
.empty { display: grid; gap: 4px; padding: 14px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); font-size: .9rem; }
.empty strong { color: var(--ink); }

/* ---------------------------------------------------------------------
   バー（順位）。transform で伸ばすので軽い
   --------------------------------------------------------------------- */
.bar { position: relative; height: 10px; background: rgb(0 0 0 / .08); border-radius: 999px; overflow: hidden; }
.bar-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); border-radius: 999px;
  background: linear-gradient(90deg, var(--flame-yellow), var(--flame-orange) 50%, var(--flame-red));
  transition: transform .9s var(--e-out); }

/* ---------------------------------------------------------------------
   通知・火花
   --------------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(92vw, 560px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: .92rem; line-height: 1.45;
  background: #17181B; color: #fff; border: 1px solid rgb(217 182 111 / .5); box-shadow: 0 12px 30px rgb(0 0 0 / .4);
  transition: opacity .2s ease, transform .25s var(--e-out); }
.toast::before { content: "✓"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #2A1D06; font-size: .8rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); border-color: #E98A94; }
.toast.error::before { content: "!"; background: #fff; color: var(--danger); }
.toast.caution { background: #3A2A10; border-color: var(--gold); color: #FFF1D0; }
.toast.caution::before { content: "!"; background: var(--flame-yellow); color: #3A2A10; }
.fx-burst { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 65; pointer-events: none; }

/* ---------------------------------------------------------------------
   画面の登場（その画面を開いた最初の1回だけ）と、画面の切り替え
   --------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.enter > *, .enter .stagger > *, .enter .member-list > li, .enter .stat-grid > *, .enter .ranking > li {
  animation: rise .45s var(--e-out) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.enter .member-list > li { animation-duration: .3s; animation-delay: calc(120ms + var(--i, 0) * 28ms); }
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .24s var(--e-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* =====================================================================
   管理画面：明るい作業面
   ===================================================================== */
body.admin { background: #F3EFE7; }
.container.wide { max-width: 1120px; }
.admin-nav { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; padding: 8px 16px; background: #FFFDF9; border-bottom: 1px solid var(--line); }
.nav-group { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-group + .nav-group { padding-left: 14px; border-left: 1px solid var(--line); }
.admin-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 10px; border-radius: 8px; color: var(--ink); font-weight: 700; font-size: .85rem;
  text-decoration: none; transition: background-color .15s ease; }
.admin-nav a:hover { background: var(--paper-2); }
.admin-nav a[aria-current=page] { background: var(--stone-900); color: var(--gold-2); box-shadow: inset 0 -2px 0 var(--flame-orange); }
.admin-nav .logout { margin-left: auto; color: var(--ink-2); }
@media (min-width: 720px) {
  .admin-nav { position: sticky; top: 52px; z-index: 19; }
}
@media (max-width: 719px) {
  .admin-nav { gap: 4px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .nav-group { flex: none; flex-wrap: nowrap; }
  .admin-nav .logout { margin-left: 0; white-space: nowrap; }
  .admin-nav a { white-space: nowrap; }
}
.admin #app > h1 { font-size: 1.45rem; display: flex; align-items: center; gap: 10px; }
.admin #app > h1::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: linear-gradient(180deg, var(--flame-orange), var(--flame-red)); }
.admin .card { background: #FFFDF9; }
.admin .form > .btn { justify-self: start; min-width: 14em; }
.admin .deadline { background: var(--stone-900); color: #FFD9B8; }
.admin h2 { color: var(--ink); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head .row { margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.admin .stat { display: grid; gap: 2px; padding: 12px 14px; background: #FFFDF9; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 2px 8px rgb(0 0 0 / .04);
  transition: transform .15s var(--e-out), border-color .15s ease, box-shadow .15s ease; }
.admin .stat .stat-label { color: var(--ink-2); font-size: .78rem; font-weight: 700; }
.admin .stat .stat-value { color: var(--ink); font-size: 2.3rem; }
.admin .stat.hot { border-color: #F2C6BA; background: linear-gradient(180deg, #FFF4F0, #FFFDF9); }
.admin .stat.hot .stat-value { color: var(--action); }
a.stat { text-decoration: none; color: var(--ink); }
a.stat::after { content: "›"; position: absolute; right: 12px; top: 10px; color: var(--ink-2); }
a.stat:hover { border-color: var(--gold-deep); transform: translateY(-2px); box-shadow: 0 8px 18px rgb(0 0 0 / .08); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; }
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 12px 0; }
.info-cards .card { margin: 0; border-top: 4px solid var(--stone-800); }
.info-cards .card.final { border-top-color: var(--gold); }
.info-cards h3 { font-size: .95rem; }
.info-cards p { margin: 0; font-size: .86rem; color: var(--ink-2); }

.table-wrap { overflow-x: auto; background: #FFFDF9; border-radius: var(--r-card); border: 1px solid var(--line); box-shadow: 0 2px 8px rgb(0 0 0 / .04); margin: 8px 0; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.table th { position: sticky; top: 0; background: #F6F2EA; font-size: .74rem; letter-spacing: .06em; color: var(--ink-2); font-weight: 800; }
.table tbody tr { transition: background-color .3s ease; }
.table tbody tr:hover { background: #FBF7EF; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.wrap { white-space: normal; min-width: 12em; }
.table select { min-width: 9em; min-height: 40px; padding: 6px 10px; }
.table .row { margin: 0; flex-wrap: nowrap; align-items: center; }
.table tr.is-busy { opacity: .55; pointer-events: none; }
.table tr.is-new { animation: row-new 2.4s var(--e-out) 1; }
@keyframes row-new { 0%, 30% { background: #FBEFCB; } 100% { background: transparent; } }
.row-note { display: block; margin-top: 2px; font-size: .74rem; color: var(--warning); font-weight: 700; white-space: normal; }
.busy-note { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); font-weight: 700; }
.tabs { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.tabs .btn[aria-pressed=true] { background: var(--stone-900); color: var(--gold-2); border-color: var(--stone-900); }
.url-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.url-card { text-align: center; }
.url-card img { width: 160px; height: 160px; image-rendering: pixelated; }
.url-text { font-size: .72rem; word-break: break-all; color: var(--ink-2); }
.item .chip { flex: none; max-width: 55%; align-self: flex-start; }
.check-cell { width: 22px; height: 22px; }

/* 管理：順位 */
.ranking { list-style: none; padding: 0; margin: 0; }
.rank-row { display: grid; grid-template-columns: 2.4em 7.5em 1fr 4em; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { font-family: var(--font-display); font-size: 1.4rem; line-height: 1; text-align: center; color: var(--ink-2); }
.rank-row.r1 .rank-no { color: var(--gold-deep); }
.rank-row.r1 { background: linear-gradient(90deg, rgb(217 182 111 / .18), transparent 70%); border-radius: 8px; }
.rank-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-avg { text-align: right; font-family: var(--font-display); font-size: 1.35rem; line-height: 1; }

/* =====================================================================
   週次の発表画面：全面の黒い石のステージ（16:9に15チームが収まる）
   ===================================================================== */
body.presenting { background: var(--stone-950); color: var(--text-on-dark); --fg: var(--text-on-dark); --fg-muted: var(--muted-on-dark); --focus: var(--gold); overflow-x: hidden; }
body.presenting .topbar, body.presenting .admin-nav { display: none; }
body.presenting #app { max-width: none; padding: 0; }
.present { position: relative; isolation: isolate; min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr auto; gap: 1.6vh; padding: 3vh 3.2vw 2.2vh; overflow: hidden; }
.present-flames { position: absolute; left: -5%; right: -5%; bottom: -4%; height: 46vh; z-index: -1; pointer-events: none; opacity: .75; }
.present-flames.hero-flames { inset: auto -5% -4% -5%; height: 46vh; }
.present-embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.present-head { display: flex; align-items: center; gap: 2vw; }
.present-head .badge16 { width: clamp(56px, 6.5vh, 84px); height: clamp(56px, 6.5vh, 84px); }
.present-head .badge16-no { font-size: clamp(1.7rem, 3vh, 2.4rem); }
.present-titles { min-width: 0; }
.present-titles .eyebrow { font-size: clamp(.9rem, 1.8vh, 1.3rem); }
.present-head h1 { margin: 0; font-family: var(--font-mincho); font-weight: 800; font-size: clamp(1.8rem, 5vh, 3.4rem); line-height: 1.15; letter-spacing: .06em; }
.present-head p { margin: 0; color: var(--muted-on-dark); font-size: clamp(.85rem, 1.7vh, 1.1rem); }
.present-wm { margin-left: auto; text-align: right; line-height: 1; }
.present-wm .wm-top { font-size: clamp(3rem, 9vh, 6rem); }
.present-wm .tagline { display: block; font-family: var(--font-serif-en); font-style: italic; font-weight: 700; color: var(--gold); font-size: clamp(.8rem, 1.7vh, 1.1rem); margin-top: .6vh; }

/* 1位の枠 */
.champion { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2vw; min-height: 13vh; padding: 1.6vh 2vw;
  border-radius: 16px; border: 1px solid rgb(217 182 111 / .35); background: rgb(16 17 19 / .55); overflow: hidden; }
.champion .crown { font-family: var(--font-display); font-size: clamp(2.6rem, 8vh, 5.6rem); line-height: 1; color: var(--gold-2); }
.champion .crown small { font-size: .45em; margin-left: .1em; color: var(--gold); }
.champion .c-name { font-family: var(--font-mincho); font-weight: 800; font-size: clamp(1.8rem, 6vh, 4rem); line-height: 1.1; letter-spacing: .06em; }
.champion .c-avg { font-family: var(--font-display); font-size: clamp(2.4rem, 7.5vh, 5.2rem); line-height: 1; text-align: right; color: #fff; }
.champion .c-avg small { font-size: .42em; color: var(--gold); margin-left: .15em; }
.champion .c-move { display: block; font-family: var(--font-sans); font-size: clamp(.8rem, 1.8vh, 1.2rem); color: var(--muted-on-dark); text-align: right; }
.champion .veil, .p-row .veil { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); letter-spacing: .3em;
  color: rgb(255 255 255 / .22); background: repeating-linear-gradient(135deg, rgb(255 255 255 / .03) 0 10px, transparent 10px 20px); }
.champion .veil { font-size: clamp(1.6rem, 5vh, 3rem); }
.champion.revealed { border-color: var(--gold); background: linear-gradient(90deg, rgb(217 182 111 / .42), rgb(255 121 43 / .22) 55%, rgb(16 17 19 / .5));
  box-shadow: 0 0 0 1px rgb(240 215 154 / .5), 0 0 70px rgb(255 160 60 / .5), inset 0 0 60px rgb(217 182 111 / .22); }
.champion.revealed .c-name { text-shadow: 0 0 24px rgb(255 200 120 / .55); }
.champion.revealed::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgb(255 240 200 / .45), transparent); animation: sheen 1.1s var(--e-out) .15s 1 both; }
@keyframes sheen { from { transform: translateX(0); } to { transform: translateX(380%); } }
.champion.revealed .c-body { animation: champ-in .8s var(--e-out) both; }
@keyframes champ-in { 0% { opacity: 0; transform: scale(.92); filter: brightness(2); } 100% { opacity: 1; transform: none; filter: none; } }
.champion .c-body { display: contents; }

/* 2〜15位（2列） */
.present-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.4vw; align-content: start; }
.present-col { list-style: none; margin: 0; padding: 0; display: grid; gap: .9vh; align-content: start; }
.p-row { position: relative; display: grid; grid-template-columns: 3.6em minmax(5em, 9em) 1fr 3.6em 2.6em; gap: 1vw; align-items: center; min-height: 7.2vh; padding: .6vh 1.2vw;
  border-radius: 12px; background: rgb(255 255 255 / .045); border: 1px solid var(--line-on-dark); font-size: clamp(.95rem, 2.4vh, 1.6rem); overflow: hidden; }
.p-row .rank-no { font-size: 1.5em; color: var(--gold-2); text-align: left; }
.p-row .rank-no small { font-size: .5em; color: var(--gold); margin-left: .1em; }
.p-row .rank-name { font-weight: 800; }
.p-row .rank-avg { font-size: 1.4em; color: #fff; }
.p-row .bar { height: 1.1vh; min-height: 8px; background: rgb(255 255 255 / .1); }
.p-row .move { font-size: .78em; font-weight: 800; text-align: right; color: var(--muted-on-dark); }
.move.up { color: #6FD6A4; }
.move.down { color: #FF8C7A; }
.p-row .veil { font-size: 1em; }
.p-row .p-body { display: contents; }
.p-row.revealed .p-body > * { animation: row-in .3s var(--e-out) both; }
.p-row.revealed { border-color: rgb(255 255 255 / .16); background: rgb(255 255 255 / .07); }
.p-row.just { box-shadow: 0 0 0 1px rgb(255 121 43 / .55), 0 0 24px rgb(255 121 43 / .25); }
.p-row.r2.revealed, .p-row.r3.revealed { border-color: rgb(217 182 111 / .35); }
@keyframes row-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.present-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.present-controls .count { color: var(--muted-on-dark); font-size: .9rem; margin-right: auto; }
.present-controls .count kbd { font-family: inherit; font-size: .78rem; padding: 1px 6px; border-radius: 4px; border: 1px solid rgb(255 255 255 / .25); }
.present .btn:not(.primary):not(.gold) { background: rgb(255 255 255 / .06); color: #fff; border-color: rgb(255 255 255 / .22); }
.present-controls .btn.primary { min-width: 9em; }
.present.instant * { animation: none !important; transition: none !important; }
@media (max-width: 760px) {
  .present { min-height: 100vh; grid-template-rows: auto; padding: 16px; gap: 12px; }
  .present-grid { grid-template-columns: 1fr; gap: 8px; }
  .present-wm { display: none; }
  .p-row { grid-template-columns: 2.8em 1fr 2.8em 2.2em; min-height: 48px; font-size: 1rem; padding: 6px 10px; }
  .p-row .bar { display: none; }
  .champion { grid-template-columns: auto 1fr; }
  .champion .c-avg { grid-column: 1 / -1; text-align: left; }
}

/* =====================================================================
   表紙（入口・管理ログイン）
   ===================================================================== */
body.cover { min-height: 100vh; }
.cover-main { position: relative; isolation: isolate; min-height: calc(100vh - 52px); display: grid; place-items: center; padding: 28px 16px 56px; overflow: hidden; }
.cover-flames { position: absolute; inset: auto -10% -5% -10%; height: 60vh; z-index: -1; pointer-events: none; }
.cover-embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.cover-inner { width: 100%; max-width: 980px; display: grid; gap: 22px; grid-template-columns: 1fr auto; align-items: center; }
.cover-photo { grid-column: 1 / -1; position: relative; border-radius: 16px; overflow: hidden; border: 1px solid rgb(217 182 111 / .3); box-shadow: var(--shadow-dark); aspect-ratio: 12 / 5; background: #2b0d0f; width: 100%; max-width: 820px; justify-self: center; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.cover-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(16 17 19 / .85)), linear-gradient(90deg, rgb(16 17 19 / .4), transparent 30%, transparent 70%, rgb(16 17 19 / .4)); }
.cover-title { display: grid; gap: 6px; }
.cover-title .row-badge { display: flex; align-items: center; gap: 14px; }
.cover-title .badge16 { width: 76px; height: 76px; }
.cover-title .badge16-no { font-size: 2.3rem; }
.cover-chapter { font-family: var(--font-serif-en); font-style: italic; font-weight: 700; font-size: 2rem; line-height: 1; color: var(--gold); }
.cover-top { font-family: var(--font-display); font-size: clamp(6rem, 26vw, 12rem); line-height: .82; letter-spacing: .01em; color: #fff; margin: 4px 0 0;
  transform: scaleY(1.18); transform-origin: top left; text-shadow: 0 6px 30px rgb(0 0 0 / .6), 0 0 60px rgb(255 121 43 / .25); }
.cover-title { position: relative; isolation: isolate; }
.cover-title::before { content: ""; position: absolute; z-index: -1; left: -6%; width: min(120%, 520px); top: 44%; height: 34%; transform: rotate(-4deg); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M8 30 C40 16 92 12 150 15 C222 10 300 8 392 18 C400 28 394 40 380 45 C300 53 226 49 150 51 C92 54 42 55 12 49 C0 44 1 36 8 30Z' fill='%23000' fill-opacity='.7'/%3E%3Cpath d='M24 25 C96 18 210 16 368 21 M30 44 C120 46 230 44 360 38' stroke='%23000' stroke-opacity='.45' stroke-width='3' fill='none'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.cover-tagline { margin: 22px 0 0; font-family: var(--font-serif-en); font-style: italic; font-weight: 700; font-size: clamp(1.15rem, 3.5vw, 1.6rem); line-height: 1.25;
  background: linear-gradient(180deg, #FFF0C4, var(--gold) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cover-name { margin: 6px 0 0; font-family: var(--font-mincho); font-weight: 800; font-size: 1.2rem; letter-spacing: .1em; color: var(--text-on-dark); }
.cover .v-slogan { align-self: center; }
.cover .v-col { font-size: clamp(1.15rem, 3.2vw, 1.7rem); letter-spacing: .2em; }
.cover .v-we { font-size: 1.05rem; }
.cover-card { grid-column: 1 / -1; }
.cover-card.card { max-width: 560px; justify-self: center; width: 100%; }
.cover-card h1, .cover-card h2 { font-family: var(--font-mincho); }
.cover-foot { grid-column: 1 / -1; text-align: center; font-size: .86rem; color: var(--muted-on-dark); margin: 0; }
.cover-foot a { color: var(--gold-2); }
.enter-up { animation: rise .7s var(--e-out) both; }
.enter-up.d1 { animation-delay: .12s; }
.enter-up.d2 { animation-delay: .24s; }
.enter-up.d3 { animation-delay: .36s; }
.cover .cover-flames { animation: ignite 1.1s var(--e-out) both; }
@media (max-width: 560px) {
  .cover-inner { gap: 16px; }
  .cover .v-col { font-size: 1rem; letter-spacing: .12em; }
  .cover .v-we { font-size: .8rem; }
}
.login-card .form { gap: 14px; }

/* =====================================================================
   原本（写真・PDF）の添付
   ===================================================================== */
.file-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.file-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.file-thumb a { display: block; line-height: 0; border-radius: 8px; }
.file-thumb img, .file-pdf { width: 88px; height: 88px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; }
.file-thumb img { object-fit: cover; }
.file-pdf { display: flex; align-items: center; justify-content: center; line-height: 1; background: #FBEDE9; color: var(--action-2); font-weight: 800; letter-spacing: .06em; }
.file-thumb small { color: var(--ink-2); font-size: .72rem; line-height: 1.2; }
/* 管理画面: 提出ごとに、原本（左）と入力された内容（右）を並べる。スマホでは縦に並べる */
.sub-review { display: grid; gap: 12px; padding-bottom: 10px; }
.sub-review .sub-body { padding: 0; }
.sub-originals .file-thumb img, .sub-originals .file-pdf { width: 100px; height: 130px; }
@media (min-width: 900px) {
  .sub-review { grid-template-columns: minmax(220px, 2fr) 3fr; align-items: start; }
  .sub-originals .file-thumb img, .sub-originals .file-pdf { width: 140px; height: 180px; }
}

/* =====================================================================
   オープニング動画（チーム画面）
   ===================================================================== */
.opening-fab { position: fixed; left: 12px; bottom: 14px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 14px 6px 8px;
  border-radius: 999px; border: 1px solid rgb(217 182 111 / .6); background: rgb(16 17 19 / .9); color: var(--gold-2); font: inherit; font-size: .8rem; font-weight: 800;
  letter-spacing: .04em; box-shadow: 0 8px 22px rgb(0 0 0 / .45); cursor: pointer; transition: transform .12s var(--e-out), border-color .2s ease; }
.opening-fab .play-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .7rem; color: #fff; padding-left: 2px;
  background: linear-gradient(180deg, var(--flame-orange), var(--flame-red)); box-shadow: 0 0 12px rgb(255 121 43 / .6); }
.opening-fab:hover { border-color: var(--gold); }
.opening-fab:active { transform: scale(.95); }
/* 左下のボタンと重ならないよう、通知を少し上に出す */
body.has-opening .toast { bottom: 68px; }
body.opening-open { overflow: hidden; }
.opening { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 120%, rgb(140 30 20 / .5), transparent 60%), #050506; animation: opening-in .3s ease both; }
@keyframes opening-in { from { opacity: 0; } to { opacity: 1; } }
.opening-video { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.opening button { font: inherit; font-weight: 800; cursor: pointer; color: #fff; border: 1px solid rgb(217 182 111 / .7); background: rgb(10 10 12 / .7); border-radius: 999px;
  letter-spacing: .04em; transition: transform .12s var(--e-out), background-color .2s ease; }
.opening button:active { transform: scale(.96); }
.opening button:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.opening-skip { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); min-width: 120px; min-height: 52px; padding: 8px 20px; font-size: 1rem; color: var(--gold-2) !important; }
.opening-sound { position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%); min-height: 52px; padding: 8px 24px; font-size: 1.05rem;
  white-space: nowrap; border-color: transparent !important; background: linear-gradient(180deg, #D13A26, var(--action-2)) !important; box-shadow: 0 8px 24px rgb(185 45 32 / .5); }
.opening-sound:active { transform: translateX(-50%) scale(.96); }
.opening-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100px; height: 100px; font-size: 2.4rem; padding: 0 0 0 .12em;
  border: 2px solid var(--gold-2) !important; background: radial-gradient(circle, rgb(217 54 39 / .95), rgb(140 25 15 / .95)) !important; box-shadow: 0 0 40px rgb(255 121 43 / .55); }
.opening-play:active { transform: translate(-50%, -50%) scale(.95); }

/* =====================================================================
   印刷・動きを減らす設定
   ===================================================================== */
@media print {
  .topbar, .admin-nav, .no-print, .toast, .route-progress { display: none !important; }
  body, body.admin { background: #fff; }
  body.theme-dark::before { display: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; animation: none; }
  .opening-fab, .opening, .fx-burst { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .hero-flames::before, .hero-flames::after { animation: none !important; }
  .spinner { animation: none !important; border-right-color: currentColor; opacity: .6; }
  .champion.revealed::after { display: none; }
  .delta-float { animation: none !important; transform: none; }
  .is-routing .route-progress { animation: none !important; transform: scaleX(.6); }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* ポイントのルール：ほかのカードと色を変えて、開けることがわかるようにする */
details.help > summary { list-style: none; gap: 10px; min-height: 52px; padding: 4px 2px; color: var(--gold-2, #F0D79A); }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary::after { content: '▾'; margin-left: auto; color: var(--gold, #D9B66F); transition: transform .2s ease; }
details.help[open] > summary::after { transform: rotate(180deg); }
.theme-dark details.help.card, details.help.card {
  background: linear-gradient(135deg, rgb(217 182 111 / .22), rgb(255 121 43 / .12)) , var(--stone-900, #191B1F);
  border: 1px solid rgb(217 182 111 / .55);
}
.help-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold, #D9B66F); color: var(--stone-950, #101113); font-weight: 800; font-size: .95rem; flex: none; }
.help-open { font-size: .72rem; font-weight: 700; color: var(--muted-on-dark, #B9B6AF); margin-left: 4px; }
details.help[open] .help-open { display: none; }

/* 制作クレジット */
.credit { text-align: center; padding: 18px 16px 72px; font-size: .72rem; letter-spacing: .06em; color: var(--muted-on-dark, #B9B6AF); opacity: .8; }
.credit-name { font-weight: 700; letter-spacing: .08em; }
body.admin .credit { color: #6b7280; padding-bottom: 24px; }
body.presenting .credit { display: none; }
@media print { .credit { display: none; } }

/* 管理画面への隠しリンク（上部のスローガンの「本気」）。見た目はほかの文字と同じ */
.slogan .secret-link, .slogan .secret-link:visited, .slogan .secret-link:hover, .v-slogan .secret-link, .v-slogan .secret-link:visited, .v-slogan .secret-link:hover { color: inherit !important; text-decoration: none !important; cursor: text; }
.secret-link:focus { outline: none; }
.credit a.credit-name { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.credit a.credit-name:hover, .credit a.credit-name:focus-visible { color: var(--gold, #D9B66F); }

/* ご利用ガイド */
.credit a.credit-guide { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.credit a.credit-guide:hover, .credit a.credit-guide:focus-visible { color: var(--gold, #D9B66F); }
.credit-sep { margin: 0 .6em; opacity: .6; }
.guide h1 { font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif; font-size: clamp(1.5rem, 4vw, 2rem); margin: 16px 0 8px; }
.guide-meta { font-size: .8rem; color: var(--muted-on-dark, #B9B6AF); line-height: 1.8; margin: 0 0 16px; }
.guide-card { background: var(--paper, #FAF8F3); color: var(--ink, #202226); }
.guide-card h2 { font-size: 1.05rem; margin: 0 0 8px; color: var(--ink, #202226); }
.guide-card p, .guide-card li { font-size: .92rem; line-height: 1.8; }
.guide-card ul { margin: 0; padding-left: 1.2em; }
.guide-card li + li { margin-top: 6px; }
.guide-card strong { color: var(--action, #B92D20); }

/* トップページ：横幅の広いPCでは、写真を中央に、左に「16th・Chapter・TOP」、右に縦書きのスローガンを置く */
@media (min-width: 1100px) {
  .cover-inner {
    max-width: 1560px;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2.3fr) minmax(260px, 1fr); /* 左右を同じ幅にして、写真と下の枠を中心にそろえる */
    grid-template-areas: "title photo slogan" "card card card" "foot foot foot";
    column-gap: clamp(28px, 3vw, 56px);
    row-gap: 32px;
  }
  .cover-photo { grid-area: photo; max-width: none; align-self: center; }
  .cover-title { grid-area: title; justify-self: end; align-self: center; }
  .cover-inner > .v-slogan { grid-area: slogan; justify-self: start; align-self: center; }
  .cover-top { font-size: clamp(6rem, 8.5vw, 10rem); }
  .cover-card { grid-area: card; }
  .cover-foot { grid-area: foot; }
}
