/* One calm column on warm paper with one deep rose accent. Phone first: tabs sit at the bottom on a
   phone and in the top bar on a laptop; the Tell Tiffany composer sits just above the phone tabs. */
[hidden] { display: none !important; }
:root {
  --bg: #fbf8f4; --surface: #ffffff; --ink: #2a2522; --muted: #6f655e; --line: #ebe3da;
  --accent: #8a3b4a; --accent-ink: #ffffff; --good: #2f6b4f; --soft: #f3ece4; --danger: #a33a2e; --warn: #9a5b12;
  --c-weddings: #ad2d5c; --c-marquette: #3b6fc4; --c-consults: #2f8a5b; --c-personal: #7c7f8c; --c-main: #b59a7a;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabbar: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1817; --surface: #24201e; --ink: #f1ebe5; --muted: #b3a89f; --line: #39322e;
          --accent: #e3a0ad; --accent-ink: #2a1418; --good: #8fd1b0; --soft: #2d2724; --danger: #f2a093; --warn: #f0c27a;
          --c-weddings: #e58aa9; --c-marquette: #8fb3f0; --c-consults: #8fd1b0; --c-personal: #b3b6c2; --c-main: #d8c0a2;
          color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* top bar */
.top { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { font: 600 1.2rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 10px; }
select, input[type=text], input[type=file], textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; }
select:focus-visible, input:focus-visible, button:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; cursor: pointer; color: inherit; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 600; }
.primary:disabled { opacity: .6; cursor: wait; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 500; }
.link { background: none; border: 0; color: var(--muted); padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }

/* tabs: top bar on wide screens, bottom bar on phones */
.tabs { display: flex; gap: 2px; }
.tab { background: none; border: 0; padding: 8px 10px; color: var(--muted); font-weight: 500; border-radius: 8px; display: flex; align-items: center; gap: 6px; }
.tab[aria-selected=true] { color: var(--ink); background: var(--soft); }
.ti { font-size: .9rem; opacity: .8; }
@media (max-width: 720px) {
  :root { --tabbar: calc(58px + env(safe-area-inset-bottom)); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line);
          justify-content: space-around; padding: 4px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left)); }
  .tab { flex-direction: column; gap: 0; font-size: .72rem; padding: 6px 8px; min-width: 64px; }
  .tab[aria-selected=true] { background: none; color: var(--accent); }
  .ti { font-size: 1.15rem; }
  .who select { max-width: 9.5rem; }
  .who .link { white-space: nowrap; font-size: .9rem; }
}

.hero { padding: 12vh 0 8vh; max-width: 34rem; }
h1 { font: 600 clamp(2rem, 6vw, 2.8rem)/1.1 var(--display); margin: 0 0 14px; text-wrap: balance; }
.lede { font-size: 1.1rem; color: var(--muted); margin: 0 0 26px; }
.fine { font-size: .82rem; color: var(--muted); margin-top: 18px; }
h2 { font: 600 1.6rem/1.2 var(--display); margin: 0 0 4px; text-wrap: balance; }
h3 { font: 600 1.1rem/1.3 var(--display); margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0; max-width: 40rem; }
.view { padding-top: 22px; padding-bottom: calc(var(--tabbar) + 120px); }
.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }

