/* ============================================================
 * よづ旅関西2026 体験版 — 基本のスタイル
 * 色・字・枠のきまりと、共通の部品（窓・ボタン・印・ダイアログ）
 * ============================================================ */

:root {
  color-scheme: light;

  /* 色: 青と白が土台。金＝ポイント、椿の赤＝スタンプ、紫＝ひみつ、と役割を1つずつ決めている */
  --snow: #F5F9FF;
  --ice: #DDE9FB;
  --sky: #C6DAF7;
  --line: #B6C6E8;
  --mist: #7684AD;
  --ink: #0E1A5E;
  --ink-soft: #3B4889;
  --blue: #2447C8;
  --blue-deep: #081293;
  --gold: #C9A961;
  --gold-deep: #75590F;
  --gold-pale: #FBF3DC;
  --camellia: #D5344B;
  --camellia-deep: #A81F34;
  --camellia-pale: #FDE9EC;
  --purple: #6D45C9;
  --purple-deep: #33206F;
  --purple-pale: #F0E9FC;
  --white: #FFFFFF;

  /* ---- ここから下は、上の基本色の濃淡（使う場所ごとに名前を付けている）。近い色はまとめてもよい ---- */
  /* 背景と面 */
  --bg-top: #BFD5F6;            /* ページ背景のグラデーションのいちばん上 */
  --bg-low: #EEF4FE;            /* ページ背景の下のほう・うすい水色の面 */
  --surface-quiet: #F3F6FC;     /* ひかえめな面（メニューの行・ごほうびの行・GM画面の背景） */
  --surface-off: #EEF1F8;       /* まだ無いもの・止まっているものの面 */
  --info-pale: #E3EEFF;         /* 「あつめ中」の面 */
  --ok-pale: #E7F3FF;           /* うまくいったときのお知らせの面 */
  --done-surface: #FCFBFF;      /* 達成済みのミッションの面 */
  --book-deco: #BFD0EF;         /* スタンプ帳のかざり */
  --paper: #FFFDF6;             /* 手紙・カード見本の紙 */
  /* 紺や紫の窓の上にのせる文字 */
  --on-dark-gold: #FFE9A8;      /* ポイントの数字など */
  --on-dark-mute: #C9D3F2;      /* 補足の文字 */
  --on-dark-purple: #D9CEF8;    /* ひみつの窓の補足 */
  --on-dark-purple-soft: #E6DDFB;
  --mystery-line: #A891E8;      /* ひみつの窓のふち */
  /* お知らせ（金のうすい面と、その上の文字） */
  --note-bg: #FFF6DA;
  --note-ink: #5B4300;
  --gold-ink: #4D3B08;          /* 金の面の上の濃い文字（体験版の帯・称号の札） */
  --warn-pale: #FFF8E6;         /* 入力まちがいの欄 */
  --star: #FFD75E;              /* ゲームの星 */
  /* 押せない・止まっている状態 */
  --off-bg: #E4E9F5;
  --off-line: #9AA6C6;
  --off-ink: #66739C;
  --stop-ink: #4B557A;
  --mist-soft: #8F9ABB;         /* 入力欄の見本の文字・受付停止のふち */
  --switch-off: #D5DCEC;
  --seal-off: #B4C2E2;          /* まだ押していないスタンプ */
  --slot-ink: #A7B3D6;          /* 文字を置く前のマス */
  --hidden-star: #A7BDE9;       /* スタンプ帳のかくれ星（わざと目立たせていない） */
  /* カード見本の帯 */
  --license-a: #3558DE;
  --license-b: #1E3BB5;
  /* ゲームの夜空 */
  --night: #101D6B;
  --night-deep: #0B1560;
  --night-glow: #24338F;
  --card-back-line: #8FA3E6;    /* 絵合わせのカードの裏の線 */
  --alert-on-dark: #FFA3AE;     /* 残り時間が少ないときの数字 */
  /* 案内役 */
  --heart: #FF8FA3;             /* なでたときに出るハート */

  /* 字: 見出し・数字・ラベルはドット文字、本文は読みやすいゴシック */
  --font-dot: 'DotGothic16', 'Hiragino Sans', 'Yu Gothic UI', 'Noto Sans JP', Meiryo, sans-serif;
  --font-body: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', 'Noto Sans JP', 'Noto Sans CJK JP', Meiryo, sans-serif;

  /* 寸法 */
  --px: 2px;            /* ドット1つ分。窓やボタンの枠の太さ */
  --gutter: 16px;
  --hud-h: 52px;
  --tabbar-h: 62px;
  --maxw: 960px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hud-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--snow);
  background-image: linear-gradient(180deg, var(--bg-top) 0, var(--ice) 220px, var(--bg-low) 420px, var(--snow) 640px);
  background-repeat: no-repeat;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { max-width: 100%; }
