/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  color: #fff;
  background: #06101e;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ===== CSS VARIABLES (SFC = deep navy + teal + cyan) ===== */
:root {
  --deep:    #040c18;
  --mid:     #081830;
  --light:   #0d2a50;
  --teal:    #0d9e8a;
  --cyan:    #22d3ee;
  --gold:    #f0c040;
  --mint:    #34d399;
  --coral:   #f87171;
  --purple:  #c084fc;
  --white:   #ffffff;
  --glass:   rgba(255,255,255,0.07);
  --glass-b: rgba(255,255,255,0.13);
  --soft:    rgba(255,255,255,0.60);
  --radius:  16px;
  --radius-lg: 24px;
  --shadow:  0 8px 32px rgba(0,0,0,0.45);
  --header-h: 56px;
  --bg1: #040c18;
  --bg2: #081830;
  --acc: #f0c040;
}

/* ==============================
   TOPIC-BASED THEMES
============================== */
body[data-topic="Tech & AI"]           { --bg1:#050818; --bg2:#0a0e2a; --acc:#818cf8; }
body[data-topic="Eco & Environment"]   { --bg1:#030e08; --bg2:#071c0f; --acc:#34d399; }
body[data-topic="Cognition & Language"]{ --bg1:#080512; --bg2:#14082a; --acc:#c084fc; }
body[data-topic="Society & Ethics"]    { --bg1:#100805; --bg2:#221205; --acc:#fb923c; }
body[data-topic="Life & Evolution"]    { --bg1:#050e0a; --bg2:#0a2010; --acc:#4ade80; }
body[data-topic="Economy & Labor"]     { --bg1:#050a12; --bg2:#0a1424; --acc:#f0c040; }
body[data-topic="Politics & Media"]    { --bg1:#0f0510; --bg2:#1e0825; --acc:#e879f9; }

/* ===== OCEAN BACKGROUND ===== */
#ocean-bg {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
}
.ocean-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, var(--bg1) 0%, var(--bg2) 65%, #060f28 100%);
  transition: background 1.4s ease;
}
/* subtle grid — like a data visualization interface */
.ocean-gradient::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(240,192,64,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,192,64,0.022) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ===== CREATURE LAYER ===== */
.creatures-layer {
  position: absolute; inset: 0;
  pointer-events: none;
}
.creature {
  position: absolute;
  font-size: 28px;
  animation: creatureSwim linear infinite;
  opacity: 0.35;
  filter: drop-shadow(0 0 8px rgba(240,192,64,0.3));
  transition: opacity 1s;
}
.creature.large { font-size: 46px; opacity: 0.25; }
.creature.small { font-size: 18px; opacity: 0.50; }
@keyframes creatureSwim {
  0%   { transform: translateX(-120px) scaleX(1); }
  49%  { transform: translateX(calc(100vw + 120px)) scaleX(1); opacity: 0.35; }
  50%  { transform: translateX(calc(100vw + 120px)) scaleX(-1); opacity: 0; }
  51%  { transform: translateX(calc(100vw + 120px)) scaleX(-1); opacity: 0.35; }
  100% { transform: translateX(-120px) scaleX(-1); }
}

/* ===== CORAL LAYER ===== */
.coral-layer {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 140px; pointer-events: none;
}
.coral {
  position: absolute; bottom: 0;
  font-size: 32px;
  animation: coralSway ease-in-out infinite;
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 10px rgba(240,192,64,0.28));
  opacity: 0.5;
}
@keyframes coralSway {
  0%,100% { transform: rotate(-4deg) scale(1); }
  50%      { transform: rotate(4deg) scale(1.04); }
}

/* ===== PARTICLES ===== */
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; width: 2px; height: 2px;
  border-radius: 50%; background: rgba(240,192,64,0.50);
  animation: particleDrift linear infinite;
}
@keyframes particleDrift {
  0%   { transform: translate(0, 100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(20px, -100px) rotate(360deg); opacity: 0; }
}

/* ===== WAVES ===== */
.wave {
  position: absolute; bottom: -10px; left: 0; right: 0;
  height: 60px; border-radius: 50% 50% 0 0;
  opacity: 0.07; animation: waveMove linear infinite;
}
.wave1 { background: var(--acc, #f0c040); animation-duration: 9s; }
.wave2 { background: var(--cyan); animation-duration: 13s; animation-delay: -4s; bottom: 0; }
.wave3 { background: var(--light); animation-duration: 17s; animation-delay: -7s; bottom: 5px; }
@keyframes waveMove {
  0%   { transform: translateX(-50%) scaleY(1); }
  50%  { transform: translateX(0%) scaleY(1.2); }
  100% { transform: translateX(-50%) scaleY(1); }
}

/* ===== BUBBLES ===== */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute; border-radius: 50%;
  background: rgba(240,192,64,0.04);
  border: 1px solid rgba(240,192,64,0.10);
  animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
  0%   { transform: translateY(100vh) scale(0.5); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-100px) scale(1.1); opacity: 0; }
}

/* ===== SCREENS ===== */
.screen {
  position: relative; z-index: 10;
  display: none; flex-direction: column;
  min-height: 100vh; padding-top: var(--header-h);
  padding-bottom: 32px;
}
.screen.active { display: flex; animation: fadeInUp 0.35s ease; }

/* ===== HEADER ===== */
#app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(4,12,24,0.93);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(240,192,64,0.18);
}
.header-left { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 20px; }
.logo-text {
  font-family: 'Space Mono', monospace;
  font-weight: 700; font-size: 14px;
  color: var(--gold);
  letter-spacing: 2px;
}
.header-stats {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--soft);
  display: flex; align-items: center; gap: 6px;
}
.header-stats span { white-space: nowrap; }
.stat-sep { opacity: 0.35; }
#stat-explored { color: var(--mint); font-weight: 700; }
#stat-mastered { color: var(--gold); }
#stat-weak     { color: var(--coral); }

/* ===== SCREEN HEADER ===== */
.screen-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px 8px;
}
.screen-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; color: var(--white); flex: 1;
}
.back-btn {
  background: var(--glass); border: 1px solid var(--glass-b);
  color: var(--soft); padding: 6px 12px;
  border-radius: 20px; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.back-btn:active { opacity: 0.7; }

/* ===== HOME SCREEN ===== */
.home-hero {
  padding: 24px 24px 8px;
  display: flex; flex-direction: column; align-items: flex-start;
  position: relative;
}
.mascot-wrap {
  position: relative; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.mascot-icon { font-size: 38px; animation: scaleFloat 4s ease-in-out infinite; }
@keyframes scaleFloat {
  0%,100% { transform: scale(1) rotate(-2deg); }
  50%      { transform: scale(1.06) rotate(2deg); }
}
.mascot-bubble {
  background: var(--glass); border: 1px solid rgba(240,192,64,0.28);
  border-radius: 12px 12px 12px 0;
  padding: 8px 12px; font-size: 12px; color: var(--gold);
  max-width: 220px; animation: fadeInUp 0.5s ease;
}
.app-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px; line-height: 1.1; color: var(--white);
  margin-bottom: 6px;
}
.app-title span { color: var(--acc, #f0c040); }
.app-sub { font-size: 13px; color: var(--soft); margin-bottom: 20px; }

/* ===== DAY STRIP ===== */
.day-progress-strip {
  overflow-x: auto; padding: 0 20px 12px;
  scrollbar-width: none;
}
.day-progress-strip::-webkit-scrollbar { display: none; }
.day-scroll { display: flex; gap: 8px; width: max-content; }
.day-pill {
  display: flex; flex-direction: column; align-items: center;
  background: var(--glass); border: 1px solid var(--glass-b);
  border-radius: 12px; padding: 8px 10px; cursor: pointer;
  min-width: 60px; transition: all 0.2s; gap: 4px;
}
.day-pill:active { transform: scale(0.97); }
.day-pill.today   { border-color: var(--acc, #f0c040); background: rgba(240,192,64,0.12); }
.day-pill.clear   { border-color: var(--mint); background: rgba(52,211,153,0.12); }
.day-pill.partial { border-color: var(--cyan); background: rgba(34,211,238,0.10); }
.day-num    { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--soft); }
.day-status { font-size: 14px; }

/* ===== HOME ACTIONS ===== */
.home-actions { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 16px; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), #0d7a6a);
  color: #fff; border: none; border-radius: var(--radius);
  padding: 15px 20px; font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(13,158,138,0.35);
  transition: transform 0.15s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: var(--glass); border: 1.5px solid rgba(34,211,238,0.28);
  color: var(--cyan); border-radius: var(--radius);
  padding: 13px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: transform 0.15s;
}
.btn-secondary:active { transform: scale(0.98); }
.btn-ghost {
  background: transparent; border: 1px solid var(--glass-b);
  color: var(--soft); border-radius: var(--radius);
  padding: 12px 20px; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
}
.btn-icon { font-size: 18px; }
.btn-text { flex: 1; text-align: left; }

/* ===== OVERALL PROGRESS ===== */
.overall-progress { padding: 0 20px 8px; }
.prog-label { font-size: 11px; color: var(--soft); margin-bottom: 6px; font-family: 'Space Mono', monospace; }
.prog-bar-wrap { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.prog-bar { height: 100%; background: linear-gradient(90deg, var(--teal), var(--cyan)); border-radius: 3px; transition: width 0.5s ease; }
.prog-pct { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--acc, #f0c040); }

/* ===== TOPICS SCREEN ===== */
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 20px; }
.topic-card {
  background: var(--glass); border: 1px solid var(--glass-b);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
  background-color: var(--card-accent, rgba(255,255,255,0.04));
}
.topic-card:active { transform: scale(0.97); }
.topic-emoji    { font-size: 30px; margin-bottom: 8px; }
.topic-name     { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 2px; line-height: 1.3; }
.topic-name-jp  { font-size: 10px; color: var(--soft); margin-bottom: 6px; }
.topic-count    { font-size: 10px; color: var(--soft); font-family: 'Space Mono', monospace; margin-bottom: 6px; }
.topic-mini-bar { height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.topic-mini-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }

/* ===== TOPIC MODE MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 20px;
}
.modal-box {
  background: linear-gradient(160deg, var(--mid), var(--deep));
  border: 1.5px solid rgba(240,192,64,0.35);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius) var(--radius);
  padding: 28px 24px 20px; width: 100%; max-width: 480px;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal-topic-badge {
  font-size: 12px; color: var(--acc, #f0c040);
  background: rgba(240,192,64,0.12); border: 1px solid rgba(240,192,64,0.25);
  display: inline-block; padding: 3px 12px; border-radius: 20px; margin-bottom: 12px;
}
.modal-topic-creature { font-size: 48px; margin-bottom: 12px; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 18px; color: #fff; margin-bottom: 16px; }
.modal-btn {
  width: 100%; background: var(--glass); border: 1.5px solid var(--glass-b);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.modal-btn:active { transform: scale(0.98); }
.mode-full { border-color: rgba(13,158,138,0.45); }
.mode-step { border-color: rgba(34,211,238,0.35); }
.modal-btn-icon    { font-size: 22px; flex-shrink: 0; }
.modal-btn-content { flex: 1; }
.modal-btn-title   { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.modal-btn-sub     { font-size: 11px; color: var(--soft); }
.modal-btn-count {
  font-family: 'Space Mono', monospace; font-size: 12px; color: var(--acc, #f0c040);
  background: rgba(240,192,64,0.10); padding: 4px 10px; border-radius: 12px; flex-shrink: 0;
}
.modal-cancel {
  width: 100%; background: transparent; border: 1px solid var(--glass-b);
  color: var(--soft); border-radius: var(--radius); padding: 12px;
  font-size: 13px; cursor: pointer;
}

/* ===== REVIEW SCREEN ===== */
.review-options { display: flex; flex-direction: column; gap: 10px; padding: 12px 20px; }
.review-btn {
  width: 100%; background: var(--glass); border: 1px solid var(--glass-b);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
  transition: transform 0.15s;
}
.review-btn:active { transform: scale(0.98); }
.r-icon  { font-size: 22px; flex-shrink: 0; }
.r-label { flex: 1; font-size: 14px; font-weight: 600; color: #fff; }
.r-count {
  font-family: 'Space Mono', monospace; font-size: 11px;
  color: var(--acc, #f0c040); background: rgba(240,192,64,0.10);
  padding: 3px 10px; border-radius: 12px;
}
.topic-review-list { display: flex; flex-direction: column; gap: 8px; }

/* ===== FLASHCARD SCREEN ===== */
.flashcard-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 16px 20px; perspective: 1200px;
}
.flashcard {
  width: 100%; max-width: 440px; min-height: 320px;
  position: relative; cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.flashcard.flipped { transform: rotateY(180deg); }
.card-front, .card-back {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--mid), var(--deep));
  border: 1.5px solid rgba(240,192,64,0.25);
  border-radius: var(--radius-lg); padding: 28px 24px;
  backface-visibility: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.card-back { transform: rotateY(180deg); overflow-y: auto; }
.card-pos {
  font-family: 'Space Mono', monospace; font-size: 12px;
  color: var(--acc, #f0c040); margin-bottom: 12px;
  background: rgba(240,192,64,0.10);
  display: inline-block; padding: 2px 10px; border-radius: 10px; width: fit-content;
}
.card-word {
  font-family: 'Playfair Display', serif;
  font-size: 42px; color: #fff; line-height: 1.1;
  flex: 1; display: flex; align-items: center;
}
.card-hint { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 16px; text-align: center; }
.card-meaning {
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: #fff; margin-bottom: 14px; line-height: 1.4;
}
.card-example    { font-size: 12px; color: var(--soft); line-height: 1.6; margin-bottom: 8px; font-style: italic; }
.card-translation{ font-size: 12px; color: var(--cyan); margin-bottom: 10px; line-height: 1.5; }
.card-etymology  { font-size: 11px; color: rgba(240,192,64,0.75); margin-bottom: 8px; }
.card-derivatives{ font-size: 11px; color: var(--mint); }

.fc-actions { display: flex; gap: 10px; padding: 0 20px 8px; justify-content: center; }
.fc-nav     { display: flex; gap: 10px; padding: 0 20px 8px; justify-content: space-between; }
.fc-btn {
  padding: 12px 24px; border-radius: 20px; font-size: 13px;
  font-weight: 600; cursor: pointer; border: none; transition: transform 0.15s;
}
.fc-btn:active { transform: scale(0.97); }
.fc-skip  { background: var(--glass); border: 1px solid var(--glass-b); color: var(--soft); }
.fc-knew  { background: linear-gradient(135deg, var(--teal), #0d7a6a); color: #fff; }
.fc-btn-sm {
  background: var(--glass); border: 1px solid var(--glass-b);
  color: var(--soft); padding: 8px 16px;
  border-radius: 20px; font-size: 13px; cursor: pointer;
}
.fc-btn-next {
  background: linear-gradient(135deg, var(--teal), #0d7a6a);
  color: #fff; padding: 10px 24px; border-radius: 20px;
  font-size: 14px; font-weight: 700; cursor: pointer; border: none;
}
.fc-progress-info {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--soft);
}
.topic-badge {
  font-size: 11px; background: rgba(240,192,64,0.10);
  border: 1px solid rgba(240,192,64,0.22);
  padding: 3px 10px; border-radius: 20px; color: var(--acc, #f0c040);
  white-space: nowrap;
}

/* ===== QUIZ SCREEN ===== */
.quiz-timer-wrap { margin: 12px 20px 0; position: relative; }
.quiz-timer-bar {
  height: 6px; background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden;
}
.quiz-timer-bar::after {
  content: ''; display: block; height: 100%;
  background: linear-gradient(90deg, var(--acc, #f0c040), var(--cyan));
  width: var(--timer-pct, 100%);
  transition: width 1s linear;
  border-radius: 3px;
}
.quiz-timer-text {
  position: absolute; right: 0; top: -18px;
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--soft);
}
.quiz-question-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 24px 20px;
}
.quiz-word {
  font-family: 'Playfair Display', serif;
  font-size: 36px; color: #fff; text-align: center;
  line-height: 1.2; margin-bottom: 12px;
}
.quiz-listen-btn button {
  background: var(--glass); border: 1px solid rgba(240,192,64,0.28);
  color: var(--gold); padding: 8px 20px;
  border-radius: 20px; font-size: 14px; cursor: pointer;
}
.quiz-choices {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0 20px;
}
.choice-btn {
  background: var(--glass); border: 1.5px solid var(--glass-b);
  color: #fff; border-radius: var(--radius);
  padding: 14px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: all 0.15s; display: flex; align-items: center; gap: 10px;
}
.choice-btn:active { transform: scale(0.98); }
.choice-btn.correct {
  border-color: var(--mint); background: rgba(52,211,153,0.18); color: var(--mint);
  animation: correctPulse 0.4s ease;
}
.choice-btn.wrong {
  border-color: var(--coral); background: rgba(248,113,113,0.18); color: #fca5a5;
  animation: wrongShake 0.4s ease;
}
.choice-btn.disabled { cursor: default; }
.choice-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--soft);
  background: rgba(255,255,255,0.08); padding: 2px 8px;
  border-radius: 10px; flex-shrink: 0;
}
@keyframes correctPulse {
  0%  { transform: scale(1); }
  30% { transform: scale(1.03); }
  100%{ transform: scale(1); }
}
@keyframes wrongShake {
  0%,100% { transform: translateX(0); }
  25%  { transform: translateX(-6px); }
  75%  { transform: translateX(6px); }
}

/* ===== QUIZ FEEDBACK ===== */
.quiz-feedback {
  margin: 16px 20px 0;
  background: var(--glass); border: 1px solid rgba(240,192,64,0.18);
  border-radius: var(--radius); padding: 16px;
  animation: feedbackSlide 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes feedbackSlide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.feedback-header  { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.feedback-icon    { font-size: 32px; flex-shrink: 0; }
.feedback-msg     { font-size: 16px; font-weight: 700; color: #fff; }
.feedback-correct { font-size: 14px; color: var(--gold); margin-bottom: 12px; font-weight: 600; }
.feedback-hint {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(240,192,64,0.13);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.hint-etymology   { font-size: 12px; color: rgba(255,255,255,0.58); line-height: 1.6; margin-bottom: 8px; }
.hint-derivatives { font-size: 12px; color: var(--gold); margin-bottom: 8px; }
.hint-example     { font-size: 12px; color: var(--soft); line-height: 1.5; font-style: italic; }
.quiz-meta { display: flex; align-items: center; gap: 8px; }
#quiz-progress { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--soft); }
.mode-badge {
  font-size: 11px; background: rgba(240,192,64,0.13);
  border: 1px solid rgba(240,192,64,0.32);
  padding: 3px 10px; border-radius: 20px; color: var(--gold);
}

/* ===== CORRECT BURST ===== */
.correct-burst {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.burst-content {
  font-size: 80px;
  animation: burstPop 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
  text-shadow: 0 0 30px rgba(52,211,153,0.8);
}
@keyframes burstPop {
  0%   { transform: scale(0); opacity: 0; }
  50%  { transform: scale(1.3); opacity: 1; }
  80%  { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ===== RESULTS SCREEN ===== */
.results-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px; text-align: center;
  position: relative; z-index: 10;
}
.results-mascot {
  font-size: 56px; margin-bottom: 12px;
  animation: scaleFloat 3s ease-in-out infinite;
}
.results-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px; color: #fff; margin-bottom: 12px;
}
.results-score {
  font-family: 'Space Mono', monospace;
  font-size: 48px; color: var(--gold); font-weight: 700;
  margin-bottom: 12px;
}
.results-comment  { font-size: 15px; color: var(--mint); margin-bottom: 24px; }
.results-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; width: 100%; max-width: 320px; margin-bottom: 28px;
}
.r-stat {
  background: var(--glass); border: 1px solid rgba(240,192,64,0.18);
  border-radius: var(--radius); padding: 12px;
}
.r-stat-num   { font-family: 'Space Mono', monospace; font-size: 22px; color: var(--gold); }
.r-stat-label { font-size: 11px; color: var(--soft); margin-top: 4px; }
.results-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }

/* ===== CELEBRATION ===== */
.celebration { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.spark {
  position: absolute;
  animation: sparkFly 1s ease-out forwards;
}
@keyframes sparkFly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
.fish-confetti {
  position: absolute;
  animation: fishFly 1.4s ease-out forwards;
}
@keyframes fishFly {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--dr,360deg)) scale(0.3); opacity: 0; }
}

/* ===== MESSAGE OVERLAY ===== */
.shark-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.shark-msg-box {
  background: linear-gradient(135deg, var(--mid), var(--deep));
  border: 2px solid rgba(240,192,64,0.55); border-radius: var(--radius-lg);
  padding: 32px 28px; text-align: center;
  max-width: 300px; animation: fadeInUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.shark-big { font-size: 48px; display: block; margin-bottom: 16px; }
.shark-msg-box p { font-size: 16px; color: #fff; margin-bottom: 20px; line-height: 1.6; }
.shark-msg-box button {
  background: linear-gradient(135deg, var(--teal), #0d7a6a);
  color: #fff; border: none; border-radius: 20px;
  padding: 10px 28px; font-size: 15px; font-weight: 700; cursor: pointer;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(240,192,64,0.22); border-radius: 2px; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ── SFC GP additions ─────────────────────────────── */
.day-wc {
  font-size: 9px;
  color: rgba(255,255,255,0.65);
  display: block;
  margin-top: 1px;
}
