/* ============================================================================
   俺ぼち予想部 — 視聴者向けUI
   ----------------------------------------------------------------------------
   ビルド工程を持たない方針なので、この1枚で完結させる（要件12.1）。
   視聴者はスマホで、配信を見ながら片手で触る。まずスマホ縦持ちを書き、
   広い画面向けの調整を後ろに足す。

   方針：明るい面でゲームの熱を出す。
     - 背景は白。明るい部屋でも読める（暗い画面は「怖いサイト」に見える）
     - 熱は「面」ではなく「色と数字」で出す。倍率とポイントを主役にする
     - 2択は色で見分けがつくようにする（左＝紫／右＝ロゼ）。
       色だけに頼らず、ラベルと選択中のチェックも併せて出す
     - 触るものは最低48px。指1本で完結する
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=Chakra+Petch:wght@500;600;700&display=swap');

:root {
  /* --- 面 --------------------------------------------------------------- */
  --bg: #fbfbfe;
  --surface: #ffffff;
  --surface-2: #f4f5fa;
  --surface-3: #eceef6;
  --line: #e5e7f0;
  --line-strong: #cbd0e0;

  /* --- 文字 ------------------------------------------------------------- */
  --text: #14161f;      /* 白背景で 16.5:1 */
  --text-2: #565e75;    /* 白背景で 6.6:1 */
  --text-3: #7b829a;    /* 補助。大きい文字だけに使う */

  /* --- 左の選択肢／基調 ------------------------------------------------- */
  --brand: #6d28d9;         /* 白背景で 7.4:1。文字に使える */
  --brand-bright: #7c3aed;  /* 面・枠に使う */
  --brand-soft: #f4efff;
  --brand-ring: rgba(124, 58, 237, 0.18);

  /* --- 右の選択肢／行動 ------------------------------------------------- */
  --hot: #be123c;           /* 白背景で 6.0:1。文字に使える */
  --hot-bright: #f43f5e;    /* 面・枠に使う */
  --hot-soft: #fff0f3;
  --hot-ring: rgba(244, 63, 94, 0.18);

  /* --- 状態 ------------------------------------------------------------- */
  --win: #047857;
  --win-soft: #e6f7f1;
  --lose: #be123c;
  --lose-soft: #fff0f3;
  --gold: #92600e;
  --gold-soft: #fdf5e3;
  --gold-line: #e6c877;

  /* --- 形 --------------------------------------------------------------- */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --tap: 48px;

  --shadow-1: 0 1px 2px rgba(20, 22, 31, 0.05);
  --shadow-2: 0 1px 2px rgba(20, 22, 31, 0.05), 0 10px 28px -14px rgba(20, 22, 31, 0.22);
  --shadow-3: 0 2px 4px rgba(20, 22, 31, 0.06), 0 20px 44px -20px rgba(20, 22, 31, 0.3);

  /* --- 文字組み --------------------------------------------------------- */
  --font-display: 'Dela Gothic One', 'Zen Kaku Gothic New', -apple-system, sans-serif;
  --font-body: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont,
    'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif;
  --font-num: 'Chakra Petch', 'Zen Kaku Gothic New', -apple-system, sans-serif;

  /* --- 動き ------------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;

  /* 白一色にせず、うっすら格子を敷く。安っぽさが消えて、画面が締まる。 */
  background-image:
    linear-gradient(to right, rgba(109, 40, 217, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(109, 40, 217, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* キーボードで辿れることを潰さない */
:focus-visible {
  outline: 3px solid var(--brand-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

svg { flex: none; }

/* 🔴 display を指定した要素は hidden 属性が効かなくなる。
   （.payout-hint に display:flex を書いていたため、隠したいものが出ていた）
   どの指定より後に来ても勝つように !important を付けて先に置く。 */
[hidden] { display: none !important; }

/* 動きを控えたい人には動かさない */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   骨組み
   ============================================================================ */

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 96px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 251, 254, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
}

.site-header__inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  line-height: 0;
  transition: opacity var(--dur) var(--ease);
}
.brand:hover { text-decoration: none; opacity: 0.8; }

/* ロゴは筆文字で、白い部分に黒い縁が付いている。白背景でもそのまま読める。
   高さを基準に置き、幅は元の比率（3:1）に任せる。 */
.brand__logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 46vw;
  object-fit: contain;
}

/* ログイン・登録では大きく出す */
.brand--hero { justify-content: center; margin: 8px 0 18px; }
.brand--hero .brand__logo { height: 64px; max-width: 82vw; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 500;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--text-2);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* 残高は常に見えるところに。予想の判断材料そのもの。 */
.chip-points {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-bright), #a855f7);
  color: #fff;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 4px 14px -6px rgba(124, 58, 237, 0.7);
}
.chip-points span { font-size: 0.72em; font-weight: 600; opacity: 0.85; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 22px 16px 48px;
  color: var(--text-3);
  font-size: 0.8rem;
  text-align: center;
}
.site-footer a { color: var(--text-2); }
.site-footer p { margin: 6px 0; }

/* ============================================================================
   文字
   ============================================================================ */

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5.4vw, 1.7rem);
  line-height: 1.35;
  letter-spacing: 0.005em;
  margin: 26px 0 14px;
}

