/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #F7F3EE;
  --cream-dark: #EDE8E0;
  --ink: #1A1612;
  --ink-mid: #4A4540;
  --ink-light: #8C847C;
  --gold: #B8965A;
  --gold-light: #D4AE72;
  --gold-pale: #F2E8D4;
  --green: #2D6A4F;
  --green-light: #52A67A;
  --green-pale: #E8F4EE;
  --border: rgba(26,22,18,0.1);
  --border-strong: rgba(26,22,18,0.18);
  --radius: 12px;
  --radius-lg: 20px;
}

html { font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Screens ── */
.screen {
  display: none;
  min-height: 100vh;
  position: relative;
}
.screen.active { display: flex; flex-direction: column; }

/* ── INTRO SCREEN ── */
#screen-intro {
  align-items: center;
  justify-content: center;
  background: var(--ink);
  overflow: hidden;
}

.intro-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}
.orb1 { width: 500px; height: 500px; background: var(--gold); top: -100px; right: -100px; }
.orb2 { width: 350px; height: 350px; background: var(--green-light); bottom: -50px; left: -80px; }
.orb3 { width: 250px; height: 250px; background: var(--gold-light); top: 50%; left: 50%; transform: translate(-50%,-50%); }

.intro-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 560px;
  padding: 2rem 2rem 5rem;
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lesson-badge {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(184,150,90,0.4);
  padding: 0.35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}

.intro-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--cream);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.intro-title em {
  font-style: italic;
  color: var(--gold-light);
}

.intro-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(247,243,238,0.6);
  margin-bottom: 2rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.intro-meta {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.meta-pill {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(247,243,238,0.5);
  background: rgba(247,243,238,0.07);
  border: 1px solid rgba(247,243,238,0.12);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--gold-light);
  border: none;
  border-radius: 99px;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.btn-start:hover { background: var(--gold); transform: translateY(-1px); }
.btn-start:active { transform: scale(0.98); }

.intro-footer {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247,243,238,0.25);
}

/* ── QUESTION SCREEN ── */
#screen-question {
  background: var(--cream);
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}
.header-logo:hover { color: var(--gold-light); }

.header-lesson {
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 0.01em;
}

.header-count {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--ink-mid);
  font-weight: 300;
}

.question-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.question-card {
  width: 100%;
  max-width: 680px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  animation: cardIn 0.35s ease both;
  box-shadow: 0 2px 24px rgba(26,22,18,0.05);
}

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

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-pill {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-pale);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
}

.q-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--cream-dark);
  line-height: 1;
}

.question-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

/* ── Verse Block ── */
.verse-block {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.verse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.verse-eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  flex: 1;
  min-width: 0;
}

.audio-btns {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gold);
  background: rgba(184, 150, 90, 0.12);
  border: 1px solid rgba(184, 150, 90, 0.35);
  border-radius: 99px;
  padding: 0.28rem 0.65rem 0.28rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1;
}
.audio-btn:hover {
  background: rgba(184, 150, 90, 0.22);
  color: #9a7a42;
}
.audio-btn:active { transform: scale(0.96); }
.audio-btn.playing {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}
.audio-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.abl {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

/* ── Audio spinner ── */
.audio-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(184,150,90,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.audio-btn.playing .audio-spinner {
  border-color: rgba(255,255,255,0.3);
  border-top-color: white;
}

.verse-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink-mid);
  white-space: pre-line;
}

/* ── Answer ── */
.answer-section { margin-bottom: 1.75rem; }

.answer-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-mid);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.answer-input {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.85rem 3rem 0.85rem 1rem;
  min-height: 110px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: text;
  word-break: break-word;
  white-space: pre-wrap;
}
.answer-input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(82,166,122,0.12);
}
.answer-input .q-prefix {
  color: #b91c1c;
  font-style: italic;
  user-select: none;
}
.answer-input .q-answer {
  color: var(--ink);
  font-style: normal;
}

/* ── Card Footer ── */
.card-footer { display: flex; flex-direction: column; gap: 1.25rem; }

