@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ───────── Reset & foundation ───────── */

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

:root {
  --c-bg-1: #ffd6f0;
  --c-bg-2: #c1e7ff;
  --c-bg-3: #fff5d6;
  --c-purple: #6c5ce7;
  --c-purple-dark: #5340d8;
  --c-purple-light: #a29bfe;
  --c-purple-soft: #eef0ff;
  --c-teal: #00b894;
  --c-teal-light: #00cec9;
  --c-teal-soft: #e6fff8;
  --c-ink: #1a1c2e;
  --c-ink-soft: #4a4e6e;
  --c-gray: #8b8da0;
  --c-gray-soft: #e9ecef;
  --c-white: #ffffff;
  --c-pink: #ff6b9d;
  --c-yellow: #ffd166;
  --c-orange: #ff9a3c;
  --radius-card: 28px;
  --radius-bubble: 22px;
  --shadow-card: 0 20px 60px -10px rgba(31, 31, 81, 0.18), 0 8px 20px -8px rgba(31, 31, 81, 0.12);
  --shadow-soft: 0 4px 16px rgba(31, 31, 81, 0.08);
  --shadow-pop: 0 12px 28px -6px rgba(108, 92, 231, 0.45);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Plus Jakarta Sans', 'Fredoka', sans-serif;
  background: #f6f0ff;
  color: var(--c-ink);
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ───────── Animated background ───────── */

.page-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background:
    radial-gradient(ellipse at 0% 0%, var(--c-bg-1) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, var(--c-bg-2) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, var(--c-bg-3) 0%, transparent 60%),
    linear-gradient(160deg, #fafaff 0%, #fff7fa 50%, #f0f7ff 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 380px; height: 380px; background: #ff9ec4; top: -120px; left: -100px; animation-delay: 0s; }
.blob-2 { width: 320px; height: 320px; background: #92d5ff; top: 20%; right: -80px; animation-delay: -6s; }
.blob-3 { width: 280px; height: 280px; background: #ffd96b; bottom: -120px; left: 30%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 25px) scale(0.95); }
}

/* ───────── Page layout ───────── */

.page {
  min-height: 100vh;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(14px, 2vh, 22px) clamp(14px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vh, 16px);
}

/* ───────── Topbar ───────── */

.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  padding: 12px clamp(14px, 2vw, 22px);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 12px;
  border-right: 1px solid rgba(108, 92, 231, 0.15);
}

.brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(108, 92, 231, 0.2));
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--c-purple);
  letter-spacing: -0.02em;
}
.brand-sub { font-weight: 500; font-size: 0.72rem; color: var(--c-gray); margin-top: 2px; }

.topbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(8px, 1.5vw, 14px);
  flex-wrap: wrap;
}

.toggles { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--c-gray-soft);
  background: var(--c-white);
  color: var(--c-ink-soft);
  border-radius: 50px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.toggle-btn:hover {
  border-color: var(--c-purple-light);
  color: var(--c-purple);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.toggle-btn.active {
  background: linear-gradient(135deg, var(--c-purple) 0%, var(--c-purple-light) 100%);
  color: var(--c-white);
  border-color: transparent;
  box-shadow: var(--shadow-pop);
}
.toggle-btn.icon-only { width: 38px; height: 38px; padding: 0; justify-content: center; font-weight: 700; font-size: 1rem; }
.toggle-icon { font-size: 1em; line-height: 1; }

@media (max-width: 920px) {
  .toggle-label { display: none; }
  .toggle-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 640px) {
  .topbar { grid-template-columns: 1fr; }
  .brand { border-right: none; border-bottom: 1px solid rgba(108, 92, 231, 0.15); padding-bottom: 10px; padding-right: 0; }
  .topbar-controls { justify-content: flex-start; }
}

/* ───────── Verb picker (chips) ───────── */

.verb-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  padding: 10px clamp(12px, 2vw, 18px);
  box-shadow: var(--shadow-soft);
}

.verb-picker-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-gray);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.verb-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.verb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  background: var(--c-white);
  border: 1.5px solid var(--c-gray-soft);
  border-radius: 50px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.verb-chip:hover {
  border-color: var(--c-purple-light);
  color: var(--c-purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.verb-chip.active {
  background: linear-gradient(135deg, var(--c-purple) 0%, var(--c-purple-light) 100%);
  color: var(--c-white);
  border-color: transparent;
  box-shadow: var(--shadow-pop);
}

.verb-chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-gray-soft);
  color: var(--c-gray);
  font-size: 0.65rem;
  font-weight: 800;
}

