/* FrozenBuddy visual system (docs/CESTY.md §10): travel journal with stickers × Duolingo.
   Colours, fonts, sizes come from /design/tokens.css (generated from tokens.json). The short
   legacy names (--bg, --surface, --text, --muted, --accent, --border, --error, --radius) map onto
   the tokens so every module stylesheet follows the new look. */

:root {
  --bg: var(--color-paper);
  --surface: var(--color-surface);
  --text: var(--color-ink);
  --muted: var(--color-ink-soft);
  --accent: var(--color-secondary-ink);
  --accent-text: var(--color-on-secondary);
  --border: var(--color-line);
  --error: var(--color-error-ink);
  --radius: var(--radius-lg);
  --nav-h: 68px;
  --col: 560px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 100%; -webkit-tap-highlight-color: transparent; }
/* Text size from Profile (rem-based sizes follow; inputs stay ≥ 17px so iPhone does not zoom). */
html[data-text-size="large"] { font-size: 118.75%; }
html[data-text-size="xlarge"] { font-size: 137.5%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-paper);
  color: var(--color-ink);
  font: 400 var(--size-md) / 1.5 var(--font-body);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  overflow-x: hidden;
}
/* Tablet / desktop: centred column on an illustrated paper background. */
@media (min-width: 700px) {
  body {
    background:
      radial-gradient(circle at 12% 18%, var(--color-primary-soft) 0 120px, transparent 121px),
      radial-gradient(circle at 88% 70%, var(--color-secondary-soft) 0 160px, transparent 161px),
      radial-gradient(circle at 80% 8%, var(--color-reward-soft) 0 70px, transparent 71px),
      var(--color-paper-2);
    background-attachment: fixed;
  }
  main { background: var(--color-paper); min-height: 100dvh; box-shadow: 0 0 0 2px var(--color-line), var(--shadow-raised); }
}