.btn-row {
  display: flex;
  gap: 0.6rem;
  width: 100%;
}

.btn-row .btn-kembali {
  flex: 1;
}

.btn-row .btn-next:not(.btn-kembali) {
  flex: 4;
}

.btn-next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  background: var(--green);
  border: none;
  border-radius: 99px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.btn-next:hover { background: #234f3c; transform: translateY(-1px); }
.btn-next:active { transform: scale(0.98); }
.btn-next:disabled { opacity: 0.35; cursor: default; transform: none; }

.btn-finish {
  background: var(--gold);
}
.btn-finish:hover { background: #9a7a42; }

/* ── Progress ── */
.progress-wrap {}

.progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-text {
  font-size: 0.72rem;
  color: var(--ink-light);
  letter-spacing: 0.02em;
}

.progress-pct {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--green);
}

.progress-track {
  height: 5px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-light));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── DONE SCREEN ── */
#screen-done {
  align-items: center;
  justify-content: center;
  background: var(--ink);
  overflow: hidden;
}

.done-bg { position: absolute; inset: 0; pointer-events: none; }
#screen-done .orb1 { width: 400px; height: 400px; background: var(--gold); top: -80px; right: -80px; opacity: 0.15; }
#screen-done .orb2 { width: 300px; height: 300px; background: var(--green-light); bottom: -60px; left: -60px; opacity: 0.15; }

.done-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
  padding: 2rem 1.5rem 5rem;
  animation: fadeUp 0.6s ease both;
}

.done-check {
  width: 56px;
  height: 56px;
  background: var(--green);
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.done-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.done-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(247,243,238,0.6);
  margin-bottom: 2rem;
}
.done-sub em { color: var(--gold-light); font-style: italic; }

.truth-card, .homework-card {
  background: rgba(247,243,238,0.06);
  border: 1px solid rgba(247,243,238,0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: left;
}

.truth-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.truth-text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(247,243,238,0.7);
}
.truth-text strong { color: var(--gold-light); font-weight: 500; }

/* ── Sending Status ── */
.sending-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(247,243,238,0.4);
}

.status-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(247,243,238,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-done { color: var(--green-light); }
.status-error { color: #e07070; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .question-card { padding: 1.5rem; }
  .question-body { font-size: 1.25rem; }
  .site-header { padding: 0.85rem 1rem; }
  .header-lesson { display: none; }
  .question-main { padding: 1.5rem 1rem 3rem; }
}

/* ── Error toast ── */
.error-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #c0392b;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  padding: 0.65rem 1.25rem;
  border-radius: 99px;
  z-index: 200;
  animation: fadeUp 0.2s ease both;
  white-space: nowrap;
}

/* ── Mic-enabled textarea ── */
.answer-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.mic-hint {
  font-size: 0.7rem;
  color: var(--green-light);
  letter-spacing: 0.02em;
  min-height: 1em;
  transition: opacity 0.2s;
}

.textarea-wrap {
  position: relative;
}

/* mic spacing handled by main .answer-input padding-right: 3rem */

.mic-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cream-dark);
  color: var(--ink-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  flex-shrink: 0;
  z-index: 2;
}
.mic-btn:hover {
  background: var(--green-pale);
  color: var(--green);
}
.mic-btn:active { transform: scale(0.93); }

.mic-btn.recording {
  background: var(--green);
  color: #fff;
  animation: mic-pulse 1.2s ease-in-out infinite;
}

.mic-icon {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45,106,79,0.45); }
  60%  { box-shadow: 0 0 0 8px rgba(45,106,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,106,79,0); }
}



/* ── Done screen submit form ── */
.submit-form {
  width: 100%;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.submit-field {
  text-align: left;
}

.submit-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.submit-input {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(247,243,238,0.08);
  border: 1px solid rgba(247,243,238,0.2);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  color: #F7F3EE;
}

.submit-input::placeholder {
  color: rgba(247,243,238,0.35);
}

.submit-input:focus {
  border-color: var(--gold-light);
  background: rgba(247,243,238,0.12);
}

.submit-error {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: #f87171;
  margin: 0;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--gold-light);
  border: none;
  border-radius: 99px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: background 0.2s, transform 0.15s;
}