/* Today */
.greet { margin-bottom: 18px; }
.zone { margin: 0 0 26px; }
.zh { font: 600 .78rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 3px 8px; font-size: .72rem; letter-spacing: 0; }
.count:empty { display: none; }
.need { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.need.problem { border-left-color: var(--warn); }
.need.note.low { border-left-color: var(--line); }
.need .t { font-weight: 600; overflow-wrap: anywhere; }
.need .d { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.need .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.need .acts a { color: var(--accent); font-weight: 600; text-decoration: none; padding: 8px 4px; }
.calm { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; margin: 0; }
.booking { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.booking .when { font: 600 1.25rem/1.2 var(--display); }
.booking .when small { font: 500 .85rem var(--body); color: var(--muted); margin-left: 6px; }
.bk { display: grid; gap: 3px; padding-left: 12px; border-left: 3px solid var(--c-main); }
.bk.weddings { border-left-color: var(--c-weddings); } .bk.marquette { border-left-color: var(--c-marquette); }
.bk .t { font-weight: 600; }
.bk .d { color: var(--muted); font-size: .9rem; }
.gap { color: var(--warn); font-size: .88rem; font-weight: 500; }
.ok { color: var(--good); font-size: .88rem; }
.following { color: var(--muted); font-size: .9rem; margin: 10px 2px 0; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.agenda li { display: grid; grid-template-columns: 4.6rem 1fr; gap: 10px; align-items: baseline; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.agenda li:last-child { border-bottom: 0; }
.agenda .tm { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.agenda .ev { min-width: 0; overflow-wrap: anywhere; }
.agenda .ev small { display: block; color: var(--muted); font-size: .82rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-main); margin-right: 7px; vertical-align: 1px; }
.dot.weddings { background: var(--c-weddings); } .dot.marquette { background: var(--c-marquette); }
.dot.consults { background: var(--c-consults); } .dot.personal { background: var(--c-personal); }
.empty-line { color: var(--muted); padding: 6px 2px; margin: 0; }
details.more { margin-top: 10px; }
details.more summary { cursor: pointer; color: var(--muted); font-weight: 500; padding: 6px 2px; }
.since { width: 100%; text-align: left; background: var(--soft); border: 0; border-radius: 12px; padding: 13px 16px; color: var(--ink); }
.since b { color: var(--good); font-weight: 600; }
.synced { text-align: center; }

/* Activity */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .88rem; color: var(--muted); }
.chip[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dayh { position: sticky; top: 58px; background: var(--bg); padding: 12px 2px 6px; font: 600 .78rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); z-index: 1; }
.act { display: grid; grid-template-columns: 4.6rem 1fr; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.act .tm { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.act .s { min-width: 0; overflow-wrap: anywhere; }
.act .lbl { font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.act.att .lbl { color: var(--warn); }
.act.declined .s { color: var(--muted); }
.receipt { grid-column: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9rem; display: grid; gap: 4px; margin-top: 6px; }
.receipt a { color: var(--accent); }

/* Documents and connections */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.upload { display: grid; gap: 12px; margin-bottom: 18px; }
.upload label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.status { color: var(--muted); font-size: .9rem; }
.list { display: grid; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.item .meta { min-width: 0; }
.item .title { font-weight: 600; overflow-wrap: anywhere; }
.item .detail { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.item .actions { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  background: var(--soft); color: var(--muted); border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: 2px; }
.pill.good { color: var(--good); }
.empty { color: var(--muted); padding: 22px 0; }
.error { color: var(--danger); margin: 18px 0; }

/* Tell Tiffany dock */
.dock { position: fixed; left: 0; right: 0; bottom: var(--tabbar); z-index: 4; pointer-events: none; padding-top: 28px;
  background: linear-gradient(to bottom, transparent, var(--bg) 26px); }
.dock > * { pointer-events: auto; }
.composer { max-width: 760px; margin: 0 auto 10px; display: flex; gap: 8px; align-items: flex-end;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.composer textarea { flex: 1; resize: none; max-height: 9rem; min-height: 44px; overflow-y: hidden; border-radius: 22px; padding: 11px 16px; box-shadow: 0 4px 18px rgb(0 0 0 / .08); line-height: 1.4; }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 1.2rem; font-weight: 700; flex: none; }
.send:disabled { opacity: .5; }
.convo { max-width: 760px; margin: 0 auto 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 30px rgb(0 0 0 / .12); width: calc(100% - 2 * max(16px, env(safe-area-inset-left))); display: grid; grid-template-rows: auto 1fr; max-height: min(60vh, 520px); }
.convo-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.msgs { overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.you { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg.tiffany { align-self: flex-start; background: var(--soft); border-bottom-left-radius: 4px; }
.msg.typing { color: var(--muted); font-style: italic; }
.msg .via { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
@media (prefers-reduced-motion: no-preference) { .item, .need { transition: border-color .15s; } }
