@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;0,900;1,400&display=swap');

:root {
  --accent-1: #6D28D9;
  --accent-2: #EC4899;
  --surface: #FBF7FC;
  --surface-raised: #FFFFFF;
  --card-pink: #FDF1F7;
  --ink: #3B1F52;
  --ink-muted: #606774;
  --line: #E8DFF2;
  --font-serif: "Merriweather", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, system-ui, sans-serif;

  --amber: #E8A63C;
  --amber-bg: #FDF3DF;
  --orange: #DA7A38;
  --orange-bg: #FCE9DA;
  --redorange: #C24B3E;
  --redorange-bg: #F9DFDB;
  --maroon: #6B1E2C;
  --maroon-bg: #4A1420;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  max-width: 480px;
  margin-inline: auto;
}
.header {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  padding: 24px 20px;
  text-align: center;
  border-radius: 0 0 20px 20px;
}
.header .logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 8px;
}
.header.header-compact { padding: 16px 20px; }
.header.header-compact .logo { width: 60px; height: 60px; margin-bottom: 4px; }
.header.header-compact .brand-name { font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin: 0 0 6px; }
.header.header-compact h1 { font-size: 19px; line-height: 1.4; }
.header h1 { margin: 0; font-family: var(--font-serif); font-weight: 700; }
.header p { margin: 6px 0 0; }
.header > p { font-family: var(--font-serif); }
.header p.progress-step { font-size: 11px; font-weight: 600; letter-spacing: .03em; opacity: .85; margin: 0 0 16px; }
.progress-track { height: 4px; background: rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; background: #fff; border-radius: 999px; }
.icon-shield { font-size: 44px; text-align: center; margin: 4px 0 16px; }
.screen { padding: 0 0 20px; display: none; }
.screen.active { display: block; }
.screen-body { padding: 20px; }
.card {
  background: var(--card-pink);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(60,30,80,.06);
  border-left: 4px solid var(--accent-2);
}
.card.card-centered { text-align: center; background: #FDEBA9; border-left-color: #D97706; }
.card.card-warning { background: #FDEBA9; border-left-color: #D97706; text-align: center; }
.card.card-warning p { color: #6C2F15; }
.warning-question {
  text-align: center;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.btn-outline-pink {
  background: var(--accent-2);
  color: #fff;
}
.card-lilac { background: #F1EDFB; }
.card-mint { background: #ECFDF3; border-left-color: #10B981; }
.card-danger-outline { background: #FDECEC; border-left-color: #DC2626; }
.card p.danger-label { color: #DC2626; font-weight: 700; font-size: 14px; margin: 0 0 12px; }
.emergency-numbers { display: flex; flex-direction: column; gap: 10px; }
.emergency-number { background: #fff; border-radius: 12px; padding: 12px 16px; }
.card p.emergency-digits { color: #DC2626; font-weight: 800; font-size: 26px; margin: 0; }
.card p.emergency-caption { color: var(--ink-muted); font-size: 13px; margin: 2px 0 0; line-height: 1.5; }
.safety-closing { color: var(--ink-muted); font-size: 13.5px; line-height: 1.6; text-align: center; margin: 0 0 14px; }
.card p {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.7;
}
.card p:last-child { margin-bottom: 0; }
.card-centered p:nth-child(1) { color: var(--ink); font-family: var(--font-serif); font-size: 15px; line-height: 1.95; }
.card-centered p:nth-child(2) { color: var(--ink-muted); }
.btn {
  width: 100%;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  margin-bottom: 10px;
}
.btn-primary { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; }
.btn-secondary { background: #fff; color: var(--accent-1); border: 2px solid var(--accent-1); }
.btn-danger { background: linear-gradient(135deg, #DC2626, #B91C1C); color: #fff; }
.btn-copied { background: linear-gradient(135deg, #10B981, #059669) !important; }
.chat-icon { font-size: 30px; text-align: center; margin-bottom: 6px; }
.card-verse { background: #EEFDF3; border-left-color: #10B981; }
.verse-label {
  color: #059669;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .03em;
  margin: 0 0 6px;
}
.verse-text { color: var(--accent-1); margin: 0; }
.copy-followup { color: var(--ink-muted); font-size: 14.5px; line-height: 1.6; text-align: center; margin: -4px 0 14px; }
.finish-confirm { text-align: center; }
.finish-confirm p { color: var(--accent-1); font-weight: 600; font-size: 14px; margin: 0 0 14px; }
#feelings-list, #needs-list, #feelings-after-list { text-align: center; margin-bottom: 20px; }
.pill {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin: 4px;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}
.pill.selected { background: var(--accent-1); color: #fff; border-color: var(--accent-1); }
.conflict-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.conflict-item.selected { border-color: var(--accent-1); }
.conflict-item .badge {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #EDE4FB;
  color: var(--accent-1);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.conflict-item .text { flex: 1; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.btn-suggest {
  background: #fff;
  color: var(--accent-1);
  border: 2px dashed var(--accent-1);
}
.suggest-box { margin-top: 4px; margin-bottom: 10px; line-height: 1.6; }
.suggest-confirm { color: var(--accent-1); font-size: 13.5px; font-weight: 600; margin: 0 0 14px; text-align: center; line-height: 1.7; }
.lamp-icon { font-size: 18px; filter: saturate(1.6) brightness(1.15); }
.selected-conflict {
  background: var(--card-pink);
  text-align: center;
  padding: 14px 16px;
  border-radius: 14px;
  margin: 0 0 16px;
}
.selected-conflict-label {
  margin: 0 0 4px;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
}
.selected-conflict-value {
  margin: 0;
  color: var(--accent-1);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
}
.card.card-text-center { text-align: center; }
.card-observation { background: linear-gradient(135deg, #EDE5FA, #FBEAF3); }
.observation-lead { color: var(--accent-1); font-weight: 700; font-family: var(--font-serif); font-size: 16px; }
.observation-parenthetical { color: var(--ink-muted); }
.observation-instruction { color: var(--accent-1) !important; }
textarea, input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 14px;
}

.btn-neutral { background: #4A2E1A; color: #fff; }

/* Tela de login/ativação */
.form-error { color: #DC2626; font-size: 13.5px; text-align: center; margin: -4px 0 12px; }
.link-toggle { color: var(--accent-1); font-size: 13.5px; text-align: center; text-decoration: underline; cursor: pointer; margin: 4px 0 0; }

/* Violentômetro (Tela 1C-bis) */
.thermo {
  display: flex;
  gap: 12px;
  background: var(--surface-raised);
  border-radius: 16px;
  padding: 14px 14px 14px 10px;
  box-shadow: 0 1px 2px rgba(60,30,80,.06);
  margin-bottom: 16px;
}
.rail-wrap { flex-shrink: 0; width: 26px; display: flex; flex-direction: column; align-items: center; }
.tube {
  width: 13px;
  flex: 1;
  min-height: 220px;
  border-radius: 7px 7px 0 0;
  position: relative;
  z-index: 1;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.6) 0 2px, transparent 2px 15px),
    linear-gradient(to bottom, var(--amber), var(--orange), var(--redorange), #DC2626);
  box-shadow: 0 0 0 1px rgba(60,30,80,.08) inset;
}
.tube::after {
  content: "";
  position: absolute;
  left: 2px; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.35);
}
.bulb {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  margin-top: -8px;
  background: #DC2626;
  box-shadow: 0 0 0 3px var(--surface-raised);
  position: relative;
  z-index: 2;
}
.tiers { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tier { border-radius: 12px; overflow: hidden; }
.tier[data-level="1"] { background: var(--amber-bg); }
.tier[data-level="2"] { background: var(--orange-bg); }
.tier[data-level="3"] { background: var(--redorange-bg); }
.tier[data-level="4"] { background: var(--maroon-bg); }
.tier-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: transparent;
  border: none;
  font-family: inherit;
  text-align: left;
  padding: 11px 12px;
  cursor: pointer;
}
.tier-name { font-family: var(--font-serif); font-weight: 600; font-size: 14.5px; }
.tier[data-level="1"] .tier-name { color: #7A5613; }
.tier[data-level="2"] .tier-name { color: #7A3E10; }
.tier[data-level="3"] .tier-name { color: #7A2317; }
.tier[data-level="4"] .tier-name { color: #F4DDE0; }
.tier-sub { display: block; font-family: var(--font-sans); font-size: 11.5px; font-weight: 400; opacity: .8; margin-top: 1px; }
.chev { flex-shrink: 0; width: 18px; height: 18px; transition: transform .2s ease; opacity: .7; color: inherit; }
.tier[data-level="4"] .chev { filter: invert(1); }
.tier.open .chev { transform: rotate(180deg); }
.tier-items { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.tier.open .tier-items { max-height: 500px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.chip { font-family: var(--font-sans); font-size: 12px; line-height: 1.3; padding: 5px 10px; border-radius: 999px; }
.tier[data-level="1"] .chip { color: #7A5613; background: #FBEBC8; }
.tier[data-level="2"] .chip { color: #7A3E10; background: #F8D9BE; }
.tier[data-level="3"] .chip { color: #7A2317; background: #F3C3BA; }
.tier4-message { padding: 0 12px 14px; }
.tier4-message p { margin: 0; font-family: var(--font-sans); font-size: 13px; line-height: 1.6; color: #F4DDE0; }
.tier4-message p + p { margin-top: 8px; font-weight: 600; }
.attribution { font-family: var(--font-sans); font-size: 11.5px; color: var(--ink-muted); line-height: 1.5; margin: 0 0 14px; text-align: center; }
.closing-text { font-family: var(--font-sans); font-size: 14.5px; line-height: 1.55; color: var(--ink); text-align: center; margin: 0 0 16px; }

/* Tela 7: Meu Historico */
.history-subtitle { text-align: center; color: var(--ink-muted); font-size: 13.5px; margin: 0 0 16px; }
.history-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}
.history-card-header { padding: 14px 16px; cursor: pointer; }
.history-card-toprow { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.history-date { color: var(--ink-muted); font-size: 12.5px; }
.status-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.status-badge.status-aguardando { background: #FDEBA9; color: #7A5613; }
.status-badge.status-registrado { background: #D1FAE5; color: #065F46; }
.history-chev { margin-left: auto; color: var(--ink-muted); }
.history-conflict { margin: 0; font-weight: 600; color: var(--ink); font-size: 14px; }
.history-card-body { padding: 0 16px 16px; }
.history-detail { font-size: 13.5px; line-height: 1.6; color: var(--ink); margin: 0 0 10px; }
.history-detail strong { color: var(--accent-1); }

/* Telas 8 e 9: como foi o dialogo */
.dialogue-question { font-weight: 700; color: var(--ink); text-align: center; margin: 0 0 14px; line-height: 1.6; }
.reaction-btn { background: #fff; color: var(--ink); border: 2px solid var(--line); text-align: center; }
.reaction-btn.selected { border-color: var(--accent-1); background: #EDE4FB; color: var(--accent-1); }