.submit-btn:hover { background: var(--gold); }
.submit-btn:active { transform: scale(0.98); }

/* ── Slide 21 identity fields (Nama + No HP/WA) ── */
.card-identity {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--cream);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.identity-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.identity-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.identity-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.identity-input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(82,166,122,0.12);
}

.identity-input::placeholder {
  color: var(--ink-light);
  opacity: 0.6;
}

.identity-error {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #b91c1c;
  margin: 0.25rem 0 0;
}

/* ── YouTube embed ── */
.youtube-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin-bottom: 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.youtube-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Empty answer error ── */
.answer-error {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: #b91c1c;
  margin: -0.5rem 0 0.75rem 0;
}

/* ── Intro screen layout with grid ── */
#screen-intro {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding-bottom: 4rem;
}

.intro-content {
  padding-top: 5rem;
  padding-bottom: 2.5rem;
}

/* ── Slide Grid Section ── */
.slide-grid-section {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  padding: 0 1.5rem;
  margin: 0 auto;
}

.slide-grid-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.slide-grid-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.slide-grid-sub {
  font-size: 0.78rem;
  color: rgba(247,243,238,0.35);
  letter-spacing: 0.01em;
}

.slide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

/* ── Individual Slide Thumbnail ── */
.slide-thumb {
  background: rgba(247,243,238,0.04);
  border: 1px solid rgba(247,243,238,0.1);
  border-radius: 12px;
  padding: 1rem 1.1rem 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
}

.slide-thumb:hover {
  background: rgba(247,243,238,0.09);
  border-color: rgba(184,150,90,0.4);
  transform: translateY(-2px);
}

.slide-thumb:active {
  transform: scale(0.97);
}

.slide-thumb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.slide-thumb-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(247,243,238,0.2);
  line-height: 1;
  flex-shrink: 0;
}

.slide-thumb-section {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-light);
  background: rgba(82,166,122,0.12);
  border: 1px solid rgba(82,166,122,0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.slide-thumb-q {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(247,243,238,0.65);
  letter-spacing: -0.01em;
  /* clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slide-thumb-badge {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.slide-badge {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 99px;
}

.badge-verse {
  color: var(--gold);
  background: rgba(184,150,90,0.12);
  border: 1px solid rgba(184,150,90,0.25);
}

.badge-video {
  color: #a78bfa;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
}

/* ── Responsive grid ── */
@media (max-width: 640px) {
  .slide-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .slide-thumb {
    padding: 0.85rem 0.9rem 0.75rem;
  }
  .slide-thumb-q {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }
  .slide-thumb-section {
    max-width: 90px;
    font-size: 0.55rem;
  }
  .slide-grid-section {
    padding: 0 1rem;
  }
}

/* ── Share Button ── */
.card-top-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-light);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  flex-shrink: 0;
  padding: 0;
}

.share-btn:hover {
  background: var(--green-pale);
  color: var(--green);
  border-color: var(--green-light);
}

.share-btn:active {
  transform: scale(0.91);
}

/* ── Share Toast ── */
.share-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  padding: 0.65rem 1.25rem;
  border-radius: 99px;
  border: 1px solid rgba(247,243,238,0.12);
  z-index: 200;
  white-space: nowrap;
  animation: fadeUp 0.2s ease both;
}

/* ── LOGIN SCREEN ── */
#screen-login {
  align-items: center;
  justify-content: center;
  background: var(--ink);
  overflow: hidden;
}

.login-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 2rem 2rem 5rem;
  animation: fadeUp 0.8s ease both;
}

.login-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: 99px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.login-btn:hover  { opacity: 0.88; }
.login-btn:active { transform: scale(0.97); }

.login-btn-google {
  background: #fff;
  color: #3c4043;
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
}

.login-btn-facebook {
  background: #1877F2;
  color: #fff;
}