.verb-chip.active .verb-chip-num {
  background: rgba(255, 255, 255, 0.3);
  color: var(--c-white);
}

.verb-chip-emoji { font-size: 1em; }
.verb-chip-emoji img.emoji { width: 16px !important; height: 16px !important; vertical-align: middle; }
.verb-chip-name { letter-spacing: 0.02em; }

@media (max-width: 640px) {
  .verb-picker { flex-direction: column; align-items: stretch; gap: 8px; }
  .verb-picker-label { text-align: center; }
}

/* ───────── Stage (main card) ───────── */

.stage {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-card);
  padding: clamp(18px, 2.5vw, 32px);
  box-shadow: var(--shadow-card);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vh, 18px);
  position: relative;
  overflow: hidden;
}

.stage::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-purple) 0%, var(--c-pink) 50%, var(--c-teal-light) 100%);
  background-size: 200% 100%;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Stage head: topic badge + progress bar */

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 20px);
  flex-wrap: wrap;
}

.topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(255, 107, 157, 0.08));
  border: 1.5px solid rgba(108, 92, 231, 0.2);
  border-radius: 20px;
  padding: 10px 18px 10px 12px;
}

.topic-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--c-white);
  border-radius: 50%;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(31, 31, 81, 0.1);
}
.topic-emoji img.emoji { width: 32px !important; height: 32px !important; }

.topic-text { display: flex; flex-direction: column; line-height: 1.1; }
.topic-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  color: var(--c-purple);
  letter-spacing: -0.01em;
}
.topic-sub {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--c-gray);
  margin-top: 3px;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: var(--c-gray-soft);
  border-radius: 50px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-purple), var(--c-purple-light), var(--c-teal-light));
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
  border-radius: 50px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}

.progress-text {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-gray);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* ───────── Conversation ───────── */

.conversation {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vh, 20px);
  flex: 1;
  justify-content: center;
  padding: clamp(8px, 1.5vh, 14px) 0;
}

.turn {
  display: flex;
  align-items: flex-end;
  gap: clamp(8px, 1.5vw, 14px);
}

.turn-teacher { justify-content: flex-start; }
.turn-student { justify-content: flex-end; }

.avatar {
  flex-shrink: 0;
  width: clamp(48px, 6vw, 60px);
  height: clamp(48px, 6vw, 60px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-white);
  box-shadow: 0 6px 18px rgba(31, 31, 81, 0.12), inset 0 0 0 3px rgba(255, 255, 255, 0.9);
  position: relative;
  margin-bottom: 14px;
}

