/* 共テリスニング超絶対策 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --blue: #3d7bd9; --blue-d: #2a5cad; --ink: #22304a; --bg: #f2f6fc;
  --card: #ffffff; --line: #dde5f0; --red: #e2554e; --green: #3aa06b; --gold: #e0a52c;
}
body { font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.65; }
button { font-family: inherit; cursor: pointer; }

/* ---------- ヘッダー・ナビ ---------- */
.top { position: sticky; top: 0; z-index: 50; background: linear-gradient(135deg, #2a5cad, #3d7bd9); color: #fff; box-shadow: 0 2px 10px rgba(42,92,173,.35); }
.top-inner { max-width: 860px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logo { font-size: 18px; font-weight: 700; cursor: pointer; letter-spacing: .5px; }
.logo b { color: #ffe17d; }
.top-badge { font-size: 11px; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.main { max-width: 860px; margin: 0 auto; padding: 20px 14px 90px; }
.main.exam-mode { padding-top: 0; }
.bnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bnav-btn { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: #8895ab; padding: 4px 7px; border-radius: 10px; white-space: nowrap; }
.bnav-btn .ic { font-size: 20px; }
.bnav-btn.on { color: var(--blue); background: #eaf1fc; font-weight: 700; }

/* ---------- ホーム ---------- */
.hero { text-align: center; padding: 28px 10px 20px; }
.hero h1 { font-size: 26px; line-height: 1.4; margin: 10px 0 12px; }
.grad { background: linear-gradient(90deg, #e2554e, #e0a52c); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 34px; }
.hero-sub { font-size: 14px; color: #55637d; margin-bottom: 18px; }
.cta { background: linear-gradient(135deg, #e2554e, #e0762c); color: #fff; border: none; font-size: 18px; font-weight: 700; padding: 15px 34px; border-radius: 999px; box-shadow: 0 6px 18px rgba(226,85,78,.4); transition: transform .15s; }
.cta:active { transform: scale(.96); }
.quote-box { margin: 22px auto 0; max-width: 560px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; text-align: left; }
.q-who { font-size: 12px; font-weight: 700; color: var(--blue-d); display: flex; align-items: center; gap: 6px; }
.quote-box p { margin-top: 6px; font-size: 14px; }
.stats-row { display: flex; gap: 10px; margin: 6px 0 14px; }
.stat-card { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: center; padding: 12px 4px; }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--blue-d); }
.stat-card .lb { font-size: 11px; color: #8895ab; }
.hist-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; font-size: 13px; }
.hb-row { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 10px; }
.hb-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.hb-bar { width: 70%; max-width: 34px; background: linear-gradient(180deg, #6fa0e8, #3d7bd9); border-radius: 6px 6px 0 0; position: relative; min-height: 4px; }
.hb-bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--blue-d); }
.hb-lb { font-size: 10px; color: #8895ab; margin-top: 3px; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 16px; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; transition: box-shadow .15s; }
.feat:hover { box-shadow: 0 4px 14px rgba(42,92,173,.15); }
.feat .f-ic { font-size: 26px; }
.feat b { display: block; margin: 4px 0 4px; font-size: 14.5px; }
.feat p { font-size: 12px; color: #55637d; }
.notice { background: #fff8e8; border: 1px solid #f0dfae; border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: #6b5b2a; margin: 10px 0; }

/* ---------- ページ共通 ---------- */
.page-t { font-size: 22px; margin: 8px 0 6px; }
.page-sub { font-size: 13.5px; color: #55637d; margin-bottom: 16px; }
.btn { border: none; border-radius: 10px; font-weight: 700; font-size: 14px; padding: 10px 18px; }
.btn.main { background: var(--blue); color: #fff; }
.btn.sub { background: #e8eefb; color: var(--blue-d); }
.btn.grade { background: linear-gradient(135deg, #3aa06b, #2c8657); color: #fff; font-size: 16px; padding: 14px 22px; }
.btn.share { background: #111; color: #fff; text-decoration: none; display: inline-block; }

/* ---------- 模試一覧 ---------- */
.test-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-t { font-size: 17px; font-weight: 800; }
.tc-d { font-size: 12.5px; color: #55637d; margin: 2px 0 4px; }
.tc-best { font-size: 12px; color: var(--blue-d); }
.tc-best b { font-size: 16px; }
.tc-r { display: flex; gap: 8px; }
.mode-info { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 13px; }
.mode-info ul { margin: 6px 0 0 18px; }

/* ---------- 試験画面 ---------- */
.exam-top { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 2px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; gap: 8px; margin: 0 -14px; }
.x-btn { background: #f1f4f9; border: none; border-radius: 8px; padding: 7px 12px; font-size: 13px; color: #55637d; }
.exam-title { font-weight: 800; font-size: 14.5px; }
.mode-tag { font-size: 10.5px; background: #eaf1fc; color: var(--blue-d); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.timer { font-size: 14px; font-weight: 800; color: var(--blue-d); min-width: 74px; text-align: right; }
.timer.warn { color: var(--red); }
.sec-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 10px 2px 4px; align-items: center; }
.st-lb { font-size: 11px; color: #8895ab; flex-shrink: 0; }
.sec-tab { flex-shrink: 0; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; color: #55637d; }
.sec-tab.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.sec-head h2 { font-size: 20px; }
.sec-pts { font-size: 13px; color: #8895ab; font-weight: 600; }
.rep-badge { font-size: 12px; background: #fdeeee; color: var(--red); border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.direction { font-size: 13px; background: #eef3fb; border-left: 4px solid var(--blue); padding: 8px 12px; border-radius: 0 8px 8px 0; margin-bottom: 14px; color: #3c4a63; }
.item-card { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 18px; }
.item-card.playing { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61,123,217,.18); }
.item-intro { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; color: var(--blue-d); }
.situation { background: #f6f8fc; border: 1px dashed #c3d0e5; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13.5px; }
.situation b { font-size: 11.5px; background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 8px; margin-right: 8px; }
.situation p { display: inline; }
.pre-box { margin: 10px 0; overflow-x: auto; }
.audio-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; flex-wrap: wrap; }
.play-btn { background: linear-gradient(135deg, #3d7bd9, #2a5cad); color: #fff; border: none; border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 700; box-shadow: 0 3px 10px rgba(42,92,173,.3); }
.play-btn.off { background: #c6cedb; box-shadow: none; }
.stop-btn { background: #f1f4f9; border: none; border-radius: 999px; width: 40px; height: 40px; font-size: 14px; }
.script-btn { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 13px; color: #55637d; }
.rate-sel { border: 1.5px solid var(--line); border-radius: 8px; padding: 8px; font-size: 13px; background: #fff; }
.q-block { border-top: 1px solid #eef1f7; padding-top: 12px; margin-top: 12px; }
.q-no { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.q-pts { font-size: 11.5px; color: #8895ab; font-weight: 600; }
.q-text { font-size: 15px; font-weight: 600; margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; }
.opt-list { display: flex; flex-direction: column; gap: 7px; }
.opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: Georgia, "Times New Roman", serif; transition: border-color .1s; }
.opt:hover { border-color: #a9bede; }
.opt.sel { border-color: var(--blue); background: #eaf1fc; box-shadow: inset 0 0 0 1px var(--blue); }
.opt.static { cursor: default; }
.opt.correct { border-color: var(--green); background: #eafaf1; box-shadow: inset 0 0 0 1px var(--green); }
.opt.wrong { border-color: var(--red); background: #fdeeee; }
.opt-c { font-weight: 800; color: var(--blue-d); flex-shrink: 0; }
.fig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.fig-grid.four { grid-template-columns: repeat(2, 1fr); }
.fig-grid.small { gap: 8px; }
.fig-opt { position: relative; border: 2px solid var(--line); border-radius: 12px; padding: 6px; cursor: pointer; background: #fff; }
.fig-opt:hover { border-color: #a9bede; }
.fig-opt.sel { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(61,123,217,.25); }
.fig-opt.static { cursor: default; }
.fig-opt.correct { border-color: var(--green); box-shadow: 0 0 0 2px rgba(58,160,107,.3); }
.fig-opt.wrong { border-color: var(--red); }
.fig-tag { position: absolute; top: 6px; left: 8px; z-index: 2; font-weight: 800; font-size: 15px; color: var(--blue-d); background: rgba(255,255,255,.9); border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); }
.order-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.order-slot { text-align: center; }
.os-lb { font-size: 11px; font-weight: 700; color: #8895ab; background: #f1f4f9; border-radius: 6px 6px 0 0; padding: 1px 0; }
.order-slot select { width: 64px; padding: 8px 4px; font-size: 16px; border: 1.5px solid var(--line); border-radius: 0 0 8px 8px; background: #fff; text-align: center; }
.os-ar { font-weight: 800; color: #8895ab; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13.5px; }
.chip.sel { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.chip.static { cursor: default; }
.chip.correct { background: #eafaf1; border-color: var(--green); color: #21714a; font-weight: 700; }
.chip.wrong { background: #fdeeee; border-color: var(--red); color: var(--red); }
.exam-nav { display: flex; justify-content: space-between; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.check-row { margin-top: 14px; text-align: right; }
.check-row.sec { text-align: center; margin: 4px 0 8px; }
.btn.check { background: #fff; border: 2px solid var(--green); color: #21714a; }
.btn.check:hover { background: #eafaf1; }
.btn.check.big { font-size: 15px; padding: 13px 26px; box-shadow: 0 3px 10px rgba(58,160,107,.25); }
.item-score { display: inline-block; font-size: 13.5px; font-weight: 800; background: #f6f8fc; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 16px; margin: 2px 0 6px; color: #3c4a63; }
.item-score.full { background: #eafaf1; border-color: var(--green); color: #21714a; }
.sec-got { font-size: 13px; font-weight: 800; background: #eafaf1; color: #21714a; border: 1.5px solid var(--green); border-radius: 999px; padding: 3px 12px; }

/* 印刷表・ワークシート */
.ptable { border-collapse: collapse; width: 100%; font-size: 13.5px; background: #fff; }
.ptable th, .ptable td { border: 1.5px solid var(--ink); padding: 7px 9px; }
.ptable th { background: #eef3fb; }
.ptable.center td, .ptable.center th { text-align: center; }
.blank { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; border: 1.7px solid var(--ink); border-radius: 4px; font-weight: 800; font-size: 13px; background: #fffbe8; padding: 0 4px; }
.worksheet { border: 2px solid var(--ink); border-radius: 8px; padding: 12px 14px; background: #fff; font-size: 13.5px; }
.ws-title { font-size: 11px; font-weight: 700; color: #8895ab; }
.ws-h { font-weight: 800; font-size: 15px; text-align: center; margin: 4px 0 8px; font-family: Georgia, serif; }
.worksheet p { margin: 6px 0; }
.cond-box { background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 10px; }
.cond-list { margin: 4px 0 0 20px; }
.cond-list li { list-style: upper-latin; }

/* ---------- 結果 ---------- */
.result-hero { text-align: center; padding: 26px 10px 18px; }
.r-rank { display: inline-flex; align-items: center; justify-content: center; width: 92px; height: 92px; border: 5px solid; border-radius: 50%; font-size: 52px; font-weight: 900; background: #fff; }
.r-score { font-size: 22px; font-weight: 700; margin: 10px 0; color: #55637d; }
.r-score span { font-size: 44px; color: var(--ink); font-weight: 900; }
.r-msg { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; max-width: 520px; margin: 0 auto 16px; text-align: left; font-size: 14px; }
.r-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sec-score-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: 13.5px; margin-bottom: 12px; }
.ss-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ss-h { width: 74px; flex-shrink: 0; font-weight: 700; font-size: 12.5px; }
.ss-bar { flex: 1; height: 12px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.ss-fill { height: 100%; background: linear-gradient(90deg, #6fa0e8, #3d7bd9); border-radius: 999px; }
.ss-n { width: 48px; text-align: right; font-weight: 700; font-size: 12.5px; }

/* ---------- 復習 ---------- */
.sec-head.review { margin-top: 22px; }
.rev-q { border-top: 1px solid #eef1f7; padding: 12px 0 4px; margin-top: 10px; }
.rev-head { font-weight: 800; font-size: 14.5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rev-ans { color: var(--green); font-size: 13px; }
.rev-your { color: #8895ab; font-size: 13px; font-weight: 600; }
.rev-q.ng .rev-your { color: var(--red); }
.script-box { background: #f6f8fc; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 13.5px; font-family: Georgia, serif; }
.script-box.hide { display: none; }
.script-box .line { display: flex; gap: 8px; margin-bottom: 5px; }
.spk { flex-shrink: 0; font-size: 10.5px; font-weight: 700; font-family: sans-serif; border-radius: 4px; padding: 2px 6px; height: fit-content; margin-top: 2px; background: #dde5f0; color: #3c4a63; }
.spk.W, .spk.W2 { background: #fbdfe4; color: #a54; }
.spk.M, .spk.M2 { background: #d8e6fb; color: var(--blue-d); }
.spk.N, .spk.Q { background: #efe7d3; color: #7a6420; }
.expl { display: flex; gap: 8px; align-items: flex-start; background: #f2fbf5; border: 1px solid #cdeeda; border-radius: 10px; padding: 9px 11px; margin-top: 9px; font-size: 13px; }
.tip-line { font-size: 12.5px; color: #b07d18; background: #fff8e8; border-radius: 8px; padding: 6px 10px; margin-top: 7px; }
.hide { display: none; }

/* ---------- 講義・豆知識 ---------- */
.lec-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.lec-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; font-size: 14.5px; cursor: pointer; }
.lec-no { font-size: 11px; background: var(--blue); color: #fff; border-radius: 6px; padding: 2px 8px; flex-shrink: 0; font-weight: 700; }
.lec-em { font-size: 19px; }
.lec-arrow { margin-left: auto; color: #8895ab; font-size: 11px; }
.lec-body { padding: 0 16px 15px; font-size: 13.5px; color: #3c4a63; cursor: auto; }
.lec-body ul, .lec-body ol { margin: 8px 0 8px 20px; }
.lec-body li { margin-bottom: 4px; }
.lec-body p { margin: 6px 0; }
.tsec-h { font-size: 16px; margin: 22px 0 10px; padding-left: 10px; border-left: 5px solid var(--blue); }
.lec-card.qt { border-color: #f0c987; background: #fffdf7; }
.lec-no.qtn { background: #e0762c; }
.sec-tech { margin: 0 0 14px; }
.sectech-btn { width: 100%; text-align: left; background: #fff8e8; border: 1.5px dashed #e0a52c; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; font-weight: 700; color: #8a6410; }
.sectech-body { background: #fffdf7; border: 1.5px solid #f0c987; border-top: none; border-radius: 0 0 12px 12px; padding: 12px 16px; font-size: 13.5px; color: #3c4a63; }
.sectech-body ul, .sectech-body ol { margin: 6px 0 8px 20px; }
.sectech-body li { margin-bottom: 4px; }
.sectech-body p { margin: 8px 0 4px; }
.st-entry { border-bottom: 1px dashed #e8d9b5; padding-bottom: 10px; margin-bottom: 12px; }
.st-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.st-h { font-size: 14.5px; font-weight: 800; color: #8a6410; margin-bottom: 4px; }
.hlink { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #fff, #fdf3f1); border: 2px solid #f0c1bc; border-radius: 14px; padding: 13px 16px; margin: 14px 0; text-decoration: none; color: var(--ink); transition: box-shadow .15s; }
.hlink:hover { box-shadow: 0 4px 14px rgba(226,85,78,.18); }
.hl-ic { font-size: 26px; }
.hl-tx { flex: 1; display: flex; flex-direction: column; }
.hl-tx b { font-size: 14.5px; color: #b13a34; }
.hl-tx small { font-size: 12px; color: #776060; }
.hl-ar { font-size: 18px; font-weight: 800; color: #b13a34; }
.tips-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 18px; }
.tips-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 13px 4px 11px; border: none; border-radius: 16px; background: #fff; color: #44506a; box-shadow: 0 2px 10px rgba(34, 48, 74, .07), inset 0 0 0 1.5px var(--line); transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; }
.tips-tab::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tc); opacity: .85; }
.tips-tab:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(34, 48, 74, .13), inset 0 0 0 1.5px var(--tc); }
.tips-tab .tt-em { font-size: 26px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)); }
.tips-tab .tt-name { font-size: 13.5px; font-weight: 800; letter-spacing: .3px; line-height: 1.25; }
.tips-tab .tt-count { font-size: 10.5px; font-weight: 700; color: #93a0b6; }
.tips-tab.on { background: linear-gradient(150deg, var(--tc), color-mix(in srgb, var(--tc) 65%, #1b2540)); color: #fff; box-shadow: 0 7px 18px color-mix(in srgb, var(--tc) 45%, transparent); transform: translateY(-2px); }
.tips-tab.on::before { background: rgba(255,255,255,.35); }
.tips-tab.on .tt-count { color: rgba(255,255,255,.85); }
.tips-tab.on::after { content: "✓"; position: absolute; top: 7px; right: 8px; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--tc); font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.tips-cat-head { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin: 4px 0 12px; color: #3c4a63; padding: 9px 14px; background: #fff; border-radius: 12px; border-left: 5px solid var(--tc); box-shadow: 0 2px 8px rgba(34, 48, 74, .06); }
.tch-em { font-size: 18px; }
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tip-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; }
.tip-no { display: inline-block; font-size: 10px; font-weight: 800; background: color-mix(in srgb, var(--tc) 12%, #fff); color: var(--tc); border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; letter-spacing: .3px; }
.tip-card b { display: block; font-size: 14px; margin-bottom: 4px; }
.tip-card p { font-size: 12.5px; color: #55637d; }

/* ---------- はらだくんチャット ---------- */
.chat-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg.u { justify-content: flex-end; }
.msg .bubble { max-width: 78%; border-radius: 14px; padding: 10px 13px; font-size: 13.5px; }
.msg.h .bubble { background: #eef3fb; border-top-left-radius: 4px; }
.msg.u .bubble { background: var(--blue); color: #fff; border-top-right-radius: 4px; }
.msg-ava { flex-shrink: 0; }
.chip-row.sug { margin: 10px 0; }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 14px; font-family: inherit; }
.chat-input input:focus { outline: 2px solid var(--blue); border-color: transparent; }

/* ---------- タイトル・ホーム追加要素 ---------- */
.logo-pre { display: block; font-size: 10px; font-weight: 600; opacity: .85; letter-spacing: 1px; line-height: 1; margin-bottom: 2px; }
.hero-pre { font-size: 15px; font-weight: 700; color: #e2554e; letter-spacing: 2px; }
.cta-sub-row { margin-top: 10px; }
.cta-sub { background: #fff; border: 2px solid var(--blue); color: var(--blue-d); font-size: 14px; font-weight: 700; padding: 10px 22px; border-radius: 999px; }
.cta-sub:active { transform: scale(.97); }
.today-card { max-width: 560px; margin: 16px auto 0; background: linear-gradient(135deg, #fffdf4, #fff6e0); border: 2px solid #e8cc86; border-radius: 14px; padding: 12px 16px; text-align: left; cursor: pointer; transition: box-shadow .15s; }
.today-card:hover { box-shadow: 0 4px 14px rgba(224,165,44,.25); }
.td-head { font-size: 12px; font-weight: 800; color: #a2761a; }
.td-no { background: #e0a52c; color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 10.5px; margin-left: 6px; }
.td-en { font-family: Georgia, "Times New Roman", serif; font-size: 15.5px; margin: 6px 0 4px; color: var(--ink); }
.td-hint { font-size: 11px; color: #b08c3c; text-align: right; }

/* ---------- 壁打ち ---------- */
.kabe-cat { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 15px; margin-bottom: 9px; cursor: pointer; transition: box-shadow .15s; }
.kabe-cat:hover { box-shadow: 0 4px 12px rgba(42,92,173,.14); }
.kc-em { font-size: 24px; }
.kc-body { flex: 1; }
.kc-body b { font-size: 14.5px; display: block; }
.kc-body small { font-size: 11.5px; color: #55637d; }
.kc-prog { font-size: 12px; color: #8895ab; white-space: nowrap; }
.kc-prog b { font-size: 17px; color: var(--blue-d); }
.kb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; position: sticky; top: 62px; z-index: 40; }
.kb-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 15px; margin-bottom: 11px; }
.kb-card.kb-done { border-color: #bfe3cd; }
.kb-card.kb-flash { animation: kbflash 1.2s ease 2; }
@keyframes kbflash { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 4px rgba(224,165,44,.45); } }
.kb-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.kb-no { font-weight: 800; font-size: 13px; color: #8895ab; }
.kb-badge { font-size: 11px; font-weight: 700; color: var(--green); background: #eafaf1; border-radius: 999px; padding: 2px 9px; }
.play-btn.small { padding: 7px 15px; font-size: 12.5px; }
.kb-mode { background: #f1f4f9; border: 1.5px solid transparent; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 700; color: #55637d; }
.kb-mode.on { background: #eaf1fc; border-color: var(--blue); color: var(--blue-d); }
.kb-q { font-size: 12.5px; font-weight: 700; color: #55637d; margin: 11px 0 6px; }
.kb-en { font-family: Georgia, "Times New Roman", serif; font-size: 16px; margin-bottom: 8px; line-height: 1.7; }
.kb-blank { display: inline-block; background: #fffbe8; border: 1.7px solid var(--ink); border-radius: 5px; padding: 0 12px; font-weight: 800; font-size: 13px; }
.kb-ta { width: 100%; min-height: 64px; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; font-family: Georgia, serif; resize: vertical; }
.kb-ta:focus { outline: 2px solid var(--blue); border-color: transparent; }
.kb-btn-row { margin-top: 8px; }
.kb-diff { background: #f6f8fc; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-family: Georgia, serif; font-size: 14.5px; line-height: 1.9; }
.kb-score { font-family: sans-serif; font-size: 12.5px; font-weight: 800; color: var(--blue-d); margin-bottom: 4px; }
.dw-ok { color: #21714a; }
.dw-ng { color: var(--red); font-weight: 700; text-decoration: underline wavy; }
.kb-reveal { background: #f2fbf5; border: 1px solid #cdeeda; border-radius: 10px; padding: 11px 13px; margin-top: 10px; }
.kb-result { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.kb-result.ok { color: var(--green); }
.kb-result.ng { color: var(--red); }
.kb-full { font-family: Georgia, "Times New Roman", serif; font-size: 15.5px; line-height: 1.7; }
.kb-kw { color: #b13a34; }
.kb-ja { font-size: 13.5px; color: #3c4a63; margin: 5px 0; }
.kb-point { font-size: 12.5px; color: #21714a; background: #fff; border-radius: 8px; padding: 6px 10px; margin-top: 6px; }

/* ---------- トップに戻るボタン ---------- */
#to-top { position: fixed; right: 16px; bottom: 92px; z-index: 70; width: 50px; height: 50px; border-radius: 50%; border: none; background: linear-gradient(135deg, #3d7bd9, #2a5cad); color: #fff; font-size: 22px; font-weight: 900; box-shadow: 0 5px 16px rgba(42, 92, 173, .45); cursor: pointer; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
#to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#to-top:hover { box-shadow: 0 7px 20px rgba(42, 92, 173, .6); }
#to-top:active { transform: scale(.9); }

@media (max-width: 560px) {
  .feat-grid, .tips-grid { grid-template-columns: 1fr; }
  .tips-tabs { grid-template-columns: repeat(3, 1fr); }
  .fig-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 22px; }
  .grad { font-size: 28px; }
  .tc-r { width: 100%; }
  .tc-r .btn { flex: 1; }
}
