/* ==========================================================
   DeepDiveQuiz · deep-sea palette
   Every color lives here; components only reference variables.
   ========================================================== */
:root {
  /* Backgrounds */
  --bg: #07111f;
  --bg-deep: #030a14;

  /* Raised surfaces + lines (derived from the same navy family) */
  --surface: #0f1f36;
  --surface-2: #16294a;
  --line: #1e3a5f;

  /* Text */
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;

  /* Primary accent */
  --accent: #38bdf8;
  --accent-light: #7dd3fc;
  --accent-dark: #0284c7;
  --on-accent: #04111f;

  /* Rarity tiers (semantic) */
  --tier-surface: #94a3b8;
  --tier-twilight: #38bdf8;
  --tier-midnight: #818cf8;
  --tier-abyss: #c084fc;
  --tier-trench: #fbbf24;

  /* Status */
  --ok: #34d399;
  --danger: #f43f5e;

  /* Derived tints (no raw rgba elsewhere) */
  --accent-wash: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent) 28%, transparent);
  --glass: color-mix(in srgb, var(--bg) 88%, transparent);
  --panel: color-mix(in srgb, var(--bg) 60%, transparent);
  --shadow: 0 18px 50px color-mix(in srgb, var(--bg-deep) 80%, transparent);

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape + motion */
  --radius: 14px;
  --radius-sm: 10px;
  --tap: 44px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  background:
    radial-gradient(circle at 20% 0%, var(--surface-2) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%) fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, .brand, .prompt-text, .rank-pill { font-family: var(--font-display); font-weight: 700; }
h1, h2, h3 { line-height: 1.25; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
kbd {
  font-family: var(--font-mono); font-size: 0.78em; font-weight: 600;
  padding: 1px 6px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; color: var(--text);
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 99; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.2rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--accent); }
.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 0.92rem; padding: 10px 2px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */
.hero-wrap { padding: 24px 18px 48px; }
.hero-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--accent);
  background: var(--accent-wash); border: 1px solid var(--accent-ring);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 8px;
}
.hero-copy h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3.2vw, 2.35rem); line-height: 1.15; letter-spacing: -0.02em; }
.hero-lead { margin: 0; color: var(--muted); max-width: 620px; font-size: 0.98rem; }

.stats-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-pill { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 100px; }
.stat-label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-pill strong { font-size: 1.05rem; font-family: var(--font-mono); color: var(--text); }

