/* #108: fonts are self-hosted (CSP `/c/` has no third-party origins; OFL in fonts/).
 * Both are variable — one file per subset covers every weight. */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  /* Palette #031 (llm-wiki/palette.md). */
  --background: #081018;
  --cards: #101c27;
  --elevated: #172735;
  --accent: #ff7a00;
  --text: #eaf2f7;
  --secondary: #8ea3b5;
  --safe: #30d158;
  --alert: #d32f2f;
  --tail: #0a84ff;
  --danger: #ff453a;
  /* #108 mockup neutrals. */
  --edge: #22384a;
  --edge-strong: #3a5266;
  --avatar: #2a3f52;
  --dim: #5e7488;
  --alert-text: #ff6b6b;
  --warn: #ffb000;
  /* Older names (login / routes / journal). */
  --bg: var(--background);
  --card: var(--cards);
  --muted: var(--secondary);
  --line: var(--elevated);
  --ok: var(--safe);
  --grid: rgba(142, 163, 181, 0.055);
  --font-text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  font-family: var(--font-text);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(100% 65% at 50% 0%, rgba(255, 122, 0, 0.08), transparent 70%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  background-attachment: fixed;
  color: var(--text);
}

.shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.brand-mark {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-sub {
  margin: 0.15rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1rem 1.2rem;
  display: grid;
  gap: 0.75rem;
  position: relative;
}

.card h1 {
  margin: 0;
  font-size: 1.2rem;
}

.hidden {
  display: none !important;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--elevated);
  color: var(--text);
  padding: 0.7rem 0.75rem;
  font-size: 1rem;
}

button,
input {
  font-family: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: var(--accent);
  color: var(--bg);
}

.danger {
  background: var(--danger);
  color: #fff;
}

.secondary {
  background: var(--elevated);
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost {
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  font-weight: 500;
  font-size: 0.85rem;
}

.vk {
  background: #0077ff;
  color: #fff;
}

.auth-extra {
  display: grid;
  gap: 0.75rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-switch {
  margin: 0.15rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

button.link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hint,
.meta,
.foot {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.actions {
  display: grid;
  gap: 0.55rem;
}

.row.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.error {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 69, 58, 0.15);
  border: 1px solid rgba(255, 69, 58, 0.45);
  color: #ffb4b4;
  font-size: 0.9rem;
}

.banner-meta {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.banner-meta.ok {
  color: var(--ok);
}

.banner-meta.warn {
  color: var(--warn);
}

body.pocket-locked {
  background: #000 !important;
  overflow: hidden;
}

body.pocket-locked .shell {
  visibility: hidden;
  pointer-events: none;
}

.foot {
  margin-top: 1.25rem;
  text-align: center;
}

/* #102: field journal of the voice path. */
.voicelog-open {
  justify-self: start;
  text-decoration: underline;
}

.voicelog {
  margin: 0;
  max-height: 55vh;
  overflow: auto;
  padding: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: 0.68rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}

/* #103: route list — a running ride is the big tappable row. */
.route-list {
  display: grid;
  gap: 0.5rem;
}

.route-list:empty {
  display: none;
}

.route-item {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: var(--elevated);
  /* --line equals --elevated — rows need their own edge. */
  border: 1px solid rgba(142, 163, 181, 0.16);
  color: var(--text);
  font-weight: 500;
}

.route-item.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  padding: 1rem 0.95rem;
  touch-action: manipulation;
}

.route-name {
  font-size: 1rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.route-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.route-item.active .route-sub {
  color: var(--bg);
  opacity: 0.8;
}

.route-item.archived {
  color: var(--muted);
}

.route-archive summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.35rem 0;
}

.route-archive[open] summary {
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------------ */
/* #108: air screen redesign (llm-wiki/assets/pwa-redesign/mockups).        */
/* ------------------------------------------------------------------------ */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.accent {
  color: var(--accent);
}

.ico-accent {
  flex-shrink: 0;
  color: var(--accent);
}

/* Full-bleed screens (pre-air hint, air): no brand header, plain background. */
body.screen-full {
  background-image: none;
}

body.screen-full .shell {
  max-width: 520px;
  padding: 0;
}

body.screen-full .brand {
  display: none;
}

/* Journal over the air screen — a full-screen sheet, the air keeps running. */
body.screen-full #view-voicelog {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  align-content: start;
  border-radius: 0;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px);
}

/* --- 1: pre-air hint ---------------------------------------------------- */

.hint-screen {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 12px) 24px calc(env(safe-area-inset-bottom) + 32px);
}

.hint-head {
  display: flex;
}

.hint-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.hint-art {
  max-width: 100%;
  height: auto;
  max-height: 32vh;
}

.hint-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

.hint-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.hint-lead {
  margin: 0;
  max-width: 310px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--secondary);
}

