/* 歴史テスト（/test/）。CHIZU QUEST の site.css の .dx-* をデザインシステム（css/tokens.css・docs/DESIGN.md）で書き直したもの。
   紙の地・墨の文字・川の青の操作・朱と苔の正誤。グラデーション・絵文字なし。強調は墨の 2px 線。タップ領域 44px。 */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.dx-noanim { scroll-behavior: auto; }
body { margin: 0; background: var(--paper-texture), var(--paper-1); color: var(--ink-1); font-family: var(--font-sans);
  font-size: var(--fs-md); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; }
a { color: var(--river-deep); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
h1 { font-size: 26px; font-weight: 900; line-height: 1.3; margin: 8px 0 10px; }
h2 { font-size: 18px; font-weight: 900; line-height: 1.4; margin: 26px 0 10px; }
.paper { background: var(--paper-texture), var(--card); border: 1px solid var(--line-1); border-radius: var(--r-md); }
.lead { color: var(--ink-2); margin: 0 0 14px; }

/* ---- ヘッダー（アプリと同じ寸法のロゴ・メニュー） ---- */
.site-header { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 8px;
  /* 1段目の高さは年表アプリのヘッダー（時代プルダウンが 40px）に合わせる。
     ページを行き来したときにロゴとメニューが上下にずれないように（2026-09-12） */
  min-height: 61px; padding: 10px 12px;   /* 61 = 上下 10 ＋ 中身 40 ＋ 下の罫線 1 */ background: color-mix(in srgb, var(--paper-0) 97%, transparent); border-bottom: 1px solid var(--line-1); }
.brand { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; line-height: 1; font-weight: 700; letter-spacing: var(--ls-wide);
  color: var(--ink-3); text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand:hover { color: var(--ink-1); }
.menu { position: relative; display: flex; margin-left: auto; }   /* 狭い画面ではハンバーガーを右端に（年表アプリと同じ）。flex はボタンの下に行間のすき間が出ないように */
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 40px; padding: 0 12px;
  background: var(--card); border: 2px solid var(--line-2); border-radius: var(--r-md); }
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink-1); transition: transform var(--dur-fast), opacity var(--dur-fast); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-drawer { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 236px; padding: 6px; white-space: nowrap;
  display: flex; flex-direction: column; background: var(--paper-texture), var(--card); border: 1px solid var(--line-1);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); }
[hidden]:not(.nav-drawer) { display: none !important; }   /* .dx-btn の inline-flex などが UA の hidden を上書きしないように（ナビは下の広い画面の指定に譲る） */
.nav-drawer[hidden] { display: none; }
.nav-drawer a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); font-size: 15px; font-weight: 700;
  color: var(--ink-1); text-decoration: none; }