/* ---------- Game shell ---------- */
.game-shell {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.mode-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.mode-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-tab {
  min-height: var(--tap);
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 14px; font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.mode-tab:hover { color: var(--text); border-color: var(--accent-ring); }
.mode-tab.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.mode-controls { display: flex; align-items: center; gap: 8px; }
.zen-toggle {
  min-height: var(--tap); display: inline-flex; align-items: center; gap: 8px; padding: 0 10px;
  font-size: 0.86rem; font-weight: 600; color: var(--muted); cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.zen-toggle input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.icon-btn {
  width: var(--tap); height: var(--tap); display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; line-height: 1; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 0.15s, opacity 0.15s;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn[aria-pressed="true"] { opacity: 0.6; }

.party-bar { background: var(--accent-wash); border: 1px solid var(--accent-ring); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.party-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.party-label { font-size: 0.85rem; font-weight: 700; color: var(--accent); }
.party-input {
  min-height: var(--tap); background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-family: var(--font-mono); font-weight: 700; font-size: 1rem; width: 140px; text-transform: uppercase;
}
.party-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.party-note { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }

.game-stage { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: stretch; }

/* ---------- Depth meter ---------- */
.depth-meter-col {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
.depth-readout { text-align: center; }
.depth-kicker { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.depth-readout strong {
  display: block; font-size: 1.7rem; font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  color: var(--accent); margin: 2px 0 6px;
}
.zone-badge {
  --zone: var(--tier-surface);
  display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--zone) 22%, transparent);
  color: color-mix(in srgb, var(--zone) 55%, var(--text));
  transition: background-color 0.3s, color 0.3s;
}
.zone-surface { --zone: var(--tier-surface); }
.zone-twilight { --zone: var(--tier-twilight); }
.zone-midnight { --zone: var(--tier-midnight); }
.zone-abyss { --zone: var(--tier-abyss); }
.zone-trench { --zone: var(--tier-trench); }
.zone-badge.is-pop { animation: zone-pop 0.6s var(--ease-out); }
@keyframes zone-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); box-shadow: 0 0 0 6px color-mix(in srgb, var(--zone) 25%, transparent); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}

.depth-gauge {
  position: relative; flex: 1; min-height: 210px; border-radius: var(--radius-sm);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--tier-twilight) 14%, transparent) 0%,
    color-mix(in srgb, var(--tier-midnight) 14%, transparent) 45%,
    var(--bg-deep) 100%);
  border: 1px solid var(--line); overflow: hidden; padding: 10px;
}
.depth-fill {
  --depth: 4%;
  position: absolute; top: 0; left: 0; right: 0; height: var(--depth);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--tier-twilight) 40%, transparent),
    color-mix(in srgb, var(--tier-abyss) 45%, transparent),
    color-mix(in srgb, var(--tier-trench) 55%, transparent));
  box-shadow: inset 0 -2px 0 var(--accent-light);
  transition: height 0.9s var(--ease-out), width 0.9s var(--ease-out);
}
.depth-ticks {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between;
  font-size: 0.72rem; color: var(--muted); font-family: var(--font-mono);
}
.depth-bubble {
  position: absolute; left: 50%; bottom: 12px; z-index: 3; transform: translateX(-50%);
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; color: var(--text);
  background: color-mix(in srgb, var(--accent) 30%, transparent); border: 1px solid var(--accent-ring);
  padding: 2px 8px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  animation: bubble-rise 1.4s var(--ease-out) forwards;
}
@keyframes bubble-rise {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150px) scale(0.95); }
}

/* ---------- Screens ---------- */
.screen-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; min-height: 360px; display: flex; flex-direction: column; justify-content: center;
}
.screen-card:not([hidden]) { animation: card-in 0.35s var(--ease-out); }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dive-intro-icon { font-size: 2.3rem; margin-bottom: 8px; }
.screen-card h2 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -0.01em; }
.screen-card p { color: var(--text-soft); }
.key-tip { margin: 0; font-size: 0.85rem; color: var(--muted) !important; }
.start-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }

/* ---------- Buttons ---------- */
.btn {
  min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm); padding: 11px 18px; font: inherit; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.12s ease, background-color 0.15s, border-color 0.15s, opacity 0.15s;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-lg { min-height: 50px; padding: 13px 22px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: 0.86rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-light); }
.btn-primary:active:not(:disabled) { background: var(--accent-dark); color: var(--text); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); }
.btn kbd { background: color-mix(in srgb, var(--on-accent) 18%, transparent); border-color: color-mix(in srgb, var(--on-accent) 30%, transparent); color: inherit; }

/* ---------- Tier chips ---------- */
.tier-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tier-chip { font-size: 0.75rem; font-weight: 700; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); }
.t-surface { color: var(--tier-surface); }
.t-twilight { color: var(--tier-twilight); }
.t-midnight { color: var(--tier-midnight); }
.t-abyss { color: var(--tier-abyss); }
.t-trench { color: var(--tier-trench); }

/* ---------- HUD ---------- */
.hud-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.hud-pill { font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.hud-timer { margin-left: auto; color: var(--accent); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.hud-timer.is-low { color: var(--danger); border-color: var(--danger); animation: timer-pulse 1s ease-in-out infinite; }
@keyframes timer-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent); } }

.timer-bar-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.timer-bar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--tier-midnight)); transition: width 1s linear; }
.timer-bar-fill.is-low { background: var(--danger); }

