/* KTI Reading Club: components. */

/* ---------- icons ---------- */
.ico { flex: none; }
.ico.filled { fill: currentColor; }
.ico-wrap { display: inline-flex; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 650; text-decoration: none; line-height: 1.2; text-align: center;
  background: transparent; color: var(--text);
  transition: background-color .15s, border-color .15s, transform .12s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn-primary { background: var(--gold); color: var(--gold-ink); }
.btn-primary:hover:not(:disabled) { background: #E2C257; }
.btn-light { background: #fff; color: var(--emerald); }
.btn-light:hover { background: #f0f7f3; }
.btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .22); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: .92rem; }
.btn-lg { min-height: 52px; padding: 12px 24px; font-size: 1.02rem; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--link); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); vertical-align: middle;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn-sm { width: 34px; height: 34px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: .85rem; font-weight: 600;
}
.pill-level { background: var(--mint); color: var(--emerald); border-color: transparent; }
:root[data-theme="dark"] .pill-level { background: #12402C; color: #BDF3D3; }
.pill-on-dark { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .4s ease; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin: 0 0 18px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.fine { color: var(--text-2); font-size: .88rem; }
.notice { background: var(--no-bg); color: var(--no-ink); border: 1px solid var(--no-line); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.plain-list { display: grid; gap: 8px; padding-inline-start: 18px; list-style: disc; }

/* ---------- sidebar ---------- */
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  background: var(--side-bg); color: #E6F4EC; padding: 22px 14px 18px; display: flex; flex-direction: column; gap: 18px;
  border-inline-end: 1px solid rgba(212, 175, 55, .18);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; color: #fff; text-decoration: none; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.12rem; letter-spacing: .01em; }
.brand-text small { color: var(--gold); font-size: .85rem; }
.side-nav { display: grid; gap: 16px; flex: 1; align-content: start; }
.side-group ul { display: grid; gap: 2px; }
.side-title { padding: 0 12px 6px; font-size: .8rem; color: rgba(230, 244, 236, .62); font-weight: 600; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; min-height: 44px;
  color: #E6F4EC; text-decoration: none; font-weight: 550; position: relative;
}
.side-link:hover { background: rgba(255, 255, 255, .07); }
.side-link[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
.side-link[aria-current="page"]::before {
  content: ""; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--gold);
}
.side :focus-visible, .tabbar :focus-visible { outline-color: var(--gold); }
.side-foot { display: grid; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; }
.side-org { padding: 0 12px; font-size: .78rem; color: rgba(230, 244, 236, .55); }
.quick { display: flex; gap: 8px; padding: 0 4px; }
.q-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
}
.q-btn:hover { background: rgba(255, 255, 255, .15); }

/* ---------- covers and story cards ---------- */
.cover {
  width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px 12px 12px 8px;
  background: var(--surface-2); box-shadow: var(--shadow-cover);
}
:root[dir="rtl"] .cover { border-radius: 12px 8px 8px 12px; }
.card-art { position: relative; border-radius: 8px 12px 12px 8px; }
.card-art::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(255, 255, 255, .16) 3.5%, transparent 9%);
}
.card { display: block; color: inherit; text-decoration: none; width: 100%; }
.card-art .cover { transition: transform .2s ease, box-shadow .2s ease; }
.card:hover .cover { transform: translateY(-3px); }
.card-title { margin-top: 10px; font-family: var(--font-display); font-weight: 700; line-height: 1.25; font-size: 1.02rem; }
.card-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; color: var(--text-2); font-size: .82rem; margin-top: 2px; }
.card-sub .lvl { font-weight: 700; color: var(--accent); }
.cover-badge {
  position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); z-index: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.cover-bar { position: absolute; inset-inline: 10px; bottom: 10px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .3); overflow: hidden; z-index: 1; }
.cover-bar i { display: block; height: 100%; background: var(--gold); }

