.signout { margin-left: auto; padding-left: 12px; }
.narrow { max-width: 460px; margin: 40px auto; }
.qr { display: block; width: 220px; height: 220px; margin: 8px 0; background: #fff; border-radius: 8px; }
/* Colours from Joey & Yakira's wedding invitation: deep burgundy, gold, teal peony, magenta anemone. */
:root {
  --bg: #fbf7f2; --panel: #ffffff; --text: #2a1218; --muted: #76606a; --line: #eadfd8;
  --accent: #7a1e3a; --accent-soft: #f6e7ec; --on-accent: #ffffff;
  --gold: #b8862b; --gold-soft: #f7efdc;
  --teal: #0f5e63; --teal-soft: #e3f1f1; --teal-line: #2f8a8f;
  --ok: #0f5e63; --ok-soft: #e1f0f0;
  --warn: #8f5306; --warn-soft: #fbf0dc;
  --bad: #a3162e; --bad-soft: #fbe4e8;
  --muse: #a0185c; --muse-soft: #fbe6f0;
  --header-bg: #3e0a17; --header-text: #ecd08a; --header-muted: #d6b9bf;
  --radius: 8px; font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #160b10; --panel: #22121a; --text: #f3e9df; --muted: #b9a0a8; --line: #3d252c;
    --accent: #e3b95c; --accent-soft: #3a2228; --on-accent: #2a1218;
    --gold: #e3b95c; --gold-soft: #33261a;
    --teal: #6fd0d1; --teal-soft: #0f3132; --teal-line: #2b8f93;
    --ok: #63c6c7; --ok-soft: #10302f; --warn: #e9b266; --warn-soft: #36260f;
    --bad: #f08a9c; --bad-soft: #3a1720; --muse: #e86fab; --muse-soft: #3a1630;
    --header-bg: #2a0610; --header-text: #ecd08a; --header-muted: #c7a8ae; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.45; }
a { color: var(--teal); text-decoration: none; } a:hover { text-decoration: underline; }
header.top { display: flex; align-items: center; gap: 4px; padding: 0 16px; background: var(--header-bg);
  border-bottom: 3px solid var(--teal-line); position: sticky; top: 0; z-index: 10; overflow-x: auto; }
header.top .brand { margin-right: 14px; color: var(--header-text); white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px; }
header.top .brand:hover { text-decoration: none; }
.script { font-family: "Snell Roundhand", "Apple Chancery", "Segoe Script", "Lucida Handwriting", Georgia, serif;
  font-style: italic; font-size: 26px; font-weight: 600; line-height: 1; }
.crm { font-family: Georgia, "Times New Roman", serif; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; opacity: .85; }
header.top nav a { display: inline-block; padding: 14px 10px; color: var(--header-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
header.top nav a.on { color: #ffffff; border-bottom-color: var(--teal-line); }
header.top nav a:hover { text-decoration: none; color: var(--header-text); }
header.top .signout button.link { color: var(--header-muted); }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
h1 { color: var(--accent); } h2 { color: var(--teal); }
.narrow h1 { text-align: center; color: var(--accent); }
.testbar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 6px 12px; font-size: 13px; }
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }
main.wide { max-width: none; }
h1 { font-size: 22px; margin: 0 0 16px; } h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 8px; }
.row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.grow { flex: 1 1 0; min-width: 0; }
.side { flex: 0 0 340px; max-width: 100%; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .nowrap { white-space: nowrap; } .right { text-align: right; }
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); } .flash.err { background: var(--bad-soft); color: var(--bad); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tr:hover td { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.tablewrap { overflow-x: auto; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; max-width: 100%; }
textarea { width: 100%; min-height: 70px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 3px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; color: var(--text); font-size: 14px; margin: 4px 10px 4px 0; }
.field input, .field select, .field textarea { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .side { flex-basis: 100%; } }
.btn, button { display: inline-block; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 6px; padding: 7px 13px; cursor: pointer; font-size: 14px; }
.btn:hover, button:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost, button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.link { background: none; color: var(--accent); padding: 0; }
button.danger { background: var(--bad); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.muse { background: var(--muse-soft); color: var(--muse); }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.grey { background: var(--line); color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; font-size: 12px; background: var(--line); margin: 0 4px 4px 0; }
.tag form { display: inline; } .tag button { background: none; color: var(--muted); padding: 0 2px; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters .f { display: flex; flex-direction: column; } .filters label { margin: 0 0 3px; }
.views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.views a { padding: 5px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.views a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.views .n { color: var(--muted); margin-left: 4px; } .views a.on .n { color: var(--on-accent); opacity: .8; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .today-grid { grid-template-columns: 1fr; } }
.item { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .what { min-width: 0; } .item .btns { display: flex; gap: 6px; flex-shrink: 0; }
.item .btns button { padding: 3px 9px; font-size: 12px; }
.status-line { display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); position: relative; margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.timeline li.by-muse::before { border-color: var(--muse); }
.timeline .meta { font-size: 12px; color: var(--muted); }
.timeline .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { background: none; color: var(--muted); border-radius: 0; border-bottom: 2px solid transparent; padding: 6px 10px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabpane { display: none; } .tabpane.on { display: block; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.col { flex: 0 0 260px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.col header { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.col header .t { font-weight: 600; } .col header .s { font-size: 12px; color: var(--muted); }
.col.won header { background: var(--ok-soft); } .col.lost header { background: var(--bad-soft); }
.col .cards { padding: 8px; overflow-y: auto; min-height: 80px; flex: 1; }
.col.over { outline: 2px dashed var(--accent); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; cursor: grab; font-size: 13px; }
.card .v { font-weight: 600; } .card.overdue { border-left: 3px solid var(--warn); }
.card.dragging { opacity: .5; }
.funnel td.bar { width: 45%; }
progress { width: 100%; height: 14px; appearance: none; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .n { font-size: 24px; font-weight: 700; } .kpi .l { font-size: 13px; color: var(--muted); }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.skip td { color: var(--muted); }
details summary { cursor: pointer; color: var(--accent); }
.hidden { display: none !important; }
code { background: var(--line); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.between { justify-content: space-between; }
.narrow h2 { margin-top: 22px; }

/* ---- Teal as the second main colour (Joey's request) ---- */
.panel { border-top: 3px solid var(--teal-line); }
.panel .panel { border-top-width: 1px; border-top-color: var(--line); }
th { color: var(--teal); }
.btn.ghost, button.ghost { color: var(--teal); border-color: var(--teal-line); }
.btn.ghost:hover, button.ghost:hover { background: var(--teal-soft); filter: none; }
.pill { background: var(--teal-soft); color: var(--teal); }
.views a { border-color: var(--teal-line); color: var(--teal); }
.views a.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.views a.on .n { color: #fff; }
.tabs button.on { border-bottom-color: var(--teal-line); color: var(--teal); }
.kpi { border-left: 4px solid var(--teal-line); }
.kpi .n { color: var(--accent); }
.col { border-top: 3px solid var(--teal-line); }
.col header { background: var(--teal-soft); }
.col header .t { color: var(--teal); }
.col.won { border-top-color: var(--ok); } .col.won header { background: var(--ok-soft); }
.col.lost { border-top-color: var(--bad); } .col.lost header { background: var(--bad-soft); }
.col.lost header .t { color: var(--bad); }
progress::-webkit-progress-value { background: var(--teal-line); }
progress::-moz-progress-bar { background: var(--teal-line); }
.timeline li { border-left-color: var(--teal-soft); }
.timeline li::before { border-color: var(--teal-line); }
.status-line { border-left: 4px solid var(--teal-line); }
.tag { background: var(--teal-soft); color: var(--teal); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-line); outline-offset: 1px; }
@media (prefers-color-scheme: dark) {
  .views a.on, .views a.on .n { color: #0b1f20; }
}
.col.won { border-top-color: var(--teal); }
.col.won header { background: var(--teal); }
.col.won header .t, .col.won header .s, .col.won header .t .muted { color: #ffffff; }
@media (prefers-color-scheme: dark) {
  .col.won header .t, .col.won header .s, .col.won header .t .muted { color: #0b1f20; }
}

/* ---- Flowers from the wedding invitation in the banner ---- */
header.top { min-height: 64px; position: sticky; isolation: isolate; }
header.top .flora { mix-blend-mode: screen; pointer-events: none; user-select: none; }
header.top .flora-left { height: 64px; margin-left: -16px; margin-right: -6px; flex-shrink: 0; }
header.top .flora-right { position: absolute; right: 0; top: 0; height: 100%; z-index: -1; opacity: .95; }
header.top nav, header.top .brand, header.top .signout { position: relative; z-index: 1; }
header.top .brand .script { text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.floral-bar { position: relative; display: flex; align-items: center; justify-content: center; height: 96px;
  background: var(--header-bg); border-bottom: 3px solid var(--teal-line); color: var(--header-text);
  overflow: hidden; isolation: isolate; }
.floral-bar .flora { position: absolute; top: 0; height: 100%; mix-blend-mode: screen; pointer-events: none; }
.floral-bar .flora-left { left: 0; } .floral-bar .flora-right { right: 0; }
.floral-bar .script { font-size: 44px; position: relative; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
@media (max-width: 640px) { header.top .flora-right { opacity: .5; } }

/* larger, brighter flowers + the invitation's gold edge */
header.top { min-height: 78px; box-shadow: inset 0 -1px 0 var(--gold); }
header.top .flora { filter: brightness(1.45) saturate(1.2) contrast(1.05); }
header.top .flora-left { height: 78px; margin-left: -16px; margin-right: -2px; }
header.top .flora-right { opacity: 1; }
header.top .script { font-size: 30px; }
.floral-bar { height: 120px; box-shadow: inset 0 -1px 0 var(--gold); }
.floral-bar .flora { filter: brightness(1.45) saturate(1.2) contrast(1.05); }

/* keep the banner one line high on phones: the menu scrolls sideways instead of wrapping */
header.top { flex-wrap: nowrap; }
header.top nav { display: flex; flex-wrap: nowrap; }
@media (max-width: 640px) {
  header.top .flora-right { display: none; }
  header.top .flora-left { height: 64px; }
  header.top { min-height: 64px; }
  .floral-bar .flora-right { opacity: .7; }
}

/* ---- Kira the mascot (see docs/KIRA_MASCOT_BRIEF.md): never stretched, recoloured or filtered ---- */
.logo-circle { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; align-self: center; margin-right: 4px;
  box-shadow: 0 0 0 2px var(--header-text); }
header.top .brand { align-items: center; }
.mascot-hero { display: flex; justify-content: center; margin-top: -34px; position: relative; z-index: 2; }
.mascot-hero video, .mascot-hero img { height: 240px; width: auto; aspect-ratio: 714 / 1224; object-fit: contain;
  background: #fff; border-radius: 18px; border: 3px solid var(--teal-line); box-shadow: 0 8px 28px rgba(40,10,20,.25); }
.mascot-hero + .narrow { margin-top: 20px; }
.today-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.today-title h1 { margin: 0; }
.today-title .kira-idle { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #fff;
  border: 2px solid var(--teal-line); flex-shrink: 0; }
.empty-state { text-align: center; padding: 18px 10px; color: var(--muted); }
.empty-state img { height: 120px; width: auto; border-radius: 12px; background: #fff; border: 2px solid var(--teal-soft); }
.empty-state p { margin: 10px auto 0; max-width: 420px; }
.kira-busy { position: fixed; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; z-index: 50;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--teal-line); border-radius: 14px;
  padding: 8px 16px 8px 8px; box-shadow: 0 8px 26px rgba(40,10,20,.2); }
.kira-busy video { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #fff; }
.kira-busy-text { font-weight: 600; color: var(--teal); }
.kira-milestone { position: fixed; inset: 0; background: rgba(30,8,14,.6); display: flex; align-items: center;
  justify-content: center; z-index: 60; cursor: pointer; }
.kira-milestone-card { background: var(--panel); border-radius: 22px; padding: 16px 16px 12px; text-align: center;
  border-top: 4px solid var(--teal-line); box-shadow: 0 16px 50px rgba(0,0,0,.35); }
.kira-milestone video { width: 280px; height: 280px; max-width: 70vw; max-height: 70vw; border-radius: 16px; background: #fff; object-fit: cover; }
.kira-milestone-text { font-family: Georgia, serif; font-size: 24px; color: var(--accent); margin-top: 8px; }
@media (max-width: 640px) { .logo-circle { width: 34px; height: 34px; } }
