/* ==========================================================================
   PARTS OF THE DAY - CHILDREN'S EDUCATIONAL GAME (AGE 5)
   Shining Star Montessori • English for Kids
   Topic: Morning, Noon, Afternoon, Evening
   ========================================================================== */

:root {
  --ink-black: #1E1B18;
  --paper-bg: #FFFDF9;
  --panel-bg: #FFFFFF;
  --star-gold: #FFB300;
  
  /* Joyful Parts of the Day Color Palette */
  --color-morning: #FF9800;
  --color-morning-bg: #FFF7ED;
  --color-morning-border: #F97316;
  
  --color-noon: #EAB308;
  --color-noon-bg: #FEFCE8;
  --color-noon-border: #CA8A04;
  
  --color-afternoon: #10B981;
  --color-afternoon-bg: #ECFDF5;
  --color-afternoon-border: #059669;
  
  --color-evening: #8B5CF6;
  --color-evening-bg: #F5F3FF;
  --color-evening-border: #6D28D9;
  
  --comic-yellow: #FFD54F;
  --comic-orange: #FF7043;
  --comic-red: #EF4444;
  --comic-green: #22C55E;
  --comic-blue: #3B82F6;
  
  --shadow-comic: 4px 4px 0px var(--ink-black);
  --shadow-comic-lg: 6px 6px 0px var(--ink-black);
  --shadow-comic-hover: 2px 2px 0px var(--ink-black);
  --border-comic: 3px solid var(--ink-black);
  --border-comic-thick: 4px solid var(--ink-black);
  --radius-comic: 24px;
  --radius-card: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: 'Be Vietnam Pro', 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #EAE3D2;
  background-image: 
    radial-gradient(#D3C7B2 1.5px, transparent 1.5px),
    radial-gradient(#D3C7B2 1.5px, #EAE3D2 1.5px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-black);
  padding: 8px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Chuẩn hóa font tiếng Việt Be Vietnam Pro cho mọi text tiếng Việt */
.time-word-vn,
.scene-label-vn,
.speech-text-vn,
.instruction-vn,
.bee-speech-sub,
.hint-sub,
.preview-vn,
.welcome-subtitle {
  font-family: 'Be Vietnam Pro', sans-serif !important;
  text-transform: none !important;
}

.audio-hidden-preloads {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0.001;
  pointer-events: none;
  z-index: -999;
}

/* ==========================================================================
   DESK & FRAME
   ========================================================================== */
.comic-desk {
  width: 100%;
  max-width: 1100px;
  min-height: 94vh;
  display: flex;
  flex-direction: column;
}

.comic-page-frame {
  background: var(--paper-bg);
  border: var(--border-comic-thick);
  border-radius: var(--radius-comic);
  box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  padding: 14px 20px 18px;
  position: relative;
  overflow: hidden;
  flex: 1;
}

/* ==========================================================================
   HEADER / HUD
   ========================================================================== */
.comic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--ink-black);
  padding-bottom: 10px;
  margin-bottom: 12px;
  gap: 12px;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comic-btn {
  background: #FFFFFF;
  border: var(--border-comic);
  box-shadow: var(--shadow-comic);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.comic-btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-comic-hover);
}

.btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
}

.btn-sound-active {
  background: #FFF3C4;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

/* Center Curved Ribbon */
.comic-title-banner {
  flex: 1;
  display: flex;
  justify-content: center;
}

.banner-ribbon {
  background: #FFD54F;
  border: var(--border-comic);
  box-shadow: var(--shadow-comic);
  border-radius: 30px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  text-transform: none;
}

.ribbon-sparkle {
  font-size: 1.2rem;
}

/* Stars progress counter */
.stars-counter {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: var(--border-comic);
  border-radius: 20px;
  padding: 4px 10px;
  box-shadow: var(--shadow-comic);
}

.star-item {
  font-size: 1.3rem;
  color: #E2E8F0;
  transition: color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s ease;
}

.star-item.star-earned {
  color: var(--star-gold);
  transform: scale(1.18);
  animation: starPop 0.4s ease;
}

@keyframes starPop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.35); }
  100% { transform: scale(1.18); }
}

