/* © 2026 AVENLIO GLOBAL. All rights reserved. Design of AVENLIO Civics Voice; copying without written permission is prohibited. */
/* AVENLIO Civics Voice — "Liberty Light".
   Cinematic deep-blue sky behind everything, bright white study cards on top,
   gold for the brand, coral for the one main action, blue/aqua for sound,
   teal-green for "I know". Readable first, premium second, never gaudy. */
:root {
  --sky-1: #0e2f75;
  --sky-2: #0b2560;
  --sky-3: #081b47;
  --navy: #0a1f4d;
  --ink: #0f1f3d;
  --ink-2: #2a3a5c;
  --slate: #5b6b88;
  --paper: #ffffff;
  --paper-2: #f4f7fd;
  --paper-3: #e9effa;
  --hair: rgba(15, 31, 61, 0.1);
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.78);
  --white-line: rgba(255, 255, 255, 0.28);
  --gold: #d7b06a;
  --gold-2: #f1d9a0;
  --coral: #ff5d52;
  --coral-2: #ef3b4b;
  --blue: #2f74ff;
  --blue-2: #1d5fe0;
  --blue-soft: #e8f0ff;
  --aqua: #17b8cc;
  --teal: #18b99a;
  --teal-2: #0f9e84;
  --green: #18a86b;
  --violet: #7a5cff;
  --shadow: 0 14px 34px rgba(2, 10, 36, 0.32);
  --shadow-sm: 0 6px 18px rgba(2, 10, 36, 0.18);
  --sans: "Golos Text", -apple-system, system-ui, sans-serif;
  --display: "Literata", Georgia, serif;
  --nav: 78px;
  --r-xl: 26px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--sans); color: var(--white); background: #061638; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
a { color: var(--blue-2); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(47, 116, 255, 0.55); outline-offset: 2px; }
.q-en, h1, h2, p, button, b { overflow-wrap: break-word; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell: the sky ---------- */
.app {
  width: min(440px, 100%);
  min-height: 100vh; min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  color: var(--white);
  background:
    radial-gradient(420px 260px at 50% -4%, rgba(86, 150, 255, 0.55), transparent 65%),
    radial-gradient(300px 240px at 100% 30%, rgba(215, 176, 106, 0.16), transparent 70%),
    radial-gradient(360px 300px at 0% 75%, rgba(47, 116, 255, 0.22), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 45%, var(--sky-3) 100%);
}
.skip { position: absolute; left: 12px; top: -40px; z-index: 9; background: var(--white); color: var(--ink); padding: 8px 12px; border-radius: 10px; }
.skip:focus { top: 8px; }

/* Header */
.top {
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 6px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 6px;
}
.head-side { display: flex; align-items: center; }
.head-side.end { justify-content: flex-end; }
.logo { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; }
.logo-a { width: 38px; height: 32px; flex: none; filter: drop-shadow(0 2px 8px rgba(215, 176, 106, 0.45)); }
.logo-rule { width: 1px; height: 28px; background: linear-gradient(transparent, var(--gold), transparent); }
.logo-words strong { display: block; font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: 0.22em; line-height: 1; color: var(--white); }
.logo-words em { display: block; font-style: normal; font-weight: 500; font-size: 10.5px; letter-spacing: 0.34em; text-transform: uppercase; line-height: 1.3; color: var(--gold-2); margin-top: 3px; white-space: nowrap; }
.lang {
  appearance: none; -webkit-appearance: none;
  width: 60px; min-height: 36px; padding: 0 20px 0 12px; border-radius: 999px;
  border: 1px solid var(--white-line);
  background: rgba(255, 255, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center / 9px 6px;
  color: var(--white); font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lang option { color: var(--ink); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--gold-2);
  background: linear-gradient(160deg, #ffffff, #dfe8fb);
  color: var(--navy); font-weight: 700; font-size: 17px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.view { padding: 6px 16px calc(var(--nav) + 26px + env(safe-area-inset-bottom)); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -0.015em; margin: 0 0 8px; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 20px; line-height: 1.22; }
.view > h1, .setup > h1, .ready > h1 { text-align: center; color: var(--white); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25); }
.view > h1::after, .setup > h1::after, .ready > h1::after {
  content: ""; display: block; width: 54px; height: 3px; margin: 10px auto 14px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.lede { color: var(--white-soft); margin: -4px 0 16px; line-height: 1.45; text-align: center; font-size: 15px; }
.hint { color: var(--slate); font-size: 13px; line-height: 1.45; margin: 6px 0 0; }
.view > .hint, .view > p.hint, .stack-btns .hint, .view > .tools .hint, .seal-wrap + .hint { color: var(--white-soft); }
.fine { color: var(--white-soft); font-size: 14px; line-height: 1.45; margin: 6px 0 0; }
.q-num { margin: 0 0 8px; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-2); font-weight: 700; }
.view > .q-num { color: var(--gold-2); }
.q-en { font-size: 23px; line-height: 1.25; margin: 0 0 6px; font-weight: 700; color: var(--ink); }
.q-ru { margin: 0 0 6px; color: var(--ink-2); font-size: 16px; line-height: 1.4; }
.phon { margin: 6px 0 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--blue-soft); color: #2c4f9c; font-size: 14.5px; line-height: 1.45; }
.eyebrow { margin: 0; letter-spacing: 0.02em; font-size: 14px; color: var(--white-soft); }
.ok { color: var(--green); }
.warn { color: #ffb4ab; }
.panel .warn, .face .warn { color: #c62f2f; }
.banner { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; background: rgba(255, 255, 255, 0.14); border: 1px solid var(--white-line); color: var(--white); }

/* ---------- White study surfaces ---------- */
.panel, .lesson, .mini, .tile, .module, .today, .hub button.hub-item, .link-card, .state-card, .face {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}
.panel { border-radius: var(--r-lg); padding: 18px; margin: 0 0 14px; position: relative; }
.panel > p:last-child { margin-bottom: 0; }
.panel label { color: var(--ink-2); }
.panel h2 { color: var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: relative; z-index: 2; }
.view > .row > button, .panel .row > button { flex: 1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--blue-2); background: var(--blue-soft); }

/* ---------- Buttons ---------- */
.btn, .btn-line, .btn-coral, .btn-aqua, .btn-quiet, .btn-green, .btn-again {
  min-height: 52px; border-radius: 999px; padding: 0 20px; border: 1px solid transparent;
  font-weight: 700; font-size: 16.5px; letter-spacing: 0.005em;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active, .btn-line:active, .btn-aqua:active, .btn-quiet:active, .btn-green:active, .btn-again:active,
.module:active, .tile:active, .mini:active, .lesson:active, .today:active, .tabs button:active, .choice:active, .lang-pill:active, .place-field:active { transform: scale(0.97); }
.btn, .btn-coral {
  color: #fff; background: linear-gradient(180deg, var(--coral), var(--coral-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 22px rgba(239, 59, 75, 0.38);
}
.btn:hover { filter: brightness(1.05); }
.btn-aqua { color: var(--blue-2); background: var(--blue-soft); border-color: rgba(47, 116, 255, 0.25); }
.btn-aqua::before {
  content: ""; display: inline-block; width: 18px; height: 14px; margin-right: 8px; vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M1 5h3l4-3.5v11L4 9H1z' fill='black'/%3E%3Cpath d='M11 4.2a4 4 0 0 1 0 5.6M13.6 1.8a7.4 7.4 0 0 1 0 10.4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M1 5h3l4-3.5v11L4 9H1z' fill='black'/%3E%3Cpath d='M11 4.2a4 4 0 0 1 0 5.6M13.6 1.8a7.4 7.4 0 0 1 0 10.4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.view > .stack-btns .btn-aqua, .grade-row .btn-aqua { color: #fff; background: linear-gradient(180deg, #3f86ff, var(--blue-2)); border: 0; box-shadow: 0 10px 22px rgba(29, 95, 224, 0.35); }
.btn-line { color: var(--white); background: rgba(255, 255, 255, 0.12); border-color: var(--white-line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.panel .btn-line, .face .btn-line, .sheet .btn-line { color: var(--ink); background: var(--paper-2); border-color: var(--hair); backdrop-filter: none; }
.btn-quiet { color: var(--gold-2); background: transparent; border-color: transparent; min-height: 44px; font-size: 15px; padding: 0 12px; }
.panel .btn-quiet, .face .btn-quiet { color: var(--blue-2); }
.btn-green { color: #fff; background: linear-gradient(180deg, #28d0ae, var(--teal-2)); border: 0; box-shadow: 0 10px 22px rgba(15, 158, 132, 0.38); }
.btn-green::before { content: "\2713"; margin-right: 8px; }
.btn-again { color: #fff; background: linear-gradient(180deg, var(--coral), var(--coral-2)); border: 0; box-shadow: 0 10px 22px rgba(239, 59, 75, 0.35); }
.btn-again::before { content: "\2715"; margin-right: 8px; }
.btn.wide, .btn-line.wide, .btn-aqua.wide { width: 100%; }
.cta { min-height: 58px; font-size: 19px; }
.text-link { background: none; border: 0; color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0; font-weight: 600; }
/* Back: a quiet chevron */
.view > p:first-child { margin: 0 0 2px; }
.view > p:first-child > .btn-quiet[data-act="go"], .setup > .text-link:first-child { min-height: 36px; padding: 0 4px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--white); }
.view > p:first-child > .btn-quiet[data-act="go"]::before, .setup > .text-link:first-child::before { content: "\2039"; font-size: 26px; line-height: 0; margin-right: 6px; vertical-align: -3px; }

.stack-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 12px; }
.stack-btns > * { min-width: 0; }
.stack-btns > :last-child:nth-child(odd), .stack-btns > p, .stack-btns > .row { grid-column: 1 / -1; }
.stack-btns > p { color: var(--white); }
.stack-btns > .row > button { flex: 1; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0 4px; }
.tools .hint { margin: 0; }
.grade-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.grade-row .btn-green, .grade-row .btn-again { min-height: 74px; border-radius: 22px; font-size: 18px; }

/* One coral per screen */
.panel > .btn.wide[data-act="flip"] { color: var(--blue-2); background: var(--blue-soft); border: 1px solid rgba(47, 116, 255, 0.25); box-shadow: none; margin-top: 6px; }
.panel .tools .btn[data-act="know"] { color: #fff; background: linear-gradient(180deg, #28d0ae, var(--teal-2)); box-shadow: 0 8px 18px rgba(15, 158, 132, 0.3); }
.panel .tools .btn[data-act="know"]::before { content: "\2713"; margin-right: 8px; }
.face .btn-line[data-act="flip"] { color: #fff; border: 0; background: linear-gradient(180deg, var(--coral), var(--coral-2)); box-shadow: 0 10px 22px rgba(239, 59, 75, 0.32); }
.face .btn-line[data-act="flip"]::before { content: "\21BB"; margin-right: 8px; }
.face .btn-line[data-act="fav"]::before { content: "\2606"; margin-right: 6px; color: var(--gold); }

/* ---------- Forms ---------- */
label { display: block; font-size: 14px; margin: 12px 0 6px; color: var(--white-soft); font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: 52px; border-radius: var(--r-md); border: 1px solid transparent;
  background: var(--paper); color: var(--ink); padding: 10px 16px;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.panel input, .panel textarea, .panel select { background: var(--paper-2); border-color: var(--hair); box-shadow: none; }
input::placeholder, textarea::placeholder { color: #8a97ad; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 116, 255, 0.22); }
select:not(.lang):not(.lang-wide) {
  appearance: none; -webkit-appearance: none; padding-right: 42px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d5fe0' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px;
  font-weight: 600;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input[type="checkbox"] { width: 24px; min-height: 24px; height: 24px; accent-color: var(--teal); margin: 0; box-shadow: none; }
label.row { color: var(--white); font-size: 15px; gap: 10px; }
details { margin: 10px 0; border-radius: var(--r-md); padding: 0 14px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--white-line); }
summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.grow { flex: 1; }
.choice { display: block; width: 100%; text-align: left; min-height: 56px; border-radius: var(--r-md); border: 2px solid transparent; background: var(--paper); color: var(--ink); padding: 12px 16px; margin: 0 0 10px; font-weight: 600; box-shadow: var(--shadow-sm); }
.choice.on { border-color: var(--blue); background: var(--blue-soft); }

/* ---------- Bottom navigation ---------- */
.tabs {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(440px, 100%);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(10, 31, 77, 0.88), rgba(6, 20, 52, 0.97));
  border-top: 1px solid var(--white-line); box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.3);
  z-index: 4; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tabs button { min-height: 58px; border: 0; background: transparent; border-radius: 16px; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, 0.72); display: grid; place-items: center; align-content: center; gap: 3px; padding: 4px 2px; }
.tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabs .feat-ico { width: 26px; height: 26px; margin: 0; }
.tabs .feat-ico path, .tabs .feat-ico rect, .tabs .feat-ico circle { stroke: rgba(255, 255, 255, 0.8); }
.tabs .feat-ico .acc { stroke: rgba(255, 255, 255, 0.8); }
.tabs .feat-ico .fill { fill: rgba(255, 255, 255, 0.8); }
.tabs button.on { color: #2a1b00; background: linear-gradient(180deg, #ffd98a, #e9b45a); box-shadow: 0 6px 18px rgba(233, 180, 90, 0.4); }
.tabs button.on .feat-ico path, .tabs button.on .feat-ico rect, .tabs button.on .feat-ico circle { stroke: #3a2600; }
.tabs button.on .feat-ico .fill { fill: #3a2600; }

/* ---------- Icons ---------- */
.feat-ico { width: 34px; height: 34px; display: block; margin: 0 auto 6px; overflow: visible; }
.feat-ico path, .feat-ico rect, .feat-ico circle { fill: none; stroke: var(--gold-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat-ico .acc { stroke: #6fe3f0; }
.feat-ico .fill { fill: var(--gold-2); stroke: none; }
.module .feat-ico path, .module .feat-ico rect, .module .feat-ico circle, .today .feat-ico path, .today .feat-ico rect { stroke: var(--blue-2); }
.module .feat-ico .acc, .today .feat-ico .acc { stroke: var(--coral); }
.module .feat-ico .fill { fill: var(--coral); }

/* ---------- Home ---------- */
.home-hero { position: relative; margin: 2px -2px 10px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); min-height: 200px; }
.home-hero .state-art { position: absolute; inset: 0; }
.home-hero .state-scene { height: 100%; }
.home-hero .state-outline { width: 82px; height: 82px; top: 14px; right: 14px; }
.home-hero .state-name { top: 16px; left: 18px; right: auto; text-align: left; }
.home-hero .state-name::before { display: none; }
.home-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(5, 18, 48, 0.78) 100%); }
.home-head { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.home-head h1 { font-size: 28px; color: #fff; margin: 0 0 2px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); text-align: left; }
.home-head .eyebrow { color: rgba(255, 255, 255, 0.88); }
.meta-line { margin: 0 2px 12px; color: var(--white-soft); font-size: 14px; font-weight: 500; }
.meta-line i { font-style: normal; color: var(--gold-2); margin: 0 4px; }
.progress-card { display: grid; grid-template-columns: 100px 1fr; gap: 16px; align-items: center; }
.progress-card .stat { display: grid; gap: 2px; }
.progress-card .btn { margin-top: 10px; min-height: 48px; font-size: 16px; padding: 0 14px; white-space: nowrap; width: 100%; }
.ring-wrap { position: relative; width: 100px; height: 100px; }
.ring { width: 100px; height: 100px; }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--paper-3); }
.ring .value { stroke: var(--blue); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring-wrap b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--ink); }
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--ink); }
.stat span { display: block; color: var(--slate); font-size: 14px; }
.modules { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0 0 14px; }
.module { grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 96px; border-radius: 20px; padding: 12px 6px; }
.module:nth-child(4) { grid-column: 1 / span 3; }
.module:nth-child(5) { grid-column: 4 / span 3; }
.module b { font-weight: 700; font-size: 15px; color: var(--ink); }
.module .feat-ico { width: 40px; height: 40px; }
.today { width: 100%; display: grid; grid-template-columns: 54px 1fr 46px; gap: 12px; align-items: center; text-align: left; padding: 14px; margin: 0 0 14px; border-radius: var(--r-lg); }
.today-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(160deg, #3f86ff, var(--blue-2)); }
.today-ico .feat-ico { margin: 0; width: 30px; height: 30px; }
.today .today-ico .feat-ico path { stroke: #fff; }
.today .today-ico .feat-ico .acc { stroke: #bfe4ff; }
.today-copy small { display: block; color: var(--blue-2); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.today-copy small:last-child { color: var(--slate); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; margin-top: 2px; }
.today-copy b { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.25; margin-top: 2px; color: var(--ink); }
.today-play { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff; background: linear-gradient(180deg, #3f86ff, var(--blue-2)); box-shadow: 0 6px 16px rgba(29, 95, 224, 0.35); padding-left: 3px; }
.mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.mini { min-height: 84px; border-radius: var(--r-md); padding: 12px; text-align: left; }
.mini b, .mini span, .tile b, .tile span { display: block; }
.mini b { font-size: 19px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini:first-child b { color: var(--coral-2); }
.mini span, .tile span { color: var(--slate); font-size: 12.5px; margin-top: 4px; line-height: 1.3; }
.section-title { margin: 6px 2px 10px; font-size: 19px; color: var(--white); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.tile { min-height: 96px; border-radius: 20px; text-align: left; padding: 14px; position: relative; overflow: hidden; border: 0; }
.tile b { font-size: 16px; font-weight: 700; color: var(--ink); }
.tile.all { background: linear-gradient(160deg, #ffffff, #e6efff); }
.tile.read { background: linear-gradient(160deg, #ffffff, #dff7f3); }
.tile.write { background: linear-gradient(160deg, #ffffff, #ece7ff); }
.tile.vocab { background: linear-gradient(160deg, #ffffff, #fff0e3); }
.scene { margin: 0 0 12px; padding: 16px; border-radius: var(--r-lg); background: var(--paper); color: var(--ink); }
.course-card { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.hero { display: grid; grid-template-columns: 100px 1fr; gap: 14px; align-items: center; }

/* ---------- Lessons ---------- */
.lessons, #results { display: grid; gap: 10px; }
.lesson { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; border-radius: var(--r-md); padding: 14px; }
#results .lesson { grid-template-columns: 1fr; gap: 4px; }
.lesson small { color: var(--slate); font-size: 12.5px; }
.lesson b { font-size: 16.5px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.lesson-no { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--blue-2); background: var(--blue-soft); }
.lesson.going .lesson-no { color: #fff; background: linear-gradient(160deg, #3f86ff, var(--blue-2)); }
.lesson.done .lesson-no { color: #fff; background: linear-gradient(160deg, #28d0ae, var(--teal-2)); font-size: 0; }
.lesson.done .lesson-no::before { content: "\2713"; font-size: 19px; }
.lesson-copy { display: grid; gap: 3px; min-width: 0; }
.lesson-count { font-weight: 700; font-size: 14px !important; color: var(--ink-2) !important; }
.bar { display: block; height: 5px; border-radius: 99px; background: var(--paper-3); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #5fb4ff); }
.lesson.done .bar i { background: var(--teal); }

/* ---------- Flashcards ---------- */
.card-stage { perspective: 1200px; min-height: 455px; position: relative; margin: 10px 8px 30px; }
.card-stage::before, .card-stage::after { content: ""; position: absolute; border-radius: var(--r-xl); background: rgba(255, 255, 255, 0.55); box-shadow: var(--shadow-sm); }
.card-stage::before { top: 12px; right: -7px; bottom: -10px; left: 7px; transform: rotate(1.6deg); }
.card-stage::after { top: 22px; right: -12px; bottom: -18px; left: 14px; transform: rotate(3deg); background: rgba(255, 255, 255, 0.3); z-index: -1; }
.flip { position: relative; min-height: 455px; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(.2,.75,.25,1); z-index: 1; }
.flip.on { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-xl); padding: 22px 20px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.face > .q-num:first-child { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: var(--blue-soft); }
.face h2.q-en { font-size: 26px; margin-top: 4px; }
.face.back { transform: rotateY(180deg); background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%); }
.face.back > .q-num:first-child { background: #fff3dc; color: #9a6a12; }
.face.back > .q-en { font-size: 32px; text-align: center; margin: 10px 0 4px; }
.motif { margin-top: auto; opacity: 0.9; align-self: flex-end; }
.motif svg { width: 84px; height: 84px; }
.motif svg * { stroke: var(--blue-2); }

/* ---------- Test ---------- */
.test-card { padding-top: 20px; }
[data-screen="test"] > p:not(.hint):not(.lede):not(.q-num) { text-align: center; color: var(--white); font-weight: 600; font-size: 15px; margin: 0 0 16px; }
[data-screen="test"] > .q-num { text-align: center; }

/* ---------- Interview (cinematic) ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--white-line); }
.seg .choice { margin: 0; min-height: 46px; border-radius: 999px; border: 0; background: transparent; text-align: center; font-size: 15px; color: rgba(255, 255, 255, 0.82); padding: 0 8px; box-shadow: none; line-height: 1.15; }
.seg .choice.on { color: #fff; background: linear-gradient(180deg, #3f86ff, var(--blue-2)); box-shadow: 0 6px 16px rgba(29, 95, 224, 0.4); }
.officer-card { position: relative; border-radius: var(--r-xl); overflow: hidden; margin: 0 0 14px; box-shadow: var(--shadow); }
.officer-card img { width: 100%; height: 330px; object-fit: cover; object-position: center 18%; display: block; }
.officer-card::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(5, 18, 48, 0.9)); pointer-events: none; }
.adam-tag { position: absolute; top: 12px; right: 12px; z-index: 1; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 12.5px; font-weight: 700; }
.bubble { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; border-radius: var(--r-md); padding: 14px 16px; background: rgba(8, 24, 60, 0.72); border: 1px solid var(--white-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: center; }
.bubble .q-en { font-size: 19px; color: #fff; }
.bubble .q-ru { color: rgba(255, 255, 255, 0.82); font-size: 14.5px; }
.seal-wrap { display: grid; justify-items: center; gap: 8px; margin: 12px 0 14px; }
.seal { width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center; position: relative; background: radial-gradient(circle at 50% 35%, #4b8dff, #1d4fb8 70%); border: 3px solid rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 8px rgba(95, 180, 255, 0.18), 0 12px 30px rgba(0, 0, 0, 0.35); }
.seal b { font-family: var(--display); font-size: 32px; color: #fff; }
.seal.officer { box-shadow: 0 0 0 10px rgba(23, 184, 204, 0.22), 0 0 36px rgba(23, 184, 204, 0.6); }
.seal.turn { background: radial-gradient(circle at 50% 35%, #ff7b6f, var(--coral-2) 72%); box-shadow: 0 0 0 10px rgba(255, 93, 82, 0.2), 0 0 36px rgba(255, 93, 82, 0.55); }
.seal.listening::after, .seal.officer::after, .seal.turn::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; border: 2px solid rgba(111, 227, 240, 0.75); animation: pulse 1.5s ease-out infinite; }
.seal.turn::after { border-color: rgba(255, 140, 128, 0.75); }
.seal.checking { animation: shimmer 1.1s linear infinite; }
.seal.accepted { background: radial-gradient(circle at 50% 35%, #3fe0b8, var(--teal-2) 72%); box-shadow: 0 0 0 10px rgba(24, 185, 154, 0.22), 0 0 36px rgba(24, 185, 154, 0.55); }
.seal.retry { box-shadow: 0 0 0 10px rgba(255, 93, 82, 0.16); }
.status-line { min-height: 24px; text-align: center; font-size: 16px; font-weight: 600; color: var(--white); margin: 0; }
.wave { display: flex; gap: 4px; height: 24px; align-items: end; }
.wave i { width: 3px; height: 8px; border-radius: 2px; background: #6fe3f0; display: block; animation: bar 1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: 0.1s; } .wave i:nth-child(3) { animation-delay: 0.2s; }
.wave i:nth-child(4) { animation-delay: 0.3s; } .wave i:nth-child(5) { animation-delay: 0.15s; }
[data-screen="interview"] .grade-row .btn, [data-screen="interview"] .grade-row .btn-aqua { min-height: 58px; border-radius: 20px; }

/* ---------- Car mode (cinematic) ---------- */
[data-screen="car"] .panel { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--white-line); color: var(--white); box-shadow: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
[data-screen="car"] .panel h2 { font-size: 22px; text-align: center; margin: 4px 0 12px; color: #fff; }
[data-screen="car"] .panel .q-num { text-align: center; color: var(--gold-2); }
.car-play { width: 170px; height: 170px; border-radius: 50%; margin: 18px auto; display: grid; place-items: center; border: 3px solid rgba(255, 255, 255, 0.85); background: radial-gradient(circle at 42% 30%, #6fe3f0, #1fa8d8 45%, #1d5fe0 100%); box-shadow: 0 0 0 14px rgba(95, 180, 255, 0.16), 0 0 50px rgba(47, 160, 255, 0.55); color: #fff; font-size: 24px; font-weight: 800; }
.car-play:active { transform: scale(0.97); }
.progress { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.panel .progress { background: var(--paper-3); }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #6fe3f0, var(--blue)); }

/* ---------- Hubs, plans, misc ---------- */
.link-card, .hub button.hub-item { width: 100%; text-align: left; border-radius: var(--r-md); padding: 16px; margin: 0 0 10px; }
.hub-item b { display: block; font-size: 17px; font-weight: 700; color: var(--ink); }
.hub-item b::after { content: "\203A"; float: right; color: var(--blue-2); font-size: 22px; line-height: 1; }
.plan h2 { color: var(--ink); }
.plan.on { border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(215, 176, 106, 0.25), var(--shadow); }
.plan.on .hint { color: var(--green); font-weight: 700; }
.diff { line-height: 1.8; }
.diff span, .same { margin-right: 6px; }
.diff .missing, .diff .extra, .diff .replace { color: #b4232f; background: #ffe7e5; border-radius: 6px; padding: 1px 4px; }
#liveNote:empty { display: none; }
#liveNote { color: var(--white-soft); }

/* ---------- Welcome ---------- */
.app.is-welcome { background: #07142e; }
.app.is-welcome.is-entry .top { display: none; }
.app.is-welcome .view { padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
.welcome-hero, .welcome-wave { display: block; width: calc(100% + 32px); max-width: none; margin-left: -16px; height: auto; }
.welcome-lead { position: relative; }
.app.is-welcome .welcome-lead { font-family: var(--display); font-size: 29px; font-weight: 600; line-height: 1.15; text-align: center; color: #f8e8c4; margin: -44px -16px 16px; padding: 44px 22px 0; background: linear-gradient(180deg, rgba(7, 20, 46, 0) 0, #07142e 44px); }
.welcome-lead::after { content: ""; display: block; width: 46%; height: 2px; margin: 12px auto 0; border-radius: 999px; background: linear-gradient(90deg, transparent, #f0c27a 20%, #fff1c9 50%, #f0c27a 80%, transparent); box-shadow: 0 0 12px rgba(240, 194, 122, 0.85); }
.feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0 0 18px; }
.feature-grid button { grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 96px; border-radius: 20px; padding: 12px 6px; border: 1px solid rgba(241, 217, 160, 0.6); background: linear-gradient(180deg, rgba(20, 44, 88, 0.95), rgba(8, 22, 50, 0.95)); box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.2), 0 10px 18px rgba(0, 0, 0, 0.3); color: #f8ecd0; }
.feature-grid button:nth-child(4) { grid-column: 1 / span 3; }
.feature-grid button:nth-child(5) { grid-column: 4 / span 3; }
.feature-grid b { font-weight: 600; font-size: 15.5px; }
.feature-grid .feat-ico { width: 42px; height: 42px; }
.welcome .cta { width: 100%; }
.welcome .fine { text-align: center; }
.welcome-signin .text-link { font-weight: 700; color: var(--gold-2); }
.welcome-wave { margin-top: 4px; margin-bottom: -8px; }

/* ---------- Setup & Course Ready ---------- */
.app.is-entry .top { display: flex; justify-content: center; padding-top: calc(16px + env(safe-area-inset-top)); }
.app.is-entry .view { padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
.setup h1 { font-size: 29px; }
.step { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 22px 0 10px; color: var(--white); }
.step i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13.5px; font-weight: 800; color: #3a2600; background: linear-gradient(180deg, #ffe09a, #e3aa4c); box-shadow: 0 3px 10px rgba(227, 170, 76, 0.45); }
.lang-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-pill { min-height: 50px; border-radius: var(--r-md); padding: 0 6px; line-height: 1.12; border: 1px solid var(--white-line); background: rgba(255, 255, 255, 0.12); color: var(--white); font-weight: 600; font-size: 15px; }
.lang-row .lang-pill { font-size: 13px; }
.lang-pill.on { color: var(--ink); background: var(--paper); border-color: var(--gold-2); box-shadow: 0 0 0 2px var(--gold), 0 8px 18px rgba(0, 0, 0, 0.25); }
.place-field { width: 100%; text-align: left; min-height: 56px; border-radius: var(--r-md); padding: 12px 44px 12px 16px; border: 0; color: var(--ink); font-size: 17px; box-shadow: var(--shadow-sm); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d5fe0' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 8px; }
.place-field b { font-weight: 700; }
.place-field.on { box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm); }
.setup .text-link[data-act="toggle-special"] { color: #8fe9f3; margin-top: 14px; display: block; text-align: left; }
.mini-panel { margin: 8px 0 12px; padding: 4px 14px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.1); border: 1px solid var(--white-line); }
.app.is-entry input:disabled { opacity: 0.55; }

/* State card */
.state-card { position: relative; overflow: hidden; margin: 12px 0; border-radius: var(--r-xl); border: 0; }
.state-art { position: relative; overflow: hidden; }
.state-scene { width: 100%; height: 160px; display: block; object-fit: cover; }
.state-outline { position: absolute; right: 14px; top: 14px; width: 92px; height: 92px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35)); }
.state-outline path { fill: rgba(255, 255, 255, 0.12); stroke: #ffe7b0; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.state-name { position: absolute; left: 0; right: 0; top: 18px; text-align: center; pointer-events: none; font-weight: 700; font-size: 13px; letter-spacing: 0.4em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55); }
.state-name::before, .state-name::after { content: ""; display: inline-block; width: 24px; height: 1px; background: #ffe7b0; vertical-align: middle; margin: 0 10px; }
.state-copy { padding: 8px 18px 14px; }
.state-copy h2 { margin: 8px 0 6px; font-size: 24px; color: var(--ink); }
.state-copy p { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--hair); display: grid; grid-template-columns: 42% 1fr; gap: 10px; align-items: baseline; }
.state-copy p:last-child { border-bottom: 0; }
.state-copy span { color: var(--slate); font-size: 13px; }
.state-copy b { font-weight: 700; font-size: 15.5px; color: var(--ink); }
.state-copy p.fine { display: block; font-size: 12.5px; color: var(--slate); }
.ready .state-art { border-radius: var(--r-xl); margin-top: 4px; box-shadow: var(--shadow); }
.ready h1 { margin-top: 4px; }
.ready-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: -34px auto 8px; position: relative; background: linear-gradient(160deg, #3fe0b8, var(--teal-2)); color: #fff; font-size: 30px; border: 4px solid #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
.state-card.plain { padding: 8px 18px 10px; }
.state-card.plain h2 { margin: 10px 0 4px; font-size: 24px; color: var(--ink); }
.state-card.plain p { margin: 0; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--hair); position: relative; color: var(--ink); }
.state-card.plain p:last-child { border-bottom: 0; }
.state-card.plain p b { font-weight: 700; font-size: 16px; }
.state-card.plain p:not(.fine)::before { content: "\2713"; position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 800; }
.state-card.plain .fine { color: var(--slate); }

/* Sheets */
.sheet-back { position: fixed; inset: 0; background: rgba(2, 8, 28, 0.55); z-index: 6; backdrop-filter: blur(3px); }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(440px, 100%); z-index: 7; background: var(--paper); color: var(--ink); border-radius: 28px 28px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.4); display: grid; gap: 10px; }
.sheet::before { content: ""; width: 42px; height: 5px; border-radius: 5px; background: var(--paper-3); justify-self: center; margin-top: -10px; }
.sheet h2 { color: var(--ink); margin: 0; }
.sheet p { color: var(--ink-2); margin: 0 0 6px; line-height: 1.45; }
.sheet input { background: var(--paper-2); border-color: var(--hair); box-shadow: none; }
.sheet-tall { top: 10vh; overflow: auto; align-content: start; }
.state-list { display: grid; gap: 8px; margin-top: 6px; }
.state-list button { text-align: left; min-height: 52px; border-radius: var(--r-md); border: 1px solid var(--hair); background: var(--paper-2); color: var(--ink); padding: 8px 14px; font-weight: 600; font-size: 16px; }

/* ---------- Motion ---------- */
@keyframes pulse { from { transform: scale(0.92); opacity: 0.9; } to { transform: scale(1.15); opacity: 0; } }
@keyframes shimmer { 50% { box-shadow: 0 0 0 10px rgba(241, 217, 160, 0.25), 0 0 36px rgba(255, 224, 154, 0.9); } }
@keyframes bar { 50% { height: 24px; } }
@media (prefers-reduced-motion: reduce) {
  .flip { transition: none; }
  .seal.listening::after, .seal.officer::after, .seal.turn::after, .seal.checking, .wave i { animation: none; }
}
@media (max-width: 360px) { .lang-row { grid-template-columns: 1fr 1fr; } h1 { font-size: 26px; } }
@media (min-width: 900px) {
  body { padding: 28px 0; }
  .app { min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); border-radius: 30px; overflow: hidden; }
  .tabs { border-radius: 0 0 30px 30px; }
}

/* ---------- Test ---------- */
.test-start { text-align: center; padding: 26px 20px 20px; }
.test-start .feat-ico { width: 56px; height: 56px; margin-bottom: 10px; }
.test-start .feat-ico path, .test-start .feat-ico rect { stroke: var(--blue-2); }
.test-start .feat-ico .acc { stroke: var(--teal); }
.test-start h2 { font-size: 22px; }
.test-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 18px; }
.test-rules span { display: grid; gap: 2px; padding: 14px 8px; border-radius: var(--r-md); background: var(--paper-2); color: var(--slate); font-size: 13px; }
.test-rules b { font-size: 28px; font-weight: 800; color: var(--ink); }
.test-score { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.test-score span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--white-line); color: var(--white); }
.panel .test-score span { background: var(--paper-2); border-color: var(--hair); color: var(--ink-2); }
.test-score b { font-size: 20px; font-weight: 800; }
.test-score .right b { color: #4fe3bf; }
.test-score .wrong b { color: #ff8f86; }
.panel .test-score .right b { color: var(--teal-2); }
.panel .test-score .wrong b { color: var(--coral-2); }
.test-progress { display: flex; justify-content: space-between; gap: 10px; color: var(--white-soft); font-size: 13.5px; font-weight: 600; margin: 0 2px 8px; }
.test-progress + .progress { margin: 0 0 14px; }
.test-answer { margin-top: 12px; padding: 14px; border-radius: var(--r-md); background: linear-gradient(180deg, #eafaf5, #f5fdfa); border: 1px solid rgba(24, 185, 154, 0.35); }
.test-answer .q-num { color: var(--teal-2); }
.test-done { text-align: center; padding: 26px 20px 20px; }
.test-mark { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; color: #fff; background: linear-gradient(160deg, #ff8a7a, var(--coral-2)); box-shadow: 0 10px 24px rgba(239, 59, 75, 0.35); }
.test-done.pass .test-mark { background: linear-gradient(160deg, #3fe0b8, var(--teal-2)); box-shadow: 0 10px 24px rgba(15, 158, 132, 0.35); }
.test-done .test-score { margin: 14px 0 18px; }

/* ---------- Profile ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-card label { margin-top: 0; }
.avatar.big { width: 68px; height: 68px; flex: none; display: grid; place-items: center; font-size: 28px; border-width: 3px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.set-row { display: grid; gap: 3px; text-align: left; padding: 13px 30px 13px 14px; border-radius: var(--r-md); border: 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); position: relative; min-height: 70px; }
.set-row::after { content: "\203A"; position: absolute; right: 12px; top: 50%; transform: translateY(-55%); font-size: 22px; color: var(--blue-2); }
.set-row small { color: var(--slate); font-size: 12.5px; font-weight: 600; }
.set-row b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row:active { transform: scale(0.97); }

/* ---------- My state ---------- */
.answers-hero { margin: 0 0 12px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); }
.answers-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.answers-meta span { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--white-line); font-size: 13px; color: var(--white-soft); }
.answers-meta b { color: var(--white); }
.answers-meta .stamp { color: #8ff0d6; border-color: rgba(79, 227, 191, 0.4); }
.answers-list .panel > p:nth-of-type(2) { font-size: 16px; font-weight: 600; color: var(--ink); }
.answers-list .panel > p > b:first-child { display: inline-block; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; background: #e3f8f1; color: var(--teal-2); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.answers-list .panel > p:has(> b:first-child) { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.4; }

/* ---------- Small screens polish ---------- */
[data-screen="vocab"] .panel h2 { font-size: 34px; text-align: center; margin: 8px 0; }
[data-screen="vocab"] .panel .q-num { text-align: center; }
[data-screen="offline"] > p:not(.lede):not(.hint):not(:first-child) { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); font-weight: 600; }
[data-screen="offline"] #offlineCount { font-size: 22px; font-weight: 800; color: var(--blue-2); }
[data-screen="writing"] textarea { min-height: 130px; font-size: 17px; }
[data-screen="writing"] > .hint { text-align: center; }
.answers-list .panel.pending > p > b:first-child { background: #fff3dc; color: #9a6a12; }
.test-score span { justify-content: space-between; text-align: left; padding: 6px 14px; font-size: 12.5px; line-height: 1.2; border-radius: 16px; }

/* ---------- State pictures ---------- */
.state-art.has-photo .state-scene { object-fit: cover; object-position: center; }
.state-card .state-art.has-photo .state-scene, .ready .state-art.has-photo .state-scene, .answers-hero .state-art.has-photo .state-scene { height: auto; aspect-ratio: 1104 / 520; }
.home-hero .state-art.baked + .home-head, .home-hero:has(.baked) .home-head { bottom: 12px; }
.home-hero:has(.baked) { min-height: 0; aspect-ratio: 850 / 470; }
.home-hero:has(.baked) .state-scene { object-position: center top; }
.empty-note { text-align: center; color: var(--white-soft); padding: 30px 10px; }

/* ---------- Cards ---------- */
.cards-bar { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 0 0 6px; }
.pill-select { width: auto; min-height: 42px; border-radius: 999px; padding: 0 38px 0 16px; font-size: 14px; }
.cards-count { display: grid; gap: 6px; }
.cards-count > span { text-align: right; font-size: 13px; font-weight: 700; color: var(--white-soft); }
.vocab-count { margin: 0 0 12px; }
.vocab-count > span { text-align: left; }
.face-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.face-top .q-num { margin: 0; padding: 5px 10px; border-radius: 999px; background: var(--blue-soft); }
.fav-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hair); background: var(--paper-2); color: var(--gold); font-size: 22px; line-height: 1; }
.fav-btn.on { background: #fff6df; border-color: rgba(215, 176, 106, 0.6); }
.face-foot { margin-top: auto; padding-top: 10px; }
.face-foot .btn-line { width: 100%; }
.pager { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 10px; margin: 4px 0 8px; }
.pager-btn { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--white-line); background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 30px; line-height: 1; padding-bottom: 4px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pager-btn.next { background: linear-gradient(180deg, var(--coral), var(--coral-2)); border: 0; box-shadow: 0 10px 22px rgba(239, 59, 75, 0.35); }
.pager-btn:active { transform: scale(0.94); }
.pager-note { text-align: center; color: var(--white-soft); font-size: 14px; font-weight: 600; }

/* ---------- Car mode ---------- */
.car-now { text-align: center; padding: 18px 16px 14px; border-radius: var(--r-xl); background: rgba(255, 255, 255, 0.1); border: 1px solid var(--white-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin: 0 0 6px; }
.car-now .q-num { color: var(--gold-2); }
.car-now h2 { font-size: 23px; line-height: 1.25; color: #fff; margin: 4px 0 14px; }
.car-voice { margin: 10px 0 0; font-size: 13px; color: var(--white-soft); }
.car-voice::before { content: "\25CF"; color: #6fe3f0; margin-right: 6px; font-size: 10px; vertical-align: 2px; }
.car-controls { display: grid; grid-template-columns: 68px 1fr 68px; align-items: center; justify-items: center; margin: 6px 0 14px; }
.car-skip { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--white-line); background: rgba(255, 255, 255, 0.12); display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.car-skip svg { width: 26px; height: 26px; }
.car-skip path { fill: #fff; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.car-skip:active { transform: scale(0.94); }
.car-play { width: 176px; height: 176px; margin: 8px auto; display: grid; place-items: center; align-content: center; gap: 6px; font-size: 18px; }
.car-play i { width: 0; height: 0; border-left: 30px solid #fff; border-top: 19px solid transparent; border-bottom: 19px solid transparent; margin-left: 8px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)); }
.car-play.on i { width: 30px; height: 38px; border: 0; margin: 0; background: linear-gradient(90deg, #fff 0 36%, transparent 36% 64%, #fff 64% 100%); }
.car-play.on { animation: carGlow 2.4s ease-in-out infinite; }
@keyframes carGlow { 50% { box-shadow: 0 0 0 20px rgba(95, 180, 255, 0.1), 0 0 70px rgba(47, 160, 255, 0.7); } }
.car-settings { padding: 16px; }
.car-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.car-grid label { margin: 6px 0 6px; font-size: 13px; }
.car-grid select { min-height: 48px; font-size: 14.5px; }
[data-screen="car"] .panel.car-settings { background: var(--paper); color: var(--ink); border: 0; box-shadow: var(--shadow); backdrop-filter: none; }
.switch { display: flex; align-items: center; gap: 12px; margin: 14px 0 2px; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 52px; height: 30px; border-radius: 999px; background: var(--paper-3); position: relative; flex: none; transition: background 0.2s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease; }
.switch input:checked + .switch-track { background: linear-gradient(90deg, var(--teal), #28d0ae); }
.switch input:checked + .switch-track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(47, 116, 255, 0.55); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .car-play.on { animation: none; } }

/* ---------- All questions ---------- */
.search { position: relative; margin: 0 0 12px; }
.search input { padding-left: 46px; min-height: 54px; font-size: 16px; }
.search::before { content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); z-index: 1; background: var(--slate);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='6' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M13 13l5 5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='6' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M13 13l5 5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.qrow { width: 100%; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; text-align: left; padding: 14px; border-radius: var(--r-md); border: 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.qrow:active { transform: scale(0.98); }
.qrow-no { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--blue-2); background: var(--blue-soft); }
.qrow.known .qrow-no { color: #fff; background: linear-gradient(160deg, #28d0ae, var(--teal-2)); }
.qrow.hard .qrow-no { color: #fff; background: linear-gradient(160deg, var(--coral), var(--coral-2)); }
.qrow-copy { display: grid; gap: 3px; min-width: 0; }
.qrow-copy b { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.qrow-copy small { font-size: 13.5px; color: var(--slate); line-height: 1.3; }

/* ---------- Writing ---------- */
.write-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 6px; }
.write-head .q-num { margin: 0; padding: 5px 10px; border-radius: 999px; background: var(--blue-soft); }
.write-head .btn-aqua { min-height: 44px; font-size: 15px; padding: 0 16px; }
.write-card textarea { min-height: 120px; font-size: 18px; margin-bottom: 12px; }
.write-card .hint { margin: 4px 0 0; }
.write-result { border-left: 5px solid var(--coral); }
.write-result.match { border-left-color: var(--teal); }
.result-head { font-weight: 800; font-size: 17px; margin: 0 0 8px; color: var(--coral-2); }
.write-result.match .result-head { color: var(--teal-2); }
.compare { display: grid; gap: 10px; margin-top: 12px; }
.compare > div { padding: 12px 14px; border-radius: var(--r-sm); background: var(--paper-2); }
.compare > div:first-child { background: #eafaf5; }
.compare small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-bottom: 4px; }
.compare p { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }

/* ---------- N-400 words ---------- */
.word-card { text-align: center; padding: 22px 18px 18px; }
.word-card .q-num { display: inline-block; padding: 5px 12px; border-radius: 999px; background: #fff3dc; color: #9a6a12; }
.word-card h2 { font-size: 36px; margin: 8px 0 6px; }
.word-card .phon { display: inline-block; margin: 0 0 12px; }
.word-card .btn-aqua { display: block; margin: 0 auto 12px; }
.word-card.done h2::after { content: " \2713"; color: var(--teal); font-size: 26px; }
.word-meaning { text-align: left; padding: 14px; border-radius: var(--r-md); background: var(--paper-2); margin: 0 0 12px; }
.word-meaning p { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
[data-screen="vocab"] .panel h2 { font-size: 36px; }

/* ---------- Welcome: one full-screen picture, content resting on its dark lower half ---------- */
.app.is-welcome { background: #011a44 url("assets/welcome-bg.jpg") center top / 100% auto no-repeat; }
.app.is-welcome .view { padding: 0 18px; }
.welcome { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 0 0; }
.welcome-mark { margin: 0; padding-left: 4px; font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: 0.01em; color: #f3d898; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.lang-wide {
  appearance: none; -webkit-appearance: none; min-height: 38px; width: auto; padding: 0 32px 0 38px; border-radius: 999px;
  border: 1px solid rgba(241, 217, 160, 0.7); color: #fff; font-size: 14px; font-weight: 600;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center / 10px 6px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23f1d9a0' stroke-width='1.6'/%3E%3Cpath d='M3 12h18M12 3c2.6 2.6 3.8 5.6 3.8 9s-1.2 6.4-3.8 9c-2.6-2.6-3.8-5.6-3.8-9S9.4 5.6 12 3z' fill='none' stroke='%23f1d9a0' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat left 12px center / 18px 18px,
    rgba(4, 18, 46, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.lang-wide option { color: var(--ink); }
.welcome-body { margin-top: auto; padding-top: 37vh; padding-bottom: 0; text-align: center; }
.app.is-welcome .welcome-lead {
  font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1.1; margin: 0; padding: 0; background: none;
  color: #f6e3b4; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}
.app.is-welcome .welcome-lead::after {
  content: "★"; display: block; width: 210px; height: auto; margin: 12px auto 0; font-size: 13px; line-height: 1; color: #e9bd6a; border-radius: 0; box-shadow: none;
  background: linear-gradient(90deg, transparent, #b8924f) left center / 42% 1px no-repeat, linear-gradient(90deg, #b8924f, transparent) right center / 42% 1px no-repeat;
}
.welcome-sub { margin: 12px 10px 20px; color: rgba(255, 255, 255, 0.82); font-size: 15.5px; line-height: 1.5; }
.feature-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 2px 20px; }
.feature-row button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 68px; padding: 9px 0 8px;
  border-radius: 16px; border: 1px solid rgba(214, 174, 102, 0.55);
  background: linear-gradient(180deg, rgba(16, 40, 84, 0.55), rgba(4, 18, 46, 0.65));
  box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.14); color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.feature-row b { font-weight: 500; font-size: 11px; white-space: nowrap; }
.feature-row .feat-ico { width: 26px; height: 26px; margin: 0; }
.feature-row .feat-ico path, .feature-row .feat-ico rect, .feature-row .feat-ico circle { stroke: #ecc67a; stroke-width: 1.6; }
.feature-row .feat-ico .acc { stroke: #ecc67a; }
.feature-row .feat-ico .fill { fill: #ecc67a; }
.feature-row button:active { transform: scale(0.95); }
.welcome .cta { width: calc(100% - 28px); margin: 0 14px; min-height: 56px; font-size: 18px; font-weight: 600; letter-spacing: 0.01em; background: linear-gradient(180deg, #ff7a62, #ec4a3c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 28px rgba(236, 74, 60, 0.38); }
.welcome-privacy { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 14px 0; color: rgba(255, 255, 255, 0.62); font-size: 12.5px; line-height: 1.45; text-align: left; }
.welcome-privacy svg { width: 24px; height: 24px; flex: none; }
.welcome-privacy path { fill: none; stroke: rgba(255, 255, 255, 0.65); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.welcome-signin { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 13.5px; }
.welcome-signin .text-link { color: #f0cf86; font-weight: 600; min-height: 40px; }
.welcome-ribbon { display: block; width: calc(100% + 36px); margin: 4px -18px 0; height: 50px; filter: drop-shadow(0 0 8px rgba(243, 207, 127, 0.45)); }
@media (max-height: 740px) { .welcome-body { padding-top: 33vh; } .welcome-sub { margin-bottom: 18px; } .feature-row { margin-bottom: 18px; } }
.app.is-welcome { min-height: 100vh; min-height: 100dvh; } .app.is-welcome .welcome { min-height: 100vh; min-height: 100dvh; }

/* ---------- Welcome: living layer ---------- */
.app.is-welcome { background: #011a44; }
.welcome { isolation: isolate; overflow: hidden; margin: 0 -18px; padding: 0 18px; }
.welcome-art {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 851 / 1847; z-index: -2;
  background: url("assets/welcome-bg.jpg") center top / 100% auto no-repeat;
  transform-origin: 30% 22%; animation: kenBurns 26s ease-in-out infinite alternate;
}
.welcome::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(1, 26, 68, 0) 0%, rgba(1, 22, 58, 0.55) 40%, #011a44 100%); }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.07) translateY(-6px); } }
.welcome-torch {
  position: absolute; left: 11.4%; top: 0; margin-top: 27.4%; width: 86px; height: 86px; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 128, 0.75) 0%, rgba(255, 170, 70, 0.35) 35%, rgba(255, 140, 40, 0) 70%);
  mix-blend-mode: screen; animation: torch 2.6s ease-in-out infinite;
}
@keyframes torch { 0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); } 35% { opacity: 1; transform: translate(-50%, -52%) scale(1.12); } 70% { opacity: 0.85; transform: translate(-50%, -49%) scale(0.96); } }
.welcome-sparks { position: absolute; inset: 0 0 auto 0; height: 24%; z-index: -1; pointer-events: none; }
.welcome-sparks i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff6dc; box-shadow: 0 0 6px 1px rgba(255, 236, 190, 0.9); opacity: 0; animation: twinkle 5.5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.6); } 45% { opacity: 0.9; transform: scale(1); } 60% { opacity: 0.2; } }

.welcome-top { justify-content: flex-end; padding-top: calc(12px + env(safe-area-inset-top)); }
.lang-wide { min-height: 34px; font-size: 13px; padding: 0 30px 0 36px; }
.welcome-brand { display: flex; flex-direction: column; align-items: center; margin-top: -26px; pointer-events: none; }
.welcome-crest { width: 50px; height: 34px; filter: drop-shadow(0 2px 8px rgba(229, 184, 101, 0.55)); }
.welcome-brand .welcome-mark {
  margin: 2px 0 0; padding: 0; font-family: var(--display); font-size: 25px; font-weight: 600; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff3d0 0%, #eccb83 55%, #c08a3e 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55)); text-shadow: none;
}
.welcome-body { padding-top: 31vh; }
.app.is-welcome .welcome-lead {
  background: linear-gradient(180deg, #fff6dc 0%, #f1d28e 52%, #cf9a4c 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.55)); font-size: 36px;
}
.app.is-welcome .welcome-lead::after { -webkit-text-fill-color: #e9bd6a; color: #e9bd6a; }
.welcome .cta { position: relative; overflow: hidden; }
.welcome .cta::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 38%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-18deg);
  animation: shine 5.5s ease-in-out 2.2s infinite;
}
@keyframes shine { 0% { left: -50%; } 22%, 100% { left: 125%; } }
.feature-row button:hover, .feature-row button:focus-visible { border-color: #f3d48c; box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.2), 0 0 16px rgba(243, 212, 140, 0.35); }

.welcome-body > * { animation: riseIn 0.9s cubic-bezier(.2,.7,.2,1) both; }
.welcome-body > :nth-child(1) { animation-delay: 0.15s; }
.welcome-body > :nth-child(2) { animation-delay: 0.3s; }
.welcome-body > :nth-child(3) { animation-delay: 0.45s; }
.welcome-body > :nth-child(4) { animation-delay: 0.6s; }
.welcome-body > :nth-child(5) { animation-delay: 0.75s; }
.welcome-body > :nth-child(6) { animation-delay: 0.85s; }
.welcome-brand { animation: riseIn 1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-height: 740px) { .welcome-body { padding-top: 27vh; } }
@media (prefers-reduced-motion: reduce) {
  .welcome-art, .welcome-torch, .welcome-sparks i, .welcome .cta::after, .welcome-body > *, .welcome-brand { animation: none; }
  .welcome-sparks i { opacity: 0.6; }
}

/* ---------- Language gate (first launch) ---------- */
.lang-gate .welcome-top { min-height: calc(12px + env(safe-area-inset-top) + 34px); }
.lang-gate .welcome-body { padding-top: 26vh; }
.greet-cycle { position: relative; display: block; min-height: 1.15em; }
.greet-cycle span { position: absolute; left: 0; right: 0; top: 0; opacity: 0; animation: greet 12s ease-in-out infinite; background: inherit; -webkit-background-clip: text; background-clip: text; }
@keyframes greet { 0% { opacity: 0; transform: translateY(8px); filter: blur(4px); } 4%, 18% { opacity: 1; transform: none; filter: none; } 22%, 100% { opacity: 0; transform: translateY(-8px); filter: blur(4px); } }
.lang-gate .welcome-sub { margin: 12px 10px 18px; font-size: 14px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.7); }
.lang-cards { display: grid; gap: 8px; margin: 0 6px; }
.lang-cards button {
  display: grid; grid-template-columns: 40px 1fr 20px; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px 0 10px; text-align: left;
  border-radius: 18px; border: 1px solid rgba(214, 174, 102, 0.5); color: #fff;
  background: linear-gradient(180deg, rgba(16, 40, 84, 0.6), rgba(4, 18, 46, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.14), 0 8px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: riseIn 0.8s cubic-bezier(.2,.7,.2,1) both;
}
.lang-cards button:nth-child(1) { animation-delay: 0.35s; } .lang-cards button:nth-child(2) { animation-delay: 0.45s; }
.lang-cards button:nth-child(3) { animation-delay: 0.55s; } .lang-cards button:nth-child(4) { animation-delay: 0.65s; }
.lang-cards button:nth-child(5) { animation-delay: 0.75s; }
.lang-cards .flag { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; line-height: 1; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(241, 217, 160, 0.45); }
.lang-cards b { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 0.01em; }
.lang-cards i { font-style: normal; font-size: 24px; color: #f0cf86; line-height: 1; }
.lang-cards button:hover, .lang-cards button:focus-visible { border-color: #f3d48c; box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.2), 0 0 18px rgba(243, 212, 140, 0.35); }
.lang-cards button:active { transform: scale(0.97); background: linear-gradient(180deg, rgba(198, 161, 90, 0.35), rgba(120, 90, 40, 0.3)); }
.lang-gate .welcome-ribbon { margin-top: 14px; }
@media (max-height: 740px) { .lang-gate .welcome-body { padding-top: 20vh; } .lang-cards button { min-height: 50px; } }
@media (prefers-reduced-motion: reduce) {
  .greet-cycle span { animation: none; } .greet-cycle span:first-child { opacity: 1; position: static; }
  .lang-cards button { animation: none; }
}
.app.is-welcome .welcome-lead.greet-cycle { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: transparent; filter: none; }
.greet-cycle span { background: linear-gradient(180deg, #fff6dc 0%, #f1d28e 52%, #cf9a4c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.55)); white-space: nowrap; }

/* ---------- Setup & Course Ready (mockup: deep navy, gold, glass) ---------- */
.app.is-entry:not(.is-welcome) {
  background:
    radial-gradient(420px 260px at 50% -6%, rgba(60, 110, 200, 0.4), transparent 65%),
    radial-gradient(300px 260px at 100% 40%, rgba(215, 176, 106, 0.1), transparent 70%),
    linear-gradient(180deg, #06204f 0%, #041a44 50%, #021333 100%);
}
.setup h1, .ready h1 { font-family: var(--display); font-weight: 600; font-size: 30px; color: #f6e3b4; }
.setup h1::after, .ready h1::after { content: "★"; width: 200px; height: auto; margin: 8px auto 12px; font-size: 12px; line-height: 1; color: #e2b665; border-radius: 0;
  background: linear-gradient(90deg, transparent, #b8924f) left center / 42% 1px no-repeat, linear-gradient(90deg, #b8924f, transparent) right center / 42% 1px no-repeat; }
.setup .lede, .ready .lede { color: rgba(255, 255, 255, 0.78); margin-bottom: 6px; }
.setup .step { margin: 20px 0 8px; font-size: 16px; }
.setup .step.muted { opacity: 0.55; }
.ui-ico { width: 22px; height: 22px; flex: none; }
.ui-ico path, .ui-ico circle, .ui-ico rect { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.place-field { display: flex; align-items: center; gap: 12px; color: var(--ink); border: 2px solid transparent; }
.place-field .ui-ico { color: var(--blue-2); }
.place-field.on { border-color: #e2b665; box-shadow: 0 0 0 4px rgba(226, 182, 101, 0.18), var(--shadow-sm); }
.zip-field { position: relative; display: flex; align-items: center; }
.zip-field .ui-ico { position: absolute; left: 16px; color: var(--slate); }
.zip-field input { padding-left: 48px; padding-right: 48px; font-size: 18px; font-weight: 600; letter-spacing: 0.06em; }
.zip-field i { position: absolute; right: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 800; color: #fff; background: transparent; }
.zip-field.ok i { background: var(--teal); }
.zip-field.ok input { border-color: var(--teal); }
.zip-field.bad input { border-color: var(--coral); }
.district-ask { margin: 10px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--white-line); }
.district-ask p { margin: 0 0 8px; font-weight: 600; }

.setup-card { margin: 14px 0 4px; background: linear-gradient(180deg, rgba(18, 44, 92, 0.92), rgba(6, 22, 54, 0.96)); color: #fff; border: 1px solid rgba(226, 182, 101, 0.6); }
.sc-head { position: relative; }
.sc-head .state-art { height: 104px; }
.sc-head .state-scene { height: 104px !important; aspect-ratio: auto !important; }
.sc-head .state-name, .sc-head .state-outline { display: none; }
.sc-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 22, 54, 0) 25%, rgba(6, 22, 54, 0.85) 75%); pointer-events: none; }
.sc-title { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 1; text-align: right; }
.sc-title h2 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 600; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.found { display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(24, 185, 154, 0.85); }
.check-list { list-style: none; margin: 0; padding: 4px 14px 6px; }
.check-list li { display: grid; grid-template-columns: 24px 1fr 24px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.check-list li:last-child { border-bottom: 0; }
.check-list .ui-ico { color: #e2b665; }
.check-list small { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.check-list b { display: block; font-size: 15px; font-weight: 600; color: #fff; line-height: 1.3; }
.check-list i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: var(--teal); box-shadow: 0 0 10px rgba(24, 185, 154, 0.5); }
.check-list li.wait i { background: rgba(255, 255, 255, 0.14); box-shadow: none; color: rgba(255, 255, 255, 0.6); }
.check-list li.wait b { color: rgba(255, 255, 255, 0.72); font-weight: 500; font-size: 14px; }
.sc-stamp { margin: 0; padding: 0 14px 12px; font-size: 12px; color: rgba(255, 255, 255, 0.55); }

.yesno .lang-pill { min-height: 52px; font-size: 16px; }
.yesno .lang-pill.on { color: #3a2600; background: linear-gradient(180deg, #ffe09a, #e3aa4c); border-color: #ffe7b0; box-shadow: 0 0 0 2px rgba(227, 170, 76, 0.35), 0 8px 18px rgba(227, 170, 76, 0.3); }
.special-link { width: 100%; display: grid; grid-template-columns: 24px 1fr 16px; gap: 12px; align-items: center; margin: 16px 0 4px; padding: 14px; border-radius: var(--r-md); text-align: left;
  border: 1px solid var(--white-line); background: rgba(255, 255, 255, 0.07); color: #fff; font-weight: 600; font-size: 14.5px; }
.special-link .ui-ico { color: #e2b665; }
.special-link i { font-style: normal; color: #e2b665; font-size: 20px; }
.setup .cta { margin-top: 20px; }
.setup .cta span, .ready .cta span { margin-left: 6px; }

/* Course ready */
.ready { position: relative; }
.ready-art { position: absolute; left: -16px; right: -16px; top: -10px; height: 300px; z-index: -1; overflow: hidden; opacity: 0.4;
 }
.ready-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 26, 68, 0) 30%, #041a44 100%); }
.ready-art .state-art, .ready-art .state-scene { height: 300px !important; aspect-ratio: auto !important; border-radius: 0; box-shadow: none; margin: 0; }
.ready-art .state-name, .ready-art .state-outline { display: none; }
.ready { isolation: isolate; }
.ready .ready-mark { margin: 18px auto 10px; width: 70px; height: 70px; font-size: 34px; border: 3px solid rgba(255, 255, 255, 0.9);
  background: radial-gradient(circle at 40% 30%, #4fe8b8, #0f9e84); box-shadow: 0 0 0 8px rgba(24, 185, 154, 0.2), 0 0 30px rgba(63, 224, 184, 0.6); }
.recommend { width: 100%; display: grid; grid-template-columns: 26px 1fr 16px; gap: 14px; align-items: center; margin: 14px 0 0; padding: 16px; border-radius: var(--r-lg); text-align: left; color: #fff;
  border: 1px solid rgba(226, 182, 101, 0.7); background: linear-gradient(180deg, rgba(60, 44, 14, 0.55), rgba(20, 18, 30, 0.6)); box-shadow: 0 0 20px rgba(226, 182, 101, 0.15); }
.recommend .ui-ico { color: #e2b665; width: 26px; height: 26px; }
.recommend small { display: block; color: #f0cf86; font-size: 13px; font-weight: 600; }
.recommend b { display: block; font-size: 16px; font-weight: 600; }
.recommend i { font-style: normal; color: #e2b665; font-size: 22px; }
.ready .cta { margin-top: 16px; }
.entry-mark { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff3d0 0%, #eccb83 55%, #c08a3e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)); }

/* ---------- Interview: officer cut-out over the Capitol ---------- */
.officer-card { background: #0b2560; }
.officer-scene { position: absolute; inset: 0; background: url("assets/cards-bg.jpg") center 8% / 150% auto no-repeat; filter: saturate(1.05); }
.officer-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 26, 70, 0.15), rgba(8, 26, 70, 0.55)); }
.officer-card img { position: relative; z-index: 0; height: 360px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)); }
.officer-card::after { z-index: 0; }

/* ---------- Cards: Capitol and Liberty frame the deck ---------- */
.app.is-cards { background: #9fb3d8 url("assets/cards-bg.jpg") center top / 100% auto no-repeat; }
.app.is-cards .view > h1 { text-shadow: 0 2px 16px rgba(0, 10, 40, 0.6); }
.app.is-cards .view > h1::after { background: linear-gradient(90deg, #f1d9a0, #ffe7b0); }
.app.is-cards .cards-count > span { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.app.is-cards .pager-note { color: #13285a; text-shadow: none; }
.app.is-cards .pager-btn:not(.next) { background: rgba(255, 255, 255, 0.7); color: #13285a; border-color: rgba(19, 40, 90, 0.2); }
.app.is-cards #liveNote { color: #13285a; }

/* Liberty statue on the next-lesson card */
.today { position: relative; overflow: hidden; grid-template-columns: 54px 1fr 46px; padding-right: 96px; }
.today::after { content: ""; position: absolute; right: 58px; top: 6px; bottom: 0; width: 70px; background: url("assets/liberty.webp") center bottom / contain no-repeat; opacity: 0.9; pointer-events: none; }
.today .today-play { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }

.welcome-emblem { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5)); margin-bottom: -2px; }
.welcome-brand { margin-top: -30px; }

.lesson-medal { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25)); margin: -6px -4px; }
.lesson:has(.lesson-medal) { grid-template-columns: 46px 1fr auto; }
/* Medallion lights up once the lesson is started; full glow when done */
.lesson:not(.going):not(.done) .lesson-medal { filter: grayscale(0.85) brightness(1.05) opacity(0.6); }
.lesson.done .lesson-medal { filter: drop-shadow(0 0 8px rgba(243, 207, 127, 0.9)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25)); }

/* ---------- Flashcards on the AVENLIO parchment ---------- */
.card-stage::before, .card-stage::after { background: url("assets/card-paper.webp") center / 100% 100%; opacity: 0.9; }
.face, .face.back {
  background: url("assets/card-paper.webp") center / 100% 100%;
  border: 0; border-radius: 22px; padding: 46px 34px 40px; color: #14285a;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38);
}
.face > *, .face .face-top { position: relative; }
.face .q-num, .face-top .q-num { background: none !important; padding: 0 !important; color: #a8782c; font-family: var(--display); letter-spacing: 0.12em; font-size: 12px; }
.face-top { justify-content: center; }
.face-top .fav-btn { position: absolute; right: -6px; top: -10px; width: 38px; height: 38px; background: rgba(255, 250, 235, 0.8); border-color: rgba(168, 120, 44, 0.35); }
.face h2.q-en, .face .q-en { font-family: var(--display); color: #14285a; text-align: center; font-weight: 700; }
.face h2.q-en { font-size: 26px; line-height: 1.15; margin: 18px 0 10px; }
.face .q-ru { font-family: var(--display); color: #2a3a66; text-align: center; font-size: 16px; }
.face .phon { background: none; color: #7a6a58; font-style: italic; text-align: center; padding: 0; margin: 2px 0 6px; font-size: 13.5px; }
.face .hint { color: #7a6a58; text-align: center; }
.face .tools { justify-content: center; }
.face .btn-aqua { background: rgba(255, 250, 235, 0.75); color: #14285a; border-color: rgba(168, 120, 44, 0.45); }
.face.back > .q-num:first-child { text-align: center; color: #a8782c; background: none; align-self: center; }
.face.back > .q-num:first-child::after { content: ""; display: block; width: 120px; height: 1px; margin: 10px auto 0; background: linear-gradient(90deg, transparent, #b8924f, transparent); }
.face.back .q-en { font-size: 28px; margin: 14px 0 6px; }
.face.back .q-num { text-align: center; }
.face.back .motif svg * { stroke: #a8782c; }
.face .btn-quiet { color: #a8782c; }
.face { padding: 50px 40px 46px; }
.face .tools .hint { display: none; }
.face .face-foot .btn-line { min-height: 44px; font-size: 15px; padding: 0 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face-top .fav-btn { right: -18px; top: -26px; width: 34px; height: 34px; font-size: 18px; }
.face-top .q-num { padding: 0 26px !important; }
.lesson-medal.ring { border-radius: 50%; width: 46px; height: 46px; margin: 0; box-shadow: 0 0 0 2.5px #d9b062, 0 0 0 4px rgba(120, 80, 20, 0.35), 0 4px 10px rgba(0, 0, 0, 0.3); }
.lesson.done .lesson-medal.ring { box-shadow: 0 0 0 2.5px #f3cf7f, 0 0 14px rgba(243, 207, 127, 0.9); }
.card-stage, .flip { min-height: 500px; }
.face { padding: 48px 38px 58px; }
.face-top .q-num { font-size: 11px; letter-spacing: 0.08em; white-space: nowrap; }
.face .face-foot { padding-top: 6px; }

/* ---------- Helper mascot ---------- */
.buddy {
  position: fixed; z-index: 5; right: max(12px, calc(50% - 208px)); bottom: calc(var(--nav) + 18px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 62px 1fr 26px; align-items: center; gap: 10px; width: min(300px, calc(100% - 24px));
  padding: 10px 10px 10px 8px; border-radius: 20px; color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f2f6ff); border: 1px solid rgba(215, 176, 106, 0.6);
  box-shadow: 0 16px 36px rgba(0, 10, 40, 0.4);
  animation: buddyIn 0.55s cubic-bezier(.2,.9,.3,1.25) both;
}
.buddy img { width: 62px; height: 70px; object-fit: contain; margin: -24px 0 -6px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)); animation: buddyBob 2.4s ease-in-out infinite; }
.buddy p { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.buddy button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--paper-3); color: var(--slate); font-size: 16px; line-height: 1; align-self: start; }
.buddy.out { animation: buddyOut 0.35s ease-in both; }
@keyframes buddyIn { from { opacity: 0; transform: translateX(40px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes buddyOut { to { opacity: 0; transform: translateX(40px) scale(0.95); } }
@keyframes buddyBob { 50% { transform: translateY(-3px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .buddy, .buddy img { animation: none; } }

/* ---------- Home (compact, per mockup) ---------- */
.home-hero { min-height: 0; aspect-ratio: 1104 / 600; margin-bottom: 12px; }
.home-hero:has(.baked) { aspect-ratio: 1104 / 600; }
.home-head h1 { font-size: 26px; }
.course-row, .progress-row { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); padding: 14px 16px; margin: 0 0 10px; }
.course-row span { flex: 1; display: grid; gap: 2px; }
.course-row b { font-size: 16px; font-weight: 700; }
.course-row small { color: var(--slate); font-size: 13px; }
.course-row i, .pr-go { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--blue-2); background: var(--blue-soft); font-size: 20px; flex: none; }
.progress-row { padding: 12px 16px; }
.progress-row .ring-wrap, .progress-row .ring { width: 70px; height: 70px; }
.progress-row .ring-wrap b { font-size: 17px; }
.pr-copy { flex: 1; display: grid; gap: 2px; }
.pr-copy small { color: var(--slate); font-size: 13px; }
.pr-copy b { font-size: 20px; font-weight: 800; }
.home-cta { margin: 2px 0 12px; min-height: 54px; font-size: 17px; }
.mini-row { margin-bottom: 14px; }
.mini { display: grid; justify-items: center; text-align: center; gap: 2px; min-height: 92px; padding: 10px 6px; }
.mini > i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; color: #fff; background: var(--coral-2); }
.mini .ui-ico { width: 26px; height: 26px; color: var(--blue-2); }
.m-ready .ui-ico { color: var(--teal-2); }
.mini b { font-size: 18px; }
.mini span { font-size: 12px; }
.section-title { font-size: 18px; margin: 6px 2px 8px; }

/* ---------- Cards (compact, per mockup) ---------- */
.screen-title { font-size: 24px !important; margin-bottom: 6px !important; }
.screen-title::after { display: none !important; }
.cards-count { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0 0 10px; }
.cards-count > span { text-align: center !important; }
.chip-row { display: flex; gap: 8px; margin: 0 0 10px; overflow-x: auto; }
.fchip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--white-line); background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; font-size: 13.5px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.fchip.on { background: linear-gradient(180deg, #3f86ff, var(--blue-2)); border-color: transparent; box-shadow: 0 6px 14px rgba(29, 95, 224, 0.35); }
.card-stage, .flip { min-height: 360px !important; }
.card-stage { margin: 4px 10px 22px; }
.face { padding: 34px 30px 34px !important; gap: 2px; }
.face h2.q-en { font-size: 22px !important; margin: 8px 0 6px !important; }
.face .q-ru { font-size: 14.5px; }
.face .phon { font-size: 12.5px; }
.face .tools { margin: 6px 0 0; }
.face .btn-aqua { min-height: 40px; font-size: 14px; padding: 0 14px; }
.face .face-foot .btn-line { min-height: 40px; font-size: 14px; }
.face.back .q-en { font-size: 24px !important; }
.face-top .q-num { padding: 0 !important; }
.grade-row.big { gap: 12px; }
.grade-row.big .btn-again, .grade-row.big .btn-green { min-height: 84px; border-radius: 22px; display: grid; place-items: center; align-content: center; gap: 4px; font-size: 16px; }
.grade-row.big .btn-again::before, .grade-row.big .btn-green::before { margin: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.95); font-size: 16px; font-weight: 900; }
.grade-row.big .btn-again::before { color: var(--coral-2); }
.grade-row.big .btn-green::before { color: var(--teal-2); }
.pager { margin-top: 2px; }
.pager-btn { width: 46px; height: 46px; font-size: 26px; }
.app.is-cards { background: linear-gradient(180deg, rgba(11, 37, 96, 0) 0, rgba(11, 37, 96, 0.35) 260px, #0b2560 520px, #081b47 100%), url("assets/cards-bg.jpg") center top / 100% auto no-repeat, #0b2560; }
.app.is-cards .pager-note { color: rgba(255, 255, 255, 0.8); }
.app.is-cards .pager-btn:not(.next) { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: var(--white-line); }

/* ---------- Living helper ---------- */
.buddy { overflow: visible; }
.buddy-pic { position: relative; width: 62px; height: 70px; margin: -24px 0 -6px; display: block; }
.buddy-pic img { width: 100%; height: 100%; margin: 0; }
.buddy .lid { position: absolute; left: 53.5%; top: 40%; width: 13%; height: 13%; border-radius: 50% 50% 45% 45%; background: #0560c0; transform: scaleY(0); transform-origin: 50% 0; box-shadow: 0 1px 0 #02306a; }
.buddy .lid::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 20%; height: 2px; border-radius: 2px; background: #031a3a; }
.buddy-pic { animation: blinkLoop 4.5s 1.2s infinite; }
.buddy-pic .lid { animation: lid 4.5s 1.2s infinite; }
@keyframes lid { 0%, 90%, 100% { transform: scaleY(0); } 93%, 96% { transform: scaleY(1); } }
@keyframes blinkLoop { 0%, 100% { transform: none; } }
/* entrances */
.buddy.peek { animation: buddyPeek 0.9s cubic-bezier(.2,.9,.3,1.2) both; }
.buddy.peek .buddy-pic { animation: peekPic 1.1s ease-out both, bob 2.4s 1.1s ease-in-out infinite; }
@keyframes buddyPeek { 0% { opacity: 0; transform: translateX(110%); } 55% { opacity: 1; transform: translateX(-6px); } 100% { transform: none; } }
@keyframes peekPic { 0% { transform: translateX(40px) rotate(18deg); } 60% { transform: translateX(-4px) rotate(-8deg); } 100% { transform: none; } }
.buddy.spin .buddy-pic { animation: spinPic 1.1s 0.25s cubic-bezier(.3,.7,.3,1) both, bob 2.4s 1.4s ease-in-out infinite; }
@keyframes spinPic { from { transform: rotateY(0) scale(0.6); } 70% { transform: rotateY(720deg) scale(1.12); } to { transform: rotateY(720deg) scale(1); } }
.buddy.jump .buddy-pic, .buddy.party .buddy-pic { animation: jumpPic 0.9s 0.3s cubic-bezier(.3,1.6,.5,1) both, bob 2.4s 1.3s ease-in-out infinite; }
@keyframes jumpPic { 0% { transform: translateY(20px) scale(0.8); } 40% { transform: translateY(-22px) scale(1.08) rotate(-6deg); } 70% { transform: translateY(2px) scale(0.98); } 100% { transform: none; } }
.buddy.party .buddy-pic { animation: jumpPic 0.9s 0.3s both, spinPic 1s 1.2s both, bob 2.4s 2.3s ease-in-out infinite; }
.buddy.wink .buddy-pic .lid { animation: lidWink 2.6s 0.6s both; }
@keyframes lidWink { 0%, 30% { transform: scaleY(0); } 38%, 62% { transform: scaleY(1); } 70%, 100% { transform: scaleY(0); } }
.buddy.wink .buddy-pic { animation: tilt 2.6s 0.6s ease-in-out both; }
@keyframes tilt { 35%, 65% { transform: rotate(-8deg); } }
.buddy.drive .buddy-pic { animation: drive 1.4s cubic-bezier(.2,.8,.3,1) both, bob 1.2s 1.4s ease-in-out infinite; }
@keyframes drive { from { transform: translateX(-160px); } 80% { transform: translateX(6px); } to { transform: none; } }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-2deg); } }
/* thumbs-up pulse: the thumb sits on the left of the picture */
.buddy-pic::before { content: ""; position: absolute; left: 0; top: 46%; width: 28%; height: 24%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 150, 0.9), rgba(255, 230, 150, 0)); opacity: 0; animation: thumbGlow 2.4s 1s ease-in-out 2; pointer-events: none; }
@keyframes thumbGlow { 40% { opacity: 1; transform: scale(1.3); } 80% { opacity: 0; } }
.buddy-confetti { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.buddy-confetti i { position: absolute; width: 6px; height: 6px; border-radius: 2px; background: #f3cf7f; transform: rotate(var(--a)) translateY(0); opacity: 0; animation: burst 1s calc(0.55s + var(--d)) ease-out both; }
.buddy-confetti i:nth-child(3n) { background: #ff5d52; } .buddy-confetti i:nth-child(3n+1) { background: #2f74ff; }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(0.6); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-58px) scale(1); } }
@media (prefers-reduced-motion: reduce) { .buddy, .buddy *, .buddy-pic, .buddy-pic::before { animation: none !important; } }

/* ---------- Cards: air and bigger square buttons ---------- */
.card-stage { margin: 6px 12px 40px !important; }
.grade-row.big { margin: 0 4px 14px; gap: 14px; }
.grade-row.big .btn-again, .grade-row.big .btn-green { min-height: 104px; border-radius: 26px; font-size: 16.5px; }
.grade-row.big .btn-again::before, .grade-row.big .btn-green::before { width: 36px; height: 36px; font-size: 19px; }
.card-stage::before, .card-stage::after { transition: transform 0.2s ease; }
.card-stage.lean-know .face { box-shadow: 0 0 0 3px #28d0ae, 0 22px 44px rgba(0, 0, 0, 0.38); }
.card-stage.lean-again .face { box-shadow: 0 0 0 3px #ff5d52, 0 22px 44px rgba(0, 0, 0, 0.38); }
.flip { touch-action: pan-y; }
.app.is-cards .buddy, .app:has([data-screen="lesson"]) .buddy { bottom: auto; top: calc(86px + env(safe-area-inset-top)); }

/* ---- round 6: plain cards bg, buddy states, countdown, streak, map, transitions ---- */
.app.is-cards { background: linear-gradient(180deg, #1b4aa8 0%, #12378a 40%, #0b2560 100%) !important; }
.buddy-pic { width: 74px; height: 80px; margin: -30px 0 -6px; }
.buddy-pic img { object-fit: contain; animation: none; }
.buddy.pic-car .buddy-pic { width: 92px; height: 74px; }
.buddy.pic-car .buddy-pic img { border-radius: 14px; }
.buddy-pic::before { display: none; }
.countdown { position: relative; display: flex; align-items: center; gap: 14px; margin: 12px 0 0; padding: 14px 16px; border-radius: 22px; background: linear-gradient(135deg, #ffffff, #eef4ff); color: #13285a; box-shadow: 0 10px 26px rgba(4, 18, 60, 0.25); cursor: pointer; overflow: hidden; }
.countdown .cd-date { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.cd-num { flex: none; width: 74px; height: 74px; border-radius: 20px; display: grid; place-content: center; text-align: center; background: linear-gradient(160deg, #ff7a5c, #e8473b); color: #fff; box-shadow: 0 8px 18px rgba(232, 71, 59, 0.35); }
.cd-num b { font: 700 32px/1 Literata, serif; }
.cd-num small { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.cd-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.cd-copy b { font: 700 19px/1.15 Literata, serif; }
.cd-copy small { font-size: 12.5px; color: #4a5c86; }
.cd-copy .bar { margin: 4px 0 1px; }
.countdown.empty { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1.5px dashed rgba(255, 255, 255, 0.45); box-shadow: none; }
.countdown.empty .cd-copy small { color: rgba(255, 255, 255, 0.75); }
.cd-ico { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); }
.cd-ico svg { width: 26px; height: 26px; }
.streak { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; padding: 10px 14px; border-radius: 20px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; }
.streak .bell { width: 44px; height: 44px; border-radius: 50%; filter: grayscale(.7) brightness(.85); transition: filter .4s; }
.streak.has-medal .bell { filter: none; box-shadow: 0 0 0 2px #f3cf7f, 0 0 18px rgba(243, 207, 127, 0.6); animation: bellRing 2.6s ease-in-out 1; }
.st-copy { display: grid; flex: 1; } .st-copy b { font-size: 15px; } .st-copy small { font-size: 12px; opacity: .75; }
.st-dots { display: flex; gap: 5px; }
.st-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.st-dots i.on { background: #f3cf7f; box-shadow: 0 0 8px rgba(243, 207, 127, 0.7); }
.st-dots i.gold { width: 14px; height: 14px; margin-top: -1.5px; border: 1.5px solid #f3cf7f; }
@keyframes bellRing { 0%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } 60% { transform: rotate(0); } }
/* medallion path */
.lesson-map { position: relative; display: grid; gap: 6px; padding: 8px 0 30px; }
.lesson-map::before { content: ""; position: absolute; left: 50%; top: 30px; bottom: 50px; width: 0; border-left: 3px dashed rgba(243, 207, 127, 0.45); transform: translateX(-50%); }
.map-stop { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 78%; padding: 8px 14px 8px 8px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.96); color: #13285a; text-align: left; box-shadow: 0 8px 20px rgba(4, 18, 60, 0.25); justify-self: center; transition: transform .2s; }
.map-stop.left { justify-self: start; } .map-stop.right { justify-self: end; flex-direction: row-reverse; text-align: right; padding: 8px 8px 8px 14px; }
.map-stop:active { transform: scale(.97); }
.map-medal { position: relative; flex: none; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#2fbf8f calc(var(--p) * 1%), #dfe6f3 0); padding: 3px; }
.map-medal img, .map-medal .lesson-no { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #fff; filter: grayscale(.85) brightness(1.05); opacity: .8; }
.map-stop.going .map-medal img, .map-stop.done .map-medal img { filter: none; opacity: 1; }
.map-stop.done .map-medal { box-shadow: 0 0 0 2px #f3cf7f, 0 0 16px rgba(243, 207, 127, 0.7); }
.map-medal em { position: absolute; right: -4px; bottom: -2px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #13285a; color: #fff; font: 700 11.5px/22px "Golos Text", sans-serif; font-style: normal; text-align: center; border: 2px solid #fff; }
.map-copy { display: grid; gap: 2px; min-width: 0; } .map-copy b { font-size: 14.5px; line-height: 1.2; } .map-copy small { color: #5b6b90; font-size: 12px; }
/* screen transitions */
.app:not(.is-entry) .view.enter > *:not(.buddy) { animation: viewIn .38s cubic-bezier(.2,.8,.2,1) both; }
.view.enter > *:nth-child(2) { animation-delay: .03s; } .view.enter > *:nth-child(3) { animation-delay: .06s; } .view.enter > *:nth-child(4) { animation-delay: .09s; } .view.enter > *:nth-child(n+5) { animation-delay: .12s; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.enter > * { animation: none !important; } .streak .bell { animation: none !important; } }

/* ---- round 7: calmer home ---- */
.home-hero .home-head { gap: 8px; }
.hero-course { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(10, 26, 70, .38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font: 600 13px/1 "Golos Text", sans-serif; }
.hero-course i { font-style: normal; opacity: .8; }
.home-hero .eyebrow { display: none; }
.home-card { margin: 14px 0 0; padding: 16px; border-radius: 26px; background: #fff; box-shadow: 0 14px 34px rgba(4, 18, 60, .28); display: grid; gap: 14px; }
.hc-progress { display: flex; align-items: center; gap: 14px; border: 0; background: none; padding: 0; text-align: left; color: #13285a; }
.hc-progress .pr-copy { display: grid; gap: 4px; flex: 1; }
.hc-progress .pr-copy small { color: #5b6b90; font-size: 13px; }
.hc-progress .pr-copy b { font: 700 26px/1 Literata, serif; }
.hc-progress .pr-copy b em { font-style: normal; font-size: 17px; color: #8a97b5; }
.home-card .home-cta { margin: 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 0; }
.half { position: relative; display: grid; align-content: start; gap: 3px; min-height: 112px; padding: 14px; border-radius: 22px; color: #fff; overflow: hidden; margin: 0; }
.half b { font-size: 15px; line-height: 1.2; } .half small { font-size: 12px; opacity: .78; line-height: 1.3; }
.half .cd-date { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.countdown.half { background: linear-gradient(150deg, #ff7a5c, #e0453a); box-shadow: 0 10px 22px rgba(224, 69, 58, .3); border: 0; flex-direction: initial; }
.countdown.half.empty { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); box-shadow: none; }
.h-num { font: 700 34px/1 Literata, serif; }
.h-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.16); margin-bottom: 4px; }
.h-ico svg { width: 22px; height: 22px; }
.streak.half { display: grid; flex-direction: initial; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.streak.half .bell { width: 40px; height: 40px; margin-bottom: 4px; }
.streak.half .st-dots { gap: 4px; margin-top: 4px; }
.streak.half .st-dots i { width: 10px; height: 10px; } .streak.half .st-dots i:last-child { border: 1.5px solid #f3cf7f; }
.today-copy small { font-size: 12px; }
.tile { position: relative; padding-top: 52px !important; }
.tile-ico { position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(47, 116, 255, .12); color: #2f74ff; }
.tile-ico svg { width: 19px; height: 19px; }
.tile.read .tile-ico { background: rgba(47,191,143,.14); color: #1f9a72; } .tile.write .tile-ico { background: rgba(124,92,255,.13); color: #6a4ce0; } .tile.vocab .tile-ico { background: rgba(240,160,60,.16); color: #c97a16; }
.home-hero + .home-card { margin-top: -26px; position: relative; z-index: 2; }
.home-hero .home-head { display: flex; flex-direction: column; bottom: 40px; }
.mini-row { margin-top: 12px; }
/* ---- round 8: one-page start, no AVENLIO ---- */
.app.is-welcome .welcome.one { min-height: 0; height: 58vh; min-height: 440px; }
.welcome.one .welcome-top { justify-content: space-between; }
.lang-drop { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; background: rgba(8, 24, 64, .5); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; font: 600 14.5px/1 "Golos Text", sans-serif; }
.lang-drop select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 16px; }
.lang-drop .ld-flag { font-size: 18px; }
.lang-drop::after { content: attr(data-x); }
.lang-drop i { font-style: normal; font-size: 15px; opacity: .85; margin-top: -4px; }
.signin-top { color: #f0cf86; font-weight: 600; font-size: 14px; min-height: 40px; padding: 0 6px; }
.welcome.one .welcome-brand { margin-top: 6px; }
.welcome.one .welcome-emblem { width: 92px; }
.welcome.one .welcome-body { padding-top: 0; margin-top: auto; padding-bottom: 6px; }
.welcome.one .welcome-sub { margin-bottom: 4px; }
.welcome.one .welcome-ribbon { margin-top: 0; height: 40px; }
.one-setup { position: relative; z-index: 2; margin: -6px -2px 0; padding: 22px 18px 26px; border-radius: 28px; background: linear-gradient(180deg, rgba(14, 40, 104, .96), rgba(8, 26, 72, .98)); border: 1px solid rgba(243, 207, 127, .28); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); }
.one-setup .step:first-child { margin-top: 0; }
.one-setup .welcome-privacy { margin: 16px 4px 0; }
.app.is-welcome .view { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
/* header wordmark without AVENLIO */
.logo.cv { display: flex; align-items: center; gap: 8px; }
.logo.cv img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(229, 184, 101, .45)); }
.logo.cv span { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: .01em; background: linear-gradient(180deg, #fff0c4, #e5b865 60%, #b8863c); -webkit-background-clip: text; background-clip: text; color: transparent; }
#tabbar[hidden], .tabbar[hidden] { display: none !important; }
.app.is-welcome .welcome.one .welcome-lead { font-size: 27px; white-space: nowrap; }
.lang-drop b { font-weight: 600; }
/* ---- round 8b: Test A–D, Interview mic, Car player ---- */
.abcd { display: grid; gap: 10px; margin: 12px 0 14px; }
.abcd button { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px 10px 10px; border-radius: 18px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.96); color: #13285a; text-align: left; font: 600 15.5px/1.3 "Golos Text", sans-serif; box-shadow: 0 6px 16px rgba(4,18,60,.18); transition: transform .15s, background .25s, border-color .25s; }
.abcd button:active { transform: scale(.98); }
.abcd i { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #eaf0ff; color: #2f5fd0; font: 700 16px/1 Literata, serif; font-style: normal; }
.abcd span { flex: 1; }
.abcd b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 15px; }
.abcd .right { background: #e6f8f0; border-color: #2fbf8f; animation: popOk .4s ease; } .abcd .right i { background: #2fbf8f; color: #fff; } .abcd .right b { background: #2fbf8f; }
.abcd .wrong { background: #fdecea; border-color: #ec4a3c; animation: shake .4s ease; } .abcd .wrong i { background: #ec4a3c; color: #fff; } .abcd .wrong b { background: #ec4a3c; }
.abcd .dim { opacity: .55; }
@keyframes popOk { 50% { transform: scale(1.03); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.test-more { margin: 0 0 12px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.test-more summary { cursor: pointer; font-weight: 600; color: #f3cf7f; }
.test-card .q-num { color: #8a97b5; font-size: 12.5px; margin: 0 0 4px; }
/* interview */
.mic-zone { display: grid; justify-items: center; gap: 10px; margin: 6px 0 12px; }
.big-mic { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; display: grid; place-items: center; background: radial-gradient(circle at 40% 30%, #ff8a72, #ec4a3c 55%, #c42f26); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 16px 40px rgba(236,74,60,.5); color: #fff; }
.big-mic svg { position: relative; z-index: 1; width: 54px; height: 54px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.big-mic .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,122,98,.55); opacity: 0; }
.big-mic .r1 { animation: micIdle 2.8s ease-out infinite; } .big-mic .r2 { animation: micIdle 2.8s .9s ease-out infinite; } .big-mic .r3 { animation: micIdle 2.8s 1.8s ease-out infinite; }
.big-mic.on .ring { animation-duration: 1.2s; border-color: rgba(255,160,140,.85); }
.big-mic.on { animation: micBeat 1.2s ease-in-out infinite; }
.big-mic:active { transform: scale(.96); }
@keyframes micIdle { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes micBeat { 50% { transform: scale(1.05); } }
.mic-zone.accepted .big-mic { background: radial-gradient(circle at 40% 30%, #6ee7b7, #2fbf8f 55%, #1b8f68); box-shadow: 0 16px 40px rgba(47,191,143,.5); }
.mic-zone .status-line { margin: 4px 0 0; color: #fff; font-weight: 600; font-size: 15px; text-align: center; }
.iv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.iv-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 18px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.12); color: #fff; font: 600 14.5px/1.2 "Golos Text", sans-serif; }
.iv-btn:first-child { background: linear-gradient(180deg, #3d8bff, #2565e8); border-color: transparent; box-shadow: 0 10px 22px rgba(37,101,232,.35); }
.iv-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.iv-btn:last-child svg { fill: #fff; stroke: none; }
.iv-btn.off { opacity: .55; }
.app:has([data-screen="interview"]) .seal-wrap { display: none; }
/* car round player */
.car-play.round { position: relative; width: 200px; height: 200px; padding: 0; border: 0; background: conic-gradient(#f3cf7f calc(var(--p) * 1%), rgba(255,255,255,.14) 0); box-shadow: none; }
.car-play.round .glow { position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(circle, rgba(80,170,255,.55), rgba(80,170,255,0) 70%); animation: carGlow 3.6s ease-in-out infinite; z-index: -1; }
.car-play.round.on .glow { animation-duration: 1.6s; }
.car-play.round .disc { position: absolute; inset: 8px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 28%, #7ad7ff, #2f8cff 45%, #1a4fd0 100%); box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -10px 24px rgba(0,20,80,.35), 0 18px 44px rgba(26,79,208,.55); }
.car-play.round .disc i { width: 0; height: 0; border-left: 46px solid #fff; border-top: 28px solid transparent; border-bottom: 28px solid transparent; margin-left: 12px; filter: drop-shadow(0 3px 6px rgba(0,0,40,.3)); }
.car-play.round.on .disc i { width: 44px; height: 54px; margin: 0; border: 0; background: linear-gradient(90deg, #fff 0 36%, transparent 36% 64%, #fff 64%); }
@keyframes carGlow { 50% { transform: scale(1.1); opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .big-mic, .big-mic .ring, .car-play.round .glow { animation: none !important; } }
.abcd button:disabled { opacity: 1; cursor: default; }
.abcd button.dim:disabled { opacity: .5; }
.abcd .right, .abcd .wrong { color: #13285a; }
/* ---- round 9: night theme, interview day, certificate ---- */
.app.theme-night { background: linear-gradient(180deg, #050d22, #020814) !important; }
.app.theme-night .home-card, .app.theme-night .today, .app.theme-night .tile, .app.theme-night .mini, .app.theme-night .panel, .app.theme-night .abcd button, .app.theme-night .map-stop, .app.theme-night .set-row, .app.theme-night .car-settings { background: #101c3a !important; color: #e8eefc !important; border: 1px solid rgba(255,255,255,.08) !important; box-shadow: 0 8px 22px rgba(0,0,0,.4) !important; }
.app.theme-night .home-card *, .app.theme-night .today *, .app.theme-night .tile b, .app.theme-night .mini b, .app.theme-night .panel .q-en, .app.theme-night .map-copy b, .app.theme-night .set-row b, .app.theme-night .abcd span { color: #e8eefc !important; }
.app.theme-night .tile span, .app.theme-night .mini span, .app.theme-night .map-copy small, .app.theme-night .hc-progress small, .app.theme-night .panel .q-ru, .app.theme-night .set-row small { color: #93a3c8 !important; }
.app.theme-night .home-cta, .app.theme-night .home-card .home-cta * { color: #fff !important; }
.app.theme-night .abcd i { background: #1c2b52; color: #9fb8ff; }
.app.theme-night .abcd .right { background: #0f3a30 !important; border-color: #2fbf8f !important; }
.app.theme-night .abcd .wrong { background: #3d1518 !important; border-color: #ec4a3c !important; }
.app.theme-night .car-settings select, .app.theme-night .panel input { background: #0a1430; color: #e8eefc; border-color: rgba(255,255,255,.14); }
.app.theme-night .car-settings label, .app.theme-night .switch span { color: #c7d2ee !important; }
.app.theme-night #tabbar { background: rgba(4, 10, 26, .92); }
.theme-pick .seg { margin: 6px 0 0; }
/* interview day */
.iday-hero { text-align: center; padding: 6px 0 4px; }
.iday-hero img { width: 86px; filter: drop-shadow(0 6px 16px rgba(229,184,101,.4)); }
.iday-hero h1 { margin: 6px 0 2px; }
.iday-when { color: #f3cf7f; font-weight: 600; font-size: 16px; margin: 0 0 12px; text-transform: capitalize; }
.iday-when.set { display: grid; gap: 8px; text-transform: none; color: #fff; }
.iday-meter { height: 8px; border-radius: 8px; background: rgba(255,255,255,.14); overflow: hidden; margin: 0 20px; }
.iday-meter span { display: block; height: 100%; background: linear-gradient(90deg, #2fbf8f, #7be0b8); border-radius: 8px; transition: width .4s; }
.iday-list { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 8px; }
.iday-list button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.95); color: #13285a; text-align: left; font: 600 15px/1.3 "Golos Text", sans-serif; }
.iday-list i { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid #b9c5e2; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; transition: .2s; }
.iday-list .on { background: #e6f8f0; } .iday-list .on i { background: #2fbf8f; border-color: #2fbf8f; } .iday-list .on span { text-decoration: line-through; text-decoration-color: rgba(19,40,90,.35); }
.iday-run { width: 100%; display: flex; align-items: center; gap: 12px; margin: 10px 0 0; padding: 10px 16px 10px 10px; border-radius: 22px; border: 0; background: linear-gradient(135deg, #1d4fc4, #0f2d80); color: #fff; text-align: left; box-shadow: 0 12px 28px rgba(15,45,128,.45); }
.iday-run img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; object-position: center 15%; }
.iday-run span { flex: 1; display: grid; gap: 2px; } .iday-run small { opacity: .8; }
.iday-run i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #ec4a3c; font-style: normal; }
/* certificate */
.cert { position: relative; margin: 6px 0 16px; padding: 46px 30px 34px; text-align: center; color: #13285a; background: url("assets/card-paper.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 18px 34px rgba(0,0,0,.4)); min-height: 520px; }
.cert-crest { width: 110px; }
.cert-kicker { margin: 4px 0 0; font: 600 15px/1 Literata, serif; color: #8a5a1c; letter-spacing: .06em; }
.cert h2 { margin: 12px 0 10px; font: 700 28px/1.15 Literata, serif; color: #13285a; }
.cert-name { margin: 0; font: 600 25px/1.2 "Golos Text", sans-serif; border-bottom: 1.5px solid rgba(138,90,28,.4); display: inline-block; padding: 0 18px 6px; }
.cert-line { margin: 10px 0 14px; color: #4a5c86; font-size: 14px; }
.cert-stats { display: flex; justify-content: center; gap: 22px; }
.cert-stats span { display: grid; } .cert-stats b { font: 700 24px/1 Literata, serif; } .cert-stats small { color: #8a6a3c; font-size: 11.5px; margin-top: 3px; }
.cert-date { margin: 16px 0 4px; color: #8a5a1c; font-weight: 600; font-size: 14px; }
.cert-note { margin: 0; color: #7a849c; font-size: 11px; }
.cert.locked > *:not(.cert-lock) { filter: blur(1.5px) grayscale(.4); opacity: .55; }
.cert-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; gap: 4px; padding: 16px 22px; border-radius: 20px; background: rgba(11,37,96,.92); color: #fff; width: 76%; }
.cert-lock b { font: 700 24px/1 Literata, serif; color: #f3cf7f; } .cert-lock span { font-size: 13.5px; }
.cert-banner { width: 100%; display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 10px 16px 10px 10px; border-radius: 22px; border: 1px solid rgba(243,207,127,.55); background: linear-gradient(135deg, #f7e1a6, #d9a94f); color: #3a2608; text-align: left; box-shadow: 0 10px 26px rgba(217,169,79,.35); }
.cert-banner img { width: 50px; } .cert-banner span { flex: 1; display: grid; } .cert-banner small { opacity: .8; } .cert-banner i { font-style: normal; font-size: 22px; }
button.half.countdown { border: 0; text-align: left; font: inherit; }
.iday-when { text-transform: none; }
.countdown.half small { color: rgba(255,255,255,.92); opacity: 1; }
/* ---- round 10: cleaner, compact start ---- */
.app.is-welcome .welcome.one { height: 40vh; min-height: 330px; }
.welcome.one .welcome-top { position: relative; }
.top-mark { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; color: #f3d898; text-shadow: 0 2px 10px rgba(0,0,0,.5); white-space: nowrap; pointer-events: none; }
.welcome.one .welcome-body { padding-bottom: 2px; }
.app.is-welcome .welcome.one .welcome-lead { font-size: 25px; margin-bottom: 6px; }
.welcome.one .welcome-sub { font-size: 14px; margin: 6px 16px 0; }
.one-setup { padding: 18px 16px 22px; }
.one-setup .step { margin: 16px 0 8px; font-size: 15.5px; }
.one-setup .step:first-child { margin-top: 0; }
.one-setup .place-field, .one-setup .zip-field input { min-height: 52px; border-radius: 16px; }
.one-setup .place-field { background: rgba(255,255,255,.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23f3cf7f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 8px; color: #fff; border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.one-setup .place-field .ui-ico { color: #f3cf7f; }
.one-setup .place-field.on { border-color: rgba(243,207,127,.6); box-shadow: none; background-color: rgba(243,207,127,.1); }
.one-setup .zip-field input { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.one-setup .zip-field input::placeholder { color: rgba(255,255,255,.4); }
.one-setup .zip-field input:disabled { opacity: .45; }
.one-setup .zip-field .ui-ico { color: rgba(255,255,255,.6); }
.one-setup .zip-field.ok input { border-color: #2fbf8f; }
.one-setup .fine { font-size: 12.5px; margin: 6px 2px 0; }
.one-setup .setup-card { margin-top: 12px; }
.one-setup .setup-card .sc-head { height: 96px; }
.one-setup .check-list li { padding-top: 9px; padding-bottom: 9px; }
.opt-chip { width: 100%; display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: 16px; border: 1px dashed rgba(255,255,255,.28); background: transparent; color: #fff; text-align: left; }
.opt-chip b { display: block; font-size: 14.5px; } .opt-chip small { display: block; margin-top: 2px; font-size: 12px; color: rgba(255,255,255,.6); }
.oc-box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255,255,255,.45); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.opt-chip.on { border-style: solid; border-color: rgba(243,207,127,.55); background: rgba(243,207,127,.08); }
.opt-chip.on .oc-box { background: #f3cf7f; border-color: #f3cf7f; color: #13285a; }
.fine.ok { color: #7be0b8; }
.one-setup .cta { margin-top: 16px; }
.top-mark { position: static; transform: none; margin: 0 0 4px; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: #f3d898; }
.welcome.one .welcome-art { top: -120px; }
.manual-district { display: grid; gap: 8px; margin: 10px 0 0; padding: 12px; border-radius: 16px; background: rgba(243,207,127,.08); border: 1px solid rgba(243,207,127,.3); }
.manual-district label { margin: 0; font-size: 13.5px; font-weight: 600; color: #f3d898; }
.manual-district select { min-height: 48px; border-radius: 14px; }
.manual-district .text-link { justify-self: start; color: #8fd3ff; font-size: 13px; min-height: 32px; }
.manual-district select { background-color: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.manual-district select option { color: #13285a; }
/* ---- round 11: setup v3 per mockup ---- */
.app.is-welcome { background: #021651 url("assets/setup-bg.jpg") center top / 100% auto no-repeat !important; }
.app.is-welcome .welcome-art, .app.is-welcome .welcome-sparks { display: none; }
.sv3 { position: relative; padding: 0 0 calc(24px + env(safe-area-inset-bottom)); }
.sv3 .welcome-top { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 0 0; }
.sv3-logo { display: block; width: 46%; max-width: 210px; margin: 6px auto 0; filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); }
.sv3 h1 { margin: 8px 0 4px; text-align: center; font-family: var(--display); font-size: 27px; font-weight: 600; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.sv3-lead { margin: 0 24px 14px; text-align: center; color: rgba(255,255,255,.88); font-size: 14.5px; line-height: 1.4; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.sv3 .step { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0 8px; color: #fff; font-size: 17px; font-weight: 700; line-height: 1.25; }
.sv3 .step i { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 15px; font-weight: 800; color: #3a2608; background: radial-gradient(circle at 35% 30%, #ffe9a8, #e2b04f 70%, #b8832a); box-shadow: 0 0 14px rgba(243,207,127,.55); }
.sv3 .step span { display: grid; gap: 2px; padding-top: 4px; } .sv3 .step small { font-size: 12.5px; font-weight: 400; color: rgba(255,255,255,.72); }
.sv3-zip input { min-height: 54px; border-radius: 999px; background: rgba(16, 40, 100, .7); color: #fff; border: 1.5px solid rgba(150, 180, 255, .35); font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.sv3-zip input::placeholder { color: rgba(255,255,255,.35); }
.sv3-zip .ui-ico { color: #cfe0ff; }
.sv3-zip.ok input { border-color: rgba(47,191,143,.8); }
.sv3-zip.ok i { background: #22c06e; width: 30px; height: 30px; right: 14px; }
.sv3 .fine { color: rgba(255,255,255,.7); font-size: 12.5px; margin: 6px 6px 0; }
.sv3-manual { display: block; margin: 8px 6px 0; color: #8fd3ff; font-size: 13.5px; min-height: 32px; }
.sc3 { position: relative; margin: 4px 0 0; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #0b2363, #071a4f); border: 1.5px solid #e8c372; box-shadow: 0 0 0 1px rgba(255,220,140,.25), 0 0 22px rgba(243,207,127,.45), 0 14px 30px rgba(0,0,0,.4); }
.sc3-head { position: relative; height: 118px; }
.sc3-head .state-art { position: absolute; inset: 0 40% 0 0; height: auto; border-radius: 0; margin: 0; }
.sc3-head .state-art img, .sc3-head .state-scene { width: 100%; height: 100%; object-fit: cover; }
.sc3-head .state-name, .sc3-head .state-outline { display: none; }
.sc3-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,26,79,0) 25%, rgba(7,26,79,.85) 58%, #0a2161 72%), linear-gradient(180deg, rgba(7,26,79,0) 70%, #0b2363); pointer-events: none; }
.sc3-title { position: absolute; z-index: 2; right: 16px; top: 16px; display: grid; justify-items: end; gap: 6px; }
.sc3-title h3 { margin: 0; font: 700 30px/1 Literata, serif; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.sc3-title .found { display: inline-flex; padding: 5px 12px; border-radius: 999px; background: #1fae63; color: #fff; font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 12px rgba(31,174,99,.4); }
.sc3-pin { display: none; }
.sc3-rows { list-style: none; margin: 0; padding: 4px 12px 10px; }
.sc3-rows li { display: grid; grid-template-columns: 24px minmax(0, 1.25fr) minmax(0, 1fr) 24px; align-items: center; gap: 8px; padding: 9px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.sc3-rows li:first-child { border-top: 0; }
.sc3-rows .ui-ico { width: 22px; height: 22px; color: #e8c372; }
.sc3-rows .r-l { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.25; } .sc3-rows .r-l small { font-weight: 400; color: rgba(255,255,255,.6); font-size: 11.5px; }
.sc3-rows .r-v { color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.sc3-rows > li > i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: #22c06e; }
.sc3-rows > li > i.wait { background: rgba(255,255,255,.18); }
.r-pick { width: 100%; min-height: 34px !important; padding: 0 26px 0 10px !important; border-radius: 10px !important; font-size: 13px !important; background-color: rgba(255,255,255,.12) !important; color: #fff !important; border: 1px solid rgba(243,207,127,.6) !important; }
.r-pick option { color: #13285a; }
.sc3-find { display: block; padding: 0 16px 12px; color: #8fd3ff; font-size: 12.5px; }
.yn3 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yn3 button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 999px; border: 1.5px solid rgba(150,180,255,.35); background: rgba(16,40,100,.7); color: #fff; font: 600 17px/1 "Golos Text", sans-serif; }
.yn3 button.on { border-color: #f0c869; background: linear-gradient(180deg, rgba(60,50,20,.55), rgba(30,30,40,.6)); box-shadow: 0 0 0 1px rgba(255,220,140,.35), 0 0 18px rgba(243,207,127,.5); }
.yn3 b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #f0c869; color: #3a2608; font-size: 14px; }
.date3 { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 8px 8px 14px; border-radius: 16px; background: rgba(16,40,100,.6); border: 1px solid rgba(150,180,255,.25); color: #fff; }
.date3 .ui-ico { width: 26px; height: 26px; color: #e8c372; flex: none; } .date3 span { flex: 1; font-size: 14px; font-weight: 600; }
.date3 input { width: 52%; min-height: 44px; border-radius: 12px; }
.sv3 .opt-chip { display: flex; align-items: center; padding: 0; margin-top: 14px; border-radius: 16px; }
.sv3 .opt-chip .oc-main { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 14px; background: none; border: 0; color: #fff; text-align: left; }
.oc-info { flex: none; width: 30px; height: 30px; margin-right: 12px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); background: none; color: #fff; font: italic 700 15px/1 Georgia, serif; }
.info3 { margin: 8px 6px 0; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.08); }
.sv3 .cta { margin-top: 18px; min-height: 58px; font-size: 19px; border-radius: 999px; }
.sv3 .welcome-privacy { margin-top: 14px; }
.sv3 .mini-panel { background: rgba(16,40,100,.6); }
.sc3-head .state-art { inset: 0; }
.sc3-head::after { background: linear-gradient(90deg, rgba(10,33,97,0) 30%, rgba(10,33,97,.75) 60%, rgba(10,33,97,.92) 100%), linear-gradient(180deg, rgba(11,35,99,0) 65%, #0b2363); }
.sc3-rows .r-l small { display: block; }
/* tighter top */
.sv3 .welcome-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding-top: calc(8px + env(safe-area-inset-top)); }
.sv3 .lang-drop { height: 32px; padding: 0 10px; font-size: 13px; gap: 5px; }
.sv3 .lang-drop .ld-flag { font-size: 15px; }
.sv3 .signin-top { min-height: 32px; font-size: 13px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.sv3-logo { width: 40%; max-width: 170px; margin: calc(8px + env(safe-area-inset-top)) auto 0; }
.sv3 h1 { margin: 2px 0 2px; font-size: 24px; }
.sv3-lead { margin: 0 34px 4px; font-size: 13.5px; line-height: 1.35; }
.sv3 .step { margin-top: 12px; }
.sv3 > .step:first-of-type { margin-top: 10px; }
.sc3-head { height: 88px; }
.sc3-title { top: 12px; gap: 5px; } .sc3-title h3 { font-size: 27px; }
.sv3 .lang-drop { background: rgba(4,14,44,.55); }
.app.is-welcome { background: linear-gradient(180deg, rgba(2,17,66,0) 0, rgba(2,17,66,0) 110px, rgba(2,17,66,.85) 175px, #021142 240px) no-repeat, #021142 url("assets/setup-bg.jpg") center top / 100% auto no-repeat !important; }
/* state map back on the card */
.sc3-title { right: 84px; }
.sc3-map { position: absolute; z-index: 2; right: 10px; top: 8px; width: 70px; height: 70px; display: block; }
.sc3-shape { width: 100%; height: 100%; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)) drop-shadow(0 0 6px rgba(243,207,127,.45)); }
.sc3-shape path { fill: url(#none); fill: #e9b949; stroke: #fff1c4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.sc3-pin { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); animation: pinDrop .8s .3s cubic-bezier(.3,1.6,.5,1) both; }
.sc3-pin path { fill: #ec3b3b; }
@keyframes pinDrop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
/* header text sits on a soft blue glow between statue and city */
.sv3-logo, .sv3 h1, .sv3-lead { position: relative; z-index: 1; }
.sv3::before { content: ""; position: absolute; left: 50%; top: 0; width: 300px; height: 250px; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 45%, rgba(2,17,66,.92) 0, rgba(2,17,66,.75) 45%, rgba(2,17,66,0) 72%); pointer-events: none; z-index: 0; }
.sv3 > *:not(.welcome-top) { position: relative; z-index: 1; }
.sv3::before { height: 210px; }
.sc3-map .sc3-pin { display: block; right: 4px; bottom: 10px; }
.state3 { width: 100%; display: flex; align-items: center; gap: 12px; margin: 10px 0 0; min-height: 54px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid rgba(150,180,255,.35); background: rgba(16,40,100,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23f3cf7f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 8px; color: #fff; text-align: left; }
.state3 .ui-ico { width: 22px; height: 22px; color: #f3cf7f; flex: none; }
.state3 span { flex: 1; display: grid; } .state3 small { font-size: 11.5px; color: rgba(255,255,255,.6); } .state3 b { font-size: 16.5px; }
.state3 em { font-style: normal; font-size: 12.5px; color: #f3cf7f; margin-right: 22px; }
.state3.on { border-color: rgba(243,207,127,.55); }
/* undo glow (not approved); narrower white heading in the blue gap */
.sv3::before { display: none; }
.sv3 h1 { max-width: 230px; margin-left: auto; margin-right: auto; }
.sv3-lead { max-width: 220px; margin-left: auto; margin-right: auto; }
.sv3 .state3 { margin-top: 0; }
.sv3 h1 { max-width: none; font-size: 22px; white-space: nowrap; }
.sv3-lead { max-width: 250px; font-size: 13px; }
.pick3 { margin: 10px 0 0; padding: 12px; border-radius: 18px; background: rgba(243,207,127,.08); border: 1px solid rgba(243,207,127,.35); }
.pick3 p { margin: 0 0 8px; color: #f3d898; font-size: 13.5px; font-weight: 600; }
.pick3 div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick3 button { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(150,180,255,.35); background: rgba(16,40,100,.75); color: #fff; text-align: left; }
.pick3 b { font-size: 15px; } .pick3 small { font-size: 12px; color: rgba(255,255,255,.7); }
/* setup final pass */
.sv3-zip input { color: #fff !important; -webkit-text-fill-color: #fff; caret-color: #f3cf7f; }
.sv3-zip input::placeholder { color: rgba(255,255,255,.38); -webkit-text-fill-color: rgba(255,255,255,.38); }
.sv3-zip.bad input { border-color: rgba(255,120,100,.8); }
.sv3 .fine.warn { color: #ffb4a6; }
.sv3 .fine.soft-warn { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(243,207,127,.08); color: #f3d898; }
.sc3-rows li.pending .r-v { color: rgba(255,255,255,.62); font-weight: 600; }
.sc3-rows li.manual3 { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 4px 2px 10px; border-top: 0; }
.sc3-rows li.manual3 label { margin: 0; font-size: 12.5px; color: #f3d898; font-weight: 600; }
.sc3-rows li.manual3 .r-pick { min-height: 44px !important; font-size: 15px !important; }
.pick3 button.on { border-color: #f0c869; box-shadow: 0 0 0 1px rgba(255,220,140,.35), 0 0 14px rgba(243,207,127,.45); }
.sv3, .sv3 * { min-width: 0; }
.sv3 .welcome-top { gap: 8px; }
.sc3-title h3 { max-width: 100%; overflow-wrap: anywhere; }
.date3 input { color: #13285a; }
@media (max-width: 350px) {
  .sv3 h1 { font-size: 19px; }
  .sv3-lead { font-size: 12px; }
  .sc3-rows li { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 6px; }
  .sc3-title h3 { font-size: 22px; }
  .sc3-map { width: 56px; height: 56px; } .sc3-title { right: 70px; }
  .date3 { flex-wrap: wrap; } .date3 input { width: 100%; }
}
@media (min-width: 700px) { .sv3 { max-width: 560px; margin: 0 auto; } }
@media (max-width: 360px) {
  .sv3-logo { width: 32%; }
  .sv3 .lang-drop { height: 28px; padding: 0 8px; font-size: 12px; }
  .sv3 .signin-top { font-size: 12px; }
  .sv3 h1 { font-size: 18px; margin-top: 0; }
  .sv3-lead { max-width: 210px; font-size: 11.5px; }
}
/* address check block */
.addr3 { margin: 12px 0 0; padding: 16px 14px 12px; border-radius: 20px; background: linear-gradient(180deg, rgba(14,40,104,.9), rgba(8,26,72,.95)); border: 1px solid rgba(243,207,127,.55); box-shadow: 0 0 16px rgba(243,207,127,.25); }
.addr3 h3 { margin: 0 0 6px; font: 600 18px/1.25 Literata, serif; color: #f3d898; }
.addr3 > p { margin: 0 0 10px; color: rgba(255,255,255,.82); font-size: 13.5px; line-height: 1.4; }
.addr-field { position: relative; display: flex; align-items: center; }
.addr-field .ui-ico { position: absolute; left: 14px; width: 20px; height: 20px; color: #cfe0ff; }
.addr-field input { width: 100%; min-height: 50px; padding: 0 14px 0 42px; border-radius: 999px; background: rgba(16,40,100,.7); color: #fff; -webkit-text-fill-color: #fff; border: 1.5px solid rgba(150,180,255,.35); font-size: 16px; }
.addr-field input::placeholder { color: rgba(255,255,255,.4); -webkit-text-fill-color: rgba(255,255,255,.4); }
.addr-go { margin-top: 10px; min-height: 50px; border-radius: 999px; background: linear-gradient(180deg, #f6d98e, #e2b04f); color: #2c1d05; font-weight: 700; box-shadow: 0 8px 20px rgba(226,176,79,.3); }
.addr-go.busy { opacity: .75; }
.addr-msg { margin: 10px 2px 0; font-size: 13px; color: #9fe3c4; } .addr-msg.warn { color: #ffcdb8; }
.addr-privacy { display: flex; gap: 8px; margin: 10px 2px 0; font-size: 11.5px; line-height: 1.4; color: rgba(255,255,255,.6); }
.addr-privacy .ui-ico { flex: none; width: 16px; height: 16px; color: rgba(255,255,255,.55); margin-top: 1px; }
.addr-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 8px; }
.addr-links a { color: #8fd3ff; font-size: 13px; padding: 6px 0; }
.addr-links .text-link { color: rgba(255,255,255,.75); font-size: 13px; min-height: 32px; text-decoration: underline; }
.r-again { margin-left: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(243,207,127,.6); background: none; color: #f3d898; font-size: 11.5px; }
/* ---- review pass (approved: all 9) ---- */
/* 1 header air */
.sv3-logo { width: 36%; max-width: 150px; }
.sv3 h1 { margin-top: 8px; }
.sv3 .welcome-top { padding-top: calc(6px + env(safe-area-inset-top)); }
.sv3 .lang-drop { height: 30px; }
/* 2 sign-in pill */
.sv3 .signin-top { min-height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(1,8,34,.55); border: 1px solid rgba(243,207,127,.55); color: #f3d898; text-decoration: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-weight: 600; }
/* 5 readable small text */
.sv3 .step small, .sv3 .fine, .sv3 .opt-chip small, .sc3-rows .r-l small, .addr-privacy, .sv3 .welcome-privacy, .sv3-lead { font-size: 13px !important; }
.sv3 .step small, .sv3 .fine, .sv3 .opt-chip small, .sc3-rows .r-l small, .addr-privacy, .sv3 .welcome-privacy { color: rgba(255,255,255,.8) !important; }
.sv3-lead { color: rgba(255,255,255,.92); }
/* 6 card columns */
.sc3-rows li { grid-template-columns: 24px minmax(0, .95fr) minmax(0, 1.15fr) 24px; }
.sc3-rows .r-v { font-size: 14px; }
/* 7 found pill under the title */
.sc3-title .found { padding: 3px 10px; font-size: 11.5px; box-shadow: none; }
.sc3-title { gap: 4px; }
/* 8 date on its own line */
.date3 { flex-wrap: wrap; padding: 10px 12px; }
.date3 span { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.date3 .date-local { font-size: 14px; color: #f3d898; }
.date3 input { flex: 1 1 100%; width: 100%; margin-top: 8px; }
/* 9 variant B: deeper navy, stronger gold */
.app.is-welcome { background: linear-gradient(180deg, rgba(1,8,34,0) 0, rgba(1,8,34,0) 105px, rgba(1,8,34,.9) 170px, #010822 235px) no-repeat, #010822 url("assets/setup-bg.jpg") center top / 100% auto no-repeat !important; }
.sc3 { border: 2px solid #f3cd72; box-shadow: 0 0 0 1px rgba(255,225,150,.45), 0 0 30px rgba(243,207,127,.6), 0 16px 34px rgba(0,0,0,.55); background: linear-gradient(180deg, #081a4c, #040f33); }
.sc3-head::after { background: linear-gradient(90deg, rgba(8,26,76,0) 30%, rgba(8,26,76,.75) 60%, rgba(8,26,76,.92) 100%), linear-gradient(180deg, rgba(8,26,76,0) 65%, #081a4c); }
.state3, .sv3-zip input, .yn3 button, .addr-field input, .date3 { background-color: rgba(8,22,66,.85) !important; border-color: rgba(243,207,127,.45) !important; }
.state3.on { border-color: #f0c869 !important; box-shadow: 0 0 0 1px rgba(255,225,150,.35), 0 0 16px rgba(243,207,127,.4); }
.yn3 button.on { border-color: #f6d27a !important; box-shadow: 0 0 0 1px rgba(255,225,150,.5), 0 0 22px rgba(243,207,127,.65) !important; }
.sv3 .opt-chip { border-color: rgba(243,207,127,.45); }
.sc3-rows li { border-top-color: rgba(243,207,127,.18); }
.sv3-zip.ok input { border-color: rgba(47,191,143,.85) !important; }
.sc3-rows { padding: 4px 10px 10px; }
.sc3-rows li { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.12fr) 22px; gap: 8px; }
.sc3-rows .r-l { font-size: 13px; }
.sc3-rows .r-l small { font-size: 12px !important; letter-spacing: -.01em; }
.sc3-rows .r-v { font-size: 13.5px; }
/* ---- home review pass ---- */
.logo.cv .logo-full { width: auto; height: 38px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.app:has(#view[data-screen="home"]) { background: radial-gradient(120% 60% at 50% 0, #0b2462 0, #04113a 45%, #010822 100%) fixed, #010822 !important; }
.app:has(#view[data-screen="home"]) #tabbar { background: rgba(1,8,34,.92); border-top-color: rgba(243,207,127,.18); }
/* hero sits cleanly under the card */
.home-hero { overflow: hidden; }
.home-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(180deg, rgba(1,8,34,0), rgba(1,8,34,.55) 60%, rgba(1,8,34,.9)); pointer-events: none; z-index: 0; }
.home-hero .home-head { z-index: 2; }
.home-hero + .home-card { margin-top: -22px; }
.home-card { border: 1px solid rgba(243,207,127,.35); }
.hc-start { flex: none; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(160deg, #3d7bff, #1f4fd0); box-shadow: 0 8px 18px rgba(31,79,208,.35); }
.hc-start svg { width: 34px; height: 34px; }
.hc-start svg * { stroke: #fff; }
.hc-progress .pr-copy .hc-title { font: 700 21px/1.15 Literata, serif; color: #13285a; }
.hc-sub { font-size: 13px; color: #5b6b90; }
/* duo + today in navy glass with gold */
.app:has(#view[data-screen="home"]) .half, .app:has(#view[data-screen="home"]) .countdown.half.empty { background: rgba(8,22,66,.8); border: 1px solid rgba(243,207,127,.4); }
.app:has(#view[data-screen="home"]) .countdown.half:not(.empty) { border: 0; }
.half.streak small { font-size: 12.5px; opacity: .8; }
.today { border: 1px solid rgba(243,207,127,.4); }
.today-state, .today-hard { background: rgba(8,22,66,.85) !important; color: #fff !important; }
.today-state .today-copy b, .today-hard .today-copy b { color: #fff; } .today-state .today-copy small, .today-hard .today-copy small { color: rgba(255,255,255,.72); }
.today-state .today-copy small:first-child, .today-hard .today-copy small:first-child { color: #f3d898; }
.today-photo { flex: none; width: 72px; height: 72px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(243,207,127,.5); background: #0b2462; }
.today-photo img { width: 100%; height: 100%; object-fit: cover; }
.today-ico.warn { background: linear-gradient(160deg, #ff7a5c, #e0453a); color: #fff; font: 800 28px/1 "Golos Text", sans-serif; display: grid; place-items: center; }
.today-state .today-play, .today-hard .today-play { background: rgba(243,207,127,.15); color: #f3d898; border: 1px solid rgba(243,207,127,.5); box-shadow: none; }
.today::after { display: none !important; }
/* practice tiles: navy glass, gold */
.app:has(#view[data-screen="home"]) .tile { background: rgba(8,22,66,.82) !important; border: 1px solid rgba(243,207,127,.35) !important; box-shadow: 0 8px 20px rgba(0,0,0,.3) !important; }
.app:has(#view[data-screen="home"]) .tile b { color: #fff !important; } .app:has(#view[data-screen="home"]) .tile span:not(.tile-ico) { color: rgba(255,255,255,.72) !important; }
.app:has(#view[data-screen="home"]) .tile-ico { background: rgba(243,207,127,.14) !important; color: #f3cf7f !important; }
/* links instead of white mini tiles */
.home-links { display: grid; gap: 0; margin: 14px 0 18px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(243,207,127,.35); background: rgba(8,22,66,.82); }
.home-links button { display: grid; grid-template-columns: 24px 1fr auto 14px; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px; border: 0; border-top: 1px solid rgba(243,207,127,.15); background: none; color: #fff; text-align: left; font: 600 15px/1.2 "Golos Text", sans-serif; }
.home-links button:first-child { border-top: 0; }
.home-links .ui-ico { width: 22px; height: 22px; color: #f3cf7f; }
.home-links b { color: #f3d898; font-weight: 700; } .home-links i { font-style: normal; color: rgba(255,255,255,.5); font-size: 18px; }
.home-hero::after { top: auto; inset: auto 0 0 0; height: 55%; background: linear-gradient(180deg, rgba(1,8,34,0), rgba(1,8,34,.5) 55%, rgba(1,8,34,.85)); }
.home-hero .state-scene { width: 100%; height: 100%; object-fit: cover; }
.today.today-state, .today.today-hard { grid-template-columns: 72px 1fr 44px; padding-right: 14px; }
.today-hard .today-ico.warn { width: 64px; height: 64px; border-radius: 18px; }
/* ---- HOME v2 per approved mockup ---- */
.tabs { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 2px; padding-left: 6px; padding-right: 6px; }
.tabs button { font-size: 10.5px; padding: 4px 1px; }
.tabs .feat-ico { width: 24px; height: 24px; }
.app.is-home { background: #010822 url("assets/setup-bg.jpg") center top / 100% auto no-repeat !important; }
.app.is-home .top { display: none; }
.app.is-home .view { padding-top: 0; }
.hm-hero { position: relative; margin: 0 -2px; padding: calc(8px + env(safe-area-inset-top)) 0 4px; text-align: center; }
.hm-hero::after { content: ""; position: absolute; left: -20px; right: -20px; top: 150px; height: 140px; background: linear-gradient(180deg, rgba(1,8,34,0), #010822 85%); z-index: -1; pointer-events: none; }
.hm-top { display: flex; justify-content: space-between; align-items: center; }
.hm-top .lang-drop { height: 34px; padding: 0 10px; font-size: 13px; background: rgba(1,8,34,.55); border-color: rgba(243,207,127,.55); }
.hm-profile { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(243,207,127,.6); background: rgba(1,8,34,.55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hm-profile .ui-ico { width: 22px; height: 22px; }
.hm-logo { display: block; width: 40%; max-width: 180px; margin: -22px auto 0; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.hm-tag { margin: 4px auto 0; max-width: 220px; color: #fff; font-size: 13.5px; line-height: 1.3; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.hm-hello { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; text-align: left; }
.hm-avatar { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #1d3f8f, #0a1f5c); border: 2px solid #e8c372; box-shadow: 0 0 14px rgba(243,207,127,.4); color: #f3d898; font: 700 24px/1 Literata, serif; }
.hm-avatar .ui-ico { width: 28px; height: 28px; }
.hm-hello-copy { display: grid; gap: 2px; } .hm-hello-copy b { color: #fff; font: 700 23px/1.15 "Golos Text", sans-serif; } .hm-hello-copy small { color: rgba(255,255,255,.85); font-size: 15px; }
.hm-course { display: flex; align-items: stretch; gap: 12px; margin: 14px 0 0; padding: 8px; border-radius: 22px; background: linear-gradient(180deg, #0b2363, #071a4f); border: 1.5px solid #e8c372; box-shadow: 0 0 18px rgba(243,207,127,.28), 0 10px 26px rgba(0,0,0,.4); }
.hm-course-photo { flex: none; width: 34%; border-radius: 15px; overflow: hidden; } .hm-course-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-course-copy { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: center; padding: 4px 4px 4px 0; text-align: left; }
.hm-course-title { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; color: #fff; }
.hm-course-title span { font-size: 13.5px; color: rgba(255,255,255,.85); } .hm-course-title b { font: 700 22px/1.1 Literata, serif; }
.hm-course-title i { align-self: center; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: #22c06e; }
.hm-course-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; color: #fff; font-size: 13.5px; }
.hm-course-meta span { display: inline-flex; align-items: center; gap: 5px; } .hm-course-meta .ui-ico { width: 17px; height: 17px; color: #e8c372; }
.hm-course-meta .pending { color: rgba(255,255,255,.65); }
.hm-course-meta2 { margin: 0; color: rgba(255,255,255,.7); font-size: 12.5px; }
.hm-course-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.hm-pill { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(243,207,127,.7); background: rgba(1,8,34,.4); color: #fff; font: 600 13px/1 "Golos Text", sans-serif; }
.hm-pill.gold { background: linear-gradient(180deg, #f6d98e, #e2b04f); color: #2c1d05; border-color: transparent; }
.hm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.hm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 0; }
.hm-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-height: 176px; padding: 10px 8px 12px; border-radius: 20px; border: 1.5px solid rgba(232,195,114,.75); background: radial-gradient(120% 80% at 50% 0, #1a3a86 0, #0b2363 55%, #071a4f 100%); color: #fff; text-align: center; box-shadow: 0 10px 22px rgba(0,0,0,.35); }
.hm-card:active { transform: scale(.98); }
.hm-img { width: 92%; height: 80px; object-fit: contain; margin: 0 auto 4px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.hm-card b { font: 700 17px/1.15 "Golos Text", sans-serif; } .hm-card small { font-size: 12px; line-height: 1.25; color: rgba(255,255,255,.82); min-height: 30px; }
.hm-go { width: 28px; height: 28px; margin-top: 6px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 17px; color: #2c1d05; background: linear-gradient(180deg, #f6d98e, #e2b04f); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.hm-card.wide { min-height: 168px; }
.hm-card.wide .hm-img { height: 84px; width: 100%; }
.hm-car { background: #071a4f; }
.hm-photo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,14,44,.05) 0, rgba(4,14,44,.35) 45%, rgba(4,14,44,.92) 78%), url("assets/home/car-bg.webp") center top / cover no-repeat; }
.hm-car b, .hm-car small, .hm-car .hm-go { position: relative; z-index: 1; }
.hm-progress { width: 100%; display: grid; grid-template-columns: 74px minmax(0, 1fr); grid-template-areas: "ring copy" "streak streak"; gap: 10px 14px; align-items: center; margin: 12px 0 0; padding: 14px; border-radius: 22px; border: 1.5px solid rgba(232,195,114,.7); background: linear-gradient(180deg, #0b2363, #071a4f); color: #fff; text-align: left; }
.hm-ring { grid-area: ring; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#f3c45e calc(var(--p) * 1%), rgba(255,255,255,.12) 0); }
.hm-ring b { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #071a4f; font: 700 17px/1 "Golos Text", sans-serif; }
.hm-prog-copy { grid-area: copy; display: grid; gap: 4px; } .hm-prog-copy b { font-size: 17px; } .hm-prog-copy small { color: rgba(255,255,255,.8); font-size: 13.5px; }
.hm-prog-copy .bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.12); overflow: hidden; } .hm-prog-copy .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #8fd3ff, #4f9bff); }
.hm-streak { grid-area: streak; display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid rgba(243,207,127,.18); }
.hm-streak .flame { flex: none; width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(255,140,40,.55)); }
.hm-streak span { display: grid; } .hm-streak b { font-size: 16px; } .hm-streak small { color: rgba(255,255,255,.8); font-size: 13px; }
@media (min-width: 400px) { .hm-progress { grid-template-columns: 74px minmax(0, 1fr) minmax(0, .9fr); grid-template-areas: "ring copy streak"; } .hm-streak { padding: 0 0 0 14px; border-top: 0; border-left: 1px solid rgba(243,207,127,.18); } }
.hm-continue { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 12px 0 0; padding: 12px; border-radius: 22px; border: 1.5px solid rgba(232,195,114,.55); background: rgba(8,22,66,.85); color: #fff; text-align: left; }
.hm-cont-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(160deg, #3d7bff, #1f4fd0); } .hm-cont-ico svg { width: 30px; height: 30px; } .hm-cont-ico svg * { stroke: #fff; }
.hm-cont-copy { display: grid; gap: 2px; min-width: 0; } .hm-cont-copy small { color: rgba(255,255,255,.72); font-size: 12.5px; } .hm-cont-copy small:first-child { color: #f3d898; } .hm-cont-copy b { font-size: 16px; line-height: 1.2; }
.hm-cont-btn { padding: 10px 14px; border-radius: 999px; background: linear-gradient(180deg, #ff7a62, #ec4a3c); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 6px 14px rgba(236,74,60,.35); }
.hm-duo { grid-template-columns: 1fr; margin-top: 12px; }
.hm-duo .half { min-height: 0; padding: 12px 14px; border: 1px solid rgba(243,207,127,.4); }
.hm-duo .countdown.half.empty { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; background: rgba(8,22,66,.8); }
.hm-duo .countdown.half.empty .h-ico { grid-row: 1 / 3; margin: 0; }
.hm-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.hm-more button { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px; border-radius: 16px; border: 1px solid rgba(243,207,127,.35); background: rgba(8,22,66,.82); color: #fff; text-align: left; font: 600 13.5px/1.2 "Golos Text", sans-serif; }
.hm-more-ico { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(243,207,127,.14); color: #f3cf7f; } .hm-more-ico .ui-ico { width: 19px; height: 19px; }
.hm-more b { flex: 1; font-weight: 600; } .hm-more em { font-style: normal; color: #f3d898; font-weight: 700; }
.hm-more button:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 360px) { .hm-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .hm-card { min-height: 160px; padding: 8px 4px 10px; } .hm-card b { font-size: 14.5px; } .hm-card small { font-size: 11px; } .hm-img { height: 62px; } }
@media (min-width: 700px) { .app.is-home .view { max-width: 640px; margin: 0 auto; } }
.app.is-home:has(#view[data-screen="home"]) { background: linear-gradient(180deg, rgba(1,8,34,0) 0, rgba(1,8,34,0) 120px, rgba(1,8,34,.85) 190px, #010822 260px) no-repeat, #010822 url("assets/setup-bg.jpg") center top / 100% auto no-repeat !important; }
.hm-hero::after { display: none; }
.hm-cont-copy small:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-course-photo { min-height: 104px; }
/* ---- serious tone: calm helper, no confetti ---- */
.buddy-confetti { display: none !important; }
.buddy.spin .buddy-pic, .buddy.jump .buddy-pic, .buddy.party .buddy-pic { animation: peekPic 1s ease-out both !important; }
/* coach row on home */
.hm-coach { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) 36px; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 10px 8px 6px; border-radius: 20px; border: 1px solid rgba(243,207,127,.45); background: rgba(8,22,66,.8); color: #fff; text-align: left; }
.hm-coach img { width: 52px; height: 52px; object-fit: contain; }
.hm-coach span { display: grid; gap: 2px; min-width: 0; } .hm-coach small { color: #f3d898; font-size: 12px; } .hm-coach b { font-size: 14px; line-height: 1.3; font-weight: 600; }
.hm-coach i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(243,207,127,.15); border: 1px solid rgba(243,207,127,.5); color: #f3d898; } .hm-coach i .ui-ico { width: 20px; height: 20px; }
.hm-badge { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 3px 8px; border-radius: 999px; background: rgba(1,8,34,.75); border: 1px solid rgba(243,207,127,.55); color: #f3d898; font: 600 10.5px/1.2 "Golos Text", sans-serif; font-style: normal; white-space: nowrap; }
/* mini exam */
.quiz-result { display: grid; justify-items: center; gap: 6px; margin: 8px 0 14px; padding: 22px 16px; border-radius: 22px; border: 1.5px solid rgba(232,195,114,.7); background: linear-gradient(180deg, #0b2363, #071a4f); color: #fff; text-align: center; }
.quiz-result b { font: 700 46px/1 Literata, serif; color: #f3d898; } .quiz-result.all b { color: #7be0b8; } .quiz-result span { font-size: 15px; }
.quiz-wrong { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.quiz-wrong li { padding: 12px 14px; border-radius: 16px; background: rgba(8,22,66,.85); border: 1px solid rgba(243,207,127,.3); color: #fff; }
.quiz-wrong p { margin: 0 0 4px; } .quiz-wrong .bad { color: #ffb4a6; } .quiz-wrong .good { color: #7be0b8; margin: 0; }
.quiz-wrong .q-en { color: #fff !important; font-size: 15px; font-weight: 600; }
/* Mary: drawn orb, merged with greeting */
.hm-coach { display: none; }
.hm-hello.mary { width: 100%; display: grid; grid-template-columns: 70px minmax(0, 1fr) 40px; align-items: center; gap: 12px; margin: 14px 0 0; padding: 10px 12px 10px 10px; border-radius: 22px; border: 1px solid rgba(243,207,127,.45); background: rgba(8,22,66,.78); color: #fff; text-align: left; }
.hm-hello.mary .hm-hello-copy b { font-size: 21px; }
.mary-name { color: #f3d898 !important; font-size: 12px !important; }
.mary-tip { font-size: 14px; line-height: 1.35; color: rgba(255,255,255,.92); }
.mary-play { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(243,207,127,.15); border: 1px solid rgba(243,207,127,.55); color: #f3d898; font-style: normal; } .mary-play .ui-ico { width: 21px; height: 21px; }
.mary-orb { position: relative; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; }
.mary-orb::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, rgba(120,190,255,.45), rgba(120,190,255,0) 70%); animation: orbBreath 4.5s ease-in-out infinite; }
.orb-core { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #ffffff 0, #c9e6ff 10%, #5aa8ff 34%, #2b4fd6 60%, #3a1f9a 82%, #1a0f55 100%); box-shadow: inset 0 0 0 2px rgba(243,207,127,.85), inset -6px -8px 16px rgba(10,0,60,.55), 0 0 18px rgba(90,168,255,.55), 0 0 0 3px rgba(1,8,34,.6); overflow: hidden; }
.orb-core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255,255,255,0) 0 60%, rgba(255,220,140,.35) 70%, rgba(255,255,255,0) 80%); animation: orbSpin 9s linear infinite; }
.orb-wave { position: relative; width: 36px; height: 16px; } .orb-wave path { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.speaking .mary-orb::before { animation-duration: 1.1s; }
.speaking .orb-wave { animation: waveTalk .5s ease-in-out infinite alternate; }
@keyframes orbBreath { 50% { transform: scale(1.08); opacity: .75; } }
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes waveTalk { from { transform: scaleY(.6); } to { transform: scaleY(1.25); } }
@media (prefers-reduced-motion: reduce) { .mary-orb::before, .orb-core::after, .orb-wave { animation: none !important; } }
/* Mary chat */
.mary-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; } .mary-head h1 { margin: 0; text-align: left; } .mary-head h1::after { display: none; } .mary-head p { margin: 2px 0 0; color: rgba(255,255,255,.75); font-size: 14px; }
.mary-chat { display: grid; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px 2px 8px; }
.msg { position: relative; max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; }
.msg p { margin: 0; white-space: pre-wrap; }
.msg.me { justify-self: end; background: linear-gradient(180deg, #2f6bff, #1f4fd0); color: #fff; border-bottom-right-radius: 6px; }
.msg.mary { justify-self: start; background: rgba(8,22,66,.9); border: 1px solid rgba(243,207,127,.4); color: #fff; border-bottom-left-radius: 6px; padding-right: 44px; }
.msg-say { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(243,207,127,.5); background: rgba(243,207,127,.12); color: #f3d898; } .msg-say .ui-ico { width: 16px; height: 16px; }
.msg.typing p { color: rgba(255,255,255,.7); font-style: italic; }
.mary-chips { display: grid; gap: 8px; margin: 8px 0; } .mary-chips button { min-height: 46px; padding: 8px 14px; border-radius: 14px; border: 1px solid rgba(243,207,127,.4); background: rgba(8,22,66,.8); color: #fff; text-align: left; font: 500 14.5px/1.3 "Golos Text", sans-serif; }
.mary-input { display: flex; gap: 8px; margin: 10px 0 6px; } .mary-input input { flex: 1; min-height: 50px; border-radius: 999px; padding: 0 16px; background: rgba(8,22,66,.85); color: #fff; border: 1px solid rgba(243,207,127,.45); font-size: 16px; } .mary-input .btn { min-height: 50px; border-radius: 999px; padding: 0 18px; }
.mary-note { font-size: 12.5px; }
.mary-q { margin-bottom: 10px; }
.mary-play { cursor: pointer; }

/* Mary: talk by voice */
.mary-mic { flex: 0 0 50px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(8,22,66,.85); border: 1px solid rgba(243,207,127,.6); color: #f3cf7f; }
.mary-mic .ui-ico { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.mary-mic.on { background: #f3cf7f; color: #0b1a4a; box-shadow: 0 0 0 6px rgba(243,207,127,.18); }
.mary-talk { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 2px; padding: 8px 14px; border-radius: 999px; background: transparent; border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.85); font-size: 14px; }
.mary-talk .ui-ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.mary-talk[aria-pressed="false"] { opacity: .6; }
.mary-mic-hint { color: #f3cf7f; }

/* Cards v3: calm navy + gold controls around the approved paper card */
.cards3 .cards-count { margin: 0 0 8px; }
.cards3 .cards-count > span { font-size: 14px; color: #f3cf7f !important; letter-spacing: .04em; }
.cards3 .cards-count .progress { height: 4px; background: rgba(255,255,255,.12); }
.cards3 .cards-count .progress span { background: linear-gradient(90deg, #c99a45, #f3cf7f); box-shadow: none; }
.cards3 .chip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; overflow: visible; }
.cards3 .fchip { min-height: 34px; padding: 0 6px; font-size: 13px; background: rgba(8,22,66,.7); border: 1px solid rgba(243,207,127,.28); color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: none; }
.cards3 .fchip.on { background: rgba(243,207,127,.14); border-color: #f3cf7f; color: #f3cf7f; box-shadow: none; }
.cards3 .face-top .fav-btn { right: 14px; top: 10px; width: 34px; height: 34px; font-size: 18px; background: rgba(255,250,235,.95); border: 1px solid rgba(168,120,44,.45); color: #a8782c; }
.cards3 .face .btn-line[data-act="flip"] { background: #0f2257; color: #fff; border: 1.5px solid #d7b06a; box-shadow: 0 6px 14px rgba(15,34,87,.25); }
.cards3 .face .btn-line[data-act="flip"]::before { color: #f3cf7f; }
.cards3 .face .btn-aqua { background: transparent !important; color: #0f2257 !important; border: 1.5px solid rgba(15,34,87,.35) !important; box-shadow: none !important; min-height: 40px; font-size: 14px; }
.cards3 .face .btn-quiet { color: #0f2257; }
.cards3-nav { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 10px; margin: 6px 0 8px; }
.cards3-nav .grade-row.big { margin: 0; gap: 10px; }
.cards3-nav .grade-row.big .btn-again, .cards3-nav .grade-row.big .btn-green { min-height: 60px; border-radius: 18px; display: flex; flex-direction: row; gap: 8px; font-size: 15.5px; font-weight: 700; color: #fff; background: rgba(8,22,66,.9); border: 1px solid rgba(243,207,127,.35); box-shadow: none; }
.cards3-nav .grade-row.big .btn-green { border-color: #d7b06a; background: linear-gradient(180deg, #13296a, #0b1a4a); }
.cards3-nav .grade-row.big .btn-again::before, .cards3-nav .grade-row.big .btn-green::before { width: 24px; height: 24px; font-size: 13px; background: transparent; border: 1.5px solid currentColor; }
.cards3-nav .grade-row.big .btn-again::before { content: "\21BB"; color: rgba(255,255,255,.8); }
.cards3-nav .grade-row.big .btn-green::before { content: "\2713"; color: #f3cf7f; border-color: #f3cf7f; }
.cards3-nav .pager-btn, .app.is-cards .cards3-nav .pager-btn:not(.next) { width: 46px; height: 46px; font-size: 26px; background: rgba(8,22,66,.9); color: #f3cf7f; border: 1px solid rgba(243,207,127,.45); box-shadow: none; }
.cards3 .screen-title { text-align: center; margin-bottom: 4px; }
.cards3 .face-top .fav-btn { top: -8px; right: 20px; width: 30px; height: 30px; font-size: 16px; }
.cards3-nav { grid-template-columns: 40px 1fr 40px; gap: 8px; }
.cards3-nav .pager-btn, .app.is-cards .cards3-nav .pager-btn:not(.next) { width: 40px; height: 40px; font-size: 24px; padding-bottom: 3px; }
.cards3-nav .grade-row.big { gap: 8px; }
.cards3-nav .grade-row.big .btn-again, .cards3-nav .grade-row.big .btn-green { min-height: 56px; padding: 0 8px; font-size: 15px; white-space: nowrap; }
.cards3-nav .grade-row.big .btn-again::before, .cards3-nav .grade-row.big .btn-green::before { flex: none; width: 22px; height: 22px; font-size: 12px; }
.cards3 .card-stage:has(.flip.on), .cards3 .flip.on { min-height: 425px !important; }
.cards3 .face.back { gap: 2px; }
.cards3 .face.back .q-en { font-size: 26px; margin: 8px 0 4px; }
.cards3 .face.back .btn-line[data-act="play-a"] { align-self: center; min-height: 40px; padding: 0 18px; font-size: 14px; background: transparent; color: #0f2257; border: 1.5px solid rgba(15,34,87,.35); box-shadow: none; }
.cards3 .face.back .btn-line[data-act="play-a"]::before { content: "\1F50A\FE0E"; margin-right: 6px; font-size: 13px; }
.cards3 .face.back .btn-quiet[data-act="flip"] { align-self: center; min-height: 38px; font-size: 14px; background: transparent; border: 0; color: #a8782c; text-decoration: underline; text-underline-offset: 3px; }

/* Premium grade buttons: deep emerald (know) and deep garnet (study again), gold hairline */
.cards3-nav .grade-row.big .btn-green { background: linear-gradient(180deg, #11795f 0%, #0a5442 100%); border: 1px solid rgba(243,207,127,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 18px rgba(6,60,46,.45); color: #fff; }
.cards3-nav .grade-row.big .btn-again { background: linear-gradient(180deg, #a3283b 0%, #6f1626 100%); border: 1px solid rgba(243,207,127,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 18px rgba(80,12,26,.45); color: #fff; }
.cards3-nav .grade-row.big .btn-green::before { color: #f3cf7f; border-color: #f3cf7f; }
.cards3-nav .grade-row.big .btn-again::before { color: #fff; border-color: rgba(255,255,255,.75); }
.iv-grade .btn-green { background: linear-gradient(180deg, #11795f, #0a5442) !important; border: 1px solid rgba(243,207,127,.55) !important; box-shadow: 0 8px 18px rgba(6,60,46,.35) !important; }
.iv-grade .btn-again { background: linear-gradient(180deg, #a3283b, #6f1626) !important; border: 1px solid rgba(243,207,127,.45) !important; box-shadow: 0 8px 18px rgba(80,12,26,.35) !important; }
.iv-grade { margin: 12px 0; }
/* Interview additions */
.iv-jump { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
.iv-jump label { font-size: 14px; opacity: .85; }
.iv-jump select { min-height: 40px; border-radius: 12px; padding: 0 10px; font-size: 15px; }
.iv-exam-bar { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 10px 0; font-weight: 700; font-size: 15px; }
.iv-exam-bar .right { color: #2fbf95; } .iv-exam-bar .wrong { color: #e0566a; }
.iv-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iv-uscis { text-align: center; margin: 14px 0 4px; font-size: 14px; }
.iv-uscis a { color: #f3cf7f; text-underline-offset: 3px; }
.iv-start { text-align: center; }
.iv-start .lede { margin: 8px 0 14px; }
/* Car additions */
.car-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.car-mini { min-height: 46px; border-radius: 14px; font-weight: 700; font-size: 15px; color: #fff; background: rgba(8,22,66,.85); border: 1px solid rgba(243,207,127,.35); }
.car-mini.stop { color: #f3cf7f; }
.car-mini:disabled { opacity: .45; }
.car-resume { width: 100%; display: grid; gap: 2px; justify-items: center; min-height: 58px; margin: 0 0 12px; border-radius: 16px; color: #fff; background: linear-gradient(180deg, #13296a, #0b1a4a); border: 1px solid #d7b06a; }
.car-resume b { font-size: 15.5px; } .car-resume span { font-size: 13px; color: #f3cf7f; }
.stack-btns .iv-nav { grid-column: 1 / -1; }
.iv-nav .btn-line { min-height: 48px; font-size: 14.5px; white-space: nowrap; padding: 0 10px; }
.iv-jump label { flex: 1; color: rgba(255,255,255,.8); }
.iv-jump select { flex: 0 0 120px; background: rgba(8,22,66,.9); color: #fff; border: 1px solid rgba(243,207,127,.5); }
.view .iv-jump select#ivJump { background: #0b1a4a !important; color: #fff !important; -webkit-text-fill-color: #fff; border: 1px solid rgba(243,207,127,.55) !important; }
.view .iv-jump select#ivJump option { color: #0b1a4a; }
.iv-nav { min-width: 0; } .iv-nav .btn-line { min-width: 0; white-space: normal; line-height: 1.15; font-size: 14px; }

/* ===== Home v3: depth, one gold primary action, Mary as the living entry to AI ===== */
.app.is-home { --m-night: #070E26; --m-navy: #0E1D4A; --m-raised: #16295F; --m-gold: #E2BC72; --m-gold-deep: #A9802F; --m-ivory: #F4EEDF; }
/* Mary card: the one bold element */
.hm-hello.mary.m3 { grid-template-columns: 76px minmax(0,1fr); grid-template-rows: auto auto; row-gap: 10px; padding: 14px 14px 12px; border: 1px solid rgba(226,188,114,.6); background: radial-gradient(120% 140% at 0% 0%, #1f3d8f 0%, #10225a 45%, #0a1846 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 30px rgba(0,0,0,.45); }
.m3-orb { grid-row: 1; padding: 0; border: 0; background: none; border-radius: 50%; }
.m3 .mary-orb { width: 72px; height: 72px; }
.m3 .mary-orb::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(226,188,114,.55); animation: m3breathe 3.6s ease-in-out infinite; pointer-events: none; }
.m3 .mary-orb { position: relative; }
@keyframes m3breathe { 0%,100% { transform: scale(.96); opacity: .35; } 50% { transform: scale(1.06); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .m3 .mary-orb::after { animation: none; opacity: .6; } }
.m3 .hm-hello-copy { grid-row: 1; }
.m3 .mary-tip { color: var(--m-ivory); }
.m3-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 46px; gap: 10px; }
.m3-ask { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 14px; border: 1px solid rgba(226,188,114,.85); background: linear-gradient(180deg, #f3d48b 0%, #d9a94f 100%); color: #1a1405; font: 700 15.5px/1 "Golos Text", sans-serif; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 18px rgba(169,128,47,.35); }
.m3-ask .ui-ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.m3 .mary-play { position: static; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; border: 1px solid rgba(226,188,114,.55); background: var(--m-raised); color: var(--m-gold); }
.m3 .mary-play .ui-ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
/* Course card: secondary actions are navy with a gold hairline */
.app.is-home .hm-pill, .app.is-home .hm-pill.gold { background: var(--m-raised); color: #fff; border: 1px solid rgba(226,188,114,.75); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.app.is-home .hm-pill.gold { color: var(--m-gold); }
.app.is-home .hm-course { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 14px 28px rgba(0,0,0,.4); }
/* Continue: the single gold primary action */
.app.is-home .hm-continue { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 12px 26px rgba(0,0,0,.4); }
.app.is-home .hm-cont-btn { background: linear-gradient(180deg, #f3d48b 0%, #d9a94f 100%); color: #1a1405; border: 1px solid rgba(255,236,180,.8); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(169,128,47,.4); }
/* Feature cards: three-level depth instead of flat black */
.app.is-home .hm-card { border: 1px solid rgba(226,188,114,.6); background: linear-gradient(180deg, #1d3a85 0%, #13296a 48%, #0d1f55 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 14px 26px rgba(0,0,0,.42); }
.app.is-home .hm-card .hm-img { filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)) brightness(1.06); }
.app.is-home .hm-card small { color: rgba(244,238,223,.82); }
.app.is-home .hm-go { background: linear-gradient(180deg, #f3d48b, #d9a94f); color: #1a1405; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.app.is-home .hm-badge { border: 1px solid rgba(226,188,114,.6); background: rgba(7,14,38,.75); color: var(--m-gold); }
.app.is-home .hm-progress { background: linear-gradient(180deg, #172f72 0%, #0f2259 100%); border: 1px solid rgba(226,188,114,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 24px rgba(0,0,0,.38); }
.app.is-home .countdown { border: 1px solid rgba(226,188,114,.45); background: linear-gradient(180deg, #142a68, #0e2057); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
/* More practice: one grouped list, like iOS settings */
.m3-title { font: 600 20px/1.2 Literata, Georgia, serif; color: var(--m-gold); letter-spacing: .01em; margin: 22px 2px 10px; text-transform: none; }
.hm-more.m3-list { display: block; border-radius: 20px; border: 1px solid rgba(226,188,114,.5); background: linear-gradient(180deg, #13296a, #0d1f55); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 24px rgba(0,0,0,.38); }
.hm-more.m3-list button { width: 100%; min-height: 58px; padding: 10px 16px; border: 0; border-radius: 0; background: transparent; font-size: 15.5px; }
.hm-more.m3-list button + button { border-top: 1px solid rgba(226,188,114,.18); }
.hm-more.m3-list button::after { content: "›"; color: rgba(226,188,114,.7); font-size: 22px; margin-left: 6px; }
.hm-more.m3-list .hm-more-ico { width: 34px; height: 34px; border-radius: 50%; background: rgba(226,188,114,.12); border: 1px solid rgba(226,188,114,.45); }
.hm-more.m3-list em { min-width: 34px; padding: 3px 9px; border-radius: 999px; text-align: center; font-size: 13px; background: rgba(226,188,114,.16); border: 1px solid rgba(226,188,114,.5); color: var(--m-gold); }
.app.is-home .hm-cont-btn { padding: 10px 12px; font-size: 13.5px; }
.app.is-home .hm-cont-copy small:first-child { white-space: nowrap; overflow: visible; }
.app.is-home .hm-cont-ico { background: linear-gradient(180deg, #1d3a85, #13296a) !important; border: 1px solid rgba(226,188,114,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.app.is-home .hm-cont-ico svg, .app.is-home .hm-cont-ico .ui-ico { color: #E2BC72; stroke: #E2BC72; }
.app.is-home .hm-cont-ico svg * { stroke: #E2BC72 !important; }

/* Mary as a voice call: big living orb, state line, gold mic dock */
.mary-stage { display: grid; justify-items: center; text-align: center; margin: 0 0 10px; }
.ms-orb { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin: 4px 0 8px; }
.ms-orb .mary-orb { width: 116px; height: 116px; position: relative; z-index: 1; }
.ms-orb .orb-wave { width: 56%; }
.ms-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(226,188,114,.55); opacity: .5; }
.ms-ring.b { inset: -12px; border-color: rgba(226,188,114,.28); }
.mary-stage.idle .ms-ring.a { animation: m3breathe 3.6s ease-in-out infinite; }
.mary-stage.speaking .ms-ring, .mary-stage.listening .ms-ring { animation: msPulse 1.1s ease-out infinite; }
.mary-stage.speaking .ms-ring.b, .mary-stage.listening .ms-ring.b { animation-delay: .35s; }
.mary-stage.thinking .ms-ring.a { border-style: dashed; animation: msSpin 2.4s linear infinite; }
.mary-stage.listening .ms-ring { border-color: rgba(255,255,255,.75); }
@keyframes msPulse { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes msSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ms-ring { animation: none !important; } }
.mary-stage h1 { margin: 0; font-size: 30px; } .mary-stage h1::after { display: none; }
.ms-role { margin: 2px 0 0; color: rgba(244,238,223,.75); font-size: 14px; }
.ms-state { margin: 8px 0 0; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(226,188,114,.45); color: #E2BC72; font-size: 13px; font-weight: 600; }
.ms-warn { margin: 8px 0 0; color: #ffb4a8; font-size: 13px; }
.ms-dock { display: grid; justify-items: center; gap: 6px; margin: 12px 0 6px; }
.ms-dock span { font-size: 13.5px; color: rgba(244,238,223,.8); }
.mary-mic.big { width: 76px; height: 76px; flex: none; background: linear-gradient(180deg, #f3d48b, #d9a94f); color: #1a1405; border: 1px solid rgba(255,236,180,.85); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 10px 24px rgba(169,128,47,.45); }
.mary-mic.big .ui-ico { width: 32px; height: 32px; stroke-width: 2; }
.mary-mic.big.on { background: #fff; box-shadow: 0 0 0 10px rgba(226,188,114,.2), 0 10px 24px rgba(169,128,47,.45); }
.mary-input .mary-mic:not(.big) { display: none; }
.mary-chat { max-height: 38vh; }

/* ===== Lessons as the citizen's passport ===== */
.pp-cover, .pp-page { position: relative; color: #1b2a55; border-radius: 18px; border: 1px solid #b8924f;
  background:
    repeating-radial-gradient(circle at 50% 0%, rgba(169,128,47,.09) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #f6efdc 0%, #ecdfc2 100%);
  box-shadow: inset 0 0 0 5px #f6efdc, inset 0 0 0 6px rgba(169,128,47,.5), 0 16px 30px rgba(0,0,0,.42); }
.pp-cover { text-align: center; padding: 18px 18px 16px; margin: 4px 0 16px; }
.pp-country { margin: 0; font: 600 11px/1 Literata, Georgia, serif; letter-spacing: .14em; color: #8a6a2c; }
.pp-crest { display: block; width: 70px; height: 70px; margin: 10px auto 4px; filter: grayscale(1) sepia(.85) saturate(1.6) hue-rotate(-8deg) brightness(.92); mix-blend-mode: multiply; opacity: .9; }
.pp-cover h1 { margin: 0; font: 600 30px/1.1 Literata, Georgia, serif !important; color: #13245a !important; }
.pp-cover h1::after { display: none !important; }
.pp-cover-stats { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0 6px; font-size: 13px; color: #5b5236; }
.pp-cover-stats b { color: #8b2232; }
.pp-bar { height: 6px; border-radius: 999px; background: rgba(169,128,47,.2); overflow: hidden; }
.pp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b8862c, #e2bc72); }
.pp-go { width: 100%; min-height: 50px; margin-top: 14px; border-radius: 14px; border: 1px solid rgba(255,236,180,.9); background: linear-gradient(180deg, #f3d48b, #d9a94f); color: #1a1405; font: 700 16px/1 "Golos Text", sans-serif; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(169,128,47,.35); }
.pp-page { padding: 16px 12px 8px; margin: 0 0 16px; }
.pp-page h2 { margin: 0 6px; font: 600 21px/1.2 Literata, Georgia, serif; color: #13245a; }
.pp-page-sub { margin: 2px 6px 8px; font-size: 12.5px; color: #8a6a2c; }
.pp-row { width: 100%; display: grid; grid-template-columns: 56px minmax(0,1fr) 28px; align-items: center; gap: 12px; padding: 10px 6px; border: 0; border-top: 1px dashed rgba(169,128,47,.45); background: transparent; color: inherit; text-align: left; }
.pp-seal { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed rgba(169,128,47,.6); }
.pp-seal img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; filter: grayscale(.85) sepia(.35) opacity(.6); }
.pp-seal em { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; font: 700 11px/1 "Golos Text", sans-serif; font-style: normal; background: #13245a; color: #f6efdc; border: 1.5px solid #f6efdc; }
.pp-row-copy b { display: block; font: 600 16.5px/1.25 "Golos Text", sans-serif; color: #13245a; }
.pp-row-copy small { display: block; margin-top: 3px; font-size: 13.5px; color: #6b5e3c; }
.pp-arrow { font-style: normal; font-size: 24px; color: rgba(169,128,47,.8); }
.pp-ink { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
.pp-row.done .pp-seal, .pp-row.gold .pp-seal { border-style: solid; }
.pp-row.done .pp-seal img, .pp-row.gold .pp-seal img, .pp-row.now .pp-seal img, .pp-row.going .pp-seal img { filter: none; }
.pp-row.done .pp-seal { border-color: #8b2232; box-shadow: 0 0 0 3px rgba(139,34,50,.12); }
.pp-row.done .pp-ink { color: #8b2232; border: 1.5px solid #8b2232; transform: rotate(-10deg); }
.pp-row.done small { color: #8b2232; }
.pp-row.gold .pp-seal { border-color: #b8862c; box-shadow: 0 0 0 3px rgba(226,188,114,.35); }
.pp-row.gold .pp-ink { color: #fff; background: radial-gradient(circle at 35% 30%, #f3d48b, #b8862c); }
.pp-row.gold small { color: #8a6a2c; font-weight: 700; }
.pp-row.now { margin: 2px 0; border-top-color: transparent; border-radius: 14px; background: rgba(226,188,114,.22); box-shadow: inset 0 0 0 1.5px #b8924f; }
.pp-row.now small { color: #13245a; font-weight: 700; }
.pp-row.now .pp-seal { border: 2px solid #b8924f; }
.pp-row.todo .pp-row-copy b { color: #3f4a6b; }
.pp-page .pp-row:first-of-type { border-top-color: transparent; }

/* ===== Test v3: paper question, calm score bar, navy+gold options ===== */
.t3-bar { display: flex; align-items: center; gap: 12px; margin: 6px 2px 8px; font-size: 14.5px; color: rgba(244,238,223,.85); }
.t3-bar b { color: #fff; } .t3-bar .right { color: #3fcf9f; font-weight: 700; } .t3-bar .wrong { color: #ef6b7d; font-weight: 700; }
.t3-bar .pass { margin-left: auto; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(226,188,114,.5); color: #E2BC72; font-size: 12.5px; }
.t3-progress { height: 4px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; margin: 0 0 14px; }
.t3-progress i { display: block; height: 100%; background: linear-gradient(90deg, #b8862c, #E2BC72); }
.t3 .t3-paper { color: #13245a; border: 1px solid #b8924f; border-radius: 18px;
  background: repeating-radial-gradient(circle at 50% 0%, rgba(169,128,47,.08) 0 1px, transparent 1px 8px), linear-gradient(180deg, #f6efdc, #ecdfc2);
  box-shadow: inset 0 0 0 5px #f6efdc, inset 0 0 0 6px rgba(169,128,47,.45), 0 14px 28px rgba(0,0,0,.4); }
.t3 .t3-paper .q-num { color: #8a6a2c; background: none; padding: 0; }
.t3 .t3-paper .q-en { color: #13245a; font-family: Literata, Georgia, serif; font-size: 24px; line-height: 1.2; }
.t3 .t3-paper .q-ru, .t3 .t3-paper .translation, .t3 .t3-paper p:not(.q-num):not(.q-en) { color: #4b4630; }
.t3 .t3-paper .hint { color: #8a7b55; }
.t3 .t3-paper .btn-aqua, .t3 .t3-paper .btn-line { background: transparent !important; color: #13245a !important; border: 1.5px solid rgba(19,36,90,.35) !important; box-shadow: none !important; min-height: 42px; }
.t3 .abcd button { background: linear-gradient(180deg, #16295f, #0f2055); color: #fff; border: 1px solid rgba(226,188,114,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 14px rgba(0,0,0,.3); }
.t3 .abcd i { background: transparent; color: #E2BC72; border: 1.5px solid #E2BC72; border-radius: 50%; font-family: Literata, Georgia, serif; }
.t3 .abcd .right { background: linear-gradient(180deg, #11795f, #0a5442); border-color: rgba(243,207,127,.6); }
.t3 .abcd .right i { background: #f3d48b; color: #0a5442; border-color: #f3d48b; } .t3 .abcd .right b { background: #f3d48b; color: #0a5442; }
.t3 .abcd .wrong { background: linear-gradient(180deg, #a3283b, #6f1626); border-color: rgba(243,207,127,.45); }
.t3 .abcd .wrong i { background: #fff; color: #8b2232; border-color: #fff; } .t3 .abcd .wrong b { background: #fff; color: #8b2232; }
.t3 .abcd .dim { opacity: .45; }
.t3 .test-more { color: #f4eedf; }
.t3 .btn.cta { background: linear-gradient(180deg, #f3d48b, #d9a94f) !important; color: #1a1405 !important; border: 1px solid rgba(255,236,180,.85); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(169,128,47,.35) !important; }
.t3-stamp { width: 112px; height: 112px; margin: 4px auto 12px; border-radius: 50%; display: grid; place-content: center; transform: rotate(-8deg); border: 3px double #8b2232; color: #8b2232; box-shadow: inset 0 0 0 6px rgba(139,34,50,.08); }
.test-done.pass .t3-stamp { border-color: #a9802f; color: #a9802f; box-shadow: inset 0 0 0 6px rgba(226,188,114,.2); }
.t3-stamp b { font: 700 38px/1 Literata, Georgia, serif; } .t3-stamp small { font-size: 13px; }
.t3 .test-done h2 { color: #13245a; font-family: Literata, Georgia, serif; }
.t3 .test-done .test-score span { background: rgba(255,255,255,.55); color: #13245a; border-color: rgba(169,128,47,.4); }
.t3 .test-done .btn { background: linear-gradient(180deg, #f3d48b, #d9a94f); color: #1a1405; border: 1px solid rgba(255,236,180,.85); }
.t3 > h1 { text-align: center; }
.view .t3 .panel.t3-paper { background: repeating-radial-gradient(circle at 50% 0%, rgba(169,128,47,.08) 0 1px, transparent 1px 8px), linear-gradient(180deg, #f6efdc, #ecdfc2) !important; border: 1px solid #b8924f !important; color: #13245a !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.view .t3 .panel.t3-paper .q-en { color: #13245a !important; }
.view .t3 .panel.t3-paper .hint { color: #8a7b55 !important; }
.view .t3 .panel.t3-paper .btn-aqua, .view .t3 .panel.t3-paper .btn-line { color: #13245a !important; }
.view .t3 .test-done h2 { color: #13245a !important; }
.view .t3 details.test-more { background: rgba(8,22,66,.85); border: 1px solid rgba(226,188,114,.4); }
.view .t3 .panel.t3-paper .q-ru { color: #3d4566 !important; font-size: 16px; }

/* Touch: let horizontal swipes reach the card, keep vertical scroll */
.card-stage .flip, .card-stage .face { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Status line: quiet, centered, never a stray blue line */
.cards3 #liveNote, .t3 #liveNote { text-align: center; color: rgba(226,188,114,.8) !important; font-size: 13px; min-height: 18px; margin: 4px 0 0; }
/* Breathing room */
.cards3-nav { margin-top: 16px; }
.t3 .abcd { gap: 12px; margin: 16px 0; }
.t3 .abcd button { min-height: 64px; padding: 12px 16px 12px 12px; }
.t3 .t3-paper { padding: 20px 20px 18px !important; margin-bottom: 4px; }
.t3 .t3-paper .tools { margin-top: 12px; gap: 10px; }
.view .t3 .t3-answer { margin: 4px 0 14px; }
.view .t3 .t3-answer .q-num { color: #8a6a2c !important; letter-spacing: .06em; }
.view .t3 .t3-answer .q-en { font-size: 26px !important; margin: 4px 0 8px; }
.view .t3 .t3-answer p { color: #3d4566 !important; }
.app.is-home .hm-streak small, .app.is-home .hm-streak span { white-space: normal; }

/* Bottom panel (the version she liked): lit navy with a gold top line */
.app:not(.is-welcome) #tabbar, .app:has(#view[data-screen="home"]) #tabbar { background: rgba(14,34,92,.94) !important; border-top: 1px solid rgba(226,188,114,.3) !important; }

/* One card colour everywhere, a little darker, gold hairline */
.app { --card-one: linear-gradient(180deg, #132a63 0%, #0e1f50 100%); }
.app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown, .hm-more.m3-list, .app.is-home .hm-continue, .app.is-home .hm-course, .hm-hello.mary.m3,
.view .t3 .abcd button:not(.right):not(.wrong), .cards3-nav .pager-btn, .car-mini, .car-resume, .iv-nav .btn-line, .stack-btns .btn-line,
[data-screen="car"] .panel, .car-settings, .car-now, .mary-chat .msg.mary, .mary-chips button, .pp-none, .cards3 .fchip:not(.on) { background: var(--card-one) !important; border-color: rgba(226,188,114,.5) !important; }

/* Inner screens: the same navy as the lower part of Home, no photo (the photo stays on Home only) */
.app:not(.is-welcome):not(.is-home) { background: #010822 !important; }
/* Language picker with flag everywhere */
.head-side .lang-drop { height: 38px; padding: 0 12px 0 10px; color: #fff; border: 1px solid rgba(226,188,114,.45); background: rgba(8,24,64,.55); }
/* Card filters: one neat segmented control */
.cards3 .chip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 3px; margin: 2px 0 12px; border-radius: 999px; background: rgba(8,22,66,.75); border: 1px solid rgba(226,188,114,.4); }
.cards3 .fchip, .cards3 .fchip:not(.on) { min-height: 32px; padding: 0 6px; border: 0 !important; border-radius: 999px; background: transparent !important; color: rgba(244,238,223,.78); font: 600 12.5px/1 "Golos Text", sans-serif; box-shadow: none; }
.cards3 .fchip.on { background: linear-gradient(180deg, #f3d48b, #d9a94f) !important; color: #1a1405 !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.cards3 .cards-count > span { font-size: 13px; }


/* "Show the accepted answer" on the card: a neat pill, not a heavy stripe */
.view .cards3 .face .face-foot { display: flex; justify-content: center; }
.view .cards3 .face .btn-line[data-act="flip"] { width: auto !important; min-height: 38px !important; padding: 0 18px !important; border-radius: 999px; background: transparent !important; color: #13245a !important; border: 1.5px solid #b8924f !important; box-shadow: none !important; font: 600 14px/1 "Golos Text", sans-serif !important; }
.view .cards3 .face .btn-line[data-act="flip"]::before { color: #a9802f; margin-right: 6px; }

/* "Study again" / wrong back to the coral she liked */
.cards3-nav .grade-row.big .btn-again { background: linear-gradient(180deg, var(--coral), var(--coral-2)) !important; border: 1px solid rgba(243,207,127,.45) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 18px rgba(236,74,60,.35) !important; }
.iv-grade .btn-again { background: linear-gradient(180deg, var(--coral), var(--coral-2)) !important; box-shadow: 0 8px 18px rgba(236,74,60,.3) !important; }
.view .t3 .abcd .wrong, .t3 .abcd .wrong { background: linear-gradient(180deg, var(--coral), var(--coral-2)) !important; border-color: rgba(243,207,127,.45) !important; }
.t3 .abcd .wrong i, .t3 .abcd .wrong b { color: var(--coral-2) !important; }

/* Test start: the navy look she liked (from the old night view), white stat boxes, coral start; title readable */
.view .panel.test-start { background: #101c3a !important; color: #e8eefc !important; border: 1px solid rgba(255,255,255,.08) !important; box-shadow: 0 8px 22px rgba(0,0,0,.4) !important; }
.view .panel.test-start h2 { color: #fff !important; }

/* ===== Redesign pass: one colour system, paper for study content, calmer controls, signature stamp ===== */
/* Five tabs, active tab = gold icon and label with a thin gold bar (no solid plaque) */
.tabs { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.tabs button { position: relative; }
.tabs button.on { color: #f3cf7f !important; background: transparent !important; box-shadow: none !important; }
.tabs button.on .feat-ico path, .tabs button.on .feat-ico rect, .tabs button.on .feat-ico circle { stroke: #f3cf7f !important; }
.tabs button.on .feat-ico .fill { fill: #f3cf7f !important; }
.tabs button.on::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #f6dc9a, #d9a94f); box-shadow: 0 0 14px rgba(243,207,127,.7); }
.tabs button.on::after { content: ""; position: absolute; inset: 4px 10% auto; height: 70%; border-radius: 50%; background: radial-gradient(closest-side, rgba(243,207,127,.18), transparent); pointer-events: none; }

/* Exam switch: Test | Interview */
.exam-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 2px auto 14px; max-width: 320px; border-radius: 999px; background: rgba(8,22,66,.7); border: 1px solid rgba(226,188,114,.35); }
.exam-switch button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.78); font: 700 14.5px/1 "Golos Text", sans-serif; }
.exam-switch button.on { color: #1a1405; background: linear-gradient(180deg, #f6dc9a, #d9a94f); box-shadow: 0 6px 16px rgba(217,169,79,.35); }

/* No bright blue: segmented controls, chips and helper buttons use gold */
.seg { background: rgba(8,22,66,.7) !important; border-color: rgba(226,188,114,.35) !important; }
.seg .choice.on, .fchip.on { color: #1a1405 !important; background: linear-gradient(180deg, #f6dc9a, #d9a94f) !important; box-shadow: 0 6px 16px rgba(217,169,79,.3) !important; }
.iv-btn, .iv-btn:first-child { background: rgba(8,22,66,.85) !important; border: 1px solid rgba(226,188,114,.45) !important; box-shadow: none !important; color: #fff !important; }
.iv-btn svg { stroke: #f3cf7f !important; } .iv-btn:last-child svg { fill: #f3cf7f !important; stroke: none !important; }
.view > .stack-btns .btn-aqua, .grade-row .btn-aqua { background: rgba(8,22,66,.85) !important; color: #fff !important; border: 1px solid rgba(226,188,114,.45) !important; box-shadow: none !important; }
.lesson.going .lesson-no, .today-ico { background: linear-gradient(160deg, #f6dc9a, #d9a94f) !important; color: #1a1405 !important; }

/* Interview: the question sits on paper, one main button, quiet helpers */
[data-screen="interview"] .officer-card .bubble { background: linear-gradient(180deg, #fbf4e2, #f1e4c4) !important; border: 1px solid rgba(168,120,44,.45) !important; box-shadow: 0 10px 24px rgba(0,0,0,.4) !important; }
[data-screen="interview"] .officer-card .bubble .q-en { color: #14285a !important; font-family: Literata, Georgia, serif !important; font-weight: 700; }
[data-screen="interview"] .officer-card .bubble .q-ru, [data-screen="interview"] .officer-card .bubble small { color: #5a4a2a !important; }
[data-screen="interview"] > .lede { font-size: 13px !important; opacity: .7; margin-bottom: 10px !important; }
.iv-main { gap: 10px !important; }
.iv-main .iv-nav .btn-line { min-height: 46px; font-size: 14.5px; background: transparent !important; border: 1px solid rgba(226,188,114,.45) !important; }
.iv-main .iv-ai { font-size: 14px; color: #f3cf7f !important; }

/* In the car: the question on paper, readable settings */
[data-screen="car"] .car-now { background: linear-gradient(180deg, #fbf4e2, #f1e4c4) !important; border: 1px solid rgba(168,120,44,.45) !important; }
[data-screen="car"] .car-now h2 { color: #14285a !important; font-family: Literata, Georgia, serif !important; }
[data-screen="car"] .car-now .q-num, [data-screen="car"] .car-now .car-voice { color: #8a6424 !important; }
[data-screen="car"] .car-now .progress { background: rgba(20,40,90,.12) !important; }
[data-screen="car"] .car-now .progress span { background: linear-gradient(90deg, #d9a94f, #b8852e) !important; }
.car-settings label { color: #e8d6a8 !important; font-weight: 600; opacity: 1 !important; }
.car-mini:disabled { opacity: .35; }

/* Bigger arrows next to the card buttons (easier for a thumb) */
.cards3-nav .pager-btn { width: 46px !important; height: 46px !important; font-size: 26px !important; }

/* Same serif for screen titles everywhere, like the paper pages */
.view > h1, .view .screen-title, .t3 h1, .cards3 h1 { font-family: Literata, Georgia, serif !important; letter-spacing: -.01em; }

/* Signature: a gold stamp lands on the card — "Learned" or "Review" */
.card-stage { position: relative; }
.seal-stamp { position: absolute; left: 50%; top: 42%; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font: 800 22px/1 Literata, Georgia, serif; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(1.6); transition: opacity .18s ease, transform .22s cubic-bezier(.2,1.4,.4,1); }
.seal-stamp i { font-style: normal; font-size: 18px; }
.seal-stamp.s-know { color: #0f8f73; border: 3px double #0f8f73; background: rgba(240,255,248,.88); box-shadow: 0 0 0 4px rgba(15,143,115,.12); }
.seal-stamp.s-again { color: #d94a3a; border: 3px double #d94a3a; background: rgba(255,244,240,.9); box-shadow: 0 0 0 4px rgba(217,74,58,.12); transform: translate(-50%, -50%) rotate(10deg) scale(1.6); }
.card-stage.lean-know .s-know, .card-stage.stamp-know .s-know { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
.card-stage.lean-again .s-again, .card-stage.stamp-again .s-again { opacity: 1; transform: translate(-50%, -50%) rotate(10deg) scale(1); }
@media (prefers-reduced-motion: reduce) { .seal-stamp { transition: none; } }
/* Home: one solid gold action (Continue); Ask Mary becomes a gold-outline secondary */
.hm-hello.m3 .m3-ask { background: rgba(8,22,66,.6) !important; color: #f3cf7f !important; border: 1px solid rgba(243,207,127,.75) !important; box-shadow: none !important; }
.hm-hello.m3 .m3-ask svg, .hm-hello.m3 .m3-ask .ui-ico { color: #f3cf7f !important; stroke: #f3cf7f !important; }
.hm-continue { box-shadow: 0 0 0 1px rgba(243,207,127,.55), 0 14px 30px rgba(0,0,0,.5), 0 0 34px rgba(243,207,127,.12) !important; }
/* Car: gold play disc instead of bright blue */
.car-play.round .disc { background: radial-gradient(circle at 40% 28%, #fff1c8, #f0c76e 45%, #b8852e 100%) !important; box-shadow: inset 0 3px 0 rgba(255,255,255,.6), 0 16px 34px rgba(184,133,46,.45) !important; }
.car-play.round .disc i { border-left-color: #1a1405 !important; filter: none !important; }
.car-play.round.on .disc i { background: linear-gradient(90deg, #1a1405 0 36%, transparent 36% 64%, #1a1405 64%) !important; }
.car-play.round .glow { background: radial-gradient(circle, rgba(243,207,127,.4), rgba(243,207,127,0) 70%) !important; }
/* Exam switch reads as tabs (text + gold underline), so it doesn't look like a second segmented control */
.exam-switch { background: transparent !important; border: 0 !important; border-bottom: 1px solid rgba(226,188,114,.22) !important; border-radius: 0 !important; padding: 0 !important; max-width: none !important; margin: 0 0 14px !important; }
.exam-switch button { border-radius: 0 !important; min-height: 42px; font-size: 15px; color: rgba(255,255,255,.6) !important; background: transparent !important; box-shadow: none !important; position: relative; }
.exam-switch button.on { color: #f3cf7f !important; }
.exam-switch button.on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #f6dc9a, #d9a94f); }
/* Interview: the main button spans the full width */
.iv-main > .btn.wide { width: 100% !important; }
.stack-btns.iv-main { display: flex !important; flex-direction: column !important; align-items: stretch !important; }
.stack-btns.iv-main > .btn { width: 100% !important; max-width: none !important; align-self: stretch !important; }
.app.is-home .hm-hello.mary.m3 { background: linear-gradient(180deg, rgba(19,42,99,.62) 0%, rgba(14,31,80,.92) 60%, #0e1f50 100%) !important; -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1); }
.app.is-home .hm-tag { text-shadow: 0 2px 10px rgba(0,0,0,.75); }
/* Home: card edges read clearly against the background (gold rim + top light + lift), colour unchanged */
.app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown, .app.is-home .hm-more.m3-list, .app.is-home .hm-continue, .app.is-home .hm-course, .app.is-home .hm-hello.mary.m3 {
  border: 1px solid rgba(226,188,114,.62) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 28px rgba(0,0,0,.6), 0 0 0 4px rgba(226,188,114,.05) !important;
}
/* No white strip above the app when the page is pulled down; single clean card edge (no second outer ring) */
html, body { background: #010822 !important; }
.app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown, .app.is-home .hm-more.m3-list, .app.is-home .hm-continue, .app.is-home .hm-course, .app.is-home .hm-hello.mary.m3 {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 12px 26px rgba(0,0,0,.55) !important;
}
/* Home hero: whole photo visible (torch included), a short soft fade only on the photo's very bottom edge */
.app.is-home:has(#view[data-screen="home"]) { background:
  linear-gradient(180deg, rgba(1,28,84,0) 0, rgba(1,28,84,0) 104px, rgba(1,28,84,.4) 116px, rgba(1,28,84,.8) 126px, rgba(1,28,84,1) 136px, #04175a 200px, #010822 320px) no-repeat,
  #010822 url("assets/setup-bg.jpg") center top / 108% auto no-repeat !important; }
/* Test start: the white boxes become our paper (same as the test question and the cards) */
.view .panel.test-start .test-rules span { background: repeating-radial-gradient(circle at 50% 0%, rgba(169,128,47,.08) 0 1px, transparent 1px 8px), linear-gradient(180deg, #f6efdc, #ecdfc2) !important; border: 1px solid #b8924f !important; color: #6b5328 !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 14px rgba(0,0,0,.35) !important; }
.view .panel.test-start .test-rules b { color: #13245a !important; font-family: Literata, Georgia, serif !important; }
.view .panel.test-start .test-rules span { background: radial-gradient(120% 90% at 50% 0%, #fbf5e4 0%, #f1e5c8 60%, #e8d8b3 100%) !important; }

/* ===== Depth and touch response (nothing flat) ===== */
/* Tap ripple */
.has-ripple { position: relative; overflow: hidden; }
.tap-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255,240,200,.45) 0%, rgba(255,240,200,.18) 40%, transparent 70%); transform: scale(0); animation: tapRipple .6s ease-out forwards; z-index: 0; }
@keyframes tapRipple { to { transform: scale(1); opacity: 0; } }

/* Press: things sink a little under the finger */
.btn, .btn-green, .btn-again, .btn-line, .abcd button, .hm-card, .hm-continue, .hm-progress, .m3-ask, .car-mini, .iv-btn, .hm-more button { transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s ease, filter .14s ease !important; }
.btn:active, .btn-green:active, .btn-again:active, .abcd button:active, .m3-ask:active, .car-mini:active, .iv-btn:active { transform: translateY(2px) scale(.97) !important; filter: brightness(1.08); }
.hm-card:active, .hm-continue:active, .hm-progress:active, .hm-more button:active { transform: translateY(3px) scale(.985) !important; }

/* Paper has thickness: a small stack of sheets under it */
.view .t3 .panel.t3-paper, .view .panel.test-start .test-rules span, [data-screen="car"] .car-now, [data-screen="interview"] .officer-card .bubble, .cards3 .face {
  box-shadow: 0 1px 0 #e6d6ae, 0 3px 0 #d3bd8c, 0 4px 0 rgba(120,90,40,.35), 0 16px 28px rgba(0,0,0,.5) !important; }

/* Navy panels: light from above, gold hairline, a lifted feel */
.view .panel.test-start, .app.is-home .hm-card, .app.is-home .hm-continue, .app.is-home .hm-progress, .app.is-home .hm-course, .app.is-home .hm-hello.mary.m3, .hm-more.m3-list {
  background-image: linear-gradient(180deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 38%), var(--card-one) !important; }

/* Main gold / coral buttons: a slow shine passes over them */
.btn, .hm-cont-btn, .exam-switch button.on, .seg .choice.on { position: relative; overflow: hidden; }
.btn::after, .hm-cont-btn::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 38%; left: -60%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent); animation: btnShine 5.5s ease-in-out infinite; pointer-events: none; }
@keyframes btnShine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

/* Icons breathe gently so the screen feels alive */
.test-start .feat-ico, .test-start > svg { animation: icoFloat 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(47,116,255,.35)); }
.app.is-home .hm-card .hm-img { animation: icoFloat 4s ease-in-out infinite; }
.app.is-home .hm-grid3 .hm-card:nth-child(2) .hm-img { animation-delay: -1.3s; } .app.is-home .hm-grid3 .hm-card:nth-child(3) .hm-img { animation-delay: -2.6s; }
@keyframes icoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Test answers: lift when picked, the right one glows */
.view .t3 .abcd button.right { box-shadow: 0 0 0 2px rgba(40,208,174,.6), 0 0 22px rgba(40,208,174,.45) !important; animation: rightPop .35s cubic-bezier(.2,1.5,.4,1); }
.view .t3 .abcd button.wrong { animation: wrongShake .35s ease; }
@keyframes rightPop { 0% { transform: scale(.96); } 100% { transform: scale(1); } }
@keyframes wrongShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (prefers-reduced-motion: reduce) {
  .tap-ripple, .btn::after, .hm-cont-btn::after, .test-start .feat-ico, .test-start > svg, .app.is-home .hm-card .hm-img, .view .t3 .abcd button.right, .view .t3 .abcd button.wrong { animation: none !important; }
}
/* Progress: the streak sits on its own line under the progress, so "1 день подряд" and the hint never break into pieces */
.app.is-home .hm-progress { grid-template-columns: 74px minmax(0, 1fr) !important; grid-template-areas: "ring copy" "streak streak" !important; }
.app.is-home .hm-streak { padding: 10px 0 0 !important; border-left: 0 !important; border-top: 1px solid rgba(243,207,127,.18) !important; }
.app.is-home .hm-streak .flame { width: 28px !important; height: 28px !important; }
.app.is-home .hm-streak span { display: flex !important; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.app.is-home .hm-streak b { white-space: nowrap !important; font-size: 16px !important; }
.app.is-home .hm-streak small { white-space: nowrap !important; font-size: 13px !important; }
/* Home: logo, tagline and everything below sit a little higher, closer to the statue */
.app.is-home .hm-logo { margin-top: -34px !important; }
.app.is-home .hm-tag { margin-top: 2px !important; }
.app.is-home .hm-hello.mary.m3 { margin-top: 10px !important; }
/* Home: under the statue and under the city the blue is a bit lighter, so the photo flows evenly into the page */
.app.is-home:has(#view[data-screen="home"]) { background:
  radial-gradient(60% 70px at 18% 150px, rgba(70,110,210,.32), transparent 100%) no-repeat,
  radial-gradient(60% 70px at 84% 150px, rgba(70,110,210,.3), transparent 100%) no-repeat,
  linear-gradient(180deg, rgba(10,40,112,0) 0, rgba(10,40,112,0) 104px, rgba(10,40,112,.45) 116px, rgba(10,40,112,.85) 126px, #0a2870 136px, #0a2668 200px, #071c52 300px, #031040 420px, #010822 600px) no-repeat,
  #010822 url("assets/setup-bg.jpg") center top / 108% auto no-repeat !important; }
/* Home: content a touch lower so the tagline starts where the blue begins under the photo */
.app.is-home .hm-logo { margin-top: -25px !important; }
.app.is-home .hm-tag { margin-top: 8px !important; }
/* Home: the photo (statue and city) shows fully down to its edge; the blue stays only below it */
.app.is-home:has(#view[data-screen="home"]) { background:
  radial-gradient(60% 70px at 18% 158px, rgba(70,110,210,.32), transparent 100%) no-repeat,
  radial-gradient(60% 70px at 84% 158px, rgba(70,110,210,.3), transparent 100%) no-repeat,
  linear-gradient(180deg, rgba(10,40,112,0) 0, rgba(10,40,112,0) 117px, rgba(10,40,112,.55) 122px, rgba(10,40,112,.9) 126px, #0a2870 130px, #0a2668 200px, #071c52 300px, #031040 420px, #010822 600px) no-repeat,
  #010822 url("assets/setup-bg.jpg") center top / 108% auto no-repeat !important; }

/* ===== Home from the mockup ===== */
/* Hero: the big statue photo, fading softly into navy behind the tagline */
.app.is-home:has(#view[data-screen="home"]) { background:
  linear-gradient(180deg, rgba(3,18,66,0) 0, rgba(3,18,66,0) 128px, rgba(3,18,66,.55) 160px, rgba(3,18,66,.92) 190px, #031242 215px, #031040 420px, #010822 700px) no-repeat,
  #021142 url("assets/welcome-bg.jpg") center -78px / 100% auto no-repeat !important; }
.app.is-home .hm-logo { margin-top: -26px !important; width: 168px !important; height: auto !important; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
.app.is-home .hm-tag { margin-top: 10px !important; font-size: 14px !important; line-height: 1.3; text-shadow: 0 2px 10px rgba(0,0,0,.85); }
.mk-rule { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px auto 0; }
.mk-rule i { width: 58px; height: 1px; background: linear-gradient(90deg, transparent, #d9b46a); } .mk-rule i:last-child { background: linear-gradient(90deg, #d9b46a, transparent); }
.mk-rule b { color: #e8c372; font-size: 12px; line-height: 1; }

/* Shared card look: navy glass, gold rim, a thin light along the top edge */
.mk-mary, .mk-course { position: relative; display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 12px 14px; border-radius: 20px; text-align: left;
  background: linear-gradient(180deg, rgba(24,48,112,.85), rgba(12,28,78,.92)); border: 1px solid rgba(226,188,114,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 26px rgba(0,0,0,.45); }
.mk-mary::before, .mk-course::before { content: ""; position: absolute; left: 14%; right: 14%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #f6dc9a, transparent); box-shadow: 0 0 10px rgba(246,220,154,.8); }
.mk-mary::after, .mk-course::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(246,220,154,.7), transparent); }

/* Mary: compact */
.mk-orb { flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: none; }
.mk-orb > * { width: 100% !important; height: 100% !important; }
.mk-mary-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mk-mary-copy b { color: #fff; font: 700 19px/1.15 "Golos Text", sans-serif; }
.mk-mary-copy small { color: rgba(255,255,255,.85); font-size: 13.5px; }
.mk-ask { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(243,207,127,.8); background: rgba(6,16,50,.55); color: #f3cf7f; font: 700 13.5px/1 "Golos Text", sans-serif; white-space: nowrap; }
.mk-ask svg, .mk-ask .ui-ico { width: 18px; height: 18px; color: #f3cf7f; stroke: #f3cf7f; }
.mk-ask i { font-style: normal; font-size: 18px; margin-left: 2px; }

/* State card */
.mk-course { align-items: stretch; padding: 8px 12px 8px 8px; }
.mk-course-photo { flex: none; width: 31%; min-height: 92px; border-radius: 14px; overflow: hidden; } .mk-course-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-course-copy { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: center; }
.mk-course-title { margin: 0 0 2px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; color: #fff; }
.mk-course-title span { font-size: 13.5px; color: rgba(255,255,255,.88); } .mk-course-title b { font: 800 19px/1.1 "Golos Text", sans-serif; }
.mk-course-title i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; color: #fff; background: #1fb47a; }
.mk-line { margin: 0; display: flex; align-items: center; gap: 6px; color: #fff; font-size: 12.5px; line-height: 1.25; min-width: 0; }
.mk-line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-line .ui-ico, .mk-line svg { flex: none; width: 15px; height: 15px; color: #e8c372; stroke: #e8c372; }
.mk-line.pending { color: rgba(255,255,255,.65); }
.mk-course-actions { flex: none; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.mk-pill { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(243,207,127,.7); background: rgba(6,16,50,.5); color: #fff; font: 600 13px/1 "Golos Text", sans-serif; white-space: nowrap; }
.mk-pill.gold { color: #f3cf7f; }

/* Continue: a full gold bar */
.mk-continue { width: 100%; display: grid; grid-template-columns: 44px 1px minmax(0, 1fr) 20px; align-items: center; gap: 12px; margin: 12px 0 0; padding: 12px 16px 12px 14px; border-radius: 18px; text-align: left;
  border: 1px solid rgba(255,236,180,.85); color: #1a1405;
  background: linear-gradient(180deg, #f6dc9a 0%, #e3b75f 55%, #c9973e 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -2px 0 rgba(120,80,20,.25), 0 12px 26px rgba(0,0,0,.5), 0 0 26px rgba(243,207,127,.25); position: relative; overflow: hidden; }
.mk-continue::before { content: ""; grid-column: 2; grid-row: 1; width: 1px; height: 34px; background: rgba(80,55,10,.35); }
.mk-cont-ico { grid-column: 1; grid-row: 1; display: grid; place-items: center; }
.mk-cont-ico svg { width: 40px; height: 40px; } .mk-cont-ico svg * { stroke: #6b4a14 !important; fill: none; }
.mk-cont-copy { grid-column: 3; display: grid; gap: 2px; min-width: 0; }
.mk-cont-copy b { font: 800 17px/1.15 "Golos Text", sans-serif; color: #1a1405; }
.mk-cont-copy small { font-size: 13.5px; color: #3a2a0a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-cont-go { grid-column: 4; font-style: normal; font-size: 28px; line-height: 1; color: #5a3d0c; }
.mk-continue::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 30%; left: -50%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: btnShine 6s ease-in-out infinite; pointer-events: none; }
.mk-continue:active, .mk-mary:active, .mk-course:active { transform: translateY(2px) scale(.99); }
@media (max-width: 360px) { .mk-ask span { display: none; } .mk-course-photo { width: 26%; } }
@media (prefers-reduced-motion: reduce) { .mk-continue::after { animation: none; } }
/* mockup tuning */
.app.is-home:has(#view[data-screen="home"]) { background:
  linear-gradient(180deg, rgba(3,18,66,0) 0, rgba(3,18,66,0) 112px, rgba(3,18,66,.5) 128px, rgba(3,18,66,.88) 142px, #031242 156px, #031040 420px, #010822 700px) no-repeat,
  #021142 url("assets/setup-bg.jpg") 25% top / 118% auto no-repeat !important; }
.app.is-home .hm-logo { margin-top: -28px !important; width: 150px !important; }
.app.is-home .hm-tag { margin-top: 4px !important; }
.mk-rule { margin-top: 6px; }
.mk-orb { width: 48px; height: 48px; }
.mk-mary { gap: 10px; padding: 12px; }
.mk-mary-copy b { font-size: 16.5px; }
.mk-mary-copy small { font-size: 13px; }
.mk-ask { padding: 0 10px; font-size: 12.5px; min-height: 38px; }
.mk-line span { white-space: normal; overflow: visible; }
.mk-course-photo { width: 28%; }
.app.is-home:has(#view[data-screen="home"]) { background:
  linear-gradient(180deg, rgba(3,18,66,0) 0, rgba(3,18,66,0) 106px, rgba(3,18,66,.45) 120px, rgba(3,18,66,.85) 134px, #031242 148px, #031040 420px, #010822 700px) no-repeat,
  #021142 url("assets/setup-bg.jpg") 30% top / 112% auto no-repeat !important; }
.mk-askpre { font-style: normal; }
@media (max-width: 420px) { .mk-askpre { display: none; } }
.mk-mary-copy b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.mk-course { display: grid !important; grid-template-columns: 30% minmax(0, 1fr); grid-template-areas: "photo copy" "photo act"; gap: 6px 12px; }
.mk-course-photo { grid-area: photo; width: auto; }
.mk-course-copy { grid-area: copy; }
.mk-course-actions { grid-area: act; flex-direction: row; justify-content: flex-end; }
@media (max-width: 380px) { .mk-mary-copy b { font-size: 15.5px; } .mk-mary-copy small { font-size: 12px; } .mk-orb { width: 42px; height: 42px; } }

/* ===== Home: exact mockup ===== */
.app.is-home:has(#view[data-screen="home"]) { background:
  linear-gradient(180deg, rgba(5,14,40,0) 0, rgba(5,14,40,0) 128px, rgba(5,14,40,.6) 146px, rgba(5,14,40,.95) 158px, #050e28 166px, #061236 400px, #030b26 100%) no-repeat,
  #050e28 url("assets/home-hero.jpg") center top / 100% auto no-repeat !important; }
.app.is-home .hm-hero { padding-bottom: 0 !important; }
.app.is-home .hm-logo { margin-top: -50px !important; width: 122px !important; filter: drop-shadow(0 3px 10px rgba(0,0,0,.7)); }
.app.is-home .hm-tag { margin: 14px auto 0 !important; max-width: 200px; font-size: 14.5px !important; line-height: 1.32; }
.mk-rule { margin-top: 8px; } .mk-rule i { width: 44px; } .mk-rule b { font-size: 13px; }

/* Cards: dark navy, gold rim, light along the top edge, same for all */
.mk-mary, .mk-course, .app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown, .app.is-home .hm-more.m3-list {
  background: linear-gradient(180deg, #0f1f52 0%, #0a1740 100%) !important;
  border: 1px solid rgba(232,195,114,.75) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.35) !important; }
.app.is-home .hm-card { position: relative; }
.app.is-home .hm-card::before, .app.is-home .hm-progress::before { content: ""; position: absolute; left: 18%; right: 18%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #f6dc9a, transparent); box-shadow: 0 0 10px rgba(246,220,154,.8); pointer-events: none; }

/* Mary row: 58pt tall, orb 40, name 16, pill on the right */
.mk-mary { margin-top: 14px !important; min-height: 58px; padding: 9px 12px 9px 12px !important; gap: 10px !important; border-radius: 18px !important; }
.mk-orb { width: 42px !important; height: 42px !important; }
.mk-mary-copy b { font-size: 16px !important; white-space: normal !important; }
.mk-mary-copy small { font-size: 12.5px !important; }
.mk-ask { min-height: 34px !important; padding: 0 10px 0 9px !important; font-size: 12.5px !important; gap: 5px !important; border-color: #e8c372 !important; background: rgba(5,12,38,.6) !important; }
.mk-ask svg, .mk-ask .ui-ico { width: 15px !important; height: 15px !important; }
.mk-ask i { font-size: 16px !important; }
.mk-askpre { display: inline !important; }

/* State card: photo | copy | Change — one row, 72pt tall */
.mk-course { display: flex !important; align-items: center !important; gap: 10px !important; margin-top: 10px !important; min-height: 72px; padding: 6px 10px 6px 6px !important; border-radius: 18px !important; }
.mk-course-photo { flex: none !important; width: 86px !important; height: 62px !important; min-height: 0 !important; border-radius: 12px !important; }
.mk-course-copy { flex: 1 !important; min-width: 0 !important; gap: 3px !important; }
.mk-course-title { gap: 2px 5px !important; margin: 0 !important; }
.mk-course-title span { font-size: 12.5px !important; } .mk-course-title b { font-size: 16.5px !important; }
.mk-course-title i { width: 15px !important; height: 15px !important; font-size: 9px !important; }
.mk-line { font-size: 11.5px !important; gap: 5px !important; }
.mk-line .ui-ico, .mk-line svg { width: 13px !important; height: 13px !important; }
.mk-course-actions { flex: none !important; flex-direction: column !important; justify-content: center !important; }
.mk-pill { min-height: 28px !important; padding: 0 9px !important; font-size: 12px !important; border-color: #e8c372 !important; }

/* Continue: 47pt gold bar */
.mk-continue { margin-top: 10px !important; min-height: 47px; padding: 7px 14px 7px 12px !important; gap: 10px !important; grid-template-columns: 36px 1px minmax(0,1fr) 16px !important; border-radius: 14px !important;
  background: linear-gradient(180deg, #f3d891 0%, #e5bd6a 50%, #d2a24c 100%) !important; }
.mk-cont-ico svg { width: 32px !important; height: 32px !important; }
.mk-continue::before { height: 28px !important; }
.mk-cont-copy b { font-size: 16px !important; } .mk-cont-copy small { font-size: 12.5px !important; }
.mk-cont-go { font-size: 24px !important; }

/* Direction cards: 131pt, picture, title, two-line caption, round arrow */
.app.is-home .hm-grid3 { gap: 10px !important; margin-top: 10px !important; }
.app.is-home .hm-grid3 .hm-card { min-height: 132px !important; padding: 10px 6px 10px !important; justify-content: flex-start !important; border-radius: 18px !important; }
.app.is-home .hm-grid3 .hm-img { height: 56px !important; margin-bottom: 6px !important; animation: none !important; }
.app.is-home .hm-card b { font-size: 16px !important; }
.app.is-home .hm-card small { font-size: 11.5px !important; min-height: 30px !important; line-height: 1.25 !important; }
.app.is-home .hm-card .hm-go { width: 26px !important; height: 26px !important; font-size: 15px !important; margin-top: auto !important; }
.app.is-home .hm-badge { display: none !important; }
.app.is-home .hm-grid2 { gap: 10px !important; margin-top: 10px !important; }
.app.is-home .hm-grid2 .hm-card { min-height: 132px !important; border-radius: 18px !important; }
.mk-mary-copy b { font-size: 15.5px !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.mk-mary-copy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-ask { padding: 0 8px 0 8px !important; font-size: 12px !important; }
.mk-line span { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.mk-line { font-size: 11px !important; }
.mk-course-copy { gap: 2px !important; }
.mk-mary-copy b { font-size: 14.5px !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
.mk-mary-copy small { font-size: 12px !important; white-space: normal !important; overflow: visible !important; }
.mk-line span { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.2; }
.mk-course-photo { align-self: center; }
.app.is-home .hm-tag { max-width: 186px !important; }

/* ===== Home: the user's banner on top (logo is part of the banner) ===== */
.app.is-home:has(#view[data-screen="home"]) { background:
  linear-gradient(180deg, rgba(1,21,61,0) 0, rgba(1,21,61,0) calc(min(33.33vw, 146.67px) - 6px), #01153d calc(min(33.33vw, 146.67px)), #04133a 420px, #030b26 100%) no-repeat,
  #01153d url("assets/home-banner.jpg") center top / 100% auto no-repeat !important; }
.app.is-home .hm-logo { display: none !important; }
.app.is-home .mk-rule { display: none !important; }
.app.is-home .hm-top { position: relative; z-index: 2; }
.app.is-home .hm-top .lang-drop, .app.is-home .hm-profile { transform: scale(.82); }
.app.is-home .hm-top .lang-drop { transform-origin: left top; } .app.is-home .hm-profile { transform-origin: right top; }
.app.is-home .hm-tag { margin: calc(min(33.33vw, 146.67px) - 60px) auto 0 !important; max-width: none !important; font-size: 14px !important; }
/* Continue: the user's gold button picture (Russian); the text stays for screen readers */
.mk-continue.img-ru { display: block !important; width: calc(100% + 8px) !important; margin: 8px -4px 0 !important; padding: 0 !important; min-height: 0 !important; aspect-ratio: 5 / 1; border: 0 !important; border-radius: 999px !important; box-shadow: 0 10px 22px rgba(0,0,0,.45) !important;
  background: url("assets/btn-continue-ru.png") center / 100% 100% no-repeat transparent !important; overflow: hidden; }
.mk-continue.img-ru > * { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mk-continue.img-ru::before { display: none !important; }
.mk-continue.img-ru::after { border-radius: 999px; }
/* Continue: CSS copy of the user's gold button (same colours, every language) */
.mk-continue.gold2 { grid-template-columns: 52px 2px minmax(0,1fr) 22px !important; gap: 14px !important; min-height: 60px !important; padding: 8px 22px 8px 24px !important; border-radius: 999px !important; margin-top: 12px !important;
  border: 2px solid #b8730a !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 22%),
    radial-gradient(70% 120% at 50% 0%, #fdea68 0%, rgba(253,234,104,0) 60%),
    linear-gradient(180deg, #fac21a 0%, #fdd353 30%, #f2b034 62%, #df9c2c 82%, #fbd640 96%, #a35b01 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(255,236,150,.85), inset 0 0 0 4px rgba(184,115,10,.55), 0 0 18px rgba(250,190,40,.55), 0 10px 22px rgba(0,0,0,.45) !important; }
.mk-continue.gold2::before { width: 2px !important; height: 34px !important; background: linear-gradient(180deg, rgba(160,95,10,0), #a8650a, rgba(160,95,10,0)) !important; }
.mk-continue.gold2 .mk-cont-ico svg { width: 44px !important; height: 44px !important; }
.mk-continue.gold2 .mk-cont-ico svg * { stroke: #8a4e04 !important; stroke-width: 2.2 !important; }
.mk-continue.gold2 .mk-cont-copy b { color: #14121f !important; font: 800 19px/1.1 "Golos Text", sans-serif !important; letter-spacing: -.005em; }
.mk-continue.gold2 .mk-cont-copy small { display: none !important; }
.mk-continue.gold2 .mk-cont-go { color: #14121f !important; font-size: 30px !important; font-weight: 700; }
.mk-continue.gold2 { grid-template-columns: 44px 2px minmax(0,1fr) 18px !important; gap: 12px !important; padding: 8px 18px 8px 20px !important; }
.mk-continue.gold2 .mk-cont-ico svg { width: 38px !important; height: 38px !important; }
.mk-continue.gold2 .mk-cont-copy b { white-space: nowrap; font-size: 18.5px !important; }
@media (max-width: 370px) { .mk-continue.gold2 .mk-cont-copy b { font-size: 16.5px !important; } }
/* Continue learning: navy card like the others, with the exact gold "Continue →" button on the right */
.mk-continue.card3 { display: flex !important; align-items: center !important; gap: 12px !important; min-height: 76px !important; padding: 12px 12px 12px 14px !important; border-radius: 18px !important; margin-top: 10px !important; color: #fff !important;
  background: linear-gradient(180deg, #0f1f52 0%, #0a1740 100%) !important; border: 1px solid rgba(232,195,114,.75) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.55) !important; overflow: visible !important; }
.mk-continue.card3::before { content: ""; position: absolute; left: 18%; right: 18%; top: -1px; height: 1px; width: auto !important; background: linear-gradient(90deg, transparent, #f6dc9a, transparent) !important; box-shadow: 0 0 10px rgba(246,220,154,.8); }
.mk-continue.card3::after { display: none !important; }
.mk-continue.card3 .mk-cont-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 1px solid rgba(226,188,114,.6); background: linear-gradient(180deg, #1d3a85, #13296a); }
.mk-continue.card3 .mk-cont-ico svg { width: 28px !important; height: 28px !important; } .mk-continue.card3 .mk-cont-ico svg * { stroke: #E2BC72 !important; }
.mk-continue.card3 .mk-cont-copy { flex: 1; min-width: 0; }
.mk-continue.card3 .mk-cont-copy b { color: #fff !important; font: 700 15.5px/1.15 "Golos Text", sans-serif !important; white-space: nowrap; }
.mk-continue.card3 .mk-cont-copy small { display: block !important; color: rgba(255,255,255,.75) !important; font-size: 12.5px !important; white-space: normal !important; }
.continue-button {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 144px; height: 52px; border-radius: 26px;
  border: 1px solid #FFF0BB;
  background: linear-gradient(180deg, #FFE6A0 0%, #E9BD62 55%, #C9953E 100%);
  color: #211A13; font-size: 16px; font-weight: 600; font-family: "Golos Text", sans-serif;
  box-shadow: 0 4px 14px #D9A74D40; cursor: pointer; }
.continue-button i { font-style: normal; }
@media (max-width: 380px) { .continue-button { width: 120px; height: 48px; font-size: 15px; } }
.mk-continue.card3::before { height: 1px !important; grid-column: auto !important; }
.mk-continue.card3 .mk-cont-copy b { white-space: normal !important; font-size: 15px !important; }
.mk-continue.card3 .mk-cont-copy small { font-size: 12px !important; line-height: 1.25; }
/* Continue learning: full-width gold bar in the given colours (52px tall, 26px radius) */
.mk-continue.gold3 { display: flex !important; align-items: center !important; gap: 12px !important; width: 100% !important; height: 52px !important; min-height: 52px !important; margin-top: 12px !important; padding: 0 18px 0 16px !important; border-radius: 26px !important;
  border: 1px solid #FFF0BB !important;
  background: linear-gradient(180deg, #FFE6A0 0%, #E9BD62 55%, #C9953E 100%) !important;
  box-shadow: 0 4px 14px #D9A74D40 !important; color: #211A13 !important; overflow: hidden !important; }
.mk-continue.gold3::before { display: none !important; }
.mk-continue.gold3::after { border-radius: 26px; }
.mk-continue.gold3 .mk-cont-ico { flex: none; display: grid; place-items: center; width: auto; height: auto; border: 0; background: none; padding-right: 12px; border-right: 1px solid rgba(33,26,19,.28); }
.mk-continue.gold3 .mk-cont-ico svg { width: 28px !important; height: 28px !important; } .mk-continue.gold3 .mk-cont-ico svg * { stroke: #211A13 !important; stroke-width: 1.6 !important; }
.mk-continue.gold3 .mk-cont-copy { flex: 1; min-width: 0; }
.mk-continue.gold3 .mk-cont-copy b { color: #211A13 !important; font: 600 16px/1.1 "Golos Text", sans-serif !important; white-space: nowrap !important; }
.mk-continue.gold3 .mk-cont-copy small { display: none !important; }
.mk-continue.gold3 .continue-button { width: auto; height: auto; border: 0; background: none; box-shadow: none; font-size: 0; padding: 0; }
.mk-continue.gold3 .continue-button i { font-size: 20px; color: #211A13; font-weight: 600; }
/* Continue: more elegant — slimmer, softer gold, fine inner highlight, small glow */
.mk-continue.gold3 { height: 48px !important; min-height: 48px !important; border-radius: 24px !important; padding: 0 18px 0 18px !important;
  background: linear-gradient(180deg, #FFE6A0 0%, #F1CD7D 30%, #E9BD62 58%, #D2A04A 100%) !important;
  border: 1px solid rgba(255,240,187,.9) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(140,95,30,.25), 0 0 12px rgba(233,189,98,.28), 0 4px 12px rgba(0,0,0,.35) !important; }
.mk-continue.gold3::after { opacity: .5; }
.mk-continue.gold3 .mk-cont-ico { padding-right: 14px; border-right-color: rgba(33,26,19,.18); }
.mk-continue.gold3 .mk-cont-ico svg { width: 24px !important; height: 24px !important; } .mk-continue.gold3 .mk-cont-ico svg * { stroke-width: 1.3 !important; }
.mk-continue.gold3 .mk-cont-copy b { font-weight: 600 !important; font-size: 15.5px !important; letter-spacing: .02em; }
.mk-continue.gold3 .continue-button i { font-size: 18px; font-weight: 500; }
/* Continue: a soft gold shine drifts across slowly */
.mk-continue.gold3::after { content: ""; opacity: 1 !important; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; transform: skewX(-18deg);
  background: linear-gradient(90deg, rgba(255,246,214,0) 0%, rgba(255,246,214,.38) 50%, rgba(255,246,214,0) 100%) !important;
  animation: softShine 7s ease-in-out infinite !important; pointer-events: none; }
@keyframes softShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .mk-continue.gold3::after { animation: none !important; } }

/* All yellow/gold buttons in the course share the Continue button's soft gold */
.addr-go, .hm-pill.gold, .mk-pill.gold, .pp-go, .t3 .btn.cta, .t3 .test-done .btn, .cards3 .fchip.on, .seg .choice.on, .fchip.on, .exam-switch button.on,
.mary-mic.big, .app.is-home .hm-cont-btn, .mary-input .btn, .ms-dock button.on {
  background: linear-gradient(180deg, #FFE6A0 0%, #F1CD7D 30%, #E9BD62 58%, #D2A04A 100%) !important;
  color: #211A13 !important;
  border: 1px solid rgba(255,240,187,.9) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(140,95,30,.25), 0 0 10px rgba(233,189,98,.25), 0 4px 10px rgba(0,0,0,.3) !important;
  font-weight: 600 !important; }
.mk-pill.gold { color: #211A13 !important; }
.app.is-home .hm-go, .hm-go {
  background: linear-gradient(180deg, #FFE6A0 0%, #E9BD62 58%, #C9953E 100%) !important; color: #211A13 !important;
  border: 1px solid rgba(255,240,187,.9) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 8px rgba(233,189,98,.25) !important; }
.exam-switch button.on { background: transparent !important; border: 0 !important; box-shadow: none !important; color: #f3cf7f !important; }
/* State card (approved spec): 358x120, radius 20, 1.5px #D8B46A, #102452, padding 10, photo 115x100 r14 */
.app.is-home .mk-course.fl2 { display: flex !important; align-items: center !important; gap: 12px !important;
  width: min(358px, 100%) !important; max-width: 600px; height: 120px !important; min-height: 0 !important; margin: 10px auto 0 !important;
  padding: 10px !important; border-radius: 20px !important; box-sizing: border-box;
  background: #102452 !important; border: 1.5px solid #D8B46A !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.25) !important; }
.mk-course.fl2::before, .mk-course.fl2::after { display: none !important; }
.mk-course.fl2 .mk-course-photo { flex: none !important; width: 115px !important; height: 100px !important; min-height: 0 !important; border-radius: 14px !important; overflow: hidden; border: 0 !important; box-shadow: none !important; }
.mk-course.fl2 .mk-course-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.mk-course.fl2 .mk-course-copy { flex: 1 !important; min-width: 0 !important; display: grid !important; gap: 6px !important; align-content: center; }
.mk-course.fl2 .mk-course-title { flex-wrap: nowrap !important; white-space: nowrap; overflow: hidden; }
.mk-course.fl2 .mk-course-title span { font-size: 12.5px !important; flex: none; } .mk-course.fl2 .mk-course-title b { font-size: 17px !important; overflow: hidden; text-overflow: ellipsis; }
.mk-course.fl2 .mk-line { font-size: 12px !important; } .mk-course.fl2 .mk-line span { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.mk-course.fl2 .mk-course-actions { flex: none !important; align-self: center; }
.mk-course.fl2 .mk-pill { min-height: 32px !important; padding: 0 12px !important; font-size: 12.5px !important; color: #fff !important; background: transparent !important; border: 1px solid #D8B46A !important; box-shadow: none !important; }
@media (max-width: 370px) {
  .mk-course.fl2 .mk-course-photo { width: 92px !important; height: 92px !important; }
  .mk-course.fl2 .mk-course-title span { display: none; }
  .mk-course.fl2 .mk-pill { padding: 0 9px !important; }
}
/* text column holds title, ZIP, district and the Change button under them — nothing is cut */
.mk-course.fl2 .mk-course-copy { gap: 4px !important; }
.mk-course.fl2 .mk-course-title b { overflow: visible; text-overflow: clip; }
.mk-course.fl2 .mk-line span { overflow: visible !important; text-overflow: clip !important; }
.mk-course.fl2 .mk-course-actions { justify-content: flex-start !important; margin-top: 2px; }
.mk-course.fl2 .mk-pill { min-height: 26px !important; padding: 0 12px !important; font-size: 12px !important; }
@media (max-width: 370px) { .mk-course.fl2 .mk-course-title span { display: inline; font-size: 11.5px !important; } .mk-course.fl2 .mk-line { font-size: 11px !important; } .mk-course.fl2 .mk-course-title b { font-size: 15.5px !important; } }
.mk-course.fl2 .mk-course-copy { display: flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: center; grid-area: auto !important; }
.mk-course.fl2 .mk-course-copy > * { grid-area: auto !important; }
.mk-course.fl2 .mk-course-photo { grid-area: auto !important; }
.mk-course.fl2 .mk-course-actions { align-self: flex-start !important; width: auto !important; }
/* State card: same width as the other Home blocks */
.app.is-home .mk-course.fl2 { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
/* State card v2: a bit slimmer, photo fills the height, Change at the right end */
.app.is-home .mk-course.fl2 { height: 104px !important; padding: 8px 12px 8px 8px !important; gap: 10px !important; }
.mk-course.fl2 .mk-course-photo { width: 118px !important; height: 88px !important; border-radius: 13px !important; }
.mk-course.fl2 .mk-course-copy { gap: 3px !important; }
.mk-course.fl2 .mk-course-title b { font-size: 16px !important; } .mk-course.fl2 .mk-course-title span { font-size: 12px !important; }
.mk-course.fl2 .mk-line { font-size: 10.5px !important; gap: 4px !important; }
.mk-course.fl2 .mk-line .ui-ico, .mk-course.fl2 .mk-line svg { width: 12px !important; height: 12px !important; }
.mk-course.fl2 .mk-course-actions { align-self: center !important; margin: 0 0 0 auto !important; }
.mk-course.fl2 .mk-pill { min-height: 30px !important; padding: 0 10px !important; font-size: 12px !important; }
@media (max-width: 370px) { .mk-course.fl2 .mk-course-photo { width: 84px !important; height: 80px !important; } .mk-course.fl2 .mk-line { font-size: 9.5px !important; } }

/* Soft gold light under the bottom edge of cards and buttons */
.mk-mary, .mk-course, .mk-continue.gold3, .app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown { position: relative; }
.mk-mary::after, .mk-course.fl2::after, .app.is-home .hm-card::after, .app.is-home .hm-progress::after, .app.is-home .countdown::after {
  content: "" !important; display: block !important; position: absolute; left: 22%; right: 22%; bottom: -1px; top: auto !important; height: 1.5px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #ffd98a 50%, transparent) !important; box-shadow: 0 0 10px 1px rgba(255,200,110,.75), 0 2px 16px rgba(255,190,90,.45) !important; }
.mk-continue.gold3 { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(140,95,30,.25), 0 0 12px rgba(233,189,98,.28), 0 6px 14px -2px rgba(255,200,110,.45), 0 4px 12px rgba(0,0,0,.35) !important; }
.mk-ask, .mk-pill, .app.is-home .hm-go { box-shadow: 0 3px 8px -2px rgba(255,205,120,.55) !important; }
.mk-course.fl2 .mk-course-photo { width: 100px !important; height: 88px !important; }
.mk-course.fl2 .mk-course-copy { flex: 1 1 0 !important; min-width: 0 !important; overflow: hidden; }
.mk-course.fl2 .mk-line span { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; letter-spacing: -.01em; }
.mk-course.fl2 .mk-pill { padding: 0 9px !important; font-size: 11.5px !important; }
.mk-course.fl2 .mk-course-actions { flex: none !important; }
/* glow line: tighter, no smear below the card */
.mk-mary::after, .mk-course.fl2::after, .app.is-home .hm-card::after, .app.is-home .hm-progress::after, .app.is-home .countdown::after {
  height: 1px !important; box-shadow: 0 0 6px 1px rgba(255,200,110,.7) !important; }
.mk-course.fl2 .mk-line { font-size: 11px !important; }
@media (max-width: 380px) { .mk-course.fl2 .mk-course-photo { width: 88px !important; } .mk-course.fl2 .mk-line { font-size: 10.5px !important; } }
.mk-mary::after, .mk-course.fl2::after, .app.is-home .hm-card::after, .app.is-home .hm-progress::after, .app.is-home .countdown::after { box-shadow: 0 0 5px rgba(255,200,110,.75) !important; }
@media (max-width: 380px) { .mk-course.fl2 .mk-course-title b { font-size: 14.5px !important; } .mk-course.fl2 .mk-course-title span { font-size: 11px !important; } }
/* Florida photo: wider, in a softly glowing gold rim */
.mk-course.fl2 .mk-course-photo { width: 128px !important; height: 86px !important; border: 1.5px solid #E2BC72 !important; border-radius: 13px !important;
  box-shadow: 0 0 0 1px rgba(255,230,160,.25), 0 0 10px rgba(255,205,120,.45), inset 0 0 0 1px rgba(255,240,190,.35) !important; }
@media (max-width: 380px) { .mk-course.fl2 .mk-course-photo { width: 104px !important; } }
.mk-course.fl2 .mk-course-photo { width: 110px !important; }
.mk-course.fl2 .mk-pill { padding: 0 8px !important; font-size: 11px !important; min-height: 28px !important; }
.app.is-home .mk-course.fl2 { padding-right: 10px !important; gap: 9px !important; }
@media (max-width: 380px) { .mk-course.fl2 .mk-course-photo { width: 92px !important; } }
/* Florida photo long: ~42% of the card; Change sits in the top-right corner, text fits under it */
.app.is-home .mk-course.fl2 { position: relative; height: 108px !important; padding: 8px 10px 8px 8px !important; }
.mk-course.fl2 .mk-course-photo { width: 42% !important; max-width: 170px; height: 90px !important; }
.mk-course.fl2 .mk-course-title { display: grid !important; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 0 5px !important; }
.mk-course.fl2 .mk-course-title span { grid-column: 1 / -1; font-size: 11px !important; line-height: 1.1; }
.mk-course.fl2 .mk-course-title b { font-size: 16px !important; line-height: 1.15; }
.mk-course.fl2 .mk-course-actions { position: absolute; top: 9px; right: 10px; margin: 0 !important; }
.mk-course.fl2 .mk-pill { min-height: 24px !important; padding: 0 8px !important; font-size: 10.5px !important; }
@media (max-width: 380px) { .mk-course.fl2 .mk-course-photo { width: 40% !important; } }
/* Change: middle of the right side; the card's gold rim itself glows softly */
.mk-course.fl2 .mk-course-actions { top: 50% !important; transform: translateY(-50%); right: 10px !important; }
.mk-course.fl2 .mk-pill { min-height: 28px !important; padding: 0 10px !important; font-size: 11.5px !important; box-shadow: 0 0 6px rgba(255,205,120,.35), 0 3px 8px -2px rgba(255,205,120,.5) !important; }
.app.is-home .mk-course.fl2, .app.is-home .mk-mary, .app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown {
  box-shadow: 0 0 0 1px rgba(255,220,150,.12), 0 0 8px rgba(226,188,114,.35), inset 0 0 6px rgba(226,188,114,.12), 0 4px 18px rgba(0,0,0,.3) !important; }
/* A little more glow and a touch of 3D: light top edge, darker bottom inside, lifted shadow */
.app.is-home .mk-course.fl2, .app.is-home .mk-mary, .app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown, .app.is-home .hm-more.m3-list {
  background: linear-gradient(180deg, #16306a 0%, #102452 45%, #0b1b44 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,236,190,.28),
    inset 0 -3px 6px rgba(0,0,0,.35),
    0 0 0 1px rgba(255,220,150,.14),
    0 0 12px rgba(226,188,114,.42),
    0 8px 18px rgba(0,0,0,.45),
    0 2px 0 rgba(0,0,0,.35) !important; }
.mk-course.fl2 .mk-course-photo { box-shadow: 0 0 0 1px rgba(255,230,160,.3), 0 0 12px rgba(255,205,120,.55), 0 4px 10px rgba(0,0,0,.45) !important; }
.mk-pill, .mk-ask { background: linear-gradient(180deg, rgba(30,56,120,.9), rgba(8,20,58,.9)) !important;
  box-shadow: inset 0 1px 0 rgba(255,236,190,.3), 0 0 8px rgba(255,205,120,.4), 0 3px 6px rgba(0,0,0,.4) !important; }
.mk-continue.gold3 { box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -3px 5px rgba(140,95,30,.35), 0 0 16px rgba(233,189,98,.4), 0 6px 14px rgba(0,0,0,.45), 0 2px 0 rgba(120,80,20,.55) !important; }
.app.is-home .hm-go { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 3px rgba(140,95,30,.35), 0 0 8px rgba(255,205,120,.5), 0 3px 5px rgba(0,0,0,.4) !important; }
/* Mary block (spec): 360x56, r17, 1px #D8B46A, #102452, padding 10; orb 40 with 2px gold rim; pill 113x30 r18 */
.app.is-home .mk-mary { width: 100% !important; max-width: 360px; height: 56px !important; min-height: 0 !important; margin: 12px auto 0 !important; padding: 0 10px !important; box-sizing: border-box;
  display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 9px !important; border-radius: 17px !important; border: 1px solid #D8B46A !important; }
.app.is-home .mk-orb { flex: none; width: 40px !important; height: 40px !important; border-radius: 50%; padding: 0; overflow: hidden;
  border: 2px solid #E2BC72 !important; box-shadow: 0 0 8px rgba(255,205,120,.55), 0 0 14px rgba(60,140,255,.45) !important; background: #0b1b44; }
.app.is-home .mk-orb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.app.is-home .mk-mary-copy { flex: 1; min-width: 0; gap: 1px !important; }
.app.is-home .mk-mary-copy b { font-size: 14px !important; font-weight: 700 !important; color: #fff !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app.is-home .mk-mary-copy small { font-size: 11px !important; color: rgba(225,230,245,.75) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app.is-home .mk-ask { flex: none; width: 113px; height: 30px !important; min-height: 0 !important; padding: 0 8px !important; justify-content: center; gap: 4px !important; border-radius: 18px !important; border: 1px solid #E6C478 !important; color: #E6C478 !important; font-size: 11px !important; }
.app.is-home .mk-ask svg, .app.is-home .mk-ask .ui-ico { width: 13px !important; height: 13px !important; }
.app.is-home .mk-ask i { font-size: 14px !important; }
.app.is-home .mk-askpre { display: inline !important; }
/* Mary block: full width like the other blocks, taller, bigger orb and text */
.app.is-home .mk-mary { max-width: none !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; height: 74px !important; padding: 0 12px !important; gap: 11px !important; border-radius: 19px !important; }
.app.is-home .mk-orb { width: 54px !important; height: 54px !important; }
.app.is-home .mk-mary-copy b { font-size: 16.5px !important; }
.app.is-home .mk-mary-copy small { font-size: 12.5px !important; }
.app.is-home .mk-ask { width: auto; height: 36px !important; padding: 0 12px !important; font-size: 12.5px !important; }
.app.is-home .mk-ask svg, .app.is-home .mk-ask .ui-ico { width: 15px !important; height: 15px !important; }
@media (max-width: 380px) { .app.is-home .mk-orb { width: 46px !important; height: 46px !important; } .app.is-home .mk-mary-copy b { font-size: 15px !important; } .app.is-home .mk-ask { padding: 0 9px !important; font-size: 11.5px !important; } }
.app.is-home .mk-mary-copy b, .app.is-home .mk-mary-copy small { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.app.is-home .mk-mary-copy b { font-size: 15px !important; }
.app.is-home .mk-mary-copy small { font-size: 12px !important; }
.app.is-home .mk-ask { padding: 0 10px !important; font-size: 12px !important; gap: 4px !important; }
.app.is-home .mk-mary { gap: 10px !important; }
@media (max-width: 380px) { .app.is-home .mk-mary-copy b { font-size: 14px !important; } .app.is-home .mk-mary-copy small { font-size: 11px !important; } .app.is-home .mk-ask svg { display: none; } }
@media (max-width: 430px) { .app.is-home .mk-ask svg, .app.is-home .mk-ask .ui-ico { display: none !important; } .app.is-home .mk-orb { width: 50px !important; height: 50px !important; } }
/* Thicker gold rims, more depth */
.app.is-home .mk-mary, .app.is-home .mk-course.fl2, .app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown, .app.is-home .hm-more.m3-list { border-width: 2px !important; border-color: #D8B46A !important; }
.app.is-home .mk-mary { background: linear-gradient(180deg, #1a3878 0%, #102452 50%, #0a1a42 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,236,190,.35), inset 0 -4px 8px rgba(0,0,0,.4), 0 0 0 1px rgba(255,220,150,.16), 0 0 14px rgba(226,188,114,.5), 0 10px 20px rgba(0,0,0,.5), 0 3px 0 rgba(0,0,0,.4) !important; }
/* Continue: a touch darker and warmer gold, shine, glow underneath */
.mk-continue.gold3 { border: 1.5px solid #FFE2A0 !important;
  background: linear-gradient(180deg, #FBD98C 0%, #EDB95A 32%, #DFA244 62%, #C2832E 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,250,225,.7), inset 0 -3px 6px rgba(120,70,15,.4), 0 0 18px rgba(232,170,70,.45), 0 10px 18px -6px rgba(255,170,60,.75), 0 6px 14px rgba(0,0,0,.45), 0 2px 0 rgba(110,65,15,.6) !important; }
.mk-continue.gold3::after { background: linear-gradient(90deg, rgba(255,248,220,0) 0%, rgba(255,248,220,.5) 50%, rgba(255,248,220,0) 100%) !important; animation-duration: 5s !important; }
.mk-continue.gold3 { margin-bottom: 4px; }
/* Continue: light bulbs glowing under the button (spot lights), shine kept inside */
.mk-continue.gold3 { overflow: visible !important; position: relative; }
.mk-continue.gold3::after { display: none !important; }
.mk-continue.gold3 > *:not(.mk-shine):not(.mk-lamp) { position: relative; z-index: 2; }
.mk-shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 1; }
.mk-shine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; transform: skewX(-18deg);
  background: linear-gradient(90deg, rgba(255,248,220,0), rgba(255,248,220,.5), rgba(255,248,220,0)); animation: softShine 5s ease-in-out infinite; }
.mk-lamp { position: absolute; left: 0; right: 0; bottom: -2px; height: 0; pointer-events: none; z-index: 0; }
.mk-lamp i { position: absolute; bottom: 0; width: 10px; height: 4px; margin-left: -5px; border-radius: 50%;
  background: #fff6d6; box-shadow: 0 0 6px 2px #ffe3a0, 0 0 16px 6px rgba(255,190,80,.85), 0 6px 26px 10px rgba(255,170,60,.55); animation: lampGlow 3.2s ease-in-out infinite; }
.mk-lamp i:nth-child(1) { left: 22%; animation-delay: -1s; } .mk-lamp i:nth-child(2) { left: 50%; width: 14px; margin-left: -7px; } .mk-lamp i:nth-child(3) { left: 78%; animation-delay: -2s; }
@keyframes lampGlow { 0%, 100% { opacity: .85; } 50% { opacity: 1; filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .mk-shine::after, .mk-lamp i { animation: none; } }
.mk-continue.gold3 { margin-bottom: 10px !important; }
.mk-lamp i { box-shadow: 0 0 6px 3px #fff0c4, 0 0 18px 8px rgba(255,195,90,.9), 0 8px 30px 14px rgba(255,170,60,.6) !important; }
.mk-continue.gold3 { margin-bottom: 16px !important; }
/* Gold button: no visible bulbs — just a barely-there warm glow underneath */
.mk-lamp { display: none !important; }
.mk-continue.gold3 { margin-bottom: 6px !important;
  box-shadow: inset 0 1px 0 rgba(255,250,225,.7), inset 0 -3px 6px rgba(120,70,15,.35), 0 0 14px rgba(232,170,70,.35), 0 8px 16px -8px rgba(255,185,80,.55), 0 6px 14px rgba(0,0,0,.4) !important; }
/* Mary orb: brighter and convex (glass highlight on top, shade at the bottom) */
.app.is-home .mk-orb { position: relative; }
.app.is-home .mk-orb img { filter: brightness(1.18) saturate(1.15); }
.app.is-home .mk-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(60% 45% at 38% 24%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%), radial-gradient(90% 60% at 50% 110%, rgba(0,10,40,.45), rgba(0,10,40,0) 70%); }
.app.is-home .mk-orb { box-shadow: 0 0 10px rgba(255,205,120,.6), 0 0 18px rgba(70,150,255,.6), 0 4px 8px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,240,200,.4) !important; }

/* ===== Strict pass: one spacing, two rim weights, one type scale, little motion ===== */
/* 1. Spacing: 12 between blocks, 12 inside */
.app.is-home .mk-mary, .app.is-home .mk-course.fl2, .app.is-home .mk-continue.gold3, .app.is-home .hm-grid3, .app.is-home .hm-grid2, .app.is-home .hm-progress, .app.is-home .hm-duo { margin-top: 12px !important; margin-bottom: 0 !important; }
.app.is-home .hm-grid3, .app.is-home .hm-grid2 { gap: 12px !important; }
.app.is-home .hm-progress, .app.is-home .countdown { padding: 12px !important; }
.app.is-home .m3-title { margin: 22px 0 10px !important; }

/* 2. Rims: blocks 1.5px, small buttons 1px; one quiet shadow for every block; no extra glow lines */
.app.is-home .mk-mary, .app.is-home .mk-course.fl2, .app.is-home .hm-card, .app.is-home .hm-progress, .app.is-home .countdown, .app.is-home .hm-more.m3-list {
  border: 1.5px solid #D8B46A !important;
  background: linear-gradient(180deg, #13295c 0%, #0e2150 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 8px rgba(216,180,106,.18), 0 6px 16px rgba(0,0,0,.4) !important; }
.app.is-home .hm-card.hm-car { background: none !important; }
.app.is-home .mk-mary::before, .app.is-home .mk-mary::after, .app.is-home .mk-course.fl2::after, .app.is-home .hm-card::before, .app.is-home .hm-card::after, .app.is-home .hm-progress::before, .app.is-home .hm-progress::after, .app.is-home .countdown::after { display: none !important; }
.app.is-home .mk-ask, .app.is-home .mk-pill { border-width: 1px !important; background: transparent !important; box-shadow: none !important; }
.mk-course.fl2 .mk-course-photo { border: 1px solid #D8B46A !important; box-shadow: none !important; }
.app.is-home .mk-orb { border-width: 1.5px !important; box-shadow: 0 0 8px rgba(70,150,255,.4) !important; }
.app.is-home .hm-go { box-shadow: none !important; border: 0 !important; }
.mk-continue.gold3 { box-shadow: inset 0 1px 0 rgba(255,250,225,.6), 0 6px 14px rgba(0,0,0,.35) !important; border-width: 1px !important; }

/* 3. Type: titles 15/600-700, captions 12 muted — nothing else */
.app.is-home .mk-mary-copy b, .app.is-home .mk-course-title b, .app.is-home .hm-card b, .app.is-home .hm-prog-copy b, .app.is-home .hm-streak b, .app.is-home .countdown b, .app.is-home .hm-more button b { font: 700 15px/1.2 "Golos Text", sans-serif !important; letter-spacing: 0 !important; }
.app.is-home .mk-mary-copy small, .app.is-home .mk-course-title span, .app.is-home .mk-line, .app.is-home .hm-card small, .app.is-home .hm-prog-copy small, .app.is-home .hm-streak small, .app.is-home .countdown small { font: 400 12px/1.3 "Golos Text", sans-serif !important; color: rgba(225,230,245,.72) !important; }
.app.is-home .mk-line { color: rgba(240,243,250,.88) !important; }
.app.is-home .mk-ask, .app.is-home .mk-pill { font: 600 12px/1 "Golos Text", sans-serif !important; }
.app.is-home .m3-title { font-size: 17px !important; }

/* 4. Motion: only the gold button shines */
.app.is-home .hm-card .hm-img, .test-start .feat-ico, .test-start > svg { animation: none !important; transform: none !important; }
.btn::after, .hm-cont-btn::after { display: none !important; animation: none !important; }
.app.is-home .hm-grid3 .hm-img { filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)) !important; }

/* 5. Lower part matches the top: progress, interview date, more practice */
.app.is-home .hm-progress { border-radius: 18px !important; }
.app.is-home .countdown { border-radius: 18px !important; min-height: 64px; }
.app.is-home .hm-more.m3-list { border-radius: 18px !important; padding: 0 !important; overflow: hidden; }
.app.is-home .hm-more.m3-list button { min-height: 52px; padding: 0 14px !important; background: transparent !important; }
.app.is-home .hm-more.m3-list button + button { border-top: 1px solid rgba(216,180,106,.22) !important; }
.app.is-home .hm-more-ico { border: 1px solid rgba(216,180,106,.55) !important; background: transparent !important; box-shadow: none !important; }
.app.is-home .hm-more button em { background: transparent !important; border: 1px solid rgba(216,180,106,.6) !important; color: #E6C478 !important; font: 600 11.5px/1 "Golos Text", sans-serif !important; padding: 4px 8px !important; }
.app.is-home .hm-ring { box-shadow: none !important; }

/* 6. Tab bar: thinner, even icons, active = gold only */
#tabbar.tabs, .app #tabbar { padding-top: 4px !important; padding-bottom: max(6px, env(safe-area-inset-bottom)) !important; border-top: 1px solid rgba(216,180,106,.3) !important; box-shadow: none !important; }
.tabs button { min-height: 48px !important; color: rgba(225,230,245,.6) !important; }
.tabs button .feat-ico, .tabs button svg { width: 22px !important; height: 22px !important; }
.tabs button .feat-ico path, .tabs button .feat-ico rect, .tabs button .feat-ico circle { stroke-width: 1.6 !important; }
.tabs button span { font: 500 10.5px/1.1 "Golos Text", sans-serif !important; }
.tabs button.on::after { display: none !important; }
.tabs button.on::before { left: 32% !important; right: 32% !important; height: 2px !important; box-shadow: none !important; background: #D8B46A !important; }
/* No moving shine on the gold button */
.mk-shine, .mk-shine::after, .mk-continue.gold3::after { display: none !important; animation: none !important; }
/* Interview / In the car: same height, rim and type as the three cards above */
.app.is-home .hm-grid2 .hm-card { min-height: 0 !important; height: 150px !important; padding: 12px 8px !important; justify-content: flex-end !important; border-radius: 18px !important; }
.app.is-home .hm-grid2 .hm-card .hm-img { height: 62px !important; width: auto !important; margin: 0 auto 6px !important; }
.app.is-home .hm-grid2 .hm-card small { min-height: 0 !important; }
.app.is-home .hm-grid2 .hm-card.hm-car { border: 1.5px solid #D8B46A !important; overflow: hidden; }
.app.is-home .hm-grid3 .hm-card { height: 150px !important; min-height: 0 !important; }
/* Progress ring: thin gold ring */
.app.is-home .hm-ring { width: 64px !important; height: 64px !important; background: conic-gradient(#D8B46A calc(var(--p) * 1%), rgba(216,180,106,.22) 0) !important; }
.app.is-home .hm-ring b { width: 58px !important; height: 58px !important; background: #0f2352 !important; font: 700 15px/1 "Golos Text", sans-serif !important; color: #fff !important; }
.app.is-home .hm-progress { grid-template-columns: 64px minmax(0, 1fr) !important; }
.app.is-home .hm-progress .bar { height: 4px !important; background: rgba(216,180,106,.18) !important; }
.app.is-home .hm-progress .bar i { background: #D8B46A !important; }
/* Top buttons: thin gold rim like the other buttons */
.app.is-home .hm-top .lang-drop, .app.is-home .hm-profile { border: 1px solid #D8B46A !important; background: rgba(8,20,58,.55) !important; box-shadow: none !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.app.is-home .hm-profile .ui-ico, .app.is-home .hm-profile svg { color: #E6C478 !important; stroke: #E6C478 !important; }
.app.is-home .hm-grid3 .hm-card, .app.is-home .hm-grid2 .hm-card { height: auto !important; min-height: 164px !important; }
.app.is-home .hm-grid3 .hm-card small, .app.is-home .hm-grid2 .hm-card small { margin-bottom: 8px; }
.app.is-home .hm-card .hm-go { flex: none; }
.app.is-home .hm-grid2 .hm-card.hm-car { justify-content: flex-end !important; padding-top: 12px !important; }
.app.is-home .hm-car .hm-photo { background: linear-gradient(180deg, rgba(8,20,58,0) 0, rgba(8,20,58,.25) 35%, rgba(8,20,58,.85) 68%, #0e2150 100%), url("assets/home/car-bg.webp") center top / cover no-repeat !important; }
.app.is-home .hm-car b, .app.is-home .hm-car small { text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.app.is-home .hm-grid2 .hm-card.hm-car b { margin-top: auto !important; } .app.is-home .hm-grid2 .hm-card.hm-car .hm-go { margin-top: 4px !important; }
/* long place names: wrap to two lines inside the text column; only the title is narrowed so it never meets Change */
.mk-course.fl2 .mk-course-title { display: block !important; white-space: normal !important; }
.mk-course.fl2 .mk-course-title span { display: block; }
.mk-course.fl2 .mk-course-title b { display: inline; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
.mk-course.fl2 .mk-course-title { max-width: calc(100% - 84px); }
.mk-course.fl2 .mk-course-title i { display: inline-grid !important; vertical-align: -2px; margin-left: 4px; }
/* No photo for this place (DC, territories): a calm placeholder, never another place's picture */
.mk-course.fl2 .mk-ph { position: relative; background: radial-gradient(70% 70% at 50% 40%, #1b3a7e, #0c1d4a) !important; }
.mk-course.fl2 .mk-ph::before { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; color: #D8B46A; font-size: 26px; opacity: .8; }
.mk-course.fl2 .mk-ph img { position: relative; z-index: 1; }
/* State card: no "Your course:" label, just the place name */
.mk-course.fl2 .mk-course-title span { display: none !important; }
.mk-course.fl2 .mk-course-title b { font-size: 17px !important; }
/* Mary orb: glass ball — strong top highlight, rim light, inner depth, soft blue-gold glow */
.app.is-home .mk-orb { border: 1.5px solid rgba(255,226,160,.9) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 0 10px rgba(110,180,255,.75), 0 0 22px rgba(60,130,255,.5), 0 0 8px rgba(255,205,120,.45), 0 5px 10px rgba(0,0,0,.55) !important; }
.app.is-home .mk-orb img { filter: brightness(1.22) saturate(1.2) contrast(1.05); }
.app.is-home .mk-orb::after {
  background:
    radial-gradient(42% 28% at 36% 18%, rgba(255,255,255,.85), rgba(255,255,255,.25) 55%, rgba(255,255,255,0) 75%),
    radial-gradient(18% 10% at 66% 86%, rgba(190,230,255,.55), rgba(190,230,255,0) 80%),
    radial-gradient(100% 100% at 50% 50%, rgba(0,0,0,0) 58%, rgba(0,8,40,.55) 100%) !important; }
.app.is-home .mk-orb::before { content: ""; position: absolute; inset: 1px; border-radius: 50%; pointer-events: none; z-index: 1;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.55), inset 0 -4px 8px rgba(0,10,50,.6), inset 0 0 10px rgba(120,190,255,.45); }
.app.is-home .mk-orb::after { z-index: 2; }

/* ===== One look on every screen: navy page, navy blocks with gold rim, our paper instead of white ===== */
:root { --pp-paper: radial-gradient(120% 90% at 50% 0%, #fbf5e4 0%, #f1e5c8 60%, #e8d8b3 100%); --pp-rim: #b8924f; --pp-ink: #13245a; --pp-muted: #5f4e2c;
  --nv-block: linear-gradient(180deg, #13295c 0%, #0e2150 100%); --nv-rim: #D8B46A; }

/* Page: same navy as Home everywhere */
body .app:not(.is-welcome):not(.is-home) { background: linear-gradient(180deg, #071a4a 0, #04133a 420px, #030b26 100%) #030b26 !important; }

/* Navy blocks: one fill, 1.5px gold rim, 18 radius, one quiet shadow */
.view .panel.test-start, .view .car-settings, [data-screen="car"] .panel, .view .t3 .abcd button:not(.right):not(.wrong), .mary-chat .msg.mary, .mary-chips button, .view .iv-start, .view .pp-none, .cards3 .fchip:not(.on) {
  background: var(--nv-block) !important; border: 1.5px solid var(--nv-rim) !important; border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 8px rgba(216,180,106,.18), 0 6px 16px rgba(0,0,0,.4) !important; }
.mary-chips button, .cards3 .fchip:not(.on), .view .t3 .abcd button:not(.right):not(.wrong) { border-width: 1px !important; }

/* White surfaces become our paper */
.view article.panel:not(.t3-paper):not(.test-start), .view section.panel:not(.test-start):not(.car-settings), .view .panel.word-card, .view .panel.write-card, .view .panel.profile-card, .view .panel.theme-pick,
.view .qrow, .view .set-row, .view .iday-list button {
  background: var(--pp-paper) !important; border: 1px solid var(--pp-rim) !important; color: var(--pp-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 14px rgba(0,0,0,.35) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.view .panel:not(.test-start):not(.car-settings) :is(h2, h3, b, .q-en, label, strong), .view .qrow b, .view .set-row b, .view .iday-list span { color: var(--pp-ink) !important; }
.view .panel:not(.test-start):not(.car-settings) :is(p, small, .q-ru, .hint, .lede), .view .qrow small, .view .set-row small { color: var(--pp-muted) !important; }
.view .panel:not(.test-start):not(.car-settings) .q-num { color: #8a6424 !important; }
.view .panel:not(.test-start):not(.car-settings) a { color: #8a5a14 !important; }

/* Inputs on paper and on navy */
.view .panel:not(.test-start):not(.car-settings) :is(input, textarea, select), .view .search input {
  background: rgba(255,252,242,.75) !important; color: var(--pp-ink) !important; border: 1px solid rgba(168,120,44,.5) !important; border-radius: 12px; box-shadow: none !important; }
.view .search input { background: var(--pp-paper) !important; border-color: var(--pp-rim) !important; }
.view .car-settings select, [data-screen="car"] select, .view .iday-when input, .view > label input, .view #interviewInput {
  background: rgba(6,16,50,.7) !important; color: #fff !important; border: 1px solid var(--nv-rim) !important; border-radius: 12px; }
.view .car-settings label { color: rgba(232,214,168,.95) !important; }

/* Buttons sitting on paper: gold-brown outline, ink text (no light blue) */
.view .panel:not(.test-start):not(.car-settings) :is(.btn-aqua, .btn-line, .btn-quiet), .view .panel:not(.test-start):not(.car-settings) .btn.wide[data-act="flip"], .view .phon {
  background: transparent !important; color: var(--pp-ink) !important; border: 1px solid rgba(168,120,44,.6) !important; box-shadow: none !important; }
.view .phon { background: rgba(255,252,242,.55) !important; border-radius: 12px; }
.view .panel:not(.test-start):not(.car-settings) .btn-aqua::before { background: #8a6424 !important; }

/* Number badges on paper rows */
.view .qrow-no { background: transparent !important; color: #8a6424 !important; border: 1px solid rgba(168,120,44,.6) !important; }
.view .qrow.hard .qrow-no { color: #fff !important; background: linear-gradient(180deg, var(--coral), var(--coral-2)) !important; border-color: transparent !important; }
.view .set-row::after { color: #8a6424 !important; }
.view .iday-list button i { border-color: rgba(168,120,44,.6) !important; }

/* Buttons on navy (not paper): quiet navy with gold rim instead of plain dark pills */
.view > .stack-btns .btn-line, .view .stack-btns > .btn-line, .view .iv-nav .btn-line, .view > p > .btn-line { background: rgba(6,16,50,.55) !important; border: 1px solid var(--nv-rim) !important; color: #fff !important; box-shadow: none !important; }

/* One type rhythm for inner screens */
.view > h1, .view .screen-title { font-family: Literata, Georgia, serif !important; font-size: 26px !important; line-height: 1.15; margin: 6px 0 8px !important; color: #fff !important; }
.view > .lede, .view > p.hint { font: 400 13.5px/1.4 "Golos Text", sans-serif !important; color: rgba(225,230,245,.75) !important; }
.view .panel .q-en, .view .qrow b { font-family: "Golos Text", sans-serif; font-weight: 700; }
.view > * + .panel, .view > .panel + * { margin-top: 12px; }
.view .panel:not(.test-start):not(.car-settings) #interviewInput { background: rgba(255,252,242,.75) !important; color: var(--pp-ink) !important; border-color: rgba(168,120,44,.5) !important; }
/* Paper everywhere = the same paper: one 1px rim, no inner frame, no ring texture */
.pp-cover, .pp-page, .view .t3 .panel.t3-paper, .t3 .t3-paper, [data-screen="car"] .car-now, [data-screen="interview"] .officer-card .bubble {
  background: var(--pp-paper) !important; border: 1px solid var(--pp-rim) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 14px rgba(0,0,0,.35) !important; }
.pp-row.now { border-width: 1px !important; }
/* Header on inner screens = Home header: dark glass, thin gold rim, gold profile */
.top .head-side .lang-drop { border: 1px solid #D8B46A !important; background: rgba(8,20,58,.55) !important; box-shadow: none !important; }
.top .avatar { background: rgba(8,20,58,.55) !important; color: #E6C478 !important; border: 1px solid #D8B46A !important; box-shadow: none !important; font: 700 16px/1 "Golos Text", sans-serif !important; }
.cards3 .face .phon, .view .face .phon { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.seal-stamp { display: none !important; }
/* Cards: straight stack (no tilt), card taller (longer downwards, same width), buttons at the bottom */
.cards3 .card-stage::before { transform: none !important; top: 6px !important; right: -6px !important; bottom: -6px !important; left: 6px !important; }
.cards3 .card-stage::after { transform: none !important; top: 12px !important; right: -12px !important; bottom: -12px !important; left: 12px !important; }
.cards3 .card-stage, .cards3 .flip { min-height: max(440px, calc(100vh - 330px)) !important; min-height: max(440px, calc(100dvh - 330px)) !important; }
.cards3 .face { display: flex !important; flex-direction: column !important; }
.cards3 .face > .tools:not(.face-foot) { margin-top: auto !important; }
.cards3 .face.back > .tools { margin-top: auto !important; margin-bottom: 4px; }
.cards3 .face.back > .btn-quiet, .cards3 .face > .face-foot { margin-bottom: 6px; }
.cards3 .card-stage, .cards3 .flip { min-height: max(420px, calc(100vh - 420px)) !important; min-height: max(420px, calc(100dvh - 420px)) !important; }
/* Cards: real card proportions (like a playing card, 5:7), centred, finer corners, slim stack */
.cards3 .card-stage { width: min(calc(100% - 24px), calc((100vh - 400px) * .72), 360px) !important; width: min(calc(100% - 24px), calc((100dvh - 400px) * .72), 360px) !important; aspect-ratio: 5 / 7; min-height: 0 !important; height: auto !important; margin: 6px auto 22px !important; }
.cards3 .flip { min-height: 0 !important; height: 100% !important; }
.cards3 .face { border-radius: 14px !important; }
.cards3 .card-stage::before, .cards3 .card-stage::after { border-radius: 14px !important; }
.cards3 .card-stage::before { top: 4px !important; right: -4px !important; bottom: -4px !important; left: 4px !important; }
.cards3 .card-stage::after { top: 8px !important; right: -8px !important; bottom: -8px !important; left: 8px !important; }
.cards3 .face .q-en { font-size: clamp(17px, 5vw, 21px) !important; }
/* Lessons cover: the user's banner on top (Russian), stats and button under it */
.pp-cover.has-banner { padding: 0 0 14px !important; overflow: hidden; }
.pp-cover.has-banner .pp-banner { display: block; width: 100%; height: auto; border-radius: 17px 17px 0 0; }
.pp-cover.has-banner .pp-cover-stats, .pp-cover.has-banner > :not(.pp-banner):not(h1) { margin-left: 14px; margin-right: 14px; }

/* ===== Design 7 ===== */
/* 4. One serif for every title: Literata (the app's heading font) */
.view > h1, .view .screen-title, .t3 h1, .cards3 h1, .pp-cover h1, .pp-page h2, .cert h2, .cert-name, [data-screen="car"] .car-now h2, .cards3 .face .q-en, .view .t3 .t3-paper .q-en, [data-screen="interview"] .officer-card .bubble .q-en, .app.is-home .m3-title, .iday-hero h1 {
  font-family: Literata, Georgia, serif !important; font-optical-sizing: auto; letter-spacing: -.005em; }
.view > h1, .view .screen-title { font-weight: 600 !important; }

/* 3. One icon language: thin gold lines (the five Home pictures stay as approved) */
.ui-ico, .ui-ico * { stroke-width: 1.6 !important; }
.view .ui-ico { color: #E6C478; }
.view .panel:not(.test-start):not(.car-settings) .ui-ico, .pp-page .ui-ico { color: #8a6424; }
.view .feat-ico path, .view .feat-ico rect, .view .feat-ico circle { stroke: #E6C478 !important; stroke-width: 1.6 !important; }
.view .feat-ico .fill, .view .feat-ico .acc { fill: #E6C478 !important; stroke: #E6C478 !important; }
.test-start .feat-ico, .test-start > svg { filter: none !important; }

/* 5. Quiet screen change: a soft fade like turning a page, no jump */
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.app:not(.is-entry) .view.enter > *:not(.buddy) { animation: viewIn .32s ease-out both !important; animation-delay: 0s !important; }

/* 1. Passport stamps on finished lessons */
.pp-stamp { flex: none; width: 42px; height: 42px; display: grid; place-items: center; transform: rotate(-14deg); opacity: .92; }
.pp-stamp svg { width: 100%; height: 100%; overflow: visible; }
.pp-stamp .ring { fill: none; stroke: currentColor; stroke-width: 2; } .pp-stamp .ring.thin { stroke-width: 1; }
.pp-stamp circle:not(.ring) { fill: currentColor; }
.pp-stamp text { fill: currentColor; font: 700 13px/1 Literata, Georgia, serif; }
.pp-stamp.done { color: #1f3a7a; }
.pp-stamp.gold { color: #b07d22; filter: drop-shadow(0 0 4px rgba(226,188,114,.45)); }
.pp-stamp.gold text { font-size: 15px; }
.pp-row:nth-child(even) .pp-stamp { transform: rotate(9deg); }
.pp-row.done .pp-seal { border-color: #1f3a7a !important; box-shadow: 0 0 0 3px rgba(31,58,122,.12) !important; }

/* 2. Certificate: share button in our soft gold, quieter frame */
[data-screen="cert"] .btn.cta { background: linear-gradient(180deg, #FFE6A0 0%, #F1CD7D 30%, #E9BD62 58%, #D2A04A 100%) !important; color: #211A13 !important; border: 1px solid rgba(255,240,187,.9) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 14px rgba(0,0,0,.35) !important; }
.cert { box-shadow: 0 10px 26px rgba(0,0,0,.45) !important; }
.cert-stats b { font-family: Literata, Georgia, serif !important; }

/* 6. Empty states with a laurel instead of a blank line */
.empty-laurel { margin: 34px auto 10px; max-width: 280px; text-align: center; }
.empty-laurel svg { width: 120px; height: 70px; }
.empty-laurel path { fill: none; stroke: #D8B46A; stroke-width: 1.6; stroke-linecap: round; }
.empty-laurel .leaf { fill: rgba(216,180,106,.18); }
.empty-laurel .star { fill: #D8B46A; stroke: none; }
.empty-laurel p { margin: 10px 0 0; color: rgba(225,230,245,.8); font: 400 14px/1.4 "Golos Text", sans-serif; }

/* Lessons cover button stays inside the paper */
.pp-cover.has-banner .pp-go, .pp-cover.has-banner .btn { width: calc(100% - 28px) !important; margin-left: 14px !important; margin-right: 14px !important; box-sizing: border-box; }
.pp-stamp { width: 46px; height: 46px; margin-right: 2px; }
.pp-row { overflow: visible !important; }
.pp-stamp.done { color: #23408a; }

/* 7. "Светлая" = paper look: parchment page, paper blocks with gold rim, navy ink. The navy look stays for Auto / Тёмная */
html:has(.app.theme-paper), body:has(.app.theme-paper) { background: #f3ead6 !important; }
body .app.theme-paper:not(.is-welcome):not(.is-home), body .app.theme-paper.is-home:has(#view[data-screen="home"]) {
  background: linear-gradient(180deg, #f8f1e0 0, #f1e6cc 100%) #f3ead6 !important; }
body .app.theme-paper.is-home:has(#view[data-screen="home"]) {
  background: linear-gradient(180deg, rgba(243,234,214,0) 0, rgba(243,234,214,0) calc(min(33.33vw, 146.67px) - 34px), #f3ead6 calc(min(33.33vw, 146.67px) + 2px), #f1e6cc 100%) no-repeat,
  #f3ead6 url("assets/home-banner.jpg") center top / 100% auto no-repeat !important; }
.app.theme-paper .app.is-home .hm-tag, .app.theme-paper .hm-tag { color: #13245a !important; text-shadow: none !important; }

/* blocks */
.app.theme-paper :is(.mk-mary, .mk-course, .hm-card:not(.hm-car), .hm-progress, .countdown, .hm-more.m3-list, .panel.test-start, .car-settings, .t3 .abcd button:not(.right):not(.wrong), .mary-chat .msg.mary, .mary-chips button, .iv-start, .pp-none, .cards3 .fchip:not(.on), .car-mini, .car-resume, .iv-nav .btn-line, .stack-btns .btn-line, .iv-btn, .exam-switch, .seg) {
  background: linear-gradient(180deg, #fffaf0 0%, #f6ecd4 100%) !important; border-color: #c9a35a !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 12px rgba(120,90,40,.18) !important; }
.app.theme-paper .hm-ring b { background: #fffaf0 !important; }
.app.theme-paper .hm-more.m3-list button + button { border-top-color: rgba(168,120,44,.25) !important; }

/* ink: navy text instead of white, except on coloured buttons and photos */
.app.theme-paper .view :is(h1, h2, h3, b, strong, label, p, small, span, em, i, a):not(.btn *):not(.btn-green *):not(.btn-again *):not(.btn-coral *):not(.hm-car *):not(.officer-card .adam-tag):not(.car-play *):not(.big-mic *):not(.abcd .right *):not(.abcd .wrong *):not(.mk-continue *):not(.fchip.on *):not(.seg .on *):not(.qrow-no):not(.pp-seal em):not(.hm-go) {
  color: #13245a !important; text-shadow: none !important; }
.app.theme-paper .view :is(small, .lede, .hint, .mk-line, .mk-mary-copy small, .hm-card small, .hm-prog-copy small, .hm-streak small, .countdown small):not(.btn *):not(.hm-car *) { color: #6b5a36 !important; }
.app.theme-paper .view :is(.btn-line, .btn-quiet, .iv-btn, .car-mini, .mk-ask, .mk-pill, .seg .choice:not(.on), .fchip:not(.on)) { color: #13245a !important; }
.app.theme-paper .view .mk-ask, .app.theme-paper .view .mk-pill { border-color: #b8924f !important; }
.app.theme-paper .view .ui-ico, .app.theme-paper .view .feat-ico path, .app.theme-paper .view .feat-ico rect, .app.theme-paper .view .feat-ico circle { color: #8a6424 !important; stroke: #8a6424 !important; }
.app.theme-paper .empty-laurel p { color: #6b5a36 !important; }
.app.theme-paper .view > h1::after, .app.theme-paper .view .screen-title::after { background: #b8924f !important; }

/* header and tab bar */
.app.theme-paper .top .head-side .lang-drop, .app.theme-paper .top .avatar, .app.theme-paper .hm-top .lang-drop, .app.theme-paper .hm-profile { background: rgba(255,250,240,.85) !important; color: #13245a !important; border-color: #b8924f !important; }
.app.theme-paper .top .head-side .lang-drop b, .app.theme-paper .hm-top .lang-drop b, .app.theme-paper .top .lang-drop i, .app.theme-paper .hm-top .lang-drop i { color: #13245a !important; }
.app.theme-paper .top .avatar, .app.theme-paper .hm-profile .ui-ico { color: #8a6424 !important; stroke: #8a6424 !important; }
.app.theme-paper .text-link, .app.theme-paper .back-link { color: #13245a !important; }
.app.theme-paper #tabbar, .app.theme-paper:not(.is-welcome) #tabbar, .app.theme-paper:has(#view[data-screen="home"]) #tabbar { background: rgba(251,246,232,.96) !important; border-top: 1px solid #d8b46a !important; }
.app.theme-paper .tabs button { color: #6b5a36 !important; }
.app.theme-paper .tabs button .feat-ico path, .app.theme-paper .tabs button .feat-ico rect, .app.theme-paper .tabs button .feat-ico circle { stroke: #6b5a36 !important; }
.app.theme-paper .tabs button.on { color: #a8782c !important; }
.app.theme-paper .tabs button.on .feat-ico path, .app.theme-paper .tabs button.on .feat-ico rect, .app.theme-paper .tabs button.on .feat-ico circle { stroke: #a8782c !important; }
.app.theme-paper .tabs button.on::before { background: #a8782c !important; }
.app.theme-paper .exam-switch button { color: #6b5a36 !important; }
.app.theme-paper .exam-switch button.on { color: #a8782c !important; }
.app.theme-paper .exam-switch { background: transparent !important; box-shadow: none !important; border-bottom-color: rgba(168,120,44,.35) !important; }
.app.theme-paper .car-skip { background: linear-gradient(180deg, #fffaf0, #f6ecd4) !important; border: 1px solid #c9a35a !important; }
.app.theme-paper .car-skip svg, .app.theme-paper .car-skip svg * { stroke: #13245a !important; fill: #13245a !important; }
.app.theme-paper .car-settings select, .app.theme-paper [data-screen="car"] select, .app.theme-paper .view #interviewInput, .app.theme-paper .view select { background: #fffaf0 !important; color: #13245a !important; border-color: #c9a35a !important; }
.app.theme-paper .car-mini.stop { color: #8a6424 !important; }
.app.theme-paper #ivJump, .app.theme-paper .iv-jump select { background: #fffaf0 !important; color: #13245a !important; border: 1px solid #c9a35a !important; }
.app.is-home .hm-plan { display: block; margin-top: 6px; color: #E6C478 !important; font: 600 12px/1.3 "Golos Text", sans-serif !important; } .app.theme-paper .hm-plan { color: #8a6424 !important; }

/* ===== Cards in the user's design (2:3 card) ===== */
.cards3 .card-stage { aspect-ratio: 2 / 3 !important; width: min(calc(100% - 24px), calc((100vh - 400px) * .667), 360px) !important; width: min(calc(100% - 24px), calc((100dvh - 400px) * .667), 360px) !important; }
/* front: number, thin rule, the question big in the middle, translation, pronunciation */
.cards3 .face:not(.back) { justify-content: flex-start; text-align: center; }
.cards3 .face:not(.back) .face-top { justify-content: center !important; position: relative; padding-bottom: 10px; margin-bottom: 0 !important; }
.cards3 .face:not(.back) .face-top .q-num { font: 600 22px/1 Literata, Georgia, serif !important; letter-spacing: 0 !important; color: #a8782c !important; margin: 0 !important; }
.cards3 .face:not(.back) .face-top::after { content: "◆"; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 8px; color: #b8924f; width: 60%; text-align: center;
  background: linear-gradient(90deg, transparent, #b8924f 30%, transparent 46%, transparent 54%, #b8924f 70%, transparent) center / 100% 1px no-repeat; }
.cards3 .face:not(.back) .fav-btn { position: absolute; right: 0; top: -4px; }
.cards3 .face:not(.back) .q-en { margin-top: auto !important; font-size: clamp(20px, 6.2vw, 26px) !important; line-height: 1.18 !important; color: #14285a !important; }
.cards3 .face:not(.back) .q-ru { margin-top: 12px !important; font-size: 14px !important; color: #2a3a66 !important; }
.cards3 .face:not(.back) .phon { font-style: italic; color: #5f5a6e !important; font-size: 12.5px !important; }
.cards3 .face:not(.back) .phon::before { content: "("; } .cards3 .face:not(.back) .phon::after { content: ")"; }
.cards3 .face:not(.back) > .tools:not(.face-foot) { margin-top: auto !important; }
/* back: the drawing on the left in a soft oval, the answer on the right */
.cards3 .face.back.has-art { display: grid !important; grid-template-columns: 46% minmax(0, 1fr); grid-auto-rows: min-content; column-gap: 8px; align-content: start; text-align: left; }
.cards3 .face.back.has-art > .ans-art { grid-column: 1; grid-row: 1 / span 12; align-self: stretch; min-height: 74%; margin: 4% 0 4% -2%;
  background-size: 800% 800%; background-repeat: no-repeat;
  -webkit-mask: radial-gradient(50% 50% at 50% 50%, #000 62%, transparent 100%); mask: radial-gradient(50% 50% at 50% 50%, #000 62%, transparent 100%); }
.cards3 .face.back.has-art > :not(.ans-art) { grid-column: 2; }
.cards3 .face.back.has-art > .q-num:first-of-type { justify-self: start; margin-top: 28% !important; padding: 5px 12px; border-radius: 999px; background: linear-gradient(180deg, #f6dc9a, #d9a94f); color: #3a2600 !important; font: 700 12px/1 Literata, Georgia, serif !important; letter-spacing: .04em; border: 1px solid #b8862c; }
.cards3 .face.back.has-art .q-num + .q-num { margin-top: 10px !important; font-size: 9.5px !important; }
.cards3 .face.back.has-art .q-en { font: 700 clamp(18px, 5.4vw, 22px)/1.15 Literata, Georgia, serif !important; color: #14285a !important; text-align: left !important; margin: 2px 0 6px !important; }
.cards3 .face.back.has-art p { text-align: left !important; font-size: 12px; }
.cards3 .face.back.has-art .q-ru { font: 700 15px/1.25 Literata, Georgia, serif !important; color: #14285a !important; margin-top: 8px !important; }
.cards3 .face.back.has-art .hint:last-of-type, .cards3 .face.back.has-art .motif { display: none !important; }
.cards3 .face.back.has-art > .tools, .cards3 .face.back.has-art > .btn-quiet { grid-column: 1 / -1; justify-self: center; text-align: center; }
.cards3 .face.back.has-art > .tools { margin-top: 10px !important; }
.cards3 .face.back.has-art > .ans-art { -webkit-mask: radial-gradient(50% 50% at 50% 50%, #000 78%, transparent 100%) !important; mask: radial-gradient(50% 50% at 50% 50%, #000 78%, transparent 100%) !important; margin: 2% -2% 2% -4% !important; min-height: 82%; }
.cards3 .face.back.has-art > .q-num:first-of-type { padding: 4px 10px !important; font-size: 11px !important; }
.cards3 .face:not(.back) .face-foot .btn-line { font-size: 13px !important; padding: 0 12px !important; white-space: nowrap; }
/* Back with drawing, v2: the drawing keeps its own shape (fixed box on the left), text column on the right scrolls if long */
.cards3 .face.back.has-art { display: flex !important; flex-direction: column !important; align-items: flex-start !important; padding-left: 47% !important; padding-right: 7% !important; overflow-y: auto !important; overflow-x: hidden; scrollbar-width: none; }
.cards3 .face.back.has-art::-webkit-scrollbar { display: none; }
.cards3 .face.back.has-art > .ans-art { position: absolute !important; left: 6%; top: 50%; transform: translateY(-50%); width: 40%; min-height: 0 !important; height: auto; aspect-ratio: 188 / 432; margin: 0 !important; background-size: 800% 800% !important; }
.cards3 .face.back.has-art > :not(.ans-art) { position: relative; width: 100%; }
.cards3 .face.back.has-art > .q-num:first-of-type { width: auto; margin-top: 18% !important; }
.cards3 .face.back.has-art .q-en { font-size: clamp(16px, 4.6vw, 20px) !important; }
.cards3 .face.back.has-art p { font-size: 11.5px !important; line-height: 1.3 !important; margin: 4px 0 !important; }
.cards3 .face.back.has-art .q-ru { font-size: 14px !important; }
.cards3 .face.back.has-art > .tools { margin: 10px 0 0 !important; width: auto; justify-self: auto; }
.cards3 .face.back.has-art > .tools .btn-line { font-size: 12px !important; padding: 0 10px !important; min-height: 34px !important; }
.cards3 .face.back.has-art > .tools .hint { display: none !important; }
.cards3 .face.back.has-art > .btn-quiet { width: auto; font-size: 12.5px !important; margin: 2px 0 14% !important; padding: 0 !important; min-height: 32px; }
.cards3 .face:not(.back) .tools .hint { display: none !important; }

/* Old-app features in the new style */
.cards3 .cards-tools { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin: 8px 0 2px; }
.cards-tools label, .check-order, .iv-text { display: grid; gap: 4px; }
.cards-tools label span, .check-order span, .iv-text span { font: 600 11.5px/1.2 "Golos Text", sans-serif; color: rgba(232,214,168,.9); }
.cards-tools select, .check-order select { min-height: 36px; padding: 0 10px; border-radius: 12px; background: rgba(6,16,50,.7); color: #fff; border: 1px solid #D8B46A; font: 600 13px/1 "Golos Text", sans-serif; }
.view .panel.check-start { margin-top: 14px !important; text-align: center; }
.view .panel.check-start h2 { margin: 2px 0 4px !important; color: #fff !important; font-family: Literata, Georgia, serif !important; }
.view .panel.check-start .hint { color: rgba(225,230,245,.75) !important; margin: 0 0 10px !important; }
.check-order { text-align: left; margin: 0 0 10px; }
.view .panel.check-start .btn-line { width: 100%; background: rgba(6,16,50,.55) !important; border: 1px solid #D8B46A !important; color: #fff !important; }
.view .panel.check-start .btn-quiet { margin-top: 6px; color: #E6C478 !important; }
.iv-rec { display: grid; gap: 4px; justify-items: center; margin: 10px 0 4px; }
.iv-rec .iv-btn.rec { width: 100%; min-height: 48px; }
.iv-rec .iv-btn.rec i { font-style: normal; color: #ff6a5c; font-size: 14px; }
.iv-rec .iv-btn.rec.on { border-color: #ff6a5c !important; }
.iv-rec small { color: rgba(225,230,245,.65); font-size: 11.5px; }
.iv-text { margin: 8px 0; }
.iv-text textarea { width: 100%; box-sizing: border-box; border-radius: 12px; padding: 10px; background: rgba(6,16,50,.6); color: #fff; border: 1px solid #D8B46A; font: 400 14px/1.35 "Golos Text", sans-serif; }
.iv-self { text-align: center; margin: 10px 0 6px !important; }
.app.theme-paper :is(.cards-tools select, .check-order select, .iv-text textarea) { background: #fffaf0 !important; color: #13245a !important; border-color: #c9a35a !important; }
.app.theme-paper :is(.cards-tools label span, .check-order span, .iv-text span) { color: #6b5a36 !important; }
.view .cards-tools select, .view .check-order select { background: rgba(6,16,50,.7) !important; color: #fff !important; border: 1px solid #D8B46A !important; -webkit-text-fill-color: #fff; }
.app.theme-paper .view .cards-tools select, .app.theme-paper .view .check-order select { background: #fffaf0 !important; color: #13245a !important; -webkit-text-fill-color: #13245a; }
.cards3 .card-stage { width: min(calc(100% - 24px), calc((100vh - 470px) * .667), 360px) !important; width: min(calc(100% - 24px), calc((100dvh - 470px) * .667), 360px) !important; }
.cards3 .cards-tools label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cards3 .face:not(.back) .face-foot .btn-line { font-size: 12px !important; padding: 0 10px !important; }
/* Cards: one gold dropdown for order and filter */
.cards3 .card-mode { position: relative; display: block; margin: 6px 0 10px; }
.cards3 .card-mode select { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; padding: 0 40px 0 18px; border-radius: 22px;
  background: linear-gradient(180deg, #FFE6A0 0%, #F1CD7D 30%, #E9BD62 58%, #D2A04A 100%) !important; color: #211A13 !important; -webkit-text-fill-color: #211A13;
  border: 1px solid rgba(255,240,187,.9) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 4px 10px rgba(0,0,0,.3) !important;
  font: 600 15px/1 "Golos Text", sans-serif; text-align: center; text-align-last: center; }
.cards3 .card-mode i { position: absolute; right: 16px; top: 50%; transform: translateY(-58%); font-style: normal; font-size: 18px; color: #211A13; pointer-events: none; }
/* front: question fits the card on iPhone */
.cards3 .face:not(.back) .q-en { font-size: clamp(18px, 5.3vw, 22px) !important; }
.cards3 .face:not(.back) .q-ru { font-size: 13px !important; margin-top: 8px !important; }
.cards3 .face:not(.back) .phon { font-size: 11.5px !important; }
.cards3 .card-stage { width: min(calc(100% - 24px), calc((100vh - 410px) * .667), 360px) !important; width: min(calc(100% - 24px), calc((100dvh - 410px) * .667), 360px) !important; }
/* Order dropdowns: quiet navy pill with a thin gold rim (not a gold button) */
.card-mode { position: relative; display: block; margin: 6px 0 10px; }
.view .card-mode select, .cards3 .card-mode select { -webkit-appearance: none; appearance: none; width: 100%; height: 42px; padding: 0 40px 0 16px; border-radius: 21px;
  background: rgba(6,16,50,.6) !important; color: #fff !important; -webkit-text-fill-color: #fff;
  border: 1px solid #D8B46A !important; box-shadow: none !important; font: 600 14.5px/1 "Golos Text", sans-serif; text-align: left; text-align-last: left; }
.card-mode i { position: absolute; right: 16px; top: 50%; transform: translateY(-58%); font-style: normal; font-size: 17px; color: #E6C478 !important; pointer-events: none; }
.app.theme-paper .view .card-mode select { background: #fffaf0 !important; color: #13245a !important; -webkit-text-fill-color: #13245a; border-color: #c9a35a !important; }
.app.theme-paper .card-mode i { color: #8a6424 !important; }
.view .panel.check-start .card-mode { margin: 0 0 10px; }
/* No "Голос: Мари" line on test questions */
.t3 .tools .hint, .t3 .test-card .hint { display: none !important; }
.office-note { margin: 8px 0 0 !important; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(217,74,58,.45); background: rgba(255,240,232,.7); color: #8a2a1e !important; font: 600 12px/1.35 "Golos Text", sans-serif !important; text-align: left; }
.office-note a { color: #8a2a1e !important; text-decoration: underline; }
/* Car: no "Голос: Мари" line */
[data-screen="car"] .car-now .car-voice { display: none !important; }

/* ===== Review pass (designer + editor) ===== */
:root { --gold-btn: linear-gradient(180deg, #f1d9a0 0%, #e2bd76 55%, #d7b06a 100%); --elev: 0 4px 12px rgba(2,10,36,.35); --rim-strong: rgba(216,180,106,.8); --rim: rgba(216,180,106,.5); --rim-soft: rgba(216,180,106,.25); }

/* 1. Primary actions are gold; coral only means "study again / wrong" */
.view .btn:not(.btn-again):not(.btn-green), .view .btn.wide, .view .btn.cta, .view .big-mic:not(.on) {
  background: var(--gold-btn) !important; color: #1a1405 !important; border: 1px solid rgba(255,240,187,.85) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), var(--elev) !important; }
.view .btn:not(.btn-again):not(.btn-green) * { color: #1a1405 !important; }
.view .big-mic:not(.on) { background: #0e2150 !important; border: 1.5px solid #d8b46a !important; }
.view .big-mic:not(.on) svg, .view .big-mic:not(.on) svg * { stroke: #e6c478 !important; }
.view .big-mic .ring { border-color: rgba(216,180,106,.25) !important; box-shadow: none !important; background: none !important; }
.view .big-mic.on { background: linear-gradient(180deg, var(--coral), var(--coral-2)) !important; }

/* 2. Mary orb: navy disc, gold rim, gold line wave, no glow */
.orb-gold { width: 100%; height: 100%; display: block; }
.orb-gold .disc { fill: #0e2150; stroke: #d8b46a; stroke-width: 1.2; }
.orb-gold .wave { fill: none; stroke: #e6c478; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mary-stage .ms-ring, .mary-stage [class*="ring"] { border-color: rgba(216,180,106,.18) !important; box-shadow: none !important; background: none !important; filter: none !important; }
.hm-car .hm-photo + b, [data-screen="car"] .car-voice i { color: inherit; }

/* 3. No coloured halos: one elevation for every button */
.btn-green, .btn-again, .view .grade-row button, .view .abcd button { box-shadow: var(--elev) !important; }
.car-play.round .glow { display: none !important; }
.car-play.round .disc { box-shadow: inset 0 2px 0 rgba(255,255,255,.5), var(--elev) !important; }

/* 4. One Know / Study again pair everywhere (Cards version) */
.view .grade-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
.view .grade-row .btn-again, .view .grade-row .btn-green { min-height: 56px !important; border-radius: 999px !important; font: 700 16px/1 "Golos Text", sans-serif !important; }
.view .grade-row .btn-again { background: #d9574c !important; color: #fff !important; border: 1px solid rgba(255,200,190,.35) !important; }
.view .grade-row .btn-green { background: #0f6b4f !important; color: #fff !important; border: 1px solid rgba(216,180,106,.6) !important; }

/* 5. Calm top on inner screens: no language pill, smaller title, underline only on tab roots */
.app:not(.is-home):not(.is-welcome) .top { min-height: 0 !important; padding-top: 4px !important; padding-bottom: 0 !important; }
.top .avatar { width: 36px !important; height: 36px !important; font-size: 14px !important; }
.view > h1, .view .screen-title, .t3 h1, .cards3 h1 { font-size: 22px !important; margin: 2px 0 6px !important; }
.view > h1::after, .view .screen-title::after, .t3 h1::after { display: none !important; }
.app:has(#view[data-screen="lessons"]) .view > h1::after, .app:has(#view[data-screen="cards"]) .cards3 h1::after, .app:has(#view[data-screen="test"]) .t3 h1::after, .app:has(#view[data-screen="car"]) .view > h1::after { display: block !important; }
.view > .lede { margin: 0 0 12px !important; }

/* 6. Paper only for study content: settings, checklist, search and test stats go navy */
.view .set-row, .view .iday-list button, .view .search input, .view .panel.profile-card, .view .panel.theme-pick, .view .panel.lang-panel, [data-screen="cabinet"] .view section.panel, [data-screen="cabinet"] section.panel, .view .panel.test-start .test-rules span {
  background: linear-gradient(180deg, #13295c, #0e2150) !important; border: 1px solid var(--rim) !important; color: #fff !important; box-shadow: var(--elev) !important; }
.view .set-row small, .view .panel.profile-card label, .view .panel.lang-panel label, .view .panel.theme-pick .q-num, .view .iday-list span { color: rgba(232,214,168,.9) !important; }
.view .set-row b, .view .panel.profile-card b { color: #fff !important; }
.view .set-row::after { color: #e6c478 !important; }
.view .panel.test-start .test-rules span { color: rgba(232,214,168,.9) !important; }
.view .panel.test-start .test-rules b { color: #e6c478 !important; font: 600 32px/1 Literata, serif !important; }
.view .panel.profile-card input, .view .panel.lang-panel select, .view .search input, [data-screen="cabinet"] .panel input { background: rgba(6,16,50,.7) !important; color: #fff !important; border: 1px solid var(--rim) !important; color-scheme: dark; }
.view input[type="date"] { color-scheme: dark; }
.view .panel.lang-panel { display: grid; gap: 6px; }
.view .panel.lang-panel select { min-height: 44px; border-radius: 12px; padding: 0 12px; font: 600 15px/1 "Golos Text", sans-serif; }
.pp-mrz { grid-column: 1 / -1; margin: 10px 0 0 !important; font: 500 11px/1.2 ui-monospace, "SF Mono", Menlo, monospace !important; letter-spacing: .2em; color: rgba(216,180,106,.6) !important; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.view .panel.profile-card { flex-wrap: wrap; }

/* 7. One question style: serif 22px navy on paper; one small-caps counter */
.view .panel:not(.test-start) .q-en, [data-screen="lesson"] .q-en, [data-screen="reading"] .q-en, [data-screen="answers"] .panel p:nth-of-type(1) { font: 600 21px/1.25 Literata, Georgia, serif !important; color: #13285a !important; }
.view .q-num, .view .write-head .chip, [data-screen="reading"] .q-num, [data-screen="vocab"] .chip { font: 700 12px/1.2 "Golos Text", sans-serif !important; letter-spacing: .14em !important; text-transform: uppercase; color: #8a6424 !important; background: none !important; padding: 0 !important; border: 0 !important; }
.view .stack-btns .btn-line, .view .iv-nav .btn-line, .view [data-act="read-next"], .view [data-act="write-next"], .view [data-act="lesson-prev"], .view [data-act="vocab-next"] {
  background: rgba(6,16,50,.55) !important; color: #fff !important; border: 1px solid var(--rim) !important; border-radius: 999px !important; min-height: 50px !important; box-shadow: none !important; }
.view .abcd i { background: transparent !important; color: #e6c478 !important; border: 1px solid var(--rim) !important; }

/* 8. Interview: officer in an oval gold frame on navy, no photo background */
[data-screen="interview"] .officer-card { background: radial-gradient(70% 60% at 50% 30%, #16306a, #0b1b44) !important; border: 1px solid var(--rim) !important; box-shadow: var(--elev) !important; padding: 18px 0 12px; }
[data-screen="interview"] .officer-scene { display: none !important; }
[data-screen="interview"] .officer-card img { width: 140px !important; height: 170px !important; margin: 0 auto 10px !important; border-radius: 50% / 46% !important; object-fit: cover !important; object-position: center 12% !important; border: 1px solid #d8b46a !important; filter: none !important; background: #0e2150; }
[data-screen="interview"] .officer-card .bubble { position: relative !important; left: auto !important; right: auto !important; bottom: auto !important; margin: 0 12px !important; }
[data-screen="interview"] .adam-tag { top: 12px !important; right: 12px !important; }

/* Signature: faint engraved texture on the certificate and the interview countdown */
.cert, .app.is-home .countdown { background-image: repeating-radial-gradient(circle at 50% 120%, rgba(216,180,106,.035) 0 1px, transparent 1px 6px), var(--card-one, none) !important; }
.cert { background-image: repeating-radial-gradient(circle at 50% 120%, rgba(120,90,40,.05) 0 1px, transparent 1px 6px), url("assets/card-paper.webp") !important; background-size: auto, 100% 100% !important; }

/* Consistency: one rim weight on home pills, light-theme fixes */
.app.is-home .mk-ask, .app.is-home .mk-pill { border-color: var(--rim-strong) !important; }
.app.theme-paper .cards-count .progress, .app.theme-paper .t3-progress { background: rgba(19,40,90,.12) !important; }
.app.theme-paper .view .set-row, .app.theme-paper .view .panel.profile-card, .app.theme-paper .view .panel.lang-panel, .app.theme-paper .view .panel.test-start .test-rules span { background: linear-gradient(180deg, #fffaf0, #f6ecd4) !important; color: #13245a !important; }
.app.theme-paper .view .panel.profile-card input, .app.theme-paper .view .panel.lang-panel select { background: #fffaf0 !important; color: #13245a !important; color-scheme: light; }
.app.theme-paper .pp-mrz { color: rgba(120,90,40,.6) !important; }
/* QA fixes */
/* cards never shrink below a readable size on short screens; the page scrolls instead */
.cards3 .card-stage { width: min(calc(100% - 24px), max(250px, calc((100vh - 410px) * .667)), 360px) !important; width: min(calc(100% - 24px), max(250px, calc((100dvh - 410px) * .667)), 360px) !important; }
@media (max-height: 700px) { .cards3 .face:not(.back) .q-en { font-size: 18px !important; } .cards3 .face.back.has-art .q-en { font-size: 16px !important; } }
/* paper theme contrast */
.app.theme-paper .mary-chips button { color: #13245a !important; }
.app.theme-paper .cert-lock b, .app.theme-paper .cert-lock span, .app.theme-paper .iday-run b, .app.theme-paper .iday-run small, .app.theme-paper .iday-run span { color: #fff !important; }
.app.theme-paper .view .panel.check-start .btn-line { background: #fffaf0 !important; color: #13245a !important; border-color: #c9a35a !important; }
/* theme picker: three equal columns, no wrapping */
.view .theme-pick .seg { grid-template-columns: repeat(3, 1fr) !important; }
.view .theme-pick .seg .choice { white-space: nowrap; font-size: 14px !important; }

/* Reading: speech recognition result */
.read-result .rd-words { font-family: Literata, Georgia, serif !important; font-size: 19px !important; line-height: 1.55 !important; margin: 6px 0 10px !important; }
.read-result .rd-same { color: #0f6b4f !important; }
.read-result .rd-missing, .read-result .rd-replace { color: #d9574c !important; text-decoration: underline wavy rgba(217,87,76,.55) !important; text-underline-offset: 4px !important; }
.read-result .rd-extra { color: #8a8a8a !important; text-decoration: line-through !important; }
.read-result.match .result-head { color: #0f6b4f !important; }
.read-result .result-head { font-weight: 600 !important; color: #13285a !important; margin: 0 !important; }
.btn.is-live { box-shadow: 0 0 0 3px rgba(217,87,76,.35), 0 6px 18px rgba(217,87,76,.25) !important; }
.read-interim { font-style: italic !important; text-align: center !important; }
.read-result .iv-text span { color: #6b5a3a !important; }
.read-result textarea { min-height: 60px !important; height: 60px !important; }
.read-result .rd-words::first-letter { text-transform: uppercase; }

/* Interview: officer portrait, oral questions */
[data-screen="interview"] .adam-tag { display: none !important; }
[data-screen="interview"] .officer-card { padding: 12px 12px 14px !important; overflow: hidden; }
[data-screen="interview"] .iv-seal-top { margin: 0 0 10px !important; text-align: center !important; font: 600 10.5px/1 Inter, system-ui, sans-serif !important; letter-spacing: .22em !important; text-transform: uppercase !important; color: #d8b46a !important; }
[data-screen="interview"] .officer-frame { position: relative; height: 300px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(216,180,106,.7); background: #13285a; box-shadow: inset 0 0 0 1px rgba(255,240,187,.08); }
[data-screen="interview"] .officer-frame::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(180deg, rgba(11,27,68,0), rgba(11,27,68,.75)); pointer-events: none; }
[data-screen="interview"] .officer-card .officer-frame img { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; object-fit: cover !important; object-position: center 22% !important; background: none !important; }
[data-screen="interview"] .officer-card .bubble { margin: -34px 6px 0 !important; z-index: 2; }
[data-screen="interview"] .officer-card .bubble.oral { text-align: center !important; padding: 14px 14px 12px !important; }
[data-screen="interview"] .oral-line { margin: 0 0 8px !important; font: 600 16px/1.35 Literata, Georgia, serif !important; color: #13285a !important; }
[data-screen="interview"] .oral-peek { background: none !important; border: 0 !important; color: #8a6a2e !important; font: 500 13px Inter, system-ui, sans-serif !important; text-decoration: underline !important; text-underline-offset: 3px !important; padding: 4px !important; }
[data-screen="interview"] .officer-frame { height: 330px !important; }
[data-screen="interview"] .officer-card .officer-frame img { object-position: center 34% !important; }
[data-screen="interview"] .officer-card .bubble { margin-top: -16px !important; }

/* Car: fuller 3D play button (soft, no lamp) */
[data-screen="car"] .car-play.round .disc {
  background: radial-gradient(120% 90% at 38% 22%, #fff3c9 0%, #f2d48c 28%, #e3b964 58%, #c08a3a 100%) !important;
  border: 1px solid #fff0bb !important;
  box-shadow:
    inset 0 3px 2px rgba(255,255,255,.65),
    inset 0 -10px 18px rgba(140,90,30,.45),
    inset 0 0 0 1px rgba(255,240,187,.35),
    0 14px 26px rgba(0,0,0,.45),
    0 4px 8px rgba(0,0,0,.35),
    0 10px 34px rgba(217,167,77,.28) !important;
}
[data-screen="car"] .car-play.round .disc i { filter: drop-shadow(0 1px 0 rgba(255,240,190,.7)) drop-shadow(0 -1px 0 rgba(90,55,15,.35)) !important; }
[data-screen="car"] .car-play.round:active .disc { transform: translateY(2px) scale(.985); box-shadow: inset 0 3px 2px rgba(255,255,255,.5), inset 0 -6px 12px rgba(140,90,30,.45), 0 6px 14px rgba(0,0,0,.4), 0 6px 22px rgba(217,167,77,.22) !important; }
[data-screen="car"] .car-play.round .disc { overflow: hidden; background: radial-gradient(110% 95% at 40% 25%, #fff4cf 0%, #f0cf82 30%, #dcae58 62%, #a8742c 100%) !important; }
[data-screen="car"] .car-play.round .disc::before { content: ""; position: absolute; left: 18%; right: 18%; top: 5%; height: 34%; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; }
[data-screen="car"] .car-play.round .disc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 -14px 22px rgba(110,70,20,.38); pointer-events: none; }
[data-screen="car"] .car-play.round .disc i { position: relative; z-index: 1; }

/* Interview outcome on Home */
.panel.outcome { text-align: center !important; padding: 16px 14px !important; }
.panel.outcome h2 { margin: 0 0 8px !important; font: 600 20px/1.25 Literata, Georgia, serif !important; }
.panel.outcome p { margin: 0 0 12px !important; }
.panel.outcome .oc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.panel.outcome .oc-row button { padding: 12px 6px !important; font-size: 14px !important; min-height: 46px; }
.panel.outcome .oc-kicker { color: #d8b46a !important; font-size: 22px !important; margin: 0 0 2px !important; }
.iv-nav button[disabled] { opacity: .4; }

/* Interview: heard answer */
.panel.heard .hd-line { font: 500 18px/1.5 Literata, Georgia, serif !important; margin: 4px 0 10px !important; color: #13285a !important; }
.panel.heard .hd-hit { color: #0f6b4f !important; font-weight: 700; }
.panel.heard .hd-miss { color: #d9574c !important; text-decoration: underline wavy rgba(217,87,76,.55); text-underline-offset: 4px; }
.panel.heard .hd-word { color: #5a4a2a !important; }
.panel.heard .result-head { font-weight: 600 !important; margin: 0 !important; color: #13285a !important; }
.panel.heard .result-head.small { font-size: 13px !important; color: #6b5a3a !important; }
.panel.heard.match .result-head.small { color: #0f6b4f !important; }

/* Mari hands-free */
.mary-loop { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 4px 0 10px; min-height: 48px; border-radius: 26px; border: 1px solid #d8b46a; background: rgba(8,20,58,.55); color: #f3e3bb; font: 600 15px Inter, system-ui, sans-serif; }
.mary-loop i { width: 10px; height: 10px; border-radius: 50%; background: #8a8a8a; }
.mary-loop.on { background: linear-gradient(180deg, #ffe6a0, #e9bd62 55%, #c9953e); color: #211a13; border-color: #fff0bb; }
.mary-loop.on i { background: #d9574c; box-shadow: 0 0 0 4px rgba(217,87,76,.25); animation: loopPulse 1.4s ease-in-out infinite; }
@keyframes loopPulse { 50% { box-shadow: 0 0 0 7px rgba(217,87,76,.08); } }
@media (prefers-reduced-motion: reduce) { .mary-loop.on i { animation: none; } }

/* About-you screen reuses the officer look */
[data-screen="about"] .officer-card { padding: 12px 12px 14px !important; overflow: hidden; }
[data-screen="about"] .iv-seal-top { margin: 0 0 10px !important; text-align: center !important; font: 600 10.5px/1 Inter, system-ui, sans-serif !important; letter-spacing: .22em !important; text-transform: uppercase !important; color: #d8b46a !important; }
[data-screen="about"] .officer-frame { position: relative; height: 300px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(216,180,106,.7); background: #13285a; box-shadow: inset 0 0 0 1px rgba(255,240,187,.08); }
[data-screen="about"] .officer-frame::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(180deg, rgba(11,27,68,0), rgba(11,27,68,.75)); pointer-events: none; }
[data-screen="about"] .officer-card .officer-frame img { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; object-fit: cover !important; object-position: center 22% !important; background: none !important; }
[data-screen="about"] .officer-card .bubble { margin: -34px 6px 0 !important; z-index: 2; }
[data-screen="about"] .officer-card .bubble.oral { text-align: center !important; padding: 14px 14px 12px !important; }
[data-screen="about"] .oral-line { margin: 0 0 8px !important; font: 600 16px/1.35 Literata, Georgia, serif !important; color: #13285a !important; }
[data-screen="about"] .oral-peek { background: none !important; border: 0 !important; color: #8a6a2e !important; font: 500 13px Inter, system-ui, sans-serif !important; text-decoration: underline !important; text-underline-offset: 3px !important; padding: 4px !important; }
[data-screen="about"] .officer-frame { height: 330px !important; }
[data-screen="about"] .officer-card .officer-frame img { object-position: center 34% !important; }
[data-screen="about"] .officer-card .bubble { margin-top: -16px !important; }
[data-screen="about"] .officer-card { position: relative; background: radial-gradient(70% 60% at 50% 30%, #16306a, #0b1b44) !important; border: 1px solid var(--rim) !important; box-shadow: var(--elev) !important; border-radius: 22px; }
[data-screen="about"] .officer-card .bubble { position: relative !important; background: linear-gradient(180deg, #fbf4e2, #f1e4c4) !important; border: 1px solid rgba(168,120,44,.45) !important; border-radius: 18px; padding: 14px; }
[data-screen="about"] .officer-card .bubble .q-en { color: #14285a !important; font-family: Literata, Georgia, serif !important; font-weight: 700; font-size: 21px; text-align: center; margin: 0; }
[data-screen="about"] .officer-card .bubble .q-ru { color: #5a4a2a !important; text-align: center; }
.about-count { text-align: center; color: #d8b46a !important; }
.panel.heard .iv-text span { color: #6b5a3a !important; font-weight: 600; }
.panel.heard textarea { min-height: 60px !important; height: 60px !important; }
[data-screen="about"] .stack-btns .wide { grid-column: 1 / -1; }

/* Profile: weak spots */
.panel.weak h2 { margin: 0 0 4px !important; font: 600 20px/1.25 Literata, Georgia, serif !important; }
.panel.weak ol { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 6px; }
.panel.weak li button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(216,180,106,.45); background: rgba(8,20,58,.35); color: inherit; font: 500 14px/1.3 Inter, system-ui, sans-serif; }
.panel.weak .wk-no { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #d8b46a; color: #d8b46a; font-weight: 700; font-size: 12px; }
.panel.weak .wk-q { flex: 1; }
.panel.weak em { font-style: normal; color: #f08a80; font-weight: 700; font-size: 13px; }
.panel.weak li button { background: rgba(255,252,243,.7) !important; border-color: rgba(168,120,44,.4) !important; color: #13285a !important; }
.panel.weak .wk-no { border-color: #a8782c !important; color: #8a6a2e !important; }
.panel.weak em { color: #d9574c !important; }

/* Cards: card fills the width so it is seen at once; nav row fits the screen */
.cards3-nav { display: grid !important; grid-template-columns: 44px 1fr 44px !important; gap: 8px !important; align-items: center !important; padding: 0 14px !important; box-sizing: border-box; width: 100% !important; }
.cards3-nav .pager-btn { width: 44px !important; height: 44px !important; }
.cards3-nav .grade-row { margin: 0 !important; min-width: 0; }
.cards3-nav .grade-row button { min-width: 0; padding-left: 10px !important; padding-right: 10px !important; }

/* Cards: order and filter as visible chips */
.card-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 6px; margin: 0 -14px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.card-chips::-webkit-scrollbar { display: none; }
.cchip { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid rgba(216,180,106,.6); background: rgba(8,20,58,.6); color: #f3e3bb; font: 600 14px Inter, system-ui, sans-serif; white-space: nowrap; }
.cchip em { font-style: normal; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 10px; background: rgba(216,180,106,.22); font-size: 12px; }
.cchip.on { background: linear-gradient(180deg, #ffe6a0, #e9bd62 55%, #c9953e); color: #211a13; border-color: #fff0bb; box-shadow: 0 4px 12px rgba(217,167,77,.25); }
.cchip.on em { background: rgba(33,26,19,.15); }
.card-chips { flex-wrap: wrap !important; justify-content: center !important; overflow: visible !important; margin: 0 0 8px !important; padding: 2px 0 4px !important; gap: 6px !important; }
.cchip { min-height: 34px !important; padding: 0 12px !important; font-size: 13.5px !important; }
.cards3-nav .grade-row { gap: 8px !important; }
.cards3-nav .grade-row button { font-size: 16px !important; gap: 6px !important; white-space: nowrap; overflow: hidden; }
.cards3-nav .grade-row button { padding-left: 6px !important; padding-right: 8px !important; font-size: 15px !important; letter-spacing: -.01em; }
.cards3-nav .grade-row button::before { width: 22px !important; height: 22px !important; margin-right: 4px !important; flex: 0 0 22px !important; }
.cards3-nav { gap: 6px !important; padding: 0 10px !important; grid-template-columns: 40px 1fr 40px !important; }
.cards3-nav .pager-btn { width: 40px !important; height: 40px !important; }
.cards3-nav .grade-row button { font-size: 14px !important; padding-right: 4px !important; overflow: visible !important; justify-content: center !important; }
.card-empty-note { text-align: center; margin: 0 0 8px !important; color: #e6d3a3 !important; font-size: 13px !important; }

/* Independent-app note */
.legal-note { margin: 14px 8px 6px !important; text-align: center; font-size: 11.5px !important; line-height: 1.45 !important; color: rgba(230,214,170,.7) !important; }
.legal-note a { color: #e6c478 !important; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Long lists of accepted answers: the rest opens on tap */
.more-answers { margin: -4px 0 10px; padding: 0; border: 0; background: none; box-shadow: none; }
.more-answers summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(138,90,28,.45); color: #8a5a1c; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.more-answers summary::-webkit-details-marker { display: none; }
.more-answers summary::after { content: "⌄"; font-size: 14px; }
.more-answers[open] summary::after { content: "⌃"; }
.more-answers p { margin: 10px 0 0; }

/* Passed exam: certificate under the result, fireworks over the screen */
.exam-cert { margin-top: 18px; min-height: 0; padding-bottom: 58px; }
.exam-cert .cert-note { padding: 0 26px; }
#fireworks { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; }
.fw-burst { position: absolute; width: 0; height: 0; }
.fw-burst i { position: absolute; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); opacity: 0; transform: rotate(var(--a)) translateY(0); animation: fw-fly 1.3s cubic-bezier(.15,.7,.3,1) var(--d) forwards; }
@keyframes fw-fly {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-120px) scale(.4); }
}
@media (prefers-reduced-motion: reduce) { #fireworks { display: none; } }

/* Lessons banner in English and Spanish: same emblem as the Russian one, title in the language */
.pp-banner-wrap { position: relative; container-type: inline-size; }
.pp-cover.has-banner > .pp-banner-wrap { margin: 0 !important; }
.pp-banner-patch { position: absolute; left: 28.6%; width: 42.8%; top: 68.8%; height: 20%; background: #fdf0d8; border-radius: 14px; box-shadow: 0 0 10px 8px #fdf0d8; }
.pp-banner-title { position: absolute; left: 0; right: 0; top: 66.5%; text-align: center; font: 700 12.4cqw/1 Literata, Literata, Georgia, serif; color: #13245a; letter-spacing: -.01em; white-space: nowrap; }

/* Audio buttons on paper cards: raised warm "pill" with a golden rim and a soft light inside (variant E, approved 4 Nov 2026) */
html body .view :is(.panel, .face) .tools button.audio-glass.audio-glass.audio-glass {
  color: #13245a !important;
  background:
    radial-gradient(120% 150% at 50% 120%, rgba(240, 186, 80, 0.6) 0%, rgba(243, 200, 110, 0) 72%),
    linear-gradient(180deg, #fffefa 0%, #fff1d2 100%) !important;
  border: 2px solid #c4964a !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 12px rgba(226, 166, 60, 0.4),
    0 5px 0 #b8873a,
    0 9px 18px rgba(120, 80, 20, 0.3) !important;
  transform: translateY(-2px);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  min-height: 50px;
  padding: 0 22px;
  font-weight: 700;
  border-radius: 999px;
}
html body .view :is(.panel, .face) .tools button.audio-glass.audio-glass.audio-glass:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 12px rgba(226, 166, 60, 0.45), 0 1px 0 #b8873a, 0 3px 8px rgba(120, 80, 20, 0.25) !important;
}
html body .view :is(.panel, .face) .tools button.audio-glass.audio-glass.audio-glass::before { background: #7a531a !important; }
html body .view :is(.panel, .face) .tools:has(> .audio-glass) { margin-bottom: 14px; }

/* Button rows on the dark screen: raised navy pills with a golden rim, a golden ledge and a warm light inside (variant 2, approved 4 Nov 2026) */
html body .view > :is(.stack-btns, .grade-row) :is(.btn-line, .btn-aqua, .btn-quiet).btn-raise,
html body .view > :is(.stack-btns, .grade-row) :is(.btn-line, .btn-aqua, .btn-quiet):not(.audio-glass) {
  color: #fff !important;
  border: 1.5px solid rgba(226, 188, 114, 0.75) !important;
  border-radius: 999px;
  min-height: 58px;
  background:
    radial-gradient(120% 140% at 50% 120%, rgba(226, 170, 80, 0.28) 0%, rgba(226, 170, 80, 0) 70%),
    linear-gradient(180deg, #22377a 0%, #132563 55%, #0d1b4c 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 12px rgba(226, 170, 80, 0.18), 0 5px 0 #8a6424, 0 9px 18px rgba(0, 0, 0, 0.45) !important;
  transform: translateY(-2px);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
html body .view > :is(.stack-btns, .grade-row) .btn-aqua::before { background: #f3cf7f !important; }
html body .view > :is(.stack-btns, .grade-row) > .btn:not(.btn-line):not(.btn-aqua):not(.btn-quiet) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 14px rgba(255, 236, 180, 0.5), 0 5px 0 #8a6424, 0 9px 18px rgba(0, 0, 0, 0.45) !important;
  transform: translateY(-2px);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
html body .view > :is(.stack-btns, .grade-row) :is(.btn, .btn-line, .btn-aqua, .btn-quiet):active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 0 #8a6424, 0 3px 8px rgba(0, 0, 0, 0.35) !important;
}
html body .view > :is(.stack-btns, .grade-row) { row-gap: 16px; }

/* Readability pass after the design and copy review (4 Nov 2026): contrast 4.5:1+, text 12px+, touch targets 44px+ */
html body .view > .q-num { color: #f1d9a0 !important; }
html body .view > p.hint, html body .view > .hint { color: #c3cce0 !important; }
html body :is(.sv3-zip, .one-setup .zip-field, .addr-field) input::placeholder { color: rgba(255, 255, 255, 0.66) !important; -webkit-text-fill-color: rgba(255, 255, 255, 0.66) !important; }
html body .tabs button { font-size: 12px !important; }
html body .lang-drop { min-height: 44px !important; height: 44px !important; }
html body .signin-top { min-height: 44px !important; display: inline-flex; align-items: center; padding: 0 12px !important; }
html body .oc-info { min-width: 44px !important; min-height: 44px !important; }
html body [data-screen="car"] .car-settings select { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; padding-right: 30px; font-size: 15px; }
html body [data-screen="car"] .car-settings label { display: flex; align-items: flex-end; min-height: 2.5em; line-height: 1.2; }

/* Type pass: two families (Literata + Golos Text), calmer weights, larger small print for 50+ readers */
html body .sv3 .step, html body .sv3 h2, html body .sv3 .step span { letter-spacing: 0 !important; font-weight: 600 !important; line-height: 1.3; }
html body .sv3 .sv3-lead { font-size: 15px !important; line-height: 1.45 !important; }
html body .sv3 small, html body .sv3 .step small { font-size: 14px !important; line-height: 1.4; }
html body .sv3 .welcome-privacy span { font-size: 14px !important; }
html body .sv3 .legal-note, html body .sv3 .legal-note a { font-size: 13px !important; line-height: 1.5 !important; }
html body .sv3 input::placeholder { font-weight: 500 !important; letter-spacing: .02em !important; }
html body :is(h1, h2, h3) { letter-spacing: 0; }

/* Mary's big microphone: dark navy icon on the gold button, so it is clearly visible */
html body .mary-mic.big .ui-ico, html body .mary-mic.big.on .ui-ico { color: #14204a !important; stroke: #14204a !important; width: 34px; height: 34px; stroke-width: 2.2 !important; }

/* Living Mary and microphone on Home: Mary's orb breathes and sends out soft rings, the interview mic floats and glows */
html body .mk-orb { position: relative; overflow: visible !important; isolation: isolate; }
html body .mk-orb img { animation: cvOrbBreath 3.2s ease-in-out infinite; transform-origin: 50% 50%; border-radius: 50%; }
html body .mk-orb::before, html body .mk-orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1; pointer-events: none;
  border: 2px solid rgba(120, 190, 255, .55); box-shadow: 0 0 14px rgba(90, 170, 255, .45);
  animation: cvOrbRing 3.2s ease-out infinite;
}
html body .mk-orb::after { animation-delay: 1.6s; border-color: rgba(243, 207, 127, .5); box-shadow: 0 0 14px rgba(243, 207, 127, .35); }
@keyframes cvOrbBreath {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(90, 170, 255, .45)) brightness(1); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 16px rgba(110, 190, 255, .85)) brightness(1.12); }
}
@keyframes cvOrbRing {
  0% { transform: scale(1); opacity: .85; }
  100% { transform: scale(1.55); opacity: 0; }
}
/* (older rules stop all Home card images with !important, so the mic gets its own stronger rule)
   The mic does not move: only a faint, slow glow, so it does not pull attention from "Continue learning". */
html body .app.is-home .hm-card.hm-interview .hm-img { animation: cvMicGlow 5s ease-in-out infinite !important; }
@keyframes cvMicGlow {
  0%, 100% { filter: drop-shadow(0 4px 10px rgba(80, 200, 255, .2)) brightness(1); }
  50% { filter: drop-shadow(0 4px 14px rgba(80, 200, 255, .45)) brightness(1.05); }
}

/* People who turn off motion on their phone get still images */
@media (prefers-reduced-motion: reduce) {
  html body .mk-orb img, html body .mk-orb::before, html body .mk-orb::after, html body .app.is-home .hm-card.hm-interview .hm-img { animation: none !important; }
}

/* iPhone Safari gives date fields a fixed inner width, so the interview date stuck out of its card */
html body .view input[type="date"] { display: block; width: 100% !important; max-width: 100% !important; min-width: 0 !important; -webkit-appearance: none; appearance: none; box-sizing: border-box; }
html body .view input[type="date"]::-webkit-date-and-time-value { text-align: left; }

/* Medals: six earned by progress plus a grand prize. Locked ones are dimmed in CSS, the art stays the same file. */
.view .md-total { margin: -4px 0 12px; font: 600 15px/1 var(--font-sans, inherit); color: rgba(232,214,168,.95); letter-spacing: .04em; }
.view .md-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.view .md-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04)); border: 1px solid rgba(230,196,120,.28); color: #fff; }
.view .md-tile.got { border-color: rgba(230,196,120,.6); box-shadow: 0 0 0 1px rgba(230,196,120,.15) inset, 0 10px 26px rgba(0,0,0,.18); }
.view .md-tile.big { margin: 0 0 18px; padding: 18px 16px 16px; background: radial-gradient(120% 90% at 50% 0%, rgba(241,217,160,.22), rgba(255,255,255,.04) 70%); }
.view .md-art { position: relative; display: block; width: 104px; height: 104px; }
.view .md-tile.big .md-art { width: 150px; height: 150px; }
.view .md-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.view .md-tile.locked .md-art img { filter: grayscale(1) brightness(.55) contrast(.9); opacity: .55; }
.view .md-lock { position: absolute; right: 2px; bottom: 4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #0a1f4d; border: 1px solid rgba(230,196,120,.55); }
.view .md-lock .ui-ico { width: 16px; height: 16px; color: #e6c478; }
.view .md-tile b { font-size: 15px; line-height: 1.2; color: #fff; }
.view .md-tile.big b { font-size: 19px; }
.view .md-tile small { font-size: 12.5px; line-height: 1.35; color: rgba(255,255,255,.72); }
.view .md-bar { display: block; width: 80%; height: 5px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.view .md-bar span { display: block; height: 100%; background: linear-gradient(90deg, #d7b06a, #f1d9a0); border-radius: 3px; }
.view .md-count, .view .md-date { font-style: normal; font-size: 12px; color: rgba(232,214,168,.95); margin-top: 2px; }
.app.theme-paper .view .md-tile { background: linear-gradient(180deg, #fffaf0, #f6ecd4); color: #13245a; }
.app.theme-paper .view .md-tile b { color: #13245a; }
.app.theme-paper .view .md-tile small { color: #4a5878; }
.app.theme-paper .view .md-count, .app.theme-paper .view .md-date, .app.theme-paper .view .md-total { color: #8a6a2a; }

/* New medal pop-up */
.md-pop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(5,14,38,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: mdFade .3s ease both; }
.md-pop-card { width: min(340px, 100%); padding: 22px 20px 16px; border-radius: 24px; text-align: center; color: #fff; background: radial-gradient(120% 80% at 50% 0%, #1b3a86, #0a1f4d 70%); border: 1px solid rgba(230,196,120,.55); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.md-pop.master .md-pop-card { background: radial-gradient(120% 80% at 50% 0%, #8f1d22, #3a0b14 75%); }
.md-pop-card .q-num { color: #f6dfa6 !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 6px; }
.md-pop-art { position: relative; display: block; width: 190px; height: 190px; margin: 0 auto 6px; }
.md-pop-art::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(241,217,160,.55), rgba(241,217,160,0)); animation: mdGlow 2.4s ease-in-out infinite; }
.md-pop-art img { position: relative; width: 100%; height: 100%; object-fit: contain; animation: mdIn .7s cubic-bezier(.2,1.4,.4,1) both; }
.md-pop-card h2 { margin: 4px 0 4px; font-size: 22px; color: #fff; }
.md-pop-card .hint { color: rgba(255,255,255,.75); margin: 0 0 14px; }
.md-pop-card .btn-quiet { margin-top: 8px; color: #f1d9a0; }
@keyframes mdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mdIn { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes mdGlow { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .md-pop, .md-pop-art img, .md-pop-art::before { animation: none !important; } }

/* Medals on Home: a strip of seven little medals under the progress card */
html body .hm-medals { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 0; padding: 12px 14px; border-radius: 18px; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid rgba(230,196,120,.45); color: #fff; font: inherit; }
html body .hm-medals-row { display: flex; flex: 0 0 auto; }
html body .hm-medals-row i { display: block; width: 30px; height: 30px; margin-left: -6px; border-radius: 50%; }
html body .hm-medals-row i:first-child { margin-left: 0; }
html body .hm-medals-row i img { width: 100%; height: 100%; object-fit: contain; display: block; filter: grayscale(1) brightness(.5); opacity: .55; }
html body .hm-medals-row i.got img { filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); opacity: 1; }
html body .hm-medals-copy { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
html body .hm-medals-copy b { font-size: 15px; color: #fff; }
html body .hm-medals-copy small { font-size: 12.5px; color: rgba(232,214,168,.95); }
html body .hm-medals .pp-arrow { color: #e6c478; font-style: normal; font-size: 22px; }
@media (max-width: 360px) { html body .hm-medals-row i { width: 24px; height: 24px; } }

/* Gold dot: a new medal not seen yet */
html body .has-dot { position: relative; }
html body .hm-profile.has-dot::after, html body .avatar.has-dot::after, html body .set-row.has-dot::before { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #f1c75b; box-shadow: 0 0 0 2px #0a1f4d, 0 0 8px rgba(241,199,91,.9); }
html body .set-row.has-dot::before { top: 8px; right: 8px; }

/* Cabinet: the medals tile stands out */
html body .view .set-row.set-medal { position: relative; padding-left: 64px !important; border-color: rgba(230,196,120,.75) !important; background: radial-gradient(120% 120% at 0% 50%, rgba(241,217,160,.22), rgba(19,41,92,1) 60%) !important; }
html body .view .set-row.set-medal .sm-art { position: absolute; left: 10px; top: 50%; width: 46px; height: 46px; transform: translateY(-50%); }
html body .view .set-row.set-medal .sm-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
html body .view .set-row.set-medal .sm-art.locked img { filter: grayscale(1) brightness(.55); opacity: .6; }
.app.theme-paper .view .set-row.set-medal { background: linear-gradient(180deg, #fff3d6, #f1dfb4) !important; }
.cab-end:empty { display: none; }

/* Share on an earned medal */
.view .md-share { margin-top: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(230,196,120,.6); background: transparent; color: #f1d9a0; font: 600 13px/1.2 inherit; cursor: pointer; }
.app.theme-paper .view .md-share { color: #8a6a2a; }

/* District list in the bottom sheet */
.sheet .dist-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.sheet .dist-list button small { font-size: 12.5px; opacity: .75; }
.sheet .dist-list button.on { outline: 2px solid #e6c478; }
.sheet .btn-line.wide { width: 100%; margin-top: 12px; }

/* Grand prize: gold theme and gold certificate */
html body .app.theme-gold { background: radial-gradient(140% 60% at 50% -10%, rgba(241,217,160,.28), rgba(0,0,0,0) 60%), linear-gradient(180deg, #14224f, #0a1433 70%) !important; }
html body .app.theme-gold .view .set-row, html body .app.theme-gold .view section.panel, html body .app.theme-gold .hm-card, html body .app.theme-gold .hm-progress, html body .app.theme-gold .mk-course { border-color: rgba(241,217,160,.75) !important; box-shadow: 0 0 0 1px rgba(241,217,160,.25) inset, 0 10px 28px rgba(0,0,0,.25) !important; }
html body .app.theme-gold h1, html body .app.theme-gold .section-title { color: #f6dfa6 !important; }
html body .app.theme-gold #tabbar { border-top: 1px solid rgba(241,217,160,.55) !important; }
.view .cert.gold { border: 2px solid #e6c478 !important; box-shadow: 0 0 0 4px rgba(230,196,120,.25), 0 0 36px rgba(241,199,91,.45) !important; }
/* Bottom sheets and the medal pop-up keep their own position: the screen-enter animation must not move them */
html body .app .view.enter > .sheet, html body .app .view.enter > .sheet-back, html body .app .view.enter > .md-pop { animation: none !important; }
html body .view > .sheet { transform: translateX(-50%) !important; }
html body .hm-medals.has-dot::after { content: ""; position: absolute; top: 10px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #f1c75b; box-shadow: 0 0 0 2px #0a1f4d, 0 0 8px rgba(241,199,91,.9); }
.sheet .lang-pill { color: #13245a !important; background: #f4f7fd !important; border: 1px solid rgba(19,36,90,.25) !important; min-width: 96px; }
.sheet .lang-pill.on { background: linear-gradient(180deg, #f6d98f, #e2b85c) !important; border-color: #c99a3c !important; }
.sheet .q-num { color: #8a6a2a !important; }
.sheet .opt-chip { color: #13245a !important; background: #f4f7fd !important; border: 1px solid rgba(19,36,90,.2) !important; }
.sheet .opt-chip small { color: #4a5878 !important; }
.sheet .mini-panel { background: transparent !important; }
.sheet label { color: #2a3a5c !important; }

/* Learn together */
html body .view .duo-card { margin: 12px 0 14px; padding: 16px; border-radius: 20px; border: 1px solid rgba(230,196,120,.55); background: linear-gradient(180deg, #172f72, #0f2259); color: #fff; }
html body .view .duo-card h2 { margin: 0 0 10px; font-size: 18px; color: #f6dfa6; }
html body .view .duo-people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
html body .view .duo-people span { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); min-width: 0; }
html body .view .duo-people span.on { border-color: #e6c478; background: rgba(241,217,160,.12); }
html body .view .duo-people i { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; color: #13245a; background: linear-gradient(180deg, #f6d98f, #e2b85c); }
html body .view .duo-people b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .view .duo-people small { font-size: 12px; color: rgba(232,214,168,.95); }
html body .view .duo-streak { margin: 0 0 10px; font-size: 14px; color: #fff; }
html body .view .duo-results { margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.05); }
html body .view .duo-results dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 6px 0; }
html body .view .duo-results dt { color: rgba(255,255,255,.85); } html body .view .duo-results dd { margin: 0; font-weight: 700; color: #f6dfa6; }
html body .view .duo-results .fine { color: rgba(255,255,255,.7); font-size: 12.5px; margin: 4px 0 0; }
html body .view .duo-teaser { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; width: 100%; margin: 0 0 14px; padding: 14px 16px; border-radius: 18px; text-align: left; border: 1px dashed rgba(230,196,120,.6); background: rgba(255,255,255,.04); color: #fff; font: inherit; cursor: pointer; }
html body .view .duo-teaser b { color: #f6dfa6; font-size: 16px; } html body .view .duo-teaser small { grid-column: 1; color: rgba(255,255,255,.75); font-size: 13px; } html body .view .duo-teaser i { grid-row: 1 / 3; grid-column: 2; font-style: normal; color: #e6c478; font-size: 22px; }
.app.theme-paper .view .duo-card { background: linear-gradient(180deg, #fffaf0, #f6ecd4); color: #13245a; } .app.theme-paper .view .duo-card h2 { color: #8a5a1c; }

/* Easier to see: the profile button on Home and the bottom menu (users are often 50+) */
html body .app.is-home .hm-profile { display: inline-flex !important; align-items: center; gap: 6px; width: auto !important; height: 44px !important; padding: 0 14px 0 10px !important; border-radius: 999px !important;
  border: 1.5px solid #e6c478 !important; background: linear-gradient(180deg, rgba(23,47,114,.92), rgba(10,31,77,.92)) !important; box-shadow: 0 4px 14px rgba(0,0,0,.35), 0 0 0 3px rgba(230,196,120,.15) !important; }
html body .app.is-home .hm-profile .ui-ico { width: 22px !important; height: 22px !important; }
html body .hm-profile-word { font: 600 15px/1 "Golos Text", sans-serif; color: #fff; }
.app.theme-paper .hm-profile-word { color: #13245a; }
html body .top .avatar { width: 44px !important; height: 44px !important; border: 1.5px solid #e6c478 !important; background: linear-gradient(180deg, #1b3a86, #0a1f4d) !important; color: #f6dfa6 !important; font-weight: 700 !important; font-size: 18px !important; box-shadow: 0 4px 14px rgba(0,0,0,.35), 0 0 0 3px rgba(230,196,120,.15) !important; }

html body #tabbar.tabs, html body .app #tabbar { background: linear-gradient(180deg, #13295f, #0a1a45) !important; border-top: 1.5px solid rgba(230,196,120,.7) !important; box-shadow: 0 -8px 24px rgba(0,0,0,.45) !important; }
html body .tabs button { min-height: 56px !important; color: rgba(240,244,255,.92) !important; }
html body .tabs button .feat-ico, html body .tabs button svg { width: 26px !important; height: 26px !important; }
html body .tabs button .feat-ico path, html body .tabs button .feat-ico rect, html body .tabs button .feat-ico circle { stroke: rgba(240,244,255,.92) !important; stroke-width: 1.8 !important; }
html body .tabs button span { font: 600 12.5px/1.15 "Golos Text", sans-serif !important; color: inherit !important; }
html body .tabs button.on { color: #f6d98f !important; }
html body .tabs button.on .feat-ico path, html body .tabs button.on .feat-ico rect, html body .tabs button.on .feat-ico circle { stroke: #f6d98f !important; }
html body .tabs button.on::before { left: 22% !important; right: 22% !important; height: 3px !important; border-radius: 3px; background: #f1c75b !important; box-shadow: 0 0 10px rgba(241,199,91,.7) !important; }
.app.theme-paper #tabbar { background: rgba(251,246,232,.98) !important; }
.app.theme-paper .tabs button, .app.theme-paper .tabs button span { color: #3e3420 !important; }
.app.theme-paper .tabs button .feat-ico path, .app.theme-paper .tabs button .feat-ico rect, .app.theme-paper .tabs button .feat-ico circle { stroke: #3e3420 !important; }

/* Review fixes 6 Nov */
/* medal pop-up keeps light text on its dark card in the Day theme */
html body .app.theme-paper .md-pop-card :is(h2, p, b, small, span, em) { color: #fff !important; }
html body .app.theme-paper .md-pop-card .q-num, html body .app.theme-paper .md-pop-card .btn-quiet { color: #f6dfa6 !important; }
html body .app.theme-paper .md-pop-card .hint { color: rgba(255,255,255,.8) !important; }
html body .app.theme-paper .md-pop-card .btn, html body .app.theme-paper .md-pop-card .btn * { color: #13245a !important; }
/* Learn together card in the Day theme */
html body .app.theme-paper .view .duo-results dt, html body .app.theme-paper .view .duo-people b, html body .app.theme-paper .view .duo-streak { color: #13245a !important; }
html body .app.theme-paper .view .duo-results dd, html body .app.theme-paper .view .duo-people small { color: #8a5a1c !important; }
html body .app.theme-paper .view .duo-results .fine { color: #4a5878 !important; }
html body .app.theme-paper .view .duo-people span { background: rgba(19,36,90,.05); border-color: rgba(19,36,90,.15); }
html body .app.theme-paper .view .duo-people span.on { background: rgba(230,196,120,.25); border-color: #c99a3c; }
/* theme picker with four choices: two rows of two, no overflow */
html body .view .theme-pick .seg:has(> :nth-child(4)) { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: 22px !important; }
/* profile button really 44px tall (an old rule shrank it to 82%) */
html body .app.is-home .hm-profile { transform: none !important; }
/* tap sizes */
html body .view .md-share { min-height: 44px; padding: 8px 16px; }
html body .view .duo-btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .btn-quiet { min-height: 44px; }
.md-pop .btn { background: linear-gradient(180deg, #f6d98f, #e2b85c) !important; color: #13245a !important; border: 1px solid #c99a3c !important; box-shadow: 0 6px 18px rgba(0,0,0,.3) !important; }
.md-pop .btn-quiet { background: transparent !important; border: 0 !important; color: #f6dfa6 !important; font-weight: 600; min-height: 44px; }

/* Copyright notice and the unofficial-copy screen */
.view .copyright-note { margin: 4px 0 18px; text-align: center; font-size: 12.5px; color: rgba(232,214,168,.8); --avl-sig: 7q4m; }
.app.theme-paper .view .copyright-note { color: #8a6a2a; }
.clone-note { max-width: 420px; margin: 18vh auto 0; padding: 24px; text-align: center; color: #fff; }
.clone-note h1 { color: #f6dfa6; font-size: 26px; margin: 0 0 12px; }
.clone-note p { color: rgba(255,255,255,.85); line-height: 1.5; }

/* Small phones (320–359 px): profile button without the word so it never covers the logo; tab names fit */
@media (max-width: 359px) {
  html body .app.is-home .hm-profile { padding: 0 !important; width: 44px !important; justify-content: center; }
  html body .hm-profile-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html body .tabs button span { font-size: 10.5px !important; letter-spacing: -.01em; }
}
@media (max-width: 380px) {
  html body .view .theme-pick .seg .choice { font-size: 13px !important; padding-left: 6px !important; padding-right: 6px !important; letter-spacing: -.01em; }
}
/* Car mode on narrow phones: the big play button shrinks so the back/next buttons stay on screen */
@media (max-width: 380px) {
  html body [data-screen="car"] .car-controls { grid-template-columns: 56px minmax(0, 1fr) 56px !important; }
  html body [data-screen="car"] .car-play.round { width: min(200px, calc(100vw - 150px)) !important; height: min(200px, calc(100vw - 150px)) !important; }
}
/* Medals grid never wider than the screen */
html body .view .md-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
html body .view .md-tile { min-width: 0; }
@media (max-width: 380px) {
  html body .view .md-art { width: 84px; height: 84px; }
  html body .view .md-share { font-size: 12.5px; padding: 8px 10px; max-width: 100%; white-space: normal; }
}

/* UX pass 13.11: readable bottom tabs, required / optional setup marks, mistakes review, voice-interview how-to, car loop note */
@media (min-width: 360px) {
  html body .tabs button span { font-size: 14px !important; line-height: 1.12 !important; }
}
html body .tabs button span { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; text-align: center; overflow-wrap: anywhere; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
h1[tabindex="-1"]:focus-visible, h2[tabindex="-1"]:focus-visible { outline: 2px solid #d8b46a; outline-offset: 4px; border-radius: 6px; }
.need-intro { margin: 4px 0 14px; padding: 10px 14px; border-radius: 14px; background: rgba(243,207,127,.1); border: 1px solid rgba(243,207,127,.35); color: #fff; font-size: 15px; line-height: 1.45; }
.sv3 .step em.need { justify-self: start; font-style: normal; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; padding: 2px 9px; border-radius: 999px; color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.35); }
.sv3 .step em.need.req { color: #2a1b00; background: #f3cf7f; border-color: #f3cf7f; }
.review-open { margin-top: 12px; }
.review-list { margin-top: 14px; }
.review-list .quiz-wrong .q-num { color: #f3cf7f; font-size: 13px; }
.review-list .quiz-wrong .fine { color: rgba(255,255,255,.8); font-size: 14px; margin-top: 4px; }
.review-list .btn-line { margin-top: 8px; }
.review-none { margin-top: 12px; }
.iv-how { margin: 10px 0 12px; }
.iv-how h2 { margin: 0 0 8px; font-size: 19px; }
.iv-how-steps { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 6px; font-size: 16px; line-height: 1.4; }
.iv-how .fine { font-size: 14px; line-height: 1.45; margin: 0 0 8px; }
.iv-how-again { margin: 4px 0 8px; }
.car-loop { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.82); }
.app.theme-paper .need-intro, .app.theme-paper .car-loop, .app.theme-paper .review-list .quiz-wrong .fine { color: #3d3220; }
.app.theme-paper .sv3 .step em.need { color: #6b5a36; border-color: #b9a27a; }
.welcome-privacy .progress-info { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: #f3d898; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; background: none; border: 0; }
.app.theme-paper .welcome-privacy .progress-info { color: #8a6420; }
/* Mock interview: the app checks the answer itself (Nov 13) */
.iv-btn[data-act="iv-type"] svg { fill: none !important; stroke: #f3cf7f !important; }
.iv-btn.on { border-color: #f3cf7f !important; }
.iv-type { display: grid; gap: 10px; margin-top: 12px; }
.iv-type textarea { font-size: 17px; min-height: 64px; }
.iv-verdict { margin-top: 14px; }
.iv-verdict .iv-said { margin: 0 0 6px; font-size: 14.5px; word-break: break-word; }
#view .panel.iv-verdict p.result-head { font-size: 24px; margin: 0 0 10px; color: #c42d44 !important; }
#view .panel.iv-verdict.match p.result-head { color: #0b8a72 !important; }
#view .panel.iv-type .iv-text span { color: #6b5a36 !important; font-size: 13px; }
/* Reading: fewer buttons */
.read-tools { margin-top: 14px; }
.read-tools .btn-aqua, .read-tools .btn-line { white-space: normal; line-height: 1.15; }
html body .view > .stack-btns.read-nav .btn-line { white-space: nowrap; padding: 0 10px; }
.read-nav [disabled] { opacity: .45; }
.read-nav { margin-top: 14px; }
.read-later { text-align: center; margin: 10px 0 0; }
/* Mistakes: Mary, why? */
.review-list .mary-why { min-height: 40px; margin-top: 4px; font-size: 14.5px; }
/* Profile: partner link (only when the link is set) */
.partner-link { display: grid; text-decoration: none; margin-top: 18px; }
.partner-note { text-align: center; font-size: 12.5px; margin: 6px 8px 14px; color: rgba(255,255,255,.72); }
.app.theme-paper .partner-note { color: #4a3e28; }
/* Owner: Mary on/off */
.mary-owner-link { text-align: center; margin: 14px 0 4px; }
.mary-owner-link .text-link { font-size: 13.5px; opacity: .85; }
.mary-owner { display: grid; gap: 8px; margin-top: 12px; }
.mary-owner input { font-size: 17px; letter-spacing: .06em; }

/* Why the microphone did not hear: right under the mic, never hidden under the tab bar */
#view .mic-zone .mic-why { margin: 6px auto 0; max-width: 32ch; text-align: center; font-size: 14px; line-height: 1.35; color: #f3d898; }

/* Mary's next-step buttons under her reply (lesson, cards, interview...): small gold-rimmed pills */
.mary-chat .msg.mary .mary-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; clear: both; }
.mary-chat .msg.mary .mary-act { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(243,207,127,.7); background: rgba(243,207,127,.12); color: #f3d898; font: 600 14px/1.2 "Golos Text", sans-serif; cursor: pointer; }
.mary-chat .msg.mary .mary-act:active { transform: scale(.97); }

/* Mary: permission before anything goes to the AI provider */
#view .panel.mary-consent h2 { margin: 0 0 8px; }
#view .panel.mary-consent p { margin: 0 0 10px; }
#view .panel.mary-consent .stack-btns { margin-top: 14px; }
#view .panel.mary-consent .stack-btns { display: grid; grid-template-columns: 1fr; gap: 10px; }
/* Consent screen: smaller orb, card fully above the bottom menu */
#view .mary-stage.pre-consent { padding-top: 0; margin-bottom: 6px; }
#view .mary-stage.pre-consent .ms-orb { transform: scale(.62); margin: -26px auto -30px; }
#view .mary-stage.pre-consent .ms-role { margin-bottom: 0; }
#view .panel.mary-consent { margin-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

/* ===== Design review 16.11 (before App Store / Google Play) ===== */
/* Apple HIG: every tap target at least 44x44 — small visuals keep their look, the touch area grows */
#view .btn-quiet { min-height: 44px; }
#view .exam-switch button { min-height: 44px; }
#view .pager-btn { min-width: 44px; min-height: 44px; }
#view .fav-btn, #view .mk-pill { position: relative; }
#view .fav-btn::after, #view .mk-pill::after { content: ""; position: absolute; inset: -8px; }
#view .oral-peek { min-height: 44px; }
#view .face .btn-quiet, #view .face-foot .btn-line { min-height: 44px; }
#view .hint a, #view .legal-note a, #view .iv-uscis a, #view a.sc3-find { display: inline-block; padding: 12px 0; margin: -12px 0; }
/* No text smaller than 11.5px (older learners) */
#view .face .q-num, #view .iv-seal-top { font-size: 12px; }
/* "In the car": the loop note was white on cream and almost invisible */
#view .car-now .car-loop { color: #6b5532; }
/* "More practice" tiles: same navy-and-gold family as the rest of the app (were white pastel cards) */
#view .tiles .tile { background: linear-gradient(160deg, rgba(28,45,110,.95), rgba(12,24,70,.95)); border: 1px solid rgba(217,181,106,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
#view .tiles .tile b { color: #fff; }
#view .tiles .tile span:not(.tile-ico) { color: rgba(243,231,200,.82); }
#view .tiles .tile .tile-ico { background: rgba(217,181,106,.16); color: #f3d898; }
/* "Study again" no longer clipped in narrow card buttons */
#view .cards3-nav .grade-row.big .btn-again, #view .cards3-nav .grade-row.big .btn-green { white-space: nowrap; font-size: 14.5px; gap: 5px; padding: 0 8px; min-width: 0; overflow: hidden; }
#view .cards3-nav .grade-row.big .btn-again::before, #view .cards3-nav .grade-row.big .btn-green::before { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; }
/* Lesson number badges readable */
#view .lessons em, #view .lesson-list em { font-size: 12.5px; }
@media (max-width: 419px) {
  #view .cards3-nav { gap: 8px; }
  #view .cards3-nav .grade-row.big .btn-again::before, #view .cards3-nav .grade-row.big .btn-green::before { display: none; }
  #view .cards3-nav .grade-row.big .btn-again, #view .cards3-nav .grade-row.big .btn-green { font-size: 15.5px; }
}
/* WCAG AA: white text on the red "Study again" button needs 4.5:1 */
#view .btn-again, .app #view .grade-row .btn-again { background: linear-gradient(180deg, #cc4238, #b0322a) !important; }
/* Auditor 17.11: "not affiliated with USCIS" visible on the first screen, above the course button */
#view .sv3-legal { margin: 6px auto 10px; max-width: 34em; font-size: 12.5px; line-height: 1.4; color: rgba(243,231,200,.78); text-align: center; }
/* "In the car": the lesson picker takes the full row so long lesson names are not cut */
#view .car-grid > div:nth-child(2) { grid-column: 1 / -1; }
/* Small screens: language switch and chips keep a 44px finger target */
.lang-switch, .lang-pill, #view .chip, #view .filter-chip { min-height: 44px; }
#app select { min-height: 44px; }
/* Text size (Profile): "Large" makes the whole screen 15% bigger; layout reflows to the phone width */
html[data-text="large"] #view { zoom: 1.15; }
#view .text-panel .tp-label { margin: 0 0 10px; font-weight: 600; }
#view .text-panel .tp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#view .text-panel .tp-row .lang-pill span { font-family: Georgia, serif; font-weight: 700; margin-right: 4px; }
#view .text-panel .tp-normal span { font-size: 15px; }
#view .text-panel .tp-large span { font-size: 21px; }
#view .text-panel .tp-hint { margin: 10px 0 0; font-size: 13px; opacity: .8; }
#view .text-panel .tp-row .lang-pill { background: rgba(19,40,90,.06); color: #13285a; border: 1px solid rgba(201,149,62,.55); box-shadow: none; }
#view .text-panel .tp-row .lang-pill.on { background: #fffaf0; border: 2px solid #c9953e; box-shadow: 0 0 0 2px rgba(217,181,106,.35); }
html[data-text="large"] #view .hm-hero, html[data-text="large"] #view .hm-top { zoom: 0.87; } /* keep the home header at its normal size so the logo never touches the buttons */
#view .theme-pick .seg .choice { white-space: normal; overflow-wrap: anywhere; padding-left: 8px; padding-right: 8px; text-align: center; }
/* Light theme ("Светлая"): buttons that keep a navy background need white text */
#app.theme-paper #view .hm-profile, #app.theme-paper #view .hm-profile * { color: #fff !important; }
#app.theme-paper #view [data-act="reset-ask"] { color: #fff !important; }
#view .support-row { text-align: center; margin: 18px 0 6px; }
#view .support-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid rgba(217,181,106,.7); color: #f3d898; font-weight: 700; text-decoration: none; }
#view .support-btn svg { width: 20px; height: 20px; }
/* Profile: an odd last tile (e.g. Medals when Plans is hidden) takes the whole row, no empty hole */
#view .set-grid > .set-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* Profile: all 7 medals in one row; dim until earned, then they light up */
html body .view .set-row.set-medal { padding-left: 18px !important; }
#view .set-row.set-medal .sm-row { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; width: calc(100% - 26px); }
#view .set-row.set-medal .sm-row i { flex: 1 1 0; max-width: 50px; aspect-ratio: 1; display: block; }
#view .set-row.set-medal .sm-row img { width: 100%; height: 100%; object-fit: contain; display: block; }
#view .set-row.set-medal .sm-row i.locked img { filter: grayscale(1) brightness(.55); opacity: .55; }
#view .set-row.set-medal .sm-row i.got img { filter: drop-shadow(0 0 8px rgba(243,201,108,.75)); }

/* ===== Mary: one living orb everywhere (approved 17.11) ===== */
.mv-orb { --s: 150px; position: relative; display: block; width: var(--s); height: var(--s); border-radius: 50%; flex: 0 0 auto;
  box-shadow: 0 0 0 calc(var(--s) * .018) rgba(216,180,106,.85), 0 0 calc(var(--s) * .35) rgba(70,130,255,.35), 0 calc(var(--s) * .06) calc(var(--s) * .2) rgba(0,0,0,.5); }
.mv-orb .mv-in { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; clip-path: circle(50% at 50% 50%); -webkit-mask: -webkit-radial-gradient(white, black); transform: translateZ(0);
  background: radial-gradient(circle at 50% 55%, #0f2a78 0%, #071a4a 62%, #030b26 100%); }
.mv-orb .mv-au { position: absolute; inset: -25%; border-radius: 50%; filter: blur(calc(var(--s) * .09)); opacity: .95;
  background: conic-gradient(from 0deg, #2f6bff, #6fb3ff 20%, #0b2a8a 38%, #f1c66a 52%, #2f6bff 66%, #9ad0ff 82%, #2f6bff); animation: mvSpin 9s linear infinite; }
.mv-orb .mv-au2 { position: absolute; inset: 10%; border-radius: 50%; filter: blur(calc(var(--s) * .07)); background: radial-gradient(circle at 35% 35%, rgba(255,236,190,.55), transparent 55%); animation: mvSpin 13s linear infinite reverse; mix-blend-mode: screen; }
.mv-orb .mv-glass { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 32% 24%, rgba(255,255,255,.75), rgba(255,255,255,0) 26%), radial-gradient(circle at 50% 120%, rgba(0,0,0,.45), transparent 55%); }
.mv-orb .mv-bars { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--s) * .045); }
.mv-orb .mv-bars i { display: block; width: calc(var(--s) * .07); border-radius: 99px; background: linear-gradient(#fff, #fff4d6); box-shadow: 0 0 calc(var(--s) * .05) rgba(255,240,200,.9); height: calc(var(--s) * var(--h)); }
.mv-orb .mv-bars i:nth-child(1), .mv-orb .mv-bars i:nth-child(5) { --h: .14; }
.mv-orb .mv-bars i:nth-child(2), .mv-orb .mv-bars i:nth-child(4) { --h: .25; }
.mv-orb .mv-bars i:nth-child(3) { --h: .36; }
/* states: listening / idle = breathes in gold; thinking = light spins faster; speaking = bars move */
.mary-stage.idle .mv-orb, .mary-stage.listening .mv-orb, .mv-idle .mv-orb { animation: mvBreathe 2.4s ease-in-out infinite; }
.mary-stage.thinking .mv-orb .mv-au { animation-duration: 2.5s; }
.mary-stage.speaking .mv-orb .mv-bars i { animation: mvTalk .6s ease-in-out infinite alternate; }
.mary-stage.speaking .mv-orb .mv-bars i:nth-child(2) { animation-delay: .12s; } .mary-stage.speaking .mv-orb .mv-bars i:nth-child(3) { animation-delay: .25s; }
.mary-stage.speaking .mv-orb .mv-bars i:nth-child(4) { animation-delay: .08s; } .mary-stage.speaking .mv-orb .mv-bars i:nth-child(5) { animation-delay: .3s; }
@keyframes mvSpin { to { transform: rotate(360deg); } }
@keyframes mvBreathe { 50% { transform: scale(1.05); box-shadow: 0 0 0 calc(var(--s) * .018) rgba(216,180,106,1), 0 0 calc(var(--s) * .6) rgba(243,201,108,.45), 0 calc(var(--s) * .06) calc(var(--s) * .2) rgba(0,0,0,.5); } }
@keyframes mvTalk { from { transform: scaleY(.45); } to { transform: scaleY(1.25); } }
@media (prefers-reduced-motion: reduce) { .mv-orb, .mv-orb * { animation: none !important; } }
/* sizes and old rings off */
.ms-orb { width: auto !important; height: auto !important; margin: 8px 0 10px !important; }
.ms-orb .ms-ring { display: none !important; }
.mary-stage.pre-consent .mv-orb { --s: 96px; }
.mk-orb { width: 56px !important; height: 56px !important; display: grid; place-items: center; }
#view .mk-mary-copy { min-width: 0; } #view .mk-mary-copy b { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; line-height: 1.2; }
/* Taps react at once and a quick double tap never zooms the page */
button, a, [data-act], input, select, label { touch-action: manipulation; }
/* Web demo: lock screen and locked lessons */
#view .demo-lock { max-width: 460px; margin: 24px auto 40px; padding: 26px 20px; text-align: center; border-radius: 24px; border: 1px solid rgba(216,180,106,.6); background: linear-gradient(160deg, rgba(28,45,110,.95), rgba(8,18,58,.95)); color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
#view .demo-lock .dl-badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(216,180,106,.16); border: 1.5px solid rgba(216,180,106,.7); color: #f3d898; margin-bottom: 10px; }
#view .demo-lock .dl-badge svg { width: 30px; height: 30px; }
#view .demo-lock h1 { font-family: Georgia, serif; font-size: 25px; margin: 4px 0 8px; color: #fff; }
#view .demo-lock .dl-lead { color: rgba(243,231,200,.88); margin: 0 0 14px; }
#view .demo-lock .dl-list { list-style: none; padding: 0; margin: 0 auto 12px; text-align: left; max-width: 330px; }
#view .demo-lock .dl-list li { position: relative; padding-left: 26px; margin: 0 0 8px; }
#view .demo-lock .dl-list li::before { content: "✓"; position: absolute; left: 0; color: #f3d898; font-weight: 800; }
#view .demo-lock .dl-price { font-weight: 700; color: #f3d898; margin: 4px 0 14px; }
#view .demo-lock .dl-stores { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
#view .demo-lock .dl-store { min-height: 48px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 800; text-decoration: none; background: linear-gradient(180deg, #f7dc96, #d6a94f); color: #1a1405; }
#view .demo-lock .dl-soon { color: rgba(243,231,200,.8); font-size: 14px; margin: 0 0 14px; }
#view .pp-row.demo-locked { opacity: .72; position: relative; }
#view .pp-row .dl-row-lock { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: #c9953e; }
#view .pp-row .dl-row-lock svg { width: 22px; height: 22px; }
/* Mock Apple review 18.11: home buttons at least 44pt; greeting never cut in Large text */
#view .mk-pill, #view .mk-mary .mk-ai, #view .mk-mary button, .lang-pick, #langPick, #view .hm-top select { min-height: 44px; }
html[data-text="large"] #view .mk-mary-copy small, html[data-text="large"] #view .mk-mary-copy b { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }

/* Device check 18.11: the logo keeps its place while it loads (slow phones), so the title never slides under the language button */
.sv3-logo, .hm-logo { height: auto; aspect-ratio: 900 / 452; }
/* Device check 18.11: every button gets a 44px finger area. Small-looking pills keep their look and get an invisible larger touch zone. */
#view .mk-pill, #view .mk-ask, #view .face-top .fav-btn { position: relative; }
#view .mk-pill::after, #view .mk-ask::after, #view .face-top .fav-btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }
#view .face-top .fav-btn { position: absolute; }
#view .btn-line[data-act="flip"], #view .sc3-find, .sv3 .text-link, #view .text-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
html[data-text="large"] .app.is-home .hm-profile { min-height: 44px !important; min-width: 44px !important; }
/* Device check 18.11: Mary's glow is drawn as a soft round light behind the orb, not as a blurred shadow.
   Some phones cut a blurred shadow at a square edge around a moving layer; a gradient has no edge to cut. */
.mv-orb { isolation: isolate; box-shadow: 0 0 0 calc(var(--s) * .018) rgba(216,180,106,.85); }
.mv-orb::before { content: ""; position: absolute; inset: -38%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side at 50% 54%, rgba(0,0,0,.42) 62%, rgba(0,0,0,0) 78%), radial-gradient(closest-side, rgba(70,130,255,.38), rgba(70,130,255,.16) 55%, rgba(70,130,255,0)); }
@keyframes mvBreathe { 50% { transform: scale(1.05); box-shadow: 0 0 0 calc(var(--s) * .018) rgba(216,180,106,1); } }
.mary-stage.idle .mv-orb::before, .mary-stage.listening .mv-orb::before, .mv-idle .mv-orb::before { animation: mvGlow 2.4s ease-in-out infinite; }
@keyframes mvGlow { 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .mv-orb::before { animation: none !important; } }
/* Device check 18.11: profile tiles show the full name of the test (wraps instead of "Teste de …"); the passport line never loses its end */
#view .set-row b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; display: block; line-height: 1.2; }
#view .pp-mrz { white-space: normal; letter-spacing: .14em; overflow: visible; }
/* Device check 18.11: question-order menu fits on 320–380 px phones in Spanish and Portuguese */
@media (max-width: 380px) { #view .card-mode select { font-size: 14.5px; padding-left: 14px; padding-right: 34px; letter-spacing: -.005em; } }
#view { overflow-x: clip; } /* soft light around Mary never makes the page scroll sideways on 320 px phones */
/* Device check 18.11 (second pass) */
html[data-text="large"] body .app.is-home .hm-profile { height: 51px !important; min-width: 51px !important; } /* header is drawn at 87% in Large text: 51 x .87 = 44 */
#view .face .face-foot .btn-line[data-act="flip"], .cards3 .face .face-foot .btn-line[data-act="flip"] { min-height: 44px !important; height: auto !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.15 !important; padding-top: 6px !important; padding-bottom: 6px !important; }
/* Words in buttons are never cut in the middle ("Даль|ше"); in Large text two buttons go on two lines instead */
#view .row { flex-wrap: wrap; }
#view .row > .btn, #view .row > .btn-line { flex: 1 1 auto; overflow-wrap: normal; word-break: normal; }
#view .grade-row .btn-again, #view .grade-row .btn-green { line-height: 1.15; overflow-wrap: normal; }
html body .app.is-home .hm-streak span { min-width: 0; } html body .app.is-home .hm-streak small { white-space: normal !important; min-width: 0; overflow-wrap: anywhere; } /* long Spanish streak line wraps in Large text */
@media (max-width: 340px) { #view .card-mode select { font-size: 13.5px; padding-left: 12px; padding-right: 30px; } }
/* Tab names never break inside a word ("Leccione|s"): they shrink a little on narrow phones instead */
html body .tabs button span { overflow-wrap: normal !important; word-break: normal !important; hyphens: none; }
@media (max-width: 400px) { html body .tabs button span { font-size: min(14px, 3.55vw) !important; letter-spacing: -.01em; } }
/* Device check 18.11: long words (Представительство, Representación, Congressional) on narrow phones and in Large text
   break with a hyphen by the phone's dictionary instead of a bare cut; Large text is a little gentler on 320 px phones */
@media (max-width: 360px) { #view, .tabs { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4; } }
html[data-text="large"] #view { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4; }
#view .q-en, #view [lang="en"] h2, #view input, #view select, #view .pp-mrz { -webkit-hyphens: manual; hyphens: manual; }
@media (max-width: 359px) { html[data-text="large"] #view { zoom: 1.08; } html[data-text="large"] #view .hm-hero, html[data-text="large"] #view .hm-top { zoom: 0.926; } }
@media (max-width: 360px) { #view .set-row b { font-size: 14px; } }
/* Zhenya's test 21.11: the whole Mary card on Home is one big button */
#view .mk-mary-tap { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
#view .mk-mary-tap:active { transform: scale(.985); }
#view .mk-mary-tap:focus-visible { outline: 3px solid #d8b46a; outline-offset: 4px; border-radius: 22px; }
/* Zhenya's test 21.11: "Show answer" and the red/green buttons no longer stick together */
#view .btn.wide + .grade-row, #view .btn.wide + * .grade-row, #view .q-answer + .grade-row, #view .reveal + .grade-row { margin-top: 14px !important; }
#view .lesson-card .grade-row, #view .q-card .grade-row { margin-top: 14px !important; }
#view .grade-row .btn-again, #view .grade-row .btn-green { white-space: nowrap; }
@media (max-width: 340px) { #view .grade-row .btn-again, #view .grade-row .btn-green { font-size: 15px; padding-left: 10px; padding-right: 10px; } }
/* Zhenya's test 21.11: stacked wide buttons ("Repeat mistakes" / "To lessons", "Next lesson" / "To lessons") never touch */
#view .btn.wide + .btn-line.wide, #view .btn-line.wide + .btn.wide, #view .btn.wide + .btn.wide, #view .btn-line.wide + .btn-line.wide { margin-top: 12px !important; }
/* 21.11: the letter on a wrong (red) answer was red on red — give it a white circle like the ✕ */
.view .t3 .abcd .wrong i { background: #fff !important; border-color: #fff !important; color: var(--coral-2) !important; }
/* Home ✏️ → change state: Back sits on the right of the top row (22.11) */
.sv3 .welcome-top .welcome-back .btn-quiet { min-height: 44px; padding: 0 16px; border-radius: 22px; color: #f0cf86; font-weight: 700; background: rgba(8, 18, 40, 0.72); border: 1px solid rgba(240, 207, 134, 0.45); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5); }
.sv3 .welcome-top .welcome-back .btn-quiet::before { content: "‹ "; }
/* Flashcards: a long question makes the card taller instead of scrolling inside it (on iPhone the top of the question was cut off) (22.11) */
.cards3 .flip { display: grid; }
.cards3 .card-stage { container-type: inline-size; aspect-ratio: auto !important; height: auto !important; min-height: 0 !important; }
.cards3 .card-stage .flip { height: auto !important; min-height: min(140cqw, calc(100vh - 400px)) !important; min-height: min(140cqw, calc(100dvh - 400px)) !important; }
.cards3 .flip > .face { position: relative; inset: auto; grid-area: 1 / 1; overflow: visible; }
