/* ============================================================
   THEME / WARNA — persis dari src/theme/colors.js versi app asli
   ============================================================ */
:root {
  --maroon900: #5A1013;
  --maroon700: #87161A;
  --maroon500: #A5342F;
  --maroon100: #F6DFDE;
  --maroon50: #FBEFEE;

  --blue600: #5C93AE;
  --blue500: #7AB3CE;
  --blue300: #B2D4E0;
  --blue100: #DCEBF1;
  --blue50: #EFF6F9;

  --amber500: #FEBD59;
  --amber100: #FFE7BE;
  --amber50: #FFF5E4;

  --rose: #D6473B;
  --rose-tint: #FBE0DD;

  --ink: #241A1B;
  --muted: #8B7C7D;
  --line: #ECE1DF;
  --bg: #F1ECE6;
  --white: #FFFFFF;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--ink);
}

/* ============================================================
   RESPONSIVE LAYOUT
   - Mobile (<768px): app fills the entire viewport, edge to edge.
   - Tablet (768–1023px): app becomes a centered card with room to breathe.
   - Desktop (≥1024px): full-width experience — a decorative brand panel
     fills the left side, the app stays at a comfortable, readable width
     on the right so the whole browser window is put to use.
   ============================================================ */
.page-wrap {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* App shell — mobile-first: fills the whole screen like a real app */
.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}
.screen.active { display: flex; }

.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 24px;
}

/* Brand panel — hidden on mobile & tablet, only shown on desktop */
.brand-panel { display: none; }

/* ---------- Tablet ---------- */
@media (min-width: 620px) {
  body { background: var(--bg); }
  .page-wrap { align-items: center; padding: 40px 20px; }
  .app-shell {
    max-width: 460px;
    min-height: min(860px, calc(100vh - 80px));
    height: min(860px, calc(100vh - 80px));
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(90, 16, 19, 0.14);
  }
  .screen, .screen.active { min-height: 0; height: 100%; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  body { background: var(--maroon900); }
  .page-wrap {
    position: relative;
    align-items: center;
    justify-content: center;
    padding: 48px;
    gap: 0;
  }
  /* Pure decorative background — fills the entire screen behind the card */
  .brand-panel {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(160deg, var(--maroon900) 0%, var(--maroon700) 55%, var(--maroon500) 100%);
  }
  .brand-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    opacity: .18;
    background: var(--amber500);
    z-index: 1;
  }
  .brand-blob-1 { width: 340px; height: 340px; top: -120px; right: -100px; }
  .brand-blob-2 { width: 260px; height: 260px; bottom: -100px; left: -80px; background: var(--blue300); opacity: .16; }

  /* The white app content, centered on top of the red background */
  .app-shell {
    position: relative;
    z-index: 3;
    flex: none;
    width: 580px;
    max-width: 580px;
    height: min(880px, calc(100vh - 96px));
    min-height: 0;
    margin: 0;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .page-wrap { padding: 32px; }
  .app-shell { width: 520px; max-width: 520px; }
}

@media (min-width: 1600px) {
  .app-shell { width: 660px; max-width: 660px; }
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ============================================================
   BUTTONS — persis dari src/components/Buttons.js
   ============================================================ */
.btn {
  display: block;
  width: 100%;
  border-radius: 999px;
  padding: 14px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  box-sizing: border-box;
  transition: opacity .15s ease;
}
.btn:active { opacity: .85; }

.btn-primary {
  background: var(--maroon700);
  color: var(--white);
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
  padding: 10px 16px;
  width: auto;
  display: inline-block;
}
.btn-center { display: block; margin: 4px auto 0; width: fit-content; }

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
  margin-bottom: 12px;
}

.footer {
  padding: 8px 22px 18px;
  border-top: 1px solid var(--line);
}
.footer-plain { padding: 8px 24px 20px; border-top: none; }
.footer-note {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

/* ============================================================
   HOME SCREEN
   ============================================================ */
.partner-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.partner-logo { height: 22px; width: 90px; object-fit: contain; }
.partner-text { font-size: 11px; font-weight: 600; color: var(--blue600); }

.greeting-eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0; }
.greeting-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  color: var(--maroon900);
  margin: 2px 0 18px;
}