img { height: auto; border: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-underline-offset: 3px; }
[hidden] { display: none !important; }

/* 入力欄は、文字の入力位置が分かるテキスト用カーソルを優先する */
input[type="text"], input[type="search"], textarea { cursor: text; }

.dot { font-family: var(--font-dot); font-weight: 400; font-synthesis: none; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
.px-icon { flex: none; display: inline-block; vertical-align: -0.12em; }
.px-icon-accent { fill: var(--icon-accent, var(--gold)); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: var(--white); font-family: var(--font-dot);
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ---------- 画面の骨組み ---------- */
.app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }

.hud {
  position: sticky; top: 0; z-index: 30;
  height: var(--hud-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 2px 0 0 var(--white), 0 4px 0 0 var(--ink);
}
.hud__brand { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; margin: 0 -7px; color: var(--white); text-decoration: none; }  /* 絵は30px、押せる範囲は44px */
.hud__crest { width: 30px; height: 30px; flex: none; }
.hud__title { display: none; font-family: var(--font-dot); font-size: 18px; white-space: nowrap; }
.hud__trial {
  flex: none; padding: 3px 6px; font-family: var(--font-dot); font-size: 12px; line-height: 1;
  background: var(--gold); color: var(--ink);
}
.hud__stats { display: flex; align-items: stretch; gap: 6px; margin-left: auto; }
.hud__stat {
  appearance: none; border: 0; margin: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 62px; height: 44px; padding: 2px 8px;
  background: rgba(255, 255, 255, .1); color: var(--white);
  font-family: var(--font-dot); line-height: 1.1;
}
.hud__stat-label { font-size: 11px; opacity: .92; white-space: nowrap; }
.hud__stat-value { font-size: 18px; white-space: nowrap; }
.hud__stat-value small { font-size: 12px; }
.hud__stat--pt .hud__stat-value { color: var(--on-dark-gold); }
.hud__menu {
  appearance: none; border: 0; cursor: pointer; flex: none;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; color: var(--white);
}
.hud__tabs { display: none; }

.main {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + 28px);
}
.main:focus { outline: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--white);
  box-shadow: 0 -2px 0 0 var(--ink), 0 -4px 0 0 var(--white);
}
.tab {
  appearance: none; border: 0; margin: 0; padding: 4px 2px; cursor: pointer;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: transparent; color: var(--ink-soft);
  font-family: var(--font-dot); font-size: 13px; line-height: 1; text-decoration: none;
  --icon-accent: var(--sky);
}
.tab[aria-current="page"] { background: var(--ink); color: var(--white); --icon-accent: var(--gold); }
.tab[data-tab="secret"][aria-current="page"] { background: var(--purple-deep); }
.tab__badge {
  position: absolute; top: 6px; left: calc(50% + 10px);
  min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center;
  font-size: 11px; background: var(--camellia); color: var(--white);
}
.tab:focus-visible { outline-offset: -4px; }

