/* Axomrank glass: one light theme over a painted Brahmaputra.
   Layers: the river painting, a milky veil, frosted panels, then red actions.
   Colour keeps its meaning: red acts, green confirms, white glass holds content.
   Opaque fallbacks apply without backdrop-filter or with reduced transparency. */
:root {
  color-scheme: light;
  --bg: #eef5f5; --surface: #fbfcfa; --surface-2: #e6eeed;
  --ink: #1b272c; --ink-2: #3f4f55; --ink-3: #5c6c72;
  --line: #d3dfdf; --line-2: #b4c5c6;
  --red: #d8202b; --red-deep: #b0121d;
  --terra: var(--red); --terra-dark: var(--red-deep); --terra-soft: #fde3e4;
  --indigo: #2f4a5c; --indigo-dark: #20354a; --indigo-soft: #dfe9ee;
  --gold: #b97d12; --gold-dark: #8a5a08; --gold-soft: #fdeecb;
  --good: #1f8a4c; --good-dark: #146a38; --good-soft: #dcf3e3; --good-ink: #125a30;
  --bad: #b3303c; --bad-dark: #86202b; --bad-soft: #fbe1e3; --bad-ink: #7e1e29;
  --river: #6fb6d6; --land: #eef0dd; --hill: #a8b89a;
  --locked: #e7eeee; --locked-dark: #bccaca; --stage: #cfe3ea;
  --glass: rgba(255,255,255,.56); --glass-strong: rgba(255,255,255,.74); --glass-faint: rgba(255,255,255,.34);
  --edge: rgba(255,255,255,.86);
  --lift: 0 8px 26px rgba(30,70,85,.13), inset 0 1px 0 rgba(255,255,255,.9);
  --frost: blur(16px) saturate(150%);
  --gamosa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 15 15' shape-rendering='crispEdges'%3E%3Cpath fill='%23D8202B' d='M7 1h1v1h-1zM6 2h1v1h-1zM7 2h1v1h-1zM8 2h1v1h-1zM5 3h1v1h-1zM6 3h1v1h-1zM8 3h1v1h-1zM9 3h1v1h-1zM4 4h1v1h-1zM5 4h1v1h-1zM9 4h1v1h-1zM10 4h1v1h-1zM3 5h1v1h-1zM4 5h1v1h-1zM7 5h1v1h-1zM10 5h1v1h-1zM11 5h1v1h-1zM2 6h1v1h-1zM3 6h1v1h-1zM6 6h1v1h-1zM7 6h1v1h-1zM8 6h1v1h-1zM11 6h1v1h-1zM12 6h1v1h-1zM1 7h1v1h-1zM2 7h1v1h-1zM5 7h1v1h-1zM6 7h1v1h-1zM8 7h1v1h-1zM9 7h1v1h-1zM12 7h1v1h-1zM13 7h1v1h-1zM2 8h1v1h-1zM3 8h1v1h-1zM6 8h1v1h-1zM7 8h1v1h-1zM8 8h1v1h-1zM11 8h1v1h-1zM12 8h1v1h-1zM3 9h1v1h-1zM4 9h1v1h-1zM7 9h1v1h-1zM10 9h1v1h-1zM11 9h1v1h-1zM4 10h1v1h-1zM5 10h1v1h-1zM9 10h1v1h-1zM10 10h1v1h-1zM5 11h1v1h-1zM6 11h1v1h-1zM8 11h1v1h-1zM9 11h1v1h-1zM6 12h1v1h-1zM7 12h1v1h-1zM8 12h1v1h-1zM7 13h1v1h-1z'/%3E%3C/svg%3E");
  --font: "Noto Sans", "Noto Sans Bengali", system-ui, sans-serif;
  --font-as: "Noto Sans Bengali", "Noto Sans", system-ui, sans-serif;
}
b { font-weight: 800; }
body { background: var(--stage); }

/* ---------- the stage: painting behind everything ---------- */
.device {
  background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.14) 34%, rgba(255,255,255,.42)), url('../content/media/interface/axom-river.webp') 0 0 / auto 112% no-repeat;
  isolation: isolate;
}
.view { min-height: 0; }
@media (min-width: 560px) {
  body::before { content: ''; position: fixed; inset: 0; z-index: -2; background: url('../content/media/interface/axom-river-wide.webp') center / cover; }
  /* a gamosa laid across each lower corner */
  body::after, .stage::after {
    content: ''; position: fixed; z-index: -1; width: 460px; height: 150px; bottom: -40px; filter: blur(1.5px); pointer-events: none;
    background: var(--gamosa) 0 54px / 30px 30px repeat-x, linear-gradient(180deg, #fff 0 24px, #d8202b 24px 44px, #fff 44px 96px, #d8202b 96px 116px, #fff 116px);
    box-shadow: 0 -8px 30px rgba(40,50,60,.22);
  }
  body::after { left: -110px; transform: rotate(24deg); }
  .stage::after { right: -110px; transform: rotate(-24deg); }
  .device {
    width: 412px; height: min(880px, calc(100dvh - 40px)); border-radius: 36px;
    border: 1.5px solid var(--edge); box-shadow: 0 24px 70px rgba(25,60,75,.28), inset 0 1px 0 #fff;
  }
}

/* ---------- headers ---------- */
.p-top, .top {
  position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  min-height: 58px; margin: 10px 12px 8px; padding: 6px 8px 6px 6px;
  border: 1px solid var(--edge); border-radius: 24px; background: var(--surface); box-shadow: var(--lift);
}
.top { padding-right: 10px; }
.p-top svg, .top svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn, .close { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 0; color: var(--ink); background: none; border: 0; border-radius: 50%; cursor: pointer; font-size: 0; }
.top-title { min-width: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { padding-left: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.lang {
  display: inline-flex; align-items: center; gap: 3px; flex: none; min-height: 34px; min-width: 0; padding: 4px 11px;
  border: 1px solid var(--edge); border-radius: 99px; background: rgba(255,255,255,.5);
  font-size: 13px; font-weight: 700; color: var(--ink); box-shadow: inset 0 1px 0 #fff;
}
.lang i { font-style: normal; font-weight: 500; color: var(--ink-3); }
.lang .l-en { color: var(--red); }
.lang .l-as { font-family: var(--font-as); }
body:has(#as:checked) .lang .l-en { color: var(--ink); }
body:has(#as:checked) .lang .l-as { color: var(--red); }
.lang.mini { width: 34px; padding: 0; justify-content: center; color: var(--red); }
.fire, .gem { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.fire.on { color: var(--red); }
.fire svg, .gem svg { width: 18px; height: 18px; }
.gem { color: var(--gold-dark); }
.chip-top { border: 1px solid var(--edge); border-radius: 99px; background: rgba(255,255,255,.5); color: var(--red); }

/* segmented progress: one bar cut into a segment per step */
.bar {
  --n: 8; flex: 1; position: relative; height: 9px; min-height: 0; width: auto; margin: 0; border-radius: 99px; overflow: hidden;
  background: rgba(40,70,85,.17);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--n) - 3px), transparent calc(100% / var(--n) - 3px) calc(100% / var(--n)));
  mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--n) - 3px), transparent calc(100% / var(--n) - 3px) calc(100% / var(--n)));
}
.bar i { display: block; height: 100%; border-radius: 0; background: var(--red); transition: width .3s ease; }
.bar i::after { display: none; }
.step-count { flex: none; font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* thin meters on cards */
.meter, .king .bar2 { display: block; position: relative; height: 6px; min-height: 0; width: auto; margin-top: 8px; border-radius: 99px; overflow: hidden; background: rgba(40,70,85,.14); }
.meter i, .king .bar2 i { display: block; height: 100%; border-radius: 99px; background: var(--red); }
.subj .meter i { background: var(--red); }
.meter i::after { display: none; }

/* ---------- frosted panels ---------- */
:is(.hero, .home-hero, .c-hero, .resume, .review-card, .subj, .course-tile, .tool, .king, .sec-banner, .course-row, .cp-card, .mistake-card, .gate-card, .card, .stat, .linkback, .gift, .tabs, .era-head, .screen, .story-card, .fb) {
  background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--lift);
}
.sheet, .guide-sheet { background: var(--surface); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(.p-top, .top, .hero, .home-hero, .c-hero, .resume, .review-card, .subj, .course-tile, .tool, .king, .sec-banner, .course-row, .cp-card, .mistake-card, .gate-card, .card, .stat, .linkback, .gift, .tabs, .era-head, .screen, .story-card, .fb) {
    background: var(--glass); -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  }
  :is(.story-card, .screen, .card) { background: var(--glass-strong); }
  .sheet, .guide-sheet { background: rgba(250,252,252,.9); -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--surface); --glass-strong: var(--surface); --glass-faint: var(--surface); --frost: none; }
}

