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

:root {
  --bg: #F2F7FE;
  --bg-dot: rgba(29, 99, 237, 0.10);
  --surface: #FFFFFF;
  --surface-tint: #EFF5FF;
  --surface-warm: #FFF8E7;
  --ink: #132238;
  --ink-muted: #425672;
  --border: #D4E0F0;
  --border-strong: #B0C4DE;

  --primary: #1D63ED;
  --primary-dark: #154BB8;
  --primary-soft: #E5EFFE;

  --amber: #F59E0B;
  --amber-dark: #92400E;
  --amber-soft: #FEF3C7;

  --emerald: #047857;
  --emerald-dark: #065F46;
  --emerald-soft: #D1FAE5;

  --coral: #BE123C;
  --coral-dark: #9F1239;
  --coral-soft: #FFE4E6;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(19, 34, 56, 0.06);
  --shadow-md: 0 8px 24px rgba(19, 34, 56, 0.09);
  --shadow-lg: 0 14px 36px rgba(19, 34, 56, 0.13);

  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  line-height: 1.45;
  overflow-x: hidden;
}

/* ==================== ZERO-SCROLL FULL-VIEWPORT SLIDE APP (WEB MURID) ==================== */
body.slide-app {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--amber-soft);
  color: var(--ink);
}

img {
  max-width: 100%;
  display: block;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ==================== COMPACT TOPBAR ==================== */
.topbar {
  flex-shrink: 0;
  z-index: 50;
  background: rgba(242, 247, 254, 0.96);
  border-bottom: 2px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--primary);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-mark.teacher {
  background: var(--amber);
  color: var(--ink);
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: #FFFFFF; box-shadow: 0 3px 10px rgba(29, 99, 237, 0.22); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover:not(:disabled) { background: #E08C06; }

.btn-emerald { background: var(--emerald); color: #FFFFFF; box-shadow: 0 3px 10px rgba(4, 120, 87, 0.22); }
.btn-emerald:hover:not(:disabled) { background: var(--emerald-dark); }

.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-soft:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

.btn-danger-soft { background: var(--coral-soft); color: var(--coral-dark); border-color: #FDA4AF; }
.btn-danger-soft:hover:not(:disabled) { background: var(--coral); color: #FFFFFF; }

.btn-sm { min-height: 36px; padding: 6px 11px; font-size: 0.83rem; border-radius: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--primary-soft);
  color: var(--primary-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.pill.emerald { background: var(--emerald-soft); color: var(--emerald-dark); }
.pill.amber { background: var(--amber-soft); color: var(--amber-dark); }
.pill.coral { background: var(--coral-soft); color: var(--coral-dark); }

/* ==================== SLIDE DECK STAGE (ZERO SCROLL) ==================== */
.deck-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.deck-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.slide {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  animation: slideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide.active {
  display: flex;
}

@keyframes slideIn {
  0% { opacity: 0; transform: translateX(18px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ==================== SLIDE 0: PETA 10 PERTEMUAN (1 LAYAR PENUH) ==================== */
.map-top-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.map-greet {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.map-mascot-mini {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #FAF7EE;
  border: 1.5px solid #EAE2CE;
  object-fit: cover;
  flex-shrink: 0;
}

.map-greet h1 {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
}

.map-greet p {
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-ann-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-soft);
  border: 1.5px solid #FCD34D;
  border-radius: 12px;
  padding: 7px 12px;
  margin-bottom: 10px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink);
}

.map-grid-10 {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
}

.meeting-tile {
  position: relative;
  text-align: left;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, border-color 0.14s ease;
  overflow: hidden;
}

.meeting-tile:hover { transform: translateY(-2px); }
.meeting-tile.unlocked {
  border-color: color-mix(in srgb, var(--tile-accent, #1D63ED) 38%, #FFFFFF);
  background: linear-gradient(180deg, #FFFFFF 0%, color-mix(in srgb, var(--tile-accent, #1D63ED) 9%, #FFFFFF) 100%);
  box-shadow: 0 3px 10px rgba(19, 34, 56, 0.06);
}
.meeting-tile.unlocked:hover {
  border-color: var(--tile-accent, var(--primary));
  box-shadow: 0 6px 16px rgba(19, 34, 56, 0.10);
}
.meeting-tile.locked {
  background: #F4F6FA;
  border-style: dashed;
  border-color: #CBD5E1;
  color: var(--ink-muted);
}
.meeting-tile.shake { animation: lockShake 0.4s ease; }

.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tile-ico-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #64748B;
  background: #E2E8F0;
}

.tile-num {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #FFFFFF;
}
.meeting-tile.locked .tile-num { background: #94A3B8; }

.tile-title {
  font-family: var(--font-display);
  font-size: clamp(0.84rem, 1.4vw, 1rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.22;
}
.meeting-tile.locked .tile-title { color: #52637A; }

.tile-sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-foot {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--emerald-dark);
}
.tile-foot.tile-done {
  display: inline-block;
  width: fit-content;
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  padding: 2px 7px;
  border-radius: 999px;
}
.meeting-tile.locked .tile-foot { color: var(--ink-muted); }

/* ==================== SLIDE CARD SHELL (SLIDES 1..6) ==================== */
.slide-card {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.slide-header {
  flex-shrink: 0;
  padding: 10px 16px;
  background: linear-gradient(135deg, #1D63ED 0%, #154BB8 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slide-header h2 {
  font-size: clamp(1rem, 2.3vw, 1.32rem);
  color: #FFFFFF;
}

.slide-body {
  flex: 1;
  min-height: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ==================== SLIDE 1: INTRO PERTEMUAN ==================== */
.intro-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: center;
}

.intro-mobile-mascot {
  display: none;
}

.intro-mobile-titles h3 {
  font-size: clamp(1.18rem, 2.7vw, 1.65rem);
  margin-bottom: 6px;
}

.intro-mobile-titles p {
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.intro-art {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #FAF7EE;
  border: 2px solid #EAE2CE;
  border-radius: var(--radius-md);
  padding: 10px;
  height: 100%;
  max-height: 360px;
}

.intro-art img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.intro-points {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.intro-point {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface-tint);
  font-weight: 700;
  font-size: 0.92rem;
}

.intro-point-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-display);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ==================== SLIDES 2-4: GAME EXPERIMENT STAGE (ZERO SCROLL) ==================== */
.exp-stage-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-step-pills {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.step-pill-btn {
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface-tint);
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.step-pill-btn.completed {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: var(--emerald-dark);
}

.step-pill-btn.locked-step {
  opacity: 0.48;
  border-style: dashed;
}

.deck-dot.locked-dot {
  opacity: 0.42;
  border-style: dashed;
  background: #F1F5F9;
}

.btn-locked {
  background: #94A3B8 !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  opacity: 0.82;
}

.exp-media-box {
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-md);
  border: 2px solid #BFDBFE;
  background: #DFF1FF;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.exp-media-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-tap-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(19, 34, 56, 0.78);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  pointer-events: none;
}

.pembahasan-media canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.exp-caption-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-tint);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
}

.exp-caption-copy {
  min-width: 0;
  flex: 1;
}

.exp-caption-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.exp-caption-text {
  font-size: clamp(0.84rem, 1.6vw, 0.96rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

/* ==================== SLIDE 3: KENAPA BISA BERHASIL? (1 LAYAR PENUH) ==================== */
.why-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.why-hero-box {
  background: var(--surface-warm);
  border: 2px solid #FCD34D;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.why-bulb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--amber);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.why-compare {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.why-card {
  background: var(--surface-tint);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.why-card.after {
  background: #F0FDF4;
  border-color: #6EE7B7;
}

.why-card-tag {
  display: inline-block;
  width: fit-content;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.why-card.after .why-card-tag {
  background: var(--emerald-soft);
  color: var(--emerald-dark);
}

.why-card h4 {
  font-size: clamp(0.95rem, 2vw, 1.12rem);
}

.why-card p {
  font-size: clamp(0.84rem, 1.6vw, 0.95rem);
  color: var(--ink);
}

.why-foot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 10px 14px;
}

.why-foot-bar p {
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  font-weight: 700;
  color: var(--primary-dark);
}

/* ==================== SLIDE 5: DISKUSI & KERTAS KERJA (1 LAYAR) ==================== */
.diskusi-grid-compact {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 14px;
  align-items: stretch;
}

.diskusi-col {
  background: var(--surface-warm);
  border: 2px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.diskusi-item {
  background: #FFFFFF;
  border-radius: 11px;
  padding: 8px 10px;
  border: 1.5px solid #FDE68A;
}

.diskusi-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--amber-dark);
}

.diskusi-item span {
  font-size: 0.82rem;
  color: var(--ink);
}

.kerja-col {
  background: var(--surface-tint);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.fav-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.fav-pick {
  padding: 8px 6px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.fav-pick.selected {
  border-color: var(--emerald);
  background: var(--emerald-soft);
  color: var(--emerald-dark);
}

.text-input, .text-area {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 2px solid var(--border-strong);
  background: #FFFFFF;
  font-size: 0.9rem;
}

.check-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.check-compact label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  padding: 5px 9px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  cursor: pointer;
}

/* ==================== SLIDE 6: KUIS SERU (1 SOAL PER SLIDE, ZERO SCROLL!) ==================== */
.quiz-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.quiz-top-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quiz-bar {
  flex-shrink: 0;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
}

.quiz-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--emerald));
  transition: width 0.3s ease;
}

.quiz-q-text {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.26rem);
  color: var(--ink);
  line-height: 1.3;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-opt {
  width: 100%;
  text-align: left;
  min-height: 46px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #FFFFFF;
  font-size: clamp(0.84rem, 1.6vw, 0.96rem);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.14s ease;
}

.quiz-opt:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.quiz-opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Immediate Pembahasan In-Place View (Replaces options so ZERO scroll!) */
.pembahasan-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideIn 0.25s ease;
}

.verdict-strip {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  font-weight: 700;
}

.verdict-strip.correct {
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  border: 2px solid var(--emerald);
}

.verdict-strip.wrong {
  background: var(--coral-soft);
  color: var(--coral-dark);
  border: 2px solid var(--coral);
}

.pembahasan-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
  align-items: center;
}

.pembahasan-media {
  height: 100%;
  max-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #DCEEFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pembahasan-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pembahasan-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pembahasan-copy p {
  font-size: clamp(0.86rem, 1.6vw, 0.96rem);
  font-weight: 600;
}

.result-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
}

.result-score-big {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stars-row {
  display: flex;
  gap: 6px;
}

/* ==================== BOTTOM DECK NAV BAR ==================== */
.deck-footer {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 2px solid var(--border);
  padding: 8px 0;
}

.deck-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deck-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.deck-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.deck-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: scale(1.08);
}

.deck-dot.done {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: var(--emerald-dark);
}

.credit-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 4px 10px 6px;
  font-size: 0.74rem;
  color: var(--ink-muted);
  background: rgba(242, 247, 254, 0.96);
  border-top: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== MODAL & TOAST & CONFETTI ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(19, 34, 56, 0.52);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  padding: 14px;
}
.modal-backdrop.open { display: grid; }
.modal-card {
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.modal-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--amber-soft);
  color: var(--amber-dark);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.feedback-strip {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
}
.feedback-strip.warn { background: var(--coral-soft); color: var(--coral-dark); }
.feedback-strip.good { background: var(--emerald-soft); color: var(--emerald-dark); }

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}

.toast {
  position: fixed;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #FFFFFF;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  z-index: 250;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100vw - 24px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* ==================== TEACHER DASHBOARD (guru.html) ==================== */
.hero {
  margin: 16px 0 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 18px;
  align-items: center;
}
.hero-lead { color: var(--ink-muted); margin: 8px 0 12px; }
.hero-meta, .hero-cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.hero-art {
  display: flex; justify-content: center; align-items: center;
  background: #FAF7EE; border-radius: var(--radius-md); border: 2px solid #EAE2CE; padding: 10px;
}
.teacher-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 36px; align-items: start; }
.panel-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.panel-card + .panel-card { margin-top: 14px; }
.lock-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.lock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-radius: 13px; border: 2px solid var(--border); background: var(--bg); flex-wrap: wrap; }
.lock-row.is-open { border-color: var(--emerald); background: #F0FDF4; }
.lock-row-info { flex: 1; min-width: 170px; }
.lock-row-title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.lock-row-sub { font-size: 0.8rem; color: var(--ink-muted); }
.lock-row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.code-chip { font-family: 'Consolas', monospace; font-weight: 800; font-size: 0.82rem; padding: 4px 9px; border-radius: 8px; background: #FFFFFF; border: 1.5px solid var(--border-strong); color: var(--primary-dark); }
.switch-btn { min-width: 116px; }
.score-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.86rem; }
.score-table th, .score-table td { text-align: left; padding: 8px; border-bottom: 1.5px solid var(--border); }
.pin-gate { max-width: 420px; margin: 32px auto; text-align: center; }
.footer { padding: 16px 0 28px; text-align: center; font-size: 0.82rem; color: var(--ink-muted); }

/* ==================== RESPONSIVE HP PORTRAIT (CRISP, NO CLIPPING, SHORT GENTLE SCROLL IF NEEDED!) ==================== */
@media (max-width: 760px) {
  .container { padding: 0 10px; }
  .topbar-inner { padding: 7px 0; gap: 6px; }
  .brand { gap: 8px; flex: 1; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-title { font-size: 0.9rem; }
  .brand-sub { font-size: 0.65rem; }
  .btn-sm { padding: 6px 10px; font-size: 0.78rem; min-height: 34px; }

  /* Keep topbar spacious on phones: icon-only Sound button & hide duplicate Pertemuan button (already in footer!) */
  .sub-school { display: none; }
  #btn-go-map { display: none !important; }
  #sound-lbl { display: none; }
  #btn-sound { min-width: 36px; width: 36px; padding: 0; gap: 0; }

  .deck-main { padding: 7px 0; }

  /* Slide 0 Map: Breathable 2-col colorful tiles with smooth short scroll on small phones */
  #slide-0 {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .map-top-strip {
    padding: 9px 11px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1D63ED 0%, #154BB8 100%);
    border-color: #154BB8;
    color: #FFFFFF;
  }
  .map-greet h1 { font-size: 0.98rem; color: #FFFFFF; }
  .map-greet p { display: block; font-size: 0.72rem; color: rgba(255, 255, 255, 0.88); white-space: normal; }
  .map-mascot-mini { width: 42px; height: 42px; border-color: rgba(255,255,255,0.45); }
  #btn-open-code-modal {
    background: rgba(255, 255, 255, 0.96);
    border-color: transparent;
    color: var(--primary-dark);
    padding: 6px 9px;
    font-size: 0.75rem;
    flex-shrink: 0;
  }
  .map-ann-strip { padding: 7px 10px; margin-bottom: 8px; font-size: 0.78rem; }
  .map-grid-10 {
    flex: none;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 8px;
  }
  .meeting-tile {
    padding: 10px 10px 11px;
    border-radius: 14px;
    min-height: 92px;
    justify-content: flex-start;
    gap: 7px;
  }
  .tile-ico-badge { width: 28px; height: 28px; border-radius: 8px; }
  .tile-sub { display: none; }
  .tile-open-only { display: none; }
  .tile-title { font-size: 0.86rem; line-height: 1.24; }

  /* Slide 1 Intro: Compact side-by-side mascot + heading so CTA button NEVER clips! */
  .slide-header { padding: 8px 12px; }
  .slide-header h2 { font-size: 0.94rem; }
  .slide-body { padding: 11px 12px; gap: 8px; justify-content: flex-start; }

  .intro-layout { grid-template-columns: 1fr; gap: 10px; align-content: start; flex: none; }
  .intro-art { display: none; }
  .intro-mobile-hero {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #FAF7EE;
    border: 1.5px solid #EAE2CE;
    border-radius: 14px;
    padding: 9px 10px;
  }
  .intro-mobile-mascot {
    display: block;
    width: 66px;
    height: 66px;
    border-radius: 12px;
    object-fit: contain;
    background: #FFFFFF;
    border: 1.5px solid #EAE2CE;
    flex-shrink: 0;
  }
  .intro-mobile-titles h3 { font-size: 1.04rem; margin-bottom: 3px; line-height: 1.2; }
  .intro-mobile-titles p { font-size: 0.8rem; line-height: 1.35; }
  .intro-points { margin: 10px 0 12px; gap: 7px; }
  .intro-point { padding: 8px 10px; font-size: 0.83rem; line-height: 1.32; }
  .intro-point-num { width: 25px; height: 25px; font-size: 0.8rem; border-radius: 8px; }
  .intro-cta-btn { width: 100%; min-height: 44px; font-size: 0.92rem; }

  /* Slide 2 Experiment Stage: Crisp numbered step pills + spacious Canvas! */
  .exp-stage-wrap { gap: 7px; }
  .step-pill-btn { font-size: 0.82rem; padding: 5px 4px; min-height: 32px; display: grid; place-items: center; }
  .step-pill-btn .step-txt { display: none; }
  .exp-media-box { min-height: 210px; }
  .canvas-tap-hint { top: 7px; right: 7px; font-size: 0.7rem; padding: 4px 9px; }
  .exp-caption-bar { flex-direction: column; align-items: stretch; gap: 8px; padding: 9px 10px; }
  .exp-caption-label { font-size: 0.78rem; }
  .exp-caption-text { font-size: 0.84rem; }
  .exp-caption-bar .btn { width: 100%; min-height: 42px; }

  /* Slide 3 Kenapa Bisa Berhasil */
  .why-layout { gap: 9px; justify-content: flex-start; flex: none; }
  .why-hero-box { padding: 10px 12px; gap: 10px; }
  .why-bulb { width: 38px; height: 38px; border-radius: 11px; }
  .why-compare { grid-template-columns: 1fr; gap: 8px; flex: none; }
  .why-card { padding: 10px 12px; gap: 4px; }
  .why-foot-bar { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .why-foot-bar .btn { width: 100%; }

  /* Slide 4 Diskusi & Kertas Kerja */
  .diskusi-grid-compact { grid-template-columns: 1fr; gap: 10px; flex: none; }
  .diskusi-col { padding: 10px 11px; gap: 7px; }
  .diskusi-item { padding: 8px 10px; }
  .diskusi-item span { font-size: 0.8rem; }
  .kerja-col { padding: 10px 11px; gap: 8px; }
  .check-compact { display: flex; font-size: 0.76rem; gap: 5px; }
  .check-compact label { padding: 4px 7px; }

  /* Slide 5 Quiz & Pembahasan */
  .quiz-pane { justify-content: flex-start; padding-top: 4px; gap: 9px; flex: none; }
  .quiz-opt { min-height: 44px; padding: 8px 10px; font-size: 0.84rem; }
  .pembahasan-view { flex: none; gap: 8px; }
  .verdict-strip { padding: 8px 11px; font-size: 0.88rem; }
  .pembahasan-body { grid-template-columns: 1fr; gap: 9px; flex: none; }
  .pembahasan-media { height: 175px; max-height: none; }
  .pembahasan-copy { gap: 8px; }
  .pembahasan-copy .btn { width: 100%; }

  /* Bottom Bar & Single-Line Credit Footer */
  .deck-footer { padding: 6px 0; }
  .deck-footer-inner { gap: 6px; }
  .deck-dots { gap: 4px; }
  .deck-dot { width: 25px; height: 25px; font-size: 0.72rem; }
  .credit-footer { font-size: 0.66rem; padding: 3px 8px 5px; }

  /* Avoid expensive GPU blur on mobile modal */
  .modal-backdrop { backdrop-filter: none; background: rgba(19, 34, 56, 0.62); }

  /* Teacher page mobile */
  .hero, .teacher-grid { grid-template-columns: 1fr; }
}
