/*
 * 英検 学習ドリル — スタイル
 *  色はすべて :root のトークンで決める（ライト・ダーク）。部品には色の値を直接書かない。
 *  カテゴリ色：単語・熟語＝オレンジ / リーディング＝グリーン / 文法＝ブルー（色覚の多様性を考慮して検証済みの組み合わせ）
 *  レイアウト：PC（幅760px以上）はできるだけ1画面に収め、長い中身だけを枠の中でスクロールさせる。スマホは縦に並べる。
 */
:root {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F6F8FA; --sunken: #EEF1F4; --hover: #F2F5F8;
  --line: #E3E7EC; --line-strong: #C9D0D8;
  --ink: #101418; --muted: #5E6773; --faint: #8A939E;
  --primary: #1677D2; --primary-hover: #0F68BB; --on-primary: #FFFFFF; --primary-soft: #E7F1FB;
  --navy: #172A3F; --navy-2: #213851; --on-navy: #FFFFFF; --navy-muted: #B9C6D4;
  --ok: #1B8A55; --ok-soft: #E3F4EA; --ng: #C8372D; --ng-soft: #FBE8E6; --warn: #A2600A; --warn-soft: #FCF1DE;
  --c-vocab: #E0892B; --c-vocab-ink: #9A560F; --c-vocab-soft: #FFF7EE; --c-vocab-strip: #FFC27A;
  --c-read: #2E9E83; --c-read-ink: #1D7560; --c-read-soft: #F0F8F5; --c-read-strip: #8FCDB9;
  --c-gram: #3B7DD8; --c-gram-ink: #2A62B5; --c-gram-soft: #EEF5FD; --c-gram-strip: #84B9EA;
  --scrim: rgba(16, 24, 34, .45);
  --shadow: 0 1px 2px rgba(16, 24, 34, .05), 0 2px 8px rgba(16, 24, 34, .05);
  --shadow-lg: 0 18px 50px rgba(16, 24, 34, .22);
  --font: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --font-en: "Segoe UI", "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
  --pad: clamp(16px, 2.2vw, 40px);
  --top-h: 64px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E141C; --surface: #161F2A; --surface-2: #1B2633; --sunken: #121A24; --hover: #1F2B39;
  --line: #2A3747; --line-strong: #3C4B5E;
  --ink: #EEF2F6; --muted: #A9B4C1; --faint: #7F8A98;
  --primary: #4A9CF0; --primary-hover: #64ABF4; --on-primary: #06121F; --primary-soft: #16304A;
  --navy: #1E3550; --navy-2: #284563; --on-navy: #FFFFFF; --navy-muted: #B9C9DA;
  --ok: #5FD39A; --ok-soft: #12301F; --ng: #FF8F86; --ng-soft: #43201D; --warn: #F0B95A; --warn-soft: #3B2C10;
  --c-vocab: #D97F22; --c-vocab-ink: #F3B46E; --c-vocab-soft: #261D14; --c-vocab-strip: #8A5519;
  --c-read: #3AA88C; --c-read-ink: #7ED4BD; --c-read-soft: #13241F; --c-read-strip: #24745F;
  --c-gram: #4A8FE0; --c-gram-ink: #92BFF4; --c-gram-soft: #142132; --c-gram-strip: #2D5F9C;
  --scrim: rgba(0, 0, 0, .62);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
}
.c-vocab { --c: var(--c-vocab); --c-ink: var(--c-vocab-ink); --c-soft: var(--c-vocab-soft); --c-strip: var(--c-vocab-strip); }
.c-reading { --c: var(--c-read); --c-ink: var(--c-read-ink); --c-soft: var(--c-read-soft); --c-strip: var(--c-read-strip); }
.c-grammar { --c: var(--c-gram); --c-ink: var(--c-gram-ink); --c-soft: var(--c-gram-soft); --c-strip: var(--c-gram-strip); }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); text-decoration: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.en { font-family: var(--font-en); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 読み込み中・エラー ---------- */
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); text-align: center; padding: 24px; }
.boot b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 外枠 ---------- */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.top { position: relative; z-index: 5; display: flex; align-items: center; gap: 16px; height: var(--top-h); padding: 0 var(--pad); flex: none; }
.top-link { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 8px; margin-left: -8px; border-radius: var(--r-pill); font-weight: 700; font-size: 16px; color: var(--ink); white-space: nowrap; }
.top-link:hover { background: var(--hover); }
.top-link svg.i { width: 22px; height: 22px; }
.cats { display: flex; gap: 6px; margin-left: 12px; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); border: 1px solid var(--line); }
.cat-tab { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.cat-tab .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.cat-tab:hover { color: var(--ink); background: var(--hover); }
.cat-tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; white-space: nowrap; }
.chip:hover { border-color: var(--line-strong); }
.chip small { color: var(--muted); font-weight: 600; font-size: 12px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn svg.i { width: 22px; height: 22px; }
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body[data-view="study"] .top, body[data-view="reading"] .top { display: none; }

/* ---------- ボタン ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 700; font-size: 15px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--hover); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--ng); }
.btn.lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn kbd { margin-left: 2px; }
.start { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; min-width: 168px; padding: 0 26px; border-radius: var(--r-pill); background: var(--primary); color: var(--on-primary); font-size: 19px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent); transition: background .15s, transform .05s; }
.start:hover { background: var(--primary-hover); }
.start:active { transform: translateY(1px); }
.start .tri { width: 0; height: 0; border-left: 15px solid currentColor; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; font: 600 12px/1 var(--font-en); color: var(--muted); background: var(--surface); }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--r-pill); background: var(--sunken); border: 1px solid var(--line); }
.seg button { height: 34px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.bar { position: relative; height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--c, var(--primary)); }

/* ---------- ホーム ---------- */
.home { position: relative; flex: 1; display: flex; min-height: 0; }
.home-main { position: relative; z-index: 1; flex: 1; min-width: 0; padding: clamp(8px, 2vh, 28px) var(--pad) 22px calc(var(--pad) + clamp(0px, 8vw, 150px)); padding-right: calc(min(30vw, 440px) + var(--pad)); display: flex; flex-direction: column; justify-content: center; }
.home-main > * { max-width: 1120px; width: 100%; }
.home-title { margin: 0 0 clamp(8px, 2vh, 28px); font-size: clamp(28px, min(3vw, 5vh), 50px); line-height: 1.2; font-weight: 800; letter-spacing: .01em; }
.home-title small { display: block; font-size: clamp(14px, 1.1vw, 17px); color: var(--muted); font-weight: 600; letter-spacing: 0; margin-top: 6px; }
.steps { list-style: none; margin: 0 0 14px; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 13px; top: 18px; bottom: -14px; width: 3px; background: var(--primary-soft); border-radius: 2px; }
.steps li { position: relative; display: flex; align-items: center; gap: 12px; min-height: clamp(32px, 4.4vh, 44px); font-weight: 700; color: var(--muted); font-size: 16px; }
.steps li .mk { position: relative; z-index: 1; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); flex: none; }
.steps li .mk svg { width: 29px; height: 29px; }
.steps li b { color: var(--primary); }
.steps li .lnk { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; border-radius: 6px; padding: 2px 4px; }
.steps li .lnk:hover { color: var(--ink); background: var(--hover); }
.steps li.cur { color: var(--ink); font-size: clamp(19px, 1.6vw, 24px); font-weight: 800; margin-top: 6px; }
.steps li.cur .mk::after { content: ""; width: 17px; height: 17px; border-radius: 50%; border: 4px solid var(--primary); background: var(--bg); }
.mini-bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; vertical-align: middle; margin: 0 6px; }
.mini-bar i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.next-cards { display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 20px); position: relative; }
.lcard { position: relative; display: flex; align-items: stretch; min-height: clamp(112px, 16vh, 190px); border-radius: var(--r-lg); background: var(--c-soft); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.lcard:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(16,24,34,.06), 0 8px 22px rgba(16,24,34,.08); }
.lc-strip { width: clamp(44px, 4.2vw, 60px); background: var(--c-strip); flex: none; position: relative; }
.lc-ico { position: absolute; top: clamp(12px, 2vh, 22px); left: calc(100% - 28px); width: clamp(64px, 5.6vw, 84px); height: clamp(64px, 5.6vw, 84px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow); }
.lc-ico svg.i { width: 46%; height: 46%; stroke-width: 1.6; }
.lc-body { flex: 1; min-width: 0; padding: clamp(12px, 2vh, 24px) 210px clamp(12px, 1.8vh, 20px) calc(clamp(64px, 5.6vw, 84px) - 4px); display: flex; flex-direction: column; }
.lc-label { color: var(--c-ink); font-weight: 700; font-size: clamp(14px, 1.15vw, 17px); }
.lc-title { margin-top: clamp(2px, .8vh, 10px); font-size: clamp(20px, 1.8vw, 28px); font-weight: 800; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-ja { color: var(--faint); font-size: clamp(14px, 1.1vw, 17px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-meta { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: clamp(13px, 1vw, 15px); flex-wrap: wrap; }
.lc-meta .open { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.lc-meta .open:hover { text-decoration: underline; }
.lc-done { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 700; }
.lcard .start { position: absolute; right: clamp(14px, 1.4vw, 20px); bottom: clamp(14px, 2vh, 20px); }
.lcard.empty { cursor: default; }
.hero { position: absolute; top: calc(-1 * var(--top-h)); right: 0; width: min(30vw, 440px); height: min(92vh, 900px); color: var(--on-navy); pointer-events: none; }
.hero svg.blob { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero svg.blob path { fill: var(--navy); }
.hero-in { position: absolute; left: 22%; right: 8%; top: 18%; bottom: 20%; display: flex; flex-direction: column; justify-content: space-around; align-items: center; pointer-events: auto; text-align: center; }
.hero-stat .k { font-weight: 700; font-size: clamp(14px, 1.15vw, 18px); letter-spacing: .04em; }
.hero-stat .v { font-weight: 800; font-size: clamp(38px, min(4vw, 7vh), 68px); line-height: 1.1; font-family: var(--font-en); }
.hero-stat .u { font-weight: 700; font-size: clamp(14px, 1.1vw, 17px); color: var(--navy-muted); }
.hero-go { position: absolute; right: 4%; top: 42%; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--on-navy); }
.hero-go:hover { background: var(--navy-2); }
.hero-go svg.i { width: 30px; height: 30px; }
.hero-goal { width: 70%; font-size: 13px; color: var(--navy-muted); }
.hero-goal .bar { background: var(--navy-2); height: 6px; margin-top: 6px; }
.hero-goal .bar i { background: #7CC4FF; }
.fab { position: fixed; right: var(--pad); bottom: 22px; z-index: 6; display: flex; align-items: center; height: 58px; padding: 0 6px; border-radius: var(--r-pill); background: var(--navy); color: var(--on-navy); box-shadow: var(--shadow-lg); }
.fab button { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 800; font-size: 17px; }
.fab button:hover { background: var(--navy-2); }
.fab .sep { width: 1px; height: 26px; background: rgba(255,255,255,.22); }
.fab .badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #FFFFFF; color: var(--navy); font-size: 13px; display: inline-grid; place-items: center; font-family: var(--font-en); }
.fab .badge.zero { background: rgba(255,255,255,.18); color: var(--on-navy); }
.ver { position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); color: var(--faint); font-size: 12px; pointer-events: none; }

/* ---------- レッスン一覧 ---------- */
.list { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: clamp(18px, 2.4vw, 40px); padding: 8px var(--pad) 24px; }
.list-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.ls-head { display: flex; align-items: center; gap: 14px; }
.ls-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--c-soft); border: 2px solid var(--c-strip); display: grid; place-items: center; flex: none; }
.ls-ico svg.i { width: 28px; height: 28px; stroke-width: 1.7; }
.ls-head h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.ls-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.ls-stats { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.ls-row .t { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.ls-row .t b { color: var(--ink); font-size: 16px; }
.ls-next { padding: 16px; border-radius: var(--r-md); background: var(--c-soft); border: 1px solid color-mix(in srgb, var(--c-strip) 60%, transparent); display: grid; gap: 10px; }
.ls-next .k { font-size: 13px; color: var(--c-ink); font-weight: 700; }
.ls-next .tt { font-weight: 800; font-size: 17px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-next .start { height: 50px; font-size: 17px; width: 100%; }
.ls-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.list-main { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.lm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lm-head h2 { margin: 0; font-size: 16px; color: var(--muted); font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 12px; flex: 1; min-height: 0; align-content: start; }
.tile { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 112px; padding: 14px 16px 14px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-align: left; overflow: hidden; transition: border-color .12s, box-shadow .12s, transform .12s; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c-strip); }
.tile:hover { border-color: var(--c-strip); box-shadow: var(--shadow); transform: translateY(-1px); }
.tile .t-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--c-ink); }
.tile .t-title { font-weight: 800; font-size: 16px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.tile .t-ja { font-size: 13px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .t-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.tile .t-foot .bar { flex: 1; height: 6px; }
.tile .t-play { position: absolute; right: 12px; bottom: 30px; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; opacity: 0; transform: scale(.9); transition: opacity .12s, transform .12s; }
.tile:hover .t-play, .tile:focus-visible .t-play { opacity: 1; transform: none; }
.tile .t-play i { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.badge-st { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-st.done { background: var(--ok-soft); color: var(--ok); }
.badge-st.doing { background: var(--warn-soft); color: var(--warn); }
.badge-st.new { background: var(--sunken); color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; flex: none; }
.pager .pg { font-size: 14px; color: var(--muted); font-weight: 600; min-width: 120px; text-align: center; }
.empty-note { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-md); grid-column: 1 / -1; }

/* ---------- 学習画面（単語・熟語・文法・復習） ---------- */
.study { flex: 1; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
@media (min-width: 760px) { .study { height: 100vh; min-height: 0; flex: none; } .st-body, .result, .g-intro { overflow: hidden; } }
.st-top { display: flex; align-items: center; gap: 14px; height: var(--top-h); padding: 0 var(--pad); flex: none; border-bottom: 1px solid var(--line); }
.st-title { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.st-title .k { font-size: 12px; font-weight: 700; color: var(--c-ink); }
.st-title .t { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-prog { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 120px; max-width: 520px; margin-left: auto; }
.st-prog .bar { flex: 1; height: 10px; border-radius: 5px; }
.st-prog .bar i { border-radius: 5px; }
.st-prog .n { font-weight: 800; font-family: var(--font-en); font-size: 16px; white-space: nowrap; }
.st-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.st-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.9fr); gap: clamp(16px, 2vw, 32px); padding: clamp(16px, 3vh, 32px) var(--pad); max-width: 1500px; width: 100%; margin: 0 auto; }
.qcard { display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-lg); background: var(--c-soft); padding: clamp(20px, 3vh, 36px) clamp(20px, 2.4vw, 40px); position: relative; }
.q-kind { font-size: 14px; font-weight: 700; color: var(--c-ink); display: flex; align-items: center; gap: 10px; }
.q-main { margin: auto 0 4px; padding-top: clamp(10px, 2.4vh, 26px); font-size: clamp(32px, 3.6vw, 54px); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.q-main.ja { font-size: clamp(24px, 2.4vw, 36px); }
.q-main.sentence { font-size: clamp(20px, 2vw, 30px); font-weight: 700; line-height: 1.5; }
.q-main .blank { display: inline-block; min-width: 4.2em; border-bottom: 3px solid var(--c); margin: 0 .2em; text-align: center; color: var(--c-ink); }
.q-sub { color: var(--muted); font-size: 16px; min-height: 1.6em; }
.choices { margin-top: auto; padding-top: clamp(14px, 2.6vh, 28px); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: clamp(58px, 8vh, 76px); padding: 10px 16px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--line); text-align: left; font-weight: 700; font-size: 16px; line-height: 1.4; transition: border-color .12s, background .12s; }
.choice:hover:not([disabled]) { border-color: var(--c); }
.choice .no { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--muted); font: 700 13px var(--font-en); }
.choice.en-c { font-family: var(--font-en); font-size: 17px; }
.choice[disabled] { cursor: default; }
.choice.correct { border-color: var(--ok); background: var(--ok-soft); }
.choice.correct .no { background: var(--ok); color: #fff; }
.choice.wrong { border-color: var(--ng); background: var(--ng-soft); }
.choice.wrong .no { background: var(--ng); color: #fff; }
.choice.dim { opacity: .55; }
.reveal-row { margin-top: auto; padding-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.reveal-row .btn { flex: 1; min-height: 60px; font-size: 17px; }
.next-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; min-height: 54px; }
.verdict { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; }
.verdict.ok { color: var(--ok); } .verdict.ng { color: var(--ng); }
.verdict svg.i { width: 28px; height: 28px; stroke-width: 2.6; }
.next-row .btn.primary { margin-left: auto; min-width: 160px; }
.side { display: flex; flex-direction: column; min-height: 0; gap: 14px; }
.panel { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); padding: 18px 20px; min-height: 0; }
.panel h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.panel.scroll { overflow: auto; flex: 1; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dots i { width: 22px; height: 22px; border-radius: 6px; background: var(--sunken); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; }
.dots i.ok { background: var(--ok); } .dots i.ng { background: var(--ng); } .dots i.cur { outline: 2px solid var(--c); outline-offset: 1px; background: var(--surface); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }
.keys { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.keys div { display: flex; gap: 8px; align-items: center; }
.detail .d-word { font-size: 26px; font-weight: 800; line-height: 1.2; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.detail .d-ipa { color: var(--muted); font-size: 15px; font-weight: 500; }
.detail .d-sense { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.detail .d-sense li { display: flex; gap: 8px; font-size: 16px; }
.pos { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.ex { margin-top: 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface-2); border-left: 3px solid var(--c); }
.ex .e { font-family: var(--font-en); font-size: 15px; }
.ex .j { color: var(--muted); font-size: 13px; }
.rel { margin-top: 10px; font-size: 13px; color: var(--muted); display: grid; gap: 3px; }
.rel b { color: var(--ink); font-weight: 700; margin-right: 6px; }
.expl { font-size: 15px; line-height: 1.75; }
.expl .ja-line { color: var(--muted); font-size: 14px; margin-top: 8px; }
.star-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); }
.star-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.star-btn[aria-pressed="true"] { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.star-btn[aria-pressed="true"] svg { fill: currentColor; }
.hint-empty { color: var(--faint); font-size: 14px; display: grid; place-items: center; text-align: center; min-height: 120px; }

/* 文法の解説 */
.g-intro { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .9fr); gap: clamp(16px, 2vw, 32px); padding: clamp(16px, 3vh, 32px) var(--pad); max-width: 1500px; width: 100%; margin: 0 auto; }
.g-doc { overflow: auto; border-radius: var(--r-lg); background: var(--c-soft); padding: clamp(20px, 3vh, 34px) clamp(20px, 2.4vw, 40px); }
.g-doc h2 { margin: 0 0 10px; font-size: clamp(22px, 2vw, 30px); line-height: 1.3; }
.g-doc .sum { font-size: 16px; line-height: 1.8; margin: 0 0 14px; }
.g-doc h4 { margin: 18px 0 8px; font-size: 14px; color: var(--c-ink); }
.g-doc ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.formula { display: grid; gap: 6px; }
.formula div { padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 700; }
.g-aside { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.g-aside .panel.scroll ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 14px; }
.g-go { display: grid; gap: 10px; }
.g-go .start { width: 100%; }

/* 結果 */
.result { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.2fr); gap: clamp(16px, 2vw, 32px); padding: clamp(16px, 3vh, 32px) var(--pad); max-width: 1400px; width: 100%; margin: 0 auto; }
.res-main { display: flex; flex-direction: column; gap: 16px; justify-content: center; border-radius: var(--r-lg); background: var(--c-soft); padding: clamp(20px, 3vh, 40px); }
.res-score { display: flex; align-items: center; gap: 22px; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .bg { stroke: var(--surface); } .ring .fg { stroke: var(--c); stroke-linecap: round; }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .lbl b { font-size: 34px; font-family: var(--font-en); }
.ring .lbl small.u { display: inline; font-size: 16px; }
.ring .lbl small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.res-msg h2 { margin: 0 0 4px; font-size: 26px; }
.res-msg p { margin: 0; color: var(--muted); }
.res-actions { display: grid; gap: 10px; }
.res-actions .start { width: 100%; }
.res-actions .row { display: flex; gap: 10px; flex-wrap: wrap; }
.res-actions .row .btn { flex: 1; }
.res-list { display: grid; gap: 6px; }
.res-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); text-align: left; width: 100%; }
.res-item:hover { background: var(--hover); }
.res-item .mk { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.res-item .mk.ok { background: var(--ok); } .res-item .mk.ng { background: var(--ng); }
.res-item .w { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-item .m { margin-left: auto; color: var(--muted); font-size: 13px; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- リーディング ---------- */
.rd-tools { display: flex; align-items: center; gap: 8px; }
.rd-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); gap: clamp(16px, 2vw, 32px); padding: clamp(14px, 2.4vh, 28px) var(--pad); max-width: 1600px; width: 100%; margin: 0 auto; height: calc(100vh - var(--top-h)); }
.passage { overflow: auto; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); padding: clamp(18px, 3vh, 34px) clamp(18px, 2.4vw, 40px); font-family: var(--font-en); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.9; }
.passage .p { margin: 0 0 1em; }
.passage .p.rp-title { font-weight: 800; font-size: 1.25em; line-height: 1.4; }
.passage .p.rp-list { padding-left: 1em; border-left: 3px solid var(--line); }
.passage .p.rp-list .s, .passage .p.rp-lines .s, .passage .p.rp-meta .s { display: block; }
.passage .p.rp-list .s::before { content: "・"; color: var(--faint); }
.passage .p.rp-meta { font-size: .85em; color: var(--muted); line-height: 1.6; padding-bottom: .6em; border-bottom: 1px solid var(--line); }
.passage .s { border-radius: 4px; transition: background .2s; }
.passage .s.hl { background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.passage .s .tr { display: block; font-family: var(--font); font-size: 14px; color: var(--muted); line-height: 1.7; margin: 2px 0 6px; }
.passage .rp-list .s .tr, .passage .rp-lines .s .tr { margin-top: 0; }
.passage .w { cursor: pointer; border-radius: 3px; }
.passage .w:hover { background: var(--c-soft); box-shadow: 0 0 0 2px var(--c-soft); }
.passage .w.on { background: color-mix(in srgb, var(--c) 28%, transparent); }
.passage .gl { text-decoration: underline dotted var(--c-ink); text-decoration-thickness: 2px; text-underline-offset: 5px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.rq { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.rq-card { flex: 1; min-height: 0; overflow: auto; border-radius: var(--r-lg); background: var(--c-soft); padding: clamp(16px, 2.4vh, 28px) clamp(16px, 1.8vw, 28px); display: flex; flex-direction: column; }
.rq-card .q-en { font-family: var(--font-en); font-size: 18px; font-weight: 700; line-height: 1.45; margin-top: 8px; }
.rq-card .q-ja { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rq-card .choices { grid-template-columns: 1fr; padding-top: 14px; margin-top: 0; gap: 8px; }
.rq-card .choice { min-height: 50px; font-family: var(--font-en); font-weight: 600; font-size: 15px; }
.rq-card .expl { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); font-size: 14px; }
.rq-nav { display: flex; gap: 10px; align-items: center; }
.rq-nav .btn.primary { margin-left: auto; }
.mob-tabs { display: none; }
.pop { position: fixed; z-index: 40; max-width: min(340px, calc(100vw - 24px)); padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 14px; }
.pop .pw { font-family: var(--font-en); font-weight: 800; font-size: 18px; }
.pop .pi { color: var(--muted); font-size: 13px; margin-left: 6px; font-weight: 400; }
.pop .pm { margin-top: 4px; }
.pop .pl { margin-top: 6px; font-size: 12px; color: var(--faint); }

/* ---------- 学習状況 ---------- */
.stats { flex: none; min-height: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; padding: 4px var(--pad) 22px; max-width: 1600px; width: 100%; margin: 0 auto; height: calc(100vh - var(--top-h)); }
.stats-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stats-head h1 { margin: 0; font-size: 26px; }
.stats-head .sub { color: var(--muted); font-weight: 600; font-size: 14px; }
.stats-head .seg { margin-left: auto; }
.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); padding: 12px 16px; min-width: 0; }
.kpi .k { font-size: 13px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.kpi .v { font-size: clamp(24px, 2.2vw, 34px); font-weight: 800; font-family: var(--font-en); line-height: 1.2; white-space: nowrap; }
.kpi .v small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 3px; font-family: var(--font); }
.kpi .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.hero-k { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.kpi.hero-k .k, .kpi.hero-k .s, .kpi.hero-k .v small { color: var(--navy-muted); }
.card { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); padding: 16px 18px; min-height: 0; display: flex; flex-direction: column; }
.card > h2 { margin: 0 0 10px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card > h2 .r { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.card .cbody { flex: 1; min-height: 0; overflow: auto; }
.s-time { grid-column: span 5; } .s-prog { grid-column: span 4; } .s-weak { grid-column: span 3; }
.s-cal { grid-column: span 5; } .s-hist { grid-column: span 7; }
.chart { position: relative; height: 100%; min-height: 150px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .ax text { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .barm { fill: var(--primary); }
.chart .barm.today { fill: var(--navy); }
:root[data-theme="dark"] .chart .barm.today { fill: #8CC6FF; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .barm, .chart g.b:hover .barm { opacity: .8; }
.tip { position: absolute; z-index: 3; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px; }
.prog-rows { display: grid; gap: 10px; }
.pr .t { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.pr .t .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; align-self: center; }
.pr .t .r { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 13px; }
.pr .bar { height: 10px; border-radius: 5px; }
.pr .bar i { border-radius: 5px; }
.pr .sub { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.weak-list { display: grid; gap: 8px; }
.weak { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 9px 10px 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.weak .n { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weak .n small { color: var(--c-ink); font-weight: 700; margin-right: 6px; }
.weak .rt { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.weak .rt .bar { width: 70px; height: 6px; } .weak .rt .bar i { background: var(--ng); }
.weak .btn { min-height: 34px; padding: 0 12px; font-size: 13px; grid-row: span 2; }
.cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; justify-content: start; }
.cal i { width: clamp(11px, min(1.1vw, 1.9vh), 18px); aspect-ratio: 1; border-radius: 4px; background: var(--sunken); }
.cal i.l1, .cal-legend i.l1 { background: #BBDDF8; } .cal i.l2, .cal-legend i.l2 { background: #6FB2EE; } .cal i.l3, .cal-legend i.l3 { background: #2F86DA; } .cal i.l4, .cal-legend i.l4 { background: #175A9E; }
:root[data-theme="dark"] .cal i.l1, :root[data-theme="dark"] .cal-legend i.l1 { background: #1B3A5A; } :root[data-theme="dark"] .cal i.l2, :root[data-theme="dark"] .cal-legend i.l2 { background: #22609A; } :root[data-theme="dark"] .cal i.l3, :root[data-theme="dark"] .cal-legend i.l3 { background: #3A8BDB; } :root[data-theme="dark"] .cal i.l4, :root[data-theme="dark"] .cal-legend i.l4 { background: #8CC6FF; }
.cal i.fut { visibility: hidden; }
.cal-wrap { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.cal-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.streak-box { display: grid; gap: 8px; }
.streak-box .big { font-size: 40px; font-weight: 800; font-family: var(--font-en); line-height: 1; }
.streak-box .big small { font-size: 15px; font-family: var(--font); color: var(--muted); margin-left: 4px; }
.streak-box .s { font-size: 13px; color: var(--muted); }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist th { white-space: nowrap; text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 8px 6px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.hist td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hist td.t { max-width: 1px; width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.hist td .cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.hist td.r { text-align: right; color: var(--muted); }
.stats-tabs { display: none; }

/* ---------- ポップアップ ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: var(--scrim); animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); animation: rise .18s ease; }
.modal.wide { width: min(760px, 100%); }
@keyframes rise { from { transform: translateY(12px); opacity: .6; } }
.m-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 10px 24px; }
.m-head h2 { margin: 0; font-size: 19px; }
.m-head .icon-btn { margin-left: auto; }
.m-body { padding: 4px 24px 18px; overflow: auto; }
.m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 20px; border-top: 1px solid var(--line); }
.m-foot .btn { min-width: 110px; }
.opt-list { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); text-align: left; width: 100%; }
.opt:hover:not([disabled]) { border-color: var(--primary); background: var(--primary-soft); }
.opt[disabled] { opacity: .5; cursor: default; }
.opt .oi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.opt .ot { font-weight: 800; }
.opt .os { font-size: 13px; color: var(--muted); }
.opt .oc { margin-left: auto; font-weight: 800; font-size: 20px; font-family: var(--font-en); }
.opt.sel { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.lv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lv-grid .opt { padding: 12px 14px; }
.lv-grid .opt .oc { font-size: 15px; color: var(--muted); }
.set-sec { padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-sec:last-child { border-bottom: 0; }
.set-sec h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 46px; flex-wrap: wrap; }
.set-row .l { font-weight: 700; }
.set-row .l small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { position: relative; width: 48px; height: 28px; border-radius: 14px; background: var(--line-strong); transition: background .15s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.toggle[aria-checked="true"] { background: var(--primary); }
.toggle[aria-checked="true"]::after { transform: translateX(20px); }
.num-step { display: inline-flex; align-items: center; gap: 4px; }
.num-step b { min-width: 64px; text-align: center; }
.num-step .icon-btn { border: 1px solid var(--line); width: 36px; height: 36px; }
.g-modal h4 { margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
.g-modal ul { margin: 0; padding-left: 1.2em; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translateX(-50%); padding: 12px 18px; border-radius: var(--r-md); background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); animation: rise .2s ease; }

/* ---------- 中くらいの画面（タブレット・小さいPC） ---------- */
@media (max-width: 1180px) {
  .home-main { padding-left: var(--pad); }
  .s-time { grid-column: span 7; } .s-prog { grid-column: span 5; } .s-weak { grid-column: span 5; } .s-cal { grid-column: span 7; } .s-hist { grid-column: span 12; }
  .stats { height: auto; grid-template-rows: auto; }
  .stats .card { min-height: 260px; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) and (min-width: 760px) {
  .cat-tab { padding: 0 12px; }
  .cat-tab .lbl-long { display: none; }
}

/* ---------- スマホ ---------- */
@media (max-width: 759px) {
  :root { --top-h: 56px; --pad: 16px; }
  body { font-size: 15px; }
  .top { flex-wrap: wrap; height: auto; padding: 8px var(--pad) 0; gap: 8px 10px; }
  .top-link { font-size: 15px; height: 40px; }
  .cats { order: 3; width: 100%; margin: 0 0 4px; }
  .cat-tab { flex: 1; justify-content: center; padding: 0 6px; font-size: 13px; height: 36px; gap: 5px; }
  .chip { height: 36px; padding: 0 12px; }
  .home { flex-direction: column; }
  .home-main { padding: 6px var(--pad) 96px; justify-content: flex-start; }
  .home-title { font-size: 24px; margin-bottom: 10px; }
  .home-title small { font-size: 13px; margin-top: 2px; }
  .hero { position: relative; order: -1; width: auto; height: auto; margin: 6px var(--pad) 2px; border-radius: var(--r-lg); background: var(--navy); pointer-events: auto; }
  .hero svg.blob { display: none; }
  .hero-in { position: static; flex-direction: row; flex-wrap: wrap; justify-content: space-around; padding: 12px 44px 12px 12px; gap: 6px 10px; }
  .hero-stat .k { font-size: 12px; } .hero-stat .v { font-size: 30px; } .hero-stat .u { font-size: 12px; }
  .hero-goal { width: 100%; font-size: 12px; }
  .hero-go { right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
  .steps { margin-bottom: 8px; }
  .steps li { min-height: 36px; font-size: 14px; gap: 10px; }
  .steps li .mk, .steps li .mk svg { width: 24px; height: 24px; }
  .steps::before { left: 10.5px; }
  .steps li.cur { font-size: 17px; margin-top: 2px; }
  .steps li.cur .mk::after { width: 14px; height: 14px; border-width: 3px; }
  .mini-bar { width: 56px; }
  .lcard { min-height: 0; }
  .lc-strip { width: 10px; }
  .lc-ico { display: none; }
  .lc-body { padding: 12px 14px 12px 16px; }
  .lc-label { font-size: 12px; }
  .lc-title { font-size: 18px; margin-top: 2px; padding-right: 100px; }
  .lc-ja { font-size: 13px; padding-right: 100px; }
  .lc-meta { font-size: 12px; gap: 10px; padding-top: 4px; }
  .lcard .start { height: 44px; min-width: 0; padding: 0 16px; font-size: 15px; right: 12px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .lcard .start .tri { border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }
  .fab { right: 50%; transform: translateX(50%); bottom: 14px; height: 54px; }
  .fab button { height: 42px; font-size: 15px; padding: 0 16px; }
  .ver { display: none; }
  .list { grid-template-columns: 1fr; padding: 4px var(--pad) 16px; gap: 12px; }
  .list-side { gap: 10px; }
  .ls-head h1 { font-size: 21px; } .ls-ico { width: 44px; height: 44px; border-radius: 12px; }
  .ls-stats { grid-template-columns: 1fr 1fr; padding: 12px; gap: 10px; }
  .ls-next { padding: 12px; grid-template-columns: 1fr auto; align-items: center; }
  .ls-next .k { grid-column: 1 / -1; }
  .ls-next .start { width: auto; height: 44px; font-size: 15px; min-width: 0; }
  .tiles { grid-template-columns: 1fr; gap: 8px; }
  .tile { min-height: 0; padding: 10px 12px 10px 18px; }
  .tile .t-play { display: none; }
  .st-top { gap: 10px; padding: 0 12px; }
  .st-title .t { font-size: 14px; max-width: 34vw; }
  .st-time { display: none; }
  .st-body, .g-intro, .result { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .qcard { padding: 16px; }
  .q-main { font-size: 32px; margin: 8px 0 2px; }
  .q-main.sentence { font-size: 19px; }
  .choices { grid-template-columns: 1fr; gap: 8px; padding-top: 14px; }
  .choice { min-height: 52px; font-size: 15px; padding: 8px 12px; }
  .side .panel.prog-panel { display: none; }
  .next-row { position: sticky; bottom: 0; background: var(--c-soft); padding-top: 8px; margin-top: 10px; }
  .res-score { gap: 14px; } .ring { width: 104px; height: 104px; } .ring .lbl b { font-size: 26px; }
  .rd-body { grid-template-columns: 1fr; height: calc(100vh - var(--top-h) - 52px); padding: 0 12px 12px; }
  .mob-tabs { display: flex; padding: 8px 12px; gap: 8px; }
  .mob-tabs .seg { width: 100%; } .mob-tabs .seg button { flex: 1; }
  .rd-body[data-tab="q"] .passage { display: none; }
  .rd-body[data-tab="p"] .rq { display: none; }
  .rd-tools .lbl { display: none; }
  .stats { display: flex; flex-direction: column; height: auto; padding: 4px var(--pad) 24px; }
  .stats-head h1 { font-size: 21px; }
  .stats-head .seg { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .stats-tabs { display: flex; }
  .stats-tabs .seg { width: 100%; } .stats-tabs .seg button { flex: 1; padding: 0 6px; }
  .stats .card { min-height: 280px; }
  .stats[data-tab] .card { display: none; }
  .stats[data-tab="time"] .s-time, .stats[data-tab="time"] .s-cal, .stats[data-tab="prog"] .s-prog, .stats[data-tab="weak"] .s-weak, .stats[data-tab="hist"] .s-hist { display: flex; }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 90vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .lv-grid { grid-template-columns: 1fr 1fr; }
  .m-body { padding: 4px 18px 16px; }
}
@media (max-width: 759px) and (max-height: 700px) {
  .hero-goal { display: none; }
  .lc-ja { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
svg.i.rot { transform: rotate(90deg); width: 1em; height: 1em; }
.btn.primary.danger-bg { background: var(--ng); border-color: var(--ng); color: #fff; }

@media (min-width: 760px) {
  body[data-view="home"] .top-right .icon-btn { color: var(--navy-muted); }
  body[data-view="home"] .top-right .icon-btn:hover { background: var(--navy-2); color: #fff; }
  body[data-view="home"] .top-right .chip { border-color: transparent; }
}
@media (min-width: 760px) and (max-height: 820px) { .home-title small { display: none; } }
.home-main { padding-top: clamp(4px, 1.5vh, 24px); }

@media (min-width: 1181px) and (max-height: 860px) {
  .pr .sub { display: none; }
  .pr .t { margin-bottom: 3px; }
  .kpi { padding: 9px 14px; }
  .stats { gap: 12px; }
}

@media (max-width: 759px) {
  .hero { top: 0; }
  .home-title small, .hero-goal { display: none; }
  .home-title { margin-bottom: 6px; }
  .hero-in { padding: 10px 44px 10px 12px; }
  .st-title { flex: 1; }
  .st-title .k { display: none; }
  .st-title .t { max-width: none; }
  .st-top [data-back] span, .st-top [data-lesson] span { display: none; }
  .st-top .btn.ghost { padding: 0 10px; min-height: 40px; }
  .st-prog { flex: 0 1 38%; min-width: 96px; margin-left: 0; gap: 8px; }
  .st-prog .n { font-size: 14px; }
  .side { display: none; }
  .star-btn span { display: none; }
  .star-btn { padding: 0 9px; }
  .res-msg h2 { font-size: 20px; }
  .result .panel.scroll { max-height: none; }
  .rd-tools .btn { padding: 0 10px; }
}
@media (max-width: 759px) {
  .lc-body { padding-right: 116px; }
  .lc-title, .lc-ja { padding-right: 0; }
  .lc-meta .open .num { display: none; }
  .fab button { white-space: nowrap; }
}
.set-row + .set-row { margin-top: 8px; }
/* タブレット縦など（幅760〜1000px）：ホームの濃紺パネルは上の帯にする */
@media (min-width: 760px) and (max-width: 1000px) {
  .home { flex-direction: column; }
  .home-main { padding: 8px var(--pad) 100px; justify-content: flex-start; }
  .hero { position: relative; top: 0; order: -1; width: auto; height: auto; margin: 8px var(--pad) 6px; border-radius: var(--r-lg); background: var(--navy); pointer-events: auto; }
  .hero svg.blob { display: none; }
  .hero-in { position: static; flex-direction: row; justify-content: space-around; padding: 16px 60px 16px 16px; }
  .hero-stat .v { font-size: 40px; }
  .hero-go { top: 50%; transform: translateY(-50%); }
  body[data-view="home"] .top-right .icon-btn { color: var(--muted); }
  body[data-view="home"] .top-right .chip { border-color: var(--line); }
}

/* ===== UI改善（2026-11-27 午後） ===== */
/* 濃紺パネル：今日の目標のリング */
.hero-today { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-today .k { font-weight: 700; font-size: clamp(13px, 1.05vw, 16px); letter-spacing: .04em; }
.hero-today .u { font-size: 13px; color: var(--navy-muted); font-weight: 600; }
.hero-today .u b { color: var(--on-navy); font-size: 15px; font-family: var(--font-en); }
.hero-ring { position: relative; width: clamp(84px, min(8vw, 13vh), 124px); aspect-ratio: 1; }
.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.hero-ring circle { fill: none; stroke-width: 9; }
.hero-ring .t { stroke: var(--navy-2); }
.hero-ring .f { stroke: #7CC4FF; stroke-linecap: round; }
.hero-ring .rl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.hero-ring .rl b { font-size: clamp(22px, 2vw, 32px); font-family: var(--font-en); }
.hero-ring .rl small { font-size: 12px; color: var(--navy-muted); font-weight: 600; }
/* ホームの苦手分野への入口 */
.weak-lnk { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.weak-lnk .wn { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weak-lnk .wr { color: var(--ng); font-weight: 800; }
.weak-lnk .wgo { display: inline-flex; align-items: center; gap: 2px; color: var(--primary); font-weight: 700; font-size: 14px; }
.steps li { min-width: 0; }
.fab .fab-u { font-size: 14px; font-weight: 700; margin-left: -4px; }

@media (max-width: 759px) {
  /* 1. ホームを1画面に収める（級は上のバーにあるので段から外す）。スクロールしたら復習ボタンを小さくする */
  .steps li.st-lv { display: none; }
  .steps::before { top: 14px; }
  .hero-in { flex-wrap: nowrap; align-items: center; padding: 10px 48px 10px 10px; }
  .hero-today { gap: 2px; }
  .hero-today .k { font-size: 12px; }
  .hero-today .u { display: none; }
  .hero-ring { width: 60px; }
  .hero-ring circle { stroke-width: 10; }
  .hero-ring .rl b { font-size: 17px; }
  .hero-ring .rl small { font-size: 10px; }
  .fab { right: 12px; transform: none; bottom: max(12px, env(safe-area-inset-bottom)); height: 52px; transition: height .15s; }
  .fab.mini .fab-l, .fab.mini .sep, .fab.mini #fab-more { display: none; }
  .fab.mini { height: 48px; padding: 0 4px; }
  .fab.mini button { padding: 0 12px; }
  .home-main { padding-bottom: 84px; }
  .lc-body { padding-top: 10px; padding-bottom: 10px; }
  /* 6. 長いタイトルは2行まで */
  .lc-title, .tile .t-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
  .lc-title { font-size: 17px; }
  .st-title .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; line-height: 1.3; }
  /* 2. 文法の解説：「練習問題を始める」を画面の下に固定 */
  .g-intro { padding-bottom: 120px; }
  .g-go { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; border-radius: var(--r-lg) var(--r-lg) 0 0; border: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(16,24,34,.12); padding: 12px 16px max(12px, env(safe-area-inset-bottom)); gap: 8px; }
  .g-go .keys { display: none; }
  .g-go .start { height: 50px; font-size: 17px; }
  /* 10. 指で押しやすい大きさ */
  .seg button { height: 40px; }
  .star-btn { height: 40px; min-width: 40px; justify-content: center; }
  .lc-meta .open { padding: 10px 8px; margin: -10px -8px; }
  .steps li .lnk { min-height: 40px; }
  .pager .icon-btn { width: 44px; height: 44px; }
  .chip { height: 40px; }
  .weak-lnk .wgo { font-size: 13px; }
}
@media (pointer: coarse) and (min-width: 760px) {
  .seg button { height: 40px; }
  .star-btn { height: 40px; }
  .lc-meta .open { padding: 8px 6px; margin: -8px -6px; }
}
@media (min-width: 760px) and (max-width: 1000px) {
  .hero-in { align-items: center; }
  .hero-ring { width: 84px; }
}
@media (max-width: 759px) {
  /* リーディング：本文・設問の枠を画面の高さに合わせ、ページ全体はスクロールさせない */
  body[data-view="reading"] .study { height: 100vh; height: 100dvh; min-height: 0; flex: none; }
  .rd-body { height: auto; flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  /* ホームのカード：状態はラベルの行に出し、下の行は省いて1画面に収める */
  .lc-meta { display: none; }
  .lc-label .st-inline { display: inline; }
  .hero-ring { width: 66px; }
  .hero-ring .rl small { font-size: 12px; letter-spacing: -.02em; }
}
.lc-label .st-inline { display: none; margin-left: 8px; font-size: .9em; }
@media (max-width: 759px) { .lc-label .st-inline { display: inline; } }

/* ===== ナビゲーションの整理・PCの固定レイアウト・スマホの重なり修正（2026-11-28） ===== */
/* 上のバー：左は「学習状況」（ホーム）または「ホームに戻る」＋現在地 */
.top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px 0 12px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 800; font-size: 14px; white-space: nowrap; flex: none; }
.home-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.home-btn svg.i { width: 19px; height: 19px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; }
.crumb .cr { overflow: hidden; text-overflow: ellipsis; }
.crumb .cr:last-child { color: var(--ink); }
.crumb .cr-sep { color: var(--faint); font-weight: 400; }
.st-title .k .crumb { font-size: 12px; gap: 4px; color: var(--c-ink); }
.st-title .k .crumb .cr:last-child { color: var(--c-ink); }
.st-title .k .crumb > .cr-sep:first-child { display: none; }
.st-top .home-btn { height: 38px; }
.st-top .home-btn + .btn.ghost { margin-left: -6px; }
#top-stats[hidden] { display: none; }

@media (min-width: 760px) {
  /* 1. 分野のタブはホームのカードと重なるので出さない */
  .cats { display: none; }
  /* 2. 画面全体はスクロールさせず、中身の枠だけをスクロールさせる */
  html, body { height: 100%; overflow: hidden; }
  #app { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  #view { min-height: 0; overflow: hidden; }
  .home { min-height: 0; }
  .home-main { overflow-y: auto; overflow-x: hidden; padding-left: calc(var(--pad) + clamp(0px, 3vw, 64px)); }
  .list { min-height: 0; overflow: hidden; }
  .list-side { overflow-y: auto; }
  .stats { flex: 1; height: auto; min-height: 0; overflow: hidden; }
  .study { height: 100vh; height: 100dvh; }
  .rd-body { height: auto; flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .g-intro, .st-body, .result { grid-template-rows: minmax(0, 1fr); }
  .qcard { overflow-y: auto; }
  .res-main { overflow-y: auto; }
}
/* 幅の狭いPC（760〜1180px）でも学習状況を1画面に収める */
@media (min-width: 760px) and (max-width: 1180px) {
  .stats { display: grid; height: auto; grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 10px; padding-bottom: 14px; }
  .stats .card { min-height: 0; padding: 12px 14px; }
  .stats .chart { min-height: 0; }
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 8px 10px; }
  .kpi .k { font-size: 12px; } .kpi .v { font-size: 22px; } .kpi .s { font-size: 11px; }
  .kpi .k svg.i { display: none; }
  .s-time { grid-column: span 7; } .s-prog { grid-column: span 5; }
  .s-weak { grid-column: span 5; } .s-cal { grid-column: span 7; }
  .s-hist { grid-column: span 12; }
  .pr .sub { display: none; }
  .stats-head h1 { font-size: 22px; }
}
@media (min-width: 760px) and (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-main { overflow-y: auto; }
}
/* 高さの低いPC（〜760px）：一覧・学習画面の余白を詰める */
@media (min-width: 760px) and (max-height: 760px) {
  :root { --top-h: 56px; }
  .list { padding-top: 2px; padding-bottom: 14px; gap: 18px; }
  .list-side { gap: 10px; }
  .ls-stats, .ls-next { padding: 12px 14px; }
  .ls-head h1 { font-size: 22px; } .ls-ico { width: 46px; height: 46px; }
  .st-body, .g-intro, .result, .rd-body { padding-top: 12px; padding-bottom: 12px; }
}

/* 4. スマホ：ホームのカードは「文字｜スタート」の横並びにして、重ならないようにする */
@media (max-width: 759px) {
  .top-left .crumb { display: none; }
  .home-btn { height: 40px; padding: 0 12px 0 10px; font-size: 13px; }
  .st-top .home-btn { width: 40px; padding: 0; justify-content: center; }
  .st-top .home-btn span { display: none; }
  .st-top .home-btn + .btn.ghost { margin-left: -4px; }
  .lcard { align-items: center; }
  .lc-body { padding: 10px 10px 10px 14px; min-width: 0; }
  .lc-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lc-title { padding-right: 0; word-break: normal; overflow-wrap: anywhere; }
  .lc-ja { padding-right: 0; }
  .lcard .start { position: static; transform: none; flex: none; align-self: center; margin: 0 12px 0 0; height: 44px; padding: 0 16px; font-size: 15px; min-width: 0; letter-spacing: .02em; }
  /* 一覧：絞り込み・切り替えを横幅いっぱいに収める（横にはみ出さない） */
  .lm-head .seg { width: 100%; }
  .lm-head .seg button, .list-side > .seg button { flex: 1; padding: 0 6px; }
  .list-side > .seg { width: 100%; }
  .list, .list-main, .list-side { min-width: 0; }
}
@media (max-width: 359px) {
  .lcard .start { padding: 0 12px; font-size: 14px; gap: 6px; }
  .lcard .start .tri { border-left-width: 9px; border-top-width: 6px; border-bottom-width: 6px; }
  .lc-title { font-size: 16px; }
  .top { gap: 6px 6px; }
  .chip { padding: 0 10px; }
  .home-btn span { display: none; }
  .home-btn { width: 40px; padding: 0; justify-content: center; }
  .ls-stats { grid-template-columns: 1fr; }
}
@media (max-width: 419px) { .lc-label .lc-cat { display: none; } }
@media (max-width: 759px) {
  /* 今日の目標はパネルのリングで表示するので、段は省く（苦手分野があるときはその入口だけ） */
  .steps li.st-goal { display: none; }
  .fab.inflow { position: static; margin: 14px auto 4px; width: max-content; transform: none; }
  .home:has(.fab.inflow) .home-main { padding-bottom: 0; }
  .home { flex-wrap: wrap; }
  .home > .fab.inflow { order: 3; }
  .home-main { width: 100%; }
  /* 学習画面の上のバー：題名が読めるよう、進み具合は数字だけ */
  .st-top { gap: 6px; }
  .st-prog { flex: none; min-width: 0; }
  .st-prog .bar { display: none; }
  .rd-tools { gap: 0; }
}
/* 学習画面の上端に細い進み具合のバー（スマホ） */
@media (max-width: 759px) {
  .st-top { position: relative; }
  .st-top::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: var(--st-pct, 0%); background: var(--c, var(--primary)); transition: width .2s; }
}

/* ===== 広告枠（2026-11-28）：ほかのカードと同じ角丸・余白でなじませ、「広告」と小さく表示 ===== */
.ad-box { position: relative; flex: none; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); padding: 22px 10px 10px; display: flex; justify-content: center; overflow: hidden; }
.ad-box .ad-label { position: absolute; top: 4px; left: 12px; font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .08em; }
.ad-box .ad-in { width: 100%; display: flex; justify-content: center; min-width: 0; }
.ad-box:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-dummy { display: grid !important; place-items: center; text-align: center; border-radius: var(--r-sm); background: repeating-linear-gradient(45deg, var(--sunken) 0 10px, var(--surface) 10px 20px); color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.6; max-width: 100%; }
/* 結果画面：右の列の上 */
.res-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.res-side .panel.scroll { flex: 1; min-height: 0; }
/* レッスン一覧：左の列のいちばん下 */
.list-side .ad-list { margin-top: auto; }
/* 学習状況：右下の枠 */
.s-ad { grid-column: span 3; padding: 0; border: 0; background: none; }
.s-ad .ad-box { flex: 1; min-height: 0; }
.s-ad .ad-in { height: 100%; align-items: center; }
@media (min-width: 1181px) { .stats:has(.s-ad) .s-hist { grid-column: span 4; } .stats:has(.s-ad) .s-cal { grid-column: span 5; } }
@media (min-width: 760px) and (max-width: 1180px) { .s-ad { grid-column: span 4; } .stats:has(.s-ad) .s-hist { grid-column: span 8; } }
/* スマホのホーム：カードの下 */
.ad-home { margin-top: 14px; }
@media (min-width: 760px) { .ad-home { display: none; } }
@media (max-width: 759px) {
  .ad-list { display: none; }
  .stats .s-ad { display: flex !important; min-height: 0; }
}
.ad-box .ad-label { font-size: 12px; }
