:root {
  --bg-primary: #000000;
  --bg-soft: #0a0a12;
  --bg-card: #14141f;
  --bg-card-2: #1c1c2e;
  --bg-card-3: #262640;
  --text-primary: #ffffff;
  --text-secondary: #b8b8c8;
  --text-muted: #6a6a7c;
  --accent: #00d4ff;
  --accent-warm: #ff9f43;
  --accent-pink: #ff5b9c;
  --accent-violet: #b06bff;
  --good: #00ff88;
  --warn: #ffcb3a;
  --danger: #ff4466;
  --focus-glow: rgba(0, 212, 255, 0.55);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-feature-settings: "tnum";
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.screen.hidden { display: none; }
.hidden { display: none !important; }

/* ===================== FOCUS ===================== */
.focusable {
  transition: transform 0.18s cubic-bezier(0.6, 0, 0.4, 1),
              box-shadow 0.18s ease,
              background 0.2s ease,
              border-color 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
  outline: none;
}
.focusable:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.18), 0 0 24px var(--focus-glow);
  transform: translateY(-1px);
}

/* ===================== HEADER ===================== */
.header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-soft);
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header.compact { padding: 10px 14px; }
.header h1 {
  font-size: 20px;
  font-weight: 600;
  flex: 1;
}
.header-meta {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.back-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===================== WELCOME ===================== */
#welcome {
  background: radial-gradient(ellipse at top, #1a1a3a 0%, #000 70%);
}
.welcome-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
.welcome-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #fff 0%, #00d4ff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.welcome-sub {
  font-size: 16px;
  color: var(--text-secondary);
  letter-spacing: 4px;
  text-transform: uppercase;
}
.welcome-art {
  width: 240px;
  height: 240px;
  image-rendering: pixelated;
  margin: 12px 0;
}
.primary-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #00b4ff 100%);
  color: #001020;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  min-width: 220px;
}
.primary-btn:focus {
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.7);
}
.ghost-btn {
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  border: 2px solid var(--bg-card-2);
}
.ghost-btn:focus { color: var(--text-primary); border-color: var(--accent); }
.welcome-blurb {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 360px;
  margin-bottom: 4px;
}
.welcome-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* ===================== HOW TO PLAY ===================== */
#how-to-play { background: radial-gradient(ellipse at top, #0e1228 0%, #000 70%); }
.howto-content { padding: 14px 18px; gap: 14px; }
.howto-section { background: var(--bg-card); border-radius: var(--r-md); padding: 12px 14px; }
.howto-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}
.howto-body {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.55;
}
.howto-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  row-gap: 6px;
  column-gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--text-primary);
}
.howto-grid > div:nth-child(2n) { color: var(--text-secondary); }
.howto-key {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}
.howto-act {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.howto-act b { color: var(--text-primary); font-weight: 600; }
.howto-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  line-height: 1;
  margin-top: 2px;
}
.howto-footer {
  background: transparent;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0 12px;
}

/* ===================== EGG SELECT ===================== */
#egg-select { background: radial-gradient(ellipse at center, #1a1430 0%, #000 80%); }
.egg-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
}
.egg-nav {
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 22px;
  width: 48px;
  height: 96px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.egg-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 380px;
}
#egg-canvas {
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.6));
}
.egg-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.egg-desc {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 280px;
  min-height: 32px;
}
.egg-dots {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.egg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-card-3);
  transition: background 0.2s, transform 0.2s;
}
.egg-dot.active {
  background: var(--accent);
  transform: scale(1.4);
}

.nav-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-soft);
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.nav-item {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  border: 2px solid transparent;
}
.nav-item.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #00b4ff 100%);
  color: #001020;
  font-weight: 700;
}