.login-btn-guest {
  background: transparent;
  color: rgba(247,243,238,0.55);
  border: 1px solid rgba(247,243,238,0.18);
  font-size: 0.82rem;
  gap: 0.5rem;
}
.login-btn-guest:hover { color: rgba(247,243,238,0.8); border-color: rgba(247,243,238,0.35); }

.login-note {
  font-size: 0.72rem;
  line-height: 1.65;
  color: rgba(247,243,238,0.28);
  max-width: 320px;
  margin: 0 auto;
}

/* ── Resume Banner ── */
.resume-banner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.resume-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(45,106,79,0.18);
  border: 1px solid rgba(82,166,122,0.35);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
}

.resume-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.resume-icon {
  font-size: 1.1rem;
  color: var(--green-light);
  flex-shrink: 0;
}

.resume-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--green-light);
  line-height: 1.3;
}

.resume-sub {
  font-size: 0.72rem;
  color: rgba(247,243,238,0.45);
  margin-top: 0.1rem;
}

.resume-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.resume-btn-continue {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--green-light);
  border: none;
  border-radius: 99px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.resume-btn-continue:hover  { background: var(--green); color: #fff; }
.resume-btn-continue:active { transform: scale(0.96); }

.resume-btn-clear {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: rgba(247,243,238,0.35);
  background: transparent;
  border: 1px solid rgba(247,243,238,0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.resume-btn-clear:hover { color: #f87171; border-color: rgba(248,113,113,0.4); }

/* ── Header user pill ── */
.header-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.75rem;
}

.header-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.header-username {
  font-size: 0.75rem;
  color: var(--ink-mid);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .header-username { display: none; }
  .resume-banner   { padding: 0 1rem; }
}

/* ── Slide thumbnail status bubble ── */
.slide-thumb-num-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.slide-status-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  pointer-events: none;
}

.slide-status-bubble.bubble-empty {
  border: 1.5px solid rgba(247,243,238,0.18);
  background: transparent;
}

.slide-status-bubble.bubble-done {
  border: 1.5px solid var(--green-light);
  background: var(--green);
}

/* ── WhatsApp login button ── */
.login-btn-whatsapp {
  background: #25D366;
  color: #fff;
}

/* ── WhatsApp OTP overlay ── */
.wa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
  animation: fadeUp 0.2s ease both;
}

.wa-modal {
  background: var(--ink);
  border: 1px solid rgba(247,243,238,0.12);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.75rem;
  width: 100%;
  max-width: 360px;
  position: relative;
  text-align: center;
}

.wa-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: transparent;
  border: none;
  color: rgba(247,243,238,0.35);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s;
}
.wa-close:hover { color: rgba(247,243,238,0.7); }

.wa-logo {
  margin-bottom: 0.75rem;
}

.wa-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.wa-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(247,243,238,0.45);
  margin-bottom: 1.25rem;
}

.wa-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(247,243,238,0.06);
  border: 1px solid rgba(247,243,238,0.18);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.wa-prefix {
  padding: 0.7rem 0.75rem;
  font-size: 0.9rem;
  color: rgba(247,243,238,0.5);
  border-right: 1px solid rgba(247,243,238,0.12);
  white-space: nowrap;
  flex-shrink: 0;
}

.wa-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--cream);
  padding: 0.7rem 0.85rem;
}
.wa-input::placeholder { color: rgba(247,243,238,0.25); }