.hint-tip {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--cards);
}

.hint-tip p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.hint-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta {
  height: 60px;
  border-radius: 16px;
  border: 0;
  background: var(--accent);
  color: var(--background);
  font-size: 17px;
  font-weight: 700;
  touch-action: manipulation;
}

label.hint-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  color: var(--secondary);
  cursor: pointer;
}

.hint-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

/* --- 2 / 3: air screen -------------------------------------------------- */

.air {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 12px) 20px calc(env(safe-area-inset-bottom) + 24px);
}

.air p {
  margin: 0;
}

.air-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 22px;
  border: 1px solid var(--edge);
  background: var(--cards);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.air-title {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.air-kicker {
  font-size: 12px;
  color: var(--secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.air-route {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.air-menu {
  position: absolute;
  top: 52px;
  right: 0;
  z-index: 20;
  width: min(300px, calc(100vw - 40px));
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--edge);
  background: var(--elevated);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.air-menu-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.air-menu-diag {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 10px 12px 6px;
  border-top: 1px solid var(--edge);
}

.air-menu-diag .meta,
.air-menu-diag .banner-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.air-menu-label {
  font-size: 11px;
  color: var(--secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.air-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* #status keeps its id / kinds (set by the channel code) — drawn as a pill. */
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 176, 0, 0.12);
  color: var(--warn);
  font-size: 14px;
  font-weight: 600;
}

.status::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: currentColor;
}

.status.live {
  background: rgba(48, 209, 88, 0.12);
  color: var(--safe);
}

.status.dead {
  background: rgba(211, 47, 47, 0.14);
  color: var(--alert-text);
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--cards);
  color: var(--secondary);
  font-size: 13px;
}

.pill-gps svg {
  color: var(--warn);
}

.pill-gps[data-gps="ok"] svg {
  color: var(--safe);
}

.pill-gps[data-gps="bad"] svg {
  color: var(--alert-text);
}

.air-lost {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(211, 47, 47, 0.14);
  border: 1.5px solid var(--alert);
  color: var(--alert-text);
}

.air-lost svg {
  flex-shrink: 0;
}

.air-lost-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.air-lost-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.air-lost-sub {
  font-size: 14px;
  color: #d6c4c4;
}

/* The shared error box is moved here while on air (see app.js showView). */
.air-error-slot {
  display: contents;
}

.air-error-slot .error {
  margin: 0;
}

.air-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--cards);
}

.air-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.rider {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rider-ava {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 26px;
  border: 3px solid var(--safe);
  background: var(--avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.rider-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rider[data-ring="tail"] .rider-ava {
  border-color: var(--tail);
}

.rider[data-ring="muted"] .rider-ava {
  border-color: var(--alert);
  color: var(--secondary);
}

.rider.self .rider-ava {
  border: 2px dashed var(--edge-strong);
  background: var(--elevated);
  color: var(--text);
  font-size: 16px;
}

.rider-name {
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--secondary);
}

.rider.speaking .rider-name {
  color: var(--text);
}

@keyframes air-speaking {
  0% {
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(48, 209, 88, 0);
  }
}

.rider.speaking .rider-ava {
  animation: air-speaking 1.4s ease-out infinite;
}

.air-speaking {
  font-size: 14px;
  color: var(--secondary);
}

.air-speaking b {
  color: var(--safe);
  font-weight: 600;
}

.air-facts {
  gap: 10px;
}

.air-fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.air-fact dt {
  color: var(--secondary);
}

.air-fact dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

#air-offline-voice[data-kind="ok"] {
  color: var(--safe);
}

#air-offline-voice[data-kind="warn"] {
  color: var(--warn);
}

#air-offline-voice[data-kind="off"] {
  color: var(--secondary);
}

/* What each state shows: lost swaps pills + riders for the banner + facts. */
.air[data-air="lost"] #air-pills,
.air[data-air="lost"] #air-roster-card,
.air:not([data-air="lost"]) #air-lost,
.air:not([data-air="lost"]) #air-offline {
  display: none;
}