/* ---------- bottom bar ---------- */
/* one slim bar, the same on every page, held at the bottom of the screen whatever the page does */
.nav-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 2px 6px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
}
.view:has(> .nav-bar) { padding-bottom: calc(47px + env(safe-area-inset-bottom)); }
@media (min-width: 560px) { .view { position: relative; } .nav-bar { position: absolute; border-radius: 0 0 34px 34px; } .study-home .nav-bar { border-radius: 0; } }
.nav-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 44px; min-width: 0; font-size: 10px; font-weight: 600; line-height: 1.2; color: var(--ink-2); text-align: center; text-decoration: none; }
.nav-bar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-bar a.on { color: var(--red); font-weight: 700; }

/* ---------- lesson path ---------- */
.p-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.p-scroll::-webkit-scrollbar { display: none; }
.lesson-page .hero {
  display: flex; align-items: center; gap: 12px; min-height: 0; margin: 0 12px; padding: 16px 12px 16px 18px; color: var(--ink);
  border-radius: 24px; overflow: visible; background: linear-gradient(115deg, rgba(255,255,255,.74), rgba(255,255,255,.4)); box-shadow: var(--lift);
}
.lesson-page .hero .txt { display: block; flex: 1; min-width: 0; padding: 0; }
.lesson-page .hero h1 { margin: 0; font-size: 31px; line-height: 1.08; font-weight: 800; letter-spacing: -.04em; }
.lesson-page .hero .reign { margin-top: 7px; font-size: 13.5px; line-height: 1.35; font-weight: 500; color: var(--ink-2); opacity: 1; }
.lesson-page .hero .builds-on { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--red); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lesson-page .hero .offline-btn {
  display: inline-flex; align-items: center; gap: 4px; width: auto; min-height: 30px; height: auto; margin: 0; padding: 3px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: none; color: var(--ink-2);
  background: rgba(255,255,255,.42); border: 1px solid var(--edge); box-shadow: none; cursor: pointer;
}
.lesson-page .hero .offline-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lesson-page .hero .mistake-pill { color: var(--red); }
.ring { position: relative; flex: none; width: 102px; height: 102px; border-radius: 50%; background: rgba(255,255,255,.62); box-shadow: inset 0 0 0 1px var(--edge), 0 4px 14px rgba(30,70,85,.1); }
.ring i {
  position: absolute; inset: 0; border-radius: 50%; width: 100% !important;
  background: conic-gradient(var(--red) var(--p, 0%), rgba(40,70,85,.1) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}
.ring-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 13px; }
.ring-t b { font-size: 25px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.ring-t small { font-size: 9.5px; font-weight: 600; line-height: 1.2; color: var(--ink-2); }

/* the river stays visible between the header card and the first unit */
.path { display: block; position: relative; padding: 0 0 26px; }
.path > .sec { position: relative; z-index: 2; margin: 0 0 10px; }
.path > .sec:not(:first-child):not(.here) { margin-top: 0; }
.path > .sec.here { margin: 0 0 118px; }
.trail { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; overflow: visible; }
.trail path { fill: none; stroke: rgba(255,255,255,.72); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 1px 2px rgba(30,70,85,.2)); }
.node-wrap { position: relative; z-index: 1; display: flex; flex-direction: row; align-items: center; gap: 14px; min-height: 66px; margin: 0 12px 6px 0; padding-left: calc(30px + var(--x, 0px)); transform: none !important; }
.node-wrap:last-of-type { margin-bottom: 26px; }
.node {
  --c: var(--red); --d: var(--red-deep); flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  color: var(--ink); background: rgba(255,255,255,.72); border: 1.5px solid var(--edge); cursor: pointer;
  box-shadow: 0 5px 14px rgba(30,70,85,.2), inset 0 2px 2px #fff; filter: none;
}
.node:active { transform: scale(.96); box-shadow: 0 2px 8px rgba(30,70,85,.2); }
.node .num { font-size: 22px; font-weight: 700; line-height: 1; }
.node svg { width: 25px; height: 25px; }
.node.done { color: #fff; background: linear-gradient(160deg, #27a05a, #177a42); border: 3px solid #fff; }
.node.open { color: var(--ink); }
.node.cur, .expanded .node.open { color: #fff; background: radial-gradient(circle at 34% 28%, #ec3a42, #c0141f 72%); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(216,32,43,.18), 0 6px 14px rgba(176,18,29,.28); }
.node.cur::before { display: none; }
.node.test { width: 50px; height: 50px; color: var(--gold-dark); }
.node.testout { border: 1.5px dashed var(--gold); background: rgba(255,255,255,.72); color: var(--gold-dark); }
.node.locked { color: var(--ink); background: rgba(255,255,255,.62); }
.node-text {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 6px 4px; text-align: left; background: none; border: 0; cursor: pointer; color: var(--ink);
  text-shadow: 0 0 8px rgba(255,255,255,.95), 0 0 2px rgba(255,255,255,.9);
}
.node-text b { font-size: 16px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.node-text small { font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-banner { margin: 0 12px; padding: 9px 12px; gap: 11px; border-radius: 20px; text-decoration: none; color: var(--ink); }
.sec-banner .face { width: 42px; height: 42px; border-radius: 14px; }
.sec-banner small { font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--red); }
.sec-banner b { font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.sec-banner .t > span { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.sec-banner.done { border-color: var(--edge); }
.sec-banner.done .st { background: var(--good); }
.sec-banner.open .st { background: var(--red); }
.sec-banner.locked { opacity: 1; }
.sec-banner.locked .st { color: var(--ink-3); }

/* ---------- player ---------- */
.screen {
  flex: 1; min-height: 0; overflow-y: auto; margin: 0 12px; padding: 18px 16px 18px; border-radius: 24px; scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--red); }
.kicker.story { color: var(--red); }
.q-title { margin: 0 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -.04em; line-height: 1.08; color: var(--ink); }
.prompt { margin: 0 0 16px; font-size: 18.5px; font-weight: 500; line-height: 1.4; letter-spacing: -.01em; }
.sentence, .statement { font-size: 19px; font-weight: 600; line-height: 1.45; }
.screen:has(.wx) .q-title { display: none; }
@media (max-height: 700px) { .q-title { display: none; } }

/* story: the painting runs edge to edge, the text card rides over its foot */
.screen.story-screen { display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.story-screen > .frame { flex: none; width: 100%; aspect-ratio: 4 / 3; margin: 0; border-radius: 0; box-shadow: none; background: var(--surface-2); }
.story-screen > .frame.art { background: var(--indigo-soft); }
.frame .credit { right: 10px; bottom: 26px; padding: 1px 7px; font-size: 10.5px; font-weight: 500; color: var(--ink); background: rgba(255,255,255,.66); }
.frame .stamp { left: 10px; bottom: 26px; font-size: 16px; font-weight: 700; padding: 2px 10px; }
.story-card { position: relative; flex: 1 0 auto; margin: -16px 12px 0; padding: 16px 18px 12px; border-radius: 24px; overflow: hidden; }
.story-card.plain { margin-top: 0; }
.story-card::after, .card.learned::after {
  content: ''; position: absolute; top: 0; right: 0; width: 62px; height: 62px; pointer-events: none;
  background: var(--gamosa) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(225deg, #000 18%, transparent 58%); mask: linear-gradient(225deg, #000 18%, transparent 58%); opacity: .75;
}
h1.t { position: relative; z-index: 1; margin: 2px 0 10px; font-size: 34px; font-weight: 800; line-height: 1.08; letter-spacing: -.04em; }
.story p { font-size: 16.5px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.story p.lede { font-size: 17.5px; font-weight: 500; line-height: 1.48; }
.story p.later { padding-left: 0; border-left: 0; }
.story .yr { font-weight: 700; color: var(--red-deep); }
.story mark { font-weight: 700; }
.story b { font-weight: 700; }
.story .ent { border-bottom-color: var(--red); }
.story .more { font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.story .more::before { color: var(--red); }
.think { display: flex; gap: 12px; align-items: center; margin: 4px 0 8px; padding: 10px 14px; border: 1px solid var(--edge); border-radius: 18px; background: linear-gradient(100deg, rgba(198,233,209,.72), rgba(235,246,236,.6)); }
.think.hold { display: none; }
.think.on { animation: beatIn .35s cubic-bezier(.2,.8,.2,1) both; }
.think-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: linear-gradient(160deg, #27a05a, #177a42); }
.think-ic svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.think b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.think p { margin: 1px 0 0; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.src-link { display: inline-flex; align-items: center; gap: 3px; margin: 4px 0; padding: 4px 0; background: none; border: 0; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }
.src-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.src-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 12px; }
.src-list a { font-weight: 700; color: var(--red-deep); }
.src-list span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.linkback { border-radius: 18px; }

/* answers */
.tile { border: 1.5px solid var(--edge); border-radius: 18px; background: rgba(255,255,255,.62); font-weight: 600; box-shadow: 0 3px 10px rgba(30,70,85,.08), inset 0 1px 0 #fff; }
.tile.sel, .tok.sel { background: var(--terra-soft); border-color: var(--red); color: var(--red-deep); }
.tile.right { position: relative; background: var(--good-soft); border: 2.5px solid var(--good); color: var(--good-ink); }
.tile.wrong { background: var(--bad-soft); border: 2.5px solid var(--bad); color: var(--bad-ink); }
.opt { min-height: 54px; }
.opt .k { background: rgba(255,255,255,.7); border-color: var(--line); }
.pics { gap: 12px; }
.pic { padding: 7px; aspect-ratio: 1 / .94; border-radius: 20px; }
.pic img { border-radius: 14px; }
.pic.right::after { content: ''; position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.500l4.500 4.500L19 7.500'/%3E%3C/svg%3E") center / 18px no-repeat; }
.clue { border: 1px solid var(--edge); background: rgba(255,255,255,.62); }

/* footer: feedback card, then the action */
.foot, .foot.fb-good, .foot.fb-bad { flex-shrink: 0; margin: 0; padding: 10px 12px max(14px, env(safe-area-inset-bottom)); border: 0; background: none; }
.fb { display: none; margin: 0 0 10px; padding: 12px 14px; border-radius: 20px; }
.foot.fb-good .fb { background: linear-gradient(100deg, rgba(198,233,209,.86), rgba(238,248,238,.8)); color: var(--ink); }
.foot.fb-bad .fb { background: linear-gradient(100deg, rgba(251,216,219,.9), rgba(255,243,241,.82)); color: var(--ink); }
.fb-head { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 3px; }
.fb-badge { width: 34px; height: 34px; font-size: 18px; color: #fff; background: var(--good); }
.fb-good .fb-badge { color: #fff; background: linear-gradient(160deg, #27a05a, #177a42); }
.fb-bad .fb-badge { color: #fff; background: var(--bad); }
.fb-xp { padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--red); background: rgba(255,255,255,.72); }
.fb-xp:empty { display: none; }
.fb-ans { color: var(--ink); }
.fb-ans small { letter-spacing: 0; text-transform: none; }
.fb-why { font-size: 14.5px; font-weight: 500; line-height: 1.4; color: var(--ink-2); }
.btn, .fb-good .btn, .fb-bad .btn {
  --c: var(--red); --d: var(--red-deep); --fg: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; height: auto; padding: 12px 20px;
  border: 1px solid rgba(255,255,255,.45); border-radius: 99px; color: var(--fg); font-size: 18px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; text-transform: none;
  background: linear-gradient(180deg, #e9333b, #c5141f); box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 7px 16px rgba(176,18,29,.3);
}
.btn svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.14); }
.btn:disabled { background: rgba(255,255,255,.55); color: var(--ink-3); border-color: var(--edge); box-shadow: none; opacity: 1; }
.btn-ghost { display: block; width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid var(--edge); border-radius: 99px; background: rgba(255,255,255,.36); font-size: 15px; font-weight: 500; color: var(--ink-2); cursor: pointer; }

/* ---------- complete ---------- */
/* the seal rises behind the header, on a brighter veil so the headline stays clear of the painting */
#v-done { position: relative; background: radial-gradient(120% 56% at 50% 20%, rgba(255,255,255,.74), rgba(255,255,255,.3) 72%, transparent); }
.done-top { position: absolute; left: 0; right: 0; top: 0; z-index: 2; background: none !important; border: 0; box-shadow: none; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.done-wrap { flex: 1; min-height: 0; margin: 0; padding: 14px 14px 6px; background: none; border: 0; box-shadow: none; }
.done-art { width: 196px; height: 186px; margin: 0; flex: none; }
.done-art.miss { filter: saturate(.25); }
.done-wrap h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; color: var(--ink); }
.sub { margin: 3px 0 12px; font-size: 16.5px; font-weight: 500; color: var(--ink-2); }
.cp-note { width: 100%; }
.stats { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.stat { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 18px; text-align: left; overflow: visible; }
.stat-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.68); }
.stat-ic svg { width: 28px; height: 28px; }
.stat .v { padding: 0; font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--red); }
.stat .h { padding: 0; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-2); background: none; }
.stat.xp .v { color: var(--red); }
.pf-stats { gap: 8px; }
.pf-stats .stat { display: block; text-align: center; padding: 10px 6px; }
.pf-stats .stat .v { font-size: 22px; color: var(--c); }
.card { position: relative; margin-bottom: 8px; padding: 12px 16px; border-radius: 20px; overflow: hidden; }
.card h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; letter-spacing: -.02em; text-transform: none; color: var(--ink); }
.card ul { gap: 6px; font-size: 14px; font-weight: 500; }
.learned li { position: relative; padding-left: 30px; line-height: 1.35; }
.learned li::before {
  content: ''; position: absolute; left: 0; top: -1px; width: 22px; height: 22px; margin: 0; border-radius: 50%;
  background: linear-gradient(160deg, #27a05a, #177a42) ; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
  -webkit-mask: none;
}
.learned li::after { content: ''; position: absolute; left: 5px; top: 4px; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13l5.500 5.500L20 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.prog-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.prog-h b { font-weight: 600; color: var(--ink); }
.prog-dots { display: flex; align-items: center; justify-content: space-between; margin: 10px 2px 2px; background: linear-gradient(rgba(40,70,85,.16), rgba(40,70,85,.16)) center / 100% 3px no-repeat; }
.prog-dots i { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.85); border: 1.5px solid var(--line-2); }
.prog-dots i.on { background: var(--red); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(216,32,43,.4); }
.done-meta { margin: 2px 0 0; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
#v-done .foot { padding-top: 6px; }

/* ---------- home, subject and course pages ---------- */
.home-hero, .c-hero, .hero { color: var(--ink); }
.home-hero, .c-hero { margin: 0 12px 12px; padding: 20px 18px; border-radius: 24px; }
.home-hero h1, .c-hero h1 { margin: 2px 0 6px; font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1.08; color: var(--ink); }
.home-hero p, .c-hero p { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.4; color: var(--ink-2); opacity: 1; }
.home-hero p b { font-weight: 700; color: var(--red-deep); }
.home-hero .eyebrow, .c-hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--red); opacity: 1; }
.home-hero .roof, .c-hero .roof { display: none; }
.c-hero .count { color: var(--ink-2); opacity: 1; }
.exam-chips { margin-top: 12px; }
.exam-chip { min-height: 36px; border-radius: 99px; font-weight: 600; }
.exam-chip:not(.on) { color: var(--ink-2); background: rgba(255,255,255,.5); border: 1px solid var(--edge); }
.exam-chip.on, .tab.on { background: var(--red); border-color: var(--red); color: #fff; }
.sec-title { margin-left: 18px; font-size: 19px; font-weight: 700; letter-spacing: -.025em; color: var(--ink); text-shadow: 0 0 8px rgba(255,255,255,.9); }
.resume, .review-card, .cp-card { margin: 0 12px 10px; padding: 12px 14px; border-radius: 22px; color: var(--ink); text-decoration: none; }
.resume small { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--red); }
.resume b { font-weight: 700; letter-spacing: -.02em; }
.resume .t > span:not(.meter), .review-card .s, .cp-card .s { font-weight: 500; color: var(--ink-2); }
.resume .go, .review-card .go { color: #fff; background: var(--red); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.review-card { border-color: var(--edge); }
.review-card .ic, .cp-card .ic { color: var(--red); background: rgba(255,255,255,.7); border-radius: 50%; }
.subj-grid, .tools { margin: 0 12px 6px; gap: 8px; }
.subj, .tool { padding: 12px; border-radius: 20px; color: var(--ink); text-decoration: none; }
.subj.soon { border-style: solid; }
.subj .ic { color: var(--red); background: rgba(255,255,255,.66); border-radius: 50%; }
.subj b, .tool b { font-weight: 700; letter-spacing: -.015em; }
.subj .s, .tool .s { font-weight: 500; color: var(--ink-2); }
.pill { font-weight: 600; color: var(--ink-2); }
.subj .pill { background: rgba(255,255,255,.6); }
.subj.soon .pill, .tool .pill { background: rgba(255,255,255,.6); color: var(--ink-2); }
.course-row { border-radius: 20px; margin-left: 12px; margin-right: 12px; color: var(--ink); text-decoration: none; }
.course-row .t > span:not(.meter), .course-row small { color: var(--ink-2); font-weight: 500; }
.tabs { margin: 0 12px 10px; padding: 4px; border-radius: 20px; }
.tab { min-height: 42px; border-radius: 16px; font-weight: 600; color: var(--ink-2); }
.era-head { margin: 0 12px 8px; width: calc(100% - 24px); border-radius: 20px; color: var(--ink); }
.era-head .t { font-weight: 700; letter-spacing: -.015em; }
.era-head .p { font-weight: 500; color: var(--ink-2); }
.era-bar { background: rgba(40,70,85,.14); }
.era-bar i { background: var(--red); }
.king { margin-left: 12px; margin-right: 12px; border-radius: 20px; border-bottom-width: 1px; color: var(--ink); text-decoration: none; }
.king .who b { font-weight: 700; letter-spacing: -.015em; }
.king .who .sub2 { font-weight: 500; color: var(--ink-2); }
.king .state { font-weight: 600; color: var(--red-deep); }
.acc-row { color: var(--ink); text-decoration: none; }
.acc-row span:first-child { font-weight: 500; }
.tab-intro { margin-left: 18px; margin-right: 18px; color: var(--ink); font-weight: 500; text-shadow: 0 0 8px rgba(255,255,255,.9); }
.note { color: var(--ink-2); }
.big-num { color: var(--ink); }
.big-num span { color: var(--ink-3); }
.cal i { background: rgba(40,70,85,.12); }
.cal i.l1 { background: #f4b1b4; } .cal i.l2 { background: #e8646b; } .cal i.l3 { background: var(--red); }
#settings.btn { width: calc(100% - 24px); margin: 4px 12px 10px; }
.p-foot { margin: 10px 18px 16px; padding: 0; background: none; font-size: 11.5px; font-weight: 500; line-height: 1.45; text-align: center; color: var(--ink); text-shadow: 0 0 6px rgba(255,255,255,.95); }
.gate-card { margin: 8px 12px 0; padding: 12px 14px; border-radius: 20px; color: var(--ink); }

/* ---------- sheets and small parts ---------- */
.backdrop { background: rgba(25,45,55,.32); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.sheet { border-radius: 26px 26px 0 0; }
.sheet h2 { font-weight: 800; letter-spacing: -.03em; }
.seg { border: 1px solid var(--line); border-radius: 99px; }
.seg button { color: var(--ink-2); font-weight: 600; }
.seg button.on { background: var(--red); color: #fff; }
.link { color: var(--ink-2); }
.link.danger { color: var(--red-deep); }
#v-empty .empty-pane { color: var(--ink); }
.reference-controls [aria-selected=true] { background: var(--red) !important; color: #fff; }
.reference-year, .reference-entry a { color: var(--red-deep); }
:is(button, a, input, select, label.lang):focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (min-width: 1000px) {
  .device.lesson-page:not(.virtual) #v-path { border-right: 1px solid var(--edge); }
  #v-empty .empty-pane { background: var(--glass-strong); padding: 28px; border-radius: 24px; margin: auto 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* ---------- list details ---------- */
.subj, .tool { border-color: var(--edge); }
.sec-title { text-transform: none; letter-spacing: -.025em; }
.era-sec { margin: 0 12px 8px; }
.era-head { margin: 0; width: 100%; padding: 12px 14px; }
.era-sec .kings { padding: 8px 0 0; }
.kings { padding: 0 12px 16px; }
.king { margin: 0; }
.king .state { padding: 6px 8px; font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.acc-row { grid-template-columns: 1fr auto 16px; }
.card .note, .note { font-weight: 500; line-height: 1.45; font-size: 14.5px; }
.big-num { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.cal { max-width: 252px; gap: 4px; }

/* the painting fills wide layouts and landscape phones */
@media (min-width: 1000px), (orientation: landscape) {
  .device { background-size: cover; background-position: center 34%; }
}
.story-card { flex: 0 0 auto; }
.story-card.plain { flex: 1 0 auto; margin-bottom: 0; }

/* reference page: the long list sits on one glass sheet */
.reference-controls { margin: 0 12px 8px; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 22px; background: var(--glass-strong); box-shadow: var(--lift); -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost); }
.reference-controls [role=tab], .reference-controls [aria-selected] { border-radius: 99px; }
.reference-controls input[type=search], .reference-controls select { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); }
.reference-controls .tabs { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.reference-controls .tabs button { border: 1px solid var(--edge); border-radius: 99px; background: rgba(255,255,255,.6); font-weight: 600; }
.reference-entry { margin: 0 12px 6px; padding: 11px 14px; border: 1px solid var(--edge); border-radius: 18px; background: var(--glass-strong); box-shadow: 0 4px 14px rgba(30,70,85,.08); }

/* Bengali script needs more room between heading lines than the Latin setting */
body:has(#as:checked) :is(h1.t, .q-title, .lesson-page .hero h1, .done-wrap h1) { line-height: 1.28; letter-spacing: -.01em; }
/* short phones: smaller seal and painting, so the answer stays near the thumb */
@media (max-height: 720px) {
  .done-art { width: 132px; height: 125px; }
  .story-screen > .frame { aspect-ratio: 16 / 9; }
}

/* course pages: the back link sits on pale glass; a long XP total must not push the language switch out */
.home-page .p-top { gap: 6px; }
.home-page .p-top .brand { flex: 0 1 auto; min-width: 0; padding-left: 8px; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; }
.home-page .p-top .icon-btn { width: 36px; min-width: 36px; }

/* ---------- game layer: today card, levels, badges (app/common.js game layer) ---------- */
.today { margin: 4px 12px 12px; padding: 14px; border-radius: 24px; background: var(--glass-strong); border: 1px solid var(--edge); box-shadow: var(--lift); -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost); }
.today-top { display: flex; gap: 14px; align-items: center; }
.ring { --p: 0; flex: none; width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--good) calc(var(--p) * 1%), rgba(31,138,76,.14) 0); }
.ring > span { width: 66px; height: 66px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.ring b { font-size: 20px; color: var(--good-dark); } .ring small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.today-stats { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.t-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-fire { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 17px; color: var(--ink-3); }
.t-fire svg { width: 20px; height: 20px; } .t-fire.on { color: #ef4a23; }
.t-lbl { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.t-freeze { font-size: 12.5px; font-weight: 700; color: #2a7bb0; }
.t-next { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.today-stats .lvl-bar { flex: none; }
.lvl-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--indigo); color: #fff; font-size: 12.5px; font-weight: 800; }
.lvl-chip.goal { background: var(--good); min-width: 34px; }
.lvl-bar { display: block; flex: 1; height: 9px; border-radius: 99px; background: rgba(47,74,92,.13); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f0a92a, var(--gold)); transition: width .6s; }
.lvl-bar.goal i { background: linear-gradient(90deg, #4cc47d, var(--good)); }
.streak-risk { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 10px; border-radius: 14px; background: #fff1e6; color: #a8431b; font-size: 13.5px; font-weight: 600; }
.streak-risk svg { flex: none; width: 20px; height: 20px; color: #ef4a23; }
.go-now { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 12px 12px 14px; border-radius: 20px; background: var(--red); color: #fff; text-decoration: none; box-shadow: 0 4px 0 var(--red-deep), 0 10px 24px rgba(216,32,43,.25); }
.go-now:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--red-deep); }
.g-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.g-txt small { font-size: 12px; font-weight: 600; opacity: .9; } .g-txt b { font-size: 17px; line-height: 1.25; } .g-txt > span { font-size: 13px; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-btn { flex: none; padding: 9px 14px; border-radius: 99px; background: #fff; color: var(--red); font-weight: 800; font-size: 15px; }
.goal-done { margin: 10px 2px 0; font-size: 13.5px; font-weight: 600; color: var(--good-dark); }
.card.wins { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.win { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--gold-soft); animation: win-pop .5s cubic-bezier(.2,1.4,.4,1) both; }
.win.goal { background: var(--good-soft); } .win.level-up { background: var(--indigo-soft); }
.win-ic { font-size: 26px; line-height: 1; } .win b { display: block; font-size: 15px; } .win span { font-size: 13px; color: var(--ink-2); }
@keyframes win-pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.no-motion .win { animation: none; }
.lvl-line { display: flex; align-items: center; gap: 8px; } .lvl-num { font-size: 12px; font-weight: 700; color: var(--ink-2); min-width: 54px; text-align: right; }
.lvl-card .lvl-big { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.lvl-num-big { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--indigo); color: #fff; font-size: 24px; font-weight: 800; }
.lvl-big small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; } .lvl-big b { font-size: 18px; }
.lvl-card .note { margin: 8px 0 0; font-size: 13px; }
.bdg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bdg { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 4px; border-radius: 16px; background: rgba(47,74,92,.06); filter: grayscale(1); opacity: .5; }
.bdg.on { filter: none; opacity: 1; background: var(--gold-soft); }
.b-ic { font-size: 28px; line-height: 1.1; } .bdg b { font-size: 12.5px; line-height: 1.2; } .bdg small { font-size: 10.5px; color: var(--ink-3); line-height: 1.25; }
.card .setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; font-weight: 600; font-size: 14px; }
.card .seg { display: flex; overflow: hidden; } .card .seg button { border: 0; background: none; padding: 6px 10px; cursor: pointer; }

/* ---------- account ---------- */
.acct { display: flex; align-items: center; gap: 10px; }
.acct-face, .p-face { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: visible; display: grid; place-items: center; background: var(--indigo-soft); color: var(--indigo); }
.acct-face img, .p-face img, .o-face img, .m-face img, .ps-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.acct-face svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.acct-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .acct-t small { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.acct .link { width: auto; margin: 0; }
.btn.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.btn.google svg { width: 22px; height: 22px; }
.signin-err { margin: 10px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--bad-soft); color: var(--bad-ink); font-size: 13.5px; font-weight: 600; line-height: 1.4; }

/* ---------- Community ---------- */
.cm-tabs { margin: 0 12px 10px; } .cm-tabs .tab { position: relative; }
.dot { position: absolute; top: 8px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
#cm-body { padding: 0 12px; } #cm-body > .card { margin-bottom: 10px; } .cm-load { text-align: center; padding: 20px; }
.online-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 4px; }
.o-face { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; cursor: pointer; }
.o-face img, .o-face .initial { width: 46px; height: 46px; border: 2px solid var(--good); }
.o-face small { font-size: 11px; font-weight: 600; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.initial { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--indigo); color: #fff; font-weight: 800; font-size: 17px; }
.person { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 2px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); }
.person:first-of-type { border-top: 0; } .person.me { background: rgba(216,32,43,.06); border-radius: 12px; } .person.unread b { color: var(--red); }
.p-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .p-t b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-t small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; border: 2px solid #fff; }
.rank { flex: none; min-width: 28px; text-align: center; font-weight: 800; color: var(--ink-2); font-size: 15px; }
.wxp, .when { flex: none; font-size: 12.5px; font-weight: 700; color: var(--gold-dark); } .when { color: var(--ink-3); font-weight: 600; }
.cm-rule { padding: 0 6px 12px; font-size: 12.5px; color: var(--ink-3); }
.room-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; } .room-chips .exam-chip { flex: none; padding: 0 12px; border: 1px solid var(--edge); background: var(--glass-strong); cursor: pointer; }
.room-chips .exam-chip.on { background: var(--red); color: #fff; }
.chat { display: flex; flex-direction: column; gap: 8px; min-height: 240px; padding: 10px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--edge); }
.chat.dm { margin: 0 12px; }
.msg { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; } .msg.mine { flex-direction: row-reverse; }
.m-face { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; } .m-face .initial { font-size: 13px; }
.cm-bubble { max-width: 76%; padding: 7px 11px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.msg.mine .cm-bubble { border-radius: 16px 16px 4px 16px; background: #fde3e4; }
.cm-bubble b { display: block; font-size: 12.5px; color: var(--indigo); } .cm-bubble b small { color: var(--ink-3); font-weight: 600; }
.cm-bubble p { margin: 1px 0 0; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.m-when { display: block; margin-top: 2px; font-size: 10.5px; color: var(--ink-3); text-align: right; }
.m-more { flex: none; width: 26px; height: 26px; border: 0; background: none; color: var(--ink-3); font-size: 16px; cursor: pointer; border-radius: 50%; }
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 12px; }
.chat.dm + .composer { padding: 10px 12px 12px; }
.composer input { flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-size: 15px; }
.composer .btn.send { width: 48px; min-width: 48px; min-height: 46px; padding: 0; margin: 0; border-radius: 50%; display: grid; place-items: center; }
.dm-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 8px 10px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--edge); }
.dm-head .p-face { width: 34px; height: 34px; }
.person-sheet .ps-face { width: 72px; height: 72px; margin: 0 auto 6px; } .person-sheet .ps-face .initial { font-size: 28px; }
.person-sheet h2 { margin: 0 0 10px; } .person-sheet .pf-stats { margin: 0 0 12px; }
.nick { display: flex; flex-direction: column; gap: 4px; text-align: left; font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.nick input { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); font: inherit; font-size: 15px; }
.person-sheet .setting { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-weight: 600; }
.person-sheet .seg { display: flex; overflow: hidden; } .person-sheet .seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; }
.link.danger { color: var(--bad); }

/* ---------- first-visit onboarding (app/home.js onboarding()) ---------- */
.onb { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.82) 40%, rgba(255,255,255,.92)), url('../content/media/interface/axom-river.webp') center / cover; }
.onb-top { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; min-height: 44px; }
.onb-dots { display: flex; justify-content: center; gap: 6px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(47,74,92,.2); transition: width .3s, background .3s; }
.onb-dots i.on { width: 26px; background: var(--red); } .onb-dots i.done { background: var(--red); opacity: .45; }
.onb-skip { border: 0; background: none; padding: 8px 4px; font-weight: 700; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.onb-body { flex: 1; overflow-y: auto; padding: 8px 2px; animation: onb-in .35s ease both; }
@keyframes onb-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.no-motion .onb-body { animation: none; }
.onb-hero { position: relative; text-align: center; padding: 26px 16px 18px; margin-bottom: 18px; border-radius: 26px; background: var(--red); color: #fff; overflow: hidden; box-shadow: 0 12px 30px rgba(216,32,43,.28); }
.onb-hero .roof { position: absolute; top: 6px; left: 0; width: 100%; height: 22px; opacity: .6; }
.onb-logo { width: 64px; height: 64px; margin: 8px auto 8px; border-radius: 20px; display: grid; place-items: center; background: #fff; color: var(--red); font-family: var(--font-as); font-size: 38px; font-weight: 800; }
.onb-hero h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.02em; } .onb-hero p { margin: 0; font-size: 15px; line-height: 1.45; opacity: .95; }
.onb-q { margin: 6px 0 12px; font-size: 19px; text-align: center; } .onb-q.big { margin: 14px 0 6px; font-size: 23px; line-height: 1.25; text-align: left; letter-spacing: -.02em; }
.onb-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.onb-hint { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.onb-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .onb-opts.col { grid-template-columns: 1fr; }
.onb-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; border-radius: 20px; border: 2px solid var(--edge); background: var(--glass-strong); box-shadow: var(--lift); cursor: pointer; color: var(--ink); font-size: 17px; transition: transform .1s, border-color .2s; }
.onb-opt:active { transform: scale(.98); } .onb-opt.on { border-color: var(--red); background: #fff5f5; }
.onb-opt.row { flex-direction: row; text-align: left; padding: 14px 14px; gap: 12px; }
.o-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--indigo-soft); font-size: 24px; font-weight: 800; color: var(--indigo); }
.o-t { flex: 1; display: flex; flex-direction: column; } .o-t small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.onb-opt.row > b { flex: 1; } .o-go { color: var(--ink-3); font-size: 22px; font-weight: 700; }
.how-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.how { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--edge); }
.h-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); font-size: 21px; }
.how b { display: block; font-size: 15.5px; } .how small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); font-weight: 500; }
.onb-first { margin-top: 14px; padding: 12px 14px; border-radius: 18px; border: 2px dashed rgba(216,32,43,.4); background: #fff5f5; }
.onb-first small { display: block; font-size: 12.5px; font-weight: 700; color: var(--red); } .onb-first b { font-size: 17px; }
.onb-foot { padding-top: 10px; } .onb-foot .btn { width: 100%; margin: 0; } .onb-start svg { margin-left: 4px; }

/* The study homepage pairs a river print with a paper-coloured course catalogue. */
.study-home { --paper: #faf8f1; --forest: #153f38; --rule: #dcdcd0; background: var(--paper); }
.study-home::before, .study-home::after, .study-home .stage::after { display: none; }
.study-home .stage { padding: 0; }
.study-home .device {
  width: 100%; height: 100dvh; background: var(--paper); border: 0; border-radius: 0; box-shadow: none;
}
.study-home #course, .study-home .p-top {
  width: min(100%, 1080px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 44px);
}
.study-home .p-top {
  border: 0; border-radius: 0; background: var(--paper); box-shadow: none; backdrop-filter: none;
}
.study-home .p-top { border-bottom: 1px solid var(--rule); margin-block: 0 12px; }
.study-home .p-top .brand { padding-left: 0; color: var(--forest); font: bold clamp(20px, 3vw, 29px)/1 Georgia, serif; letter-spacing: -.05em; }
.study-home .nav-bar { background: var(--paper); border-top-color: var(--rule); } .study-home .nav-bar a { max-width: 200px; width: 100%; margin-inline: auto; }
.study-feature { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: var(--forest); border-radius: 18px; color: #fff9e8; }
.study-copy { align-self: center; padding: clamp(22px, 4vw, 44px); }
.study-copy small { font-weight: 700; color: #f3ce83; }
.study-copy h1, .study-home .sec-title { font-family: Georgia, "Noto Sans Bengali", serif; letter-spacing: -.035em; text-transform: none; }
.study-copy h1 { font-size: clamp(30px, 4vw, 52px); line-height: 1.12; margin: 8px 0; color: inherit; }
.study-copy p { margin: 0; font-size: 14px; line-height: 1.5; color: #e3ece3; }
.study-start { margin-top: 20px; display: inline-flex; align-items: center; gap: 24px; border-radius: 8px; background: #ffdb91; color: #193b30; font-weight: 800; padding: 12px 18px; text-decoration: none; }
.study-art { background: url('../content/media/interface/brahmaputra-ferry.webp') 75% center / cover; min-height: 190px; }
.study-home .today { margin: 12px 0 22px; padding: 12px 18px; background: #f0efe5; border: 0; border-radius: 14px; box-shadow: none; backdrop-filter: none; }
.study-home .ring { width: 56px; height: 56px; }
.study-home .ring > span { width: 46px; height: 46px; background: #faf8f1; }
.study-home .ring b { font-size: 16px; }
.study-home .today-stats { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 18px; }
.study-home .sec-title { margin: 22px 0 10px; font-size: clamp(23px, 3vw, 34px); color: var(--forest); text-shadow: none; }
.study-home .exam-chips { margin: 0 0 14px; padding: 0; flex-wrap: wrap; }
.study-home .exam-chip { border: 1px solid var(--rule); background: #fffdf7; }
.study-home .exam-chip.on { background: var(--forest); border-color: var(--forest); }
.study-home .subj-grid, .study-home .tools { margin: 0; gap: 10px; }
.study-home .subj, .study-home .tool { border: 1px solid var(--rule); background: #fffef9; padding: clamp(13px, 2vw, 22px); border-radius: 12px; box-shadow: none; backdrop-filter: none; }
.study-home .subj .ic { color: var(--forest); background: color-mix(in srgb, var(--c) 20%, #fbf8ed); border-radius: 10px; }
.study-home .subj .pill { padding-inline: 0; background: none; }
.study-home .subj b { font-size: 17px; }
.study-home a.subj:hover, .study-home a.subj:focus-visible { border-color: var(--forest); background: #f5f6ed; }
.study-home .onb { width: min(100%, 540px); margin-inline: auto; background: var(--paper); box-shadow: 0 0 0 100vmax #183c35ad; }
.study-home .onb-hero { padding-top: 120px; background: linear-gradient(transparent, #143f38 65%), url('../content/media/interface/brahmaputra-ferry.webp') center 62% / cover; box-shadow: none; }
.study-home .onb-logo, .study-home .onb-hero .roof { display: none; }
@media (max-width: 600px) {
  .study-feature { grid-template-columns: 1fr; }
  .study-art { grid-row: 1; min-height: 108px; background-position: center 56%; }
  .study-copy { padding: 16px 18px 18px; }
  .study-start { margin-top: 12px; }
}

/* home subject tiles and subject course tiles (glass theme) */
.subj-tile .ic, .course-tile .ic { color: var(--red); background: none; }
/* subjects on Home: the icon and its name, no card behind them */
.subj-tile { padding: 8px 4px; } .subj-tile .ic { width: 76px; height: 76px; border-radius: 22px; }
.subj-tile b, .course-tile b { font-weight: 700; letter-spacing: -.015em; }
.ring-mini { background: conic-gradient(var(--red) calc(var(--p) * 1%), rgba(40,70,85,.14) 0); }

/* ---------- answer feedback: the button says Correct / Wrong + XP; a wrong answer shows one line above it ---------- */
.blank input:focus, .blank input:focus-visible { outline: none; }
.fb-head, .fb-why { display: none !important; }
.foot.fb-good .fb, .fb:has(.fb-ans:empty) { display: none; }
.foot.fb-bad .fb { display: block; margin: 0 0 10px; padding: 10px 14px; border-radius: 16px; }
.fb-ans { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.fb-k { font-weight: 700; color: var(--bad-ink, #9b1c1c); }

/* ---------- lesson page: every lesson is a banner followed by its open units ---------- */
.path > .sec.here { margin: 0 0 10px; }
.path > .units { position: relative; z-index: 1; padding: 6px 0 4px; }
.path > .units .node-wrap:last-child { margin-bottom: 14px; }
a.node, a.node-text { text-decoration: none; }
a.node-text { color: var(--ink); }

.home-page .p-scroll { padding-bottom: 0; }
.home-page #course { padding-bottom: 6px; }

/* ---------- today's study list on Home and the complete screen (app/plan.js) ---------- */
.home-page .today.day, .home-page .today.left { margin: 12px 14px; }
.day-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-t { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--ink); }
.day-exam { flex: none; padding: 4px 11px; border-radius: 99px; background: var(--indigo-soft); color: var(--indigo); font-size: 13px; font-weight: 700; }
.day-sum { margin: 2px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.day-list { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 4px; }
.day-list li { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 14px; }
.day-list li.now { background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 2px var(--red); }
.day-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.75); font-size: 17px; }
.day-list li.done .day-ic { background: var(--good); color: #fff; }
.day-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.day-x { flex: 1; min-width: 0; } .day-x b { display: block; font-size: 15.5px; line-height: 1.3; } .day-x small { display: block; font-size: 13px; line-height: 1.35; font-weight: 500; color: var(--ink-2); }
.day-list li.done b, .day-list li.done small { color: var(--ink-3); }
.day-min { flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
a.btn.day-go { text-decoration: none; }
.day-tom { margin: 4px 0 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.day-exams { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; } .day-exams .exam-chip { padding: 0 14px; cursor: pointer; }
.home-page .day-h { margin: 20px 18px 0; font-size: 17px; font-weight: 700; color: var(--ink); } .day-h + .subj-tiles { margin-top: 10px; }
details.left summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 28px; cursor: pointer; font-size: 15.5px; list-style: none; } details.left summary::-webkit-details-marker { display: none; }
details.left summary span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); } details.left summary > span:last-of-type::after { content: " ▾"; } details.left[open] summary > span:last-of-type::after { content: " ▴"; }
.left-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 0 8px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; } details.left .left-row:first-of-type { margin-top: 10px; }
.left-row b { display: block; font-size: 14.5px; } .left-row small { font-size: 12.5px; font-weight: 500; color: var(--ink-2); } .left-n { font-size: 13px; font-weight: 700; color: var(--ink-2); } .left-row .lvl-bar { grid-column: 1 / -1; height: 6px; }
.card .exam-chips { padding: 0; } .card .seg button.on { background: var(--red); color: #fff; }
details.left summary span { flex: none; } details.left summary b { font-weight: 700; color: var(--ink); line-height: 1.3; }
/* the complete screen scrolls: its cards keep their height instead of being squeezed and cut off */
.done-wrap > * { flex-shrink: 0; }

/* ---------- the way back: a thin arrow without text ---------- */
.back-arrow { flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); border-radius: 50%; text-decoration: none; }
.back-arrow svg, .p-top .back-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.subj-head { display: flex; align-items: center; gap: 4px; margin: 10px 12px 6px 8px; } .subj-head h1 { margin: 0; line-height: 1.2; }
/* ---------- a unit on the lesson path: its name, and a red button when it is the one to start ---------- */
.unit-body { flex: 1; min-width: 0; } .unit-body .node-text { width: 100%; }
.unit-act { padding: 2px 4px 6px; } .unit-act p { margin: 0 0 8px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-2); text-shadow: 0 0 8px #fff, 0 0 3px #fff; }
.unit-act .btn { display: inline-flex; width: auto; height: auto; min-height: 40px; padding: 6px 18px; font-size: 14.5px; text-decoration: none; } .unit-act .btn svg { width: 19px; height: 19px; }

/* ---------- weak points ---------- */
.wk-link { display: block; color: var(--ink); text-decoration: none; }
.wk-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; } h3 + .wk-row { border-top: 0; padding-top: 4px; }
.wk-row b { display: block; font-size: 15px; line-height: 1.3; } .wk-row small { display: block; font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--ink-2); }
.wk-pct { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.wk-go { padding: 6px 12px; border-radius: 99px; background: var(--terra-soft); color: var(--red-deep); font-size: 13px; font-weight: 600; }
.wk-all { display: block; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--red-deep); text-decoration: none; }
.wk-subject summary { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; align-items: center; cursor: pointer; list-style: none; } .wk-subject summary::-webkit-details-marker { display: none; }
.wk-subject > summary > b { font-size: 16px; } .wk-subject > summary small { font-size: 12.5px; font-weight: 600; color: var(--bad); } .wk-subject > summary .wk-bar { grid-column: 1 / 3; grid-row: 2; width: 100%; height: 7px; } .wk-subject > summary .wk-pct { grid-column: 3; grid-row: 2; }
.wk-bar i { background: var(--gold); } .wk-bar.weak i { background: var(--bad); } .wk-bar.strong i { background: var(--good); }
.wk-topic { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); } .wk-topic h4 { display: grid; grid-template-columns: 1fr 64px auto; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); } .wk-topic .wk-bar { height: 5px; }
.wk-lesson summary { display: flex; align-items: center; gap: 10px; padding: 8px 0; } .wk-lesson summary b { flex: 1; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.wk-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); } .wk-dot.weak { background: var(--bad); } .wk-dot.learning { background: var(--gold); } .wk-dot.strong { background: var(--good); }
.wk-tag { flex: none; font-size: 12px; font-weight: 600; color: var(--ink-3); } .wk-tag.weak { color: var(--bad); } .wk-tag.learning { color: var(--gold-dark); } .wk-tag.strong { color: var(--good-dark); } .wk-tag.new { max-width: 96px; text-align: right; line-height: 1.25; }
.wk-unit { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 0 4px 20px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; } .wk-unit span:nth-child(2) { flex: 1; }

/* ---------- drawn icons ---------- */
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.day-ic .ico, .review-card .ic .ico { width: 19px; height: 19px; stroke-width: 1.7; } .day-ic { color: var(--red-deep); } .o-ic .ico { width: 25px; height: 25px; } .h-ic { color: var(--gold-dark); } .h-ic .ico { width: 22px; height: 22px; }
.b-ic { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 4px; border-radius: 50%; color: var(--gold-dark); background: radial-gradient(circle at 35% 28%, #fff8e3, #f3d48a); box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px #dcb55c; } .b-ic .ico { width: 25px; height: 25px; }
.win-ic .ico, .gift-ic .ico { width: 26px; height: 26px; } .win-ic, .gift-ic { color: var(--gold-dark); }
.rank.r1, .rank.r2, .rank.r3 { width: 28px; height: 28px; line-height: 28px; border-radius: 50%; color: #fff; font-size: 13px; } .rank.r1 { background: #c8961e; } .rank.r2 { background: #8b98a1; } .rank.r3 { background: #a9703c; }
/* ---------- planning pages: plain paper, flat cards, one heading ---------- */
.study-home :is(.card, .course-tile, .review-card) { background: #fffdf8; border: 1px solid var(--rule); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.study-home .home-hero { margin: 4px 14px 10px; padding: 6px 4px; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } .study-home .home-hero h1, .study-home .subj-head h1 { font-size: 28px; } .study-home .tab-intro { text-shadow: none; }
.study-home .stat, .study-home .bdg { box-shadow: none; } .study-home .bdg { background: none; padding: 8px 2px; } .study-home .bdg.on { background: none; }
@media (min-width: 560px) { .study-home .device.home-page { width: 100%; } }
/* ---------- small movement: a tick that draws itself, and pages that settle in ---------- */
.day-list li.done .day-ic svg path { stroke-dasharray: 26; animation: drawTick .5s ease-out both .15s; } @keyframes drawTick { from { stroke-dashoffset: 26; } }
.study-home #course > * { animation: settle .32s ease-out both; } .study-home #course > *:nth-child(2) { animation-delay: .04s; } .study-home #course > *:nth-child(n+3) { animation-delay: .08s; } @keyframes settle { from { opacity: 0; transform: translateY(6px); } }
.btn:active, .wk-go:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { .study-home #course > *, .day-list li.done .day-ic svg path { animation: none; } }

/* ---------- daily reminder ---------- */
.day-remind { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; } .day-remind span { flex: 1; line-height: 1.35; } .day-remind .ico { margin-right: 6px; color: var(--red-deep); }
.day-remind button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px; background: none; font-weight: 600; font-size: 14px; cursor: pointer; } .day-remind button:first-of-type { border-color: var(--red); background: var(--red); color: #fff; }
.card input[type=time] { min-height: 38px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 12px; background: none; font: inherit; font-weight: 600; color: var(--ink); }
.btn-ghost svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }

/* ---------- brand in the top bar ---------- */
.brand, .home-page .p-top .brand, .study-home .p-top .brand { display: inline-flex; align-items: center; gap: 7px; flex: none; overflow: visible; } .brand img { width: 32px; height: 32px; flex: none; }
@media (max-width: 400px) { .study-home .p-top .brand { font-size: 20px; gap: 5px; } .study-home .p-top .brand img { width: 26px; height: 26px; } .home-page .p-top { gap: 4px; } }
/* ---------- small loading mark: three steps lighting up ---------- */
.spin { display: inline-flex; align-items: flex-end; gap: 4px; height: 22px; } .spin i { width: 22px; height: 5px; border-radius: 2px; background: var(--red); opacity: .2; animation: btStep 1.8s ease-in-out infinite; }
.spin i:nth-child(2) { width: 30px; animation-delay: .2s; } .spin i:nth-child(1) { width: 14px; animation-delay: .4s; } .spin { flex-direction: column; align-items: center; justify-content: flex-end; }
@keyframes btStep { 0%, 8% { opacity: .2; } 24%, 66% { opacity: 1; } 86%, 100% { opacity: .2; } }
/* ---------- Profile: Profile / My progress ---------- */
.pf-toggle { display: flex; margin: 0 14px 12px; padding: 4px; border-radius: 99px; background: #efece2; } .pf-toggle button { flex: 1; min-height: 40px; border: 0; border-radius: 99px; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; } .pf-toggle button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(30,40,40,.14); }
.pg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 14px 6px; } .pg-stat { padding: 10px 4px; border-radius: 14px; background: #fffdf8; border: 1px solid var(--rule); text-align: center; } .pg-v { font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); } .pg-v .of { display: inline; font-size: 13px; color: var(--ink-3); font-weight: 600; } .pg-stat small { display: block; font-size: 11.5px; line-height: 1.25; font-weight: 600; color: var(--ink-2); }
.pg-head { display: flex; align-items: center; gap: 12px; } .pg-ic { flex: none; width: 46px; height: 46px; border-radius: 13px; overflow: hidden; } .pg-ic img, .pg-ic svg { width: 100%; height: 100%; } .pg-t { flex: 1; min-width: 0; } .pg-t b { display: block; font-size: 15.5px; line-height: 1.3; } .pg-t small { display: block; font-size: 12.5px; line-height: 1.35; font-weight: 500; color: var(--ink-2); }
.pg-pct { flex: none; font-size: 14px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; } .pg-pct.big { font-size: 20px; color: var(--ink); }
.pg-bar { display: block; height: 7px; margin: 10px 0 4px; border-radius: 99px; background: rgba(47,74,92,.12); overflow: hidden; } .pg-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e9333b, var(--red-deep)); }
.pg-course { border-top: 1px solid var(--line); } .pg-course summary { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; padding: 12px 0 6px; list-style: none; cursor: pointer; } .pg-course summary::-webkit-details-marker { display: none; } .pg-course summary .pg-bar { grid-column: 1 / -1; height: 5px; margin: 6px 0 2px; } .pg-course summary .pg-bar i { background: var(--good); }
.pg-course summary .pg-t b::after { content: " ▾"; font-size: 12px; color: var(--ink-3); } .pg-course[open] summary .pg-t b::after { content: " ▴"; }
.pg-lessons { padding: 2px 0 8px; } .pg-lesson { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; color: var(--ink); text-decoration: none; } .pg-lesson + .pg-lesson { border-top: 1px dashed var(--line); } .pg-lesson .pg-t b { font-size: 14.5px; font-weight: 600; }
.pg-st { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); } .pg-st.done { border: 0; background: var(--good); color: #fff; display: grid; place-items: center; } .pg-st.done svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; }
.pg-st.part { border: 0; background: conic-gradient(var(--red) calc(var(--p) * 1%), rgba(47,74,92,.14) 0); -webkit-mask: radial-gradient(circle, transparent 7px, #000 7.5px); mask: radial-gradient(circle, transparent 7px, #000 7.5px); }

/* ---------- Axomrank Pro ---------- */
.day-list li.locked { opacity: .62; cursor: pointer; } .day-list li.locked .day-ic { color: #a9740b; background: #fdf1d4; }
.day-pro { flex: none; padding: 3px 9px; border-radius: 99px; background: linear-gradient(180deg, #f6d488, #d79a35); color: #3a1405; font-size: 12px; font-weight: 800; }
.day-free { display: block; width: 100%; margin: -4px 0 12px; padding: 10px 12px; border: 1px solid #ecd9a8; border-radius: 14px; background: #fdf8ea; font: inherit; font-size: 13.5px; font-weight: 500; line-height: 1.4; color: var(--ink-2); text-align: left; cursor: pointer; } .day-free b { color: #8a5a08; white-space: nowrap; }
.pw { padding-top: 14px; } .pw h2 { margin: 6px 0 8px; font-size: 24px; letter-spacing: -.02em; }
.pw-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 99px; background: linear-gradient(180deg, #f6d488, #d79a35); color: #3a1405; font-size: 13px; font-weight: 800; } .pw-badge .ico { width: 15px; height: 15px; }
.pw-warn { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #fdf1f1; color: var(--ink); font-size: 15px; line-height: 1.45; } .pw-warn b { color: var(--red-deep); }
.pw-perks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 7px; font-size: 15px; font-weight: 600; } .pw-perks li { display: flex; gap: 10px; align-items: center; } .pw-perks svg { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--good); color: #fff; fill: none; stroke: currentColor; stroke-width: 3; }
.pw-free { margin: 0 0 14px; font-size: 13.5px; }
.pw-buy { display: flex; flex-direction: column; align-items: center; gap: 1px; height: auto; min-height: 58px; padding: 8px 16px; } .pw-buy span { font-size: 17px; font-weight: 700; } .pw-buy small { font-size: 12.5px; font-weight: 500; opacity: .9; }
.pw-coupon { margin: 12px 2px 0; font-size: 14px; text-align: center; } .pw-coupon summary { cursor: pointer; color: var(--ink-2); font-weight: 600; list-style: none; } .pw-coupon summary::-webkit-details-marker { display: none; }
.pw-coupon form { display: flex; gap: 8px; margin-top: 10px; } .pw-coupon input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1.5px solid var(--line, #ddd); border-radius: 12px; font: inherit; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #fff; color: var(--ink); } .pw-coupon .btn-ghost { flex: none; width: auto; padding: 0 18px; }
.pw-cmsg { margin: 6px 0 0; min-height: 1em; font-size: 13px; color: var(--red-deep); }
.legal { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); } .legal a, .pw-fine a { color: inherit; }
.pw-fine { margin: 10px 2px 4px; font-size: 12px; line-height: 1.45; color: var(--ink-3); text-align: center; } .pw-note { margin: 4px 0 10px; }
.pro-card h3 { display: flex; align-items: center; gap: 7px; } .pro-card h3 .ico { color: #b97d12; } .pro-card.on { border-color: #ecd9a8 !important; background: #fdf8ea !important; }
