* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
  color: #1e293b;
}

.app-container {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  max-height: 932px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

@media (min-width: 440px) {
  .app-container {
    border-radius: 42px;
    border: 8px solid #1e293b;
    height: 880px;
  }
}

.screen-view {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #ffffff;
  overflow: hidden;
}

.screen-view.active {
  display: flex;
}

/* ========================================================
   WELCOME VIEW
   ======================================================== */
.welcome-hero-stage {
  position: relative;
  flex: 1.1;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.stage-bg-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mascot-platform {
  position: relative;
  z-index: 5;
  width: 190px;
  height: 190px;
  margin-bottom: 20px;
}

.welcome-action-sheet {
  flex: 0.9;
  background: #ffffff;
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
  padding: 28px 24px max(34px, env(safe-area-inset-bottom, 34px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.06);
  z-index: 10;
}

.welcome-copy h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.welcome-copy p {
  font-size: 13.5px;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.45;
}

.btn-cta-green {
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
  padding: 16px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 6px 0 #15803d, 0 10px 20px rgba(34, 197, 94, 0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-cta-green:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #15803d, 0 5px 10px rgba(34, 197, 94, 0.3);
}

.login-subtext {
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
}

.login-subtext span {
  color: #16a34a;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
}

/* ========================================================
   AUTH FORMS (MOVED DOWN)
   ======================================================== */
.form-scroll-container {
  padding: max(56px, calc(env(safe-area-inset-top) + 16px)) 22px max(24px, env(safe-area-inset-bottom, 24px));
  height: 100%;
  overflow-y: auto;
}

.back-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 20px;
}

.form-header-box h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.form-header-box p {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.auth-form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field label {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 16px;
}

.input-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

/* ========================================================
   DASHBOARD & NAVBAR (MOVED DOWN BELOW DYNAMIC ISLAND)
   ======================================================== */
.dashboard-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: max(56px, calc(env(safe-area-inset-top) + 16px)) 20px 95px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.status-capsule {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 13px;
}

.capsule-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

.capsule-stat.streak-color { color: #ea580c; }
.capsule-stat.gem-color { color: #d97706; }

.circle-tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dash-greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.dash-greeting-row h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.dash-greeting-row p {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.avatar-ribbon-circ {
  width: 52px;
  height: 52px;
  cursor: pointer;
}

/* 3 Stat Bubbles */
.stats-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
}

.stat-bubble {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.flame-bg { background: #ffedd5; }
.xp-bg { background: #fef3c7; }
.league-bg { background: #dbeafe; }

.s-label { font-size: 10.5px; font-weight: 700; color: #64748b; }
.s-val { font-size: 17px; font-weight: 800; color: #0f172a; }
.s-sub { font-size: 10px; color: #94a3b8; font-weight: 600; }

/* ========================================================
   FULL SPACIOUS LESSON 1 CARD
   ======================================================== */
.forest-learning-card {
  background: #14532d;
  border-radius: 26px;
  padding: 22px 20px 22px 22px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(20, 83, 45, 0.28);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 220px;
}

.forest-learning-card .tag-label {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.forest-learning-card h3 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  max-width: 65%;
  margin-bottom: 4px;
}

.lesson-sub {
  font-size: 12px;
  color: #86efac;
  margin-bottom: 14px;
  max-width: 65%;
}

.progress-bar-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  max-width: 60%;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 99px;
  transition: width 0.3s;
}

.bar-pct {
  font-size: 11px;
  font-weight: 800;
  color: #dcfce7;
}

.btn-green-pill {
  background: #22c55e;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s;
}

.btn-green-pill:active {
  transform: scale(0.95);
}

.convo-glow-art {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 96px;
  height: 76px;
  pointer-events: none;
  opacity: 0.95;
}

/* ========================================================
   AI QUESTION MAKER CARD ON DASHBOARD
   ======================================================== */
.ai-feature-card {
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 22px;
  padding: 18px 20px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  flex-shrink: 0;
  transition: transform 0.1s;
}

.ai-feature-card:active {
  transform: scale(0.98);
}

.ai-badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ai-sparkle-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  padding: 4px 9px;
  border-radius: 8px;
}

.ai-badge-header span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

.ai-feature-card h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

.ai-feature-card p {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

.section-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  flex-shrink: 0;
}

.section-row-header h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.edit-text, .see-all-text {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  cursor: pointer;
}

.goal-box-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.goal-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-head { font-size: 13.5px; font-weight: 800; color: #0f172a; }
.goal-time { font-size: 11.5px; font-weight: 600; color: #64748b; }

.gift-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.xp-badge {
  font-size: 10px;
  font-weight: 800;
  color: #d97706;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 2px;
}

.quick-practice-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex-shrink: 0;
}

.practice-chip {
  aspect-ratio: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
}

.practice-chip:active {
  transform: scale(0.94);
}

/* ========================================================
   BOTTOM TAB BAR (SAFE AREA INSET)
   ======================================================== */
.app-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1.5px solid #f1f5f9;
  display: flex;
  justify-content: space-around;
  padding: 8px 12px max(14px, env(safe-area-inset-bottom, 14px));
  z-index: 50;
}

.bar-tab-btn {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
}

.bar-tab-btn.active {
  color: #16a34a;
}

/* ========================================================
   LEARNING PATH TREE (MOVED DOWN BELOW DYNAMIC ISLAND)
   ======================================================== */
.path-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: max(56px, calc(env(safe-area-inset-top) + 16px)) 20px 95px;
}

.path-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.path-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.unit-group-section {
  margin-bottom: 28px;
}

.unit-ticket-banner {
  background: #14532d;
  color: #ffffff;
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.unit-ticket-banner h3 { font-size: 14.5px; font-weight: 800; }
.unit-ticket-banner p { font-size: 11.5px; color: #86efac; margin-top: 2px; }

.nodes-tree-flow {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
}

.map-node-btn {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.1s;
}

.map-node-btn:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
}

.node-pos-center { left: calc(50% - 31px); }
.node-pos-left { left: calc(50% - 85px); }
.node-pos-right { left: calc(50% + 23px); }

.node-green {
  background: #22c55e;
  box-shadow: 0 6px 0 #15803d;
}

.node-active-green {
  background: #22c55e;
  box-shadow: 0 6px 0 #15803d, 0 0 0 6px rgba(34, 197, 94, 0.3);
  animation: bounceNode 2s infinite;
}

@keyframes bounceNode {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.node-locked {
  background: #e2e8f0;
  box-shadow: 0 6px 0 #cbd5e1;
  cursor: not-allowed;
}

.start-tooltip-bubble {
  position: absolute;
  top: -30px;
  background: #0f172a;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ========================================================
   AI SECTION 3-TAB STUDIO (MOVED DOWN BELOW DYNAMIC ISLAND)
   ======================================================== */
.ai-mode-segmented-bar {
  display: flex;
  background: #e2f4e0;
  padding: 5px;
  border-radius: 18px;
  margin: max(56px, calc(env(safe-area-inset-top) + 16px)) 16px 14px;
  gap: 6px;
}

.ai-mode-pill-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 6px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #3b6348;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-mode-pill-btn.active {
  background: #ffffff;
  color: #15803d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-panel-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 95px;
}

.ai-panel-content.active {
  display: block;
}

/* LIVE CALL CARD IN TAB 1 */
.live-calling-studio-card {
  background: radial-gradient(circle at 50% 20%, #14532d 0%, #06190c 100%);
  border: 1.5px solid #22c55e;
  border-radius: 24px;
  padding: 18px;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.18);
  display: flex;
  flex-direction: column;
}

.call-studio-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.call-live-badge {
  font-size: 11px;
  font-weight: 800;
  color: #4ade80;
  letter-spacing: 0.5px;
}

.call-timer-ticker {
  font-size: 12px;
  color: #86efac;
  font-weight: 700;
}

.call-avatar-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.call-mascot-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  box-shadow: 0 10px 24px rgba(0,0,0,0.5), 0 0 0 5px rgba(34, 197, 94, 0.4);
}

.call-ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(74, 222, 128, 0.3);
  pointer-events: none;
}

.ring-1 { width: 130px; height: 130px; animation: waveRipple 2s infinite; }
.ring-2 { width: 160px; height: 160px; animation: waveRipple 2s infinite 0.5s; }
.ring-3 { width: 190px; height: 190px; animation: waveRipple 2s infinite 1s; }

@keyframes waveRipple {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

.call-status-pill {
  margin-top: 18px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 99px;
  padding: 5px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #86efac;
}

.pulse-speaking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.call-captions-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
}

.caption-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.caption-speaker {
  font-size: 10px;
  font-weight: 800;
  color: #4ade80;
}

.caption-row p {
  font-size: 13px;
  color: #ffffff;
  line-height: 1.4;
}

.caption-row.user-caption .caption-speaker {
  color: #60a5fa;
}

.caption-row.user-caption p {
  color: #cbd5e1;
  font-style: italic;
}

.call-controls-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.call-tool-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* TAB 2: DRILL MAKER */
.ai-prompt-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-prompt-box label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.ai-prompt-box input {
  padding: 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

.ai-loading-state {
  margin-top: 16px;
  text-align: center;
  padding: 18px;
  background: #f0fdf4;
  border: 1px dashed #22c55e;
  border-radius: 16px;
}

.spinner-circle {
  width: 28px;
  height: 28px;
  border: 3px solid #bbf7d0;
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.drill-list-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.drill-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.drill-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drill-card strong {
  display: block;
  font-size: 13.5px;
  color: #0f172a;
}

.drill-card span {
  font-size: 11.5px;
  color: #64748b;
}

/* TAB 3: KIMGPT CHAT */
.kimgpt-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 16px 0;
}

.kimgpt-chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.45;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: #22c55e;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.sender-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #16a34a;
  margin-bottom: 2px;
}

.chat-img-thumb {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 6px;
}

.kimgpt-image-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 12px;
  margin-bottom: 8px;
}

.kimgpt-image-preview img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.btn-remove-img {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  cursor: pointer;
}

.kimgpt-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
}

.btn-upload-camera {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.kimgpt-input-bar input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 99px;
  outline: none;
  font-size: 13.5px;
  font-weight: 600;
}

.btn-send-kimgpt {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #22c55e;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ========================================================
   QUIZ VIEW (MOVED DOWN BELOW DYNAMIC ISLAND)
   ======================================================== */
.lesson-quiz-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

.quiz-top-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(56px, calc(env(safe-area-inset-top) + 16px)) 20px 10px;
}

.quiz-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
}

.quiz-progress-track {
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 99px;
  transition: width 0.3s;
}

.quiz-heart-counter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 800;
  color: #16a34a;
}

.quiz-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-header-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-prompt-tag {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.5px;
}

.quiz-question-counter {
  font-size: 12px;
  font-weight: 800;
  color: #16a34a;
}

.quiz-phrase-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 22px;
  padding: 18px 16px;
}

.audio-pronounce-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #22c55e;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.phrase-text-group .target-word {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.phrase-text-group .target-subtext {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.quiz-option-btn.selected {
  border-color: #22c55e;
  background: #f0fdf4;
}

.quiz-kimgpt-hint-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 8px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  cursor: pointer;
}

.hint-pulse-dot {
  width: 6px;
  height: 6px;
  background: #f59e0b;
  border-radius: 50%;
}

.quiz-hint-modal-card {
  background: #fffbeb;
  border: 1.5px solid #fef08a;
  border-radius: 16px;
  padding: 14px;
  font-size: 13px;
  color: #78350f;
}

.hint-modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-close-hint {
  background: transparent;
  border: none;
  font-weight: 800;
  cursor: pointer;
}

.quiz-footer-sheet {
  background: #ffffff;
  border-top: 2px solid #f1f5f9;
  padding: 16px 20px max(20px, env(safe-area-inset-bottom, 20px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-footer-sheet.correct {
  background: #f0fdf4;
  border-top-color: #86efac;
}

.quiz-footer-sheet.wrong {
  background: #fef2f2;
  border-top-color: #fca5a5;
}

.feedback-title {
  font-size: 16px;
  font-weight: 800;
}

.quiz-footer-sheet.correct .feedback-title { color: #16a34a; }
.quiz-footer-sheet.wrong .feedback-title { color: #ef4444; }

.feedback-explanation {
  font-size: 13px;
  color: #334155;
  white-space: pre-line;
  margin-top: 4px;
}

.feedback-grammar-note {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-top: 4px;
}

.btn-check-answer {
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 5px 0 #15803d;
}

.btn-check-answer:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

/* ========================================================
   SUMMARY & FAILED SCREENS (MOVED DOWN)
   ======================================================== */
.summary-card-container {
  padding: max(56px, calc(env(safe-area-inset-top) + 16px)) 24px max(36px, env(safe-area-inset-bottom, 36px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  overflow-y: auto;
}

.summary-mascot-box {
  position: relative;
  margin-bottom: 14px;
}

.frog-confetti-ring {
  font-size: 20px;
  margin-bottom: 6px;
}

.summary-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.summary-sub {
  font-size: 13.5px;
  color: #64748b;
  margin-top: 4px;
}

.summary-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin: 24px 0;
}

.summary-stat-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
}

.stat-box-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  display: block;
}

.stat-box-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
  display: block;
}

.summary-streak-banner {
  background: #fff7ed;
  border: 1.5px solid #ffedd5;
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  margin-bottom: 24px;
}

.streak-flame-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffedd5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-streak-banner h4 {
  font-size: 14px;
  font-weight: 800;
  color: #ea580c;
}

.summary-streak-banner p {
  font-size: 11.5px;
  color: #9a3412;
}

.btn-secondary-plain {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
}