/* ============================================================
   JLPT Simulation — Design Tokens (v4)
   Palette: violet gradient header, amber CTA accent, red for
   fail/warning states, lavender-white background, white cards.
   Type: system sans-serif UI, Georgia serif reserved for the
   wordmark only (display face used with restraint).
   ============================================================ */

:root {
  --primary: #16283F;
  --primary-dark: #0B1826;
  --primary-light: #E9EDF2;
  --accent: #B3302E;
  --accent-dark: #7A211F;
  --danger: #DC2626;
  --danger-light: #FDECEB;
  --success: #1E8E4F;
  --success-light: #E9F7EF;
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --line: #E7E7E7;
  --ink: #1C1C1C;
  --muted: #757575;

  --n5-color: #5B7A9D;
  --n5-bg: #EDF1F5;
  --n4-color: #2C4A75;
  --n4-bg: #E7EBF1;
  --n3-color: #16283F;
  --n3-bg: #E4E7EB;
  --n2-color: #C4605D;
  --n2-bg: #FBEEED;
  --n1-color: #B3302E;
  --n1-bg: #FBE9E8;
  --locked-color: #C4C4C4;
  --locked-bg: #F4F4F4;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: Georgia, "Yu Mincho", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  padding: 16px 16px 40px;
}

.screen { display: none; position: relative; z-index: 1; animation: fadeIn .25s ease; }
.screen.active { display: block; }

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

/* ---------- Shared Wrap ---------- */
.wrap {
  max-width: 480px;
  margin: 0 auto;
}

/* ---------- Header (Home) ---------- */
.app-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  padding: 20px;
  color: #fff;
}
.app-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  padding: 3px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  font-family: var(--font-display);
}
.brand-sub {
  font-size: 12px;
  margin: 2px 0 0;
  opacity: 0.85;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.section-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.6px;
  margin: 18px 0 10px;
  text-transform: uppercase;
}

/* ---------- Home: Level Cards ---------- */
.level-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
  transition: border-color .15s, box-shadow .15s;
}
.level-card:hover { border-color: var(--primary); }
.level-card.locked {
  cursor: default;
  opacity: 0.75;
}
.level-card.locked:hover { border-color: var(--line); }

.level-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  flex-shrink: 0;
  border: 2.5px solid;
}
.level-badge.n5 { color: var(--n5-color); border-color: var(--n5-color); background: var(--n5-bg); }
.level-badge.n4 { color: var(--n4-color); border-color: var(--n4-color); background: var(--n4-bg); }
.level-badge.n3 { color: var(--n3-color); border-color: var(--n3-color); background: var(--n3-bg); }
.level-badge.n2 { color: var(--n2-color); border-color: var(--n2-color); background: var(--n2-bg); }
.level-badge.n1 { color: var(--n1-color); border-color: var(--n1-color); background: var(--n1-bg); }
.level-badge.locked { color: var(--locked-color); border-color: var(--locked-color); background: var(--locked-bg); }

.level-info { flex: 1; min-width: 0; }
.level-name { font-size: 15px; font-weight: 700; margin: 0; color: var(--ink); }
.level-sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }

.level-right { text-align: right; flex-shrink: 0; }
.chevron { font-size: 22px; color: var(--muted); line-height: 1; }
.soon-pill {
  font-size: 10px;
  font-weight: 700;
  color: var(--locked-color);
  background: var(--locked-bg);
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid #E3E1EF;
  white-space: nowrap;
}

/* ---------- Room / Profile: shared header ---------- */
.room-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.room-title {
  font-size: 19px;
  font-weight: 700;
  margin: 2px 0 0;
  color: var(--ink);
}

/* ---------- Room: struktur & jumlah soal ---------- */
.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
}
.info-card .info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.info-card .info-row + .info-row { border-top: 1px solid var(--line); }
.info-card .info-row.emphasis {
  color: var(--accent-dark);
  font-weight: 700;
}

.count-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.count-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
}
.count-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.count-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
}
.count-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.count-desc { font-size: 11.5px; color: var(--muted); text-align: right; }
.count-btn.active .count-name { color: var(--primary-dark); }

.scoring-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 2px 0;
}

.profile-summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-summary-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.profile-summary-empty { font-size: 13px; color: var(--muted); }
.profile-summary-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ---------- Form (Profile screen) ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: .3px;
  display: block;
  margin-bottom: 6px;
}
.input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--ink);
}
.input:focus { border-color: var(--primary); }
.input:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.profile-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 0;
}

.start-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: opacity .15s;
}
.start-btn:disabled { opacity: .5; cursor: not-allowed; }

.logout-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px 0;
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger-light);
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Exam ---------- */
.exam-wrap { max-width: 560px; margin: 0 auto; }

