/* LL!の部屋 — 既存 llsmash.com のデザイン言語を踏襲。
   ベージュ地に白カード、青のアクセント、角丸16px、下部タブバーのモバイル前提。

   モーションは Apple の Fluid Interfaces の考え方に寄せている:
   - 反応は押した瞬間（:active）に返す。離してからでは遅い
   - 既定はオーバーシュートなし（critically damped 相当）
   - 大きい文字ほどトラッキングを詰め、本文は 0 付近に置く */
:root {
  --bg: #f4f2ec;
  --card: #ffffff;
  --line: #e8e6e0;
  --accent: #185FA5;
  --accent-soft: #eaf1f8;
  --text: #1a1a1a;
  --sub: #8a8a8a;
  --mute: #bbbbbb;
  --danger: #c0392b;
  /* 「エラーではないが、登録値を直さないと永久に直らない」お知らせ用。
     取得エラー（--danger）より弱い注意として使い分ける */
  --warn: #8a5a00;
  --warn-soft: #fdf4e3;
  --gold: #d4a017;
  /* 「今日開催」の強調。地の白カードから浮かせすぎない濃度に留める */
  --today-bg: #f7fafd;
  --today-line: #b8d0e6;
  --radius: 16px;
  --header-h: 52px;

  /* モーション: 既定は overshoot なし。response ≒ 0.3–0.4s */
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 100ms;
  --dur-ui: 300ms;

  /* 面の重なり: 大きい面ほど深い影 */
  --shadow-card: 0 1px 2px rgba(26, 24, 20, .04);
  --shadow-raised: 0 4px 16px rgba(26, 24, 20, .10);
  --shadow-sheet: 0 -8px 40px rgba(26, 24, 20, .16);
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }

html, body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* タップ即応: 押した瞬間に反応を返し、300ms の遅延をなくす */
button, a, .member, .rank-item, .player-chip, .tabbar-item, .subtab {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.wrap { max-width: 640px; margin: 0 auto; padding-bottom: 92px; }

/* --------------------------------------------------------- ヘッダー
   コンテンツが下を流れる半透明の層。不透明の帯で画面を削らない。 */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: var(--header-h);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(232, 230, 224, .8);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.app-sub { font-size: 11px; color: var(--mute); font-weight: 400; margin-left: 6px; letter-spacing: 0.01em; }

.icon-btn {
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--dur-press) var(--ease-out), transform var(--dur-press) var(--ease-out);
  flex: none;
}
.icon-btn:active { background: rgba(0, 0, 0, .06); transform: scale(0.92); }
.icon-btn.tinted { background: var(--bg); }
.icon-btn.spinning svg { animation: spin 1s linear infinite; color: var(--mute); }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* -------------------------------------------------------- サブタブ */
.subtabs {
  display: flex;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(232, 230, 224, .8);
  position: sticky;
  top: var(--header-h);
  z-index: 9;
}
.subtab {
  flex: 1;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: color var(--dur-press) var(--ease-out), border-color var(--dur-ui) var(--ease-out);
}
.subtab:active { color: var(--accent); }
.subtab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ------------------------------------------------------ 下部タブバー */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 0.5px solid rgba(255, 255, 255, .5);
  box-shadow: 0 -0.5px 0 rgba(232, 230, 224, .9);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.tabbar-item {
  flex: 1;
  border: none;
  background: none;
  color: var(--mute);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 9px 0 8px;
  display: grid;
  justify-items: center;
  gap: 3px;
  cursor: pointer;
  transition: color var(--dur-press) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.tabbar-item:active { transform: scale(0.9); }
.tabbar-item.active { color: var(--accent); }
.tabbar-item svg { transition: transform var(--dur-press) var(--ease-out); }
.tabbar-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0);
  transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}
.tabbar-item.active .tabbar-dot { opacity: 1; transform: scale(1); }