.wa-otp-input {
  width: 100%;
  background: rgba(247,243,238,0.06);
  border: 1px solid rgba(247,243,238,0.18);
  border-radius: var(--radius);
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 1.4rem;
  padding: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.wa-btn {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background: #25D366;
  border: none;
  border-radius: 99px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: background 0.15s, transform 0.1s;
}
.wa-btn:hover  { background: #1ebe57; }
.wa-btn:active { transform: scale(0.97); }

.wa-btn-text {
  background: transparent;
  border: none;
  color: rgba(247,243,238,0.4);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.3rem;
  transition: color 0.15s;
}
.wa-btn-text:hover { color: rgba(247,243,238,0.7); }

.wa-sent-note {
  font-size: 0.78rem;
  color: #25D366;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.wa-error {
  font-size: 0.78rem;
  color: #f87171;
  margin: -0.4rem 0 0.6rem;
  text-align: left;
}

/* ── Slide 21 pre-fill note ── */
.identity-prefilled {
  font-size: 0.72rem;
  color: var(--green-light);
  margin: -0.25rem 0 0.5rem;
  letter-spacing: 0.01em;
}

/* ── Offline banner ── */
.offline-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #92400e;
  color: #fef3c7;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 300;
  letter-spacing: 0.01em;
}

/* ── Keyboard hint on question screen ── */
.keyboard-hint {
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--ink-light);
  margin-top: 0.6rem;
  justify-content: center;
}
@media (hover: hover) and (pointer: fine) {
  /* Only show on devices that likely have a keyboard */
  .keyboard-hint { display: flex; }
}
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* ── Header lesson title as link ── */
.header-lesson-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s;
  border-radius: 4px;
  padding: 0.1rem 0.2rem;
}
.header-lesson-link:hover {
  color: var(--gold);
}

/* ── Home icon button in header ── */
.header-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--ink-light);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.header-home-btn:hover {
  background: var(--green-pale);
  color: var(--green);
  border-color: var(--green-light);
}
.header-home-btn:active {
  transform: scale(0.92);
}

/* ── Home icon on intro/grid screen ── */
.intro-home-btn {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(247,243,238,0.18);
  color: rgba(247,243,238,0.45);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.intro-home-btn:hover {
  background: rgba(247,243,238,0.08);
  color: var(--gold);
  border-color: rgba(184,150,90,0.4);
}
.intro-home-btn:active { transform: scale(0.91); }

/* ── Privacy Policy links ── */
.privacy-link {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(184,150,90,0.4);
  text-underline-offset: 2px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.privacy-link:hover {
  color: #e8c87a;
  text-decoration-color: rgba(184,150,90,0.8);
}

/* Dimmed version used in footers */
.privacy-link-dim {
  color: rgba(247,243,238,0.3);
  text-decoration-color: rgba(247,243,238,0.15);
}
.privacy-link-dim:hover {
  color: rgba(247,243,238,0.6);
  text-decoration-color: rgba(247,243,238,0.4);
}

/* Privacy note below identity fields on last slide */
.identity-privacy {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  margin: 0.25rem 0 0.5rem;
}

/* ════════════════════════════════════════════════════
   HIGH PRIORITY + UX IMPROVEMENTS
   ════════════════════════════════════════════════════ */

/* ── CSS variable for font size control ── */
:root { --base-font: 1rem; }
.question-body,
.q-answer,
.answer-label,
.verse-text,
.truth-text { font-size: var(--base-font); }

/* ── Font size controls in header ── */
.font-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.5rem;
}

.font-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.03em;
}
.font-btn:hover:not(:disabled)  { background: var(--cream-dark); color: var(--ink); }
.font-btn:disabled               { opacity: 0.3; cursor: default; }

/* ── Auto-save indicator ── */
.save-indicator {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  color: var(--green-light);
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-right: 0.6rem;
  white-space: nowrap;
  pointer-events: none;
}
.save-indicator.visible { opacity: 1; }

/* ── Skip button inside answer error ── */
.skip-btn {
  background: transparent;
  border: none;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  margin-left: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.skip-btn:hover { color: #e8c87a; }

/* ── Retry button on submission failure ── */
.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--gold);
  border: none;
  border-radius: 99px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.retry-btn:hover  { background: #e8c87a; }
.retry-btn:active { transform: scale(0.97); }

/* ── Student confirmation note ── */
.confirmation-note {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--green-light);
  background: rgba(45,106,79,0.12);
  border: 1px solid rgba(82,166,122,0.25);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  text-align: left;
}

/* ── Done screen certificate ── */
.done-certificate {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: rgba(184,150,90,0.08);
  border: 1px solid rgba(184,150,90,0.25);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.cert-badge svg { flex-shrink: 0; }

.cert-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

.cert-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.2;
}

.cert-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--gold);
  margin-top: 0.15rem;
}