/* ---------- shelves ---------- */
.shelf { margin: 38px 0 0; }
.shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.shelf-note { color: var(--text-2); font-size: .9rem; margin-top: 2px; }
.shelf-more { font-weight: 650; font-size: .92rem; white-space: nowrap; }
.row-wrap { position: relative; }
.row {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px 4px 18px; margin-inline: -4px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior-x: contain;
}
.row-item { flex: 0 0 168px; scroll-snap-align: start; }
.row-nav {
  position: absolute; top: calc(50% - 40px); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 2;
}
.row-nav[hidden] { display: none; }
.row-nav-prev { inset-inline-start: -10px; }
.row-nav-next { inset-inline-end: -10px; }
:root[dir="rtl"] .row-nav .ico { transform: scaleX(-1); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 28px 22px; }
.grid-item { min-width: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; border-radius: 28px;
  display: grid; grid-template-columns: minmax(190px, 270px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(24px, 4vw, 52px); min-height: 400px; background: var(--emerald-deep);
}
.hero::before {
  content: ""; position: absolute; inset: -60px; z-index: -2; background: var(--hero-img) center / cover no-repeat;
  filter: blur(46px) saturate(1.35) brightness(.78); transform: scale(1.15);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(3, 32, 24, .94) 8%, rgba(4, 61, 46, .62) 55%, rgba(7, 26, 21, .78)),
              radial-gradient(70% 90% at 90% 0%, rgba(212, 175, 55, .16), transparent 60%);
}
:root[dir="rtl"] .hero::after {
  background: linear-gradient(260deg, rgba(3, 32, 24, .94) 8%, rgba(4, 61, 46, .62) 55%, rgba(7, 26, 21, .78)),
              radial-gradient(70% 90% at 10% 0%, rgba(212, 175, 55, .16), transparent 60%);
}
.hero-art { transform: rotate(-2.5deg); filter: drop-shadow(0 28px 36px rgba(0, 0, 0, .55)); }
:root[dir="rtl"] .hero-art { transform: rotate(2.5deg); }
.hero-art .cover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.hero-copy { display: grid; gap: 16px; justify-items: start; max-width: 640px; }
.hero-tag { color: var(--gold); font-weight: 650; font-size: .95rem; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.05; color: #fff; text-wrap: balance; }
.hero-desc { color: rgba(255, 255, 255, .86); font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero .btn:focus-visible { outline-color: #fff; }

.daycard {
  display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: center; margin: 38px 0 0; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: inherit; text-decoration: none; box-shadow: var(--shadow);
}
.daycard:hover { border-color: var(--gold); }
.daycard-copy { display: grid; gap: 2px; }
.daycard-copy strong { font-family: var(--font-display); font-size: 1.2rem; }
.daycard-copy span:last-child { color: var(--text-2); }
.daycard-tag { color: var(--accent); font-weight: 700; font-size: .88rem; }

/* ---------- overview strip ---------- */
.overview {
  display: grid; grid-template-columns: repeat(3, minmax(0, auto)) minmax(0, 1fr) auto; gap: 18px 36px; align-items: center;
  margin-top: 22px; padding: 18px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.stat, .stat-card { display: grid; gap: 2px; }
.stat-n { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-n small { font-size: .95rem; color: var(--text-2); font-weight: 600; }
.stat-l { color: var(--text-2); font-size: .88rem; }
.ov-levels { display: grid; gap: 10px; min-width: 160px; }
.ov-lv { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; font-size: .85rem; color: var(--text-2); }
.ov-lv > span:first-child { font-weight: 700; color: var(--text); }
.ov-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; white-space: nowrap; }
:root[dir="rtl"] .ov-link .ico { transform: none; }

/* ---------- categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cat-tile {
  display: flex; flex-direction: column; justify-content: end; gap: 2px; min-height: 124px; padding: 16px 18px; border-radius: 18px; text-decoration: none; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, hsl(var(--h) 55% 34% / .9), transparent 60%), linear-gradient(145deg, hsl(var(--h) 52% 22%), hsl(var(--h) 60% 11%));
  box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .08);
}
.cat-tile:hover { border-color: var(--gold); }
.cat-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.cat-count { font-size: .88rem; color: rgba(255, 255, 255, .78); }

/* ---------- filters, tabs, segments ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 24px; }
.field { display: grid; gap: 4px; font-size: .85rem; color: var(--text-2); font-weight: 600; }
.field select, .field input {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; color: var(--text); font-weight: 500;
}
.field-search { position: relative; flex: 1 1 280px; display: flex; align-items: center; }
.field-search .ico { position: absolute; inset-inline-start: 14px; color: var(--text-2); pointer-events: none; }
.field-search input { width: 100%; padding-inline-start: 42px; font-size: 1rem; }
.seg-group { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.seg-btn { min-height: 38px; min-width: 44px; padding: 4px 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 650; color: var(--text-2); }
.seg-btn[aria-pressed="true"] { background: var(--emerald); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
:root[data-theme="dark"] .seg-btn[aria-pressed="true"] { background: var(--green); }
.chip-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.chip-toggle[aria-pressed="true"] { background: var(--mint); color: var(--emerald); border-color: var(--ok-line); }
:root[data-theme="dark"] .chip-toggle[aria-pressed="true"] { background: #12402C; color: #BDF3D3; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; text-decoration: none; color: var(--text-2); font-weight: 650; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
.tab-n { background: var(--surface-2); border-radius: 999px; padding: 0 8px; font-size: .8rem; }

/* ---------- progress, achievements, settings ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.stat-card .stat-n { font-size: 2.4rem; }
.lvrow { display: grid; gap: 8px; }
.lvrow-top { display: flex; justify-content: space-between; gap: 12px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.badge {
  display: grid; justify-items: center; gap: 4px; text-align: center; padding: 22px 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.badge.is-on { border-color: var(--gold); box-shadow: var(--shadow); }
.badge:not(.is-on) .badge-art { opacity: .8; }
.badge strong { font-family: var(--font-display); font-size: 1.1rem; margin-top: 8px; }
.badge-req { color: var(--text-2); font-size: .9rem; }
.badge-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: .88rem; color: var(--accent); margin-top: 4px; }
.badge:not(.is-on) .badge-state { color: var(--text-2); }
.set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.set-label { display: grid; gap: 2px; max-width: 46ch; }
.set-label span { color: var(--text-2); font-size: .88rem; }
.read-preview { font-family: var(--font-read); font-size: var(--read-size); padding: 14px 18px; background: var(--surface-2); border-radius: 12px; }

/* ---------- reader ---------- */
.reader { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.reader-side { position: sticky; top: 24px; display: grid; gap: 20px; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; }
.story-head { display: grid; gap: 16px; }
.story-cover { width: min(100%, 220px); }
.story-info { display: grid; gap: 10px; justify-items: start; }
.story-info h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.story-sub { color: var(--text-2); font-family: var(--font-display); }
.fav-btn[aria-pressed="true"] { border-color: var(--gold); }
.fav-btn[aria-pressed="true"] .ico { color: var(--gold); }
.stages ol { display: grid; gap: 4px; }
.stage-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; text-align: start; color: var(--text); font-weight: 600;
}
.stage-btn:hover { background: var(--surface-2); }
.stage-btn[aria-current="step"] { background: var(--emerald); color: #fff; }
:root[data-theme="dark"] .stage-btn[aria-current="step"] { background: var(--green); }
.stage-dot {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 700;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text-2);
}
.stage-btn[aria-current="step"] .stage-dot { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .4); }
.stage-btn.is-done .stage-dot { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.stage-progress { display: grid; gap: 8px; color: var(--text-2); font-size: .9rem; }
.reader-main { min-width: 0; display: grid; gap: 20px; }
.stage-title { display: grid; gap: 4px; }
.stage-title h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); outline: none; }
.stage-intro { color: var(--text-2); }
.stage-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; }
.done-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px;
  background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line);
}
.done-banner > div { display: grid; flex: 1 1 200px; }
.done-banner .ico { color: var(--green); }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vcard { display: grid; gap: 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 16px; box-shadow: var(--shadow); align-content: start; }
.vcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vcard h3 { font-size: 1.35rem; }
.v-ar { font-size: 1.25rem; color: var(--accent); font-weight: 600; }
.v-ex { color: var(--text-2); font-family: var(--font-read); font-style: italic; }

