/* ESAT-J 練習ページ 共通スタイル */
:root {
  --green: #2e8b57;
  --green-d: #1f6b42;
  --green-dd: #17543a;
  --green-l: #e8f5ee;
  --green-ll: #f3faf6;
  --ink: #1f2933;
  --sub: #5b6670;
  --line: #dde4e9;
  --line-strong: #c5d0d8;
  --bg: #f5f7f8;
  --card: #ffffff;
  --prep: #2f6fb5;
  --prep-l: #e9f1fb;
  --ans: #c0392b;
  --ans-l: #fdecea;
  --listen: #9a6b00;
  --listen-l: #fff6dc;
  --radius: 16px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  display: flex; flex-direction: column; min-height: 100vh;
}
body > main { flex: 1 0 auto; width: 100%; }
a { color: var(--green-d); }
img { max-width: 100%; height: auto; }
p { margin: 0 0 12px; }
button { font: inherit; }

.ic { width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: -0.2em; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
main.wrap { padding-top: 20px; padding-bottom: 48px; }

/* ===== ヘッダー ===== */
.top { background: var(--green); color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand .ic { width: 1.4em; height: 1.4em; }
.top .spacer { flex: 1; }
.top small { opacity: .9; font-size: .8rem; }
@media (max-width: 520px) { .top small { display: none; } }

/* ===== 見出し ===== */
h1 { font-size: 1.6rem; line-height: 1.4; margin: 4px 0 16px; }
@media (max-width: 520px) { h1 { font-size: 1.35rem; } }
h3 { font-size: 1.05rem; line-height: 1.5; margin: 0 0 8px; }
.lead { color: var(--sub); max-width: 46em; }
.muted { color: var(--sub); font-size: .9rem; }

.sec { display: flex; align-items: center; gap: 12px; margin: 40px 0 16px; }
.sec h2 { font-size: 1.25rem; line-height: 1.4; margin: 0; }
.sec .sec-sub { display: block; font-size: .85rem; color: var(--sub); font-weight: 400; margin-top: 2px; }
.tile {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--green-l); color: var(--green-d);
}
.tile .ic { width: 22px; height: 22px; }
.tile.lg { width: 56px; height: 56px; border-radius: 16px; }
.tile.lg .ic { width: 30px; height: 30px; }

.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  color: var(--sub); text-decoration: none; font-size: .9rem;
}
.back:hover { color: var(--green-d); }

/* ===== カード ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 0 0 16px;
}
@media (max-width: 520px) { .card { padding: 16px; } }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid > .card { margin: 0; display: flex; flex-direction: column; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
.push { margin-top: auto; }

/* ===== ボタン ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1.5px solid transparent; border-radius: var(--radius-s);
  font-weight: 700; font-size: 1rem; line-height: 1.3;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--green); color: #fff;
  transition: background-color .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--green-d); }
.btn:focus-visible, .seg input:focus-visible + span, .choice input:focus-visible + .choice-body, .switch input:focus-visible + .track {
  outline: 3px solid rgba(46, 139, 87, .35); outline-offset: 2px;
}
.btn-secondary { background: #fff; color: var(--green-d); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--green-ll); border-color: var(--green); }
.btn-quiet { background: var(--green-l); color: var(--green-dd); }
.btn-quiet:hover { background: #d7eee1; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .875rem; border-radius: 10px; gap: 6px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn[disabled] { opacity: .45; cursor: default; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .grow { flex: 1 1 auto; }
.actions.nowrap { flex-wrap: nowrap; }
@media (max-width: 520px) {
  .actions.stack { flex-direction: column; }
  .actions.stack .btn { width: 100%; }
}

/* 丸い「聞く」ボタン */
.btn-say {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--green-d); cursor: pointer;
}
.btn-say:hover { background: var(--green-l); border-color: var(--green); }
.btn-say .ic { width: 18px; height: 18px; }