.prompt-box { margin-bottom: 16px; }
.cat-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.prompt-text { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em; }

.answer-form { display: flex; gap: 10px; margin-bottom: 12px; }
.answer-input {
  flex: 1; min-width: 0; min-height: 50px; background: var(--bg); color: var(--text);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 16px;
  font: inherit; font-size: 1.05rem; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.answer-input::placeholder { color: var(--muted); }
.answer-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.answer-input:disabled { opacity: 0.6; }
.answer-form .btn { min-height: 50px; min-width: 96px; }

.play-aux { display: flex; gap: 10px; flex-wrap: wrap; }
.play-aux .btn { display: inline-block; line-height: 26px; text-align: center; white-space: nowrap; }
.hint-box {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.9rem;
  background: color-mix(in srgb, var(--tier-trench) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier-trench) 35%, transparent);
  color: color-mix(in srgb, var(--tier-trench) 45%, var(--text));
}

/* ---------- Feedback ---------- */
.feedback-card {
  --fb: var(--line);
  margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--fb);
}
.feedback-card:not([hidden]) { animation: card-in 0.3s var(--ease-out); }
.feedback-card.fb-t { --fb: var(--tier-trench); background: color-mix(in srgb, var(--tier-trench) 8%, var(--surface)); }
.feedback-card.fb-a { --fb: var(--tier-abyss); background: color-mix(in srgb, var(--tier-abyss) 8%, var(--surface)); }
.feedback-card.fb-m { --fb: var(--tier-midnight); }
.feedback-card.fb-w { --fb: var(--tier-twilight); }
.feedback-card.fb-s { --fb: var(--tier-surface); }
.feedback-card.fb-miss { --fb: var(--danger); }
.fb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.fb-top strong { font-family: var(--font-display); font-size: 1.15rem; color: color-mix(in srgb, var(--fb) 50%, var(--text)); }
#dd-fb-meters { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: var(--ok); white-space: nowrap; }
.feedback-card.fb-miss #dd-fb-meters { color: var(--muted); }
#dd-fb-detail { margin: 0; color: var(--text-soft); }
.fb-samples { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; font-size: 0.8rem; color: var(--muted); }
.sample-pill { background: var(--bg); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; color: var(--text); }

/* ---------- Summary ---------- */
.rank-pill {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.08em; padding: 4px 12px; border-radius: 999px; margin-bottom: 6px;
  background: color-mix(in srgb, var(--tier-trench) 20%, transparent);
  color: color-mix(in srgb, var(--tier-trench) 55%, var(--text));
}
.pb-flag { display: inline-block; margin-left: 8px; font-size: 0.75rem; font-weight: 700; color: var(--ok); }
.summary-sub { margin: 0 0 14px; color: var(--muted) !important; }
.summary-list { display: grid; gap: 8px; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; }
.summary-row strong { overflow-wrap: anywhere; }
.summary-row small { display: block; color: var(--muted); font-size: 0.78rem; }
.summary-meters { font-family: var(--font-mono); font-weight: 700; color: var(--accent); white-space: nowrap; }
.summary-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.copy-status { margin: 8px 0 0; font-size: 0.85rem; color: var(--ok) !important; min-height: 20px; }

/* ---------- Related ---------- */
.related-tools { margin-top: 28px; }
.related-tools h2 { font-size: 1.2rem; margin: 0 0 12px; }
.related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.related-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 64px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.related-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.related-emoji { font-size: 1.5rem; }
.related-card small { display: block; color: var(--muted); font-size: 0.82rem; }

/* ---------- Inner pages ---------- */
.page-wrap { padding: 26px 18px 54px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.02em; }
.lead { margin: 0 0 22px; color: var(--muted); font-size: 1.02rem; max-width: 740px; }