.nav-drawer a:hover { background: var(--paper-2); }
.nav-drawer .sister { margin-top: 4px; border-top: 1px solid var(--line-1); border-radius: 0 0 var(--r-sm) var(--r-sm); color: var(--river-deep); }
/* 広い画面はハンバーガーに入れずヘッダーに並べる（LP と同じ 820px で切り替え。2026-09-11 の要望） */
@media (min-width: 821px) {
  .nav-drawer, .nav-drawer[hidden] { display: flex; flex-direction: row; align-items: center; gap: 20px; position: static;
    min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .nav-drawer a { min-height: 0; padding: 0; border-radius: 0; font-size: 14px; color: var(--ink-2); }
  .nav-drawer a:hover { background: none; color: var(--river-deep); }
  .nav-drawer .sister { margin: 0; border: 0; color: var(--river-deep); }
  .nav-drawer .sister::before { content: '｜'; margin-right: 20px; color: var(--line-2); font-weight: 500; }
  .menu { margin-left: 14px; }   /* 広い画面はロゴのすぐ右（年表アプリの1段目と同じ） */
  .nav-toggle { display: none; }
}

.container { max-width: 760px; margin: 0 auto; padding: 8px 16px 60px; }
.breadcrumb { font-size: 12px; color: var(--ink-3); margin: 6px 0 10px; }
.breadcrumb a { color: inherit; text-decoration: none; }

/* ---- 画面の切り替え ---- */
.dx-step { display: none; }
.dx-step.on { display: block; padding-bottom: 40px; }

/* ---- 共通ボタン ---- */
.dx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: var(--r-pill);
  background: var(--river); color: var(--ink-on-color); border: 2px solid var(--river); font-weight: 700; font-size: 15px; text-decoration: none;
  box-shadow: var(--shadow-1); transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
.dx-btn:hover { background: var(--river-deep); border-color: var(--river-deep); }
.dx-btn:active { transform: scale(.97); }
.dx-btn:disabled { background: var(--paper-2); border-color: var(--paper-2); color: var(--ink-3); box-shadow: none; cursor: not-allowed; transform: none; }
.dx-btn.ghost { background: var(--card); color: var(--ink-1); border-color: var(--line-ink); box-shadow: none; }
.dx-btn.ghost:hover { background: var(--paper-2); }
.dx-btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
/* <a> をボタンにするとき、tokens.css の a / a:hover（朱・下線）を打ち消す */
a.dx-btn, a.dx-btn:hover, a.dx-btn:visited { text-decoration: none; color: var(--ink-on-color); }
a.dx-btn.ghost, a.dx-btn.ghost:hover { color: var(--ink-1); }
.dx-center { display: flex; justify-content: center; gap: 12px; margin: 24px 0 8px; flex-wrap: wrap; }
.dx-textlink { text-align: center; margin: 14px 0 4px; font-size: 14px; }
.dx-err { color: var(--shu-deep); font-size: 14px; margin-top: 10px; text-align: center; }
.dx-err:empty { display: none; }
.dx-note { background: var(--ochre-pale); border: 1px solid color-mix(in srgb, var(--ochre) 45%, var(--paper-1)); border-radius: var(--r-md);
  padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.dx-resume-btns { display: inline-flex; gap: 8px; margin-left: 8px; vertical-align: middle; }

/* ---- 時代の選択 ---- */
.dx-cats-head { font-size: 17px; margin: 22px 0 0; }
.dx-multi { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 8px; white-space: nowrap; }
.dx-cat-group { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-3); }
.dx-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 14px 0; }
.dx-cat { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 56px; text-align: left; padding: 10px 14px;
  background: var(--card); border: 2px solid var(--line-2); border-radius: var(--r-md); color: var(--ink-1);
  transition: border-color var(--dur-fast), background var(--dur-fast); }
.dx-cat:hover { background: var(--paper-0); }
.dx-cat[aria-pressed="true"] { border-color: var(--line-ink); background: var(--paper-0); }
/* 時代の色（--c）は時代名と同じ 72% で墨に混ぜる。1文字の印を丸に入れる */
.dx-cat .dx-ic { flex: 0 0 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) var(--era-fill-mix), var(--paper-1)); color: color-mix(in srgb, var(--c) var(--era-label-mix), var(--ink-1));
  font-size: 14px; font-weight: 900; }
.dx-cat .dx-nm { line-height: 1.35; font-size: 15px; font-weight: 700; min-width: 0; }
.dx-cat .dx-sub { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); margin-top: 1px; }
.dx-cat.p2 { border-color: color-mix(in srgb, var(--moss) 60%, var(--paper-1)); background: var(--moss-pale); }
.dx-cat.p3 { border-color: color-mix(in srgb, var(--ochre) 60%, var(--paper-1)); background: var(--ochre-pale); }
.dx-cat.p2[aria-pressed="true"], .dx-cat.p3[aria-pressed="true"] { border-color: var(--line-ink); }

.dx-grade { margin: 22px 0 6px; }
.dx-grade h2 { font-size: 17px; margin: 0 0 2px; }
.dx-grade-note { font-size: 13px; color: var(--ink-3); margin: 0 0 10px; }
.dx-grade-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.dx-grade-btn { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); background: var(--card); border: 2px solid var(--line-2);
  font-size: 15px; font-weight: 700; color: var(--ink-1); transition: background var(--dur-fast), border-color var(--dur-fast); }
.dx-grade-btn:hover { background: var(--paper-2); }
.dx-grade-btn[aria-pressed="true"] { background: var(--ink-1); border-color: var(--ink-1); color: var(--ink-on-color); }
.dx-level-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.dx-level-btn { flex: 1 1 240px; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 16px;
  background: var(--card); border: 2px solid var(--line-2); border-radius: var(--r-md); color: var(--ink-1);
  transition: background var(--dur-fast), border-color var(--dur-fast); }