/* ---------- 窓（角が1ドット欠けた枠） ---------- */
.win {
  --bd: var(--ink);
  position: relative;
  margin: var(--px);
  padding: 14px;
  background: var(--white);
  color: var(--ink);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd),
    0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd),
    var(--px) 0 0 0 var(--bd);
}
.win--blue {
  background: var(--ink); color: var(--white);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd), 0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd), var(--px) 0 0 0 var(--bd),
    inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--white);
  padding: 18px;
}
.win--ice { background: var(--bg-low); --bd: var(--line); }
.win--gold { --bd: var(--gold-deep); background: var(--gold-pale); }
.win--purple { --bd: var(--purple-deep); }
.win--mystery {
  --bd: var(--purple-deep);
  background: var(--purple-deep); color: var(--white);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd), 0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd), var(--px) 0 0 0 var(--bd),
    inset 0 0 0 2px var(--purple-deep), inset 0 0 0 4px var(--mystery-line);
  padding: 18px;
}
.win__title { font-family: var(--font-dot); font-weight: 400; font-size: 20px; line-height: 1.3; }
.win > * + * { margin-top: 10px; }

.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; line-height: 1.6; }
.note { font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- ボタン ---------- */
.btn {
  --bd: var(--ink);
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; margin: var(--px);
  background: var(--white); color: var(--ink);
  font-family: var(--font-dot); font-weight: 400; font-size: 16px; line-height: 1.25; text-align: center; text-decoration: none;
  user-select: none; -webkit-user-select: none;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd), 0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd), var(--px) 0 0 0 var(--bd),
    inset 0 -4px 0 0 rgba(14, 26, 94, .13);
}
.btn:active:not(:disabled):not([aria-disabled="true"]) {
  transform: translateY(2px);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd), 0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd), var(--px) 0 0 0 var(--bd),
    inset 0 3px 0 0 rgba(14, 26, 94, .16);
}
.btn--primary {
  --bd: var(--blue-deep);
  background: var(--blue); color: var(--white);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd), 0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd), var(--px) 0 0 0 var(--bd),
    inset 0 -4px 0 0 rgba(4, 10, 80, .38), inset 0 2px 0 0 rgba(255, 255, 255, .28);
}
.btn--purple {
  --bd: var(--purple-deep);
  background: var(--purple); color: var(--white);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd), 0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd), var(--px) 0 0 0 var(--bd),
    inset 0 -4px 0 0 rgba(30, 14, 80, .4), inset 0 2px 0 0 rgba(255, 255, 255, .25);
}
.btn--light { --bd: var(--white); background: var(--white); color: var(--ink); }
.btn--lg { min-height: 54px; padding: 12px 18px; font-size: 18px; width: calc(100% - var(--px) * 2); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
html.is-touch .btn--sm { min-height: 44px; }   /* 指で押す端末では、小さいボタンも44pxにする */
.btn--block { width: calc(100% - var(--px) * 2); }
.btn--plain {
  box-shadow: none; background: transparent; margin: 0; min-height: 44px; padding: 8px 10px;
  text-decoration: underline; text-underline-offset: 4px; color: inherit; font-size: 14px;
}
.btn:disabled, .btn[aria-disabled="true"] {
  --bd: var(--off-line); background: var(--off-bg); color: var(--off-ink); cursor: not-allowed;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bd), 0 var(--px) 0 0 var(--bd),
    calc(var(--px) * -1) 0 0 0 var(--bd), var(--px) 0 0 0 var(--bd);
}
.btn[aria-busy="true"] { opacity: .8; }
.btn:focus-visible { outline-offset: 5px; }