.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.exam-level-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.exam-section-label {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.timer-box { text-align: right; }
.timer-label { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.timer-value {
  font-size: 25px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}
.timer-value.warn { color: var(--danger); }

.progress-track { display: flex; gap: 4px; margin-bottom: 6px; }
.progress-seg { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress-seg.done { background: var(--accent); }
.progress-seg.current { background: var(--primary); }

.section-counter {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.q-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.q-text { font-size: 17px; line-height: 1.7; margin-bottom: 12px; }

/* Choukai: tombol putar audio (TTS) */
.play-audio-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 6px;
}
.play-audio-btn:active { opacity: .85; }
.audio-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Dokkai: kotak bacaan & tabel */
.passage-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.table-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.table-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.passage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.passage-table th, .passage-table td {
  border: 1px solid var(--line);
  padding: 6px 10px;
  text-align: center;
}
.passage-table th {
  background: var(--primary);
  color: #fff;
}

.options-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
  width: 100%;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.option-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

.option-letter {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-btn {
  flex: 1;
  min-width: 100px;
  padding: 12px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
}
.nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.prev-btn { background: #fff; border: 1.5px solid var(--line); color: var(--ink); flex: 0 0 auto; min-width: 110px; }
.finish-btn { background: var(--bg); border: 1.5px solid var(--accent); color: var(--accent-dark); flex: 1 1 130px; }
.next-btn.nav-btn { background: var(--primary); color: #fff; flex: 1 1 140px; }

.options-grid.locked .option-btn {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}
.locked-hint {
  font-size: 12.5px;
  color: var(--danger);
  font-weight: 700;
  margin-bottom: 12px;
}
.audio-fail-hint {
  font-size: 12px;
  color: var(--accent-dark);
  background: #FFF6DD;
  border: 1px solid #E8D9AE;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ---------- Soal Tebak-Kanji (表記/orthography) ---------- */
.underline-word {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 700;
  color: var(--primary);
}
.kanji-instruction {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
}

/* ---------- Result ---------- */
.result-wrap { max-width: 560px; margin: 0 auto; }

.result-header { text-align: center; margin-bottom: 10px; }
.result-title { font-size: 25px; color: var(--ink); margin: 0 0 4px; font-weight: 700; }
.result-sub { font-size: 12.5px; color: var(--muted); }

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.score-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.score-card.total { background: var(--primary); color: #fff; border: none; }
.score-card-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.score-card.total .score-card-label { color: rgba(255,255,255,0.75); }
.score-card-value { font-size: 24px; font-weight: 700; color: var(--ink); }
.score-card.total .score-card-value { color: #fff; }
.score-card-max { font-size: 13px; font-weight: 400; color: var(--muted); }
.score-card.total .score-card-max { color: rgba(255,255,255,0.75); }
.score-card-min { font-size: 11px; margin-top: 4px; font-weight: 700; }

.disclaimer {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 18px;
  padding: 0 10px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.download-btn, .restart-btn {
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}
.download-btn {
  background: var(--accent);
  color: #fff;
  border: none;
}
.restart-btn {
  background: #fff;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

/* ---------- Sertifikat Inline (langsung terlihat, tanpa download) ---------- */
.certificate-inline {
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(22,40,63,.14);
}
.cert-sheet {
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--accent);
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
}
.cert-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 22px;
  text-align: center;
  border-bottom: 4px solid var(--accent);
  position: relative;
}
.cert-band-logo {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}
.cert-band h1 { margin: 0; font-size: 21px; letter-spacing: .8px; }
.cert-band p { margin: 5px 0 0; font-size: 12px; }
.cert-disc { font-size: 9.5px; font-style: italic; color: rgba(255,255,255,0.7); margin-top: 9px; }
.cert-body { padding: 22px 24px; position: relative; }
.cert-watermark-body {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
}
.cert-body h2 { color: var(--primary); text-align: center; font-size: 17px; margin-top: 0; letter-spacing: .5px; position: relative; z-index: 1; }
table.cert-info { width: 100%; margin: 16px 0; font-size: 13px; position: relative; z-index: 1; }
table.cert-info td { padding: 4px 0; }
table.cert-info td.k { color: var(--muted); width: 150px; }
table.cert-info td.v { font-weight: bold; color: var(--ink); }
table.cert-scores { width: 100%; border-collapse: collapse; margin-top: 16px; position: relative; z-index: 1; }
table.cert-scores th { background: var(--primary); color: #fff; padding: 8px; font-size: 11px; letter-spacing: .4px; }
table.cert-scores td { border: 1px solid var(--line); text-align: center; padding: 10px 6px; }
.pc-label { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.pc-value { font-size: 17px; font-weight: bold; }

.cert-seal {
  width: 76px;
  height: 76px;
  float: right;
  margin-top: -12px;
  position: relative;
  z-index: 1;
}
.cert-seal-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-8deg);
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 4px var(--accent);
}
.cert-seal.fail .cert-seal-ring {
  border-color: #9E9E9E;
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 4px #9E9E9E;
}
.cert-seal-text { font-size: 11px; font-weight: bold; color: var(--accent); line-height: 1.2; }
.cert-seal.fail .cert-seal-text { color: #6B6B6B; }
.cert-seal-sub { font-size: 5.5px; letter-spacing: .8px; color: var(--accent); margin-top: 2px; }
.cert-seal.fail .cert-seal-sub { color: #6B6B6B; }

.cert-signature { margin-top: 36px; position: relative; z-index: 1; }
.cert-sign-line { width: 150px; border-top: 1.5px solid var(--ink); margin-bottom: 5px; }
.cert-sign-name { font-size: 12px; font-weight: bold; color: var(--primary); }
.cert-sign-role { font-size: 10px; color: var(--muted); }

.cert-footer {
  font-size: 9px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  margin-top: 22px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

@media (max-width: 420px) {
  .cert-band h1 { font-size: 17px; }
  .cert-body { padding: 16px; }
  table.cert-info td.k { width: 110px; font-size: 11px; }
  .cert-watermark-body { width: 200px; height: 200px; }
}
@media (max-width: 420px) {
  .brand-title { font-size: 17px; }
  .q-card, .form-card { padding: 16px; }
  .score-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

/* ---------- Custom Confirm Modal (bukan native browser confirm) ---------- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 39, 64, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn .15s ease;
}
/* Specificity lebih tinggi dari .confirm-overlay supaya atribut [hidden]
   benar-benar menyembunyikan modal, tidak ke-override oleh display:flex
   di atas (author CSS normal lebih kuat dari default UA stylesheet). */
.confirm-overlay[hidden] {
  display: none;
}
.confirm-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(43,39,64,.3);
  border-top: 4px solid var(--accent);
}
.confirm-message {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 20px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  border: none;
}
.confirm-cancel {
  background: var(--bg);
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.confirm-ok {
  background: var(--primary);
  color: #fff;
}

/* ---------- Soal Percakapan (dialogue completion) ---------- */
.dialogue-box {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dialogue-turn { max-width: 88%; }
.dialogue-turn.speaker-1 { align-self: flex-end; }
.dialogue-speaker {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
  padding: 0 4px;
}
.dialogue-turn.speaker-1 .dialogue-speaker { text-align: right; }
.dialogue-bubble {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px;
  font-size: 14.5px;
  line-height: 1.6;
}
.dialogue-turn.speaker-1 .dialogue-bubble {
  background: var(--primary-light);
  border-radius: 14px 14px 4px 14px;
}
.dialogue-turn.speaker-2 .dialogue-bubble {
  background: #FFF6E8;
  border-color: #F0DFB8;
}
.dialogue-blank {
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 1px;
}

/* ---------- Splash / Loading Screen ---------- */
.splash-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  padding: 20px;
}
.splash-logo-ring {
  width: 108px;
  height: 108px;
  border-radius: 28px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(22,40,63,.16), 0 0 0 1px var(--line);
  margin-bottom: 18px;
  animation: splashPop .5s cubic-bezier(.34,1.56,.64,1);
}
.splash-logo { width: 84px; height: 84px; object-fit: contain; }
@keyframes splashPop {
  from { transform: scale(.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.splash-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  letter-spacing: .3px;
}
.splash-tagline {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
  margin: 2px 0 28px;
}
.splash-bar {
  width: 140px;
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.splash-bar-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  animation: splashBar 1.1s ease-in-out infinite;
}
@keyframes splashBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
.loading-text { font-size: 12.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .splash-logo-ring { animation: none; }
  .splash-bar-fill { animation: none; width: 60%; }
}

/* ---------- Auth Screen ---------- */
.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--bg);
  padding: 4px;
  border-radius: 12px;
}
.auth-tab {
  flex: 1;
  padding: 9px 0;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-ui);
}
.auth-tab.active { background: var(--card); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.auth-error {
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-light);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 12px;
  line-height: 1.5;
}
.auth-error[hidden] { display: none; }

.link-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  padding: 6px 0;
}

/* ---------- Paywall Screen ---------- */
.paywall-text {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 14px;
}
.paywall-text strong { color: var(--primary-dark); }

/* ---------- Account info card (Profile screen) ---------- */
.account-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.account-row + .account-row { border-top: 1px solid var(--line); }
.premium-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--success-light);
  color: var(--success);
}

/* ---------- Pembayaran Manual (QRIS + WhatsApp) ---------- */
.qris-box {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 12px;
}
.qris-box img {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}
.payment-steps {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
  padding-left: 18px;
  margin: 10px 0 14px;
}
#payment-bank-info {
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  background: var(--primary-light);
  padding: 8px 12px;
  border-radius: 8px;
}