.read-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3.4vw, 44px); box-shadow: var(--shadow); display: grid; gap: 18px; }
.read-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.read-tools .btn { min-width: 44px; }
.fsz.sm { font-size: .85rem; } .fsz.lg { font-size: 1.3rem; font-family: var(--font-read); }
.read-text { font-family: var(--font-read); font-size: var(--read-size); line-height: 1.95; max-width: 36em; margin-inline: auto; width: 100%; display: grid; gap: 1.1em; }
.read-text p { text-wrap: pretty; }
.sn { transition: background-color .2s; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sn.is-current, .sent.is-current { background: var(--mark); }
.vw { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; border-bottom: 2px solid var(--gold); cursor: pointer; }
.vw:hover { background: var(--mark); }
.vpop { max-width: 36em; margin-inline: auto; width: 100%; padding: 14px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 6px; }
.vpop[hidden] { display: none; }
.vpop-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vpop-main strong { font-size: 1.15rem; font-family: var(--font-display); }
.vpop-main span { color: var(--accent); font-size: 1.15rem; font-weight: 600; flex: 1; }
.read-card.is-focus { position: fixed; inset: 0; z-index: 150; border-radius: 0; border: 0; overflow-y: auto; background: var(--bg); align-content: start; padding: clamp(20px, 6vw, 80px); }

.listen { display: grid; gap: 20px; }
.listen-panel { display: grid; gap: 14px; justify-items: center; padding: 22px; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--emerald), var(--emerald-deep)); color: #fff; }
.listen-panel .voice-note, .listen-panel .listen-pos { color: rgba(255, 255, 255, .82); font-size: .9rem; text-align: center; max-width: 60ch; }
.listen-controls { display: flex; align-items: center; gap: 14px; }
.listen-opts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sent-list { display: grid; gap: 4px; max-width: 46em; width: 100%; margin-inline: auto; }
.sent { display: flex; gap: 14px; align-items: baseline; width: 100%; text-align: start; padding: 10px 14px; border-radius: 12px; border: 1px solid transparent; background: transparent; font-family: var(--font-read); font-size: calc(var(--read-size) * .95); line-height: 1.6; }
.sent:hover { border-color: var(--line); background: var(--surface); }
.sent-n { flex: none; width: 1.6em; color: var(--text-2); font-family: var(--font-ui); font-size: .8em; }