.air-mic {
  flex-grow: 1;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.mic-btn {
  --mic-size: clamp(168px, 26vh, 208px);
  width: var(--mic-size);
  height: var(--mic-size);
  padding: 0;
  border-radius: 50%;
  border: 2px dashed var(--edge-strong);
  background: var(--cards);
  color: var(--dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 80ms ease-out;
}

.mic-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.mic-btn.on {
  border: 0;
  background: var(--accent);
  color: var(--background);
  box-shadow: 0 0 0 10px rgba(255, 122, 0, 0.14), 0 0 0 22px rgba(255, 122, 0, 0.06);
}

.mic-btn.off {
  border: 2px solid var(--edge-strong);
  background: var(--elevated);
  color: var(--text);
  box-shadow: 0 0 0 10px rgba(58, 82, 102, 0.16);
}

.mic-btn.off .mic-ico-off {
  color: var(--alert-text);
}

.mic-btn .mic-ico-off,
.mic-btn.muted .mic-ico-on {
  display: none;
}

.mic-btn.muted .mic-ico-off {
  display: block;
}

.mic-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.mic-btn.wait .mic-label {
  font-size: 15px;
}

.mic-caption {
  font-size: 14px;
  color: var(--secondary);
  text-align: center;
}

.air-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toggle {
  height: 56px;
  padding: 0 8px;
  border-radius: 16px;
  border: 1.5px solid var(--edge);
  background: var(--cards);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  touch-action: manipulation;
}

.toggle svg {
  flex-shrink: 0;
  color: var(--dim);
}

.toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(255, 122, 0, 0.1);
  color: var(--text);
}

.toggle[aria-pressed="true"] svg {
  color: var(--accent);
}

.air-pocket {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid var(--accent);
}

.air-pocket-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 122, 0, 0.12);
}

.air-pocket-note p {
  font-size: 14px;
  line-height: 1.35;
}

.air-pocket-btn {
  height: 60px;
  border: 0;
  border-top: 1px solid #3a2a1a;
  border-radius: 0;
  background: var(--elevated);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
}

/* --- 5: exit confirmation ----------------------------------------------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(3, 7, 11, 0.72);
}

.sheet {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 20px calc(env(safe-area-inset-bottom) + 32px);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--edge);
  background: var(--cards);
}

.sheet-grip {
  align-self: center;
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--edge-strong);
}

.sheet-title {
  margin: 0;
  padding-top: 6px;
  font-size: 20px;
  font-weight: 700;
}

.sheet-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--secondary);
}

.sheet-exit,
.sheet-stay {
  height: 60px;
  border-radius: 16px;
  font-size: 17px;
}

.sheet-exit {
  margin-top: 6px;
  border: 0;
  background: var(--alert);
  color: #fff;
  font-weight: 700;
}

.sheet-stay {
  border: 1px solid var(--edge);
  background: var(--elevated);
  color: var(--text);
  font-weight: 600;
}

/* --- 4: pocket mode ----------------------------------------------------- */

.pocket-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: calc(env(safe-area-inset-top) + 56px) 32px calc(env(safe-area-inset-bottom) + 24px);
  background: #000;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.pocket-overlay p {
  margin: 0;
}

.pocket-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: var(--safe);
}

.pocket-status::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: currentColor;
}

.pocket-status[data-air="lost"] {
  color: var(--alert-text);
}

.pocket-status[data-air="connecting"] {
  color: var(--warn);
}

.pocket-center {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.pocket-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: #3a4652;
}

.pocket-sub {
  max-width: 260px;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  color: #5e6b77;
}

.pocket-warn {
  margin-top: 8px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #5a3510;
  color: #b8702a;
  font-size: 14px;
  font-weight: 600;
}

.pocket-back {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: transparent;
  color: #5e6b77;
  font-size: 15px;
  font-weight: 400;
}

.pocket-back-sub {
  font-size: 13px;
  color: #46525d;
}

/* Hold progress (also the old «Разблокировать» button of a cached pre-#108 page). */
.pocket-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: calc(var(--p, 0) * 100%);
  border-radius: 2px;
  background: #5e6b77;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .rider.speaking .rider-ava {
    animation: none;
    box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.45);
  }

  .mic-btn {
    transition: none;
  }
}

/* Pre-#108 markup from a cached index.html (styles.css / app.js may already be new):
 * the voice toggles must still show their state. Drop once #108 has been live a while. */
.tts-row {
  display: flex;
  gap: 0.55rem;
}

.tts-row .tts-btn {
  flex: 1;
  padding: 0.65rem 0.5rem;
  background: var(--elevated);
  color: var(--secondary);
  font-size: 0.9rem;
}

.tts-row .tts-btn.on {
  background: var(--accent);
  color: #fff;
}

.pocket-unlock {
  position: relative;
  overflow: hidden;
  margin: auto;
  width: min(100%, 300px);
  min-height: 3.6rem;
  padding: 1.05rem 1.2rem;
  border-radius: 14px;
  border: 1px solid #222;
  background: #111;
  color: #c8c8c8;
  font-size: 1.05rem;
}

#pocket-unlock-label {
  position: relative;
  z-index: 1;
}