main {
  max-width: var(--col);
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
  position: relative;
}
body.no-nav main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
body.full-bleed main { padding: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom)); max-width: var(--col); }

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: var(--size-xxl); font-weight: 800; margin: 8px 0 6px; }
h2 { font-size: var(--size-xl); font-weight: 800; margin: 26px 0 10px; }
h3 { font-size: var(--size-lg); font-weight: 600; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: var(--size-sm); }
[hidden] { display: none !important; }
a { color: var(--color-secondary-ink); font-weight: 700; text-underline-offset: 3px; }
.icon { flex: none; vertical-align: middle; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- cards --- */
.card {
  background: var(--color-surface);
  border: 2px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 var(--edge-card) 0 var(--color-line);
  padding: 18px;
  margin: 14px 0;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.narrow { max-width: 440px; margin: 24px auto; }
.link-card {
  display: grid;
  gap: 4px;
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  padding-right: 44px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.link-card::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: solid var(--color-ink-soft);
  border-width: 0 3px 3px 0;
  border-radius: 2px;
  transform: translateY(-50%) rotate(-45deg);
}
.link-card strong { color: var(--color-ink); font-family: var(--font-heading); font-size: var(--size-lg); font-weight: 800; line-height: 1.2; }
.link-card:active { transform: translateY(var(--edge-card)); box-shadow: 0 0 0 var(--color-line); }
.alert { border-color: var(--color-error); box-shadow: 0 var(--edge-card) 0 var(--color-error-soft); }
.error-text { color: var(--error) !important; }

/* --- forms --- */
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea, button { font: inherit; font-size: max(17px, 1em); }
input, select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 4px var(--color-secondary-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--color-ink-soft) 50%), linear-gradient(135deg, var(--color-ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 400; margin: 0 0 14px; min-height: 44px; }
.check input { width: 24px; height: 24px; min-height: 0; accent-color: var(--color-secondary); flex: none; }
.error { color: var(--error); margin: 0; font-weight: 700; }

/* --- buttons: tactile, with a 3D bottom edge; pressing moves them down --- */
button, a.button {
  --btn-bg: var(--color-surface);
  --btn-fg: var(--color-ink);
  --btn-edge: var(--color-line-strong);
  --btn-border: var(--color-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 var(--edge-button) 0 var(--btn-edge);
  margin-bottom: var(--edge-button);
  transition: transform 90ms ease, box-shadow 90ms ease, background-color var(--motion-fast) ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
button:active:not(:disabled), a.button:active { transform: translateY(var(--edge-button)); box-shadow: 0 0 0 var(--btn-edge); }
button.primary, a.button.primary { --btn-bg: var(--color-primary); --btn-fg: var(--color-on-primary); --btn-edge: var(--color-primary-edge); --btn-border: var(--color-primary); }
button.secondary, a.button.secondary { --btn-bg: var(--color-surface); }
button.teal, a.button.teal { --btn-bg: var(--color-secondary); --btn-fg: var(--color-on-secondary); --btn-edge: var(--color-secondary-edge); --btn-border: var(--color-secondary); }
button.gold, a.button.gold { --btn-bg: var(--color-reward); --btn-fg: var(--color-on-reward); --btn-edge: var(--color-reward-edge); --btn-border: var(--color-reward); }
button:disabled { opacity: 0.55; cursor: default; box-shadow: 0 var(--edge-button) 0 var(--btn-edge); }
button.link {
  background: none;
  border: 0;
  box-shadow: none;
  margin: 0;
  color: var(--color-secondary-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 40px;
  padding: 6px 4px;
  font-weight: 700;
}
button.link:active { transform: none; }
button.big, a.button.big { width: 100%; min-height: 58px; font-size: var(--size-lg); border-radius: var(--radius-lg); }
button.icon-button { width: 48px; min-width: 48px; padding: 0; border-radius: 50%; }
.row { grid-template-columns: 1fr auto; align-items: start; }
.row button { grid-column: 1 / -1; }
.row-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-buttons.three { grid-template-columns: 1fr 1fr 1fr; }
.row-buttons.three button { padding-left: 6px; padding-right: 6px; }
.row-buttons > * { width: 100%; }

/* --- lists --- */
.places, .list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 12px 0; border-bottom: 2px solid var(--color-line); display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list small { color: var(--muted); display: block; }
.list button { min-height: 40px; padding: 4px 12px; font-size: 0.9em; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.new-code {
  font: 800 1.4rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 14px;
  border: 3px dashed var(--color-secondary);
  border-radius: var(--radius-md);
  background: var(--color-secondary-soft);
  user-select: all;
  -webkit-user-select: all;
}
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: var(--size-xs); font-weight: 800; letter-spacing: 0.02em; }
.badge.warn { background: var(--color-reward-soft); color: var(--color-reward-ink); }
.badge.ok { background: var(--color-secondary-soft); color: var(--color-secondary-ink); }
.cap-status { display: grid; gap: 4px; justify-items: end; text-align: right; }
.cap-status .badge { border-radius: 8px; max-width: 14em; }

/* --- offline banner (above the bottom navigation) --- */
.banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--color-ink);
  color: var(--color-paper);
  text-align: center;
  font-weight: 700;
  box-shadow: var(--shadow-raised);
}
body.no-nav .banner { bottom: calc(12px + env(safe-area-inset-bottom)); }

/* --- bottom navigation (§2): Mapa · Opakování · Kecání · Rescue · Profil --- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 2px solid var(--color-line);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  transition: transform var(--motion-base) var(--motion-out);
}
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; max-width: var(--col); }
body.no-nav .tabbar { transform: translateY(110%); }
.tab {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  height: var(--nav-h);
  color: var(--color-ink-soft);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  position: relative;
}
.tab .tab-ico { display: grid; place-items: center; width: 52px; height: 34px; border-radius: 12px; transition: background-color var(--motion-fast) ease, transform var(--motion-base) var(--motion-spring); }
.tab[aria-current="page"] { color: var(--color-primary-ink); }
.tab[aria-current="page"] .tab-ico { background: var(--color-primary-soft); transform: translateY(-1px) scale(1.06); }
.tab:active .tab-ico { transform: scale(0.92); }
.tab .tab-dot { position: absolute; top: 8px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--color-primary); color: var(--color-on-primary); font-size: 0.68rem; line-height: 18px; text-align: center; border: 2px solid var(--color-surface); }

/* --- page header for sub pages --- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-ink-soft);
  text-decoration: none;
  font-weight: 800;
  padding: 8px 12px 8px 6px;
  margin: 0 0 2px -6px;
  border-radius: 999px;
  min-height: 44px;
}
.back:active { background: var(--color-paper-2); }
.page-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.page-head h1 { margin: 0; }
.page-head .sticker { width: 64px; height: 64px; flex: none; }
.page-sub { color: var(--muted); margin: 0 0 12px; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title .icon { color: var(--color-primary); }

/* --- screen transitions + micro animations (transform/opacity only) --- */
.view-enter { animation: view-in var(--motion-base) var(--motion-out) both; }
.view-enter.from-right { animation-name: view-in-right; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes view-in-right { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.fx-shake { animation: fx-shake 380ms ease both; }
@keyframes fx-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.fx-pop { animation: fx-pop 420ms var(--motion-spring) both; }
@keyframes fx-pop { 0% { transform: scale(0.85); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }
.sticker { display: block; filter: drop-shadow(0 4px 0 rgba(31, 42, 68, 0.06)); }
.wiggle { animation: wiggle 2.6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* --- toast --- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top));
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 460px);
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-paper);
  font-weight: 800;
  box-shadow: var(--shadow-raised);
  animation: toast-in 420ms var(--motion-spring) both;
}
.toast img { width: 36px; height: 36px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -20px) scale(0.9); } to { opacity: 1; transform: translateX(-50%); } }