/* ==========================================================================
   SCREENS & PANELS
   ========================================================================== */
.screen-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   SCREEN 1: WELCOME SCREEN
   ========================================================================== */
.welcome-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 16px;
  max-width: 820px;
  margin: 0 auto;
}

.school-pill-badge {
  background: #EEF2FF;
  color: #4F46E5;
  border: 2px solid #6366F1;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--ink-black);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
  line-height: 1.15;
  margin-bottom: 4px;
}

.welcome-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: #D97706;
  margin-bottom: 16px;
}

/* 4 Time Preview Cards */
.times-preview-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  margin-bottom: 18px;
}

.preview-card {
  border: var(--border-comic);
  border-radius: var(--radius-card);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-comic);
  transition: transform 0.2s ease;
}

.preview-card:hover {
  transform: translateY(-4px);
}

.card-morning { background: var(--color-morning-bg); border-color: var(--color-morning-border); }
.card-noon { background: var(--color-noon-bg); border-color: var(--color-noon-border); }
.card-afternoon { background: var(--color-afternoon-bg); border-color: var(--color-afternoon-border); }
.card-evening { background: var(--color-evening-bg); border-color: var(--color-evening-border); }

.preview-icon {
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin-bottom: 6px;
}

.preview-en {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: capitalize;
  color: var(--ink-black);
}

.preview-vn {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748B;
}

/* Welcome Instruction Bubble */
.welcome-instruction-bubble {
  background: #FFFBEB;
  border: 3px solid #F59E0B;
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-comic);
  margin-bottom: 22px;
  max-width: 620px;
  text-align: left;
}

.instruction-speaker-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--ink-black);
  background: #FDE047;
  box-shadow: var(--shadow-comic);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.instruction-speaker-btn:active {
  transform: scale(0.95);
}

.instruction-en {
  font-size: 1.15rem;
  font-weight: 800;
  color: #78350F;
  line-height: 1.3;
}

.instruction-vn {
  font-size: 0.95rem;
  font-weight: 700;
  color: #D97706;
  margin-top: 2px;
}

.start-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-comic-action {
  background: #22C55E;
  color: #FFFFFF;
  border: var(--border-comic-thick);
  box-shadow: var(--shadow-comic-lg);
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-comic-action:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-comic);
}

.btn-pulse {
  animation: pulseButton 2s infinite ease-in-out;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.btn-comic-secondary {
  background: #3B82F6;
  color: #FFFFFF;
  border: var(--border-comic-thick);
  box-shadow: var(--shadow-comic-lg);
  border-radius: 30px;
  padding: 12px 22px;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-comic-secondary:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-comic);
}

/* ==========================================================================
   SCREEN 2: MAIN PLAY SCREEN
   ========================================================================== */
.stage-banner-bar {
  background: #FEF3C7;
  border: 2px solid #F59E0B;
  border-radius: 14px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.hint-text-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.hint-main {
  color: #78350F;
}

.hint-sub {
  color: #B45309;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-mini-speaker {
  background: #FFF;
  border: 2px solid var(--ink-black);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* The Matching Container - Holds absolute SVG overlay and columns grid */
.matching-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 440px;
  display: flex;
  touch-action: none;
}

.matching-columns-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 55px; /* Airy, comfortable gap so children clearly see the connecting lines! */
  width: 100%;
  height: 100%;
  align-items: stretch;
  touch-action: none;
}

/* SVG Line Canvas Overlay */
.connecting-lines-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 10;
  overflow: visible;
}

.permanent-line {
  fill: none !important;
  stroke-width: 7px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.22));
  pointer-events: none !important;
  animation: drawLine 0.35s ease forwards;
}

@keyframes drawLine {
  from { stroke-dasharray: 600; stroke-dashoffset: 600; }
  to { stroke-dashoffset: 0; }
}

.active-drag-line {
  fill: none !important;
  stroke: #F59E0B;
  stroke-width: 6px;
  stroke-dasharray: 8 6;
  stroke-linecap: round;
  pointer-events: none !important;
}

/* Column Time Cards (Left) - Vertical Card Layout: Icon on top, word + VN underneath */
.column-time-cards {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  z-index: 5;
}

