/* The walk: My Space with today's stretch, the map of the mountain, stretch ends, brisk walks and the placement result.
   Uses the app's tokens only, so light and dark both work. */
.lv-light { font-style: italic; font-weight: 400; color: var(--text-3); }

/* My Space */
.ms-head { align-items: flex-start; }
.ms-head h1 { margin-bottom: 4px; }
.ms-welcome { font-family: var(--serif); font-style: italic; color: var(--text-2); font-size: 1.12rem; margin: 0; }
.ms-stats .ms-nb { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.ms-stats .ms-nb b { background: var(--accent-soft); color: var(--accent-2); border-radius: 999px; padding: 0 8px; font-size: .85rem; }
.ms-mini { display: block; margin: var(--stack-gap) 0; border-radius: 16px; background: rgba(var(--accent-rgb), .05); border: 1px solid var(--line); padding: var(--sp-2) var(--sp-3); }
.ms-mini svg { display: block; width: 100%; height: auto; max-height: 120px; }
.mm-way { fill: none; stroke: var(--line-strong); stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.mm-done { fill: none; stroke: var(--ok); stroke-width: 3.5; stroke-linecap: round; }
.mm-d { fill: var(--ok); } .mm-now { fill: var(--accent); } .mm-n { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
.mm-t { font: 600 9.5px var(--sans); fill: var(--accent-2); } .mm-s { font: 9px var(--sans); fill: var(--text-3); }
.ms-stretch { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--card-pad); }
.ms-stretch h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.ms-stretch .muted { margin: 0; }
.ms-stops { list-style: none; margin: 4px 0; padding: 0; display: grid; }
.ms-stops li { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; position: relative; }
.ms-stops li + li::before { content: ""; position: absolute; left: 11px; top: -8px; height: 16px; border-left: 2px dotted var(--line-strong); }
.ms-stops b { font-weight: 600; font-size: .98rem; }
.ms-stops small { color: var(--text-3); font-size: .82rem; }
.ms-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); display: grid; place-items: center; color: var(--on-dark, #fff); }
.ms-dot svg { width: 14px; height: 14px; }
.ms-stops li.now .ms-dot { background: var(--accent); }
.ms-stops li.done .ms-dot { background: var(--ok); border-color: var(--ok); }
.ms-stops li.done b { color: var(--text-3); }
.ms-go { align-self: stretch; justify-content: center; }
.ms-slot { margin-top: var(--stack-gap); }
.ms-call { border-color: var(--sea); background: rgba(79, 126, 160, .08); display: flex; flex-direction: column; gap: 8px; }
.ms-call .tag { color: var(--sea); }
.ms-call p { margin: 0; }
.ms-join { align-self: flex-start; }
.ms-also { margin-top: 16px; }
.ms-also ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.ms-also a { display: grid; grid-template-columns: 32px 1fr auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.ms-also a small { display: block; color: var(--text-3); }
.ms-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); margin-top: var(--stack-gap); }
.ms-tile { display: flex; flex-direction: column; gap: 3px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; min-width: 0; }
.ms-tile svg { width: 22px; height: 22px; color: var(--accent-2); }
.ms-tile b { font-size: .98rem; }
.ms-tile small { color: var(--text-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.ms-tile:hover, .ms-also a:hover { border-color: var(--line-strong); }
.ms-whole { display: inline-block; margin: 12px 0 4px; color: var(--accent-2); }
.ms-extra { margin-top: var(--stack-gap); }
.ms .space-mentor { margin-top: var(--stack-gap); } /* the tutor, call and snapshot cards no longer touch */
.ms-more { margin-top: var(--sp-7); border-top: 1px solid var(--line); padding-top: var(--sp-4); }
.ms-more > summary { cursor: pointer; color: var(--text-2); font-size: .95rem; list-style: none; }
.ms-more > summary::-webkit-details-marker { display: none; }
.ms-more > summary::before { content: "+ "; color: var(--accent-2); font-weight: 600; }
.ms-more[open] > summary::before { content: "– "; }
.ms-more .space-links { margin-top: var(--sp-4); }
@media (max-width: 720px) { .ms-tiles { grid-template-columns: repeat(2, 1fr); } }

/* The map */
.ms-maphead { margin: 16px 0 8px; }
.ms-maphead h1 { margin: 8px 0 8px; }
.mt-wrap { overflow-x: auto; margin: 8px 0 12px; }
.mt-prof { display: block; width: 100%; min-width: 820px; height: auto; }
.mt-sea { fill: rgba(79, 126, 160, .14); }
.mt-land { fill: var(--surface-3, #E2DDD2); opacity: .75; }
.mt-way { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.mt-cloud ellipse { fill: var(--surface); opacity: .95; }
.mt-stop { cursor: pointer; outline: none; }
.mt-stop circle { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2.5; }
.mt-stop.done circle { fill: var(--ok); stroke: var(--ok); }
.mt-stop.now circle { fill: var(--accent); stroke: var(--accent); }
.mt-stop .mt-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .5; }
.mt-stop.sel circle:first-of-type { stroke: var(--text); stroke-width: 3; }
.mt-stop:focus-visible circle:first-of-type { stroke: var(--text); stroke-width: 3; }
.mt-n { font: 600 12.5px var(--sans); fill: var(--text); }
.mt-p { font: 11px var(--sans); fill: var(--text-3); }
.mt-stop.sel .mt-n { fill: var(--accent-2); }
.ms-level .space-climb-head { border-bottom: 0; padding-bottom: 8px; }
.ms-level .space-lvl { border-left: 0; padding: 8px 0 0; } /* level card, certificate and camps share one left edge */
.ms-level h2 b { font-weight: 400; }
.bn-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bn-brisk { font-size: .8rem; color: var(--accent-2); padding-left: 8px; }
.block-node.brisk .stone { opacity: .75; }

/* The end of a stretch */
.stretch-end .se-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 20px 0 20px; }
.stretch-end h1 { margin: 8px 0 0; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.stretch-end .muted { margin: 0; }
.se-stamp { width: 120px; min-height: 120px; display: grid; place-items: center; }
.se-stamp-big { width: auto; min-height: 0; margin: 0 auto 6px; }
.se-stamp-fallback { width: 96px; height: 96px; border-radius: 50%; border: 3px dashed var(--accent); color: var(--accent-2); display: grid; place-items: center; font: 600 1.1rem var(--serif); transform: rotate(-8deg); }
.se-catch ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.se-catch li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.se-catch li:last-child { border-bottom: 0; padding-bottom: 0; }
.se-catch li small { display: block; color: var(--text-3); }
.se-fact { margin-top: 14px; background: rgba(79, 126, 160, .09); border-radius: 14px; padding: 12px 14px; font-size: .95rem; }
.se-fact .st-k { display: block; font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--sea); font-weight: 600; margin-bottom: 3px; }
.se-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.se-more { display: flex; gap: 20px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.se-more .link { display: inline-flex; gap: 8px; align-items: center; background: none; border: 0; color: var(--accent-2); cursor: pointer; font: inherit; }
.se-more svg { width: 16px; height: 16px; }
.stage-rail button.rail-gap { margin-left: 12px; }

/* Placement result */
.place-res { max-width: 760px; }
.place-res h1 { font-size: clamp(2rem, 5vw, 3rem); }
.place-q { margin-top: 26px; font-size: 1.4rem; }
.place-ways { display: grid; gap: 12px; margin-top: 10px; }
.place-way { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.place-way small { display: block; color: var(--text-2); }
.place-way.rec { border-color: var(--accent); background: var(--accent-soft); }
.place-way.soon { opacity: .6; cursor: default; }
.pw-i { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--accent); display: grid; place-items: center; font-size: 15px; color: var(--accent-2); font-weight: 700; }

/* Level 1 cold open: listen and pick first */
.co-choices { display: grid; gap: 8px; margin: 6px 0 10px; }
.co-choice { text-align: left; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; background: var(--surface); font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.co-choice small { color: var(--text-3); font-size: .8rem; }
.co-choice.idk { border-style: dashed; color: var(--text-2); }
.co-choice.right { border-color: var(--ok); background: var(--ok-soft); }
.co-choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.co-choice:disabled { cursor: default; }
/* Reading: something you find on the path */
.found-k { margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; color: var(--text-2); font-size: .92rem; }
.artefact.found { transform: rotate(-.6deg); box-shadow: 0 10px 28px rgba(var(--shadow-rgb), .08); }

/* Speaking with help: the snapshot questions */
.vs-calm { color: var(--ok); margin: -4px 0 10px; }
.vs-help { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 10px 14px; margin: 0 0 12px; }
.vs-help > summary { cursor: pointer; font-weight: 600; color: var(--accent-2); }
.vs-ladder { margin: 10px 0 2px; padding-left: 20px; display: grid; gap: 8px; }
.vs-ladder b { display: block; font-size: .85rem; color: var(--text-2); }
.vs-ladder span[lang] { font-family: var(--serif); font-size: 1.05rem; }
.vs-gaps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.vs-gaps span { font-family: var(--sans) !important; font-size: .82rem !important; border: 1px solid var(--accent); color: var(--accent-2); border-radius: 8px; padding: 2px 8px; }
.vs-blank { background: rgba(79, 126, 160, .09); border-radius: 12px; padding: 8px 12px; color: var(--text-2); }
.story-line .say { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.meta-row .nbp, .story-line .nbp { display: inline-flex; }
/* Long labels (e.g. the sound focus) wrap instead of running off a phone screen. */
.player .tag, .player .pill { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }

/* Back, in the top bar of every inner page */
.top-back { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px 6px 8px; font: 600 .88rem var(--sans); cursor: pointer; margin-right: 8px; flex: none; }
.top-back svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .top-back span { display: none; } .top-back { padding: 6px; } .topbar:has(.top-back) .brand .wm { display: none; } }
.ms-mini .mm-hit { fill: transparent; }
.ms-mini a { cursor: pointer; }
.ms-mini a:hover circle:not(.mm-hit), .ms-mini a:focus-visible circle:not(.mm-hit) { stroke: var(--text); stroke-width: 2; }
.mm-link { fill: var(--accent-2); text-decoration: underline; }
.ms-prev { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); align-self: center; }
.ms-prev svg { width: 16px; height: 16px; }
.ms-stretch h2 .gl-tr, .block-node .gl-tr { display: block; font-family: var(--sans); font-size: .78rem; color: var(--text-3); font-weight: 400; }
.bk-nb { display: inline-flex; gap: 4px; min-width: 0; }
.bk-nb-t { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
@media (max-width: 520px) { .bk-nb-t { max-width: 6.5em; } }
/* The little map: every place's name on wider screens, only today's on phones */
.ms-mini .mm-wide { display: none; }
@media (min-width: 720px) { .ms-mini .mm-wide { display: block; max-height: 150px; } .ms-mini .mm-narrow { display: none; } }
.mm-wide .mm-t { font-size: 13px; }
.mm-wide .mm-s { font-size: 11.5px; }
.mm-l { font: 500 12px var(--sans); fill: var(--text-2); }
.mm-l.done { fill: var(--ok); }
.mm-narrow .mm-t { font-size: 11.5px; }
.mm-narrow .mm-l { font-size: 11px; }
.mm-narrow .mm-s { font-size: 9.5px; }
.ms-mini .mm-narrow { max-height: none; }
/* Steps on today's card: done ones and the current one open the lesson right there */
.ms-stops li > a { display: contents; color: inherit; text-decoration: none; }
.ms-stops li:has(> a) { cursor: pointer; border-radius: 10px; }
.ms-stops li:has(> a):hover b { text-decoration: underline; text-underline-offset: 3px; }

/* Phrase of the week: a little dialogue (question and answer), each line with sound */
.pw2 { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.pw2::before { content: "“"; position: absolute; right: 14px; top: -18px; font: 400 7rem/1 var(--serif); color: var(--accent); opacity: .12; pointer-events: none; }
.pw2-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pw2-h .st-k { color: var(--accent-2); }
.pw2-wk { font-size: .78rem; color: var(--text-3); letter-spacing: .04em; }
.pw2-dialog { display: grid; gap: 8px; }
.pw2-b { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 14px 10px 8px; border-radius: 16px 16px 16px 4px; background: var(--bg); border: 1px solid var(--line); max-width: 92%; }
.pw2-b.a { justify-self: end; border-radius: 16px 16px 4px 16px; background: var(--accent-soft); border-color: transparent; }
.pw2-b b { display: block; font: 400 1.18rem/1.25 var(--serif); }
.pw2-b small { display: block; color: var(--text-3); font-size: .86rem; margin-top: 2px; }
.pw2-say { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--accent-2); }
.pw2-say svg { width: 17px; height: 17px; }
.pw2-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pw2-act .btn svg { width: 15px; height: 15px; }
.pw2-from { color: var(--text-3); }
.pw2-tip { margin-top: 12px; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: var(--sp-3) var(--card-pad); border-radius: 16px; background: rgba(79, 126, 160, .08); }
.pw2-tip .st-k { display: block; color: var(--sea); }
.pw2-tip-t { display: block; margin-top: 2px; }
.pw2-stamp { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--sea); color: var(--sea); display: grid; place-items: center; font: 700 .8rem var(--sans); letter-spacing: .06em; transform: rotate(-8deg); }
/* English first, the learner's language small underneath */
.ms-st { display: flex; flex-direction: column; min-width: 0; }
.ms-st i { font-style: normal; font-size: .8rem; color: var(--text-3); font-weight: 400; }
.ms-greet-tr { margin: -2px 0 8px; color: var(--text-3); font-size: .95rem; }

/* ---------- One thing at a time (trial: localStorage ve-focus=1) ---------- */
.player.focus { max-width: 680px; }
.pl-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px; gap: 12px; align-items: center; margin: 4px 0 16px; }
.pl-x, .pl-nb { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--text-2); position: relative; cursor: pointer; }
.pl-x svg, .pl-nb svg { width: 18px; height: 18px; }
.pl-nb .nb-c:not(:empty) { position: absolute; top: -5px; right: -6px; background: var(--accent); color: var(--on-dark, #fff); border-radius: 999px; font: 600 var(--fs-xs)/1 var(--sans); padding: 3px 5px; }
.pl-rail { margin: 0 !important; }
.pl-title { align-items: center; margin-bottom: 4px; }
.pl-title h2 { font-size: clamp(1.4rem, 5vw, 1.8rem); margin: 2px 0 0; }
.pl-title .ico { width: 34px; height: 34px; }
.pl-why-btn { margin-left: auto; align-self: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 10px; font: 600 .78rem var(--sans); cursor: pointer; }
.player.focus .why { font-size: .9rem; background: var(--surface); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.player.focus #stage-body > .muted:first-child { font-size: .92rem; }
/* the deck */
.deck { display: block !important; max-width: 560px; margin: 0 auto; }
.deck > * { display: none !important; }
.deck > .on { display: block !important; }
.deck .flip, .deck .flip-inner { min-height: 0; }
.deck .flip .tile { font-size: 1.25rem; }
.deck-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px auto 4px; max-width: 560px; }
.deck-b { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.deck-b:disabled { opacity: .35; cursor: default; }
.deck-b svg { width: 18px; height: 18px; }
.deck-dots { display: flex; gap: 8px; }
.deck-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); cursor: pointer; }
.deck-dots i.on { background: var(--accent); width: 20px; border-radius: 4px; }
.deck-n { font-size: .8rem; color: var(--text-3); min-width: 3em; text-align: center; }

/* Lesson phrase cards: both sides stacked in one grid cell, so the card is as tall as its taller side (a landing-page
   rule for its own flip cards made the back side take extra room under the front). */
.flip-grid .flip-inner { display: grid; }
.flip-grid .flip-face { grid-area: 1 / 1; position: relative; inset: auto; }
/* In the one-at-a-time view the notebook sits in the lesson header, so its floating button goes; the page leaves room
   at the bottom for the translate button so it never covers "Back" or "Next step". */
body:has(.player.focus) .nb-fab { display: none; }
.player.focus { padding-bottom: 84px; }
.player.focus .player-nav { padding-left: 64px; }
.deck .rhythm, .deck .trap { margin: 0; }
.trap-grid.deck { max-width: 560px; }
/* the phrase itself stands out; the partner line is quieter */
.pw2-b:not(.main) b { font-size: 1.02rem; color: var(--text-2); }
.pw2-b.main { border: 1.5px solid var(--accent); }
.pw2-b.main b { font-size: 1.25rem; }

/* ---------- Dnes tiles: each with its own small picture, colour and a gentle movement on hover or press ---------- */
.ms-tiles .ms-tile { position: relative; overflow: hidden; padding: var(--sp-4); gap: var(--sp-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ms-tile .t-art { display: block; width: 72px; height: 52px; margin: 0 0 8px -2px; }
.ms-tile .t-art svg { width: 100%; height: 100%; overflow: visible; }
.ms-tile:hover, .ms-tile:focus-visible, .ms-tile:active { transform: translateY(-3px); box-shadow: 0 12px 26px -14px rgba(var(--shadow-rgb), .35); border-color: var(--line-strong); }
.ms-tile::after { content: "→"; position: absolute; right: 12px; top: 10px; color: var(--text-3); opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .18s; }
.ms-tile:hover::after, .ms-tile:focus-visible::after { opacity: 1; transform: none; }
.ms-tile * { transition: transform .35s ease, opacity .35s ease; }
/* My notebook: lined paper, a page that lifts, a +1 */
.t-nb { background: linear-gradient(180deg, transparent 0 60%, rgba(var(--accent-rgb), .06)), var(--surface); }
.t-nb .t-pg rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.4; }
.t-nb .t-pg2 { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.2; }
.t-nb .t-pg path { stroke: var(--line-strong); stroke-width: 1.4; stroke-linecap: round; }
.t-nb .t-pg .t-margin { stroke: rgba(var(--accent-rgb), .5); }
.t-nb .t-plus circle { fill: var(--accent); } .t-nb .t-plus text { fill: #fff; font: 700 8.5px var(--sans); }
.t-nb .t-pg { transform-origin: 10px 43px; }
.t-nb:hover .t-pg, .t-nb:focus-visible .t-pg { transform: rotate(-6deg); }
.t-nb:hover .t-plus, .t-nb:focus-visible .t-plus { transform: translateY(-4px); }
/* Practise on the go: the road, a car that drives, a little music */
.t-otg { background: linear-gradient(160deg, rgba(79, 126, 160, .14), rgba(79, 126, 160, .04)), var(--surface); }
.t-otg .t-road { stroke: var(--sea); stroke-width: 2; opacity: .5; } .t-otg .t-dash { stroke: var(--sea); stroke-width: 1.6; opacity: .35; }
.t-otg .t-car path { fill: var(--sea); } .t-otg .t-car circle { fill: var(--surface); stroke: var(--sea); stroke-width: 2.4; }
.t-otg .t-notes path { stroke: var(--sea); stroke-width: 1.8; fill: none; } .t-otg .t-notes circle { fill: var(--sea); }
.t-otg:hover .t-car, .t-otg:focus-visible .t-car { transform: translateX(10px); }
.t-otg:hover .t-notes, .t-otg:focus-visible .t-notes { transform: translate(6px, -8px) rotate(8deg); }
/* Ember: a warm glow, a flame that flickers, a speech bubble */
.t-ember { background: radial-gradient(120% 90% at 0% 100%, rgba(var(--accent-rgb), .18), transparent 60%), var(--surface); }
.t-ember .t-glow { fill: rgba(var(--accent-rgb), .16); } .t-ember .t-flame { fill: var(--accent); }
.t-ember .t-bubble rect, .t-ember .t-bubble path { fill: var(--surface); stroke: var(--accent); stroke-width: 1.4; } .t-ember .t-bubble circle { fill: var(--accent); }
.t-ember .t-flame { transform-origin: 24px 42px; }
.t-ember:hover .t-flame, .t-ember:focus-visible .t-flame { animation: t-flicker .9s ease-in-out infinite; }
.t-ember:hover .t-glow, .t-ember:focus-visible .t-glow { transform: scale(1.12); transform-origin: 24px 30px; }
.t-ember:hover .t-bubble, .t-ember:focus-visible .t-bubble { transform: translateY(-3px); }
@keyframes t-flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.06, .96) rotate(-3deg); } 60% { transform: scale(.96, 1.05) rotate(3deg); } }
/* Your path: the mountain, the dotted way up, you on it */
.t-path { background: linear-gradient(180deg, rgba(88, 112, 96, .10), transparent 70%), var(--surface); }
.t-path .t-mtn { fill: rgba(88, 112, 96, .18); } .t-path .t-way { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 1.5 4; stroke-linecap: round; }
.t-path .t-you { fill: var(--accent); } .t-path .t-top { fill: var(--ok); }
.t-path:hover .t-you, .t-path:focus-visible .t-you { transform: translate(4px, -6px); }
.t-path:hover .t-mtn, .t-path:focus-visible .t-mtn { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .ms-tile, .ms-tile * { transition: none !important; animation: none !important; } .ms-tile:hover { transform: none; } }

/* Reading: tap a sentence to hear it, see it in your language and keep it */
.artefact .rs { cursor: pointer; border-radius: 4px; transition: background .15s; }
.artefact .rs:hover, .artefact .rs:focus-visible { background: rgba(var(--accent-rgb), .08); outline: none; }
.artefact .rs.on { background: rgba(var(--accent-rgb), .16); }
.rs-panel { margin: 12px 0 4px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--accent); }
.rs-panel .rs-en { font: 400 1.1rem/1.35 var(--serif); margin: 0 0 4px; }
.rs-panel .rs-tr { margin: 0 0 8px; }
.jr-keep { justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; }

/* Readings */
.rd-head h1 { margin: 8px 0 8px; }
.rd-list { display: grid; gap: 12px; margin-top: 16px; }
.rd-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; color: inherit; text-decoration: none; padding: 14px; transition: transform .18s, box-shadow .18s; }
.rd-item:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(var(--shadow-rgb), .35); }
.rd-paper { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent-2); transform: rotate(-4deg); }
.rd-txt { display: flex; flex-direction: column; min-width: 0; }
.rd-txt small { color: var(--text-3); }
.rd-txt i { font-family: var(--serif); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-one { max-width: 720px; }
.rd-ctrl { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.rd-text { font: 400 1.18rem/1.7 var(--serif); }
.rd-text .rs { cursor: pointer; border-radius: 4px; }
.rd-text .rs:hover, .rd-text .rs:focus-visible { background: rgba(var(--accent-rgb), .08); outline: none; }
.rd-text .rs.on { background: rgba(var(--accent-rgb), .18); }
.rd-ra { margin-top: 26px; }
.rd-ra h2 { font-size: 1.3rem; }
.ls-readings { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.ls-readings small { display: block; color: var(--text-3); font-size: var(--fs-sm); }
.ls-readings > svg { width: 20px; height: 20px; color: var(--text-2); }
.ls-readings > svg:last-child { width: 18px; height: 18px; color: var(--text-3); transition: transform .2s, color .2s; }
.ls-readings:hover { border-color: rgba(var(--fg-rgb), .3); }
.ls-readings:hover > svg:last-child, .ls-readings:focus-visible > svg:last-child { color: var(--accent-2); transform: translateX(3px); }
.rd-ctrl [hidden] { display: none !important; }
/* The sentence panel stays in view at the bottom of the screen while you read */
.rs-panel { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 6; box-shadow: 0 14px 30px -12px rgba(var(--shadow-rgb), .35); }
@media (min-width: 900px) { .rs-panel { bottom: 16px; } }
.rs-panel .row { justify-content: flex-end; }

/* Story scenes added for the plane, car, hotel, bus, market and shop stories */
.sc-drift { animation: scDrift 9s ease-in-out infinite alternate; }
@keyframes scDrift { to { transform: translateX(-26px); } }
.sc-dash { animation: scDash 1.2s linear infinite; }
@keyframes scDash { from { transform: translateY(-14px); opacity: .3; } 50% { opacity: .7; } to { transform: translateY(14px); opacity: .3; } }
.sc-arrive { animation: scArrive 2.6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes scArrive { from { transform: translateX(640px); } }
@media (prefers-reduced-motion: reduce) { .sc-drift, .sc-dash, .sc-arrive { animation: none; } }

/* Step headings: English first, the translation small beside it; "Why?" the same */
.bi-tr { font: 400 .62em/1.2 var(--sans); color: var(--text-3); letter-spacing: 0; text-transform: none; margin-left: 4px; }
.pl-why-btn .bi-tr { font-size: .9em; margin-left: 2px; }
.pl-why-btn .bi-tr::before { content: '· '; }
.tag .bi-tr { font-size: .95em; }
.xph-l1 b, .xph-en b { color: var(--text); }

/* Story: listen in the picture; the whole text is optional and opens by itself at the end */
.tx-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 14px 0 4px; }
.tx-bar .tx-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tx-bar .tx-btn.on .bi-tr { color: inherit; opacity: .75; }
.tx { margin-top: 10px; padding: 16px 14px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tx-h h3 { margin: 6px 0 2px; }
.tx-h p { margin: 0 0 6px; }
.tx.tx-done { animation: revealUp .5s var(--ease) both; }
.tx .story-line .who { color: var(--c, var(--accent-2)); }
.tx .story-line { border-left: 3px solid var(--c, transparent); }

/* Story: the picture stays clear on every screen; the speech bubble sits under it, its tail pointing up at the speaker */
  .story-scene { aspect-ratio: auto; padding-top: 42.5%; background: var(--surface); }
.story-scene .scene-svg { bottom: auto; height: auto; }
.story-scene::after { inset: 0 0 auto 0; height: 0; padding-top: 42.5%; }
.story-scene .standees { top: 0; bottom: auto; padding-top: calc(42.5% - 66px); gap: 16px; }
.story-scene .standee .avatar { width: 34px; height: 34px; }
.story-scene .bubble { position: relative; left: auto !important; top: auto; transform: none; max-width: none; min-height: 6.2em; margin: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); font-size: 1.12rem; }
.story-scene .bubble::after { bottom: auto; top: -9px; }
.story-scene .bubble.enter { animation: bubbleInM .35s var(--ease); }
@keyframes bubbleInM { from { opacity: .3; } }
@media (min-width: 641px) { .story-scene .bubble { font-size: 1.3rem; padding: 16px 22px; min-height: 5em; } .story-scene .standee .avatar { width: 44px; height: 44px; } .story-scene .standees { padding-top: calc(42.5% - 80px); } }
.lbl-next-row [hidden] { display: none !important; }
.pl-why-btn { white-space: nowrap; }
/* Daylight scenes: a lighter fade at the bottom so the names stay readable without dimming the picture */
.scene:has(.scene2)::after { background: linear-gradient(180deg, transparent 62%, rgba(20, 14, 10, .35) 100%); }
.sc-bob { animation: scBob 3.2s ease-in-out infinite; }
@keyframes scBob { 50% { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .sc-bob { animation: none; } }
/* Bubble controls: hear the line again, slowly, show the translation, keep it in the notebook */
.bubble .bb-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.bubble .bb-b { display: inline-flex; align-items: center; gap: 8px; height: 34px; min-width: 34px; padding: 0 9px; border: 1px solid #e2d6c2; border-radius: 999px; background: #fffaf2; color: #5e4a3c; font: 600 13px/1 var(--sans); cursor: pointer; }
.bubble .bb-b svg { width: 17px; height: 17px; }
.bubble .bb-b:hover { border-color: #c8573f; color: #a24b1f; }
.bubble .bb-tr img { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; opacity: .55; }
.bubble .bb-tr.on { background: #2a1d17; color: #f6efe2; border-color: #2a1d17; }
.bubble .bb-tr.on img { opacity: 1; }
.bubble .bb-act .nbp { margin-left: auto; }
.bubble .l1b[hidden] { display: none; }
/* Place signs */
.place-ic { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--pbg); color: var(--pink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.place-ic svg { width: 24px; height: 24px; }
.place-ic.sm { width: 34px; height: 34px; border-radius: 10px; } .place-ic.sm svg { width: 19px; height: 19px; }
.yb-head:has(.yb-place) { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
.yb-head > .yb-place { grid-row: 1 / span 4; margin-top: 2px; }
.yb-head > :not(.yb-place) { grid-column: 2; }
/* Step headings read "Story / Příběh" */
.stage-title h2 .bi-tr { font-size: .78em; margin-left: 2px; }
.stage-title h2 .bi-tr::before { content: '/ '; color: var(--text-3); }
/* A deck can show everything at once ("Show all"), like the story's whole text */
.deck.deck-all > * { display: block !important; margin-bottom: 14px; }
.deck-nav.all .deck-b, .deck-nav.all .deck-dots, .deck-nav.all .deck-n { display: none; }
.deck-all-b { white-space: nowrap; border: 0; background: none; color: var(--accent-2); font: 600 var(--fs-sm) var(--sans); cursor: pointer; padding: 6px 8px; text-decoration: underline; text-underline-offset: 3px; }
/* Drill: the whole list after the last sentence */
.dr-all { text-align: left; margin-top: 18px; border-top: 1px solid var(--line); }
.dr-li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dr-li p { margin: 0; } .dr-li b { font-weight: 600; }
.dr-ok { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2, #eee6da); color: var(--text-3); }
.dr-ok.ok { background: rgba(47, 138, 79, .14); color: #2f8a4f; } .dr-ok svg { width: 13px; height: 13px; }
.dr-act { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- Phrasal verb of the Stage ---------- */
.pv-slot { max-width: 560px; }
.pv-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: radial-gradient(130% 120% at 100% 0%, rgba(58, 134, 200, .1), transparent 55%), var(--surface); }
.pv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-big { font: 500 clamp(1.6rem, 6vw, 2rem)/1.15 var(--serif); margin-right: auto; }
.pv-m { font-weight: inherit; color: var(--accent-2); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), .55); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.pv-mean { margin: -4px 0 0; color: var(--text-2); }
.pv-where { display: block; font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.pv-dl { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.pv-dl .pv-where { margin-top: 12px; }
.pv-ln { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 6px; border-radius: 10px; transition: background .2s; }
.pv-ln.on { background: rgba(var(--accent2-rgb), .08); }
.pv-av .avatar, .pv-av svg, .pv-av > * { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: block; }
.pv-ln p { margin: 0; line-height: 1.45; }
.pv-ln p i, .pv-ri p i { display: block; font-style: normal; color: var(--text-3); font-size: .9em; margin-top: 2px; }
.pv-l1-off .pv-ln p i, .pv-l1-off .pv-ri p i { display: none; }
.pv-ctl { margin-top: 2px; }
.pv-rel { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pv-ri { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev, var(--surface)); }
.pv-ri-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-ri p { margin: 6px 0 0; }
.rhythm-pv { border-color: rgba(58, 134, 200, .45) !important; }
.pv-tag { display: inline-block; margin-bottom: 8px; font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #3a86c8; }
.pv-write { margin: 12px 0 0; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pv-chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 500 14px var(--sans); cursor: pointer; color: var(--text); }
.pv-chip.on { border-color: #3a86c8; background: rgba(58, 134, 200, .1); color: #1f5f99; }

/* Reading, sentence by sentence (same pattern as the story) */
.rd1 { max-width: 640px; }
.rd1-en { font: 400 clamp(1.25rem, 4.6vw, 1.55rem)/1.45 var(--serif); margin: 14px 0 6px; min-height: 2.9em; }
.rd1-tr { color: var(--text-2); margin: 0 0 10px; min-height: 1.4em; }
.rd1-tr[hidden] { display: none; }
.rd1-ctl { gap: 8px; }
.rd1-ctl .flag-i { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }
.rd1-nav { justify-content: space-between; max-width: none; margin-top: 16px; }
.rd1-nav .deck-dots { flex-wrap: wrap; justify-content: center; }
#rq[hidden], #ra-read[hidden] { display: none; }

/* ---------- The notebook's own colour: sky to sea blue ---------- */
:root { --nb: #3a86c8; --nb-deep: #1f5f99; --nb-soft: rgba(58, 134, 200, .12); --nb-grad: linear-gradient(120deg, #1f5f99, #3a86c8 55%, #7dbde6); }
.pl-nb { width: auto; height: 42px; padding: 0 14px 0 10px; gap: 8px; display: inline-flex; align-items: center; border-radius: 13px; border: 0; background: var(--nb-grad); color: #fff; font: 600 14px var(--sans); box-shadow: 0 8px 18px -10px rgba(31, 95, 153, .9); }
.pl-nb svg { width: 22px; height: 22px; }
.pl-nb:hover { filter: brightness(1.06); }
.pl-nb .nb-c:not(:empty) { top: -7px; right: -7px; background: var(--accent); color: #fff; box-shadow: 0 0 0 2px var(--bg); font-size: var(--fs-xs); padding: 3px 6px; }
@media (max-width: 380px) { .pl-nb .pl-nb-l { display: none; } .pl-nb { padding: 0 10px; } }
/* the bottom/top menu: the notebook item in its colour */
.pl-top { grid-template-columns: 40px minmax(0, 1fr) auto; }
@media (max-width: 480px) { .pl-nb .pl-nb-l { display: none; } .pl-nb { width: 46px; padding: 0; justify-content: center; } .pl-nb svg { width: 24px; height: 24px; } }
.pv-head { flex-wrap: nowrap; } .pv-big { flex: 1; min-width: 0; }

/* ---------- Step by step (reading, writing): numbered steps on top, one section at a time, or all ---------- */
.fl > .fl-step, .fl > .fl-extra { display: none; }
.fl > .fl-step.on, .fl.fl-all > .fl-step, .fl.fl-all > .fl-extra { display: block; }
.fl.fl-all > .fl-step + .fl-step, .fl.fl-all > .fl-extra { margin-top: 18px; }
.fl-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.fl-steps { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; flex-wrap: wrap; }
.fl-steps button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 5px 11px 5px 5px; font: 600 13px var(--sans); cursor: pointer; }
.fl-steps button b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2, #eee6da); color: var(--text-2); font-size: 12px; }
.fl-steps button.on { border-color: var(--accent); color: var(--text); }
.fl-steps button.on b { background: var(--accent); color: #fff; }
.fl-steps button.done b { background: rgba(47, 138, 79, .15); color: #2f8a4f; }
.fl-steps button:disabled { opacity: .5; cursor: default; }
@media (max-width: 420px) { .fl-steps button:not(.on) span { display: none; } .fl-steps button:not(.on) { padding-right: 5px; } }
.fl-next { margin-top: 14px; display: flex; justify-content: flex-end; }
.fl-next[hidden] { display: none; }

/* ---------- Each section has its colour: the menu icon, its hover and active background, and the page's band ---------- */
[data-sec="today"] { --sc: var(--accent-2); --sc-soft: rgba(var(--accent-rgb), .12); }
[data-sec="path"] { --sc: #2f6b45; --sc-soft: rgba(47, 107, 69, .13); }
[data-sec="nb"] { --sc: #3a86c8; --sc-soft: rgba(58, 134, 200, .13); }
[data-sec="ember"] { --sc: #d07a26; --sc-soft: rgba(224, 137, 47, .15); }
[data-sec="go"] { --sc: #9b4a80; --sc-soft: rgba(155, 74, 128, .13); }
[data-sec="me"] { --sc: var(--text-2); --sc-soft: rgba(var(--fg-rgb), .07); }
.nav-links a[data-sec] svg, .tabbar a[data-sec] svg { color: var(--sc); opacity: 1; transition: transform .2s; }
.nav-links a[data-sec]:hover { background: var(--sc-soft); color: var(--sc); }
.nav-links a[data-sec].active { background: var(--sc-soft); color: var(--sc); font-weight: 600; }
.tabbar a[data-sec] { border-radius: 14px; transition: background .2s, color .2s; }
.tabbar a[data-sec]:hover { background: var(--sc-soft); }
.tabbar a[data-sec].active { color: var(--sc); font-weight: 600; }
.tabbar a[data-sec].active svg { color: var(--sc); background: var(--sc-soft); border-radius: 10px; padding: 3px 10px; box-sizing: content-box; transform: translateY(-1px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [data-sec="path"] { --sc: #7fbf8f; } :root:not([data-theme="light"]) [data-sec="go"] { --sc: #d58ab9; } }
:root[data-theme="dark"] [data-sec="path"] { --sc: #7fbf8f; } :root[data-theme="dark"] [data-sec="go"] { --sc: #d58ab9; }

.sec-band { position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 20px 20px 24px; margin: 8px 0 16px; box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .55); }
.sec-band h1 { color: #fff; margin: 8px 0 4px; }
.sec-band .tag, .sec-band .ls-k { color: #fff !important; opacity: .9; }
.sec-band .muted, .sec-band p { color: rgba(255, 255, 255, .92) !important; }
.sec-band::after { content: ''; position: absolute; right: -10px; bottom: -10px; width: 230px; height: 140px; opacity: .28; background: center / contain no-repeat; pointer-events: none; }
.sec-path { background: linear-gradient(130deg, #2f6b45, #4f8f5c 55%, #a7c98a); }
.sec-path::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='M10 110 Q60 40 100 30 T190 110'/%3E%3Cpath d='M30 110 Q70 55 100 48 T170 110'/%3E%3Cpath d='M50 110 Q80 70 100 65 T150 110'/%3E%3Cpath d='M70 110 Q90 85 100 82 T130 110'/%3E%3C/svg%3E"); }
.sec-ember { background: linear-gradient(130deg, #b4531f, #e0892f 55%, #f6c56b); display: flex; align-items: center; gap: 16px; }
.sec-ember::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120' fill='white'%3E%3Ccircle cx='150' cy='30' r='4'/%3E%3Ccircle cx='120' cy='60' r='3'/%3E%3Ccircle cx='175' cy='70' r='5'/%3E%3Ccircle cx='100' cy='95' r='2.5'/%3E%3Ccircle cx='160' cy='100' r='3.5'/%3E%3Ccircle cx='135' cy='15' r='2'/%3E%3Ccircle cx='185' cy='35' r='2'/%3E%3C/svg%3E"); }
.sec-go { background: linear-gradient(130deg, #6b3f86, #b5577a 55%, #f0a17a); }
.sec-go::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M85 45v30M100 30v60M115 50v20M130 20v80M145 40v40M160 55v10M175 35v50M190 50v20'/%3E%3C/svg%3E"); }
.sec-go .ls-k svg { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- My week (planner) ---------- */
.pw-band { background: linear-gradient(130deg, #c8573f, #e08a5f 55%, #f3c28f); padding-right: 72px; }
.pw-peng { position: absolute; right: 18px; top: 14px; font-size: 34px; }
.pw-wk { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; font-size: .95rem; }
.pw-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1000px) { .pw-main { grid-template-columns: minmax(0, 1fr) 300px; } .pw .app, main.pw { max-width: 1240px; } }
.pw-days-grid { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 1000px) { .pw-days-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; } }
.pw-day { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
@media (min-width: 1000px) { .pw-day { display: flex; flex-direction: column; min-height: 240px; padding: 12px 8px; } }
.pw-day h3 { margin: 0; text-align: center; font: 700 12px/1.1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.pw-day h3 i { display: block; font: 500 20px/1.2 var(--serif); font-style: normal; color: var(--text); text-transform: none; }
.pw-day.today { border: 2px solid var(--accent); background: var(--bg-elev, var(--surface)); }
.pw-day.today h3 { color: var(--accent-2); }
.pw-day.past { opacity: .7; }
.pw-day.over, .pw-days-grid.picking .pw-day { border-style: dashed; border-color: var(--accent); }
.pw-slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 36px; }
@media (min-width: 1000px) { .pw-slots { flex-direction: column; align-items: stretch; } }
.pw-it { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev, #fff); color: var(--text); text-decoration: none; font: 600 12.5px var(--sans); cursor: pointer; max-width: 100%; }
@media (min-width: 1000px) { .pw-slots .pw-it { border-radius: 12px; padding: 8px; align-items: flex-start; } }
.pw-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ab); color: var(--ai); }
.pw-ic svg { width: 15px; height: 15px; }
.pw-tx { display: flex; flex-direction: column; min-width: 0; } .pw-tx b { font-weight: 600; overflow-wrap: anywhere; } .pw-tx time { font: 500 var(--fs-xs) var(--sans); color: var(--text-3); }
.pw-it.go { box-shadow: inset 0 0 0 2px var(--accent); }
.pw-lesson { border-color: #b9d4ea; background: #eef5fc; color: #1f5f99; }
.pw-add { width: 30px; height: 30px; border-radius: 50%; border: 1.5px dashed var(--line-strong); background: none; color: var(--text-3); font-size: 17px; cursor: pointer; }
@media (min-width: 1000px) { .pw-add { width: 100%; border-radius: 10px; height: 34px; margin-top: auto; } }
.pw-side { display: flex; flex-direction: column; gap: 12px; }
.pw-pal, .pw-rem { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pw-rem b { font: 500 1.1rem var(--serif); }
.pw-k { margin: 4px 0 0; font: 600 var(--fs-xs)/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.pw-pal-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-pick { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 999px; }
.pw-pick.on .pw-it { box-shadow: 0 0 0 2px var(--accent); }
.btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
dialog.pw-sheet { border: 0; padding: 0; border-radius: 20px; width: min(440px, calc(100vw - 24px)); background: var(--bg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
dialog.pw-sheet::backdrop { background: rgba(20, 15, 12, .45); }
.pw-sh { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pw-sh-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pw-sh-h b { font: 500 1.15rem var(--serif); }
.pw-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.pw-x svg { width: 15px; height: 15px; }
.pw-days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pw-days button { flex: none; width: 54px; padding: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--text); }
.pw-days button small { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; } .pw-days button b { font: 500 18px var(--serif); }
.pw-days button.on { border-color: var(--accent); background: var(--accent); color: #fff; } .pw-days button.on small { color: rgba(255, 255, 255, .85); }
.pw-time { max-width: 160px; }
.pw-sh-f { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.pw-go { align-self: flex-start; }
/* Dnes */
.ms-plan { margin: 12px 0 4px; }
.ms-plan-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ms-plan-inv { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--text-2); text-decoration: none; font-size: .95rem; }
.ms-plan-inv span:first-child { font-size: 22px; } .ms-plan-inv span:nth-child(2) { flex: 1; } .ms-plan-inv svg { width: 16px; height: 16px; }
.ms-plan-inv:hover { border-color: var(--accent); color: var(--text); }
.plan-btn { white-space: nowrap; }

/* Dnes: Tenerife ochre (sun on volcanic earth) */
[data-sec="today"] { --sc: #a8741a; --sc-soft: rgba(211, 155, 42, .16); }
.sec-today { background: linear-gradient(130deg, #9a6a14, #d39b2a 55%, #f0cf7a); }
.sec-today::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='150' cy='38' r='14'/%3E%3Cpath d='M150 14v-8M150 70v-8M126 38h-8M182 38h-8M133 21l-6-6M167 55l6 6M167 21l6-6M133 55l-6 6'/%3E%3Cpath d='M20 118 L80 70 L92 76 L108 64 L170 118'/%3E%3C/svg%3E"); }
.sec-today h1, .sec-today .ms-welcome, .sec-today .ms-greet-tr { color: #fff !important; }
.sec-today .ms-greet-tr { opacity: .9; }
.sec-today .ms-stats a, .sec-today .ms-stats li { color: #fff; }
.sec-today .ms-stats a { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); }
.sec-today .ms-stats svg { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [data-sec="today"] { --sc: #e0b04a; } }
:root[data-theme="dark"] [data-sec="today"] { --sc: #e0b04a; }
.pw-push { display: flex; flex-direction: column; gap: 8px; }
.pw-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: .95rem; }
.pw-sw input { position: absolute; opacity: 0; pointer-events: none; }
.pw-sw i { flex: none; width: 42px; height: 24px; border-radius: 12px; background: var(--line-strong, #d8cfc0); position: relative; transition: background .2s; }
.pw-sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.pw-sw input:checked + i { background: #2f8a4f; }
.pw-sw input:checked + i::after { transform: translateX(18px); }
.pw-sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd-modes { gap: 12px; margin: 0 0 6px; }
#rd-one .link-btn { margin-top: 10px; }
#rd-one[hidden], #rd-whole[hidden] { display: none; }

/* ---------- Ember page (2026-11 redesign): calm amber, the conversation first, clear groups, a quiet side column ---------- */
.em-page { --amb: #c7701f; --amb-ink: #8a4712; --amb-soft: #fbefdd; --amb-line: #efd5b2; max-width: 1120px; padding-bottom: 48px; }
.em-hero { position: relative; overflow: hidden; display: flex; gap: 24px; align-items: center; margin: 12px 0 28px; padding: var(--sp-7) clamp(20px, 4vw, 40px); border-radius: 24px;
  background: radial-gradient(120% 140% at 100% 0%, #ffe2b8 0%, rgba(255, 226, 184, 0) 55%), linear-gradient(135deg, #fff7ec 0%, #fbe9d1 100%); border: 1px solid var(--amb-line); color: var(--text); }
.em-hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 146, 52, .22), rgba(232, 146, 52, 0) 70%); pointer-events: none; }
.em-hero-av { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #f6b25a, #d4721f 70%); box-shadow: 0 12px 28px -12px rgba(199, 112, 31, .9), inset 0 1px 0 rgba(255, 255, 255, .4); }
.em-hero-av svg { width: 38px; height: 38px; }
.em-hero-tx { position: relative; z-index: 1; min-width: 0; }
.em-hero-k { margin: 0; font: 600 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--amb-ink); }
.em-hero h1 { margin: 4px 0 8px; font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1; letter-spacing: -.015em; color: var(--text); }
.em-hero-sub { margin: 0; max-width: 56ch; font-size: clamp(15px, 1.6vw, 16.5px); line-height: 1.5; color: var(--text-2); }
.em-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.em-tags span { padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--amb-ink); background: rgba(255, 255, 255, .7); border: 1px solid var(--amb-line); }

.em-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 28px; align-items: start; }
.em-main { display: grid; gap: 16px; padding: clamp(16px, 2.4vw, 24px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px -32px rgba(var(--shadow-rgb), .6); }

/* who / what you're talking about, with the choices folded inside */
.em-picker { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.em-picker > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; cursor: pointer; border-radius: 16px; }
.em-picker > summary::-webkit-details-marker { display: none; }
.em-picker > summary:hover { background: rgba(var(--fg-rgb), .03); }
.em-picker > summary:focus-visible { outline: 2px solid var(--amb); outline-offset: 2px; }
.em-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.em-now-av { width: 40px; height: 40px; flex: 0 0 40px; }
.em-now small { display: block; font-size: 12px; color: var(--text-3); }
.em-now b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-change { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--amb-ink); background: var(--amb-soft); border: 1px solid var(--amb-line); }
.em-change::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.em-picker[open] .em-change::after { transform: rotate(-135deg) translateY(-1px); }
.em-groups { display: grid; gap: 20px; padding: 6px 16px 18px; border-top: 1px solid var(--line); }
.em-group { display: grid; gap: 12px; padding-top: 12px; }
.em-gh { margin: 0; font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.em-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.em-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 14px/1 var(--sans); cursor: pointer; transition: border-color .15s, background .15s; }
.em-chip svg { width: 16px; height: 16px; }
.em-chip:hover, .em-chip:focus-visible { border-color: var(--amb); background: var(--amb-soft); outline: none; }
.em-num { font: 500 var(--fs-xs)/1 var(--mono); color: var(--amb-ink); opacity: .75; }
.em-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.em-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, transform .1s; }
.em-person:hover, .em-person:focus-visible { border-color: var(--amb); outline: none; }
.em-person:active { transform: translateY(1px); }
.em-p-av { width: 38px; height: 38px; flex: 0 0 38px; }
.em-person b { display: block; font-size: 15px; }
.em-person small { display: block; font-size: 12.5px; color: var(--text-3); }

.em-chat { min-height: clamp(300px, 46vh, 520px); max-height: 62vh; padding: 20px; gap: 16px; background: var(--bg-elev); border-radius: 18px; }
.em-chat .msg { font-size: 16.5px; line-height: 1.55; max-width: min(84%, 62ch); }
.em-compose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.em-compose .input { min-height: 50px; font-size: 16px; border-radius: 14px; }
.em-mic { width: 50px; height: 50px; }
.em-mic svg { width: 22px; height: 22px; }
.em-send { min-height: 50px; padding: 0 22px; border-radius: 14px; }
.em-under { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; min-height: 0; }
.em-under:not(:has(> :not([hidden]))) { display: none; }
.em-text-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; border: 0; background: none; color: var(--amb-ink); font: 600 14px/1.3 var(--sans); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(138, 71, 18, .3); text-underline-offset: 4px; }
.em-text-btn[hidden] { display: none; }
.em-text-btn:hover { text-decoration-color: currentColor; }
.em-text-btn svg { width: 16px; height: 16px; }
.em-note { margin: 2px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-3); }

.em-side { display: grid; gap: 20px; position: sticky; top: calc(var(--nav-h, 64px) + 16px); }
.em-card { display: grid; gap: 12px; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.em-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.em-card h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.em-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; font: 600 13px/1 var(--sans); color: #fff; background: var(--amb); }
.em-count[hidden] { display: none; }
.em-card-p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.em-empty { margin: 4px 0 0; padding: 14px; border-radius: 12px; background: var(--bg); color: var(--text-3); font-size: 14px; text-align: center; }
.em-card .em-archive { max-height: 360px; }
.em-card .em-text-btn { justify-self: start; }

@media (max-width: 900px) {
  .em-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .em-side { position: static; }
}
@media (max-width: 560px) {
  .em-hero { gap: 16px; align-items: flex-start; border-radius: 20px; margin-bottom: 20px; }
  .em-hero-av { width: 56px; height: 56px; }
  .em-hero-av svg { width: 28px; height: 28px; }
  .em-main { padding: 12px; border-radius: 18px; gap: 12px; }
  .em-chat { padding: 14px; min-height: 52vh; }
  .em-chat .msg { font-size: 16px; max-width: 90%; }
  .em-compose { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .em-send { padding: 0 16px; }
  .em-people { grid-template-columns: 1fr 1fr; }
}
html.theme-dark .em-hero, html.theme-night .em-hero { background: linear-gradient(135deg, #2c2016, #3a2716); border-color: #5a3d20; }
html.theme-dark .em-tags span, html.theme-night .em-tags span { background: rgba(0, 0, 0, .25); border-color: #5a3d20; color: #f3c58f; }
html.theme-dark .em-hero-k, html.theme-night .em-hero-k { color: #f3c58f; }
.em-flame { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #f6b25a, #d4721f 70%); }
.em-flame svg { width: 56%; height: 56%; }
.em-page .em-mic { background: var(--amb-soft); color: var(--amb-ink); box-shadow: inset 0 0 0 1px var(--amb-line); }
.em-page .em-mic.listening { background: var(--amb); color: #fff; }
@media (max-width: 560px) {
  .em-hero { padding: var(--card-pad); }
  .em-hero h1 { font-size: 2rem; }
  .em-hero-sub { font-size: 14.5px; }
  .em-tags { margin-top: 10px; gap: 8px; }
  .em-tags span { font-size: 12px; padding: 4px 9px; }
  .em-chat { min-height: 44vh; }
}

/* Listen + Listen slowly: always side by side, never wrapped apart */
.say-pair { display: inline-flex; align-items: center; gap: 4px; flex-wrap: nowrap; flex: none; vertical-align: middle; white-space: nowrap; }
.mdl-say { margin-top: 8px; }
.vs-say { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; justify-self: start; max-width: 100%; }
.vs-say .btn { flex: none; }
.vs-say .btn:first-child { flex: 0 1 auto; white-space: normal; text-align: left; min-width: 0; }
.pw2-sayp { display: flex; flex-direction: column; gap: 4px; }
.pw2-sayp .pw2-slow { color: var(--text-2); }
/* In the conversation's side column the two speeds stack, so the line keeps its width on phones */
@media (max-width: 640px) { .story-line .say .say-pair { flex-direction: column; } }
.msg-say { display: inline-flex; vertical-align: middle; margin-left: 2px; }
.msg-say .btn-sm { min-height: 30px; padding: 0 7px; }

/* ==========================================================================================
   Video messages: the recorder sheet (public/js/videorec.js) and the inline player
   for recorded videos (public/js/mentor.js recordingHtml), in "Your tutor" and Teach.
   ========================================================================================== */
html.vr-open { overflow: hidden; }
.vr-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(var(--shadow-rgb), .55); backdrop-filter: blur(3px); animation: vr-in .18s var(--ease); }
@keyframes vr-in { from { opacity: 0; } to { opacity: 1; } }
.vr-sheet { width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(var(--shadow-rgb), .6); color: var(--text); }
.vr-head { display: flex; align-items: flex-start; gap: 12px; }
.vr-head-t { flex: 1; min-width: 0; }
.vr-head h2 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.vr-head p { margin: 2px 0 0; }
.vr-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.vr-x svg { width: 16px; height: 16px; }
.vr-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #15110f; }
.vr-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #15110f; }
.vr-live.mirrored { transform: scaleX(-1); object-fit: cover; }
.vr-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: #f4ece4; background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), .25), transparent 65%), #15110f; }
.vr-msg[hidden] { display: none; }
.vr-msg-t { margin: 0; max-width: 40ch; line-height: 1.5; }
.vr-timer { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font: 500 13px/1.4 var(--mono); }
.vr-timer .vr-max { opacity: .65; }
.vr-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.vr-backdrop[data-state="recording"] .vr-dot { background: #ff4d3d; animation: vr-pulse 1.2s ease-in-out infinite; }
@keyframes vr-pulse { 50% { opacity: .35; } }
.vr-backdrop[data-state="review"] .vr-timer, .vr-backdrop[data-state="sending"] .vr-timer, .vr-backdrop[data-state="blocked"] .vr-timer { display: none; }
.vr-level { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.vr-level i { display: block; height: 100%; width: 0; background: #8fd19e; transition: width .08s linear; }
.vr-backdrop[data-state="review"] .vr-level, .vr-backdrop[data-state="sending"] .vr-level, .vr-backdrop[data-state="blocked"] .vr-level { display: none; }
.vr-warn { margin: 0; min-height: 1.4em; text-align: center; color: var(--text-2); }
.vr-warn.soft { color: var(--accent-2); font-weight: 600; }
.vr-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; }
.vr-rec { grid-column: 2; width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: border-color .2s var(--ease), transform .15s var(--ease); }
.vr-rec:hover:not(:disabled) { transform: scale(1.04); }
.vr-rec:disabled { opacity: .45; cursor: default; }
.vr-rec-in { width: 52px; height: 52px; border-radius: 50%; background: #e2483a; transition: all .2s var(--ease); }
.vr-rec.on { border-color: #e2483a; }
.vr-rec.on .vr-rec-in { width: 26px; height: 26px; border-radius: 6px; }
.vr-rec[hidden] { display: none; }
.vr-after { grid-column: 1 / -1; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.vr-after[hidden] { display: none; }
.vr-after .btn { min-width: 140px; }
.vr-progress { display: flex; align-items: center; gap: 12px; }
.vr-progress[hidden] { display: none; }
.vr-progress-bar { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.vr-progress-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.vr-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.vr-opt { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; min-width: 0; }
.vr-opt select { width: 100%; min-width: 0; padding: 8px 10px; font-size: 14px; }
.vr-screen { display: inline-flex; align-items: center; gap: 8px; }
.vr-screen[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.vr-keep { margin: 0; text-align: center; }
.vr-start { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px; margin-bottom: 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px dashed var(--line-strong); }
.vr-start .btn { display: inline-flex; align-items: center; gap: 8px; }
.vr-start p { margin: 0; flex: 1 1 220px; }
.vr-link { margin: 4px 0 12px; }
.vr-link summary { cursor: pointer; color: var(--text-2); }
.vr-link[open] summary { margin-bottom: 8px; }
@media (max-width: 560px) {
  .vr-backdrop { padding: 0; place-items: stretch; }
  .vr-sheet { width: 100%; max-height: 100dvh; min-height: 100dvh; border-radius: 0; border: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .vr-stage { aspect-ratio: 3 / 4; max-height: 56dvh; }
  .vr-opt { flex-basis: 100%; }
  .vr-after .btn { flex: 1; min-width: 0; }
}

/* The inline player for a recorded video */
.vm { margin: 12px 0 0; max-width: 560px; }
.vm-frame { position: relative; border-radius: 16px; overflow: hidden; background: #15110f; aspect-ratio: 16 / 10; box-shadow: 0 10px 30px -18px rgba(var(--shadow-rgb), .55); }
.vm-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #15110f; }
.vm-dur { position: absolute; right: 10px; top: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font: 500 12px/1.5 var(--mono); pointer-events: none; transition: opacity .2s; }
.vm-dur.gone { opacity: 0; }
.vm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 8px; }
.vm-speed { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.vm-speed button { border: 0; background: transparent; color: var(--text-2); font: 500 12.5px/1 var(--sans); padding: 6px 10px; cursor: pointer; min-width: 44px; min-height: 30px; }
.vm-speed button + button { border-left: 1px solid var(--line); }
.vm-speed button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.vm-keep { font-size: 12px; }
.vm-gone { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; }
.vm-gone svg { width: 14px; height: 14px; }
.mt-answer { margin-top: 12px; gap: 8px; flex-wrap: wrap; }
.mt-answer .btn { display: inline-flex; align-items: center; gap: 8px; }
.mt-answer .btn svg { width: 16px; height: 16px; }
.mt-answer-form { margin-top: 12px; display: grid; gap: 8px; }
.teach-req .vm { max-width: 420px; }
.pl-edit { flex: 0 0 auto; align-self: center; margin-left: 6px; padding: 6px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; border: 1px dashed var(--line-strong); white-space: nowrap; }
.pl-edit:hover { color: var(--text); border-style: solid; }
/* Deleting a message or its video (author or admin): quiet text buttons */
.mt-del-row { display: flex; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.mt-del { border: 0; background: transparent; color: var(--text-3); font: 500 12.5px/1 var(--sans); padding: 8px 8px; border-radius: var(--r-xs); cursor: pointer; min-height: 30px; }
.mt-del:hover, .mt-del:focus-visible { color: var(--bad); background: var(--bad-soft); }
.mt-del:disabled { opacity: .5; cursor: default; }
.teach-req .mt-del { margin-left: auto; }
.staff-links { display: grid; gap: 12px; margin-bottom: 20px; }
.staff-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* Phones: the tutor's "Edit texts" link takes its own row, so the Stage title keeps its full width. */
@media (max-width: 640px) {
  .pl-title:has(.pl-edit) { flex-wrap: wrap; row-gap: 8px; }
  .pl-title:has(.pl-edit) > div { flex: 1 1 calc(100% - 152px); min-width: 0; } /* icon 52 + Why? 68 + two gaps */
  .pl-title .pl-edit { order: 9; margin-left: 68px; }
}

/* Ember: which language the microphone listens in */
.em-miclang { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font: 600 14px/1.3 var(--sans); color: var(--text-2); }
.em-ml-k { display: inline-flex; align-items: center; gap: 6px; }
.em-ml-k svg { width: 15px; height: 15px; }
.em-miclang button { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font: 600 14px var(--sans); cursor: pointer; }
.em-miclang button[aria-pressed="true"] { background: var(--amb, #E07A1F); border-color: var(--amb, #E07A1F); color: #fff; }