h2 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 10px; }
h3 { font-size: 0.98rem; font-weight: 700; margin: 20px 0 8px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin: 0 0 8px;
  text-transform: uppercase;
}

.muted { color: var(--text-2); }
.small { font-size: 0.88rem; }
.tiny { font-size: 0.78rem; line-height: 1.6; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.plus { color: var(--win); }
.minus { color: var(--lose); }
.crown { color: var(--gold); }

/* ============================================================================
   面
   ============================================================================ */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin: 14px 0;
  box-shadow: var(--shadow-1);
}

.panel--plain { box-shadow: none; background: transparent; border-style: dashed; }
.panel__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel__title { font-size: 1.02rem; font-weight: 700; margin: 0; }

/* ============================================================================
   バッジ
   ============================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
}
.badge--open { background: var(--hot-soft); border-color: #f6b8c6; color: var(--hot); }
.badge--closed { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.badge--settled { background: var(--brand-soft); border-color: #cbb4f5; color: var(--brand); }
.badge--voided { background: var(--surface-3); }
.badge--king { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }

/* 受付中を「生きている」ものとして見せる */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--hot-bright);
  box-shadow: 0 0 0 0 var(--hot-ring);
  animation: pulse 1.8s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* ============================================================================
   お題カード（この画面の主役）
   ============================================================================ */

.bet {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  margin: 16px 0;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

/* 上端に細い光の線。受付中だけ色を強くする。 */
.bet::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-bright), var(--hot-bright));
  opacity: 0.28;
}
.bet--open::before { opacity: 1; }

.bet__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.bet__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 5vw, 1.45rem);
  line-height: 1.4;
  margin: 0 0 16px;
}

.countdown {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}
.countdown.is-urgent { color: var(--hot); }
.countdown small { font-size: 0.7em; font-weight: 600; color: var(--text-3); }

/* --- 2択 ---------------------------------------------------------------- */

.picks { display: grid; gap: 10px; }