/* ===================== NAME PET ===================== */
.name-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px;
  gap: 14px;
}
.name-display {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 4px;
  padding: 14px 28px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  min-width: 320px;
  text-align: center;
  border: 2px solid var(--bg-card-3);
  color: var(--accent);
  text-shadow: 0 0 16px rgba(0,212,255,0.4);
}
.letter-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 560px;
}
.letter-cell {
  background: var(--bg-card);
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  height: 44px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.letter-cell:focus { background: var(--bg-card-3); }

/* ===================== MAIN ===================== */
#main {
  background: radial-gradient(ellipse at center 30%, #0c0c20 0%, #000 80%);
}
.main-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-soft);
  gap: 8px;
  flex-shrink: 0;
}
.pet-id {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pet-id span:first-child {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.pet-stage {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(0,212,255,0.12);
  padding: 3px 8px;
  border-radius: var(--r-pill);
}
.pet-age {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}

.pet-stage-area {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#pet-canvas {
  width: 600px;
  height: 380px;
  image-rendering: pixelated;
}
.mood-bubble {
  position: absolute;
  top: 16px;
  right: 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  border: 1px solid var(--bg-card-3);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 280px;
}
.mood-bubble .mood-icon { font-size: 16px; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-icon {
  font-size: 14px;
  height: 18px;
}
.stat-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-card);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.stat-fill {
  height: 100%;
  width: 100%;
  background: var(--good);
  border-radius: var(--r-pill);
  transition: width 0.4s ease, background 0.3s ease;
}
.stat.warn .stat-fill { background: var(--warn); }
.stat.low .stat-fill { background: var(--danger); }
.stat.crit { animation: pulse-crit 1s ease-in-out infinite; }
@keyframes pulse-crit {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.action-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 10px 14px 14px;
  background: var(--bg-soft);
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.rail-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 26px;
  height: 56px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rail-btn:focus {
  background: var(--bg-card-3);
  transform: translateY(-2px);
}

/* ===================== BIG ACTION CARDS ===================== */
.big-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  color: var(--text-primary);
  text-align: left;
  width: 100%;
  border: 2px solid transparent;
}
.big-action:focus { background: var(--bg-card-2); }
.big-action.danger { border-color: rgba(255,68,102,0.3); }
.big-action.danger:focus { border-color: var(--danger); box-shadow: 0 0 20px rgba(255,68,102,0.4); }
.big-action-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  background: var(--bg-card-2);
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.big-action-body { flex: 1; min-width: 0; }
.big-action-title { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.big-action-sub { font-size: 13px; color: var(--text-secondary); }

/* ===================== MINI-GAME: SIMON ===================== */
.game-content { align-items: center; justify-content: center; gap: 20px; }
.simon-prompt {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.simon-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.simon-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.simon-cell {
  width: 80px;
  height: 80px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.simon-cell.lit {
  background: var(--accent);
  color: #001020;
  transform: scale(1.06);
  box-shadow: 0 0 30px var(--focus-glow);
}
.simon-cell.fail { background: var(--danger); color: white; }
.simon-cell.ok { background: var(--good); color: #001020; }
.simon-center {
  width: 80px;
  height: 80px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}
.simon-status {
  font-size: 14px;
  color: var(--text-secondary);
  min-height: 22px;
}

/* ===================== MINI-GAME: REACTION ===================== */
.reaction-stage {
  width: 100%;
  max-width: 520px;
  height: 280px;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.reaction-stage.ready { background: var(--bg-card-2); }
.reaction-stage.go { background: rgba(0,255,136,0.18); }
.reaction-stage.bad { background: rgba(255,68,102,0.18); }
.reaction-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}
.reaction-star {
  font-size: 96px;
  filter: drop-shadow(0 0 24px rgba(255, 215, 0, 0.7));
  animation: star-pop 0.4s ease-out;
}
@keyframes star-pop {
  from { transform: scale(0.2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===================== MINI-GAME: ROCK PAPER SCISSORS ===================== */
.rps-stage {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 0;
}
.rps-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 14px 8px;
  min-width: 0;
}
.rps-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
}
.rps-show {
  font-size: 56px;
  line-height: 1;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rps-vs {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}
.rps-result {
  font-size: 18px;
  font-weight: 600;
  min-height: 28px;
  color: var(--text-primary);
}
.rps-result.win { color: var(--good); }
.rps-result.lose { color: var(--danger); }
.rps-result.tie { color: var(--warn); }
.rps-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
.rps-btn {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 14px 8px;
  color: var(--text-primary);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rps-btn-icon { font-size: 32px; }
.rps-btn-label { font-size: 13px; font-weight: 600; }

/* ===================== MINI-GAME: COIN FLIP ===================== */
.coin-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}
.coin {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe783 0%, #d4a800 70%, #8a6d00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 800;
  color: #4a3a00;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 -6px 12px rgba(0,0,0,0.25);
  transition: transform 0.5s cubic-bezier(0.6, 0, 0.4, 1);
}
.coin.flipping { animation: coin-spin 0.9s ease-in-out; }
@keyframes coin-spin {
  0%   { transform: rotateY(0) scale(1); }
  50%  { transform: rotateY(540deg) scale(1.05); }
  100% { transform: rotateY(1080deg) scale(1); }
}
.coin-result {
  font-size: 18px;
  font-weight: 600;
  min-height: 28px;
}
.coin-result.win { color: var(--good); }
.coin-result.lose { color: var(--danger); }
.coin-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}
.coin-btn {
  flex: 1;
  max-width: 180px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  border: 2px solid transparent;
}

/* ===================== MINI-GAME: TIC TAC TOE ===================== */
.ttt-status {
  font-size: 16px;
  font-weight: 600;
  min-height: 24px;
}
.ttt-status.win { color: var(--good); }
.ttt-status.lose { color: var(--danger); }
.ttt-status.tie { color: var(--warn); }
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  grid-template-rows: repeat(3, 96px);
  gap: 6px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--r-md);
}
.ttt-cell {
  background: var(--bg-card-2);
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ttt-cell[data-mark="X"] { color: var(--accent); }
.ttt-cell[data-mark="O"] { color: var(--accent-pink); }
.ttt-cell.win-line {
  background: var(--bg-card-3);
  box-shadow: inset 0 0 0 2px var(--good);
}

/* ===================== MINI-GAME: GUESS ===================== */
.guess-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.guess-current {
  font-size: 92px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(0,212,255,0.5);
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}
.guess-hint {
  font-size: 15px;
  color: var(--text-secondary);
  min-height: 22px;
}
.guess-controls {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}
.guess-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 12px;
  border-radius: var(--r-md);
  min-width: 70px;
  border: 2px solid transparent;
}
.guess-btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #00b4ff 100%);
  color: #001020;
  font-weight: 700;
}

/* ===================== STATS SCREEN ===================== */
.stats-content { gap: 8px; }
.stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--r-md);
}
.stat-row-icon {
  font-size: 22px;
  width: 36px;
  text-align: center;
}
.stat-row-body { flex: 1; min-width: 0; }
.stat-row-title {
  font-size: 14px;
  color: var(--text-secondary);
}
.stat-row-bar {
  height: 8px;
  background: var(--bg-card-3);
  border-radius: var(--r-pill);
  margin-top: 6px;
  overflow: hidden;
}
.stat-row-fill {
  height: 100%;
  background: var(--good);
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}
.stat-row.warn .stat-row-fill { background: var(--warn); }
.stat-row.low .stat-row-fill { background: var(--danger); }
.stat-row-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: right;
}
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bio-cell {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 10px 14px;
}
.bio-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.bio-value {
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}

/* ===================== EVOLVE ===================== */
#evolve { background: radial-gradient(ellipse at center, #0a2030 0%, #000 70%); z-index: 50; }
.evolve-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}
.evolve-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 24px var(--focus-glow);
  animation: pulse-glow 1.8s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; text-shadow: 0 0 40px var(--accent); }
}
#evolve-canvas {
  width: 260px;
  height: 260px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 32px rgba(0, 212, 255, 0.6));
}
.evolve-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* ===================== DEATH ===================== */
#death { background: radial-gradient(ellipse at center, #1a0e1a 0%, #000 80%); }
.death-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  text-align: center;
}
.death-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}
#death-canvas {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
  opacity: 0.7;
}
.death-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 440px;
}

/* ===================== SETTINGS ===================== */
.setting-card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.setting-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.setting-value {
  font-size: 15px;
  color: var(--text-primary);
  margin-top: 2px;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
.setting-footer {
  margin-top: auto;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 16px;
}

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--bg-card-3);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  border: 1px solid var(--accent);
  z-index: 100;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.6, 0, 0.4, 1);
  max-width: 480px;
  text-align: center;
}
.toast.visible { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--good); }
.toast.error { border-color: var(--danger); }
.toast.warn { border-color: var(--warn); }
