/* PocketPitch — warm editorial theme. Fraunces (display) + Inter (UI). */

:root {
  --paper: #FBF6EE;     /* warm off-white page */
  --surf:  #F4EDE1;
  --card:  #FFFDF9;
  --raised:#FFFFFF;
  --ink:   #2A211B;     /* warm near-black text */
  --muted: #857A6C;
  --faint: #A89E90;
  --line:  #ECE2D4;
  --line2: #DDD0BD;
  --accent:#E0613C;     /* persimmon */
  --accent-deep:#C24A2A;
  --accent-soft:#FBE3CF;
  --gold:  #E39A2A;
  --gold-soft:#FBEFD3;
  --sage:  #4F7A66;     /* positive / won */
  --sage-soft:#E2EFE7;
  --rose:  #C0524C;     /* danger / lost */
  --rose-soft:#F7E2DF;
  --shadow: 0 4px 18px rgba(42, 33, 27, .07);
  --shadow-lift: 0 10px 30px rgba(42, 33, 27, .14);
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Display & comfort prefs (ND accessibility) — toggled on <html> */
html.text-lg body { font-size: 17px; }
html.font-readable { --sans: "Atkinson Hyperlegible", "Inter", -apple-system, sans-serif; }
html.reduce-motion * , html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

.comfort-opts { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.comfort-opt { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.comfort-opt input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.settings-sep { border: none; border-top: 1px solid var(--line2); margin: 26px 0; }

/* Settings sub-tabs — break the long scroll into sections */
.settings-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line2); margin: 0 0 24px; }
.settings-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 13px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; margin-bottom: -1px; white-space: nowrap; }
.settings-tab:hover { color: var(--ink); }
.settings-tab.active { color: var(--accent-deep); border-bottom-color: var(--accent); }
/* Plans panel (Settings → Plans) */
.plans-launch { background: var(--sage-soft); border: 1px solid #cfe0d6; color: #2f5a47; border-radius: 12px; padding: 12px 15px; font-size: 14px; margin-bottom: 18px; }
.plan-rows { display: flex; flex-direction: column; gap: 10px; }
.plan-row { display: flex; gap: 14px; align-items: baseline; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
.plan-row.feat { border-color: var(--accent); box-shadow: 0 4px 14px rgba(192,86,46,.10); }
.plan-row .pr-name { font-family: var(--serif); font-weight: 600; font-size: 16px; flex: none; width: 96px; }
.plan-row .pr-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.plan-bonuses { margin: 16px 0 18px; display: flex; flex-direction: column; gap: 7px; }
.plan-bonuses p { font-size: 13.5px; color: #4a4036; } .plan-bonuses b { color: var(--ink); }
.plans-noai { background: var(--sage-soft); border: 1px solid #cfe0d6; border-radius: 10px; padding: 10px 13px; font-size: 13px; color: #2f5a47; margin-bottom: 16px; }
@media (max-width: 560px) { .plan-row { flex-direction: column; gap: 3px; } .plan-row .pr-name { width: auto; } }
.settings-section > h2:first-child { margin-top: 0; }

/* Read-aloud 🔊 button — hidden until the comfort toggle turns it on */
.speak-btn { display: none; background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 9px; font-size: 14px; line-height: 1; cursor: pointer; }
html.read-aloud-on .speak-btn { display: inline-flex; align-items: center; }
/* AI-free mode: hide every AI feature (Settings → Comfort → AI-free mode) */
html.ai-off .ai-feat { display: none !important; }
/* Non-AI methodology blocks (templates / guides / checklists) */
.neg-rates { background: var(--surf); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 13.5px; }
.neg-rates-h { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.neg-check { margin: 6px 0 12px 18px; font-size: 13.5px; color: #3a3027; display: flex; flex-direction: column; gap: 5px; }
.neg-check li { line-height: 1.45; }
.kw-flags { list-style: none; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.kw-flags li { background: #FBEFD3; color: #8a6320; border-radius: 8px; padding: 7px 11px; font-size: 13.5px; }
.scam-checklist ul { margin: 8px 0 10px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.45; }
.scam-ai { margin-top: 6px; }
/* Template picker + save modals */
.tmpl-tabs { display: flex; gap: 6px; margin: 10px 0; }
.tmpl-tab { flex: 1; background: var(--surf); border: 1px solid var(--line); border-radius: 9px; padding: 8px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.tmpl-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
#tmpl-search { width: 100%; }
.tmpl-list { max-height: 52vh; overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tmpl-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.tmpl-item-main { min-width: 0; }
.tmpl-item-name { font-weight: 600; font-size: 14px; }
.tmpl-item-snip { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmpl-item-acts { display: flex; gap: 6px; flex: none; }
.ts-label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }
.ts-label input, #ts-body { width: 100%; margin-top: 3px; }
.ts-tokens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.tok-chip { background: var(--surf); border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--accent-deep); cursor: pointer; }
.tok-chip:hover { border-color: var(--accent); }
.ts-share { margin-top: 6px; }
/* Open loops (Today) — calm capture list, no due dates / no shame */
.loops-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin: 22px 0; }
.loops-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.loops-head h3 { font-family: var(--serif); font-size: 18px; margin: 0; }
.loop-add { display: flex; gap: 8px; margin-bottom: 12px; }
.loop-add input { flex: 1; }
.loop-list { display: flex; flex-direction: column; gap: 6px; }
.loop-row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 7px 9px; border-radius: 10px; }
.loop-row:hover { background: var(--surf); }
.loop-check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line2); background: transparent; color: #fff; cursor: pointer; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.loop-check:hover { border-color: var(--sage); }
.loop-row.done .loop-check { background: var(--sage); border-color: var(--sage); }
.loop-text { flex: 1; font-size: 14.5px; line-height: 1.4; outline: none; border-radius: 6px; padding: 2px 4px; }
.loop-text:focus { background: var(--surf); box-shadow: inset 0 0 0 1px var(--line2); }
.loop-row.done .loop-text { color: var(--muted); text-decoration: line-through; }
.loop-del { flex: none; background: none; border: none; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.loop-del:hover { color: var(--rose, #b5544a); }
.loops-empty { padding: 6px 4px; }
.loops-done { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.loops-done summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.loop-main { display: flex; align-items: center; gap: 10px; }
.loop-note { margin: 4px 0 2px 32px; }
.loop-note.hidden { display: none; }
.loop-note-ta { width: 100%; font-size: 13.5px; }
.loop-due { flex: none; font-size: 12px; color: var(--muted); background: var(--surf); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.loop-due.soon { color: var(--accent-deep); border-color: var(--accent-soft); background: var(--accent-soft); }
.loop-due-edit { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.loop-due-ta { width: auto; max-width: 150px; padding: 4px 9px; margin: 0; }
.loop-handle { flex: none; background: none; border: none; color: var(--faint); cursor: grab; font-size: 15px; line-height: 1; padding: 0 2px; touch-action: none; user-select: none; }
.loop-handle:hover { color: var(--muted); }
.loop-handle:active { cursor: grabbing; }
.loop-row.dragging { opacity: .65; background: var(--surf); box-shadow: 0 4px 12px rgba(42,33,27,.12); }
.loops-quiet { display: inline-block; color: var(--muted); font-size: 13px; padding: 10px 2px; text-decoration: none; }
.loops-quiet:hover { color: var(--accent-deep); }
.when-prompt { background: var(--sage-soft); border: 1px solid #cfe0d6; border-radius: 12px; padding: 11px 13px; margin-bottom: 12px; }
.when-prompt > span { display: block; margin-bottom: 8px; color: #2f5a47; }
.when-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.when-chips button { background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.when-chips button:hover { border-color: var(--sage); color: #2f5a47; }
.when-chips .when-skip { background: transparent; border-color: transparent; color: var(--muted); }
.when-chips .when-skip:hover { color: var(--ink); border-color: var(--line); }
.when-chips-detail { align-items: center; margin-bottom: 8px; }
.when-chips-detail > span { margin-right: 2px; }
.loop-note-btn { flex: none; background: none; border: none; cursor: pointer; font-size: 14px; opacity: .5; padding: 0 2px; border-radius: 6px; }
.loop-note-btn:hover, .loop-note-btn.has-note { opacity: 1; }
.loops-card.session-on { border-color: var(--sage); box-shadow: 0 4px 16px rgba(79,122,102,.14); }
.loop-sessions { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.loop-sessions h3 { font-family: var(--serif); font-size: 17px; margin: 0 0 2px; }
.sess-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surf); border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; margin-bottom: 6px; font-size: 13.5px; }
.sess-del { background: none; border: none; color: var(--faint); font-size: 16px; cursor: pointer; }
.sess-del:hover { color: var(--rose, #b5544a); }
.loop-sched { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.speak-btn:hover { border-color: var(--accent); }
.speak-btn.speaking { border-color: var(--accent); background: var(--accent-soft); }

/* media-kit personalization editor */
.kit-theme { background: var(--surf); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin-top: 6px; }
.kit-mini { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.palette-row { display: flex; gap: 8px; margin: 8px 0 12px; }
.palette-chip { width: 34px; height: 34px; border-radius: 9px; border: 2px solid var(--line2); cursor: pointer; padding: 0; }
.palette-chip.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pal-warm { background: linear-gradient(135deg, #FBF6EE 50%, #E0613C 50%); }
.pal-mono { background: linear-gradient(135deg, #F7F7F5 50%, #2B2B2B 50%); }
.pal-bold { background: linear-gradient(135deg, #F5F2FF 50%, #6C3DF4 50%); }
.pal-pastel { background: linear-gradient(135deg, #FFF1F5 50%, #E86A92 50%); }
.pal-dark { background: linear-gradient(135deg, #1F1B16 50%, #E0613C 50%); }
.kit-theme-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flair-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.flair-chip { background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.flair-chip:hover { border-color: var(--accent); }
.flair-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.kit-fl { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.kit-fl input[type=color] { width: 38px; height: 30px; padding: 2px; border-radius: 8px; margin: 0; cursor: pointer; }
.kit-fl select { width: auto; margin: 0; }
.kit-items { display: flex; flex-direction: column; gap: 7px; margin: 8px 0 12px; }
.kit-item { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 12px; }
.kit-item.is-hidden { opacity: .55; }
.kit-item.dragging { opacity: .4; }
.kit-item.drop-to { border-color: var(--accent); box-shadow: 0 -2px 0 var(--accent) inset; }
.kit-grip { cursor: grab; color: var(--faint); font-size: 16px; flex: none; user-select: none; }
.kit-label { flex: 1; font-weight: 600; font-size: 14px; }
.kit-eye { background: none; border: none; cursor: pointer; flex: none; padding: 2px; display: flex; align-items: center; color: var(--muted); }
.kit-eye:hover { color: var(--ink); }
.kit-eye svg { display: block; }
.kit-item.is-hidden .kit-eye { color: var(--faint); }
.kit-block { align-items: stretch; }
.kit-block-main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kit-block-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.kit-del { background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.kit-del:hover { color: var(--rose); }
.kit-block .kb-f { margin: 0; font-size: 14px; }
.fl-pick-row { display: flex; flex-wrap: wrap; gap: 5px; }
.fl-pick { background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--ink); min-width: 34px; }
.fl-pick:hover { border-color: var(--accent); }
.fl-pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.kit-add { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }

/* image / ornament block editor */
.kb-img-edit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-mini { display: inline-block; background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink); }
.btn-mini:hover { border-color: var(--accent); }
.kb-img-prev { display: flex; align-items: center; }
.kb-img-thumb { max-width: 72px; max-height: 72px; border-radius: 8px; border: 1px solid var(--line2); background: repeating-conic-gradient(var(--line2) 0% 25%, transparent 0% 50%) 50% / 14px 14px; }
.kb-img-hint { font-size: 12px; color: var(--faint); max-width: 360px; line-height: 1.5; }

/* live preview drawer */
.kit-preview { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw; z-index: 80; background: var(--surf); border-left: 1px solid var(--line2); box-shadow: -8px 0 30px rgba(42, 33, 27, .18); display: flex; flex-direction: column; }
.kit-preview-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line2); flex: none; }
.kit-preview-bar button { background: none; border: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); }
#kit-preview-frame { flex: 1; width: 100%; border: 0; background: var(--paper); }
#kit-preview-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 640px) { .kit-preview { width: 100vw; } }

/* Media-kit: suggested-stat chips + "where to find it" directions */
.stat-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 10px; }
.stat-suggest-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.stat-chip { background: var(--surf); border: 1px solid var(--line2); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.stat-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.stat-help { margin: 10px 0 4px; }
.stat-help > summary { cursor: pointer; color: var(--accent-deep); font-size: 13px; font-weight: 600; }
.stat-help-body { margin-top: 8px; padding: 11px 13px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.stat-help-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; }
.stat-help-body p:last-child { margin-bottom: 0; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sub { color: var(--muted); margin: 2px 0 0; font-size: 13px; }
a { color: var(--accent-deep); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h2 { margin: 0 0 6px; font-size: 24px; }
h3 { font-size: 18px; }

/* ---- buttons ---- */
.btn {
  font: inherit; font-weight: 600;
  border: 1px solid var(--line2);
  background: var(--raised);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .12s, box-shadow .12s, background .12s, border-color .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-deep); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--ink); }
.btn.tiny { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.danger { border-color: var(--rose); color: var(--rose); background: transparent; }

input, textarea, select {
  font: inherit; width: 100%;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 5px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 97, 60, .16);
}
label { display: block; margin: 13px 0; color: var(--muted); font-size: 13px; font-weight: 600; }

.error { background: var(--rose-soft); border: 1px solid var(--rose); color: #8a322d; padding: 10px 13px; border-radius: 10px; margin: 10px 0; font-weight: 500; }
.banner { background: var(--card); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; }
.banner.ok { border-color: var(--sage); background: var(--sage-soft); color: #2f5a47; }

/* ---- auth ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 392px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px 30px; box-shadow: var(--shadow); text-align: left; }
.auth-mascot { width: 76px; display: block; margin: 0 auto 6px; }
.logo { font-family: var(--serif); font-weight: 700; margin: 0; text-align: center; font-size: 30px; color: var(--ink); }
.logo .accent { color: var(--accent); }
.tagline { color: var(--muted); margin: 4px 0 20px; text-align: center; }
.switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth-card .btn.primary { width: 100%; margin-top: 10px; justify-content: center; }

/* ---- app shell ---- */
.topbar { display: flex; align-items: center; gap: 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: rgba(251,246,238,.9); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.tabs { display: flex; gap: 3px; flex: 1; }
.tab { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; }
.tab:hover { color: var(--ink); background: var(--surf); }
.tab.active { color: var(--accent-deep); background: var(--accent-soft); }
.tab-ico { display: none; }           /* icons only show in the mobile bottom bar */
.tl-short { display: none; }          /* desktop shows the full label */

.tab-panel { max-width: 820px; margin: 0 auto; padding: 26px 22px 70px; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }

/* ---- Today / stats ---- */
.stats-row { display: flex; gap: 12px; margin: 18px 0 24px; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.stat-val { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-won .stat-val { color: var(--sage); }
/* "Closed" deals are not failures — keep the count, drop the alarm colour. */
.stat-closed .stat-val { color: var(--muted); }

.today-group { margin-bottom: 24px; }
.today-group h3 { font-size: 15px; margin: 0 0 11px; display: flex; align-items: center; gap: 9px; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.today-group .gi { width: 16px; height: 16px; flex: none; }
.today-group .count { background: var(--surf); border: 1px solid var(--line2); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.today-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 17px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  margin-bottom: 9px; box-shadow: var(--shadow); border-left-width: 4px;
  transition: transform .12s, box-shadow .12s;
}
.today-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.today-card .pname { font-weight: 600; }
.today-card .pmeta { color: var(--muted); font-size: 13px; }
.today-card .grow { flex: 1; min-width: 0; }
.cta-hint { color: var(--accent-deep); font-size: 13px; font-weight: 600; white-space: nowrap; }
.g-now .today-card { border-left-color: var(--gold); }
.g-renew .today-card { border-left-color: var(--accent); }
.g-ready .today-card { border-left-color: var(--sage); }
.g-quiet .today-card { border-left-color: var(--line2); }
.inflight-note { margin-top: 4px; }

.empty { text-align: center; color: var(--muted); padding: 30px 20px; }
.empty .empty-mascot { width: 92px; opacity: .92; margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin: 4px 0 6px; }
.empty .btn { margin-top: 14px; }

/* ---- pipeline ---- */
.prospect-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.prospect { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.prospect:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.prospect .pname { font-weight: 600; }
.prospect .pmeta { color: var(--muted); font-size: 13px; }
.prospect .grow { flex: 1; min-width: 0; }
.prospect .pmeta a { color: var(--muted); }
.prospect.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft) inset, var(--shadow); }
.prospect.has-unread { border-color: var(--bh, #7a4820); }
.prospect .pprev { color: var(--muted); font-size: 12.5px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }

/* Partnerships master-detail: list (left) + conversation (right) */
/* Drill-in: full-width list, then a partnership opens into a back bar + a
   conversation-led / deal-beside workspace (shared-inbox pattern). */
.pp-split { margin-top: 18px; }
.pp-list-col .prospect-list { margin-top: 0; }
.pp-split:not(.viewing) .pp-conv-col { display: none; }
.pp-split.viewing .pp-list-col { display: none; }

.ws-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ws-id { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.ws-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.ws-conv, .ws-deal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.ws-colh { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; }
.conv-ava { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 18px; }
.conv-name { font-family: Fraunces, Georgia, serif; font-size: 19px; font-weight: 600; line-height: 1.2; }
.conv-sub { color: var(--muted); font-size: 13px; }
/* the inlined deal renders its own title/close row — hide it (header carries the name) */
#detailBody > .row:first-child { display: none; }
/* collapsible deal sections — compact the long scroll into an accordion */
.detail-section.collapsible > h4 { cursor: pointer; display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; user-select: none; }
.detail-section.collapsible > h4::after { content: '▸'; color: var(--muted); font-weight: 400; font-size: 13px; }
.detail-section.collapsible.open > h4 { margin-bottom: 10px; }
.detail-section.collapsible.open > h4::after { content: '▾'; }
.detail-section.collapsible:not(.open) > :not(h4) { display: none; }
@media (max-width: 920px) { .ws-split { grid-template-columns: 1fr; } .ws-conv { order: -1; } }
.cv-booking { margin: 14px 0; padding: 12px 14px; background: var(--accent-soft); border-radius: 11px; }
.cv-booking-head { font-size: 13px; font-weight: 600; color: var(--accent-deep); margin-bottom: 8px; }
.cv-booking-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-propose { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.cv-propose.hidden { display: none; }
.cv-propose input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; font: inherit; font-size: 12px; background: #fff; color: var(--ink); }
.cv-thread { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; max-height: 50vh; overflow-y: auto; padding: 4px; }
.cv-bub { max-width: 80%; padding: 8px 12px; border-radius: 13px; font-size: 14px; }
.cv-bub span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 1px; }
.cv-bub.them { background: var(--card); border: 1px solid var(--line); }
.cv-bub.me { background: var(--accent-soft); align-self: flex-end; }
.cv-bub.me span { text-align: right; }
.cv-sys { text-align: center; font-size: 12px; color: var(--muted); font-style: italic; }
.cv-empty-thread { color: var(--muted); font-size: 13px; padding: 8px; }
/* Creator-only record of an outbound pitch — distinct from chat bubbles. */
.cv-sent { align-self: stretch; background: var(--surf); border: 1px dashed var(--line2); border-left: 3px solid var(--accent); border-radius: 10px; padding: 9px 12px; }
.cv-sent-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.cv-private { font-weight: 600; color: var(--accent-deep); text-transform: none; letter-spacing: 0; }
.cv-sent-subj { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 5px; }
.cv-sent-body { font-size: 13.5px; color: #43392f; margin-top: 3px; white-space: pre-wrap; }
.cv-sent-meta { font-size: 11.5px; color: var(--faint); margin-top: 6px; }
.cv-reply { display: flex; gap: 8px; align-items: flex-end; }
.cv-reply textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; resize: vertical; background: #fff; color: var(--ink); }
.cv-reply textarea:focus { outline: none; border-color: var(--accent); }

.status-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.s-new { background: var(--surf); color: var(--muted); }
.s-researched { background: var(--accent-soft); color: var(--accent-deep); }
.s-emailed, .s-followed_up { background: #FBEFD3; color: #8a6320; }
.s-replied { background: var(--sage-soft); color: #2f5a47; }
.s-won { background: var(--sage); color: #fff; }
.s-dead { background: #ECE6DB; color: #7a7065; }
.due-flag { color: var(--gold); font-size: 12px; font-weight: 700; }
.row-remove { border: 1px solid transparent; background: transparent; color: var(--faint); border-radius: 8px; width: 28px; height: 28px; flex: none; cursor: pointer; font-size: 13px; line-height: 1; }
.row-remove:hover { border-color: var(--rose); color: var(--rose); }

/* ---- confirm contact / brand book ---- */
.contact-confirm { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; }
.btn.verified { border-color: var(--sage); color: var(--sage); background: var(--sage-soft); }
.known-contact { background: var(--sage-soft); border: 1px solid var(--sage); color: #2f5a47; border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; font-size: 13px; }

/* ---- discover ---- */
.discover-search { margin: 16px 0 8px; display: flex; gap: 10px; }
.discover-search input { margin-top: 0; }
.discover-search .btn { flex: none; }
#discoverNotes { margin-bottom: 14px; }
.cand-head { color: var(--muted); font-size: 13px; margin: 10px 0; }
.cand { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; margin-bottom: 9px; box-shadow: var(--shadow); }
.cand .grow { flex: 1; min-width: 0; }
.cand-name { font-weight: 600; }
.cand-why { color: var(--muted); font-size: 13px; margin: 1px 0 3px; }
.cand-links { font-size: 13px; }
.cand-links a { color: var(--accent-deep); text-decoration: none; }
.cand-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.cand-hide { border: 1px solid var(--line2); background: var(--card); color: var(--faint); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 14px; line-height: 1; }
.cand-hide:hover { border-color: var(--rose); color: var(--rose); }
#candMore { margin-top: 6px; }
.discover-manual { margin: 22px 0; }
.discover-manual summary { cursor: pointer; color: var(--accent-deep); font-weight: 600; }
.discover-manual[open] summary { margin-bottom: 10px; }

.discover-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.discover-links a { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); padding: 11px 15px; border-radius: 11px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.discover-links a:hover { border-color: var(--accent); }
.discover-links a span { color: var(--muted); font-size: 13px; }
.discover-tip { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px 18px; }
.discover-tip ol { padding-left: 18px; }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 14px 0; }
.form-grid .wide { grid-column: 1 / -1; }

/* ---- media kit editor ---- */
.mk-editor { display: flex; gap: 18px; align-items: flex-start; margin: 14px 0 4px; }
.mk-avatar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mk-avatar { width: 92px; height: 92px; border-radius: 50%; background: var(--surf) center/cover no-repeat; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 34px; color: var(--accent); }
.upload-btn { cursor: pointer; }
.mk-fields { flex: 1; }
.handle-row { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; margin-top: 5px; overflow: hidden; }
.handle-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224,97,60,.16); }
.handle-prefix { color: var(--muted); padding: 0 2px 0 12px; font-size: 14px; }
.handle-row input { border: none; box-shadow: none !important; margin: 0; padding-left: 4px; }
.mk-sub { margin: 26px 0 4px; }
#mk-links { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row input { margin: 0; }
.link-row .lr-label { flex: 1; }
.link-row .lr-url { flex: 2; }
.link-row .lr-del { border: 1px solid var(--line2); background: var(--card); color: var(--muted); border-radius: 8px; width: 34px; height: 38px; flex: none; cursor: pointer; font-size: 16px; }
.link-row .lr-del:hover { border-color: var(--rose); color: var(--rose); }
.link-row .sr-value { flex: 1; }
.link-row .sr-label { flex: 2; }
#mk-stats, #mk-samples { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.check-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; cursor: pointer; }
.check-row input { margin: 0; width: auto; flex: none; }
.sample-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--card); }
.sample-row .sr-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sample-row .sr-fields input { margin: 0; }
.sr-thumb-line { display: flex; gap: 10px; align-items: stretch; }
.sample-row .sr-thumb { flex: none; width: 54px; height: 72px; border-radius: 8px; background: var(--surf) center/cover no-repeat; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px; }
.sr-thumb-side { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; justify-content: center; }
.sr-thumb-controls { display: flex; gap: 8px; align-items: center; }
.sr-thumb-controls .sr-caption { flex: 1; min-width: 0; }
.sr-thumb-hint { font-size: 11px; line-height: 1.3; }
.sample-row .upload-btn { flex: none; }
.sample-row.sr-loading .sr-thumb { opacity: .4; }
.sample-row .lr-del { border: 1px solid var(--line2); background: var(--card); color: var(--muted); border-radius: 8px; width: 34px; height: 38px; flex: none; cursor: pointer; font-size: 16px; }
.sample-row .lr-del:hover { border-color: var(--rose); color: var(--rose); }
/* sticky media-kit header: heading + Save/View/Copy stay pinned below the topbar
   (--topbar-h is kept in sync by JS since the topbar nav wraps at some widths). */
.mk-header { position: sticky; top: var(--topbar-h, 56px); z-index: 5; display: flex; flex-direction: column; gap: 8px; background: var(--paper); padding: 10px 0; margin: -4px 0 10px; border-bottom: 1px solid var(--line); }
.mk-header-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.mk-header h2 { margin: 0; }
.mk-header .banner { margin: 0; }
.mk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }

/* ---- modals ---- */
.modal-wrap { position: fixed; inset: 0; background: rgba(42,33,27,.42); display: grid; place-items: center; padding: 20px; z-index: 50; backdrop-filter: blur(2px); }
.modal { background: var(--paper); border: 1px solid var(--line2); border-radius: 18px; padding: 24px; width: 100%; max-width: 448px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lift); }
.modal:focus { outline: none; } /* dialog gets focus for a11y context, not a visible box */
.modal.wide { max-width: 660px; }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.detail-section { margin: 16px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-section h4 { margin: 0 0 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.research-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 14px; }
.email-chip { display: inline-block; background: var(--surf); border: 1px solid var(--line2); padding: 3px 10px; border-radius: 20px; margin: 3px 4px 3px 0; font-size: 13px; cursor: pointer; }
.email-chip:hover { border-color: var(--accent); }
.pitch-output { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 14px; margin-top: 10px; }
.pitch-subject { font-weight: 700; margin-bottom: 8px; }
/* Inline-editable pitch fields: look like the rendered text until focused. */
.pitch-edit { outline: none; border-radius: 5px; transition: box-shadow .12s, background .12s; }
.pitch-edit:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.pitch-edit:focus { background: var(--raised); box-shadow: 0 0 0 2px rgba(192,86,46,.18); }
#pitch-read.pitch-edit { display: block; margin: 0 -4px; padding: 4px; min-height: 2em; }
#pitch-subj.pitch-edit { padding: 1px 4px; }
.pitch-edit-hint { margin: 6px 2px 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spinner { color: var(--muted); font-style: italic; }

/* Pip working-loader + celebration toast */
.mascot-load { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 6px 0; }
.mascot-load img { height: 42px; width: auto; animation: pip-bob 1.7s ease-in-out infinite; }
@keyframes pip-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-3deg); } }
.mascot-load .dots i { animation: pip-blink 1.4s infinite; opacity: .2; font-weight: 700; }
.mascot-load .dots i:nth-child(2) { animation-delay: .2s; }
.mascot-load .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pip-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.celebrate { position: fixed; left: 50%; top: 28%; transform: translate(-50%, -12px); background: var(--card); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow-lift); padding: 20px 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; opacity: 0; transition: opacity .35s, transform .35s; text-align: center; font-family: var(--serif); font-size: 18px; font-weight: 600; pointer-events: none; }
.celebrate img { width: 88px; }
.celebrate.show { opacity: 1; transform: translate(-50%, 0); }
/* Calm post-send affirmation — gentler than .celebrate, longer dwell, readable. */
.reassure { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); z-index: 100; display: flex; align-items: center; gap: 13px; width: min(440px, calc(100vw - 28px)); box-sizing: border-box; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 14px 16px; opacity: 0; transition: opacity .35s, transform .35s; }
.reassure.show { opacity: 1; transform: translate(-50%, 0); }
.reassure img { height: 50px; width: auto; flex: none; }
.reassure-body { flex: 1; }
.reassure-title { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--ink); }
.reassure-sub { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 2px; }
.reassure-x { flex: none; align-self: flex-start; background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }

@media (prefers-reduced-motion: reduce) { .mascot-load img, .celebrate, .reassure { animation: none; transition: opacity .2s; } }

/* ---- timeline ---- */
.log-row { gap: 8px; margin-bottom: 10px; }
.log-row input { margin-top: 0; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tl-item:last-child { border-bottom: none; }
.tl-icon { width: 18px; text-align: center; flex-shrink: 0; }
.tl-body { flex: 1; }
.tl-note .tl-body { color: var(--ink); font-weight: 500; }
.tl-auto .tl-body { color: var(--muted); }
.tl-time { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* ---- quick actions + outcome ---- */
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.qa-won { border-color: var(--sage); color: var(--sage); }
.qa-lost { border-color: var(--rose); color: var(--rose); }
.outcome-form { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.outcome-title { font-weight: 700; margin-bottom: 4px; }
.closed-note { border-radius: 10px; padding: 9px 13px; margin: 10px 0 0; font-weight: 600; }
.closed-note.won { background: var(--sage-soft); color: #2f5a47; }
.closed-note.lost { background: #EFEAE1; color: #6a6155; }

/* ---- quote builder ---- */
.quote-addons { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.q-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 6px 0; font-weight: 500; color: var(--ink); }
.q-row span { flex: 1; }
.q-row em { color: var(--faint); font-style: normal; font-size: 12px; margin-left: 6px; }
.q-row input[type="number"] { width: 92px; margin: 0; }
.q-row.q-chk { justify-content: flex-start; }
.q-row.q-chk input { width: auto; margin: 0 8px 0 0; }
.quote-breakdown { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-top: 10px; }
.q-line { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; color: var(--muted); }
.q-line:first-child { color: var(--ink); }
.quote-total { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-top: 8px; text-align: right; color: var(--accent-deep); }

/* ---- right-contact helper ---- */
.contact-helper { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.role-links { font-size: 13px; color: var(--muted); margin-top: 8px; }
.role-links a { display: inline-block; background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 3px 11px; margin: 4px 6px 0 0; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--ink); }
.role-links a:hover { border-color: var(--accent); }

/* ---- send + fair pay ---- */
.send-note { margin-top: 8px; font-size: 13px; color: var(--sage); font-weight: 600; }
.warn-inline { color: var(--accent-deep); font-weight: 600; }

/* "Just start" — break a task into tiny steps (task-initiation aid) */
.breakdown-box { margin: 8px 0 0; }
.breakdown-result { background: var(--accent-soft); border-radius: 10px; padding: 11px 13px; margin-top: 8px; }
.bd-task { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.bd-step { display: flex; gap: 9px; align-items: flex-start; padding: 5px 0; font-size: 14px; line-height: 1.4; cursor: pointer; }
.bd-step input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.bd-step.done span { text-decoration: line-through; color: var(--muted); }

/* One-tap invoice at the win moment (admin-avoidance aid) */
.won-invoice-cta { background: var(--sage-soft); border-radius: 10px; padding: 11px 13px; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.won-invoice-cta > span { font-weight: 600; color: #2f5a47; }

/* Focus mode — one thing, everything else hidden */
.focus-on #statsRow, .focus-on #todayProduction, .focus-on #todayMoney { display: none; }
#focusToggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.focus-card { background: var(--card); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 28px 24px; text-align: center; max-width: 460px; margin: 24px auto; }
.focus-card.calm { padding-top: 20px; }
.focus-card .empty-mascot { width: 64px; margin-bottom: 4px; }
.focus-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--muted); }
.focus-name { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); margin: 6px 0 2px; }
.focus-reason { color: var(--muted); margin-bottom: 18px; }
.focus-card .btn.primary { font-size: 16px; padding: 11px 22px; }
.focus-foot { margin-top: 14px; }

/* Scam gut-check */
#scam-text { width: 100%; resize: vertical; }
.scam-result { border-radius: 10px; padding: 12px 14px; margin-top: 12px; border: 1px solid var(--line2); }
.scam-result.risk-low { background: var(--sage-soft); border-color: #bfd8c8; }
.scam-result.risk-medium { background: var(--gold-soft); border-color: #E9C77A; }
.scam-result.risk-high { background: var(--rose-soft); border-color: var(--rose); }
.scam-verdict { font-family: var(--serif); font-weight: 600; font-size: 18px; margin-bottom: 6px; }
.risk-low .scam-verdict { color: #2f5a47; }
.risk-medium .scam-verdict { color: #8a6320; }
.risk-high .scam-verdict { color: #8a322d; }
.scam-bb { background: var(--sage-soft); border-radius: 8px; padding: 6px 10px; font-size: 13px; margin-bottom: 8px; color: #2f5a47; }
.scam-flags { margin-top: 4px; }
.scam-flags ul { margin: 4px 0 0; padding-left: 18px; }
.scam-flags li { margin: 2px 0; }
.scam-advice { margin-top: 8px; font-weight: 600; }

/* Usage-rights educational header in the quote builder */
.usage-rights-head { margin: 14px 0 4px; padding: 9px 11px; background: var(--gold-soft); border-radius: 9px; }
.usage-rights-head strong { display: block; color: #8a6320; font-size: 14px; }
.usage-rights-head span { display: block; margin-top: 2px; }

/* Long-overdue invoice escalation (the shame is on the brand, not the creator) */
.due-flag.bad { background: var(--rose-soft); color: #8a322d; }
.money-note { margin: 8px 4px 2px; }
.fairpay { background: var(--surf); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; margin-bottom: 12px; font-size: 13px; }
.fairpay-mine { font-weight: 600; color: var(--ink); }
.fairpay-bench { color: var(--muted); margin-top: 3px; }

/* ---- contract scanner ---- */
.scan-ok { background: var(--sage-soft); border: 1px solid var(--sage); color: #2f5a47; padding: 10px 13px; border-radius: 10px; margin-top: 10px; }
.flag { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; padding: 10px 13px; margin-top: 8px; background: var(--card); }
.flag-high { border-left-color: var(--rose); }
.flag-medium { border-left-color: var(--gold); }
.flag-low { border-left-color: var(--line2); }
.flag-head { font-weight: 600; }
.sev-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-right: 6px; }
.sev-high { background: var(--rose-soft); color: #8a322d; }
.sev-medium { background: #FBEFD3; color: #8a6320; }
.sev-low { background: var(--surf); color: var(--muted); }
.flag-why { color: var(--muted); font-size: 14px; margin-top: 4px; }
.flag-ask { color: var(--accent-deep); font-size: 14px; margin-top: 6px; }
.scan-note { margin-top: 10px; }

/* ---- day picker + overrides ---- */
.day-picker { display: flex; gap: 8px; margin-top: 6px; }
.day-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card); color: var(--muted); font-weight: 700; cursor: pointer; }
.day-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ov-item { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; margin: 6px 0; font-size: 14px; }
.ov-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; }
.ov-del:hover { color: var(--rose); }
#calFeedUrl { font-size: 13px; color: var(--muted); }

/* ---- deliverables ---- */
.deliv { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
.deliv-row { display: flex; gap: 8px; align-items: center; }
.deliv-row input, .deliv-row select { margin: 0; }
.dv-title { flex: 2; }
.dv-due { flex: 1; min-width: 130px; }
.dv-status { flex: 1; min-width: 110px; }
.dv-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; flex: none; }
.dv-del:hover { color: var(--rose); }
.deliv-plan { font-size: 13px; color: var(--muted); margin-top: 6px; }
.deliv-plan .tight { color: var(--accent-deep); font-weight: 600; }
.deliv-add { margin-top: 8px; }

/* ---- calendar ---- */
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav h2 { margin: 0; min-width: 180px; }
.cal-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 14px 0; align-items: center; }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.cal-legend .dot.film { background: #C98A2E; }
.cal-legend .dot.edit { background: var(--sage); }
.cal-legend .dot.off { background: #C9BFB3; }
.cal-legend .chip-eg { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 5px; margin-right: 4px; }
.chip-eg.film { background: #FBEFD3; color: #8a6320; }
.chip-eg.edit { background: var(--sage-soft); color: #2f5a47; }
.chip-eg.due { background: var(--accent-soft); color: var(--accent-deep); }
.chip-eg.ev { background: #ECEAF6; color: #4a4170; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-cell { background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 78px; padding: 4px; overflow: hidden; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cal-cell:not(.empty):hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft) inset; }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.is-film { background: #FCF4E2; }
.cal-cell.is-edit { background: #EAF2EC; }
.cal-cell.is-off { background: #F1ECE8; }
.cal-cell.is-off .cal-date { color: #a99e90; }
.cal-cell.is-today { outline: 2px solid var(--accent); }
.cal-date { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-item { font-size: 11px; padding: 1px 4px; border-radius: 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-item.film { background: #FBEFD3; color: #8a6320; }
.cal-item.edit { background: var(--sage-soft); color: #2f5a47; }
.cal-item.due { background: var(--accent-soft); color: var(--accent-deep); cursor: grab; }
.cal-item.ev { background: #ECEAF6; color: #4a4170; cursor: grab; }
.cal-item.due:active, .cal-item.ev:active { cursor: grabbing; }
.cal-item.dragging { opacity: .4; }
.cal-cell.drop-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: var(--accent-soft); }

/* calendar header actions + mark-days entry button */
.cal-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#calMarkToggle.active, #calMaxToggle.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }

/* maximized calendar — full-bleed width + roomy cells so entries read easily */
#tab-calendar.cal-maxed { max-width: none; }
#tab-calendar.cal-maxed .cal-grid { gap: 6px; }
#tab-calendar.cal-maxed .cal-cell { min-height: calc((100vh - 280px) / 6); padding: 7px; }
#tab-calendar.cal-maxed .cal-date { font-size: 14px; }
#tab-calendar.cal-maxed .cal-item { font-size: 12.5px; line-height: 1.35; white-space: normal; padding: 3px 7px; margin-top: 3px; }

/* paint-mode toolbar: pick a type, then tap days to mark them */
/* Schedule settings panel (moved from Settings into the Calendar tab) */
.cal-schedule { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 6px 0 16px; box-shadow: var(--shadow); }
.cal-schedule .cal-sched-title { font-family: var(--serif); font-size: 18px; margin: 0 0 4px; }
.cal-schedule label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.cal-schedule .mk-sub { font-size: 15px; }

.cal-paint { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 8px; }
.cal-paint-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.paint-chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.paint-chip:hover { border-color: var(--accent); }
.paint-chip.on { box-shadow: 0 0 0 2px currentColor inset; border-color: transparent; }
.paint-chip.film.on { background: #FCF4E2; color: #8a6320; }
.paint-chip.edit.on { background: #EAF2EC; color: #2f5a47; }
.paint-chip.skip.on { background: #f1ece8; color: #6a5d52; }
.paint-chip.done { margin-left: auto; background: var(--sage); border-color: var(--sage); color: #fff; }
.paint-chip.done:hover { border-color: var(--sage); filter: brightness(1.05); }
.cal-grid.painting .cal-cell:not(.empty) { cursor: copy; }
.cal-grid.painting .cal-cell:not(.empty):hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }

/* drop-to-delete zone (appears while dragging an event) */
.cal-trash { border: 2px dashed var(--line); border-radius: 8px; padding: 10px; text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0; background: var(--card); transition: border-color .12s, background .12s, color .12s; }
.cal-trash.over { border-color: #c0392b; color: #c0392b; background: #fbeae8; }

/* day popover: pin/manage events (day-typing now lives in the paint toolbar) */
.day-events { display: flex; flex-direction: column; gap: 8px; }
.day-ev { background: #F4F2FA; border: 1px solid #E1DCEF; border-radius: 8px; padding: 8px; font-size: 13px; }
.day-ev.is-done { opacity: .62; }
.day-ev.is-done .day-ev-title { text-decoration: line-through; }
.day-ev-r1 { display: flex; align-items: center; gap: 8px; }
.day-ev-r2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.day-ev-title { flex: 1; min-width: 0; margin: 0; font-size: 13px; font-weight: 600; padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); }
.day-ev-done { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #4a4170; white-space: nowrap; cursor: pointer; }
.day-ev-done input { margin: 0; }
.dv-mini { display: flex; flex-direction: column; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #8079a0; gap: 2px; }
.dv-mini input, .dv-mini select { margin: 0; font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400; }
.day-ev-note { width: 100%; margin-top: 6px; font-size: 12px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); resize: vertical; box-sizing: border-box; }
.dv-note { margin: 6px 0 0; }
#dayEvTime { width: 116px; }
.day-ev-del { border: none; background: none; color: #4a4170; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .65; }
.day-ev-del:hover { opacity: 1; }

/* calendar item states: done / past events fade; multi-day continuation is lighter */
.cal-item.done { opacity: .55; text-decoration: line-through; }
.cal-item.ev.past { opacity: .5; }
.cal-item.ev.cont { opacity: .8; font-style: italic; }
.cal-item.book { background: #E6F0F3; color: #27576a; }
.cal-item.book.tentative { background: repeating-linear-gradient(45deg, #eef5f7, #eef5f7 5px, #dfeaef 5px, #dfeaef 10px); color: #3a6678; border: 1px dashed #8fb2bf; }
.ag-chip.book { background: #E6F0F3; color: #27576a; }
.ag-chip.book.tentative { border: 1px dashed #8fb2bf; }

/* Today tab unread badge + inbound requests */
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.requests { background: #FFF6EF; border: 1px solid var(--accent); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }
.req-head { margin: 0 0 10px; font-size: 15px; }
.req-head .count { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 6px; }
.req-card { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.req-card:last-child { margin-bottom: 0; }
.req-card.is-off { border-color: #e0b48a; }
.req-main { min-width: 0; flex: 1; }
.req-title { font-weight: 600; font-size: 14px; }
.req-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.req-note { font-size: 13px; color: var(--ink); margin-top: 5px; white-space: pre-wrap; word-break: break-word; }
.req-contact { font-size: 12px; color: var(--muted); margin-top: 5px; }
.req-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.req-contact a { color: var(--accent); text-decoration: none; }
.req-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-left: 4px; }
.req-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 10px; vertical-align: middle; margin-left: 4px; }
.req-tag.ok { background: #E2EFE7; color: #2f5a47; }
/* per-booking negotiation thread (creator side) */
.bk-thread { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.bk-msgs { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; margin-bottom: 8px; }
.bk-bub { max-width: 85%; padding: 7px 10px; border-radius: 11px; font-size: 13px; }
.bk-bub span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 1px; }
.bk-bub.them { background: var(--paper); border: 1px solid var(--line); }
.bk-bub.me { background: #FBEAE0; align-self: flex-end; }
.bk-bub.me span { text-align: right; }
.bk-sys { text-align: center; font-size: 11.5px; color: var(--muted); font-style: italic; }
.bk-empty { color: var(--muted); font-size: 12px; }
.bk-reply { display: flex; gap: 6px; align-items: flex-end; }
.bk-reply textarea { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 13px; resize: vertical; background: #fff; color: var(--ink); }
.bk-reply textarea:focus { outline: none; border-color: var(--accent); }
.bk-propose { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.bk-propose-lbl { font-size: 12px; color: var(--muted); }
.bk-propose input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; font: inherit; font-size: 12px; background: #fff; color: var(--ink); }
@media (max-width: 600px) { .req-card { flex-direction: column; } .req-actions { flex-direction: row; flex-wrap: wrap; } }

/* agenda (list) view */
.cal-agenda { display: flex; flex-direction: column; gap: 2px; }
.ag-day { display: flex; gap: 14px; padding: 10px 8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.ag-day:hover { background: var(--surf); }
.ag-date { flex: 0 0 96px; font-weight: 700; color: var(--ink); font-size: 13px; }
.ag-items { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.ag-row { font-size: 13px; color: var(--ink); }
.ag-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 5px; margin-right: 6px; }
.ag-chip.film { background: #FBEFD3; color: #8a6320; }
.ag-chip.edit { background: var(--sage-soft); color: #2f5a47; }
.ag-chip.due { background: var(--accent-soft); color: var(--accent-deep); }
.ag-chip.ev { background: #ECEAF6; color: #4a4170; }
.ag-chip.ev.done { opacity: .6; text-decoration: line-through; }

/* linked dates in the brand detail modal */
.linked-ev { display: flex; gap: 10px; padding: 4px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.linked-ev.past { opacity: .55; }
.linked-ev.done { opacity: .6; text-decoration: line-through; }
.linked-ev .le-date { flex: 0 0 130px; color: var(--muted); font-weight: 600; }
.linked-ev .le-title { flex: 1; color: var(--ink); }

/* Today tab — calendar-event reminder group */
.today-group.g-event h3 .count { background: #ECEAF6; color: #4a4170; }
.today-card.ev-card { cursor: pointer; }

/* due-date move confirmation toast (with Undo) */
.cal-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); background: var(--ink); color: #fff; border-radius: 10px; padding: 11px 12px 11px 16px; box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 13.5px; line-height: 1.4; }
.cal-toast.warn { background: #8a2f23; }
.cal-toast-msg { flex: 1; }
.cal-toast-msg strong { font-weight: 600; }
.cal-toast-undo { flex: none; background: rgba(255,255,255,.16); color: #fff; border: none; border-radius: 6px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cal-toast-undo:hover { background: rgba(255,255,255,.28); }
.cal-toast-x { flex: none; background: none; border: none; color: rgba(255,255,255,.7); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.cal-toast-x:hover { color: #fff; }

/* invoices + earnings */
.earnings { display: flex; gap: 22px; margin: 10px 0 4px; font-size: 14px; color: var(--muted); }
.earnings strong { color: var(--ink); font-family: var(--serif); font-size: 17px; }
.inv { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.inv-head { display: flex; justify-content: space-between; align-items: center; }
.inv-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; }
.inv-del:hover { color: var(--rose); }
.iv-nudge-out { margin-top: 8px; }

/* reputation */
.rep-circle { border-radius: 9px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }
.rep-circle.caution { background: var(--rose-soft); border: 1px solid var(--rose); color: #8a322d; }
.rep-circle.good { background: var(--sage-soft); border: 1px solid var(--sage); color: #2f5a47; }
.rep-circle ul { margin: 6px 0 0; padding-left: 18px; }
.rep-pay { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rep-form { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.rep-form-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.rep-badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.rep-badge.caution { background: var(--rose-soft); color: #8a322d; }
.rep-badge.good { background: var(--sage-soft); color: #2f5a47; }

/* negotiation + assessment */
.assessment { background: var(--accent-soft); border: 1px solid var(--bh, var(--accent)); border-radius: 9px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }

/* testimonials */
.tmon { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
.tmon-q { font-size: 14px; margin-bottom: 6px; }
.tm-show { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: 0; white-space: nowrap; }
.tm-show input { width: auto; margin: 0; }
.tm-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; }
.tm-del:hover { color: var(--rose); }

/* deliverable handoff + insights */
.deliv-deliver { margin-top: 6px; }
.insight-tips { margin-top: 16px; }
.insight-tips p { margin: 6px 0; }

/* overdue batch banner + Today quick-advance */
/* Reschedule prompt — warm/calm, NOT an alarm. Slipping a date is normal;
   the banner invites a fix rather than shaming the miss. */
.reschedule-banner { background: var(--gold-soft); border: 1px solid #E9C77A; border-radius: 10px; padding: 10px 13px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reschedule-banner strong { color: #8a6320; margin-right: 2px; }
.resched-hint { color: #9a7b3c; font-size: 12px; flex-basis: 100%; margin: -2px 0 2px; }
.od-item { background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; }
.od-item:hover { border-color: var(--gold); }
.prod-act { flex: none; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .cal-cell { min-height: 56px; }
  .cal-item { font-size: 9px; }
  .cal-nav h2 { min-width: 120px; font-size: 18px; }
  .deliv-row { flex-wrap: wrap; }
  .day-btn { width: 36px; height: 36px; }

  /* Top bar carries just the brand + sign-out; the tabs move to a fixed
     bottom bar (phone-native nav). */
  /* NOTE: backdrop-filter on .topbar would make it the containing block for the
     fixed bottom .tabs (anchoring it to the topbar, not the viewport) — disable it. */
  .topbar { gap: 10px; padding: 10px 16px; justify-content: space-between; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .brand-name { display: inline; }

  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; gap: 0; flex: none;
    background: rgba(251,246,238,.97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 14px rgba(42,33,27,.07);
  }
  .tab {
    position: relative; flex: 1; min-width: 0;
    flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 2px; border-radius: 12px; color: var(--muted);
  }
  .tab:hover { background: none; color: var(--muted); }
  .tab.active { background: none; color: var(--accent-deep); }
  .tab.active::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent);
  }
  .tab-ico { display: block; width: 23px; height: 23px; flex: none; }
  .tab-label { font-size: 10px; line-height: 1; white-space: nowrap; }
  .tl-long { display: none; }
  .tl-short { display: inline; }
  .tab-badge { position: absolute; top: 2px; left: 50%; margin-left: 5px; }

  .tab-panel { padding: 18px 14px calc(78px + env(safe-area-inset-bottom)); }
  /* heading and its action buttons stack rather than crowd one line */
  .panel-head { flex-wrap: wrap; align-items: flex-start; }
  .panel-head > .row { width: 100%; }

  .stats-row { gap: 8px; }
  .stat { padding: 11px 12px; min-width: 0; }
  .mk-editor { flex-direction: column; align-items: center; text-align: center; }
  .mk-fields { width: 100%; text-align: left; }

  /* workspace header: back + status on row 1, the name block gets its own full
     row below so the name fits on one line and the email truncates cleanly */
  .ws-bar { flex-wrap: wrap; align-items: center; gap: 12px; }
  #wsBack { order: 0; }
  .ws-bar .status-pill { order: 1; margin-left: auto; }
  .ws-id { order: 2; flex-basis: 100%; }
  .ws-id > div { min-width: 0; }
  .conv-name { overflow-wrap: anywhere; }
  .conv-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
}

/* ---- Admin tab (owner only) ---- */
.admin-cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 18px; }
.admin-cards .ac { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; min-width: 120px; box-shadow: var(--shadow); }
.admin-cards .ac-n { font-family: Fraunces, Georgia, serif; font-size: 26px; font-weight: 600; color: var(--accent-deep); }
.admin-cards .ac-l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.admin-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.admin-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.admin-invite { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; flex-wrap: wrap; }
.admin-invite .ai-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.admin-invite .ai-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 600; color: var(--accent-deep); background: var(--paper); padding: 2px 8px; border-radius: 6px; }
.admin-h { font-family: Fraunces, Georgia, serif; font-size: 18px; margin: 22px 0 10px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-invites { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 6px 14px; }
.invreq { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.invreq-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.invreq-email { font-weight: 600; }
.invreq-note { color: var(--muted); font-style: italic; }
.invreq-acts { display: inline-flex; gap: 6px; flex-shrink: 0; }
.invreq-manual { display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; flex-wrap: wrap; }
.invreq-manual input { flex: 1; min-width: 220px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 14px; }
.invreq-manual input:focus { outline: none; border-color: var(--accent); }

/* ---- referral / invite ---- */
.ref-note { background: var(--sage-soft); border: 1px solid var(--sage); color: #2f5a47; border-radius: 9px; padding: 9px 12px; font-size: 13.5px; margin: 8px 0 0; }
.invite-linkrow { display: flex; gap: 8px; align-items: center; margin-top: 12px; max-width: 520px; }
.invite-linkrow input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }

/* ---- first-run onboarding checklist (Today empty state) ---- */
.onb-checklist { list-style: none; margin: 18px auto 0; padding: 0; max-width: 460px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.onb-checklist li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.onb-checklist li.done { opacity: .72; }
.onb-tick { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.onb-checklist li.done .onb-tick { background: var(--sage); color: #fff; }
.onb-text { flex: 1; min-width: 0; }

/* ---- "ask for a code" request form (signup) ---- */
.ask-code-form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ask-code-form input { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.ask-code-form input:focus { outline: none; border-color: var(--accent); }

/* ---- Gmail "send as me" connect panel (Settings → Pitch & rates) ---- */
.gmail-connect { margin: 10px 0 4px; }
.gmail-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--surf); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
.gmail-card.on { background: var(--sage-soft); border-color: #bcd9c8; }
.gmail-card.off { background: var(--surf); border-style: dashed; }
.gmail-status { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.gmail-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(79,122,102,.18); }
.gmail-acts { display: flex; gap: 6px; flex-wrap: wrap; }
/* creator-side "what to expect before you connect" walkthrough */
.gmail-expect { background: var(--surf); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-top: 10px; }
.gmail-expect-h { font-weight: 600; font-size: 13.5px; margin: 0 0 6px; color: var(--ink); }
.gmail-expect-list { margin: 0; padding-left: 20px; font-size: 13.5px; color: #43392f; line-height: 1.55; }
.gmail-expect-list li { margin-bottom: 5px; }

/* ---- owner Gmail setup WIZARD (Admin tab) ---- */
.gx-status { font-size: 14px; padding: 10px 13px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); margin-bottom: 10px; }
.gx-status.ok { background: var(--sage-soft); border-color: #bcd9c8; color: #2f5a46; }
.gx-steps { list-style: none; counter-reset: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gx-step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.gx-step-h { display: flex; align-items: center; gap: 10px; font-size: 14.5px; margin-bottom: 8px; }
.gx-num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.gx-open { margin-bottom: 8px; }
.gx-sub { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: #43392f; line-height: 1.55; }
.gx-sub li { margin-bottom: 5px; }
.gx-copy { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--surf); border: 1px solid var(--line2); border-radius: 8px; padding: 3px 6px 3px 9px; margin-top: 3px; max-width: 100%; }
.gx-copy code { font-size: 12px; word-break: break-all; color: var(--ink); }
.gx-trouble { margin-top: 12px; padding: 10px 13px; background: var(--gold-soft); border: 1px solid #e9d6a8; border-radius: 10px; line-height: 1.5; }
.gx-trouble code { background: rgba(0,0,0,.05); padding: 1px 4px; border-radius: 4px; }

/* ---- pitch open/click tracking line (deal detail) ---- */
.track-line { margin-top: 8px; }
.track-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.track-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; background: var(--surf); border: 1px solid var(--line2); color: var(--muted); }
.track-badge.on { background: var(--sage-soft); border-color: #bcd9c8; color: #2f5a46; }
.track-hint { margin: 6px 0 0; }
.ok-inline { color: #2f5a46; }