.mood-card {
  background: var(--blue50);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 26px;
}
.mood-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--blue600);
  margin: 0 0 6px;
}
.mood-question {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 14px;
}
.mood-scale { display: flex; justify-content: space-between; flex-wrap: wrap; row-gap: 10px; }
.mood-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  background: none;
}
.mood-dot {
  width: 16px; height: 16px; border-radius: 8px;
  border: 1.5px solid var(--blue300);
  background: var(--white);
}
.mood-dot.selected { background: var(--blue500); border-color: var(--blue600); }
.mood-text { font-size: 10.5px; color: var(--muted); }
.mood-text.selected { font-weight: 600; color: var(--blue600); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  margin: 0;
}
.section-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: 2px 0 14px;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 10px;
  width: 100%;
  text-align: left;
}
.cat-row-active {
  background: var(--maroon50);
  border: 1px solid var(--maroon100);
}
.cat-row-disabled {
  background: var(--white);
  border: 1px solid var(--line);
  opacity: .65;
}
.cat-dot {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.cat-dot-maroon { background: var(--maroon100); color: var(--maroon700); }
.cat-dot-blue { background: var(--blue50); color: var(--muted); }
.cat-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-t1 { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.cat-t1-disabled { font-size: 14.5px; font-weight: 600; color: var(--muted); }
.cat-t2 { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chev { font-size: 20px; color: var(--maroon700); }
.soon-tag {
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 10px;
  flex-shrink: 0;
}
.soon-tag-text { font-size: 10.5px; font-weight: 700; color: var(--muted); }

.cta-fixed {
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

/* ============================================================
   INTRO SCREEN
   ============================================================ */
.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--maroon700);
  margin: 0 0 10px;
}
.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  color: var(--maroon900);
  margin: 0 0 18px;
}
.intro-scroll .title { font-size: 26px; }

.breathe-wrap { display: flex; justify-content: center; margin-bottom: 24px; }
.breathe { width: 84px; height: 84px; border-radius: 42px; background: var(--maroon500); }

.intro-text {
  font-size: 15px;
  color: var(--muted);
  line-height: 22px;
  margin: 0 0 20px;
}

.disclaimer-box {
  background: var(--maroon100);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}
.disclaimer-strong { font-weight: 700; font-size: 13.5px; color: var(--maroon900); }
.disclaimer-text { font-size: 13.5px; color: var(--maroon900); line-height: 19px; }

.age-box { background: var(--bg); border-radius: 14px; padding: 16px; }
.age-label { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 8px; }
.age-input {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.age-input:focus { border-color: var(--maroon500); }
.age-input.error { border-color: var(--rose); }
.age-hint { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }
.age-error { font-weight: 500; font-size: 12px; color: var(--rose); margin: 6px 0 0; }

/* ============================================================
   SCREENING SCREEN
   ============================================================ */
.head { padding: 12px 20px 0; }
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.back-btn { font-size: 20px; color: var(--ink); padding: 10px; margin: -10px; }
.step-count { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.flow-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--maroon900);
  margin: 0 0 14px;
}

.progress-bar { display: flex; gap: 5px; margin-bottom: 20px; }
.progress-seg { flex: 1; height: 5px; border-radius: 999px; background: var(--line); }
.progress-seg.filled { background: var(--maroon700); }

.body { flex: 1; padding: 8px 20px 0; overflow-y: auto; }
.q-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--blue600);
  margin: 0 0 8px;
}
.q-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 28px;
  color: var(--ink);
  margin: 0 0 22px;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  margin-bottom: 10px;
  width: 100%;
  text-align: left;
}
.option-row.selected { border-color: var(--maroon700); background: var(--maroon50); }
.option-label { font-size: 15px; color: var(--ink); padding-right: 10px; }
.option-label.selected { font-weight: 600; color: var(--maroon900); }
.option-radio { font-size: 14px; color: var(--line); }
.option-radio.selected { color: var(--maroon700); }

.foot { padding: 16px 20px; }
.foot-center { text-align: center; }

/* ============================================================
   RESULT SCREEN
   ============================================================ */
.score-hero { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.score-num { font-family: var(--font-display); font-weight: 600; font-size: 48px; color: var(--maroon900); }
.score-max { font-size: 15px; color: var(--muted); }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
}
.badge-low { background: var(--maroon100); }
.badge-low #badge-text { color: var(--maroon900); }
.badge-mild, .badge-moderate { background: var(--amber100); }
.badge-mild #badge-text, .badge-moderate #badge-text { color: #8A5E1F; }
.badge-high { background: var(--rose-tint); }
.badge-high #badge-text { color: var(--rose); }
#badge-text { font-weight: 700; font-size: 12.5px; }

.gauge-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 18px;
}
.gauge-fill { height: 100%; border-radius: 999px; background: var(--blue500); transition: width .4s ease; }

.desc { font-size: 14.5px; color: var(--ink); line-height: 21px; margin: 0 0 18px; }

.rec-box { background: var(--bg); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.rec-title { font-weight: 600; font-size: 14.5px; color: var(--ink); margin: 0 0 12px; }
.rec-row { display: flex; gap: 12px; margin-bottom: 12px; }
.rec-row:last-child { margin-bottom: 0; }
.rec-num { font-weight: 700; font-size: 12px; color: var(--blue600); width: 20px; flex-shrink: 0; }
.rec-text-wrap { flex: 1; min-width: 0; }
.rec-row-title { font-weight: 500; font-size: 13.5px; color: var(--ink); margin: 0; }
.rec-row-detail { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }

.crisis-box { background: var(--rose-tint); border-radius: 14px; padding: 18px; margin-bottom: 8px; }
.crisis-title { font-weight: 600; font-size: 14px; color: var(--rose); margin: 0 0 8px; }
.crisis-text { display: block; font-size: 13px; color: #7A3B31; margin: 0 0 4px; text-decoration: none; }
.crisis-link { font-weight: 700; text-decoration: underline; }