/* ===== 小さなラベル ===== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--green-l); color: var(--green-dd);
  font-size: .82rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.chip .ic { width: 15px; height: 15px; }
.chip.gray { background: #eef1f3; color: var(--sub); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }

/* ===== トップページ ===== */
.hero { padding: 8px 0 4px; }
.hero h1 { margin-bottom: 8px; }
.set-card .set-no { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; color: var(--green-d); font-weight: 700; font-size: .85rem; }
.set-card .who { display: flex; align-items: center; gap: 6px; color: var(--sub); font-size: .9rem; margin: 4px 0 16px; }
.set-card .who .ic { width: 16px; height: 16px; }
.label-s { font-size: .8rem; font-weight: 700; color: var(--sub); margin: 16px 0 8px; }
.part-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.part-grid .btn { justify-content: flex-start; padding: 0 12px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.link-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.drill-card .meta { color: var(--sub); font-size: .88rem; margin: 2px 0 0; }
.drill-card p { font-size: .92rem; }

.format-list { display: grid; gap: 10px; }
.format-row {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start;
  padding: 14px; border-radius: var(--radius-s); background: var(--green-ll);
}
.format-row .tile { width: 44px; height: 44px; }
.format-row b { display: block; }
.format-row .desc { font-size: .92rem; color: var(--sub); }
@media (min-width: 760px) {
  .format-row { grid-template-columns: 44px 1fr auto; align-items: center; }
  .format-row .chips { margin: 0; justify-content: flex-end; }
}

.bullets { margin: 0; padding-left: 1.2em; }
.bullets li { margin: 4px 0; }
.note-s { color: var(--sub); font-size: .85rem; margin-top: 32px; }

/* ===== 練習画面 ===== */
.stage { min-height: 50vh; }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.progress { height: 6px; border-radius: 3px; background: #e3e8ec; overflow: hidden; margin: 10px 0 16px; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.situation {
  background: var(--green-l); border-radius: var(--radius-s);
  padding: 14px 16px; margin: 0 0 16px;
}
.task-ja { font-size: 1.2rem; font-weight: 700; line-height: 1.6; }
.read-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem; line-height: 1.9;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin: 0 0 16px;
}
@media (max-width: 520px) { .read-text { font-size: 1.18rem; padding: 16px; } }

/* タイマー */
.timer {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--radius-s); padding: 12px 16px; margin: 0 0 12px;
  background: #eef1f3; min-height: 60px;
}
.timer .label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.timer .bar { flex: 1; height: 10px; background: rgba(0,0,0,.08); border-radius: 5px; overflow: hidden; min-width: 60px; }
.timer .bar i { display: block; height: 100%; width: 100%; background: var(--sub); transform-origin: left; border-radius: 5px; }
.timer .secs { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.5rem; min-width: 3.4em; text-align: right; }
.timer.prep { background: var(--prep-l); }
.timer.prep .bar i { background: var(--prep); }
.timer.prep .label, .timer.prep .secs { color: var(--prep); }
.timer.ans { background: var(--ans-l); }
.timer.ans .bar i { background: var(--ans); }
.timer.ans .label, .timer.ans .secs { color: var(--ans); }
.timer.listen { background: var(--listen-l); color: var(--listen); }
.timer.done { color: var(--sub); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ans); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 520px) { .timer .secs { font-size: 1.25rem; } .timer { gap: 10px; padding: 10px 12px; } }

.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.reveal { font-family: Georgia, serif; font-size: 1.1rem; line-height: 1.7; }
.reveal-box { background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); padding: 12px 14px; margin: 0 0 12px; }