.dx-level-btn b { font-size: 15.5px; font-weight: 900; }
.dx-level-btn span { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.dx-level-btn:hover { background: var(--paper-0); }
.dx-level-btn[aria-pressed="true"] { border-color: var(--line-ink); background: var(--paper-0); }

.dx-summary { text-align: center; color: var(--ink-3); font-size: 15px; margin: 22px 0 0; }
.dx-summary strong { color: var(--ink-1); }
.dx-axisnote { text-align: center; font-size: 13px; color: var(--ink-3); line-height: 1.8; margin-top: 6px; }
.dx-axisnote:empty { display: none; }
.dx-axisnote .dim { color: var(--line-2); }

/* 進捗（コレクション） */
.dx-progress { margin: 14px 0 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line-1); border-radius: var(--r-md); }
.dx-prog-row { display: flex; align-items: center; gap: 10px; }
.dx-prog-label { font-weight: 700; white-space: nowrap; font-size: 14px; }
.dx-prog-track { flex: 1; height: 10px; background: var(--paper-2); border-radius: var(--r-pill); overflow: hidden; }
.dx-prog-track i { display: block; height: 100%; background: var(--moss); border-radius: var(--r-pill); transition: width .4s; }
.dx-prog-val { font-weight: 900; color: var(--river-deep); white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.dx-prog-note { font-size: 11.5px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.5; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dx-prog-reset { font-size: 11.5px; color: var(--ink-3); background: none; border: 0; padding: 0; text-decoration: underline; white-space: nowrap; }
.dx-progress[hidden], .dx-next-pick[hidden] { display: none !important; }
.dx-next-pick { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--r-md); background: var(--river-pale); border: 1px solid color-mix(in srgb, var(--river) 40%, var(--paper-1));
  font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dx-pick-why { font-size: 12.5px; color: var(--ink-3); }
.dx-pick-btn { margin-left: auto; min-height: 36px; font-size: 13px; font-weight: 700; color: var(--ink-on-color); background: var(--river); border: 0;
  border-radius: var(--r-pill); padding: 0 14px; }

/* 使い方・FAQ */
.dx-guide { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line-1); }
.dx-guide h2 { font-size: 19px; margin: 26px 0 10px; }
.dx-howto { margin: 0 0 8px; }
.dx-howto summary { cursor: pointer; list-style: none; padding: 14px 18px; font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dx-howto summary::-webkit-details-marker { display: none; }
.dx-howto summary::after { content: '＋'; margin-left: auto; color: var(--river); font-size: 20px; font-weight: 500; line-height: 1; }
.dx-howto[open] summary::after { content: '－'; }
.dx-howto-sub { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.dx-howto-body { padding: 4px 18px 18px; border-top: 1px solid var(--line-1); }
.dx-howto-body h2:first-child { margin-top: 16px; }
.dx-steps { list-style: none; counter-reset: dxstep; margin: 14px 0 0; padding: 0; }
.dx-steps li { counter-increment: dxstep; position: relative; padding: 0 0 16px 44px; line-height: 1.85; }
.dx-steps li::before { content: counter(dxstep); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink-1); color: var(--ink-on-color); font-weight: 900; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.dx-steps li b { display: block; }
.dx-steps li span { font-size: 15px; color: var(--ink-2); }
.dx-axis-guide { display: grid; gap: 10px; margin: 14px 0 0; }
.dx-axis-guide > div { background: var(--paper-1); border: 1px solid var(--line-1); border-radius: var(--r-md); padding: 13px 16px; }
.dx-axis-guide b { display: block; color: var(--river-deep); }
.dx-axis-guide span { font-size: 14.5px; color: var(--ink-2); }
.dx-points { margin: 12px 0 0; padding-left: 1.3em; }
.dx-points li { margin-bottom: 9px; line-height: 1.9; }
@media (min-width: 640px) { .dx-axis-guide { grid-template-columns: 1fr 1fr; } }
.faq-item { padding: 16px 20px; margin-bottom: 10px; }
.faq-q { font-weight: 700; font-size: 15.5px; margin: 0; }
.faq-q::before { content: "Q "; color: var(--river); font-weight: 900; }
.faq-a { font-size: 14px; line-height: 1.85; color: var(--ink-2); margin: 8px 0 0; }
.faq-a::before { content: "A "; color: var(--shu-deep); font-weight: 900; }

/* ---- 出題 ---- */
.dx-head { display: flex; align-items: center; gap: 12px; margin: 6px 0; font-size: 13px; color: var(--ink-3); }
.dx-head .dx-cnt { font-weight: 700; color: var(--ink-1); font-variant-numeric: tabular-nums; }
.dx-head .dx-quit { margin-left: auto; background: none; border: 0; color: var(--ink-3); font-size: 13px; text-decoration: underline; min-height: 44px; }
.dx-prog { height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.dx-prog i { display: block; height: 100%; background: var(--river); transition: width .25s; }
.dx-q { font-size: 19px; font-weight: 700; line-height: 1.7; margin: 14px 0 18px; }
.dx-choices { display: grid; grid-template-columns: 1fr; gap: 9px; }
/* ふりがな。読みは墨3で小さく、行間は本文側で確保する（rt の分だけ行が高くなる） */
ruby { ruby-position: over; ruby-align: center; }
rt { font-size: 0.5em; font-weight: 500; color: var(--ink-3); letter-spacing: 0; line-height: 1; position: relative; top: 0.1em; }   /* 漢字との間を少しつめる。0.1em より大きいと 900 の太字（出題文）でルビが字に重なる（2026-09-12） */
.dx-prompt, .dx-choice span:last-child, .dx-fb p, .dx-wq, .dx-wa { line-height: 2; }
.dx-choice { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 52px; text-align: left; padding: 12px 15px;
  background: var(--card); border: 2px solid var(--line-2); border-radius: var(--r-md); font-size: 16px; color: var(--ink-1); }
.dx-choice:hover:not(:disabled) { background: var(--paper-0); border-color: var(--line-ink); }
.dx-choice .dx-k { flex: 0 0 24px; height: 24px; border-radius: var(--r-sm); background: var(--paper-2); color: var(--ink-3); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.dx-choice.ok { border-color: var(--moss); background: var(--moss-pale); }
.dx-choice.ng { border-color: var(--shu); background: var(--shu-pale); }
.dx-choice:disabled { cursor: default; }
.dx-fb { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-1); }
.dx-fb .dx-verdict { font-weight: 900; }
.dx-fb .dx-verdict.ok { color: var(--moss); }
.dx-fb .dx-verdict.ng { color: var(--shu-deep); }
.dx-fb p { font-size: 14.5px; margin: 6px 0 0; color: var(--ink-2); }
.dx-fb .dx-more { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.dx-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.dx-actions .dx-btn { margin-left: auto; }
/* 並べ替え */
.dx-ord-hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 2px; }
.dx-ord-badge { flex: 0 0 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; color: var(--river-deep); }
.dx-ord.picked { border-color: var(--line-ink); background: var(--paper-0); }
.dx-ord.picked .dx-ord-badge { border-color: var(--ink-1); background: var(--ink-1); color: var(--ink-on-color); }
.dx-ord.ok .dx-ord-badge { border-color: var(--moss); background: var(--moss); color: var(--ink-on-color); }
.dx-ord.ng .dx-ord-badge { border-color: var(--shu); background: var(--shu); color: var(--ink-on-color); }
.dx-ord-submit { display: flex; width: 100%; margin-top: 10px; }
.dx-ord-submit[hidden] { display: none; }
.dx-flag { background: none; border: 0; color: var(--ink-3); font-size: 12.5px; min-height: 44px; padding: 0 4px; }
.dx-flag:hover { color: var(--ochre); }
.dx-flag[disabled] { color: var(--ochre); cursor: default; }
/* 不備報告 */
.dx-report { background: var(--ochre-pale); border: 1px solid color-mix(in srgb, var(--ochre) 45%, var(--paper-1)); border-radius: var(--r-md); padding: 16px 18px; margin: 16px 0 0; }
.dx-report[hidden] { display: none; }
.dx-report-head { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.dx-report-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dx-report-opt { min-height: 40px; background: var(--card); border: 2px solid var(--line-2); border-radius: var(--r-pill); padding: 0 14px; font-size: 13px; color: var(--ink-1); }
.dx-report-opt[aria-pressed="true"] { border-color: var(--ink-1); background: var(--ink-1); color: var(--ink-on-color); }
.dx-report-note { width: 100%; border: 2px solid var(--line-2); border-radius: var(--r-md); padding: 9px 11px; font: inherit; font-size: 14px; resize: vertical; background: var(--paper-0); }
.dx-report-note:focus { outline: none; border-color: var(--river); }
.dx-report-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 520px) { .dx-report-btns { flex-direction: column-reverse; } .dx-report-btns .dx-btn { width: 100%; } }

/* ---- 結果 ---- */
.dx-score { text-align: center; padding: 20px 0 6px; }
.dx-score .dx-big { font-size: 44px; font-weight: 900; color: var(--river-deep); line-height: 1.2; font-variant-numeric: tabular-nums; }
.dx-score .dx-msg { color: var(--ink-3); }
.dx-bars { margin: 14px 0 26px; }
.dx-row { display: grid; grid-template-columns: 8.5em 1fr 4.2em; align-items: center; gap: 10px; margin: 9px 0; font-size: 14px; }
.dx-row .dx-track { height: 9px; background: var(--paper-2); border-radius: 5px; overflow: hidden; }
.dx-row .dx-track i { display: block; height: 100%; background: var(--river); }
.dx-row .dx-val { text-align: right; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.dx-row.dim .dx-val { color: var(--line-2); }
.dx-wrong { margin: 8px 0; padding: 12px 14px; }
.dx-wrong .dx-wq { font-weight: 700; font-size: 15px; }
.dx-wrong .dx-wa { font-size: 14px; margin-top: 5px; }
.dx-wrong .dx-wa a, .dx-fb .dx-more a { display: inline-block; margin-left: 4px; padding: 4px 12px; background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); color: var(--river-deep); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.dx-wrong .dx-wa a:hover, .dx-fb .dx-more a:hover { background: var(--paper-2); }
.dx-wrong .dx-wa .ng { color: var(--shu-deep); }
.dx-wrong .dx-wa .ok { color: var(--moss); }
/* 獲得（クリア・マスター） */
.dx-badges { display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 4px 0 10px; }
.dx-badge { font-size: 15px; font-weight: 700; padding: 8px 16px; border-radius: var(--r-pill); background: var(--moss-pale); color: var(--ink-1);
  border: 2px solid color-mix(in srgb, var(--moss) 60%, var(--paper-1)); }
.dx-badge.t3 { background: var(--ochre-pale); border-color: color-mix(in srgb, var(--ochre) 60%, var(--paper-1)); }
.dx-badge.all { background: var(--ink-1); color: var(--ink-on-color); border-color: var(--ink-1); font-size: 16px; }
.dx-badge.near { background: var(--card); color: var(--ink-3); border-color: var(--line-1); font-weight: 500; font-size: 13.5px; }
.dx-badge-star { margin-left: 8px; font-size: 12px; color: var(--ochre); }
.dx-badge-sum { font-size: 12.5px; color: var(--ink-3); }
/* シェア */
.dx-share { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.dx-share[hidden] { display: none; }
.dx-share-label { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-right: 2px; }
.dx-share-btn { min-height: 40px; font-size: 13px; font-weight: 700; color: var(--river-deep); background: var(--card); border: 2px solid var(--line-2);
  border-radius: var(--r-pill); padding: 0 14px; }
.dx-share-btn:hover { background: var(--paper-2); border-color: var(--line-ink); }
.dx-share-note { flex-basis: 100%; text-align: center; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.dx-share-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); background: var(--ink-1); color: var(--ink-on-color);
  font-size: 13px; font-weight: 700; padding: 10px 18px; border-radius: var(--r-pill); opacity: 0; transition: opacity .25s, transform .25s; z-index: 90;
  max-width: 92vw; text-align: center; }
.dx-share-toast.on { opacity: .95; transform: translate(-50%, 0); }

/* ---- 狭い画面 ---- */
@media (max-width: 520px) {
  .dx-cats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dx-cat { padding: 9px 11px; gap: 8px; min-height: 52px; }
  .dx-cat .dx-ic { flex: 0 0 26px; height: 26px; font-size: 13px; }
  .dx-cat .dx-nm { font-size: 13.5px; }
  .dx-cat .dx-sub { font-size: 11px; }
  .dx-center { flex-direction: column; align-items: stretch; }
  .dx-center .dx-btn { width: 100%; }
  .dx-center .dx-btn:not(.ghost) { order: -1; }
}
@media (max-width: 389px) {
  .dx-cats { gap: 7px; }
  .dx-cat .dx-nm { font-size: 12.5px; }
  .dx-row { grid-template-columns: 6.5em 1fr 3.6em; font-size: 13px; }
  .dx-q { font-size: 17px; }
}