.pick {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 14px 12px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
button.pick:hover { border-color: var(--line-strong); }
button.pick:active { transform: scale(0.99); }
.pick[disabled] { cursor: default; }

/* 左と右で色を分ける。選ぶ前から違いが見えるようにする。 */
.pick--a .pick__side { background: var(--brand-soft); color: var(--brand); }
.pick--b .pick__side { background: var(--hot-soft); color: var(--hot); }
.pick--a .pick__odds { color: var(--brand); }
.pick--b .pick__odds { color: var(--hot); }
.pick--a .pick__fill { background: linear-gradient(90deg, #8b5cf6, var(--brand-bright)); }
.pick--b .pick__fill { background: linear-gradient(90deg, #fb7185, var(--hot-bright)); }

.pick--a.is-selected { border-color: var(--brand-bright); background: var(--brand-soft); box-shadow: 0 0 0 4px var(--brand-ring); }
.pick--b.is-selected { border-color: var(--hot-bright); background: var(--hot-soft); box-shadow: 0 0 0 4px var(--hot-ring); }

.pick.is-correct { border-color: var(--win); background: var(--win-soft); }
.pick.is-wrong { opacity: 0.5; }

.pick__top { display: flex; align-items: center; gap: 9px; min-width: 0; }

/* 「A」「B」の印。色が見えない人にも左右が分かる。 */
.pick__side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-family: var(--font-num);
  font-size: 0.74rem;
  font-weight: 700;
}

.pick__label { font-weight: 700; font-size: 1.08rem; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }

.pick__odds {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  white-space: nowrap;
}
.pick__odds small { display: block; font-size: 0.4em; font-weight: 600; color: var(--text-3); letter-spacing: 0.06em; }

.pick__meta {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  font-size: 0.79rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* span のままだと height が効かない（インライン要素）。必ずブロックにする。 */
.pick__bar { display: block; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 9px; }
.pick__fill { display: block; height: 100%; transition: width 320ms var(--ease); }

/* 選んだ側の印。以前は右上に絶対配置していて倍率の数字に重なっていた。
   投票数の行に並べれば、どの幅でもぶつからない。 */
.pick__check {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}
.pick--b .pick__check { color: var(--hot); }
.is-selected .pick__check { display: inline-flex; }

.pick__result { display: block; margin-top: 7px; font-size: 0.82rem; font-weight: 700; color: var(--win); }

/* --- 金額 --------------------------------------------------------------- */

.amounts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.amount {
  min-height: var(--tap);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.amount:hover { border-color: var(--line-strong); }
.amount:active { transform: scale(0.97); }
.amount.is-selected {
  border-color: var(--brand-bright);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px var(--brand-ring);
}

/* --- 当たったらいくら --------------------------------------------------- */

.payout-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: var(--r);
  background: var(--win-soft);
  border: 1px solid #b6e4d3;
  font-size: 0.86rem;
  color: var(--win);
}
.payout-hint strong { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 700; }

/* --- 自分の予想 --------------------------------------------------------- */

.mybet {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: 0.88rem;
}
.mybet__amount { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }

.bet__foot {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   入力とボタン
   ============================================================================ */

label { display: block; font-size: 0.86rem; font-weight: 700; margin-bottom: 6px; }

input[type="text"], input[type="password"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 4px var(--brand-ring);
}
input::placeholder { color: var(--text-3); }

.field + .field { margin-top: 14px; }
.field__hint { margin: 6px 0 0; font-size: 0.78rem; color: var(--text-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--tap);
  padding: 12px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-bright) 0%, #9333ea 50%, var(--hot-bright) 100%);
  color: #fff;
  box-shadow: 0 6px 20px -8px rgba(124, 58, 237, 0.75);
}
.btn--primary:hover { background: linear-gradient(135deg, #6d28d9 0%, #7e22ce 50%, #e11d48 100%); }
.btn--primary[disabled] { box-shadow: none; }

.btn--danger { border-color: #eab3bf; background: var(--surface); color: var(--hot); }
.btn--danger:hover { background: var(--hot-soft); }

.btn--block { width: 100%; }
.btn--lg { min-height: 58px; font-size: 1.06rem; letter-spacing: 0.01em; }
.btn--sm { min-height: 38px; padding: 6px 12px; font-size: 0.83rem; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* 選択肢のかたちをしたラジオ（締切の分数など） */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--line-strong); }
.chip input { width: auto; min-height: auto; margin: 0; accent-color: var(--brand-bright); }
.chip:has(input:checked) { border-color: var(--brand-bright); background: var(--brand-soft); color: var(--brand); }

/* ============================================================================
   通知
   ============================================================================ */

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 14px 0;
  border: 1px solid;
  font-size: 0.89rem;
}
.notice svg { margin-top: 2px; }
.notice--ok { background: var(--win-soft); border-color: #b6e4d3; color: var(--win); }
.notice--error { background: var(--lose-soft); border-color: #f6b8c6; color: var(--hot); }
.notice--info { background: var(--brand-soft); border-color: #cbb4f5; color: var(--brand); }
.notice--warn { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.notice__body > div + div { margin-top: 2px; }

/* ============================================================================
   表
   ============================================================================ */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--text-3); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.is-me { background: var(--brand-soft); }

/* ============================================================================
   ランキング
   ============================================================================ */

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-2);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.85rem;
}
.rank-no--1 { background: linear-gradient(135deg, #f7d774, #d9a521); color: #4a3204; }
.rank-no--2 { background: linear-gradient(135deg, #e2e6ef, #b9c0d0); color: #363b49; }
.rank-no--3 { background: linear-gradient(135deg, #eec39a, #c98a52); color: #4a2f11; }

.rank-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rank-pt { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }

.tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-2); border-radius: 999px; margin: 0 0 14px; }
.tabs a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-2);
  transition: all var(--dur) var(--ease);
}
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-1); }

/* ============================================================================
   俺ぼちキング
   ============================================================================ */

.king {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--gold-line);
  background: linear-gradient(135deg, #fffbf0 0%, #fdf3dd 100%);
  overflow: hidden;
  margin: 16px 0;
}
.king::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(230, 200, 119, 0.4), transparent 70%);
}
.king__crown { color: var(--gold); flex: none; }
.king__body { position: relative; min-width: 0; }
.king__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; color: var(--gold); margin: 0; }
.king__name { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.3; margin: 1px 0 0; color: #4a3204; }
.king__sub { font-size: 0.78rem; color: var(--gold); margin: 0; }

/* ============================================================================
   折りたたみ
   ============================================================================ */

details.fold {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  margin: 14px 0;
  overflow: hidden;
}
details.fold > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  transition: background var(--dur) var(--ease);
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:hover { background: var(--surface-2); }
details.fold > summary .fold__chevron { margin-left: auto; color: var(--text-3); transition: transform var(--dur) var(--ease); }
details.fold[open] > summary .fold__chevron { transform: rotate(180deg); }
details.fold > *:not(summary) { padding: 0 16px; }
details.fold > *:not(summary):last-child { padding-bottom: 16px; }
details.fold h3:first-of-type { margin-top: 4px; }
details.fold ul, details.fold ol { padding-left: 20px; }
details.fold li + li { margin-top: 4px; }

.formula {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ============================================================================
   統計の並び（マイページ）
   ============================================================================ */

.balance {
  padding: 18px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #faf7ff 0%, #fff5f7 100%);
  box-shadow: var(--shadow-1);
}
.balance__label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; color: var(--text-3); margin: 0; }
.balance__value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.1rem, 11vw, 2.9rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 2px 0 0;
  background: linear-gradient(135deg, var(--brand-bright), var(--hot-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.balance__value span { font-size: 0.4em; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat {
  padding: 11px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.stat__label { font-size: 0.71rem; color: var(--text-3); margin: 0; font-weight: 700; }
.stat__value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1px 0 0;
}

/* ============================================================================
   空のとき
   ============================================================================ */

.empty {
  text-align: center;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  margin: 16px 0;
}
.empty__icon { color: var(--text-3); opacity: 0.6; }
.empty__title { font-family: var(--font-display); font-size: 1.05rem; margin: 10px 0 4px; }
.empty p { margin: 0; color: var(--text-2); font-size: 0.88rem; }

/* ============================================================================
   ページ送り
   ============================================================================ */

.pagination { display: flex; gap: 5px; flex-wrap: wrap; list-style: none; padding: 0; margin: 16px 0 0; font-size: 0.86rem; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-weight: 700;
}
.pagination .active span { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ============================================================================
   広い画面
   ============================================================================ */

@media (min-width: 600px) {
  .picks { grid-template-columns: 1fr 1fr; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .bet { padding: 22px 20px; }
}

/* ============================================================================
   管理画面（同じトークンを使う。配信卓のボタンだけ大きめに）
   ============================================================================ */

.console-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}
.console-step__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-num);
  font-size: 0.76rem;
  font-weight: 700;
}

.console-card {
  border: 2px solid var(--brand-bright);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  margin: 16px 0;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.console-card--waiting { border-color: var(--gold-line); }

.console-title { font-family: var(--font-display); font-size: 1.2rem; margin: 6px 0 14px; }

.console-tally { display: grid; gap: 10px; margin-bottom: 14px; }
.console-tally__row { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.console-tally__label { font-weight: 700; min-width: 5.5em; }
.console-tally__odds { margin-left: auto; font-family: var(--font-num); font-weight: 700; color: var(--brand); }

.console-answers { display: grid; gap: 10px; }
.console-answers .btn { min-height: 64px; font-size: 1.05rem; }

@media (min-width: 560px) {
  .console-answers { grid-template-columns: 1fr 1fr; }
}
