/* Deckiy web study app. Builds on site.css (colours, fonts, buttons); everything here is scoped to
   body.study so the landing page is untouched. */
.study { min-height: 100vh; }
.study .nav-row { height: 64px; }
.study-main { padding: 28px 0 64px; }
.study a { color: var(--blue-bright); }
.study .muted { color: var(--muted); }
.study .small { font-size: 14px; }
.study h1 { font-size: clamp(28px, 4vw, 40px); }
.study h2 { font-size: 22px; }
.study h3 { font-size: 18px; margin: 0; }
.study p + p { margin-top: 8px; }
.study .btn { letter-spacing: .04em; }
.study .btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.study .btn-small { font-size: 13px; }

/* Override landing-page versions of shared class names. */
.study .card { padding: 22px; box-shadow: 0 4px 0 #161833; }
.study .card:hover { transform: none; }
.study .card h3, .study .card p { margin-top: 0; }
.study .card p { font-size: inherit; }
.study .chip { position: static; padding: 6px 10px; border-radius: 10px; font: 700 14px/1 var(--head); background: var(--card-high); border: 1px solid var(--stroke); box-shadow: none; animation: none; }
.study .section { padding: 22px; min-width: 0; overflow-wrap: anywhere; }
.study .section-head { max-width: none; margin: 0; text-align: left; }
.study .section-head h2 { margin-top: 0; font-size: 26px; }

.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-user .who { color: var(--muted); font-weight: 800; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user .bolt { color: var(--yellow); margin-right: 4px; }

.row { display: flex; align-items: center; gap: 10px; }
.row.gap { gap: 12px; margin-top: 16px; flex-wrap: wrap; }
/* "wrap" here means flex-wrap, not the site's centred .wrap container. */
.row.wrap, .wrap.row { flex-wrap: wrap; width: auto; margin-inline: 0; }
.study a.btn { color: var(--cream); text-decoration: none; }
.study a.btn:not(.btn-ghost) { color: #fff; }
/* Back links are a 40px tap target, like the other controls. */
.back { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 2px; font-weight: 800; text-decoration: none; }
.back:hover { text-decoration: underline; }
.narrow { max-width: 620px; margin: 0 auto; }
.eyebrow { margin-bottom: 8px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin-top: 6px; }
.head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ring { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; border: 6px solid var(--card-high); }
.ring strong { font: 700 18px/1 var(--head); }
.ring span { font-size: 11px; color: var(--muted); margin-top: -14px; }

.bar { display: block; flex: 1; min-width: 60px; height: 10px; border-radius: 99px; background: var(--card-high); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--blue-bright); }
.bar.m-high > span { background: var(--mint); }
.bar.m-mid > span { background: var(--yellow); }
.bar.m-low > span { background: var(--flame); }
.bar.m-none > span { background: var(--faint); }

.pill { display: inline-block; padding: 4px 10px; border-radius: 99px; background: rgba(139, 92, 246, .2); color: #c4b5fd; font-weight: 800; font-size: 13px; }
.study .badge { min-width: 0; height: 26px; color: #fff; font-size: 13px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.subject-card { display: flex; flex-direction: column; gap: 10px; color: var(--cream) !important; text-decoration: none; transition: border-color .15s; }
.subject-card:hover { border-color: var(--blue); }
.subject-card h2 { font-size: 22px; }
.empty { text-align: center; display: grid; justify-items: center; gap: 10px; }

.join-inline { display: flex; gap: 8px; }
.study input[type="text"], .study input[type="email"], .study input[type="password"], .study textarea, .study select, .study input[type="file"] {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--stroke); background: var(--navy-deep); color: var(--cream);
  font: 700 16px/1.4 var(--body); }
.study textarea { resize: vertical; }
.study input:focus, .study textarea:focus, .study select:focus { outline: none; border-color: var(--blue); }
.join-inline input { width: 220px; padding: 9px 12px; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > span { font-weight: 800; font-size: 14px; color: var(--muted); }
.study .form-note { min-height: 1.4em; margin: 10px 0; color: #ffb4b4; }

.auth-wrap { display: grid; place-items: center; min-height: 70vh; }
/* Create your profile: centered in the whole screen below the nav (65px nav + the page's 92px of padding), not its upper part. */
.auth-wrap-full { min-height: calc(100svh - 157px); }
.auth { width: min(440px, 100%); display: grid; }
.auth .auth-art { width: 96px; margin: 0 auto 8px; }
.auth h1 { font-size: 28px; text-align: center; }
.auth > p { text-align: center; margin-top: 6px; }
.auth .btn { margin-top: 4px; }
.auth .btn + p { margin-top: 18px; }

.options { display: grid; gap: 10px; margin: 16px 0; }
.option { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--stroke); background: var(--card); color: var(--cream); cursor: pointer; font: inherit; }
.option span { color: var(--muted); font-size: 14px; }
.option.on { border-color: var(--blue); background: rgba(59, 130, 246, .14); }
.option:hover { border-color: var(--blue-bright); }

.loading { display: grid; justify-items: center; gap: 8px; padding: 64px 0; color: var(--muted); }


.notice { padding: 16px; border-radius: 16px; display: grid; gap: 10px; justify-items: start; }
.notice-err { background: rgba(255, 107, 107, .12); border: 1px solid var(--coral); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  padding: 12px 18px; border-radius: 14px; background: var(--card-high); border: 1px solid var(--stroke); font-weight: 800; transition: .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* SAT / ACT map: Section -> Domain -> Skill */
.sections { display: grid; gap: 20px; }
.section .section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.section-score { text-align: right; }
.section-score strong { display: block; font: 700 28px/1 var(--head); }
.section-score span { color: var(--muted); font-size: 13px; }
.section > .bar { margin-top: 14px; }
.domains { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; margin-top: 20px; }
.domain { padding: 16px; border-radius: 18px; background: var(--navy-deep); border: 1px solid var(--stroke); }
.domain-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.domain-head h3 { flex: 1 1 auto; }
.skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.skills li { display: grid; grid-template-columns: 1fr minmax(90px, 140px) auto; gap: 12px; align-items: center; }
.summary .skills li { grid-template-columns: 1fr minmax(120px, 200px); }
.skill-name { display: grid; }
.skill-meter { display: flex; align-items: center; gap: 8px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.two-col > div { display: grid; gap: 16px; }
.docs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.docs li { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--navy-deep); }
.status-failed { color: var(--coral) !important; }

/* practice: the toolbar and the question share one centred column. With the Desmos window open beside it on a
   computer, session.js sets --calc-space so the column stays clear of the window. */
.session { padding-right: var(--calc-space, 0px); }
.session-top, .player { width: 100%; max-width: 760px; margin-inline: auto; }
.session-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
/* Above the floating Desmos window (but under the site header), so its buttons can never be covered; only the
   buttons catch clicks. */
.session-top { position: relative; z-index: 46; pointer-events: none; }
.session-top > * { pointer-events: auto; }
.session-top .btn[aria-pressed="true"] { border: 1px solid var(--blue); }
.session-top .back { margin: 0; }
.session-progress { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
/* Learn mode: learned (mint) then picked out once (yellow) on one track. */
.learn-progress { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
.summary .learn-progress { width: 100%; max-width: 360px; margin: 4px auto 8px; }
.learn-bar { display: flex; flex: 1; min-width: 60px; height: 10px; border-radius: 99px; background: var(--card-high); overflow: hidden; }
.learn-bar > span { display: block; height: 100%; transition: width .3s ease; }
.learn-bar .lb-learned { background: var(--mint); }
.learn-bar .lb-familiar { background: var(--yellow); }
.learn-note { font-weight: 700; margin: 0 0 6px; }
.learn-note.done { color: var(--mint); }
@media (prefers-reduced-motion: reduce) { .learn-bar > span { transition: none; } }
.timer { font: 700 20px/1 var(--head); padding: 6px 12px; border-radius: 10px; background: var(--card-high); }
.timer.low { color: var(--coral); }
/* minmax(0, 1fr): a wide table or chart scrolls inside its box instead of stretching the card off a phone screen. */
.session-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.question { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.q-meta { margin: 0; }
.stem { font: 700 21px/1.4 var(--body); }
.stimulus { margin: 0; padding: 16px; border-radius: 14px; background: var(--navy-deep); border-left: 4px solid var(--blue); }
.stimulus figcaption { font-weight: 800; margin-bottom: 8px; }
.study .stimulus p + p { margin-top: 12px; }
.table-wrap { overflow-x: auto; }
.stimulus table { border-collapse: collapse; width: 100%; }
.stimulus th, .stimulus td { border: 1px solid var(--stroke); padding: 6px 10px; text-align: left; }
.chart { width: 100%; height: auto; }
.chart .axis { stroke: var(--faint); }
.chart .tick, .chart .axis-label { fill: var(--muted); font: 600 12px var(--body); }
.chart .c1 { fill: var(--blue-bright); stroke: var(--blue-bright); }
.chart .c2 { fill: var(--yellow); stroke: var(--yellow); }
.chart .c3 { fill: var(--mint); stroke: var(--mint); }
.chart .line { fill: none; stroke-width: 3; }
.legend .key { margin-right: 14px; }
.legend .key::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: currentColor; }
.legend .c1 { color: var(--blue-bright); } .legend .c2 { color: var(--yellow); } .legend .c3 { color: var(--mint); }

.choices { display: grid; gap: 10px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice, .segment { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--stroke); background: var(--card-high); color: var(--cream); font: 700 17px/1.4 var(--body); cursor: pointer; }
.choices.two .choice { justify-content: center; }
.choice:hover:not(:disabled), .segment:hover:not(:disabled) { border-color: var(--blue-bright); }
.choice[aria-pressed="true"], .segment[aria-pressed="true"] { border-color: var(--blue); background: rgba(59, 130, 246, .2); }
.choice .letter { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--navy-deep); font: 700 14px/1 var(--head); }
.choice.is-right { border-color: var(--mint); background: rgba(93, 226, 176, .16); }
.choice.is-wrong { border-color: var(--coral); background: rgba(255, 107, 107, .14); }
.choice.dim { opacity: .6; }
.choice:active:not(:disabled), .segment:active:not(:disabled), .option:active { transform: translateY(1px); }
.choice:disabled, .segment:disabled { cursor: default; }
.segments { display: grid; gap: 8px; }
.matches { display: grid; gap: 10px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.ordering { display: grid; gap: 8px; padding-left: 22px; }
.ordering li { padding: 10px 12px; border-radius: 12px; background: var(--card-high); }
.ordering li { display: list-item; }
.ordering li > span:first-child { display: inline-block; max-width: calc(100% - 96px); }
.order-btns { float: right; display: inline-flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--navy-deep); color: var(--cream); cursor: pointer; font-weight: 800; }
.icon-btn:hover:not(:disabled) { border-color: var(--blue-bright); }
.icon-btn:disabled { opacity: .35; cursor: default; }

.q-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.confidence { display: inline-flex; gap: 6px; }
.conf { min-height: 36px; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--stroke); background: transparent; color: var(--muted); font: 800 13px/1 var(--body); cursor: pointer; }
.conf:hover:not(:disabled) { color: var(--cream); border-color: var(--blue-bright); }
.conf[aria-checked="true"] { background: var(--card-high); color: var(--cream); border-color: var(--blue); }
.conf:disabled { cursor: default; }

.result { display: grid; gap: 10px; border-width: 2px; }
.result.r-correct { border-color: var(--mint); }
.result.r-partial { border-color: var(--yellow); }
.result.r-incorrect { border-color: var(--coral); }
.result-head { display: flex; justify-content: space-between; align-items: center; }
.r-correct .result-head h3 { color: var(--mint); }
.r-partial .result-head h3 { color: var(--yellow); }
.r-incorrect .result-head h3 { color: var(--coral); }
.rationales { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.rationales .ok { color: var(--mint); }
.explanation { color: var(--cream); }
.inset { background: var(--navy-deep); box-shadow: none; margin-top: 8px; }
.inset h3 { margin-bottom: 6px; }

/* Desmos: a floating window you can move, resize and maximize, like the real test's calculator */
.desmos { position: fixed; z-index: 45; display: none; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--stroke);
  background: var(--card); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.desmos.open { display: flex; }
.desmos.maxed { border-radius: 12px; }
.desmos-head { display: flex; gap: 10px; align-items: center; padding: 6px 6px 6px 14px; cursor: move; touch-action: none; user-select: none; background: var(--card-high); }
.desmos.maxed .desmos-head { cursor: default; }
.desmos-head .grow { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--cream); font: 700 16px/1 var(--body); cursor: pointer; }
.win-btn:hover { background: var(--navy-deep); }
.desmos-steps { padding: 12px 14px; border-top: 1px solid var(--stroke); max-height: 40%; overflow: auto; background: var(--navy-deep); }
.desmos-steps ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; }
.latex { display: block; margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: var(--card-high); color: var(--yellow); font-size: 14px; overflow-x: auto; }
.desmos-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.desmos.dragging .desmos-frame { pointer-events: none; }
.desmos.dragging { user-select: none; }
.desmos-grip { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none; z-index: 1;
  background: linear-gradient(135deg, transparent 50%, var(--stroke) 50%, var(--stroke) 58%, transparent 58%, transparent 70%, var(--stroke) 70%, var(--stroke) 78%, transparent 78%); }
.desmos.maxed .desmos-grip { display: none; }

.summary { text-align: center; display: grid; gap: 12px; justify-items: center; }
.summary .skills { width: 100%; text-align: left; }

/* Tabs: in the header on a computer, a bar along the bottom on a phone */
.tabs { display: flex; gap: 4px; }
.tabs[hidden] { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; color: var(--muted) !important; text-decoration: none; font: 800 15px/1 var(--body); }
.tab:hover { color: var(--cream) !important; background: var(--card); }
.tab[aria-current="page"] { color: var(--cream) !important; background: var(--card-high); }
.tab-icon { font-size: 16px; }
.nav-user a.who { padding: 8px 0; text-decoration: none; }
.nav-user a.who:hover { color: var(--cream); }

/* Space between the blocks of a page. */
.study-main > :is(.card, .notice, .two-col, .sections, .grid-cards, .level-tiles) { margin-bottom: 16px; }
/* The same spacing on the single-column pages (settings, new subject, custom practice, a friend's profile). */
.narrow > h1 { margin-bottom: 20px; }
.narrow > h1:has(+ p) { margin-bottom: 6px; }
.narrow > h1 + p { margin-bottom: 20px; }
.narrow > :is(.card, .notice) + :is(.card, .notice) { margin-top: 16px; }
/* A little room under a card's heading (stacked cards already space their rows). */
.study .card:not(.stack) > h2 + :is(p, .skills) { margin-top: 8px; }
/* Sub-headings inside a card (Invites, In progress, Recent) get room above them. */
.card > div:not([class]) > h3:first-child { margin-top: 16px; }

/* Shared bits */
.stack { display: grid; gap: 12px; }
.stack > h2 { margin: 0; }
.center { justify-content: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.plain { color: var(--cream) !important; text-decoration: none; }
a.plain:hover strong { text-decoration: underline; }
.manage { margin-top: 24px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 12px; }
.card .section-title { margin: 0 0 8px; }
.section-title h2 { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.link-pill { text-decoration: none; }
.study .ok, .form-note.ok { color: var(--mint) !important; }
.study .bad { color: var(--coral); }
.btn-danger { background: var(--coral) !important; box-shadow: 0 5px 0 var(--coral-deep) !important; color: #fff !important; }
.danger-zone { border-color: rgba(255, 107, 107, .4); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--navy-deep); border: 1px solid var(--stroke); }
.seg { min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 800 14px/1 var(--body); cursor: pointer; }
.seg:hover:not([aria-pressed="true"]) { color: var(--cream); background: var(--card-high); }
.seg[aria-pressed="true"] { background: var(--blue); color: #fff; }
.style-chip { min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--stroke); background: var(--card-high); color: var(--cream); font: 700 14px/1.2 var(--body); cursor: pointer; }
.style-chip[aria-pressed="true"] { border-color: var(--blue); background: rgba(59, 130, 246, .25); }
.style-chip:hover:not(:disabled) { border-color: var(--blue-bright); }
.style-chip:disabled { opacity: .45; cursor: not-allowed; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { border-color: var(--cream); }
.range { width: 100%; accent-color: var(--blue); }
.study input[type="url"] { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--stroke); background: var(--navy-deep); color: var(--cream); font: 700 16px/1.4 var(--body); }

/* Modal dialogs */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(8, 9, 24, .7); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 12px; }
.modal h2 { margin: 0; }
.modal .options { margin: 0; }
.modal-actions { justify-content: flex-end; margin-top: 4px !important; }
.share-link { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--navy-deep); }
.share-link code { flex: 1 1 200px; overflow-wrap: anywhere; color: var(--yellow); }
.plan { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.plan p, .plan ul { margin: 4px 0 0; }

/* Home */
.home-head { align-items: center; }
.home-art { flex: none; width: 110px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 16px !important; }
.stat > div { display: grid; gap: 4px; }
.stat strong { font: 700 18px/1.1 var(--head); }
.stat-icon { font-size: 26px; }
.continue { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border-color: var(--blue); }
.continue h2 { margin: 0; }
.rec h2 { margin: 6px 0 0; }

/* Study */
.doc-link { display: grid; color: var(--cream) !important; text-decoration: none; }
.doc-link:hover strong { text-decoration: underline; }
.docs li { grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.docs li > :only-child { grid-column: 1 / -1; }
.concept-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.concept-list li { display: grid; gap: 2px; }
.relations { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.definition { font: 700 19px/1.5 var(--body); }
.concept h3 { margin-top: 12px; }
.source { margin: 10px 0 0; padding: 10px 14px; border-left: 4px solid var(--purple); background: var(--navy-deep); border-radius: 10px; }
.source p { margin: 0; }
.level-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 16px 0; }
.tile { display: grid; justify-items: center; gap: 4px; padding: 14px 8px !important; text-align: center; border-radius: 16px; background: var(--navy-deep); }
.tile strong { font: 700 22px/1 var(--head); }
.tile span { color: var(--muted); font-size: 13px; }
.mistake h3 { font-size: 18px; margin: 4px 0 8px; }

/* Friends and battles */
.people { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--navy-deep); }
.people li.me { outline: 2px solid var(--blue); }
.people .plain { display: grid; }
.battle-link { display: grid; }
.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; font: 700 15px/1 var(--head); }
.avatar.big { width: 76px; height: 76px; font-size: 32px; margin: 0 auto; }
.rank { min-width: 34px; font: 700 15px/1 var(--head); color: var(--muted); }
.board.wide { width: 100%; text-align: left; }
.result-won { background: rgba(93, 226, 176, .2); color: var(--mint); }
.result-lost { background: rgba(255, 107, 107, .18); color: var(--coral); }
.picks { display: grid; gap: 8px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--navy-deep); cursor: pointer; }
.pick:hover { background: var(--card-high); }
.pick input { width: 18px; height: 18px; accent-color: var(--blue); }
.profile-card { text-align: center; display: grid; gap: 6px; }
.profile-card h1 { margin: 6px 0 0; }
.level-line { display: flex; align-items: center; gap: 10px; max-width: 420px; width: 100%; margin: 8px auto 0; }
.battle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.battle-layout > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.battle-timer { height: 12px; }
.battle-timer[hidden] { display: none; }
.countdown { font: 700 96px/1 var(--head); color: var(--yellow); }
.lobby { text-align: center; display: grid; justify-items: center; gap: 10px; }
.lobby .join-inline { margin-top: 8px; }

/* Profile */
.menu { padding: 8px !important; display: grid; }
.menu-row { display: grid; grid-template-columns: 1fr auto; padding: 14px 16px; border-radius: 14px; color: var(--cream) !important; text-decoration: none; }
.menu-row:hover { background: var(--card-high); }
.menu-row .muted { grid-column: 1; }
.menu-row .chev { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 24px; color: var(--muted); }
.plan-pro { border-color: var(--purple); }
/* Pro: Deckiy on the Pro purple with the page coming up over his legs, like the apps. */
.pro-page { display: grid; gap: 16px; }
.pro-page .center { text-align: center; }
.pro-hero { border-radius: 28px; overflow: hidden; background: var(--purple-deep); text-align: center; }
.pro-hero img { display: block; width: 170px; height: 170px; margin: 18px auto -34px; position: relative; z-index: 0; }
.pro-sheet { position: relative; z-index: 1; padding: 18px 20px 24px; border-radius: 28px 28px 0 0; background: var(--navy); }
.pro-sheet h1 { margin: 10px 0 6px; }
.pro-tag { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--purple); color: #fff; font: 700 13px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--stroke); border-radius: 22px; padding: 4px 8px 8px 0; }
.compare th, .compare td { padding: 11px 6px; border-bottom: 1px solid rgba(52, 56, 107, .6); text-align: center; font-size: 15px; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { border-bottom: 0; padding-top: 14px; font: 700 15px/1 var(--head); color: var(--muted); }
.compare tbody th { text-align: left; padding-left: 16px; font-weight: 600; color: var(--cream); }
.compare td { color: var(--muted); width: 84px; }
.compare .pro-col { width: 96px; background: rgba(139, 92, 246, .16); color: var(--cream); font-weight: 800; border-bottom-color: rgba(139, 92, 246, .22); }
.compare thead .pro-col { color: #c4b5fd; border-radius: 16px 16px 0 0; text-transform: uppercase; letter-spacing: .06em; }
.compare tbody tr:last-child .pro-col { border-radius: 0 0 16px 16px; }
.compare .tick { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: #fff; font-weight: 900; font-size: 13px; }
.compare .tick.pro { background: var(--purple); }
.compare .cross { color: var(--faint); font-weight: 800; }
.pro-plans h2 { margin: 6px 0 12px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-card { padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--stroke); }
.price-card:first-child { border: 2px solid var(--purple); background: rgba(139, 92, 246, .12); }
.price-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-top strong { font: 700 18px/1.2 var(--head); }
.price-card .save { padding: 2px 8px; border-radius: 99px; background: var(--yellow); color: var(--navy); font: 700 12px/1.4 var(--head); }
.price-card .price { margin: 8px 0 2px; font: 700 28px/1.1 var(--head); color: var(--cream); }
.price-card .price span { font: 600 14px/1 var(--body, inherit); color: var(--muted); }
.pro-plans .notice { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--stroke); }
.pro-plans .notice p { margin: 0; color: var(--muted); font-size: 15px; }
.study .code-box { padding: 16px 20px; background: var(--card); border: 1px solid var(--stroke); border-radius: 18px; box-shadow: none; text-align: left; }
.code-box summary { cursor: pointer; font: 700 17px/1.3 var(--head); }
.code-box[open] summary { margin-bottom: 12px; }
@media (max-width: 520px) { .price-grid { grid-template-columns: 1fr; } .compare th, .compare td { font-size: 14px; } .compare td { width: 64px; } .compare .pro-col { width: 76px; } }
.plan.current { outline: 2px solid var(--blue); }
.plan ul { padding-left: 18px; }
.ach { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.ach-item { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: var(--navy-deep); opacity: .55; }
.ach-item.on { opacity: 1; border: 1px solid var(--mint); }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .battle-layout { grid-template-columns: 1fr; }
}
/* Tablets and small windows: the five tabs fit beside the logo and the energy chip (the name is on Profile). */
@media (min-width: 761px) and (max-width: 960px) {
  .study .brand span, .nav-user .who { display: none; }
}
@media (min-width: 761px) and (max-width: 820px) {
  .nav-user .chip + .chip { display: none; }
}
/* Phones: the tabs become a bar along the bottom */
@media (max-width: 760px) {
  /* A backdrop-filter would make the header the box the fixed tab bar is placed in. */
  .study .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--navy); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--navy); border-top: 1px solid var(--stroke); }
  .tab { flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 12px; }
  .tab-icon { font-size: 20px; }
  .has-tabs .study-main { padding-bottom: 96px; }
  /* Scrolling something into view (an answer's result) stops above the tab bar, not underneath it. */
  html:has(.has-tabs) { scroll-padding-bottom: 88px; }
  .has-tabs .toast { bottom: 88px; }
}
@media (max-width: 560px) {
  .skills li { grid-template-columns: 1fr auto; }
  .skills li .skill-meter { grid-column: 1 / -1; }
  /* The Go / Fix it button stays beside the name instead of taking a row of its own. */
  .skills li > .btn { grid-column: 2; grid-row: 1; }
  .summary .skills li { grid-template-columns: 1fr; }
  /* The chart is drawn 560 wide and scaled to the screen: bigger labels so they stay readable. */
  .chart .tick, .chart .axis-label { font-size: 18px; }
  /* Home: Deckiy beside the greeting, and the four stats as a 2 x 2 grid so "Continue" stays in view. */
  .home-head { flex-wrap: nowrap; }
  .home-art { width: 76px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px !important; }
  .stat > div { width: 100%; }
  .stat-icon { font-size: 22px; }
  /* The main answer button spans the card, within easy reach of a thumb. */
  .q-actions > .btn { flex: 1 1 100%; }
  .join-inline input { width: 150px; }
  .nav-user .who, .nav-user .chip + .chip, .study .brand span { display: none; }
  .study .section, .study .card { padding: 16px; }
  .domain { padding: 12px; }
  .match { grid-template-columns: 1fr; }
}
/* Touch screens: bigger window buttons on the Desmos calculator. */
@media (pointer: coarse) {
  .win-btn { width: 40px; height: 40px; }
  .conf { min-height: 40px; }
}

/* Help and support */
.faq { display: grid; gap: 10px; margin: 14px 0 16px; }
.faq-item { padding: 0; }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 800; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '⌄'; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--muted); transition: transform .15s; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p { margin: 0; padding: 0 18px 16px; }
.narrow > input[type="search"] { width: 100%; margin-top: 4px; }
.chat .card { display: grid; gap: 14px; }
.chat-thread { display: grid; gap: 10px; max-height: min(60vh, 560px); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg.mine { justify-content: flex-end; }
.chat-avatar { flex: none; border-radius: 50%; }
.chat-body { max-width: min(78%, 460px); display: grid; gap: 8px; justify-items: start; }
.chat-msg.mine .chat-body { justify-items: end; }
.chat-body p { margin: 0; padding: 10px 14px; border-radius: 18px; background: var(--card-high); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.mine .chat-body p { background: var(--blue); color: #fff; }
.chat-msg.faded .chat-body p { color: var(--faint); }
.chat-input { display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { flex: 1; min-height: 52px; resize: vertical; }
.chat-foot { display: grid; gap: 10px; justify-items: start; }
.chat-foot .chat-input { justify-self: stretch; }

/* Onboarding before the account (onboarding.js): welcome, a few questions, the plan, then "Save your plan". */
.btn-block { width: 100%; }
/* The welcome screen matches the phones: the app icon's blue, Deckiy big and close, his legs behind the panel with
   the buttons. It fills the window, so the study app's header steps aside while it's up. */
body:has(.welcome) { overflow: hidden; }
body:has(.welcome) > .nav { display: none; }
.welcome { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; overflow: hidden; background: #0475FC; }
.welcome-hero { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: calc(40px + env(safe-area-inset-top)) 24px 0; text-align: center; color: #fff; }
.welcome h1 { font-size: 60px; line-height: 1.07; }
.welcome-hero p { margin-top: 6px; color: rgba(255, 255, 255, .92); font: 700 clamp(15px, 4.3vw, 18px)/1.35 var(--body); }
/* Deckiy's size follows the room above the panel; the fallback is for browsers without container units. */
.welcome-stage { position: relative; flex: 1 1 0; min-height: 0; align-self: stretch; margin-inline: -24px; container-type: size; }
.welcome-art { position: absolute; left: 50%; bottom: 0; width: 340px; width: min(110cqw, 100cqh + 80px); max-width: none; height: auto; transform: translate(-50%, 20%); }
.welcome-actions { position: relative; flex: none; display: grid; gap: 12px; padding: 28px max(24px, calc(50% - 220px)) calc(20px + env(safe-area-inset-bottom)); border-radius: 32px 32px 0 0; background: var(--navy); }
.onb { width: min(560px, 100%); margin: 0 auto; padding: 4px 0 8px; display: grid; gap: 18px; }
.onb-top { display: flex; align-items: center; gap: 8px; }
.onb-top .bar { height: 12px; }
.onb-back { flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: 800 22px/1 var(--body); cursor: pointer; }
.onb-back:hover { background: var(--card-high); color: var(--cream); }
.onb-body { display: grid; gap: 12px; animation: onb-in .28s ease-out; }
.onb-body.back { animation-name: onb-back; }
@keyframes onb-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes onb-back { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .onb-body { animation: none; } }
/* The main button stays in reach on a phone, under however much there is to scroll. */
.onb-foot { position: sticky; bottom: 0; padding: 14px 0 10px; background: linear-gradient(to bottom, rgba(21, 22, 43, 0), var(--navy) 30%); }
.onb-hero { display: grid; justify-items: center; gap: 6px; text-align: center; }
.onb-hero img { width: 160px; }
.onb-hero h1 { font-size: 32px; }
.onb-sub { font-size: 17px; margin-top: 10px; }
.ask { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.ask img { flex: none; width: 96px; }
.bubble { position: relative; flex: 1; padding: 14px 16px; border-radius: 18px; background: var(--card-high); }
.bubble::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); border: 9px solid transparent; border-left: 0; border-right-color: var(--card-high); }
.bubble h2 { font-size: 22px; }
.bubble p { margin-top: 4px; font-size: 15px; }
.picks { display: grid; gap: 10px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; border-radius: 18px; border: 2px solid var(--stroke);
  background: var(--card); color: var(--cream); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.pick:hover { border-color: var(--blue-bright); }
.pick[aria-pressed="true"] { border-color: var(--blue); background: rgba(59, 130, 246, .16); }
.pick:active { transform: translateY(1px); }
.pick-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 20px; background: rgba(96, 165, 250, .18); }
.tint-yellow { background: rgba(255, 216, 77, .18); }
.tint-mint { background: rgba(93, 226, 176, .18); }
.tint-purple { background: rgba(139, 92, 246, .2); }
.tint-coral { background: rgba(255, 107, 107, .18); }
.tint-flame { background: rgba(255, 159, 67, .18); }
.tint-muted { background: rgba(171, 176, 214, .15); }
.pick-text { flex: 1; display: grid; gap: 2px; }
.pick-text strong { font-size: 17px; }
.pick-sub { color: var(--muted); font-size: 14px; }
.pick-trailing { color: var(--muted); font-weight: 800; }
.pick[aria-pressed="true"] .pick-trailing { color: var(--blue-bright); }
/* The same width chosen or not, so the text doesn't shift when a card is picked. */
.pick-check { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-bright); color: var(--navy); font-size: 14px; font-weight: 900; visibility: hidden; }
.pick[aria-pressed="true"] .pick-check { visibility: visible; }
.tag { display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: 99px; background: rgba(93, 226, 176, .2); color: var(--mint); font-size: 12px; font-weight: 800; vertical-align: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.features { display: grid; gap: 16px; margin-top: 10px; }
.feature { display: flex; align-items: center; gap: 14px; }
.feature strong { display: block; }
.plan-summary { display: grid; gap: 12px; }
.plan-row { display: flex; justify-content: space-between; gap: 12px; }
.plan-row span { color: var(--muted); }
.plan-row strong { text-align: right; }
.study .card.next-up { border-color: rgba(59, 130, 246, .5); background: rgba(59, 130, 246, .12); }
.next-up b { display: block; color: var(--blue-bright); font-size: 14px; margin-bottom: 2px; }

/* Log in / "Create your profile": Duolingo-style grouped forms (main.js). */
.auth-form { width: min(460px, 100%); display: grid; gap: 0; }
.form-top { position: relative; display: grid; place-items: center; min-height: 48px; margin-bottom: 14px; }
.form-top .onb-back { position: absolute; left: 0; top: 4px; }
.form-top h1 { font-size: 20px; }
.field-group { border: 2px solid var(--stroke); border-radius: 18px; background: var(--card); overflow: hidden; }
.field-group.bad { border-color: var(--coral); }
.group-row { display: flex; align-items: center; gap: 4px; padding-right: 10px; }
.group-row + .group-row { border-top: 1px solid var(--stroke); }
.study .group-row input { flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 17px 18px; }
.study .group-row input:focus { outline: none; }
.group-row:focus-within { background: rgba(59, 130, 246, .08); }
.group-row.bad input::placeholder { color: var(--coral); }
.row-link { flex: none; border: 0; background: none; padding: 8px; color: var(--blue-bright); font: 800 14px/1 var(--body); text-decoration: none; cursor: pointer; text-transform: uppercase; letter-spacing: .03em; }
.problems { display: grid; gap: 2px; padding: 10px 4px 0; color: var(--coral); font-size: 15px; }
.problems:empty { display: none; }
.form-hint { padding: 10px 4px 0; color: var(--faint); font-size: 14px; }
.auth-form .btn-block { margin-top: 20px; }
.auth-form .center { text-align: center; margin-top: 12px; }
.auth-form .fine { color: var(--faint); margin-top: 8px; }
.auth-form .fine a, .ai-notice a { color: var(--blue-bright); font-weight: 800; }

/* Age and consent (consent.js): the birth month/year pickers and the "where your notes go" card. */
.birth-picker { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 16px; }
.birth-picker select { min-height: 56px; padding: 0 14px; border-radius: 16px; border: 2px solid var(--stroke); background: var(--card); color: var(--cream); font: 700 17px var(--body); }
.birth-picker select:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.ai-notice { margin-top: 16px; }
.ai-notice ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.ai-notice p { margin-top: 12px; }
.quick-check .onb-sub { margin-top: 22px; }
.quick-check > .muted { margin-top: 6px; }

/* Onboarding's hello screens: Deckiy on his own in the middle, talking. */
.invisible { visibility: hidden; }
.onb-talk { min-height: calc(100vh - 150px); grid-template-rows: auto 1fr auto; }
.onb-talk .onb-body { align-content: center; }
.talk { display: grid; justify-items: center; }
.talk-bubble { position: relative; max-width: 420px; margin: 0 0 22px; padding: 16px 20px; border-radius: 20px; background: var(--card-high);
  font: 700 22px/1.25 var(--head); text-align: center; }
.talk-bubble::after { content: ''; position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); border: 13px solid transparent; border-bottom: 0; border-top-color: var(--card-high); }
.talk-art { width: 230px; }
.study .card.feature { padding: 16px; }

/* ---------------------------------------------------------------- subject notation (notation.js) */
/* Superscripts and subscripts sit inside the line instead of pushing the lines apart. */
.study sup, .study sub, .reference sup, .reference sub { font-size: 0.72em; line-height: 0; position: relative; vertical-align: baseline; }
.study sup, .reference sup { top: -0.48em; }
.study sub, .reference sub { bottom: -0.22em; }
.study code, .reference code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace; font-size: 0.92em;
  background: var(--card-high); border-radius: 6px; padding: 1px 5px; }
.code-block { margin: 10px 0; padding: 12px 14px; background: var(--navy-deep); border: 1px solid var(--stroke); border-radius: 12px;
  overflow-x: auto; white-space: pre; tab-size: 4; font-size: 14px; line-height: 1.5; }
.code-block code { background: none; padding: 0; font-size: inherit; }
.stem .code-block, .choice .code-block { font-weight: 500; }
.choice .code-block { margin: 4px 0 0; padding: 8px 10px; font-size: 13px; }

/* A poem or passage whose lines are cited: numbers in the margin every fifth line. */
.numbered-text { display: grid; gap: 2px; font-size: 16px; line-height: 1.5; }
.numbered-text .line { display: grid; grid-template-columns: 2.4em 1fr; gap: 10px; }
.numbered-text .line.blank { min-height: 0.8em; }
.numbered-text .ln { color: var(--faint); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding-top: 2px; user-select: none; }

/* Symbol keys above an answer box. */
.symbol-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.symbol-bar .sym { min-width: 38px; height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--card-high);
  color: var(--cream); font: inherit; font-size: 16px; cursor: pointer; }
.symbol-bar .sym:hover { border-color: var(--blue-bright); }
.symbol-bar .sym:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.symbol-bar .sym .base { opacity: .45; }
.nu { font-family: Georgia, "Times New Roman", serif; }

/* The course reference sheet. */
.reference { display: grid; gap: 14px; max-height: 70vh; overflow-y: auto; }
.reference h3 { font-size: 15px; margin: 0 0 6px; color: var(--blue-bright); }
.reference ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.55; }
.model-answer { white-space: normal; }
.course-groups { gap: 14px; }
.course-groups .group-label { margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; font-size: 12px; }

/* ---- 1.2 polish ---- */
/* Skeletons: grey shapes where a page's cards are about to appear, with a slow shimmer. */
.skel { display: block; height: 14px; border-radius: 8px; background: var(--card-high); position: relative; overflow: hidden; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); animation: skel-shine 1.4s ease-in-out infinite; }
@keyframes skel-shine { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
.skel + .skel { margin-top: 10px; }
.skel-h1 { height: 34px; width: min(320px, 70vw); border-radius: 12px; }
.skel-title { height: 22px; width: 70%; }
.skel-line { width: 55%; }
.skel-wide { width: min(460px, 80vw); }
.skel-pill { height: 22px; width: 64px; border-radius: 999px; }
.skel-bar { height: 10px; width: 100%; }
.skel-icon { height: 36px; width: 36px; border-radius: 12px; flex: none; }
.skel-card { min-height: 150px; }
.skel-page .stat { align-items: center; }

/* Numbers that change in place (timers, XP, scores, ranks) keep every digit the same width, so they don't wiggle. */
.study .stat strong, .study .ring strong, .study .timer, .study .countdown, .study .rank, .study .section-score,
.study .bar + strong, .study .pill { font-variant-numeric: tabular-nums; }

/* Headlines break into even lines instead of leaving one word alone; body text avoids a lonely last word. */
.study h1, .study h2, .study h3 { text-wrap: balance; }
.study p { text-wrap: pretty; }

/* Phones with a notch or rounded corners: keep content and fixed bars inside the safe area. */
.study .nav { padding-top: env(safe-area-inset-top); }
.study-main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.study .wrap { width: min(var(--wrap), 100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
.study .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
