/* ===== Luyện đề TOPIK II — giao diện xanh ngọc + hồng (đồng bộ với Sổ tay 쓰기 54) ===== */
:root {
  /* Màu chủ đạo "biển hồng" (xanh biển + hồng phấn). Học sinh đổi được 7 màu ở thanh trên; xem theme.css */
  --bg-a: #eaf4f8; --bg-b: #fdeff4;
  --surface: #ffffff; --surface-2: #f4f9fb;
  --ink: #2c4254; --muted: #62798c; --line: #d7e6ee;
  --teal: #3f87a8; --teal-ink: #ffffff; --teal-soft: #dcedf5; --teal-deep: #2d6683;
  --pink: #ec80a2; --pink-soft: #fde3eb; --pink-ink: #c05878;
  --ok: #2e8b4e; --ok-soft: #e3f3e8; --bad: #d14343; --bad-soft: #fde8e8; --warn: #b7791f; --warn-soft: #fdf3dc;
  --paper: #ffffff; --paper-ink: #111111; --omr-pink: #e6007e; --omr-cell: #ecebe7;
  --lv1: #4caf8e; --lv2: #3d8fb8; --lv3: #d9822b; --lv4: #c2405e;
  --panel: #cfe6ef; --tile: #e2f0f6; --glow: #eef7fb; --hl: #7fb3cc; --acc2: #f4b8c9; --head: #2f6e8c;
  --f-ui: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --f-kr: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --f-krs: "Noto Serif KR", "AppleMyungjo", "Batang", serif;
  --f-disp: "Playfair Display", "Noto Serif KR", Georgia, serif;
  --r: 14px; --top-h: 60px;
  /* tên cũ (trang giáo viên dùng) */
  --line-soft: var(--line); --gray-cell: var(--surface-2); --radius: var(--r); --accent: var(--teal); --accent-soft: var(--teal-soft);
  /* biểu đồ & tranh vẽ lại */
  --chart-bg: #ffffff; --chart-ink: #2b3440; --chart-muted: #6b7280; --chart-grid: #d9dde3;
  --c1: #2f5d8a; --c2: #5b8fc0; --c3: #8db6dc; --c4: #1f3f60; --c5: #bcd5ec; --c6: #9aa5b1;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--f-ui); color: var(--ink); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background: var(--bg-a); min-height: 100vh; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select { font: inherit; color: inherit; }
a { color: var(--teal); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 16px; }
main.wrap { padding-block: 4px 56px; }
h1 { font-size: 26px; margin: 22px 0 4px; text-wrap: balance; }
h2 { font-size: 18px; margin: 0; }
.lead { color: var(--muted); margin: 0 0 14px; }
.muted, .note { color: var(--muted); }
.note { font-size: 13px; }
.empty { color: var(--muted); padding: 28px; text-align: center; }
[hidden] { display: none !important; }

/* ---------- thanh trên + điều hướng ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 14px; min-height: var(--top-h); }
.brand { display: flex; align-items: baseline; gap: 7px; font-weight: 800; font-size: 18px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand .kr { font-family: var(--f-kr); color: var(--teal); }
.nav { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.nav a.on { background: var(--teal); color: var(--teal-ink); }
.nav a:not(.on):hover { color: var(--ink); }
.nav .sh { display: none; }
.who { margin-left: auto; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 6px; border-radius: 8px; text-align: right; }
.who:hover { background: var(--surface-2); }

/* ---------- nút, chip, thẻ ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 14px; text-decoration: none; }
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 500; }
.chip.on { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.lvtag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; color: #fff; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 80; }
.modal-bg { position: fixed; inset: 0; background: rgba(20,35,40,.45); display: flex; align-items: center; justify-content: center; z-index: 70; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; padding: 22px; max-width: 460px; width: 100%; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 8px; font-size: 19px; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---------- TRANG CỦA EM ---------- */
.home-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 14px; }
.home-grid > * { min-width: 0; }
.home-grid .full { grid-column: 1 / -1; }
.welcome { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.continue { display: flex; gap: 16px; align-items: center; background: linear-gradient(120deg, var(--teal) 0%, var(--teal-deep) 140%); color: var(--teal-ink); border: 0; }
.continue .sub { font-size: 13px; opacity: .88; }
.continue h2 { font-size: 20px; }
.continue .btn { margin-left: auto; background: var(--surface); color: var(--teal); border: 0; white-space: nowrap; }
.continue.idle { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.continue.idle .btn { background: var(--teal); color: var(--teal-ink); }
.ring { width: 64px; height: 64px; flex: 0 0 auto; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }
.spark { grid-column: 1 / -1; width: 100%; height: 46px; }
.chips-w { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; align-items: center; }
.wk { display: grid; grid-template-columns: 1fr 48px; gap: 4px 10px; align-items: center; margin-top: 10px; font-size: 13.5px; }
.wk .tr { grid-column: 1 / -1; height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.wk .tr i { display: block; height: 100%; border-radius: 4px; }
.wk b { text-align: right; font-variant-numeric: tabular-nums; }
.next { display: flex; align-items: center; gap: 14px; }
.tno { font-family: var(--f-kr); font-weight: 800; font-size: 22px; width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist td, .hist th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hist th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.hist-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.icon-del { width: 30px; height: 30px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.icon-del:hover { border-color: #f2b8b8; background: var(--bad-soft); color: var(--bad); }

/* ---------- THƯ VIỆN ĐỀ ---------- */
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 6px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.search { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; width: 170px; min-width: 0; }
.level { margin-top: 18px; }
.level-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.level-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.level-head small { color: var(--muted); }
.meter { display: inline-flex; gap: 2px; }
.meter i { width: 6px; height: 12px; border-radius: 2px; background: var(--line); }
.tests { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.test { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.test:hover { border-color: var(--teal); }
.test .tno { grid-row: span 2; }
.test .t { font-weight: 700; }
.test.is-done .tno { background: var(--ok-soft); color: var(--ok); }
.secs { display: flex; gap: 6px; flex-wrap: wrap; }
.sec { font-size: 12.5px; border-radius: 6px; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.sec.done { background: var(--ok-soft); border-color: transparent; color: var(--ok); font-weight: 600; }
.sec.doing { background: var(--warn-soft); border-color: transparent; color: var(--warn); font-weight: 600; }
.sec-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.sec-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- LÀM BÀI ---------- */
.exam-bar { position: sticky; top: var(--top-h); z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px;
  margin: 0 -16px; background: color-mix(in srgb, var(--bg-a) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.exam-bar h1 { margin: 0; font-size: 20px; }
.timer { font-family: ui-monospace, Menlo, monospace; font-size: 20px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px 11px; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); border-color: var(--bad); }
.exam-bar audio { height: 36px; max-width: 320px; flex: 1 1 220px; }
.toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.toggle button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.toggle button[aria-pressed="true"] { background: var(--teal-soft); color: var(--teal-deep); }
.exam-bar .grow { flex: 1; }
.exam-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; margin-top: 14px; align-items: start; }
.qpaper { background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 26px 30px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(31,45,51,.08); min-width: 0; }
.qpaper .pins { font-family: var(--f-kr); font-weight: 700; font-size: 15px; margin: 22px 0 12px; }
.qpaper .pins:first-child { margin-top: 0; }
.qpaper .ppass { font-family: var(--f-krs); font-size: 16.5px; line-height: 1.9; word-break: keep-all; white-space: pre-wrap; border: 1px solid #ddd; border-radius: 8px; padding: 12px 16px; margin: 0 0 14px; }
.qpaper .ppass.frame { text-align: center; }
.pq { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px; margin-bottom: 20px; scroll-margin-top: 140px; }
.pq .n { font-family: var(--f-kr); font-weight: 800; font-size: 17px; line-height: 1.9; }
.pq .qt { font-family: var(--f-kr); font-weight: 500; font-size: 15.5px; line-height: 1.8; margin-bottom: 4px; }
.pq .ptxt { font-family: var(--f-krs); font-size: 16.5px; line-height: 1.9; word-break: keep-all; white-space: pre-wrap; }
.popts { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 16px; margin-top: 6px; }
.popts.long { grid-template-columns: 1fr; }
.popt { text-align: left; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 5px 9px; font-family: var(--f-krs); font-size: 15.5px; color: var(--paper-ink); line-height: 1.6; }
.popt:hover { background: #eef6f6; }
.popt.sel { background: #e1f0f0; border-color: #2b7a80; }
.pimgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pimg { position: relative; border: 2px solid #e2e2e2; border-radius: 8px; padding: 26px 4px 4px; background: #fff; }
.pimg.sel { border-color: #2b7a80; box-shadow: 0 0 0 3px #e1f0f0; }
.pimg b { position: absolute; top: 4px; left: 9px; font-family: var(--f-kr); }
/* phiếu trả lời thu nhỏ */
.mini-omr { background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 18px 14px 14px; position: sticky; top: calc(var(--top-h) + 70px); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(31,45,51,.08); }
.mini-omr::before { content: ""; position: absolute; left: 14px; right: 14px; top: 7px; height: 6px; background: repeating-linear-gradient(90deg, var(--omr-pink) 0 6px, transparent 6px 18px); }
.mini-omr h3 { font-family: var(--f-kr); font-size: 13px; margin: 6px 0 10px; display: flex; justify-content: space-between; }
.mo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mo-col { border: 1.5px solid #333; border-radius: 6px; overflow: hidden; }
.mo-row { display: grid; grid-template-columns: 30px 1fr; height: 26px; border-top: 1px solid #ddd; cursor: pointer; }
.mo-row:nth-child(5n+1) { border-top: 1.5px solid #333; }
.mo-row:first-child { border-top: 0; }
.mo-row .mo-n { background: var(--omr-cell); display: grid; place-items: center; font-family: var(--f-kr); font-weight: 700; font-size: 12px; border-right: 1px solid #333; }
.mo-row.cur .mo-n { background: #ffe58f; }
.mo-row .bubs { display: flex; justify-content: space-around; align-items: center; }
.mo-row .bub { width: 15px; height: 21px; font-size: 8.5px; }
.mini-omr .prog { font-size: 12.5px; color: #555; margin-top: 10px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.omr-drawer-btn { display: none; }

/* phiếu OMR đầy đủ (chế độ đề giấy + trang kết quả) */
.omr { background: var(--paper); color: var(--paper-ink); border-radius: 4px; padding: 26px 22px 22px; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 24px rgba(31,45,51,.07); font-family: var(--f-kr); }
.omr::before { content: ""; position: absolute; top: 8px; height: 8px; left: 22px; right: 22px; background: repeating-linear-gradient(90deg, var(--omr-pink) 0 7px, transparent 7px 22px); }
@media (min-width: 761px) { .omr-fit .omr { zoom: .7; max-width: 1150px; margin-inline: auto; } }
.omr-head { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.omr-grid { display: grid; grid-template-columns: 250px 1fr; gap: 22px; }
.omr-left { display: flex; flex-direction: column; gap: 10px; }
.omr-title { text-align: center; }
.omr-title .t1 { font-size: 19px; font-weight: 800; } .omr-title .t2 { font-size: 18px; font-weight: 800; }
.omr-title .t3 { font-size: 15px; font-weight: 700; margin-top: 2px; } .omr-title .t3 b { font-size: 28px; margin-right: 4px; }
.omr-box { border: 1.5px solid #3a3a3c; border-radius: 8px; overflow: hidden; }
.omr-name { display: grid; grid-template-columns: 34px 1fr; }
.omr-name .side-lab { font-size: 11px; border-right: 1px solid #3a3a3c; display: flex; align-items: center; justify-content: center; line-height: 1.2; text-align: center; }
.omr-name .rows > div { display: grid; grid-template-columns: 62px 1fr; min-height: 36px; }
.omr-name .rows > div + div { border-top: 1px solid #3a3a3c; }
.omr-box .lab { font-size: 11px; line-height: 1.2; display: flex; align-items: center; justify-content: center; text-align: center; border-right: 1px solid #3a3a3c; padding: 3px; }
.omr-box .val { display: flex; align-items: center; padding: 0 8px; font-size: 15px; font-weight: 600; }
.omr-small { font-size: 11px; text-align: center; padding: 6px; line-height: 1.4; }
.omr-small .lbl { font-size: 13px; font-weight: 700; border-bottom: 1px solid #3a3a3c; padding-bottom: 4px; margin-bottom: 4px; }
.type-row { display: flex; justify-content: space-between; padding: 0 16px; }
.omr-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.col { border: 1.5px solid #3a3a3c; border-radius: 8px; overflow: hidden; }
.col-head { display: grid; grid-template-columns: 44px 1fr; background: var(--omr-cell); border-bottom: 1px solid #3a3a3c; font-size: 14px; font-weight: 700; height: 32px; }
.col-head > div { display: flex; align-items: center; justify-content: center; }
.col-head > div:first-child { border-right: 1px solid #3a3a3c; }
.col-head .dl { justify-content: space-around; padding: 0 20px; }
.block + .block { border-top: 1px solid #3a3a3c; }
.q-row { display: grid; grid-template-columns: 44px 1fr; height: 37px; }
.q-row .num { background: var(--omr-cell); border-right: 1px solid #3a3a3c; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.q-row .bubbles { display: flex; align-items: center; justify-content: space-around; padding: 0 6px; }
.bub { width: 19px; height: 27px; border-radius: 50%; border: 1.2px solid #8a8a8f; background: #fff; color: #555; font-size: 10.5px; display: flex; align-items: center; justify-content: center; padding: 0; font-family: var(--f-kr); }
.bub:hover { border-color: #111; color: #111; }
.bub.on { background: #111; border-color: #111; color: #111; }
.omr.review .bub { cursor: default; }
.omr.review .bub.on.wrong { background: var(--bad); border-color: var(--bad); color: var(--bad); }
.omr.review .bub.key { box-shadow: 0 0 0 2.5px var(--ok); }
.omr.review .bub.on.right { background: var(--ok); border-color: var(--ok); color: var(--ok); }
.omr.review .q-row { cursor: pointer; }
.paper-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; align-items: center; }

/* ---------- KẾT QUẢ / XEM LẠI ---------- */
.score-head { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.score-big { font-size: 54px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score-big small { font-size: 20px; color: var(--muted); font-weight: 600; }
.score-head .stat { font-size: 14px; color: var(--muted); } .score-head .stat b { color: var(--ink); font-size: 18px; display: inline; }
.score-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.sec-title { margin: 26px 0 8px; }
.rnav { position: sticky; top: 0; z-index: 15; background: color-mix(in srgb, var(--bg-a) 92%, transparent); backdrop-filter: blur(8px);
  margin: 0 -16px 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.rnav .filters { margin-bottom: 8px; }
.rnav .back { flex: 0 0 auto; }
.qnav { display: flex; flex-wrap: wrap; gap: 5px; }
.qnav a { width: 34px; height: 30px; display: grid; place-items: center; border-radius: 7px; font-size: 13px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.qnav a.ok { background: var(--ok-soft); color: var(--ok); } .qnav a.bad { background: var(--bad-soft); color: var(--bad); } .qnav a.blank { background: var(--warn-soft); color: var(--warn); }
.qnav a.cur { outline: 2.5px solid var(--ink); outline-offset: 1px; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 14px; scroll-margin-top: 140px; min-width: 0; }
.qcard.bad { box-shadow: inset 4px 0 0 var(--bad); } .qcard.ok { box-shadow: inset 4px 0 0 var(--ok); } .qcard.blank { box-shadow: inset 4px 0 0 var(--warn); }
.qtop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.qtop .qn { font-family: var(--f-kr); font-weight: 800; font-size: 22px; }
.qtop .spacer { flex: 1; }
.tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.bad { background: var(--bad-soft); color: var(--bad); } .tag.blank { background: var(--warn-soft); color: var(--warn); }
.tag.key { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.type { background: var(--teal-soft); color: var(--teal-deep); }
.instr { font-family: var(--f-kr); font-weight: 700; font-size: 15px; margin: 0 0 8px; }
.instr .ko { font-family: var(--f-kr); font-size: 15px; font-weight: 700; line-height: 1.6; white-space: normal; }
.ko { font-family: var(--f-krs); font-size: 17px; line-height: 1.9; white-space: pre-wrap; word-break: keep-all; }
.ko u { text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.script-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 10px; }
.passage { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 8px 0; background: var(--surface-2); }
.vi { font-family: var(--f-ui); font-size: 14.5px; color: var(--teal-deep); background: var(--teal-soft); border-radius: 8px; padding: 9px 12px; margin-top: 8px; white-space: pre-wrap; line-height: 1.6; }
.sent { cursor: pointer; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.sent:hover { background: var(--teal-soft); }
.sent.on { background: color-mix(in srgb, var(--teal) 22%, transparent); }
.vi-inline { display: block; margin: 4px 0 8px; padding: 7px 12px; border-radius: 8px; background: var(--teal-soft); color: var(--teal-deep);
  font-family: var(--f-ui); font-size: 14.5px; font-weight: 600; line-height: 1.5; white-space: normal; cursor: default; text-align: left; }
/* từ vựng: chữ hồng trên nền hồng nhạt, không in đậm */
.w { color: var(--pink-ink); background: var(--pink-soft); border-radius: 4px; padding: 1px 1px; cursor: help; }
.tip { position: fixed; z-index: 60; max-width: 290px; background: #1f2d33; color: #fff; font-size: 14px; padding: 9px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); line-height: 1.45; }
.tip b { font-family: var(--f-kr); color: #ffc2d4; font-weight: 600; }
.tip-save { display: block; width: 100%; margin-top: 7px; border: 0; border-radius: 7px; padding: 6px; font-size: 13px; font-weight: 700; background: #ffc2d4; color: #1f2d33; }
.tip-save.done { background: #5cc27e; color: #0f2a19; }
.replay { display: flex; align-items: center; gap: 12px; background: var(--teal-soft); border-radius: 12px; padding: 10px 14px; margin: 8px 0 10px; }
.play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--teal); color: var(--teal-ink); display: grid; place-items: center; flex: 0 0 auto; }
.replay .bar { height: 10px; cursor: pointer; background: color-mix(in srgb, var(--teal) 25%, transparent); border-radius: 5px; position: relative; margin-top: 4px; overflow: hidden; }
.replay .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--teal); border-radius: 5px; pointer-events: none; }
.replay .speed { appearance: none; -webkit-appearance: none;  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231d5c61' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 6px center / 7px; border: 1px solid var(--teal); color: var(--teal-deep); border-radius: 999px; padding: 0 18px 0 8px; width: 54px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; cursor: pointer; height: 22px; }
.replay small { color: var(--teal-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.opts li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; align-items: start; }
.opts li .ci { font-family: var(--f-kr); font-weight: 700; }
.opts li .ko { font-size: 16px; line-height: 1.6; }
.opts li .vi { grid-column: 2 / 4; margin-top: 2px; padding: 4px 10px; font-size: 14px; }
.opts li.key { border-color: var(--ok); background: var(--ok-soft); }
.opts li.picked { border-color: var(--bad); background: var(--bad-soft); }
.opts li .mk { font-size: 12px; font-weight: 700; }
.opts li.key .mk { color: var(--ok); } .opts li.picked .mk { color: var(--bad); }
.opt-imgs { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 8px; margin-top: 10px; }
.opt-imgs figure { margin: 0; border: 2px solid var(--line); border-radius: 10px; padding: 26px 4px 4px; position: relative; background: #fff; }
.opt-imgs figure.key { border-color: var(--ok); } .opt-imgs figure.picked { border-color: var(--bad); }
.opt-imgs figcaption { position: absolute; top: 4px; left: 9px; font-family: var(--f-kr); font-weight: 800; }
.chart, .illus { display: block; width: 100%; height: auto; font-family: var(--f-kr); border-radius: 6px; }
.qchart { margin: 8px 0; max-width: 640px; }
.explain { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 15px; }
.explain b { color: var(--ok); }
.vocab { margin-top: 12px; }
.vocab h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.vocab ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vocab li { background: var(--pink-soft); border-radius: 7px; padding: 3px 9px; font-size: 14px; }
.vocab li b { font-family: var(--f-kr); color: var(--pink-ink); font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* khung quảng cáo / thông báo (đọc câu 5–9) */
.frame { position: relative; text-align: center; padding: 22px 26px; margin: 10px 0; background: #fff; }
.frame > .ko { font-family: var(--f-kr); font-size: 18px; line-height: 1.75; font-weight: 500; }
.frame > .vi, .frame .vi-inline { text-align: left; }
.frame-banner { border: 3px double #9aa5b1; border-radius: 10px; background: linear-gradient(180deg, #fff, #f6f8fb); }
.frame-banner::before, .frame-banner::after { content: "✿"; position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; color: #c9d3de; }
.frame-banner::before { left: 14px; } .frame-banner::after { right: 14px; }
.frame-soft { border: 0; border-radius: 16px; background: radial-gradient(circle at 12% 30%, #eef2f7 0 18%, transparent 19%), radial-gradient(circle at 90% 70%, #eef2f7 0 16%, transparent 17%), #f8f9fb; box-shadow: inset 0 0 0 1.5px #d6dbe2; }
.frame-check { border: 12px solid transparent; border-radius: 4px; background: linear-gradient(#fff, #fff) padding-box, repeating-linear-gradient(45deg, #c9d1db 0 6px, #eef1f5 6px 12px) border-box; }
.frame-dashed { border: 2px dashed #9aa5b1; border-radius: 6px; }
.frame-dashed::before, .frame-dashed::after { position: absolute; font-size: 42px; line-height: 1; color: #6b7280; font-family: Georgia, serif; }
.frame-dashed::before { content: "\201C"; left: 10px; top: 4px; } .frame-dashed::after { content: "\201D"; right: 10px; bottom: -8px; }
.frame-notice { border: 1.5px solid #9aa5b1; border-radius: 12px; }
.frame-notice > .ko { font-size: 16px; font-weight: 400; }
.frame-notice > .ko > .sent:first-child, .ppass.frame-notice .ttl { display: inline-block; font-size: 20px; font-weight: 700; margin-bottom: 6px; }

/* ---------- ÔN TỪ VỰNG ---------- */
.study-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.study-card { display: flex; flex-direction: column; gap: 8px; }
.study-card .row { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.sc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-stat b { font-size: 26px; font-variant-numeric: tabular-nums; }
.pbar { height: 7px; border-radius: 4px; background: var(--surface-2); display: flex; overflow: hidden; }
.pbar .p-sure { background: var(--ok); } .pbar .p-lrn { background: var(--warn); }
.vtable { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14.5px; }
.vtable th, .vtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.vtable th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.vtable td.k { font-family: var(--f-kr); font-weight: 600; color: var(--pink-ink); white-space: nowrap; }
.vtable td.q { color: var(--muted); font-size: 13px; }
.vtable .exs { font-family: var(--f-krs); font-size: 14.5px; line-height: 1.7; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.study-wrap { max-width: 680px; padding-top: 22px; }
.fc-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.fc-title { display: inline-flex; align-items: center; gap: 12px; }
.back-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.back-btn:hover { border-color: var(--teal); }
.fc-prog { height: 6px; background: var(--surface); border-radius: 3px; margin: 10px 0 16px; overflow: hidden; }
.fc-prog span { display: block; height: 100%; background: var(--teal); transition: width .2s; }
.fc { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 28px 22px; }
.fc > * { max-width: 100%; }
.fc-word { font-family: var(--f-kr); font-size: 40px; font-weight: 700; color: var(--teal-deep); }
.fc-ex, .cz-sent { font-family: var(--f-krs); font-size: 18px; line-height: 1.8; word-break: keep-all; width: 100%; overflow-wrap: anywhere; }
.fc-ex mark, .cz-sent mark { background: var(--pink-soft); color: var(--pink-ink); border-radius: 4px; padding: 0 3px; }
.fc-src { font-size: 12px; color: var(--muted); }
.fc-hint { font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; width: 100%; }
.fc-back { border-top: 1px dashed var(--line); padding-top: 14px; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.fc-mean { font-size: 24px; font-weight: 800; color: var(--ok); }
.fc-btns { display: flex; gap: 10px; margin-top: 14px; }
.fc-btns .btn { flex: 1; padding: 14px; font-size: 17px; }
.fc-btns small { font-weight: 400; opacity: .7; font-size: 12px; }
.fc-no { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.fc-yes { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.fc-end { text-align: center; padding: 34px 22px; }
.fc-end .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.vocab-list { list-style: none; padding: 0; text-align: left; display: grid; gap: 6px; max-width: 460px; margin: 10px auto; }
.vocab-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--pink-soft); border-radius: 8px; padding: 6px 10px; }
.vocab-list li b { font-family: var(--f-kr); color: var(--pink-ink); font-weight: 600; }
.cz { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; padding: 26px 20px; }
.cz > * { max-width: 100%; }
.cz .blank { color: var(--teal); font-weight: 700; }
.cz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 4px; }
.cz-opt { font-family: var(--f-kr); font-size: 17px; padding: 12px; }
.cz-opt:disabled { opacity: 1; cursor: default; }
.cz-opt.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.cz-opt.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.cz-fb { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.cz-res.ok { color: var(--ok); } .cz-res.bad { color: var(--bad); }
.cz-res b { font-family: var(--f-kr); }

/* nút lên đầu trang */
.to-top { position: fixed; right: 18px; bottom: 22px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-size: 20px; font-weight: 800; line-height: 1; box-shadow: 0 4px 16px rgba(0,0,0,.14); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .15s, transform .15s; }
.to-top span { font-size: 9.5px; font-weight: 700; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- màn hình nhỏ ---------- */
@media (max-width: 980px) {
  .exam-grid { grid-template-columns: minmax(0, 1fr); }
  .mini-omr { display: none; position: fixed; inset: auto 0 0 0; top: auto; z-index: 50; max-height: 70vh; overflow: auto; border-radius: 16px 16px 0 0; }
  .mini-omr.open { display: block; }
  .omr-drawer-btn { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 45; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
  .omr-grid { grid-template-columns: 1fr; }
  .omr-left { display: grid; grid-template-columns: 1fr 1fr; } .omr-left .omr-title { grid-column: 1 / -1; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .study-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --top-h: 104px; }
  .topbar .wrap { flex-wrap: wrap; gap: 6px 12px; padding-block: 8px; min-height: 0; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav a { padding: 6px 10px; font-size: 13px; flex: 1; text-align: center; }
  .nav .lg { display: none; } .nav .sh { display: inline; }
  h1 { font-size: 22px; }
  .welcome { grid-template-columns: 1fr; }
  .continue { flex-wrap: wrap; } .continue .btn { margin-left: 0; }
  .qpaper { padding: 18px 14px; }
  .popts, .pimgs { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .omr { padding: 22px 10px 14px; }
  .omr-left { grid-template-columns: 1fr; }
  .omr-cols { grid-template-columns: 1fr; }
  .q-row { height: 46px; }
  .bub { width: 30px; height: 38px; font-size: 13px; }
  .score-big { font-size: 44px; } .score-head .acts { margin-left: 0; }
  .qnav { flex-wrap: nowrap; overflow-x: auto; padding: 3px 2px 4px; scrollbar-width: none; }
  .qnav::-webkit-scrollbar { display: none; }
  .qnav a { flex: 0 0 auto; }
  .rnav .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rnav .chip { flex: 0 0 auto; padding: 5px 11px; font-size: 13px; }
  .ko { font-size: 16px; }
  .opt-imgs { grid-template-columns: 1fr 1fr; }
  .fc-word { font-size: 32px; } .fc-ex, .cz-sent { font-size: 16px; }
  .cz-opts { grid-template-columns: 1fr; }
  .frame { padding: 18px 16px; } .frame-banner { padding: 18px 40px; } .frame > .ko { font-size: 16px; }
  .exam-bar audio { max-width: none; flex-basis: 100%; }
  .exam-bar { position: static; }               /* điện thoại: thanh công cụ không dính, đỡ che đề */
  .exam-bar h1 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== Viết (쓰기) · ô 원고지 ===== */
.wq { margin: 16px 0; min-width: 0; }
.wq-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.wq-top .qn, .wq-card .qn { font-family: var(--f-kr); font-weight: 800; font-size: 19px; }
.wq .instr, .wq-card .instr { font-family: var(--f-kr); }
.wq .ppass, .wq-card .ppass { font-family: var(--f-krs); font-size: 16.5px; line-height: 1.9; word-break: keep-all; white-space: pre-wrap; border: 1px solid #ddd; border-radius: 8px; padding: 12px 16px; margin: 8px 0 12px; }
.wq .ppass.frame, .wq-card .ppass.frame { text-align: center; }
.wr-prompt ul { margin: 8px 0 0; padding: 8px 0 0 0; list-style: none; border-top: 1px dashed #ccc; text-align: left; }
.wr-prompt li { margin: 4px 0; } .wr-prompt li b { color: var(--teal-deep); margin-right: 6px; font-family: var(--f-kr); }
.wr-inputs { margin-top: 6px; min-width: 0; }
.wr-line { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px; align-items: start; margin: 8px 0; }
.wr-line .lab { font-size: 19px; font-weight: 700; line-height: 1.9; font-family: var(--f-kr); }
.wr-count { font-size: 13.5px; color: var(--muted); margin: 4px 0; }
.wr-count b { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--warn); }
.wr-count.in-range b { color: var(--ok); } .wr-count.over b { color: var(--bad); }
.legend-mini { margin-left: 8px; } .legend-mini i { display: inline-block; width: 18px; height: 0; border-bottom: 4px solid var(--teal); vertical-align: middle; margin: 0 4px 0 10px; }
.legend-mini i.mk-max { border-color: var(--pink); }
.wr-help summary { cursor: pointer; font-weight: 600; } .wr-rules { margin: 10px 0 0; padding-left: 20px; } .wr-rules li { margin: 4px 0; }
.wr-help { margin-top: 12px; }

.genko-wrap { position: relative; width: max-content; max-width: 100%; margin: 8px auto; overflow-x: auto; }
.genko { --cw: min(36px, calc((100vw - 84px) / var(--cols))); --gk: #8a949a; display: grid; grid-template-columns: repeat(var(--cols), var(--cw)); background: #fff; border-left: 1px solid var(--gk); border-top: 1px solid var(--gk); width: max-content; }
.gc { width: var(--cw); height: var(--cw); border-right: 1px solid var(--gk); border-bottom: 1px solid var(--gk); display: flex; align-items: center; justify-content: center; position: relative; font-family: var(--f-krs); font-size: calc(var(--cw) * .66); line-height: 1; color: #1a1a1a; }
.gc b { font-weight: 500; white-space: pre; }
.gc.p2 b { font-size: .62em; letter-spacing: -.04em; }
.gc i { position: absolute; right: 1px; bottom: -1px; font-style: normal; font-size: .75em; font-weight: 700; }
.gc.mk-min { box-shadow: inset 0 -4px 0 var(--teal); } .gc.mk-max { box-shadow: inset 0 -4px 0 var(--pink); }
.genko-wrap.focus .gc.cur { background: var(--teal-soft); box-shadow: inset 0 0 0 2px var(--teal); }
.genko-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; resize: none; border: 0; padding: 0; margin: 0; font-size: 16px; cursor: text; z-index: 2; overflow: hidden; }

.vi-block { color: var(--muted); font-size: 14px; margin: 4px 0 10px; line-height: 1.65; } .vi-block ul { margin: 6px 0 0; padding-left: 18px; } .vi-block li { margin: 2px 0; }
.wr-h { margin: 22px 0 6px; font-size: 16px; color: var(--teal-deep); border-bottom: 2px solid var(--teal-soft); padding-bottom: 3px; }
.wr-sub { font-weight: 600; margin: 14px 0 6px; font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wr-pair { padding: 8px 10px; border-left: 3px solid var(--teal-soft); margin: 6px 0; background: var(--surface-2); border-radius: 0 8px 8px 0; }
.wr-pair .k { font-family: var(--f-krs); font-size: 16px; line-height: 1.8; word-break: keep-all; } .wr-pair .v { color: var(--muted); font-size: 14px; line-height: 1.6; }
.wr-part { margin: 12px 0; } .wr-tag { font-weight: 700; color: var(--pink-ink); margin-bottom: 2px; font-size: 14px; }
.wr-tips { margin: 4px 0; padding-left: 20px; } .wr-tips li { margin: 4px 0; font-size: 14.5px; }
.wr-check { display: grid; gap: 4px; } .wr-check label { font-size: 14.5px; cursor: pointer; }
.wr-blanks { width: 100%; border-collapse: collapse; font-size: 14.5px; } .wr-blanks th, .wr-blanks td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.wr-blanks .lab { font-size: 18px; font-weight: 700; } .wr-blanks .mine { font-family: var(--f-kr); font-weight: 600; }
.wr-trans { margin-top: 6px; }
@media (max-width: 760px) { .wr-line { grid-template-columns: 24px minmax(0, 1fr); } .wr-blanks { display: block; overflow-x: auto; } }
.wr-text { width: 100%; font-family: var(--f-kr); font-size: 17px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.wr-text:focus { outline: 2px solid var(--teal); }
.wr-chartko { font-size: 15px; line-height: 1.8; background: #fff; }
.wr-inputs > [data-grid] { display: flex; justify-content: center; }

/* --- Viết: làm bài từng câu (thẻ 51–54) --- */
.wtabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.wtab { position: relative; border: 0; background: transparent; border-radius: 999px; padding: 5px 14px; font-family: var(--f-kr); font-weight: 800; font-size: 14px; color: var(--muted); }
.wtab.on { background: var(--teal); color: var(--teal-ink); }
.wtab .dot { position: absolute; top: 3px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.wtab.has .dot { background: var(--ok); } .wtab.on.has .dot { background: #fff; }
.wq-cols { display: grid; gap: 14px 22px; min-width: 0; }
.wq-left, .wr-inputs { min-width: 0; }
.wq-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.wq .qchart { max-width: 520px; margin-inline: auto; }
@media (min-width: 960px) {
  .wq-cols.two { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .wq-cols.two .wq-left { position: sticky; top: calc(var(--top-h) + 76px); max-height: calc(100vh - var(--top-h) - 96px); overflow-y: auto; padding-right: 4px; }
  .wq-cols.two .genko { --cw: min(30px, calc((100vw - 84px) / var(--cols))); }
  .wq-cols.two .wr-inputs > [data-grid] { justify-content: flex-start; }
}

/* --- Viết: xem đáp án mẫu (thẻ từng câu, 2 cột, mục gập) --- */
.rnav .wtabs { background: transparent; border: 0; padding: 0; gap: 6px; }
.rnav .wtab { background: var(--surface); border: 1px solid var(--line); padding: 6px 16px; }
.rnav .wtab.on { background: var(--teal); border-color: var(--teal); }
.wr-two { display: grid; gap: 4px 22px; }
.wr-col { min-width: 0; }
.wr-acc { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.wr-acc > summary { cursor: pointer; font-weight: 600; font-size: 14.5px; padding: 9px 14px; color: var(--teal-deep); }
.wr-acc[open] > summary { border-bottom: 1px solid var(--line); }
.wr-acc > :not(summary) { margin-inline: 14px; }
.wr-acc > :last-child { margin-bottom: 12px; }
.wr-q > .ppass:first-of-type { margin-top: 10px; }
@media (min-width: 1000px) {
  .wr-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .wr-two .genko { --cw: min(25px, calc((100vw - 84px) / var(--cols))); }
}
