/* ============================================================
   Design tokens — Elicit palette/typography + modern mobile UI
   ============================================================ */
:root {
  --ink: #083d44;
  --ink-deep: #09272b;
  --canvas: #fcfcf8;
  --sage: #f3f6e4;
  --cool: #e8eced;
  --teal: #026370;
  --accent: #e5ff97;
  --link-blue: #0000ee;
  --white: #ffffff;
  --danger: #c4432b;

  --level-beginner: var(--sage);
  --level-beginner-ink: #3f6b1f;
  --level-intermediate: var(--cool);
  --level-intermediate-ink: #2c4a63;
  --level-advanced: #dfeaea;
  --level-advanced-ink: var(--teal);

  --shadow-sm: 0 2px 10px rgba(8, 61, 68, 0.08);
  --shadow-md: 0 10px 28px rgba(8, 61, 68, 0.14);
  --shadow-lg: 0 20px 45px rgba(8, 61, 68, 0.22);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Barlow Condensed", "Special Gothic Variable", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", "IBM Plex Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #e9ede2 0%, #dbe3e4 55%, #cdd9dc 100%);
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100%;
}

.page-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 64px;
}

.page-header {
  text-align: center;
  max-width: 560px;
  margin-bottom: 36px;
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--teal);
  margin: 0 0 10px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 46px;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.75;
  margin: 0;
}

.page-footnote {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--ink);
  opacity: 0.65;
  text-align: center;
}

.page-footnote a {
  color: var(--teal);
  text-decoration: underline;
  cursor: pointer;
}

/* ============================================================
   iPhone shell
   ============================================================ */
.phone-shell {
  position: relative;
  width: 400px;
  max-width: 92vw;
  padding: 16px;
  background: linear-gradient(160deg, #2b2d33, #131418 60%);
  border-radius: 62px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,0.06);
}

.phone-buttons span {
  position: absolute;
  background: linear-gradient(90deg, #1a1b1f, #35373d);
  border-radius: 3px;
}

.phone-buttons-left .btn-mute { left: -3px; top: 118px; width: 4px; height: 32px; }
.phone-buttons-left .btn-vol-up { left: -3px; top: 168px; width: 4px; height: 58px; }
.phone-buttons-left .btn-vol-down { left: -3px; top: 234px; width: 4px; height: 58px; }
.phone-buttons-right .btn-power { right: -3px; top: 190px; width: 4px; height: 90px; }

.phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  background: var(--canvas);
  border-radius: 46px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.35);
}

.dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 4.2%;
  min-height: 26px;
  background: #05060a;
  border-radius: var(--radius-pill);
  z-index: 20;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px 2px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  flex-shrink: 0;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.app-header {
  flex-shrink: 0;
  padding: 6px 20px 12px;
  min-height: 34px;
}

.screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 110px;
  scrollbar-width: none;
}
.screen-content::-webkit-scrollbar { display: none; }

.tab-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 86px;
  padding-bottom: 22px;
  display: flex;
  background: rgba(252, 252, 248, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(8, 61, 68, 0.1);
  z-index: 15;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: rgba(8, 61, 68, 0.45);
  cursor: pointer;
  padding: 6px 2px 0;
  transition: color 0.15s ease;
}

.tab-btn svg { transition: transform 0.15s ease; }

.tab-btn.active {
  color: var(--ink);
}
.tab-btn.active svg { transform: translateY(-1px); }

.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 5px;
  border-radius: 3px;
  background: var(--ink);
  opacity: 0.35;
  z-index: 20;
}

/* ============================================================
   Typography helpers
   ============================================================ */