.time-card {
  position: relative;
  background: #FFFFFF;
  border: var(--border-comic);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-comic);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px 10px;
  gap: 3px;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.time-card:hover {
  transform: translateX(3px);
  box-shadow: 6px 6px 0px var(--ink-black);
}

.time-card.selected {
  background: #FEF08A !important;
  border-color: #D97706 !important;
  transform: translateX(5px) scale(1.02);
  box-shadow: 6px 6px 0px #78350F;
}

.time-card.matched {
  background: #DCFCE7 !important;
  border-color: #16A34A !important;
  cursor: default;
  opacity: 0.95;
}

.card-icon-wrap {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.time-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-text-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.time-word-en {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink-black);
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.time-word-vn {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748B;
  text-transform: none;
  margin-top: 2px;
}

.time-sound-mini {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(241, 245, 249, 0.9);
  border: 1.5px solid #CBD5E1;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 2;
  transition: transform 0.1s ease;
}

.time-sound-mini:hover {
  background: #E2E8F0;
  transform: scale(1.15);
}

/* Connect Dots */
.connect-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border: 3.5px solid var(--ink-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

.dot-inner {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #CBD5E1;
  transition: background 0.2s ease;
}

.dot-left {
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
}

.dot-right {
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
}

.connect-dot:hover, .time-card.selected .connect-dot, .scene-card.selected .connect-dot {
  transform: translateY(-50%) scale(1.25);
  background: #FEF08A;
  border-color: #D97706;
}

.connect-dot.matched-dot {
  background: #22C55E !important;
  border-color: #15803D !important;
}

.connect-dot.matched-dot .dot-inner {
  background: #FFFFFF !important;
}

/* Column Scene Cards (Right) - Pure Image Cards, Clean & Spacious without word clutter */
.column-scene-cards {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  z-index: 5;
}

.scene-card {
  position: relative;
  background: #FFFFFF;
  border: var(--border-comic);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-comic);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.scene-card:hover {
  transform: translateX(-3px);
  box-shadow: -6px 6px 0px var(--ink-black);
}

.scene-card.selected {
  background: #FEF08A !important;
  border-color: #D97706 !important;
  transform: translateX(-5px) scale(1.02);
  box-shadow: -6px 6px 0px #78350F;
}

.scene-card.matched {
  background: #DCFCE7 !important;
  border-color: #16A34A !important;
  cursor: default;
  opacity: 0.95;
}

.scene-img-frame {
  position: relative;
  width: 100%;
  height: 96px;
  border-radius: 12px;
  border: 2px solid var(--ink-black);
  overflow: hidden;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.scene-card:hover .scene-img {
  transform: scale(1.03);
}

.scene-sound-mini {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--ink-black);
  border-radius: 50%;
  box-shadow: 2px 2px 0px var(--ink-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.12s ease;
}

.scene-sound-mini:hover {
  transform: scale(1.15);
}

.scene-check-badge {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  background: #22C55E;
  color: #FFF;
  border: 2px solid #FFF;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 0.95rem;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
  z-index: 4;
}

.scene-card.matched .scene-check-badge {
  display: flex;
}

/* Wiggle animation on error */
.wobble-error {
  animation: wobbleAnim 0.4s ease;
}

@keyframes wobbleAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ==========================================================================
   BOTTOM SPEECH FEEDBACK BAR
   ========================================================================== */
.speech-interactive-bar {
  background: #FFFFFF;
  border: var(--border-comic);
  border-radius: 18px;
  box-shadow: var(--shadow-comic);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.speech-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FEF08A;
  border: 2px solid #EAB308;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.speech-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.sound-wave-bars {
  display: none;
  align-items: center;
  gap: 3px;
  height: 14px;
  margin-bottom: 2px;
}

.sound-wave-bars.active {
  display: flex;
}

.sound-wave-bars span {
  display: block;
  width: 4px;
  height: 100%;
  background: #3B82F6;
  border-radius: 2px;
  animation: waveBar 0.8s infinite ease-in-out;
}

.sound-wave-bars span:nth-child(2) { animation-delay: 0.15s; }
.sound-wave-bars span:nth-child(3) { animation-delay: 0.3s; }
.sound-wave-bars span:nth-child(4) { animation-delay: 0.45s; }
.sound-wave-bars span:nth-child(5) { animation-delay: 0.6s; }

@keyframes waveBar {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.speech-text-en {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-black);
  line-height: 1.25;
}

.speech-text-vn {
  font-size: 0.88rem;
  font-weight: 700;
  color: #D97706;
}

.btn-feedback-speaker {
  background: #3B82F6;
  color: #FFFFFF;
  border: 2px solid var(--ink-black);
  box-shadow: 2px 2px 0px var(--ink-black);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.btn-feedback-speaker:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ==========================================================================
   SCREEN 3: DAY EXPLORER
   ========================================================================== */
.explorer-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.explorer-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-round-sm {
  padding: 6px 14px;
  font-size: 0.95rem;
  border-radius: 12px;
}

.explorer-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-black);
  text-align: center;
}

.empty-spacer {
  width: 90px;
}

.explorer-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.exp-tab {
  background: #FFFFFF;
  border: var(--border-comic);
  border-radius: 16px;
  padding: 10px 6px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-comic);
  transition: all 0.15s ease;
}

.exp-tab:hover {
  transform: translateY(-2px);
}

.exp-tab.active {
  background: #FDE047;
  border-color: #B45309;
  transform: translateY(2px);
  box-shadow: 2px 2px 0px var(--ink-black);
}

.explorer-stage {
  flex: 1;
  display: flex;
  gap: 20px;
  background: #FFFFFF;
  border: var(--border-comic);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-comic);
  align-items: center;
}

