:root {
  --pink: #FF007F;
  --pink-deep: #B0005A;
  --pink-ink: #8A0047;
  --pink-soft: #FFF0F7;
  --teal: #1F4A47;
  --teal-soft: #F3F7F6;
  --teal-mid: #9DB7B1;
  --gold: #FCC931;
  --gold-soft: #FFF8DA;
  --ink: #0A0A0A;
  --muted: #4A4A4A;
  --line: #EADFE4;
  --line-strong: #D9CFD4;
  --bg: #FFFFFF;
  --page: #FBF7F9;
  --display: 'DM Serif Display', Georgia, serif;
  --body: 'Montserrat', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); font-weight: 600; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.shell {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width: 520px) {
  .shell { box-shadow: 0 0 0 1px var(--line); }
}

.preview-bar {
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
}

.screen {
  flex: 1;
  padding: 20px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.screen.has-nav { padding-bottom: 100px; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { font-family: var(--display); font-size: 26px; color: var(--pink); line-height: 1; }
.back { font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }

h1, .h1 { font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1.08; color: var(--teal); margin: 0; }
h2, .h2 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--teal); margin: 0; }
.lede { font-size: 17px; line-height: 1.55; margin: 0; }
.small { font-size: 13px; color: var(--muted); }
.eyebrow { font-family: var(--body); margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--pink-deep); }
.eyebrow.teal { color: var(--teal); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 14px; }
.label { font-size: 15px; font-weight: 700; }

.btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: #fff; border: none;
  font-weight: 700; font-size: 17px; text-decoration: none; text-align: center;
}
.btn:hover { color: #fff; background: #2a2a2a; }
.btn.pink { background: var(--pink); }
.btn.outline { background: #fff; color: var(--teal); border: 1.5px solid var(--teal); }
.btn.outline:hover { background: var(--teal-soft); color: var(--teal); }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.btn-row > .grow { flex: 2; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--teal); }
.input, .textarea {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: 14px;
  padding: 12px 14px; font-size: 16px; color: var(--ink); background: #fff; font-weight: 400;
}
.input { min-height: 52px; }
.textarea { min-height: 150px; line-height: 1.5; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(31,74,71,.15); }

.chips { display: grid; gap: 8px; }
.chips.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chip {
  min-height: 50px; padding: 8px 12px; border-radius: 12px;
  background: #fff; color: var(--teal); border: 1.5px solid var(--line-strong);
  font-weight: 700; font-size: 15px; line-height: 1.25;
}
.chip:hover { border-color: var(--teal); }
.chip.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip.on.good { background: var(--teal); border-color: var(--teal); }
.chip.on.meh { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.chip.on.fire { background: var(--pink); color: #fff; border-color: var(--pink); }

.card { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #fff; }
.note { border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.note.gold { background: var(--gold-soft); border: 1px solid var(--gold); }
.note.teal { background: var(--teal-soft); color: var(--teal); }
.note.pink { background: var(--pink-soft); color: var(--pink-ink); }
.note.red { background: #FFE9EC; color: #7A0A1E; border: 1px solid #F3A6B3; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: center; background: var(--teal-soft); border-radius: 14px; padding: 14px 16px; }
.steps li.now { background: var(--pink); color: #fff; }
.steps .num { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.steps li.now .num { background: #fff; color: var(--pink-deep); }
.steps .t { font-weight: 700; color: var(--teal); }
.steps li.now .t { color: #fff; }
.steps .s { font-size: 13px; color: var(--muted); }
.steps li.now .s { color: #fff; }

.progress { display: grid; gap: 4px; }
.progress span { height: 6px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--pink); }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--teal); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border: none; text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 30px; }
.avatar.add { background: var(--pink-soft); color: var(--pink-deep); border: 2px dashed var(--pink); font-size: 11px; }
.avatar.tracey { background: var(--pink); font-family: var(--display); font-size: 22px; font-weight: 400; }

.mic {
  width: 80px; height: 80px; border-radius: 50%; border: none; background: var(--pink);
  display: flex; align-items: center; justify-content: center;
}
.mic.rec { background: var(--ink); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,0,127,.5); } 50% { box-shadow: 0 0 0 14px rgba(255,0,127,0); } }
@media (prefers-reduced-motion: reduce) { .mic.rec { animation: none; } }
.voice-box { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--pink-soft); border-radius: 16px; padding: 22px 16px; text-align: center; }
.voice-note { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.voice-note .play { width: 40px; height: 40px; border-radius: 50%; background: var(--pink); border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wave { display: flex; align-items: center; gap: 3px; height: 28px; flex: 1; }
.wave i { display: block; width: 3px; border-radius: 2px; background: var(--pink-deep); }

.video {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--teal); color: #fff; border: none; border-radius: 16px; padding: 16px; text-align: left;
}
.video .play { width: 52px; height: 52px; border-radius: 50%; background: var(--pink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.video .t { font-weight: 700; font-size: 16px; display: block; }
.video .s { font-size: 13px; color: #D6E6E2; display: block; }

.area-grid { display: flex; flex-direction: column; gap: 8px; }
.area { border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.area summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 700; min-height: 52px; }
.area summary::-webkit-details-marker { display: none; }
.area .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.fire { background: var(--pink); } .dot.meh { background: var(--gold); } .dot.good { background: var(--teal); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.pill.high { background: var(--pink-soft); color: var(--pink-ink); }
.pill.med { background: var(--gold-soft); color: #5C4300; }
.pill.low { background: var(--teal-soft); color: var(--teal); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.move-tile { display: flex; flex-direction: column; gap: 4px; background: var(--pink-soft); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); }
.move-tile:hover { color: var(--ink); background: #FFE3F1; }
.move-tile .meta { font-size: 12px; font-weight: 700; color: var(--pink-deep); text-transform: uppercase; letter-spacing: .5px; }
.move-tile .title { font-size: 16px; font-weight: 700; }
.move-tile.done { background: var(--teal-soft); }
.move-tile.done .meta { color: var(--teal); }
.later { border-top: 1.5px dashed var(--line-strong); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.later b { color: var(--teal); }

.checkins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkins button { min-height: 58px; border-radius: 14px; border: none; font-weight: 700; font-size: 15px; }
.ck-done { background: var(--teal); color: #fff; }
.ck-stuck { background: var(--gold); color: var(--ink); }
.ck-bad { background: var(--pink); color: #fff; }
.ck-life { background: #fff; color: var(--teal); border: 1.5px solid var(--teal) !important; }
.reply { background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.resource { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--gold); background: var(--gold-soft); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.resource:hover { color: var(--ink); }

.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--teal); background: #fff; color: var(--teal); font-size: 22px; font-weight: 700; }
.stepper button.plus { background: var(--teal); color: #fff; }
.stepper b { font-size: 22px; min-width: 26px; text-align: center; }
.chart { display: flex; align-items: flex-end; gap: 5px; height: 96px; }
.chart i { flex: 1; border-radius: 4px 4px 0 0; background: var(--teal); display: block; }
.chart i.before { background: var(--teal-mid); }
.chart i.marker { flex: 0 0 3px; background: var(--pink); border-radius: 2px; }

.thread { display: flex; flex-direction: column; gap: 12px; background: var(--page); border-radius: 16px; padding: 14px 12px; }
.bubble { max-width: 82%; padding: 12px 14px; font-size: 15px; line-height: 1.5; }
.bubble.me { align-self: flex-end; background: var(--teal); color: #fff; border-radius: 18px 18px 4px 18px; }
.bubble.her { align-self: flex-start; background: #fff; border: 1.5px solid var(--line); border-radius: 18px 18px 18px 4px; }
.bubble.sys { align-self: center; max-width: 92%; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 12px; font-size: 13px; text-align: center; padding: 8px 12px; }
.composer { position: sticky; bottom: 84px; display: flex; gap: 8px; align-items: center; background: #fff; padding: 10px 0; }
.composer .input { border-radius: 999px; min-height: 48px; }
.composer .mic { width: 48px; height: 48px; flex-shrink: 0; }
.composer .send { min-height: 48px; padding: 0 16px; font-size: 14px; }

.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 480px; height: 76px; background: #fff;
  border-top: 1.5px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom); z-index: 10;
}
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--teal); text-decoration: none; }
.nav a.on { color: var(--pink-deep); font-weight: 700; }
.nav svg { width: 22px; height: 22px; }

.crisis { font-size: 12px; color: var(--muted); text-align: center; padding: 0 20px 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.admin-row { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.admin-row .who { flex: 1; display: flex; flex-direction: column; }
.status { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.st-intake { background: var(--teal-soft); color: var(--teal); }
.st-ready { background: var(--gold-soft); color: #5C4300; }
.st-live { background: #E6F4EA; color: #1D5B2C; }
.st-quiet { background: #EEE; color: #333; }
.st-flag { background: #FFE9EC; color: #7A0A1E; }

.summary-sheet { border: 1.5px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.summary-sheet h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--pink-deep); }
.summary-sheet ul { margin: 0; padding-left: 20px; }

@media print {
  .preview-bar, .nav, .no-print { display: none !important; }
  .shell { box-shadow: none; max-width: none; }
  body { background: #fff; }
}

/* Full-page portal layout (shared) */
body.full { background: #FFFFFF; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.topnav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); border-bottom: 1.5px solid var(--line); }
.topnav .brandmark { font-family: var(--display); font-size: 22px; color: var(--pink); text-decoration: none; }
.topnav .links { display: flex; gap: clamp(12px, 3vw, 32px); font-size: 14px; }
.topnav .links a { text-decoration: none; color: var(--teal); position: relative; }
.topnav .links a.on { color: var(--pink-deep); font-weight: 700; }
.topnav .who { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--teal); }
.topnav .avatar { width: 40px; height: 40px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; margin-left: 6px; }
@media (max-width: 760px) { .topnav .links { display: none; } }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px); display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }
.wrap.narrow { max-width: 760px; }
.footer { border-top: 1.5px solid var(--line); padding: 16px clamp(16px, 4vw, 48px); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.alert { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; background: var(--pink); color: #fff; border-radius: 18px; padding: 18px 22px; }
.alert .msg { display: flex; align-items: center; gap: 14px; }
.alert .bell { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert b { display: block; font-size: 18px; }
.alert span.sub { font-size: 14px; }
.alert .btn { background: #fff; color: var(--pink-deep); min-height: 50px; }
.alert .btn:hover { background: var(--pink-soft); color: var(--pink-deep); }
.steps li.done { background: #EEF6F1; }
.steps li.done .num { background: #2E7D4F; }
.steps li.waiting { background: var(--pink-soft); border: 2px solid var(--pink); }
.steps li.waiting .num { background: var(--pink); }
.steps li.waiting .t { color: var(--pink-ink); }
.steps li.upcoming { opacity: .65; }
.steps .act { margin-left: auto; flex-shrink: 0; }
.steps .act .btn { min-height: 44px; font-size: 14px; padding: 0 16px; }
.steps li.active { background: var(--teal-soft); border: 2px solid var(--teal); }

[hidden] { display: none !important; }