/* ---------- 状態の印（文字・色・絵の3つで区別する） ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; min-height: 24px;
  font-family: var(--font-dot); font-weight: 400; font-size: 13px; line-height: 1.1; white-space: nowrap;
  background: var(--ice); color: var(--ink);
}
.chip--none { background: var(--white); color: var(--ink-soft); outline: 2px dashed var(--mist); outline-offset: -2px; }
.chip--pending { background: var(--gold-pale); color: var(--gold-deep); outline: 2px solid var(--gold); outline-offset: -2px; --icon-accent: var(--gold); }
.chip--done { background: var(--camellia); color: var(--white); }
.chip--open { background: var(--purple-pale); color: var(--purple-deep); outline: 2px solid var(--purple); outline-offset: -2px; }
.chip--mystery { background: rgba(255, 255, 255, .14); color: var(--white); outline: 2px dashed var(--mystery-line); outline-offset: -2px; }
.chip--prov { background: transparent; color: var(--ink-soft); outline: 1px solid var(--line); outline-offset: -1px; font-size: 12px; padding: 3px 6px; min-height: 20px; }
.chip--on-dark { color: var(--white); outline-color: rgba(255, 255, 255, .5); }
.chip--pt { background: var(--gold-pale); color: var(--gold-deep); }
.chip--stop { background: var(--surface-off); color: var(--stop-ink); outline: 2px solid var(--mist-soft); outline-offset: -2px; }

/* ---------- 進み具合 ---------- */
.meter { display: flex; gap: 4px; }
.meter i { flex: 1 1 0; height: 12px; background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.meter i.on { background: var(--camellia); box-shadow: inset 0 0 0 2px var(--white); }
.meter--light i { background: var(--ice); box-shadow: inset 0 0 0 2px var(--line); }
.meter--light i.on { background: var(--camellia); box-shadow: inset 0 0 0 2px var(--camellia-deep); }
.bar { height: 12px; background: var(--ice); box-shadow: inset 0 0 0 2px var(--line); }
.bar > span { display: block; height: 100%; background: var(--gold); box-shadow: inset 0 0 0 2px var(--gold-deep); min-width: 0; }
.bar--dark { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.bar--dark > span { box-shadow: inset 0 0 0 2px var(--white); }

/* ---------- 切り替え（2つから選ぶ） ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; margin: var(--px); box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink); background: var(--white); }
.seg__btn {
  appearance: none; border: 0; margin: 0; cursor: pointer;
  min-height: 44px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--ink-soft);
  font-family: var(--font-dot); font-size: 16px; line-height: 1.2;
}
.seg__btn[aria-pressed="true"], .seg__btn[aria-selected="true"] { background: var(--ink); color: var(--white); }
.seg__btn:focus-visible { outline-offset: -5px; }

/* ---------- スイッチ（表示設定） ---------- */
.switch { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.switch + .switch { border-top: 2px dotted var(--line); }
.switch__text { flex: 1 1 auto; min-width: 0; }
.switch__label { font-family: var(--font-dot); font-size: 16px; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.switch__hint { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.switch__ctl {
  appearance: none; border: 0; cursor: pointer; flex: none;
  position: relative; width: 64px; height: 36px; margin: 2px;
  background: var(--switch-off);
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
}
/* 見た目は36pxのまま、押せる範囲だけ上下に広げる */
.switch__ctl::before { content: ''; position: absolute; top: -6px; bottom: -6px; left: -2px; right: -2px; }
.switch__ctl::after {
  content: ''; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px;
  background: var(--white); box-shadow: inset 0 0 0 2px var(--ink);
}
.switch__ctl[aria-checked="true"] { background: var(--blue); }
.switch__ctl[aria-checked="true"]::after { left: 32px; }
.switch__ctl:disabled { cursor: not-allowed; opacity: .5; }
.switch__state { font-family: var(--font-dot); font-size: 13px; width: 2.2em; text-align: right; flex: none; }

/* ---------- 入力 ---------- */
.field { display: block; }
.field__label { display: block; font-family: var(--font-dot); font-size: 15px; margin-bottom: 4px; }
.input {
  display: block; width: calc(100% - 4px); margin: 2px; min-height: 52px; padding: 10px 12px;
  font-size: 18px; line-height: 1.3; background: var(--white); color: var(--ink); border: 0; border-radius: 0;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
  appearance: none;
}
.input::placeholder { color: var(--mist-soft); }
.input:focus-visible { outline-offset: 5px; }
.input[aria-invalid="true"] { background: var(--warn-pale); }
.feedback { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; font-size: 14px; line-height: 1.6; background: var(--note-bg); color: var(--note-ink); }
.feedback--ok { background: var(--ok-pale); color: var(--ink); }
.feedback .px-icon { margin-top: 3px; }
.feedback:empty { display: none; }

/* ---------- 開いて読む説明 ---------- */
.more { font-size: 14px; }
.more > summary {
  list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-dot); font-size: 15px; color: var(--ink-soft);
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: '＋'; font-family: var(--font-dot); width: 1.2em; text-align: center; }
.more[open] > summary::before { content: '－'; }
.more__body { padding: 2px 0 8px 1.9em; line-height: 1.7; }
.more--on-dark > summary { color: var(--on-dark-purple); }

/* ---------- ダイアログ ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(14, 26, 94, .6);
  overscroll-behavior: contain;
}
.modal__panel {
  position: relative;
  width: 100%; max-width: 540px; max-height: 90vh; max-height: 90dvh;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--white); color: var(--ink);
  padding: 16px 16px calc(18px + var(--safe-b));
  box-shadow: 0 -2px 0 0 var(--white), 0 -4px 0 0 var(--ink);
}
.modal__head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.modal__title { flex: 1 1 auto; min-width: 0; font-family: var(--font-dot); font-weight: 400; font-size: 22px; line-height: 1.3; }
.modal__close {
  appearance: none; border: 0; cursor: pointer; flex: none;
  width: 44px; height: 44px; margin: -6px -6px 0 0; display: grid; place-items: center;
  background: transparent; color: var(--ink);
}
.modal__body > * + * { margin-top: 12px; }
.modal__foot { margin-top: 16px; display: grid; gap: 8px; }

/* ---------- お知らせ（下に少し出るメッセージ） ---------- */
.toast-area {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px;
}
.toast {
  max-width: 420px; padding: 10px 14px; background: var(--ink); color: var(--white);
  font-family: var(--font-dot); font-size: 15px; line-height: 1.4;
  box-shadow: 0 -2px 0 0 var(--white), 0 2px 0 0 var(--white), -2px 0 0 0 var(--white), 2px 0 0 0 var(--white);
}

/* ---------- 体験版の印 ---------- */
.trial-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; font-size: 13px; line-height: 1.6; background: var(--gold-pale); color: var(--gold-ink);
  box-shadow: inset 0 0 0 2px var(--gold);
}
.trial-banner strong { font-family: var(--font-dot); font-weight: 400; font-size: 14px; }
.trial-banner a { display: inline-block; padding: 13px 0; margin: -13px 0; }   /* 文中のリンクも、押せる高さを44px以上に（行の高さは変えない） */
.demo-help { font-size: 13px; background: var(--surface-quiet); color: var(--ink); padding: 2px 10px; box-shadow: inset 0 0 0 1px var(--line); }  /* うすい面なので文字は必ず濃い色（紫の窓の中でも読めるように） */
.demo-help > summary { color: var(--ink-soft); font-size: 13px; min-height: 44px; }
.demo-help code { font-family: var(--font-dot); font-size: 15px; background: var(--white); padding: 1px 6px; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- PC幅 ---------- */
@media (min-width: 920px) {
  :root { --gutter: 24px; --hud-h: 60px; }
  .hud { padding: 0 max(24px, calc((100vw - var(--maxw)) / 2)); gap: 14px; }
  .hud__title { display: block; }
  .hud__tabs { display: flex; gap: 2px; margin-left: 18px; height: 100%; align-items: stretch; }
  .hud__tabs .tab { flex-direction: row; gap: 8px; padding: 0 14px; color: var(--on-dark-mute); font-size: 16px; }
  .hud__tabs .tab[aria-current="page"] { background: var(--white); color: var(--ink); --icon-accent: var(--gold); }
  .hud__tabs .tab[data-tab="secret"][aria-current="page"] { background: var(--purple-pale); color: var(--purple-deep); }
  .hud__tabs .tab__badge { position: static; }
  .tabbar { display: none; }
  .main { padding-bottom: 64px; }
  .toast-area { bottom: 24px; }
  .modal { align-items: center; padding: 24px; }
  .modal__panel { box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink); padding: 22px; }
}

@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .hud { gap: 6px; padding: 0 6px; }
  /* せまい画面でも「体験版」の印は消さない（小さくして残す） */
  .hud__trial { font-size: 11px; padding: 2px 3px; letter-spacing: 0; }
  .hud__stat { min-width: 54px; padding: 2px 5px; }
  .btn--lg { font-size: 17px; padding: 12px 10px; }
  .tab { font-size: 12px; }
}