/* 操作バー（スマホ：画面下に固定／PC：問題のすぐ下） */
.dock-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dock .btn { padding: 0 10px; font-size: .92rem; }
@media (max-width: 639px) {
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: rgba(255,255,255,.97); backdrop-filter: blur(6px);
    border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(16,24,40,.06);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  .stage { padding-bottom: 84px; }
}
@media (min-width: 640px) {
  .dock { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
  .dock-inner { display: flex; justify-content: flex-end; }
  .dock .btn { padding: 0 18px; font-size: .95rem; }
}

/* 画像とフォールバック */
.pic { margin: 0 0 16px; text-align: center; }
.pic img { border-radius: var(--radius-s); border: 1px solid var(--line); max-height: 52vh; background: #fff; }
.info-card {
  display: inline-block; text-align: left; max-width: 100%;
  background: #fffdf5; border: 2px solid #e3b341; border-radius: var(--radius);
  padding: 16px 18px;
  font-family: "Trebuchet MS", Arial, sans-serif;
}
.info-card .ttl { font-size: 1.35rem; font-weight: 700; color: #8a5a00; text-align: center; line-height: 1.3; }
.info-card .sub { text-align: center; color: #6b5a2f; margin: 4px 0 10px; }
.info-card table { border-collapse: collapse; width: 100%; }
.info-card th, .info-card td { padding: 7px 10px; border-bottom: 1px dashed #e3cf8f; text-align: left; vertical-align: top; }
.info-card th { color: #8a5a00; font-size: .82rem; }
.info-card .note { text-align: center; margin-top: 10px; font-weight: 700; color: #b0451f; }
@media (max-width: 520px) { .info-card { padding: 12px; font-size: .9rem; } .info-card th, .info-card td { padding: 6px; } }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.panel {
  border: 2px solid var(--ink); border-radius: 10px; background: #fff;
  padding: 10px 12px; min-height: 112px; font-size: .92rem; line-height: 1.6;
}
.panel b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: 6px; vertical-align: 1px;
  border-radius: 50%; background: var(--ink); color: #fff; font-size: .78rem;
}
@media (max-width: 420px) { .panel { font-size: .85rem; padding: 8px; min-height: 120px; } }
.fallback-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .8rem; color: var(--sub); margin-top: 8px; }
.fallback-note .ic { width: 14px; height: 14px; }

.partner { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.partner img, .partner .avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--green-l);
}
.partner .avatar { display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: var(--green-d); }
.partner .who { font-weight: 700; line-height: 1.4; }
.partner .muted { line-height: 1.4; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 16px; }
.opt {
  background: #fff; border: 1.5px solid var(--green); border-radius: var(--radius-s);
  padding: 10px 12px; text-align: center; display: flex; flex-direction: column; justify-content: center;
}
.opt .en { font-weight: 700; line-height: 1.4; }
.opt .ja { font-size: .8rem; color: var(--sub); line-height: 1.4; margin-top: 2px; }
.opt-own { border-style: dashed; border-color: var(--line-strong); }

/* スタート画面 */
.field { margin: 0 0 20px; }
.field-label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.field-label .ic { color: var(--green-d); }
.choices { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
  height: 100%; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); background: #fff;
}
.choice-body .tile { background: #eef1f3; color: var(--sub); }
.choice-body b { display: block; line-height: 1.5; color: var(--ink); font-size: 1rem; }
.choice-body span { font-size: .88rem; color: var(--sub); line-height: 1.6; }
.choice input:checked + .choice-body { border-color: var(--green); background: var(--green-ll); box-shadow: 0 0 0 1px var(--green) inset; }
.choice input:checked + .choice-body .tile { background: var(--green); color: #fff; }

.seg { display: inline-flex; flex-wrap: wrap; background: #eef1f3; border-radius: var(--radius-s); padding: 4px; gap: 4px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 16px; border-radius: 9px; font-weight: 700; font-size: .92rem; color: var(--sub);
}
.seg input:checked + span { background: #fff; color: var(--green-dd); box-shadow: var(--shadow); }
.seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 9px; font-weight: 700; font-size: .92rem; color: var(--sub); text-decoration: none; }
.seg a.on { background: #fff; color: var(--green-dd); box-shadow: var(--shadow); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 48px; height: 28px; border-radius: 14px; background: var(--line-strong); flex-shrink: 0; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch .txt { line-height: 1.5; }
.switch .txt small { display: block; color: var(--sub); font-size: .82rem; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--listen-l); border-radius: var(--radius-s);
  padding: 12px 14px; font-size: .9rem; line-height: 1.7;
}
.notice > .ic { color: var(--listen); margin-top: 3px; }
.notice ul { margin: 0; padding-left: 1.1em; }

.intro { text-align: center; padding: 32px 20px; }
.intro .tile { margin: 0 auto 12px; }
.intro h2 { font-size: 1.4rem; margin: 0 0 8px; }
.intro p { max-width: 34em; margin: 0 auto 12px; }
.intro .chips { justify-content: center; margin-bottom: 20px; }
@media (max-width: 520px) { .intro .btn { width: 100%; } }

/* 振り返り */
.summary { display: grid; gap: 8px; }
.meter { height: 10px; border-radius: 5px; background: #e3e8ec; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 5px; transition: width .2s; }
.score { font-weight: 700; color: var(--green-d); }
.blk { margin-top: 16px; }
.blk-title { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.blk-title .ic { width: 16px; height: 16px; color: var(--green-d); }
.ex { display: flex; align-items: flex-start; gap: 10px; background: var(--green-ll); border-radius: var(--radius-s); padding: 10px 12px; margin: 0 0 8px; }
.ex .ex-text { flex: 1; font-family: Georgia, serif; font-size: 1.05rem; line-height: 1.7; }
.ex .ex-no { display: block; font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif; font-size: .78rem; color: var(--sub); font-weight: 700; }
.points { margin: 0; padding-left: 1.2em; }
.points li { margin: 3px 0; }
.checks { display: grid; gap: 6px; }
@media (min-width: 900px) { .checks { grid-template-columns: 1fr 1fr; } }
.check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; line-height: 1.5;
}
.check input { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; margin: 0; }
.check:has(input:checked) { background: var(--green-ll); border-color: #b8dcc4; }
audio { width: 100%; max-width: 460px; display: block; }
.chunked { font-family: Georgia, serif; font-size: 1.08rem; line-height: 1.9; margin: 0 0 8px; }
.chunked .sl { color: var(--ans); font-weight: 700; padding: 0 2px; }

/* 印刷ページ */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.toolbar .spacer { flex: 1; }
@media (max-width: 640px) {
  .toolbar .seg { display: flex; width: 100%; }
  .toolbar .seg a { flex: 1; justify-content: center; padding: 0 8px; }
  .toolbar .spacer { display: none; }
  .toolbar .btn { flex: 1; }
}
.script { background: var(--listen-l); border-radius: var(--radius-s); padding: 12px 14px; margin: 0 0 12px; }
.script .blk-title { color: var(--listen); }
.script .blk-title .ic { color: var(--listen); }
.lines div { border-bottom: 1px solid #bbb; height: 2.1em; }
.q-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.no-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px;
  background: var(--green); color: #fff; font-weight: 700; font-size: .85rem;
}

/* ===== パート別ドリル：問題一覧 ===== */
.drill-head { display: flex; align-items: center; gap: 14px; }
.drill-head h1 { margin: 0 0 6px; }
@media (max-width: 520px) { .drill-head { align-items: flex-start; } .drill-head .tile.lg { width: 48px; height: 48px; } }
.item-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .item-list { grid-template-columns: 1fr 1fr; } }
.card.item { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, background-color .15s; }
.card.item.on { border-color: var(--green); background: var(--green-ll); box-shadow: 0 0 0 1px var(--green) inset; }
.item-top { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }
.item-top input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--green); cursor: pointer; }
.item-title { flex: 1; font-weight: 700; line-height: 1.5; }
.item-pv {
  margin: 0; color: var(--sub); font-size: .88rem; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-act { display: flex; justify-content: flex-end; margin-top: auto; }
.chip.done { background: var(--green); color: #fff; padding: 2px 10px; font-size: .75rem; }
.chip.done .ic { width: 13px; height: 13px; }

.selbar {
  position: sticky; bottom: 0; z-index: 10; margin: 20px -16px 0;
  background: rgba(255,255,255,.97); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(16,24,40,.06);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.selbar-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-info { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; font-size: .92rem; white-space: nowrap; }
.sel-info b { font-size: 1.2rem; color: var(--green-d); }
.sel-act { display: flex; gap: 8px; flex: 1 1 auto; justify-content: flex-end; }
.sel-act .btn:last-child { flex: 1 1 auto; max-width: 320px; }
.linkbtn { background: none; border: 0; padding: 6px 4px; color: var(--green-d); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: .9rem; }
.btn.is-off { background: #c9d3d9; cursor: default; }
@media (max-width: 520px) {
  .selbar-in { gap: 8px; }
  .sel-info { flex-basis: 100%; justify-content: space-between; }
  .sel-act .btn:last-child { max-width: none; }
}
@media (min-width: 768px) {
  .selbar { margin: 20px 0 0; bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16,24,40,.12); padding: 12px 16px; }
}

/* トップ：ドリルの進み具合 */
.progress-s { display: grid; gap: 4px; margin: 0 0 14px; font-size: .82rem; color: var(--sub); }
.progress-s .meter { height: 6px; }

/* ===== 印刷 ===== */
@media print {
  body { display: block; background: #fff; font-size: 10.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .noprint, .top, .dock { display: none !important; }
  main.wrap { max-width: none; width: auto; padding: 0 1px; }
  .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; padding: 12px 14px; }
  .sec { margin: 18px 0 10px; break-after: avoid; }
  .sec + .muted { break-after: avoid; }
  .pagebreak { break-before: page; }
  .pic img { max-height: 90mm; }
  a { color: inherit; text-decoration: none; }
}