.prose { margin-top: 28px; max-width: 820px; }
.prose h2 { margin: 28px 0 10px; font-size: 1.4rem; color: var(--text); }
.prose h3 { margin: 20px 0 8px; font-size: 1.12rem; color: var(--accent); }
.prose p, .prose li { color: var(--text-soft); }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); padding: 28px 0 20px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-about { max-width: 420px; }
.footer-disclaimer { font-size: 0.82rem; color: var(--muted); margin: 8px 0 0; }
.footer-nav { display: flex; gap: 4px 14px; flex-wrap: wrap; align-content: flex-start; max-width: 460px; }
.footer-nav a { font-size: 0.85rem; color: var(--muted); padding: 6px 0; }
.footer-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent); font-size: 0.8rem; color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  /* Header scrolls away on phones so the game keeps the full viewport */
  .site-header { position: static; }
  .header-row { gap: 0; padding-top: 6px; }
  .site-nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; }
  .hero-wrap { padding-top: 14px; }

  .game-shell { padding: 12px; border-radius: var(--radius); }
  .game-stage { grid-template-columns: 1fr; gap: 12px; }
  .mode-tabs { width: 100%; flex-wrap: nowrap; gap: 6px; }
  .mode-tab { flex: 1 1 0; padding: 8px 4px; font-size: 0.8rem; white-space: nowrap; }
  .mode-controls { width: 100%; justify-content: space-between; }
  .dive-intro-icon { font-size: 1.8rem; margin-bottom: 4px; }
  .screen-card h2 { font-size: 1.3rem; }

  /* Depth meter becomes a compact horizontal strip above the prompt */
  .depth-meter-col { flex-direction: row; align-items: center; padding: 10px 12px; gap: 12px; }
  .depth-readout { text-align: left; min-width: 118px; }
  .depth-readout strong { font-size: 1.3rem; margin: 0 0 4px; }
  .depth-gauge { min-height: 0; height: 22px; padding: 0; border-radius: 999px; align-self: center; }
  .depth-fill { top: 0; bottom: 0; right: auto; height: auto; width: var(--depth); box-shadow: inset -2px 0 0 var(--accent-light); }
  .depth-ticks { display: none; }
  .depth-bubble { bottom: auto; top: 0; font-size: 0.75rem; animation-name: bubble-rise-x; }

  .screen-card { padding: 18px 16px; min-height: 0; }
  .answer-form { flex-direction: column; }
  .answer-form .btn { width: 100%; }
  .play-aux .btn { flex: 1 1 0; }
  #dd-next-btn { width: 100%; }
  .summary-actions .btn { flex: 1 1 100%; }
}
@keyframes bubble-rise-x {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(10%, 0) scale(0.95); }
}

@media (hover: none) { .kbd-hint, .key-tip { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Content-page widgets: /answers/today + /1v1 ---------- */
.today-answers-mount, .launcher-mount { margin: 8px 0 28px; }
.ta-head, .duel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 18px; }
.ta-head h2, .duel-card h2 { margin: 12px 0 6px; }
.ta-actions, .duel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ta-table-wrap { margin-top: 14px; }
.prose .ta-table td { vertical-align: top; }
.ta-num { color: var(--muted); font-weight: 700; width: 2.2em; }
.ta-q { color: var(--text); font-weight: 600; }
.ta-reveal-cell { min-width: 220px; }
.ta-answers { margin-top: 10px; }
.ta-answers p { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ta-tier { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; min-width: 64px; }
.ta-trench { color: var(--tier-trench); }
.ta-abyss { color: var(--tier-abyss); }
.duel-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.duel-row .party-label { min-width: 92px; }
.duel-code { max-width: 160px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.duel-link { flex: 1 1 260px; min-width: 0; color: var(--text-soft); }

/* ---------- Learn & Strategy Hub (home) ---------- */
.learn-hub .related-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

@media (max-width: 640px) {
  .duel-row .party-label { min-width: 0; width: 100%; }
  .duel-actions .btn, .ta-actions .btn { flex: 1 1 100%; }
  .ta-reveal-cell { min-width: 180px; }
}