h1, h2, h3 { font-family: var(--font-display); margin: 0; color: var(--ink); }
.screen-title { font-size: 27px; font-weight: 600; margin-bottom: 2px; }
.screen-subtitle { font-size: 14px; opacity: 0.65; margin: 0 0 18px; }
.label-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ============================================================
   Buttons & chips
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-secondary {
  background: var(--ink);
  color: var(--canvas);
}
.btn-ghost {
  background: rgba(8, 61, 68, 0.06);
  color: var(--ink);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(8, 61, 68, 0.25);
}
.btn-danger {
  background: rgba(196, 67, 43, 0.1);
  color: var(--danger);
}
.btn-block { width: 100%; }
.btn-sm { font-size: 13px; padding: 8px 16px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(8, 61, 68, 0.06);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.active { background: var(--accent); }

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(8, 61, 68, 0.06);
  color: var(--ink);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.chip.active {
  background: var(--ink);
  color: var(--canvas);
}

/* ============================================================
   Home screen — decks
   ============================================================ */
.quick-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.quick-tile {
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: none;
  text-align: left;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.quick-tile-fav { background: var(--sage); color: var(--level-beginner-ink); }
.quick-tile-add { background: var(--accent); color: var(--ink); }
.quick-tile-icon { font-size: 20px; }
.quick-tile-title { font-weight: 600; font-size: 16px; }
.quick-tile-sub { font-size: 12px; opacity: 0.7; }

.section-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.55;
  margin: 4px 0 10px;
}

.deck-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }

.deck-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
}

.deck-swatch {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.deck-swatch.beginner { background: var(--sage); color: var(--level-beginner-ink); }
.deck-swatch.intermediate { background: var(--cool); color: var(--level-intermediate-ink); }
.deck-swatch.advanced { background: var(--ink); color: var(--accent); }

.deck-info { flex: 1; min-width: 0; }
.deck-name { font-weight: 600; font-size: 16.5px; margin-bottom: 6px; }
.deck-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  opacity: 0.6;
  white-space: nowrap;
}
.progress-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(8, 61, 68, 0.08);
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--teal);
}
.deck-swatch.beginner ~ .deck-info .progress-fill,
.progress-fill.beginner { background: var(--level-beginner-ink); }
.progress-fill.intermediate { background: var(--level-intermediate-ink); }
.progress-fill.advanced { background: var(--ink); }

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--ink);
  opacity: 0.6;
  font-size: 14px;
}

/* ============================================================
   Flashcard screen
   ============================================================ */
.deck-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.deck-header-row .back-btn { flex-shrink: 0; }
.deck-header-info { flex: 1; min-width: 0; }
.deck-header-title { font-weight: 600; font-size: 17px; }
.deck-header-row .counter {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.6;
  white-space: nowrap;
}
.deck-header-actions { display: flex; gap: 8px; }

.flashcard-stack {
  position: relative;
  height: 330px;
  margin: 14px 0 18px;
}

.flashcard-behind {
  position: absolute;
  inset: 8px 4px 0;
  border-radius: var(--radius-lg);
  background: var(--cool);
  transform: rotate(-4deg) translateY(6px);
  box-shadow: var(--shadow-sm);
}
.flashcard-behind.two {
  inset: 14px 10px 0;
  background: var(--sage);
  transform: rotate(-8deg) translateY(10px);
}

.flashcard {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  cursor: pointer;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.flashcard.flipped .flip-inner { transform: rotateY(180deg); }

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.flip-front {
  background: var(--white);
  border: 1px solid rgba(8, 61, 68, 0.12);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.flip-back {
  background: var(--ink);
  color: var(--canvas);
  transform: rotateY(180deg);
  justify-content: center;
  text-align: center;
  align-items: center;
}

.card-top-row {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-pos-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(8, 61, 68, 0.08);
}
.flip-back .card-pos-tag { background: rgba(252, 252, 248, 0.15); color: var(--canvas); }

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(8, 61, 68, 0.35);
  padding: 2px;
}
.star-btn.active { color: #d99a2b; }
.flip-back .star-btn { color: rgba(252, 252, 248, 0.4); }
.flip-back .star-btn.active { color: var(--accent); }

.card-word {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  margin: 20px 0 4px;
  line-height: 1.15;
}
.card-translation {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin: 4px 0 14px;
}
.card-example {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.4;
  margin-top: 10px;
  padding: 0 6px;
}
.flip-back .card-example { opacity: 0.75; }

.speak-btn {
  margin-top: 14px;
  background: rgba(8, 61, 68, 0.08);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}
.flip-back .speak-btn { background: rgba(252, 252, 248, 0.15); color: var(--canvas); }

.tap-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.4;
  position: absolute;
  bottom: 16px;
}

.card-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.know-row {
  display: flex;
  gap: 10px;
}
.know-row .btn { flex: 1; }

/* ============================================================
   Practice screen
   ============================================================ */
.mode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  margin-bottom: 12px;
  font-family: var(--font-body);
}
.mode-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}
.mode-icon.mc { background: var(--sage); }
.mode-icon.type { background: var(--cool); }
.mode-icon.speak { background: #f6e6d8; }
.mode-title { font-weight: 600; font-size: 16px; margin-bottom: 3px; }
.mode-sub { font-size: 12.5px; opacity: 0.65; }

.select-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.select-row select {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(8, 61, 68, 0.15);
  background: var(--white);
  color: var(--ink);
}

.quiz-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.quiz-progress-row .progress-track { flex: 1; }

.quiz-prompt-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-bottom: 18px;
}
.quiz-prompt-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 10px;
}
.quiz-prompt-word {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}
.quiz-prompt-context {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 10px;
}