/* ---------------------------------------------------------- 部品 */
.card {
  background: var(--card);
  margin: 12px;
  border-radius: var(--radius);
  border: 0.5px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--sub);
  letter-spacing: .06em;
  padding: 18px 16px 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: transform var(--dur-press) var(--ease-out), opacity var(--dur-press) var(--ease-out);
}
.btn:active { opacity: .75; transform: scale(0.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-plain { background: var(--bg); color: var(--text); }
.btn-danger { background: #fdeceb; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }

/* アイコン+ラベルの丸みを帯びたボタン（会場マップ等）。白地に薄い青枠、アイコンと文字は
   アクセントカラーで統一する。 */
.btn-icon {
  background: #fff;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
}
.btn-icon:active { background: var(--accent-soft); }
.icon-inline { flex: none; display: block; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.grid-2 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: block; font-size: 12px; font-weight: 700; color: var(--sub); margin: 12px 0 5px; }
input, textarea, select {
  width: 100%;
  background: var(--bg);
  border: 0.5px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); font-weight: 400; margin: 12px 0 0; }
.check input { width: auto; }

/* 管理画面: 自動導出された配信チャンネルの1行 */
.yt-chan {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 0.5px solid var(--line);
}
.yt-chan-main { flex: 1; min-width: 0; }
.yt-chan-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yt-chan.is-excluded .yt-chan-name { color: var(--mute); text-decoration: line-through; }

.muted { color: var(--sub); }
.tiny { font-size: 11px; }
.empty { padding: 60px 24px; text-align: center; color: var(--mute); font-size: 13px; }

.banner {
  margin: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.banner.is-error { background: #fdeceb; color: var(--danger); }

/* 連携が照合できていないときのお知らせ。取得エラー（--danger）ではなく、
   本人が登録値を直せば解決するものなので弱い注意色にする。アイコンと本文が
   2行になっても頭を揃えたいので align-items は flex-start。 */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.notice .icon-inline { margin-top: 2px; }

/* -------------------------------------------------------- アバター
   画像は常に円形にクロップ。flex 内で潰れないよう幅・高さを固定する。 */
.ava {
  width: 44px; height: 44px;
  min-width: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--sub);
  flex: none;
  overflow: hidden;
  user-select: none;
}
.ava.xs { width: 22px; height: 22px; min-width: 22px; font-size: 10px; }
.ava.sm { width: 30px; height: 30px; min-width: 30px; font-size: 12px; }
.ava.lg {
  width: 72px; height: 72px; min-width: 72px;
  font-size: 26px;
  border: 3px solid #fff;
  box-shadow: var(--shadow-card);
}

/* ------------------------------------------------------- お知らせ */
.notice-card { background: var(--card); margin: 12px; border-radius: var(--radius); border: 0.5px solid var(--line); overflow: hidden; }
.notice-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 0.5px solid var(--line); font-size: 13px; align-items: baseline; }
.notice-item:last-child { border-bottom: none; }
.notice-item time { font-size: 11px; color: var(--mute); flex: none; }
.notice-item .pin { color: var(--gold); flex: none; }

/* ------------------------------ 大会アーカイブ（YouTube） */
.video-list { display: grid; gap: 10px; padding: 0 12px; }
.video {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 10px;
  color: var(--text);
  text-decoration: none;
  transition: transform var(--dur-press) var(--ease-out);
}
.video:active { transform: scale(.985); }
/* サムネはサイズを固定して、タイトルの長さでカードが伸び縮みしないようにする */
.video-thumb {
  flex: none;
  width: 84px;
  min-width: 84px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-soft);
  background-size: cover;
  background-position: center;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.video-body { display: grid; gap: 2px; min-width: 0; }
.video-title { font-size: 13px; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.video-meta { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 「あなたの試合」「◯◯ の試合」。本人の試合クリップだと分かる見出し */
.video-badge { font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------ メンバー */
.member-list { display: grid; gap: 10px; padding: 0 12px; }
.member {
  background: var(--card);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 0;
  color: inherit;
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out);
}
.member:active { transform: scale(.98); box-shadow: none; }
.member-body {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
}
.member-body .ava {
  width: 58px; height: 58px; min-width: 58px;
  font-size: 20px;
}
.member-info { min-width: 0; flex: 1; }
.member-name-row { display: flex; align-items: center; gap: 6px; }
.member-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.twitter-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  border: none;
  background: none;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color var(--dur-press) var(--ease-out), background var(--dur-press) var(--ease-out);
}
.twitter-btn:active { color: var(--accent); background: var(--accent-soft); }

.member-chars {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.4;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rate-row { display: flex; gap: 14px; margin-top: 6px; align-items: baseline; flex-wrap: wrap; }
.rate { display: flex; align-items: baseline; gap: 4px; }
.rate-label { font-size: 10px; color: var(--mute); font-weight: 700; letter-spacing: .04em; }
.rate-val { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.member-bio {
  margin: 0 14px 14px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------------------------------------------- ランキング */
.rank-list { display: grid; gap: 8px; padding: 12px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 11px 14px;
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out);
}
.rank-item:active { transform: scale(.98); box-shadow: none; }
.rank-no {
  width: 30px;
  font-size: 18px;
  font-weight: 700;
  color: var(--mute);
  text-align: center;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.rank-item.top1 .rank-no { color: var(--gold); }
.rank-item.top3 .rank-no { color: var(--accent); }
.rank-main { min-width: 0; flex: 1; }
.rank-name { font-size: 14px; font-weight: 700; }
.rank-sub { font-size: 11px; color: var(--mute); }
.rank-value { text-align: right; flex: none; }
.rank-value b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-value small { display: block; font-size: 9px; color: var(--mute); font-weight: 700; }

.jpr-detail {
  margin: -4px 12px 4px;
  padding: 4px 14px 10px 52px;
  background: var(--card);
  border: 0.5px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.jpr-event-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 12px;
}
.jpr-event-row:last-child { border-bottom: none; }
.jpr-event-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jpr-event-meta { color: var(--mute); font-size: 11px; flex: none; }
.jpr-event-pt { font-weight: 700; color: var(--accent); flex: none; }

/* -------------------------------------------------------- 検索バー */
.search-bar { padding: 10px 12px 0; position: relative; }
.search-bar input { padding-right: 34px; }
.search-clear {
  position: absolute;
  right: 22px;
  top: 19px;
  border: none;
  background: none;
  color: var(--mute);
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
}

/* -------------------------------------------------------- 大会 */
.tourney-list { display: grid; gap: 10px; padding: 12px; }
.tourney {
  background: var(--card);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
/* 今日開催。枠線と地色をアクセント寄りにするだけで、一覧の流れは崩さない */
.tourney.is-today { background: var(--today-bg); border-color: var(--today-line); }
.tourney-today {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 3px 9px;
}
.tourney-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tourney-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent); }
.tourney-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; background: #fdf1e3; color: #c2701a; border-radius: 999px; padding: 3px 9px; }
.tourney-name { font-size: 15px; font-weight: 700; margin: 4px 0 2px; }
.tourney-place { font-size: 11px; color: var(--mute); }
.event-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.event-chip { font-size: 11px; font-weight: 700; color: var(--sub); background: var(--bg); border-radius: 999px; padding: 3px 10px; }
.tourney-players { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.player-chip { display: flex; align-items: center; gap: 5px; background: var(--bg); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 11px; font-weight: 700; color: var(--text); text-decoration: none; }

/* 配信が複数ある大会で「アーカイブ N本」を開いたときの一覧。
   ボタンの中ではなく兄弟として置く（btn の入れ子はカードが崩れる） */
.archive-list { display: grid; gap: 2px; margin-top: 8px; }
.archive-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.archive-item:active { background: var(--accent-soft); }

.body-text { white-space: pre-wrap; font-size: 14px; }

/* ------------------------------------------------------ モーダル */
.sheet-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: scrim-in var(--dur-ui) var(--ease-out);
}
.sheet {
  background: var(--bg);
  width: 100%;
  max-width: 640px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 20px 20px 0 0;
  padding-bottom: 32px;
  box-shadow: var(--shadow-sheet);
  /* 出てきた方向（下端）へそのまま戻る。入りと出のパスを一致させる */
  animation: sheet-up var(--dur-ui) var(--ease-out);
}
@keyframes scrim-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
.sheet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(232, 230, 224, .8);
  border-radius: 20px 20px 0 0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.sheet-bar h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.sheet-close { border: none; background: none; color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; }
@media (min-width: 641px) {
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 20px; max-height: 86dvh; }
}

/* 認証フロー（ログイン/登録/確認コード）は端末サイズに関わらず常に中央固定。
   下寄せのボトムシートだとソフトキーボード表示時に隠れやすいため専用扱いにする。 */
.auth-sheet-bg {
  align-items: center;
  padding: 20px 18px;
}
.auth-sheet-bg .sheet {
  border-radius: 20px;
  max-height: min(90vh, 640px);
  width: 100%;
  max-width: 420px;
}
.auth-sheet-bg .sheet-bar {
  border-radius: 20px 20px 0 0;
}

.profile-hero { display: flex; gap: 14px; align-items: center; padding: 16px; }
.chip { display: inline-block; background: var(--bg); border-radius: 999px; padding: 2px 10px; font-size: 11px; color: var(--sub); margin: 0 4px 4px 0; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--mute); font-size: 11px; font-weight: 700; }
.kv dd { margin: 0; font-weight: 700; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  background: rgba(26, 26, 26, .92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  z-index: 60;
}

/* ------------------------------------------------- フッター（サイト共通）
   下部タブバーの手前に置く。`.wrap` の padding-bottom の内側に入れないと
   タブバーに隠れるので、`.wrap` の最後の子として置くこと。 */
.site-foot {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 28px 16px 4px;
  font-size: 11px;
  color: var(--mute);
}
.site-foot a { color: var(--sub); }

/* ------------------------------------------------- 法務ページ（/privacy）
   タブバーを持たない単独ページ。地の文をカードの中で読ませるので、
   本文だけ行間を広げる。`.tiny` は `.legal p` に負けるため個別に上書きする。 */
.legal { padding-bottom: 40px; }
.legal p { margin: 0 0 12px; font-size: 14px; line-height: 1.9; }
.legal p:last-child { margin-bottom: 0; }
.legal p.tiny { font-size: 11px; line-height: 1.75; color: var(--sub); }
.legal ul { margin: 0; padding-left: 1.15em; font-size: 14px; line-height: 1.9; }
.legal ul + p { margin-top: 12px; }
.legal li { margin-bottom: 8px; }
.legal li:last-child { margin-bottom: 0; }
.legal p.legal-lead {
  margin: 0;
  padding: 18px 16px 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--sub);
}
.legal p.legal-updated { padding: 22px 16px 0; font-size: 11px; color: var(--mute); }

/* --------------------------------------------------- アクセシビリティ
   モーション低減は「動きを消す」のではなく、位置の移動をやめて
   不透明度の変化に置き換える（理解を助ける手がかりは残す）。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .sheet { animation: scrim-in 200ms ease !important; transform: none !important; }
  .member:active, .rank-item:active, .btn:active,
  .icon-btn:active, .tabbar-item:active { transform: none !important; }
}

/* 半透明が苦手な環境では、すりガラスをやめて不透明にする */
@media (prefers-reduced-transparency: reduce) {
  .app-header, .subtabs, .tabbar, .sheet-bar {
    background: var(--card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* 高コントラスト設定では境界をはっきりさせる */
@media (prefers-contrast: more) {
  :root { --line: #9a978f; --sub: #5a5a5a; --mute: #6b6b6b; }
  .card, .member, .rank-item, .tourney { border-width: 1px; }
}