/* ---------- exercises ---------- */
.acts { display: grid; gap: 14px; }
.act { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.act-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text-2); font-size: .88rem; font-weight: 650; }
.act-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ok-ink); background: var(--ok-bg); border-radius: 999px; padding: 2px 10px; }
.act-badge[hidden] { display: none; }
.act-body { display: grid; gap: 12px; }
.q { font-family: var(--font-read); font-size: 1.2rem; line-height: 1.5; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.opt { min-height: 50px; padding: 10px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); text-align: start; font-weight: 550; transition: background-color .15s, border-color .15s; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.right { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.opt.wrong { background: var(--no-bg); border-color: var(--no-line); color: var(--no-ink); }
.opt:disabled:not(.right):not(.wrong) { opacity: .55; }
.fb { min-height: 1.4em; font-weight: 600; }
.fb.ok { color: var(--ok-ink); background: var(--ok-bg); padding: 8px 14px; border-radius: 10px; }
.fb.no { color: var(--no-ink); background: var(--no-bg); padding: 8px 14px; border-radius: 10px; }
.fb:empty { display: none; }
.pts { display: inline-block; background: var(--gold); color: var(--gold-ink); font-weight: 800; padding: 0 8px; border-radius: 999px; margin-inline-start: 6px; font-size: .88rem; }
.act-foot { display: flex; gap: 10px; flex-wrap: wrap; }
.act-foot:empty { display: none; }
.act-foot [hidden] { display: none; }
.act-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.help { color: var(--text-2); font-size: .9rem; }

.pool, .line { display: flex; flex-wrap: wrap; gap: 8px; }
.line { min-height: 60px; padding: 10px; border: 2px dashed var(--line); border-radius: 14px; align-items: center; background: var(--bg-2); }
.line.empty .ph { color: var(--text-2); font-size: .9rem; padding-inline: 6px; }
.tok { min-height: 46px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-family: var(--font-read); font-size: 1.1rem; }
.tok:hover:not(:disabled) { border-color: var(--accent); }
.tok.on { background: var(--surface-2); }
.tok.right { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.tok.wrong { background: var(--no-bg); border-color: var(--no-line); color: var(--no-ink); }

.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mcol { display: grid; gap: 10px; align-content: start; }
.mitem { min-height: 50px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 1.05rem; text-align: center; }
.mcol-r .mitem { font-size: 1.15rem; }
.mitem:hover:not(:disabled) { border-color: var(--accent); }
.mitem.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .35); }
.mitem.matched { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); opacity: 1; }
.mitem.nope { background: var(--no-bg); border-color: var(--no-line); color: var(--no-ink); animation: nope .3s; }
@keyframes nope { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.reveal { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; background: var(--surface-2); }
.reveal summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 650; }
.reveal p { padding-bottom: 12px; font-family: var(--font-read); font-size: 1.1rem; }
.check-panel { margin-top: 6px; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- audio player ---------- */
.pl-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: inherit;
}
.pl-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.pl-btn:disabled { opacity: .35; }
.pl-play {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3); flex: none;
}
.pl-play:hover:not(:disabled) { background: #E6C85C; }
.pl-play:disabled { opacity: .4; }
.pl-play.big { width: 68px; height: 68px; }
.pl-select { display: grid; gap: 2px; font-size: .78rem; color: rgba(255, 255, 255, .78); }
.pl-select select {
  min-height: 40px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; padding: 4px 8px;
}
.pl-select select option { color: #111; background: #fff; }
.pl-bar {
  position: fixed; z-index: 60; bottom: 0; inset-inline-start: var(--side-w); inset-inline-end: 0; height: var(--bar-h);
  display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(150px, auto) auto; gap: 16px; align-items: center; padding: 8px 22px;
  background: rgba(4, 45, 34, .94); color: #fff; border-top: 1px solid rgba(212, 175, 55, .3); backdrop-filter: blur(14px);
}
.pl-prog { position: absolute; inset: 0 0 auto 0; height: 3px; background: rgba(255, 255, 255, .14); }
.pl-prog i { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.pl-now { display: flex; align-items: center; gap: 12px; min-width: 0; background: none; border: 0; color: inherit; text-align: start; padding: 0; }
.pl-thumb { flex: none; width: 40px; }
.pl-thumb .cover { border-radius: 4px; box-shadow: none; }
.pl-meta { display: grid; min-width: 0; line-height: 1.25; }
.pl-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); }
.pl-meta small { color: rgba(255, 255, 255, .72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-controls { display: flex; align-items: center; gap: 4px; }
.pl-opts { display: flex; gap: 10px; }
.pl-opts-bar .pl-select select { min-height: 38px; }
.pl-end { display: flex; gap: 2px; }
.pl-sheet {
  position: fixed; z-index: 59; inset-inline-end: 20px; bottom: calc(var(--bar-h) + 12px); width: min(440px, calc(100vw - var(--side-w) - 40px));
  max-height: calc(100dvh - var(--bar-h) - 40px); overflow-y: auto; border-radius: 22px; color: #fff;
  background: linear-gradient(170deg, #0a5a43 0%, #043D2E 60%, #03261d 100%); border: 1px solid rgba(212, 175, 55, .35); box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.pl-sheet[hidden] { display: none; }
.pl-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 0; }
.pl-sheet-title { font-weight: 650; font-size: .92rem; color: rgba(255, 255, 255, .8); }
.pl-sheet-body { display: grid; gap: 14px; padding: 10px 22px 22px; }
.pl-art { width: 150px; margin-inline: auto; }
.pl-sheet-main { display: grid; gap: 12px; justify-items: center; text-align: center; }
.pl-big-title { font-size: 1.35rem; color: #fff; }
.pl-sentence { font-family: var(--font-read); font-size: 1.2rem; line-height: 1.5; min-height: 3em; }
.segs { display: flex; gap: 3px; width: 100%; }
.seg { flex: 1; height: 14px; min-width: 4px; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .2); position: relative; }
.seg::before { content: ""; position: absolute; inset: -14px 0; }
.seg.done { background: rgba(212, 175, 55, .6); }
.seg.now { background: var(--gold); }
.pl-pos { color: rgba(255, 255, 255, .8); font-size: .9rem; min-height: 1.4em; }
.pl-controls-big { gap: 14px; }
.pl-voice { font-size: .85rem; color: rgba(255, 255, 255, .82); }
.pl-fine { font-size: .78rem; color: rgba(255, 255, 255, .6); }