.explorer-image-wrap {
  position: relative;
  flex: 1;
  max-width: 50%;
  height: 340px;
  border-radius: 16px;
  border: var(--border-comic);
  overflow: hidden;
  box-shadow: var(--shadow-comic);
}

.exp-big-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.exp-floating-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #FFD54F;
  border: 2px solid var(--ink-black);
  border-radius: 12px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.explorer-info-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.exp-sentence-en {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink-black);
  line-height: 1.3;
}

.exp-sentence-vn {
  font-size: 1.15rem;
  font-weight: 700;
  color: #D97706;
  line-height: 1.35;
}

.exp-audio-row {
  margin-top: 10px;
}

/* ==========================================================================
   VICTORY MODAL POPUP
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: #FFFFFF;
  border: var(--border-comic-thick);
  border-radius: var(--radius-comic);
  box-shadow: 12px 12px 0px rgba(0, 0, 0, 0.4);
  padding: 24px 30px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.scene-sound-mini {
  background: #F1F5F9;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.scene-sound-mini:hover {
  background: #E2E8F0;
  transform: scale(1.1);
}

.victory-header-pill {
  display: inline-block;
  background: #EEF2FF;
  color: #4F46E5;
  border: 2px solid #6366F1;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 6px;
}

/* Shining Star Bee Mascot Celebration */
.bee-mascot-celebration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 14px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.bee-mascot-celebration:active {
  transform: scale(0.96);
}

.shining-star-bee-img {
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.15));
  animation: beeFloat 2.2s infinite ease-in-out alternate;
}

@keyframes beeFloat {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-10px) rotate(3deg); }
}

.bee-speech-bubble {
  background: #FFEB3B;
  border: 3px solid var(--ink-black);
  border-radius: 18px;
  padding: 10px 16px;
  text-align: left;
  box-shadow: var(--shadow-comic);
  position: relative;
  max-width: 270px;
}

.bee-speech-bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 12px 10px 0;
  border-style: solid;
  border-color: transparent var(--ink-black) transparent transparent;
  display: block;
}

.bee-speech-bubble::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 10px 8px 0;
  border-style: solid;
  border-color: transparent #FFEB3B transparent transparent;
  display: block;
}

.bee-speech-main {
  display: block;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-black);
  line-height: 1.2;
}

.bee-speech-sub {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #D97706;
  margin-top: 4px;
}

.victory-title {
  font-size: 2rem;
  font-weight: 900;
  color: #16A34A;
  margin-bottom: 4px;
}

.victory-desc-en {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-black);
}

