/* Confess Quietly — style.css
 * Calm, warm, private: deep warm dark, generous spacing, large prompt
 * type. System font stack only — no external fonts, no CDN.
 */
:root {
  --bg: #171310;
  --bg2: #1e1813;
  --card: #241c15;
  --card2: #2b2118;
  --ink: #f3e9dd;
  --muted: #b8a893;
  --faint: #8d7d68;
  --line: #3d2f22;
  --accent: #d9a05b;
  --accent-dark: #b57f36;
  --accent-ink: #241708;
  --danger: #e07a5f;
  --danger-dark: #b5502f;
  --ok: #a3b18a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16.5px;
}
a { color: var(--accent); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: #100c09; color: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong { font-size: 17px; display: block; }
.tagline { font-size: 12px; color: var(--muted); display: block; }
.logo {
  width: 38px; height: 38px; border-radius: 10px; background: var(--card2);
  border: 1px solid var(--line); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; flex: none; letter-spacing: .04em;
}

/* Crisis strip — persistent, calm, never dismissible */
.crisis-strip {
  background: #2e2113; color: #efe0c8; border-bottom: 1px solid var(--line);
  font-size: 13.5px; padding: 8px 0; line-height: 1.5;
}
.crisis-strip a { color: #ffd9a0; font-weight: 700; }

/* Cards & layout */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; margin: 18px 0;
}
.hero { background: linear-gradient(180deg, var(--card2), var(--card)); }
.hero h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.25; font-weight: 700; }
.hero p { margin: 10px 0; }
.privacy-badge {
  background: #2e2417; border: 1px solid #57432a; border-radius: 10px;
  padding: 12px 14px; font-size: 14.5px;
}
.disclaimer-inline { font-size: 13.5px; color: var(--muted); }
h2 { font-size: 22px; margin: 0 0 12px; line-height: 1.3; }
h3 { font-size: 16px; margin: 18px 0 8px; }
.kicker {
  text-transform: uppercase; letter-spacing: .16em; font-size: 12px;
  color: var(--accent); margin: 0 0 6px; font-weight: 700;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.notice {
  background: #2e2417; border: 1px solid #57432a; border-radius: 10px;
  padding: 12px 14px; font-size: 14.5px; margin: 12px 0;
}
.plain-list { padding-left: 20px; }
.plain-list li { margin: 8px 0; }
.steps-list li { margin: 10px 0; }
.field-errors { color: var(--danger); font-size: 14px; margin: 8px 0; min-height: 0; }
.field-errors:empty { margin: 0; }

.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.wrap-row { flex-wrap: wrap; }
.between { justify-content: space-between; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card2); color: var(--ink);
  cursor: pointer; text-decoration: none; font-family: inherit; line-height: 1.3;
}
.btn:hover { border-color: var(--accent-dark); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #e5b06a; border-color: #e5b06a; }
.btn-big { padding: 14px 24px; font-size: 16.5px; border-radius: 12px; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-pro { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-danger { background: var(--danger-dark); border-color: var(--danger-dark); color: #fff; }
.btn-danger-ghost { background: transparent; border-color: #6e3a28; color: var(--danger); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.lang-select {
  padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card2); color: var(--ink);
  font-family: inherit; cursor: pointer; max-width: 150px;
}
.lang-select:hover { border-color: var(--accent-dark); }
.pro-badge {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 800; letter-spacing: .08em; border-radius: 6px;
  padding: 2px 7px; vertical-align: middle;
}
.free-note-box {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 14.5px; margin-top: 14px;
}

/* Pack chooser */
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
@media (max-width: 640px) { .pack-grid { grid-template-columns: 1fr; } }
.pack-card {
  text-align: left; background: var(--card2); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px; cursor: pointer; color: var(--ink);
  font-family: inherit; width: 100%;
}
.pack-card:hover { border-color: var(--accent); }
.pack-card h3 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pack-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.pack-card .pack-meta { margin-top: 10px; font-size: 12.5px; color: var(--faint); letter-spacing: .03em; }
.pack-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pack-info-row:last-child { border-bottom: 0; }
.pack-info-row .muted { text-align: right; }

/* Prompt step */
.progress { height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; margin: 8px 0 18px; }
.progress-bar { height: 100%; background: var(--accent); width: 20%; transition: width .3s ease; }
.prompt-title { font-size: 26px; margin-bottom: 6px; }
.prompt-text { font-size: 21px; line-height: 1.45; margin: 8px 0; font-weight: 600; }
.guidance { color: var(--muted); font-style: italic; font-size: 16px; margin: 6px 0 18px; }
.recorder { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 10px 0; }
.record-btn {
  width: 84px; height: 84px; border-radius: 50%; flex: none; cursor: pointer;
  border: 4px solid #57432a; background: #c84b31;
  box-shadow: 0 0 0 6px rgba(200, 75, 49, .15);
}
.record-btn:hover { background: #d8573d; }
.record-btn.recording { animation: pulse 1.4s ease-in-out infinite; background: #e07a5f; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(224, 122, 95, .18); }
  50% { box-shadow: 0 0 0 14px rgba(224, 122, 95, .05); }
}
.timer-wrap { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.timer { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-state { display: block; width: 100%; }
audio { width: 100%; margin: 8px 0; }
.note-label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; color: var(--muted); }
textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15.5px; font-family: inherit;
  background: var(--bg2); color: var(--ink); min-height: 76px; resize: vertical; line-height: 1.55;
}
textarea:focus { outline: 2px solid var(--accent-dark); border-color: var(--accent-dark); }
.nav-row { margin-top: 18px; gap: 10px; }

/* Completion */
.summary-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.summary-row:last-child { border-bottom: 0; }
.summary-row .muted { text-align: right; white-space: nowrap; }
.end-actions { margin: 18px 0 6px; }
.keepsake-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 20px 0; }
.keepsake-box h3 { margin-top: 0; }
.destroy-zone { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 6px; }
.end-screen { text-align: left; }
.end-screen h2 { font-size: 28px; }

/* FAQ & footer */
.faq-item h3 { margin-bottom: 4px; }
.faq-item p { margin: 4px 0 14px; color: var(--muted); }
.footer { padding: 10px 4px 34px; font-size: 13.5px; color: var(--muted); }

/* Overlays */
.overlay {
  position: fixed; inset: 0; background: rgba(10, 7, 4, .72); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.overlay[hidden] { display: none; }
.overlay-card {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; max-width: 480px; width: 100%; padding: 24px;
  max-height: 90vh; overflow: auto;
}
.overlay-card h3 { margin-top: 0; font-size: 19px; }
.overlay-card .btn { margin: 4px 4px 4px 0; }
table.compare { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 14px; }
table.compare td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
table.compare td:last-child { text-align: right; color: var(--accent); font-weight: 700; white-space: nowrap; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: #efe0c8; color: #241708; padding: 10px 18px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s ease;
  z-index: 200; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Print: only the keepsake card in #print-area */
#print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  #print-area { display: block; position: absolute; inset: 0; padding: 24px; }
  #print-area * { visibility: visible; }
  .p-card { font-family: Georgia, 'Times New Roman', serif; color: #2b2118; max-width: 640px; margin: 0 auto; line-height: 1.6; }
  .p-card-kicker { letter-spacing: .2em; text-transform: uppercase; font-size: 12px; color: #8a6d3b; }
  .p-card-title { font-size: 30px; margin: 6px 0 2px; }
  .p-card-date { color: #7a6a58; margin: 0 0 18px; }
  .p-card-step { border-top: 1px solid #ddd0ba; padding: 14px 0; }
  .p-card-steptitle { font-weight: bold; }
  .p-card-prompt { font-style: italic; color: #5c4c38; }
  .p-card-meta { font-size: 13px; color: #7a6a58; }
  .p-card-foot { margin-top: 24px; font-size: 13px; color: #7a6a58; }
}
