/* Складу A2 — členská sekce a interaktivní úlohy */
body.app { background: var(--soft); }
.app-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.app-nav .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.app-tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tabs a { white-space: nowrap; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 14px; padding: 8px 11px; border-radius: 10px; }
.app-tabs a.on, .app-tabs a:hover { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 760px) {
  .app-nav .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; }
  .app-tabs { margin-left: 0; width: 100%; }
}
.app-main { padding: 28px 0 80px; }
.app-main .wrap { max-width: 900px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h2 { font-size: 26px; }
.panel-tight { padding: 16px 18px; }
.muted { color: var(--muted); }
.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }

/* Dashboard */
.progress-big { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--soft) 0); display: grid; place-items: center; }
.ring span { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; }
.mod { margin-bottom: 14px; }
.mod-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.mod-head h3 { margin: 0; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li a { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.lesson-list li a:hover { background: var(--soft); }
.chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 13px; color: #fff; }
.done .chk { background: var(--ok); border-color: var(--ok); }
.lesson-list .min { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--brand); }
.tile b { display: block; font-size: 18px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 15px; }

/* Lesson content */
.lesson h1 { font-size: clamp(28px, 4vw, 38px); }
.goal { background: var(--brand-soft); color: var(--brand-ink); border-radius: var(--radius-sm); padding: 14px 16px; font-weight: 700; margin-bottom: 18px; }
.video-box { border-radius: var(--radius); overflow: hidden; background: #0b1220; margin-bottom: 18px; aspect-ratio: 16/9; }
.video-box video { width: 100%; height: 100%; }
.block-text ul, .block-text ol { padding-left: 22px; }
.cz-ex { border-left: 4px solid var(--brand); background: #fff; border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 12px 0; }
.cz-ex .cs { font-weight: 700; font-size: 18px; }
.cz-ex .uk { color: var(--muted); font-size: 15px; }
.tip, .warn { border-radius: var(--radius-sm); padding: 14px 16px 14px 48px; margin: 14px 0; position: relative; }
.tip { background: var(--ok-soft); }
.tip::before { content: "💡"; position: absolute; left: 16px; top: 13px; }
.warn { background: var(--bad-soft); }
.warn::before { content: "⚠️"; position: absolute; left: 16px; top: 13px; }
.tip p:last-child, .warn p:last-child { margin: 0; }
table.t { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; background: #fff; border-radius: 12px; overflow: hidden; }
table.t th, table.t td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: var(--soft); font-weight: 700; }
.steps-list { counter-reset: st; list-style: none; padding: 0; }
.steps-list li { counter-increment: st; padding: 8px 0 8px 42px; position: relative; }
.steps-list li::before { content: counter(st); position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--sun); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.lesson-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Tasks */
.task { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.task-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.task-head h3 { margin: 0; font-size: 20px; }
.instr { font-weight: 700; margin: 8px 0 4px; }
.instr-uk { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.reading-text { background: #fffdf5; border: 1px solid #f1e6bf; border-radius: 12px; padding: 18px; margin: 12px 0 18px; white-space: pre-line; font-size: 16.5px; }
.reading-text h4 { margin: 0 0 8px; }
.q { padding: 14px 0; border-top: 1px solid var(--soft); }
.q:first-of-type { border-top: 0; }
.q-title { font-weight: 700; margin-bottom: 8px; }
.q-num { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; margin-right: 8px; padding: 0 6px; }
.q.example .q-num { background: #98a2b3; }
.q.example { opacity: .85; }
.opts { display: grid; gap: 8px; }
.opts.cols4 { grid-template-columns: repeat(4, 1fr); }
.opts.cols2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .opts.cols4 { grid-template-columns: 1fr 1fr; } .opts.cols2 { grid-template-columns: 1fr; } }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.opt:hover { border-color: #b8c3d6; }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.opt .key { font-weight: 800; color: var(--brand); }
.opt.pic { flex-direction: column; align-items: stretch; }
.opt.pic img, .pic-box img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; background: var(--soft); width: 100%; }
.opt.chosen { border-color: var(--brand); background: var(--brand-soft); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.pic-box { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.pic-fallback { aspect-ratio: 4/3; border-radius: 10px; background: var(--soft); display: grid; place-items: center; text-align: center;
  padding: 10px; color: var(--muted); font-weight: 700; font-size: 14px; }
.pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
@media (max-width: 640px) { .pics { grid-template-columns: 1fr 1fr; } }
.pic-cap { font-weight: 700; margin-top: 6px; font-size: 15px; }
.bank { display: grid; gap: 6px; background: var(--soft); border-radius: 12px; padding: 12px 14px; margin: 10px 0 16px; font-size: 15.5px; }
.bank div b { color: var(--brand); margin-right: 6px; }
select.sel, input.fill { font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
select.sel { min-width: 120px; }
input.fill { width: min(100%, 260px); }
.sent { line-height: 2.1; }
.fb { margin-top: 8px; font-size: 15px; border-radius: 10px; padding: 10px 12px; display: none; }
.checked .fb { display: block; }
.fb.ok { background: var(--ok-soft); }
.fb.bad { background: var(--bad-soft); }
.fb.almost { background: var(--sun-soft); }
.fb b { margin-right: 4px; }
.person-list { display: grid; gap: 8px; margin: 10px 0 16px; }
.person { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 15.5px; }
.person b { color: var(--brand); margin-right: 6px; }
.gap-text { background: #fffdf5; border: 1px solid #f1e6bf; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.gap-text h5 { margin: 0 0 4px; font-size: 15px; }
.blank { display: inline-block; min-width: 70px; border-bottom: 2px solid var(--ink); text-align: center; font-weight: 800; color: var(--brand); }

/* Audio */
.player { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 14px; margin: 10px 0 14px; }
.player button { border: 0; background: var(--sun); color: var(--ink); width: 40px; height: 40px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: none; font-weight: 800; }
.player .ptitle { font-weight: 700; font-size: 15px; }
.player .ptime { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 14px; opacity: .8; }
.player progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.2); }
.player progress::-webkit-progress-bar { background: rgba(255,255,255,.2); }
.player progress::-webkit-progress-value { background: var(--sun); }
.player progress::-moz-progress-bar { background: var(--sun); }
.player .pmid { flex: 1; display: grid; gap: 6px; min-width: 0; }
.mini-play { border: 0; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; line-height: 1; font-family: inherit; cursor: pointer; }
.mini-play.playing { background: var(--brand); color: #fff; }
.pending-media { font-size: 14px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 8px 12px; display: inline-block; }
.script { display: none; background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-top: 10px; font-size: 15px; }
.checked .script, .script.show { display: block; }
.script p { margin: 0 0 4px; }
.script .spk { font-weight: 800; color: var(--muted); margin-right: 6px; font-size: 13px; }

/* Writing */
textarea.wr { width: 100%; min-height: 150px; font: inherit; font-size: 16.5px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; }
textarea.wr:focus, input.fill:focus, select.sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.wc { font-size: 14px; font-weight: 700; margin-top: 6px; }
.wc.low { color: var(--bad); }
.wc.okc { color: var(--ok); }
.mail { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mail-row { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 15px; background: var(--soft); }
.mail-row b { width: 70px; color: var(--muted); }
.mail textarea.wr { border: 0; border-radius: 0; min-height: 200px; }
.model { display: none; margin-top: 12px; border-radius: 12px; background: var(--ok-soft); padding: 14px 16px; white-space: pre-line; }
.model.show { display: block; }
.model .tr { color: var(--muted); font-size: 15px; margin-top: 8px; border-top: 1px dashed #b7dfc4; padding-top: 8px; }
.rubric { margin-top: 12px; display: grid; gap: 6px; font-size: 15px; }
.rubric label { display: flex; gap: 8px; align-items: flex-start; }
.rubric input { width: 18px; height: 18px; accent-color: var(--ok); margin-top: 3px; flex: none; }

/* Speaking */
.sq { padding: 14px 0; border-top: 1px solid var(--soft); }
.sq:first-child { border-top: 0; }
.sq-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.sq-row .btn { margin-top: 0 !important; }
.card-sit { background: var(--sun-soft); border: 1px solid #f5dc86; border-radius: 14px; padding: 16px; margin: 10px 0; }
.card-sit .prompts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.card-sit .prompts span { background: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 800; border: 1px solid #f1e0a0; }
.turns p { margin: 0 0 6px; }
.turns .who { font-weight: 800; font-size: 13px; color: var(--muted); display: inline-block; min-width: 76px; }
.rec { border: 0; background: var(--bad); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; line-height: 1; font-family: inherit; cursor: pointer; }
.rec.on { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }

/* Test shell */
.test-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; }
.test-tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 15px; line-height: 1; font-family: inherit; cursor: pointer; color: var(--ink-2); }
.test-tabs button.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.timer { position: sticky; top: 64px; z-index: 10; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 14px;
  padding: 10px 14px; margin-bottom: 14px; }
.timer b { font-variant-numeric: tabular-nums; font-size: 20px; }
.timer .btn { padding: 8px 14px; font-size: 14px; box-shadow: none; }
.timer.low b { color: var(--sun); }
.check-bar { position: sticky; bottom: 12px; display: flex; gap: 10px; justify-content: center; margin-top: 18px; z-index: 5; }
.score { text-align: center; }
.score .big { font-size: 48px; font-weight: 800; letter-spacing: -.03em; }
.verdict { display: inline-block; font-weight: 800; padding: 8px 16px; border-radius: 999px; margin-top: 8px; }
.verdict.pass { background: var(--ok-soft); color: var(--ok); }
.verdict.fail { background: var(--bad-soft); color: var(--bad); }
.part-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.part-scores div { background: var(--soft); border-radius: 12px; padding: 12px; text-align: center; }
.part-scores b { display: block; font-size: 22px; }
@media (max-width: 640px) { .part-scores { grid-template-columns: 1fr 1fr; } }

/* Vocab */
.search { width: 100%; font: inherit; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 16px; }
.words { display: grid; gap: 0; }
.word { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--soft); }
.word .cs { font-weight: 800; }
.word .ex { grid-column: 1 / -1; color: var(--muted); font-size: 14px; margin-top: -6px; }
.acc summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 6px 0; }
.lock { text-align: center; padding: 30px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 99; }
.t-wrap { overflow-x: auto; margin: 12px 0; -webkit-overflow-scrolling: touch; }
.t-wrap table.t { margin: 0; }
@media (max-width: 640px) { .panel { padding: 18px 16px; } .task { padding: 18px 14px; } }