/* ── Done screen action buttons ── */
.done-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.done-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 99px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  border: none;
}
.done-btn:active { transform: scale(0.97); }

.done-btn-review {
  background: rgba(247,243,238,0.08);
  border: 1px solid rgba(247,243,238,0.2);
  color: var(--cream);
}
.done-btn-review:hover { background: rgba(247,243,238,0.14); border-color: rgba(247,243,238,0.35); }

.done-btn-lessons {
  background: var(--green);
  color: #fff;
}
.done-btn-lessons:hover { background: var(--green-light); color: var(--ink); }

/* ── Overall progress on lessons.html ── */
.overall-progress {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 1.75rem;
  padding: 0 0.25rem;
}

.overall-progress-inner {
  background: rgba(247,243,238,0.04);
  border: 1px solid rgba(247,243,238,0.1);
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.overall-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-shrink: 0;
  min-width: 160px;
}

.overall-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.overall-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: rgba(247,243,238,0.5);
}

.overall-bar {
  flex: 1;
  height: 5px;
  background: rgba(247,243,238,0.1);
  border-radius: 99px;
  overflow: hidden;
}

.overall-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-light), var(--gold));
  border-radius: 99px;
  transition: width 0.6s ease;
}

@media (max-width: 640px) {
  .overall-progress-inner { flex-direction: column; gap: 0.6rem; }
  .overall-left { min-width: unset; flex-direction: row; align-items: center; gap: 0.75rem; }
  .font-controls { display: none; }
  .save-indicator { display: none; }
}

/* ── Completed lesson card ── */
.lesson-card.card-completed {
  border-color: rgba(82,166,122,0.35);
  background: rgba(45,106,79,0.08);
}

.lesson-card.card-completed:hover {
  border-color: rgba(82,166,122,0.55);
  background: rgba(45,106,79,0.14);
}

.lesson-card.card-completed .lesson-card-arrow {
  color: var(--green-light);
}

/* Completed badge inside progress label */
.complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--green-light);
  font-weight: 500;
  font-size: 0.75rem;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

/* Green progress fill for completed lessons */
#progress-p1[style*="100%"],
#progress-p2[style*="100%"],
#progress-p3[style*="100%"] {
  background: var(--green-light);
}

/* ── Completed + disabled lesson card ── */
.lesson-card.card-disabled {
  cursor: default !important;
  transform: none !important;
}
.lesson-card.card-disabled:hover {
  transform: none !important;
  background: rgba(45,106,79,0.08) !important;
  border-color: rgba(82,166,122,0.35) !important;
}

