/* Clearer look (Michal's picks, Nov 2026):
   1. Small labels: bold capitals, darker, a bit bigger (was thin, spaced-out code-style letters).
   2. Panels on Stage pages: a thin frame in the panel's colour and a tinted header strip for the panel name;
      brown for the learner's own things, blue for tips ("Did you know?", "A little British life").
   3. Step names: the name on a trail signpost, with the red-and-white trail blaze before the stretch line.
   4. Larger text: the "AA" button in the top bar makes the page about 15% bigger (html.big-text). */
:root {
  --label: #7A3A22;
  --panel-line: #C9A88C; --panel-head: #F5EBE1;
  --tip-line: #8FB3CF; --tip-bg: #EEF4F9; --tip-text: #23455F;
  --sign: linear-gradient(180deg, #B98552, #9A6A3C); --sign-ink: #FFF8EE;
}
html.theme-night {
  --label: #F0B49B;
  --panel-line: #6E5240; --panel-head: #2A221C;
  --tip-line: #44677F; --tip-bg: #1C2731; --tip-text: #CFE4F3;
  --sign: linear-gradient(180deg, #8E6440, #74502F); --sign-ink: #FFF4E6;
}

/* ---------- 1. labels ---------- */
.tag, .eyebrow, .h2-eyebrow, .st-k, .feedback .k, .stage-title .tag {
  font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: .05em !important; font-size: 13.5px !important; line-height: 1.35 !important;
}
.tag, .eyebrow, .h2-eyebrow { color: var(--label); }
@media (max-width: 640px) { .tag, .eyebrow, .h2-eyebrow, .st-k, .feedback .k, .stage-title .tag { font-size: 13px !important; } }

/* ---------- 2. panels on Stage pages ---------- */
main.player .card, main.player .ex-card { border: 1.5px solid var(--panel-line); }
main.player :is(.card, .ex-card) > .tag:first-child {
  display: flex; align-items: center; gap: 6px; max-width: none; align-self: stretch; justify-self: stretch;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 14px; padding: 11px var(--card-pad);
  background: var(--panel-head); border-bottom: 1.5px solid var(--panel-line); border-radius: calc(var(--r) - 1.5px) calc(var(--r) - 1.5px) 0 0;
}
/* tips: blue frame, blue strip, dark text that is easy to read */
main.player .se-fact { background: var(--tip-bg); border: 1.5px solid var(--tip-line); color: var(--tip-text); padding: 0 16px 14px; overflow: hidden; }
main.player .se-fact .st-k { display: block; max-width: none; margin: 0 -16px 12px; padding: 10px 16px; border-bottom: 1.5px solid var(--tip-line); color: var(--tip-text); }
main.player .feedback.info { background: var(--tip-bg); border: 1.5px solid var(--tip-line); color: var(--tip-text); padding-top: 0; overflow: hidden; }
main.player .feedback.info > .k:first-child { display: flex; max-width: none; align-items: center; gap: 6px; margin: 0 -16px 10px; padding: 10px 16px; border-bottom: 1.5px solid var(--tip-line); color: var(--tip-text); }

/* ---------- 3. step names on a trail sign ---------- */
.stage-title .ico { display: none; }
.stage-title > div { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.stage-title .tag { display: inline-flex; align-items: center; gap: 8px; }
.stage-title .tag::before { content: ""; flex: none; width: 22px; height: 14px; border-radius: 2px; background: linear-gradient(#fff 0 33%, #D2342C 33% 67%, #fff 67%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.stage-title h2 {
  margin: 0; display: inline-block; max-width: 100%;
  background: var(--sign); color: var(--sign-ink); text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
  font-size: clamp(1.55rem, 3.6vw, 2.2rem); font-weight: 700; line-height: 1.1;
  padding: 10px 36px 10px 16px; border-radius: 4px 0 0 4px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
}
.stage-title h2 .bi-tr { color: inherit; opacity: .88; font-family: var(--sans); font-weight: 500; font-size: .5em; }

/* ---------- 4. larger text ---------- */
html.big-text #app { zoom: 1.15; }
.big-btn span { font: 700 13px/1 var(--sans); letter-spacing: -.02em; }
.big-btn span b { font-size: 18px; }
.big-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- 1b. the other small labels, in the same clear style (bold sans, a bit bigger, less spacing) ----------
   Counters and timers (01 / 14, 2:30) keep their even-width digits. */
.hint, .flip .hint, .standee .nm, .bubble .who, .story-line .who, .basics .basics-k, .ft-k, .basics-tbl th,
.grade-row small, .state-badge, .pill, .block-node small, .space-lvl .sl-state, .kpi .l, .bsum-k, .bsum-h,
.nb-voice, .nb-sub, .nb-sec, .nb-k, .nb-sel small, .nb2-k, .nb2 .nb-band small, .nbc-wk, .nb4-msg b,
.ess .ess-k, .ess .ess-hint, .pv-where, .pv-tag, .pw-k, .em-hero-k, .em-gh, .tr-badge, .tr-dir, .tr-pill-txt small,
.sr-seeall small, .bd .bd-seeall small, .vc-kicker, .mt-status, .se-fact .st-k {
  font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: .04em !important;
}
.hint, .flip .hint, .standee .nm, .bubble .who, .story-line .who, .basics .basics-k, .ft-k, .nb-sec, .nb2-k, .bsum-k, .ess .ess-k, .pw-k, .em-hero-k, .vc-kicker {
  font-size: 13px !important;
}
.flip .hint, .nb-sec, .nb-sub, .bsum-h { color: var(--text-2); }
.em-num, .sr-clock, .vr-timer, .vm-dur, #ctr, .nb-c { font-variant-numeric: tabular-nums; }
.ls-k, .ra-k, .ra-t, .ra-text .ra-t, .kpi .v small, .vp-pt .lb small { font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: .04em !important; }
.ls-k, .ra-k { font-size: 13px !important; }

/* ---------- Today: section names and the path strip, bigger and in the pages' brown ---------- */
.st-k { color: var(--label); font-size: 14px !important; }
main.player .se-fact .st-k { color: var(--tip-text); }
.t2 .t2-path-h .st-k { font-size: 14px !important; }
.t2 .t2-strip .t2-node small { font-size: 13.5px; font-weight: 600; color: var(--label); max-width: 96px; }
.t2 .t2-strip .t2-node.later small { font-weight: 500; opacity: .85; }
.t2 .t2-strip .t2-node.now small { font-weight: 800; opacity: 1; }
.t2 .t2-strip .t2-sign small { font-size: 13.5px; max-width: 96px; }
.t2-node, .t2-sign { min-width: 96px; }

/* ---------- 2b. frames on every app page (Today, Course map, Notebook, Talk/Ember, Listen, Profile…) ----------
   Same rule as on Stage pages: thin brown frame for your things, a tinted strip for the panel name,
   blue frame and dark blue text for messages and tips. The landing page is not an "app" page and keeps its look. */
main.app .card { border: 1.5px solid var(--panel-line) !important; }
main.app .card > .tag:first-child {
  display: flex; align-items: center; gap: 8px; max-width: none; align-self: stretch; justify-self: stretch;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 14px; padding: 11px var(--card-pad);
  background: var(--panel-head); border-bottom: 1.5px solid var(--panel-line); border-radius: calc(var(--r) - 1.5px) calc(var(--r) - 1.5px) 0 0;
}
/* Today */
main.ms .ms-tile, main.ms .kpi { border: 1.5px solid var(--panel-line) !important; }
main.ms .mt-card > .mt-card-h {
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 14px; padding: 11px var(--card-pad);
  background: var(--panel-head); border-bottom: 1.5px solid var(--panel-line); border-radius: calc(var(--r) - 1.5px) calc(var(--r) - 1.5px) 0 0;
}
main.app .bc-card { background: var(--tip-bg) !important; border-color: var(--tip-line) !important; color: var(--tip-text); }
main.app .bc-card > .bc-top { margin: -14px -16px 12px; padding: 10px 16px; border-bottom: 1.5px solid var(--tip-line); }
main.app .bc-card > .bc-top, main.app .bc-card > .bc-top * { color: var(--tip-text) !important; }
main.app .pw2-tip { background: var(--tip-bg); border: 1.5px solid var(--tip-line); border-radius: 14px; color: var(--tip-text); }
/* Notebook */
main.nb-page .nb2-add { border: 1.5px solid var(--panel-line) !important; border-radius: 14px; overflow: hidden; }
main.nb-page .nb2-add > .nb2-add-q { display: block; margin: -12px -12px 12px; padding: 10px 12px; background: var(--panel-head); border-bottom: 1.5px solid var(--panel-line); }
main.nb-page .nb2-paper, main.nb-page .nb-ov { border: 1.5px solid var(--panel-line) !important; border-radius: 14px; }
main.nb-page .nb4-fam-t { border-width: 1.5px; }
/* Listen */
main.ls .ls-readings, main.ls .ls-dl, main.ls .ls-opt:not(.on), main.ls .ls-dir:not(.on) { border: 1.5px solid var(--panel-line) !important; }
main.ls .ls-readings, main.ls .ls-dl { background: var(--surface); }
/* Course map (Tvoje stezka) */
main.ms-map .space-lvl, main.ms-map .block-node { border: 1.5px solid var(--panel-line) !important; }
main.ms-map .space-lvl { border-radius: 16px; padding: 16px 18px; background: var(--surface); }
/* Talk (Ember) */
main.app .em-main, main.app .em-card, main.app .em-hero, main.app .em-picker { border: 1.5px solid var(--panel-line) !important; }
main.app .em-chat .msg.tutor { border: 1.5px solid var(--panel-line); }

/* Stage summary: the day the Stage was started (Basecamp) */
.bsum-start { margin: 6px 0 0; color: var(--text-2); }
.bsum-hand { font: 700 1.25rem var(--serif); font-style: italic; color: var(--text); }

/* Classic traps for the learner's own language: no flag above each card (the text and the heading say it). */
.trap.trap-own { grid-template-columns: 1fr; }
.xpl-flag[hidden] { display: none !important; }
/* "Say the date / price…" rows: what is written on top (it can be long: "ID card · expires 03/01/2028"), the answer under it. */
.date-row { grid-template-columns: minmax(0, 1fr); }
.date-row .date-fb { grid-column: 1; }
.date-w { font: 700 1.2rem/1.35 var(--sans); overflow-wrap: anywhere; }

/* International English: the 🇺🇸 note (American version + its voice) and Michal's cards (note, challenge). */
.us-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--tip-bg); border: 1px solid var(--tip-line); color: var(--tip-text); font-size: .88rem; line-height: 1.4; text-align: left; }
.us-row .us-flag { font: 700 .7rem var(--sans); letter-spacing: .04em; white-space: nowrap; }
.us-row .us-txt { min-width: 0; overflow-wrap: anywhere; }
.us-mark { font-size: .85rem; margin-left: 6px; opacity: .85; }
.us-ok { margin-top: 6px; }
.mi-card { display: grid; gap: 8px; margin-bottom: 14px; border: 1.5px solid var(--panel-line); }
.mi-card .mi-who { display: flex; align-items: center; gap: 10px; }
.mi-card .mi-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.mi-card .mi-name { display: grid; flex: 1; min-width: 0; }
.mi-card .mi-name small { color: var(--text-2); font-size: .8rem; }
.mi-card .mi-en { margin: 0; font: 600 1.05rem/1.4 var(--serif); }
.mi-card .mi-tr { margin: 0; color: var(--text-2); font-size: .9rem; }
.mi-card .mi-save { display: flex; flex-wrap: wrap; gap: 8px; }
.mi-card .mi-save .input { flex: 1 1 220px; min-width: 0; }

/* Conversation step on phones: the speech bubble sits under the picture (as in the story), never cut off. */
@media (max-width: 640px) {
  .mission-scene { aspect-ratio: auto; padding-top: 32.5%; background: var(--surface); }
  .mission-scene .scene-svg { bottom: auto; height: auto; }
  .mission-scene::after { inset: 0 0 auto 0; height: 0; padding-top: 32.5%; }
  .mission-scene .standees { top: 0; bottom: auto; padding-top: calc(32.5% - 62px); gap: 16px; }
  .mission-scene .standee .avatar { width: 34px; height: 34px; }
  .mission-scene .bubble { position: relative; left: auto !important; top: auto; transform: none; max-width: none; margin: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); font-size: 1.05rem; }
  .mission-scene .bubble::after { bottom: auto; top: -9px; }
}
/* The mission's goals: the dotted line runs through the circles only, never through the (wrapping) goal texts. */
.summit { align-items: flex-start; }
.summit svg.path { inset: 18px 0 auto 0; height: 30px; }
.summit .camp-node { padding: 0 5px; min-width: 0; }
.summit .camp-node small { overflow-wrap: anywhere; hyphens: auto; }
/* The translate pill steps aside while the page scrolls, so it never sits on the text you are reading. */
.tr-pill { transition: opacity .25s; }
.tr-pill.tr-pill-quiet { opacity: .12; pointer-events: none; }
/* Very narrow phones: the logo mark alone, so the language, theme, size and sign-in buttons fit on one line. */
@media (max-width: 430px) { .topbar .brand .wm { display: none; } }
/* Conversation: a calm picture strip, the goals as a checklist, the chat below. */
.mission-scene.mission-simple { aspect-ratio: 800 / 200; }
@media (max-width: 640px) { .mission-scene.mission-simple { padding-top: 0; aspect-ratio: 800 / 260; } .mission-scene.mission-simple .scene-svg { bottom: 0; height: 100%; } .mission-scene.mission-simple::after { padding-top: 0; inset: 0; height: auto; } .mission-scene.mission-simple .standees { padding-top: 0; top: auto; bottom: 8px; } }
.mgoals { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; gap: 8px; }
.mgoal { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .95rem; line-height: 1.4; color: var(--text-2); }
.mgoal .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: all .3s; }
.mgoal .tick svg { width: 12px; height: 12px; opacity: 0; }
.mgoal.met { color: var(--text); }
.mgoal.met .tick { background: var(--ok, #2f6b4a); border-color: var(--ok, #2f6b4a); color: #fff; }
.mgoal.met .tick svg { opacity: 1; }