.avatar-teacher {
  background: linear-gradient(135deg, #e0d7ff, #c9beff);
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.3), inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.avatar-student {
  background: radial-gradient(circle at 50% 30%, #e1f3ff 0%, #b8d4f5 100%);
  box-shadow: 0 8px 22px rgba(0, 100, 200, 0.3),
              inset 0 0 0 3px #ffd166,
              inset 0 0 0 4px rgba(255, 255, 255, 0.8);
}

/* Atena's avatar is slightly bigger to give her character image room to shine */
.avatar-student {
  width: clamp(56px, 7vw, 72px);
  height: clamp(56px, 7vw, 72px);
  overflow: hidden;
}

.avatar-emoji { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1; }
.avatar-emoji img.emoji { width: clamp(28px, 4.5vw, 36px) !important; height: clamp(28px, 4.5vw, 36px) !important; }

/* Custom character image — used for Atena's super-hero portrait */
.avatar-img {
  width: 110%;        /* slightly oversize so the character fills the circle */
  height: 110%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%; /* focus on the face/upper body */
  display: block;
}

.avatar-name {
  position: absolute;
  bottom: -16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(31, 31, 81, 0.12);
}
.avatar-teacher .avatar-name { background: var(--c-purple); color: var(--c-white); }
.avatar-student .avatar-name { background: var(--c-teal);   color: var(--c-white); }

/* ───────── Bubbles ───────── */

.bubble {
  position: relative;
  max-width: min(78%, 720px);
  padding: clamp(14px, 2vh, 20px) clamp(18px, 2.4vw, 26px);
  border-radius: var(--radius-bubble);
  box-shadow: 0 8px 24px -8px rgba(31, 31, 81, 0.12);
  animation: bubbleIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bubbleIn {
  from { transform: translateY(12px) scale(0.94); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.bubble-q {
  background: linear-gradient(135deg, #ffffff 0%, #f5f1ff 100%);
  border: 2px solid rgba(108, 92, 231, 0.18);
  border-bottom-left-radius: 6px;
}
.bubble-q::before {
  content: '';
  position: absolute;
  left: -10px; bottom: 10px;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f1ff 100%);
  border-left: 2px solid rgba(108, 92, 231, 0.18);
  border-bottom: 2px solid rgba(108, 92, 231, 0.18);
  border-bottom-left-radius: 6px;
  transform: rotate(45deg);
}

.bubble-a {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border: 2px solid rgba(0, 184, 148, 0.22);
  border-bottom-right-radius: 6px;
}
.bubble-a::before {
  content: '';
  position: absolute;
  right: -10px; bottom: 10px;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border-right: 2px solid rgba(0, 184, 148, 0.22);
  border-bottom: 2px solid rgba(0, 184, 148, 0.22);
  border-bottom-right-radius: 6px;
  transform: rotate(-45deg);
}

.bubble-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
}
.bubble-q .bubble-tag { background: rgba(108, 92, 231, 0.12); color: var(--c-purple-dark); }
.bubble-a .bubble-tag { background: rgba(0, 184, 148, 0.14);   color: #008b6e; }

.bubble-en {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 3.2vw, 2.2rem);
  line-height: 1.25;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  word-break: break-word;
}
.bubble-q .bubble-en { color: var(--c-purple-dark); }
.bubble-a .bubble-en { color: #006e57; }

.bubble-pt {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(31, 31, 81, 0.12);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  color: var(--c-gray);
  line-height: 1.35;
}
.bubble-pt::before {
  content: 'pt';
  display: inline-block;
  font-size: 0.7em;
  font-weight: 800;
  padding: 1px 8px;
  margin-right: 8px;
  border-radius: 50px;
  background: rgba(255, 209, 102, 0.22);
  color: #b07a00;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.bubble-pt[hidden] { display: none; }

/* ───────── Verb highlight inside English bubble text ───────── */

.phrase-word {
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}

.verb-word {
  display: inline-block;
  background: linear-gradient(180deg, #ffe28a 0%, #ffc94d 100%);
  color: #5a3300;
  padding: 0.05em 0.5em;
  margin: 0 0.06em;
  border-radius: 0.45em;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    0 2px 0 #d49100,
    0 4px 14px rgba(255, 173, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.verb-word:hover {
  background: linear-gradient(180deg, #ffd166 0%, #ffb627 100%);
  transform: translateY(-2px) scale(1.04);
}

.bubble-en:hover .phrase-word:hover {
  transform: scale(1.12) translateY(-2px);
  color: var(--c-pink);
}

/* Locked answer state */

.bubble-a:has(.bubble-locked:not([hidden])) {
  background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(236, 253, 245, 0.4));
  border-style: dashed;
}
.bubble-locked { display: flex; align-items: center; justify-content: center; min-height: 60px; }

.reveal-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  background: linear-gradient(135deg, var(--c-teal) 0%, var(--c-teal-light) 100%);
  color: var(--c-white);
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  cursor: pointer;
  box-shadow: 0 6px 18px -4px rgba(0, 184, 148, 0.55);
  transition: all 0.2s;
}
.reveal-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 22px -4px rgba(0, 184, 148, 0.65);
}
.reveal-icon { font-size: 1.1em; }
.reveal-kbd {
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 0.75em;
  font-weight: 700;
  margin-left: 4px;
  font-family: inherit;
}

/* ───────── Stage footer (meta + nav) ───────── */

.stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: clamp(8px, 1.5vh, 14px);
  border-top: 1px solid rgba(31, 31, 81, 0.08);
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 24px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: clamp(0.72rem, 1.2vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.seen-indicator { background: var(--c-teal-soft); color: #006e57; }
.seen-indicator.inline { display: inline-flex; margin: 0 4px; }
.shuffle-indicator { background: var(--c-purple-soft); color: var(--c-purple-dark); }

/* ───────── Nav buttons ───────── */

.nav-buttons { display: flex; gap: 10px; }

.nav-btn {
  width: clamp(46px, 6vw, 56px);
  height: clamp(46px, 6vw, 56px);
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-btn .nav-arrow { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1; font-weight: 700; }

.nav-prev {
  background: var(--c-white);
  color: var(--c-purple);
  box-shadow: 0 6px 16px -4px rgba(31, 31, 81, 0.18), inset 0 0 0 1.5px var(--c-gray-soft);
}
.nav-prev:hover:not(:disabled) {
  color: var(--c-purple-dark);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 22px -4px rgba(108, 92, 231, 0.45), inset 0 0 0 1.5px var(--c-purple-light);
}
.nav-next {
  background: linear-gradient(135deg, var(--c-purple) 0%, var(--c-purple-light) 100%);
  color: var(--c-white);
  box-shadow: var(--shadow-pop);
}
.nav-next:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--c-purple-dark) 0%, var(--c-purple) 100%);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px -4px rgba(108, 92, 231, 0.6);
}
.nav-btn:disabled { background: var(--c-gray-soft); color: #c9ccd8; cursor: not-allowed; box-shadow: none; }

/* ───────── Help modal ───────── */

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.help-modal[hidden] { display: none !important; }

.help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 28, 46, 0.55);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.help-content {
  position: relative;
  background: var(--c-white);
  border-radius: 26px;
  padding: clamp(22px, 3.5vw, 40px);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px -10px rgba(26, 28, 46, 0.4);
  animation: popIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
  from { transform: scale(0.85); opacity: 0 }
  to   { transform: scale(1); opacity: 1 }
}

.help-content h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.help-intro { font-size: 0.95rem; color: var(--c-gray); margin-bottom: 20px; }

.help-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--c-gray-soft);
  color: var(--c-ink-soft);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.help-close:hover { background: var(--c-purple-soft); color: var(--c-purple); transform: rotate(90deg); }

.help-grid { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 10px; }

.help-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  color: var(--c-ink-soft);
  transition: background 0.15s;
}
.help-row:hover { background: var(--c-purple-soft); }

.help-row kbd {
  display: inline-block;
  min-width: 52px;
  padding: 4px 12px;
  background: linear-gradient(180deg, var(--c-white) 0%, #f4f6f8 100%);
  border: 1px solid #d1d5e2;
  border-bottom-width: 2.5px;
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  color: var(--c-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
}

.help-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--c-gray-soft);
  font-size: 0.86rem;
  color: var(--c-gray);
  line-height: 1.5;
}
.help-foot kbd {
  display: inline-block;
  background: var(--c-purple-soft);
  color: var(--c-purple);
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.help-foot .verb-word {
  display: inline-block;
  background: linear-gradient(180deg, #ffe28a 0%, #ffc94d 100%);
  color: #5a3300;
  padding: 0.05em 0.5em;
  border-radius: 0.4em;
  font-weight: 800;
  box-shadow: 0 1px 0 #d49100, inset 0 1px 0 rgba(255,255,255,0.6);
}

.help-note {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(255, 107, 157, 0.04));
  border-left: 3px solid var(--c-purple-light);
  padding: 12px 14px;
  border-radius: 10px;
  border-top: none;
  margin-top: 14px;
  color: var(--c-ink-soft);
}

/* ───────── Responsive ───────── */

@media (max-width: 720px) {
  .page { padding: 12px; gap: 10px; }
  .topbar { padding: 12px; }
  .stage { padding: 16px 14px; }
  .avatar { width: 44px; height: 44px; }
  .turn { gap: 8px; }
  .bubble { max-width: 86%; padding: 14px 16px; }
  .bubble-en { font-size: 1.15rem; }
  .bubble-tag { font-size: 0.65rem; }
  .stage-head { flex-direction: column; align-items: stretch; }
  .progress-wrap { max-width: none; }
  .stage-meta { flex-direction: column; gap: 10px; align-items: stretch; }
  .meta-left { justify-content: center; }
  .nav-buttons { justify-content: center; }
  .verb-chip { font-size: 0.78rem; padding: 5px 10px 5px 6px; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .bubble-q::before, .bubble-a::before { display: none; }
  .topic-emoji { width: 38px; height: 38px; }
  .topic-emoji img.emoji { width: 26px !important; height: 26px !important; }
}