/* ── Restart lesson button inside completed card ── */
.restart-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  pointer-events: auto;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--green-light);
  border: none;
  border-radius: 99px;
  padding: 0.45rem 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  cursor: pointer;
  flex-shrink: 0;
}
.restart-btn:hover  { background: var(--green); color: #fff; }
.restart-btn:active { transform: scale(0.96); }

/* ════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS  (max-width: 480px)
   Targets phones specifically — not just small tablets
   ════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  /* ── Header: tighter, no overflow ── */
  .site-header {
    padding: 0.7rem 0.85rem;
    gap: 0.4rem;
  }
  .header-center { display: none; }   /* lesson title already hidden at 640px */
  .header-count  { font-size: 0.85rem; }
  .font-controls { display: none; }   /* too cramped — font size via settings */
  .save-indicator { display: none; }

  /* ── Question card: edge-to-edge on phone ── */
  .question-main {
    padding: 0.75rem 0 4rem;
    align-items: flex-start;
  }
  .question-card {
    border-radius: 0;                  /* full-width, flush edges */
    border-left: none;
    border-right: none;
    padding: 1.25rem 1rem 1.5rem;
    box-shadow: none;
    animation: none;                   /* reduces jank on low-end phones */
  }
  .card-top { margin-bottom: 1rem; }
  .section-pill {
    font-size: 0.62rem;
    padding: 0.25rem 0.65rem;
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ── Question text: more readable on small screens ── */
  .question-body {
    font-size: 1.15rem;
    line-height: 1.5;
    margin-bottom: 1.1rem;
  }

  /* ── Verse block ── */
  .verse-block { padding: 1rem; }
  .verse-ref   { font-size: 0.68rem; }
  .verse-text  { font-size: 0.88rem; line-height: 1.65; }

  /* ── Answer input: taller for thumbs ── */
  .answer-input {
    min-height: 130px;
    font-size: 1rem;
    padding: 0.85rem 3rem 0.85rem 0.85rem;
    border-radius: 10px;
  }
  .answer-label { font-size: 0.8rem; }

  /* ── Mic + share buttons: larger touch targets ── */
  .mic-btn {
    width: 40px;
    height: 40px;
    bottom: 0.6rem;
    right: 0.5rem;
  }
  .share-btn {
    width: 40px;
    height: 40px;
  }

  /* ── Navigation buttons: full-width, taller ── */
  .btn-row {
    gap: 0.5rem;
  }
  .btn-next {
    padding: 1rem 1rem;
    font-size: 0.88rem;
    min-height: 48px;              /* Apple/Google minimum touch target */
  }
  .btn-row .btn-next:not(.btn-kembali) { flex: 3; }

  /* ── Progress bar section ── */
  .progress-labels { font-size: 0.72rem; }
  .keyboard-hint   { display: none; }   /* no keyboard on phone */

  /* ── Identity fields (last slide) ── */
  .card-identity   { gap: 0.85rem; }
  .identity-input  {
    font-size: 1rem;
    padding: 0.75rem 0.85rem;
    min-height: 48px;
  }
  .identity-privacy { font-size: 0.7rem; }

  /* ── YouTube embed ── */
  .youtube-wrap {
    margin: 0 -1rem 1.25rem;       /* bleed to edges on phone */
    border-radius: 0;
  }

  /* ── Audio play button ── */
  .audio-btn {
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    min-height: 44px;
  }

  /* ── Done screen ── */
  .done-content    { padding: 1.5rem 1rem 4rem; }
  .done-title      { font-size: 2rem; }
  .done-certificate {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
  }
  .done-actions    { flex-direction: column; gap: 0.6rem; }
  .done-btn        { width: 100%; justify-content: center; padding: 1rem; }
  .truth-card,
  .homework-card   { padding: 1.1rem; }

  /* ── Login screen ── */
  .login-content   { padding: 3rem 1.25rem 5rem; }
  .login-btn       { padding: 0.9rem 1.25rem; min-height: 52px; font-size: 0.88rem; }
  .login-note      { font-size: 0.7rem; }

  /* ── Intro / grid screen ── */
  .intro-content   { padding-top: 3rem; padding-bottom: 2rem; }
  .intro-title     { font-size: clamp(2rem, 9vw, 3rem); }
  .intro-desc      { font-size: 0.85rem; }
  .btn-start       { padding: 0.85rem 1.75rem; font-size: 0.9rem; min-height: 50px; }

  /* ── Slide grid thumbnails ── */
  .slide-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .slide-thumb     { padding: 0.75rem 0.8rem 0.65rem; }
  .slide-thumb-num { font-size: 1.2rem; }
  .slide-thumb-q   { font-size: 0.8rem; -webkit-line-clamp: 2; }
  .slide-thumb-section {
    font-size: 0.52rem;
    max-width: 75px;
  }

  /* ── Resume banner ── */
  .resume-inner    {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .resume-actions  { width: 100%; justify-content: flex-end; }

  /* ── Lessons selector (lessons.html) ── */
  .lessons-hero    { padding-top: 3rem; margin-bottom: 2rem; }
  .lessons-title   { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .lessons-grid    { grid-template-columns: 1fr; gap: 0.85rem; }
  .lesson-card     { padding: 1.25rem 1.1rem 1rem; }
  .lesson-card-title { font-size: 1.35rem; }
  .overall-progress-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
  .overall-left    { flex-direction: row; align-items: center; gap: 0.75rem; }

  /* ── WhatsApp modal ── */
  .wa-modal        { padding: 1.5rem 1.25rem 1.25rem; }
  .wa-otp-input    { font-size: 1.2rem; letter-spacing: 0.3em; }

  /* ── Error / toast messages ── */
  .error-toast,
  .share-toast,
  .offline-banner  {
    font-size: 0.76rem;
    padding: 0.6rem 1rem;
    max-width: 92vw;
    text-align: center;
    white-space: normal;
  }
}

/* ── Safe area insets for iPhone notch / home bar ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .card-footer     { padding-bottom: env(safe-area-inset-bottom); }
  .offline-banner  { padding-bottom: calc(0.6rem + env(safe-area-inset-bottom)); }
  .question-main   { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
}

/* ── Prevent text size adjustment on orientation change (iOS) ── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ── Smooth scrolling for in-page navigation ── */
html { scroll-behavior: smooth; }

/* ── Prevent double-tap zoom on buttons (iOS) ── */
button, a {
  touch-action: manipulation;
}

/* ── Badges button on done screen ── */
.done-btn-badges {
  background: rgba(184,150,90,0.12);
  border: 1px solid rgba(184,150,90,0.3);
  color: var(--gold);
}
.done-btn-badges:hover { background: rgba(184,150,90,0.2); color: var(--gold-light); }

/* ── Badge thumbnail inside lesson cards ── */
.lesson-card-footer {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
}

/* Reorder: badge thumb | progress | arrow/restart */
.lesson-badge-thumb {
  flex-shrink: 0;
  order: -1;         /* always first */
}

.badge-thumb-svg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  transition: filter 0.3s, transform 0.2s;
  display: block;
}

.badge-thumb-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Greyscale + dim when lesson not complete */
.badge-thumb-svg.locked-badge {
  filter: grayscale(1) brightness(0.5);
}

/* Full colour when earned */
.badge-thumb-svg.earned-badge {
  filter: none;
  box-shadow: 0 0 0 2px rgba(184,150,90,0.5), 0 2px 12px rgba(184,150,90,0.25);
}

/* Link wrapper on earned badge */
.badge-thumb-link {
  display: block;
  border-radius: 50%;
  transition: transform 0.15s;
}
.badge-thumb-link:hover .badge-thumb-svg {
  transform: scale(1.12);
  box-shadow: 0 0 0 2.5px rgba(184,150,90,0.8), 0 4px 18px rgba(184,150,90,0.35);
}

/* Progress section fills remaining space */
.lesson-card-progress {
  flex: 1;
  min-width: 0;
}

/* Arrow stays at end */
.lesson-card-arrow { flex-shrink: 0; }
.restart-btn       { flex-shrink: 0; }

@media (max-width: 480px) {
  .badge-thumb-svg { width: 44px; height: 44px; }
}

/* ── Done screen — badge award display ── */
.done-badge-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 0.5rem auto 1.5rem;
  animation: badgeReveal 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
  animation-delay: 0.25s;
}

@keyframes badgeReveal {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Pulsing glow behind the badge */
.done-badge-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,150,90,0.22), transparent 70%);
  animation: badgeGlow 2.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes badgeGlow {
  from { opacity: 0.5; transform: translate(-50%,-50%) scale(0.9); }
  to   { opacity: 1;   transform: translate(-50%,-50%) scale(1.1); }
}

.done-badge-svg {
  width: 200px;
  height: 200px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 32px rgba(184,150,90,0.4));
}
.done-badge-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.done-badge-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  z-index: 1;
}

.done-badge-earned {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.done-badge-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: -0.01em;
}

.done-badge-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: rgba(247,243,238,0.4);
  text-decoration: none;
  transition: color 0.15s;
  z-index: 1;
}
.done-badge-link:hover { color: var(--gold); }

@media (max-width: 480px) {
  .done-badge-svg  { width: 160px; height: 160px; }
  .done-badge-glow { width: 180px; height: 180px; }
}