.option-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.option-btn {
  background: var(--white);
  border: 1.5px solid rgba(8, 61, 68, 0.14);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.option-btn.correct { background: var(--sage); border-color: var(--level-beginner-ink); }
.option-btn.wrong { background: #fbe4de; border-color: var(--danger); }
.option-btn:disabled { cursor: default; }

.type-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(8, 61, 68, 0.18);
  margin-bottom: 12px;
  background: var(--white);
  color: var(--ink);
}
.type-input:focus { outline: none; border-color: var(--teal); }
.type-feedback { text-align: center; font-family: var(--font-mono); font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.type-feedback.correct { color: #3f6b1f; }
.type-feedback.wrong { color: var(--danger); }

.quiz-summary {
  text-align: center;
  padding: 30px 10px;
}
.quiz-summary .big-score {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  margin: 12px 0;
}

/* ============================================================
   Progress screen
   ============================================================ */
.progress-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}

.goal-ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.goal-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.goal-ring-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.streak-block { flex: 1; }
.streak-flame { font-size: 22px; }
.streak-num { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.streak-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.5px; opacity: 0.75; text-transform: uppercase; margin-top: 2px; }

.week-strip {
  display: flex;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.week-day { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week-day-label { font-family: var(--font-mono); font-size: 10px; opacity: 0.55; text-transform: uppercase; }
.week-day-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 61, 68, 0.07);
  color: rgba(8, 61, 68, 0.25);
  font-size: 13px;
}
.week-day-dot.done { background: var(--level-beginner-ink); color: var(--sage); }
.week-day-dot.today { box-shadow: 0 0 0 2px var(--accent); }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.badge-tile {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  opacity: 0.35;
}
.badge-tile.earned { opacity: 1; }
.badge-emoji { font-size: 24px; display: block; margin-bottom: 6px; }
.badge-name { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.3px; text-transform: uppercase; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.stat-tile {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.stat-tile-value { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.stat-tile-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.4px; text-transform: uppercase; opacity: 0.55; margin-top: 2px; }

.chart-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
  margin-top: 12px;
}
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: var(--cool);
  min-height: 4px;
}
.chart-bar.active { background: var(--teal); }
.chart-bar-label { font-family: var(--font-mono); font-size: 9px; opacity: 0.5; }

/* ============================================================
   Add / edit word form
   ============================================================ */
.form-field { margin-bottom: 14px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15.5px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(8, 61, 68, 0.15);
  background: var(--white);
  color: var(--ink);
}
.form-textarea { resize: vertical; min-height: 54px; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--teal); }
.form-row-2 { display: flex; gap: 10px; }
.form-row-2 .form-field { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.form-actions .btn { flex: 1; }
.form-hint { font-size: 12px; opacity: 0.55; margin: -8px 0 14px; }

.back-btn {
  background: rgba(8, 61, 68, 0.06);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-row-title { flex: 1; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--canvas);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 460px) {
  .page-title { font-size: 34px; }
  .page-subtitle { font-size: 15px; }
  .phone-shell { padding: 10px; border-radius: 48px; }
}