.victory-desc-vn {
  font-size: 0.95rem;
  font-weight: 700;
  color: #D97706;
  margin-bottom: 14px;
}

.victory-stars-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 2.2rem;
  color: #FFB300;
  margin-bottom: 20px;
}

.v-star {
  animation: starSpin 0.6s ease;
}

@keyframes starSpin {
  0% { transform: scale(0) rotate(-180deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.victory-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Confetti Overlay */
.confetti-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99;
}

/* ==========================================================================
   RESPONSIVENESS (iPads, Tablets & Mobile Phones)
   ========================================================================== */
@media (max-width: 900px) {
  .matching-columns-grid {
    grid-template-columns: 140px 1fr;
    gap: 36px;
  }
  .card-icon-wrap {
    width: 38px;
    height: 38px;
  }
  .time-word-en {
    font-size: 1.08rem;
  }
  .scene-img-frame {
    height: 86px;
  }
}

@media (max-width: 680px) {
  body {
    padding: 4px;
  }
  .comic-page-frame {
    padding: 8px 8px 12px;
    border-radius: 18px;
  }
  .comic-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    gap: 6px;
  }
  .brand-logo {
    height: 32px;
  }
  .btn-round {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .banner-ribbon {
    padding: 4px 10px;
  }
  .banner-ribbon .title-text {
    font-size: 0.82rem;
  }
  .stars-counter {
    padding: 3px 6px;
    gap: 2px;
  }
  .star-item {
    font-size: 1.05rem;
  }

  /* Welcome Screen on Mobile */
  .times-preview-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .welcome-title {
    font-size: 1.8rem;
  }
  .welcome-instruction-bubble {
    padding: 8px 12px;
    gap: 10px;
  }
  .instruction-en {
    font-size: 0.98rem;
  }
  .instruction-vn {
    font-size: 0.85rem;
  }
  .btn-comic-action {
    padding: 10px 22px;
    font-size: 1.1rem;
  }

  /* Matching Grid on Mobile: Left column compact vertical cards, Right airy pictures */
  .matching-container {
    min-height: 350px;
  }
  .matching-columns-grid {
    grid-template-columns: 100px 1fr;
    gap: 24px;
  }
  .time-card {
    padding: 6px 4px 6px;
    gap: 2px;
  }
  .card-icon-wrap {
    width: 32px;
    height: 32px;
  }
  .time-word-en {
    font-size: 0.92rem;
  }
  .time-word-vn {
    font-size: 0.72rem !important;
    display: block !important;
  }
  .time-sound-mini {
    display: flex !important;
    width: 20px;
    height: 20px;
    font-size: 0.62rem;
    top: 3px;
    left: 3px;
    padding: 0;
  }

  .scene-card {
    padding: 4px;
  }
  .scene-img-frame {
    height: 72px;
    border-radius: 8px;
  }
  .scene-sound-mini {
    display: flex !important;
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    bottom: 6px;
    right: 6px;
    padding: 0;
  }

  /* Connect Dots on phone */
  .connect-dot {
    width: 18px;
    height: 18px;
    border-width: 2.5px;
  }
  .dot-inner {
    width: 6px;
    height: 6px;
  }
  .dot-left {
    right: -9px;
  }
  .dot-right {
    left: -9px;
  }

  /* Bottom Feedback Bar on phone */
  .speech-interactive-bar {
    padding: 6px 10px;
    gap: 8px;
    margin-top: 8px;
  }
  .speech-avatar-wrap {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }
  .speech-text-en {
    font-size: 0.92rem;
  }
  .speech-text-vn {
    font-size: 0.78rem;
  }
  .btn-feedback-speaker {
    padding: 4px 8px;
    font-size: 0.82rem;
  }

  /* Mascot in Victory Modal on phone */
  .shining-star-bee-img {
    width: 90px;
  }
  .bee-speech-main {
    font-size: 1.15rem;
  }
  .bee-speech-sub {
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .matching-columns-grid {
    grid-template-columns: 86px 1fr;
    gap: 16px;
  }
  .scene-img-frame {
    height: 62px;
  }
  .time-word-en {
    font-size: 0.85rem;
  }
  .time-word-vn {
    font-size: 0.68rem !important;
  }
}