/* --- bottom sheet --- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 34, 0.42); animation: fade-in var(--motion-base) ease both; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  max-width: var(--col);
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-sheet);
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up 360ms var(--motion-out) both;
  max-height: 86dvh;
  overflow: auto;
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--color-line-strong); margin: 0 auto 12px; }
.sheet.closing { animation: sheet-down 220ms ease both; }
.sheet-backdrop.closing { animation: fade-out 220ms ease both; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* --- C2/C3: conversation (scenes, chat) --- */
.convo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.convo-head h1 { margin: 4px 0; }
.log { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; min-height: 80px; }
.bubble { max-width: 85%; padding: 11px 15px; border-radius: 20px; line-height: 1.4; animation: bubble-in 260ms var(--motion-spring) both; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
.bubble.them { align-self: flex-start; background: var(--color-surface); border: 2px solid var(--color-line); border-bottom-left-radius: 6px; box-shadow: 0 2px 0 var(--color-line); }
.bubble.me { align-self: flex-end; background: var(--color-secondary); color: var(--color-on-secondary); border-bottom-right-radius: 6px; box-shadow: 0 3px 0 var(--color-secondary-edge); font-weight: 700; }
.bubble .heard { display: block; font-size: 0.8rem; opacity: 0.85; font-weight: 400; }
.scene-correction { align-self: flex-end; max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--color-surface-2, rgba(0,0,0,0.05)); display: grid; gap: 2px; }
.scene-correction p { margin: 0; font-weight: 700; }
.status { min-height: 1.5em; color: var(--muted); margin: 4px 0; text-align: center; font-weight: 700; }
.start { text-align: center; margin: 24px 0; }
.controls { display: grid; gap: 12px; position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--color-paper) 85%, transparent); z-index: 5; }
.talk {
  --btn-bg: var(--color-primary);
  --btn-fg: var(--color-on-primary);
  --btn-edge: var(--color-primary-edge);
  --btn-border: var(--color-primary);
  width: 100%;
  min-height: 92px;
  border-radius: 46px;
  font-family: var(--font-heading);
  font-size: var(--size-xl);
  font-weight: 800;
  box-shadow: 0 6px 0 var(--btn-edge);
  margin-bottom: 6px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.talk::before {
  content: "";
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: url("/design/icons/mic.svg") center / contain no-repeat;
  mask: url("/design/icons/mic.svg") center / contain no-repeat;
}
.talk.recording { --btn-bg: var(--color-error); --btn-edge: var(--color-error-edge); --btn-border: var(--color-error); transform: translateY(6px); box-shadow: 0 0 0 var(--btn-edge), 0 0 0 10px var(--color-error-soft); animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { box-shadow: 0 0 0 var(--btn-edge), 0 0 0 18px transparent; } }
.type-instead summary, .vocab summary { color: var(--muted); cursor: pointer; padding: 8px 0; font-weight: 700; }
.type-instead form { margin-top: 8px; }
.dev { border-style: dashed; }
.dev h2 { margin-top: 0; }
.timings { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-top: 12px; }
.timings td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.timings td.num { text-align: right; font-variant-numeric: tabular-nums; }
.timings td.good { color: var(--color-success-ink); font-weight: 800; }
.timings td.bad { color: var(--error); font-weight: 800; }

/* --- C3: scenes --- */
.scenes { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.scenes a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 2px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 var(--edge-card) 0 var(--color-line);
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  min-height: 60px;
  font-weight: 400;
}
.scenes .title { display: block; font-weight: 800; }
.scenes small { display: block; }
.status-tag { font-size: var(--size-xs); color: var(--muted); white-space: nowrap; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--color-paper-2); }
.status-tag.mastered { color: var(--color-success-ink); background: var(--color-success-soft); }
.scene-brief p { margin: 0 0 10px; line-height: 1.45; }
.goals { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.goals li { display: flex; gap: 10px; align-items: baseline; }
.goals .tick { width: 1.4em; height: 1.4em; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid var(--color-line-strong); color: transparent; font-size: 0.8em; font-weight: 800; transform: translateY(2px); }
.goals li.done { color: var(--color-success-ink); font-weight: 800; }
.goals li.done .tick { background: var(--color-success); border-color: var(--color-success); color: #fff; animation: fx-pop 420ms var(--motion-spring) both; }
.vocab .en, .hint-box .en { font-weight: 800; }
.hint-box { margin: 0; padding: 12px 14px; background: var(--color-reward-soft); border-color: var(--color-reward); box-shadow: 0 3px 0 var(--color-reward-edge); }
.hint-box small { color: var(--color-reward-ink); display: block; font-weight: 800; }
.hint-box p { margin: 4px 0 0; }
.end { text-align: center; }
.end h2 { margin-top: 0; }
.end .goals { text-align: left; }

/* Result after a scene (coach.js) */
.metrics { margin: 12px 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile { border: 2px solid var(--color-line); border-radius: var(--radius-md); padding: 10px 12px; display: grid; gap: 2px; background: var(--color-surface); text-align: left; }
.tile .value { font-family: var(--font-heading); font-size: var(--size-xxl); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .label { font-weight: 800; font-size: var(--size-sm); }
.tile small { color: var(--muted); font-size: var(--size-xs); }
.tile.good { border-color: var(--color-success); background: var(--color-success-soft); }
.tile.good .value { color: var(--color-success-ink); }
.coach { text-align: left; }
.coach .summary { font-weight: 800; }
.coach h3 { font-size: var(--size-md); margin: 16px 0 6px; }
.coach ul:not(.list) { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.coach .better { border-left: 4px solid var(--color-secondary); padding: 4px 0 4px 12px; margin: 0 0 10px; }
.coach .better p { margin: 2px 0; }
.coach .better small { color: var(--muted); display: block; }
.coach .en { font-weight: 800; }
.phrases .check { margin: 0; align-items: flex-start; }
.phrases .check span { display: grid; }
.phrases button { margin-top: 8px; }
.attempt-link { display: flex; justify-content: space-between; gap: 8px; width: 100%; color: var(--text); text-decoration: none; font-weight: 400; }

/* --- C10: accessibility, AI status --- */
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 6px; }
h1:focus, main:focus { outline: none; }
.ai-down p { margin: 6px 0 0; }
.ai-down a { font-weight: 800; }
.offline-home { display: grid; gap: 4px; padding-top: 24px; }
.offline-home .sticker { width: 110px; margin: 0 auto 8px; }

/* --- login --- */
.login { min-height: 80dvh; display: grid; align-content: center; text-align: center; }
.login .hero { width: min(300px, 80%); margin: 0 auto -6px; }
.login .card { text-align: left; }
.login h1 { font-size: var(--size-display); margin-top: 0; }
.brand-mark { font-family: var(--font-heading); font-weight: 800; font-size: var(--size-xl); color: var(--color-primary-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .talk.recording { outline: 3px solid CanvasText; }
  button, a.button, .card { border: 2px solid CanvasText; }
}

/* Profile: invite friends (src/referrals), what the AI knows and remembers (src/memory). */
.referral-link { display: flex; gap: 8px; margin: 10px 0; }
.referral-link input { flex: 1; min-width: 0; }
.referral-rewards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.referral-rewards li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-md, 14px); background: var(--color-paper, #fff8ef); border: 2px dashed var(--color-line, #e6dccb); }
.referral-rewards li.earned { border-style: solid; border-color: var(--color-success, #22c55e); background: var(--color-surface, #fff); }
.referral-rewards li div { display: grid; gap: 2px; }
.referral-count { flex: none; min-width: 44px; text-align: center; font-weight: 800; font-size: 1.05rem; }
.memory-box { margin: 8px 0; }
.memory-box summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.memory-box li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tabbar-inner:has(.admin-tab:not([hidden])) { grid-template-columns: repeat(6, 1fr); }
