:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --text: #1d1f23;
  --muted: #6b6f76;
  --line: #e3dfd6;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --ok: #1a7f37;
  --ok-bg: #e6f4ea;
  --warn: #9a6700;
  --warn-bg: #fff4d6;
  --bad: #b42318;
  --bad-bg: #fde8e6;
  --live: #0b62c4;
  --live-bg: #e3efff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --surface: #1a1d21;
    --surface-2: #22262b;
    --text: #e8e6e1;
    --muted: #9aa0a8;
    --line: #2c3036;
    --accent: #4c8dff;
    --ok: #4ac26b; --ok-bg: #16301f;
    --warn: #e3b341; --warn-bg: #352a0f;
    --bad: #ff7b72; --bad-bg: #3a1716;
    --live: #79b8ff; --live-bg: #13263f;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.btn {
  font: inherit; cursor: pointer; border-radius: 10px; padding: 8px 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; width: 100%; padding: 11px 14px; font-weight: 600; }
.btn-ghost { background: transparent; }

.brand { font-weight: 700; font-size: 18px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 15px; }

/* auth */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.auth-hint { color: var(--muted); margin: 14px 0 18px; }
.auth-msg { min-height: 1.2em; margin: 12px 0 0; color: var(--bad); font-size: 14px; }
.auth-foot { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
#code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }

/* layout */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-right { display: flex; align-items: center; gap: 6px; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-body {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px; min-width: 170px; box-shadow: var(--shadow); display: grid;
}
.menu-body a, .menu-body button { font: inherit; text-align: left; padding: 8px 10px; border-radius: 7px; color: var(--text); background: none; border: 0; cursor: pointer; }
.menu-body a:hover, .menu-body button:hover { background: var(--surface-2); text-decoration: none; }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px 16px 64px; }
.section { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 4px 10px; font-weight: 600; }
details.past > summary { cursor: pointer; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

.notice { background: var(--warn-bg); color: var(--text); border-radius: var(--radius); padding: 4px 16px; margin-bottom: 16px; font-size: 14px; }

/* next flight */
.next-flight { background: var(--accent); color: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.next-flight .muted { color: rgba(255,255,255,.8); }
.next-flight .chip { background: rgba(255,255,255,.2); color: #fff; }
.nf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0; }
.nf-id { font-size: 22px; font-weight: 700; }
.next-flight .route { opacity: .85; font-weight: 500; }
.next-flight .countdown { font-size: 22px; }

/* trip card */
.trip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.trip.phase-underway { border-color: var(--accent); }
.trip.phase-past { opacity: .8; }
.trip-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.trip-head h3 { margin: 0 0 2px; font-size: 20px; letter-spacing: -.01em; }
.trip-hero { text-align: right; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 24px; letter-spacing: -.01em; }
.countdown.static { font-size: 20px; }
.trip-foot { margin-top: 12px; font-size: 13px; }

/* weather */
.wx { margin: 14px 0 4px; }
.wx-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wx-temp { font-size: 20px; font-weight: 700; }
.wx-icon { font-size: 20px; line-height: 1.2; }
.wx-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: thin; }
.wx-day { flex: 0 0 auto; min-width: 62px; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 6px 4px; }
.wx-note { margin-top: 10px; }

/* timeline */
.day h4 { margin: 18px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 66px 26px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item-time { font-variant-numeric: tabular-nums; font-size: 14px; }
.item-icon { font-size: 17px; line-height: 1.3; }
.item-title { font-weight: 600; }
.route { color: var(--muted); font-weight: 500; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.live { background: var(--live-bg); color: var(--live); }
.chip.done, .chip.plain { background: var(--surface-2); color: var(--muted); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.fcell { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.ftime { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.desc summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 4px; }
.desc pre { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.5 ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 10px; border-radius: 8px; margin: 6px 0 0; }

@media (max-width: 560px) {
  .trip-hero { text-align: left; width: 100%; }
  .item { grid-template-columns: 56px 22px 1fr; }
  .topbar #updated { display: none; }
  .topbar .btn { padding: 6px 10px; }
  .topbar .brand { font-size: 16px; }
}

/* build footer (every page) */
.site-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px 16px 32px; font-variant-numeric: tabular-nums; }
.auth-page { grid-template-rows: 1fr auto; }
.auth-page .site-footer { padding-bottom: 8px; }
.update-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10; background: var(--text); color: var(--bg); border-radius: 999px; padding: 8px 16px; font-size: 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); }
.update-banner button { font: inherit; font-weight: 600; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* intake */
.intake { padding-top: 12px; }
.intake-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.intake-label { display: block; font-weight: 600; margin-bottom: 8px; }
.intake textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.intake textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.intake-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.intake-row .spacer { flex: 1; }
#intake-submit { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#intake-msg:empty { display: none; }
#intake-msg.err { color: var(--bad); }
#intake-log { margin: 12px 0 4px; }
.log-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-row:last-child { border-bottom: 0; }
.log-main { flex: 1; min-width: 0; }
.log-main .preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-main ul { margin: 4px 0 0; padding-left: 18px; }
.log-row .btn { padding: 4px 10px; font-size: 13px; }
.item-notes { white-space: pre-wrap; margin-top: 2px; }
.trip-notes { white-space: pre-wrap; margin: 8px 0 0; }
.chip.src { background: var(--surface-2); color: var(--muted); font-weight: 500; }

/* invites */
.invite-note { flex: 1; min-width: 180px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.invite-note:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.invite-new { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.invite-code { font: 600 22px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; margin: 4px 0 2px; user-select: all; }
#invite-msg:empty { display: none; }
#invite-msg.err { color: var(--bad); }
#invite-log { margin: 12px 0 4px; }
.menu-body button#invites-open { text-align: left; }

/* trip accents: --ta is the accent, --ta-soft a tint behind it */
.trip { --ta: var(--accent); --ta-soft: color-mix(in srgb, var(--ta) 12%, var(--surface)); }
.accent-gold   { --ta: #b07d12; }
.accent-rose   { --ta: #c8366b; }
.accent-ocean  { --ta: #136fa8; }
.accent-forest { --ta: #23784b; }
.accent-violet { --ta: #6a4cc7; }
.accent-sunset { --ta: #cf5320; }
@media (prefers-color-scheme: dark) {
  .accent-gold   { --ta: #e2b04a; }
  .accent-rose   { --ta: #f0709b; }
  .accent-ocean  { --ta: #5bb1e8; }
  .accent-forest { --ta: #5cc48a; }
  .accent-violet { --ta: #a68cf5; }
  .accent-sunset { --ta: #f08a55; }
}
.trip[class*="accent-"] { border-top: 4px solid var(--ta); }
.trip[class*="accent-"] .countdown { color: var(--ta); }
.trip-head h3 a { color: inherit; }
.trip-head h3 a:hover { color: var(--ta); text-decoration: none; }
.trip-emoji { font-size: .95em; }
.trip-tagline { font-style: italic; color: var(--ta); margin: 0 0 2px; }
a.brand { color: var(--text); }
a.brand:hover { text-decoration: none; }

/* trip page */
.back { margin: 4px 2px 12px; font-size: 14px; }
.trip-page { padding: 24px 22px; }
.tp-head { text-align: center; padding-bottom: 8px; }
.tp-head h1 { margin: 4px 0 2px; font-size: 30px; letter-spacing: -.02em; line-height: 1.15; }
.tp-emoji { font-size: 44px; line-height: 1.1; }
.tp-who { justify-content: center; margin-top: 10px; }
.tp-hero { margin: 18px 0 6px; }
.tp-hero .countdown { font-size: 30px; color: var(--ta); }
.tp-actions { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.style-countdown.trip-page { background: linear-gradient(180deg, var(--ta-soft), var(--surface) 340px); }
.big-countdown { display: flex; justify-content: center; gap: clamp(8px, 3vw, 22px); font-variant-numeric: tabular-nums; }
.bc-unit { display: grid; justify-items: center; min-width: clamp(58px, 17vw, 104px); padding: 10px 4px 8px;
  border-radius: 14px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--ta) 30%, var(--line)); }
.bc-num { font-size: clamp(32px, 10vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--ta); }
.bc-lab { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 6px; }
.bc-label { margin-top: 12px; font-size: 17px; font-weight: 600; }
.big-countdown.done .bc-num { opacity: .5; }
.bc-now { font-size: clamp(28px, 8vw, 44px); font-weight: 800; color: var(--ta); }

/* travelers on bookings */
.chip.me { background: var(--ta, var(--accent)); color: #fff; }
.chips.pax { margin-top: 4px; }
.item.mine { box-shadow: inset 3px 0 0 var(--ta, var(--accent)); padding-left: 8px; margin-left: -8px; }
.mine-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; user-select: none; }
.mine-bar { display: flex; justify-content: flex-end; margin: 10px 2px -14px; }
.identity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.identity .spacer { flex: 1; }
.tr-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.tr-actions select, .cz-grid select { font: inherit; font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
#travelers-list { margin: 8px 0; }
#travelers-msg:empty, #cz-msg:empty { display: none; }
#travelers-msg.err, #cz-msg.err { color: var(--bad); }

/* customize */
.cz-row { border: 0; padding: 0; margin: 12px 0; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.cz-row legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.cz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.cz-grid select { width: 100%; padding: 10px 12px; font-size: 15px; border-radius: 10px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span[aria-hidden] { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--ta); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch.sw-none { --ta: var(--accent); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) {
  .trip-page { padding: 18px 14px; }
  .tp-head h1 { font-size: 24px; }
  .identity .btn { padding: 6px 10px; }
}

/* fixes */
.next-flight .route { color: inherit; }
.wrap.intake { padding-bottom: 0; }
.topbar .btn, .menu summary { white-space: nowrap; }
@media (max-width: 560px) {
  .topbar { padding: 8px 10px; }
  .topbar .brand { font-size: 0; gap: 0; }
  .topbar .brand-mark { font-size: 15px; }
  .topbar .menu summary { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
}

/* organizer */
.organizer { padding-top: 0; }
.org-tabs { display: flex; gap: 4px; margin: 0 0 -1px 8px; position: relative; z-index: 1; }
.org-tabs button { font: inherit; font-weight: 600; cursor: pointer; padding: 9px 16px; border: 1px solid transparent;
  border-bottom: 0; border-radius: 10px 10px 0 0; background: none; color: var(--muted); }
.org-tabs button.active { background: var(--surface); border-color: var(--line); color: var(--text); }
.org-pane { border-top-left-radius: 0; padding: 16px 18px; }
.org-suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.org-msg:empty { display: none; }
.org-msg.err { color: var(--bad); }
.pack-person h4 { margin: 4px 0 4px; font-size: 16px; }
.pack-person + .pack-person { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.pack-cat { margin: 8px 0 2px; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 600; }
.pack-items { list-style: none; margin: 0; padding: 0; }
.pack-item { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; }
.pack-item label { display: inline-flex; gap: 8px; align-items: baseline; cursor: pointer; }
.pack-item input { accent-color: var(--accent); transform: translateY(1px); }
.pack-item.done span { color: var(--muted); text-decoration: line-through; }
.pack-item .x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .5; }
.pack-item:hover .x, .pack-item .x:focus-visible { opacity: 1; }
#pack-add { margin-top: 14px; }
#pack-add select, .idea-plan select, .idea-plan input { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; }
.idea { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.idea:first-of-type { border-top: 0; }
.idea-icon { font-size: 20px; line-height: 1.3; }
.idea-title { font-weight: 700; font-size: 16px; }
.idea p { margin: 4px 0; }
.idea-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.idea-plan { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.idea-actions .btn { padding: 6px 12px; font-size: 14px; }
.idea-gone { margin-top: 10px; }
.idea-gone summary { cursor: pointer; }
.idea-gone .idea { opacity: .7; }
#notes-text { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; }
@media (max-width: 560px) {
  .org-tabs { margin-left: 4px; }
  .org-tabs button { padding: 8px 12px; }
  .org-pane { padding: 14px 12px; }
  #pack-add .invite-note { flex-basis: 100%; }
}
body[data-trip] #app { padding-bottom: 20px; }

/* headline photos */
.trip.has-cover { overflow: hidden; }
.card-cover { margin: -18px -18px 14px; height: 140px; background: var(--surface-2); }
.card-cover img, .tp-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.trip[class*="accent-"].has-cover { border-top-width: 0; }
.trip[class*="accent-"].has-cover .card-cover, .trip[class*="accent-"].has-cover .tp-cover { border-bottom: 4px solid var(--ta); }
.tp-cover { position: relative; margin: -24px -22px 0; height: clamp(200px, 38vw, 340px); background: var(--surface-2); }
.tp-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.28)); pointer-events: none; }
.cover-credit { position: absolute; right: 10px; bottom: 8px; z-index: 1; font-size: 11px; color: #fff; opacity: .85; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cover-credit:hover { opacity: 1; }
.has-cover .tp-head { padding-top: 0; }
.has-cover .tp-emoji { width: 76px; height: 76px; margin: -38px auto 4px; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--surface); border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 40px; }
.has-cover:not(:has(.tp-emoji)) .tp-head h1 { margin-top: 18px; }
.style-countdown.trip-page.has-cover { background: var(--surface); }
.cz-photo { border: 0; padding: 0; margin: 12px 0; }
.cz-photo legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.cz-photo-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cz-photo-preview { width: 200px; height: 112px; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; border: 1px solid var(--line); }
.cz-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.cz-photo-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; min-width: 220px; }
.cz-focus { display: inline-flex; align-items: center; gap: 8px; }
#cz-photo-msg:empty { display: none; }
@media (max-width: 560px) {
  .tp-cover { margin: -18px -14px 0; }
  .card-cover { height: 110px; }
  .cz-photo-preview { width: 100%; height: 150px; }
}
@media (max-width: 560px) {
  .cover-credit { top: 8px; bottom: auto; }
}

/* confirmation links */
a.conf-link { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; }
a.conf-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 20;
  background: var(--text); color: var(--bg); border-radius: 12px; padding: 10px 16px; font-size: 14px; box-shadow: var(--shadow);
  max-width: calc(100% - 32px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* day-by-day agenda */
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; margin: 8px 0 4px; scrollbar-width: thin; }
.day-chip { flex: 0 0 auto; display: grid; justify-items: center; min-width: 48px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 12px; line-height: 1.2; }
.day-chip strong { font-size: 17px; }
.day-chip:hover { border-color: var(--ta); text-decoration: none; }
.day-chip.today { background: var(--ta); border-color: var(--ta); color: #fff; }
.ag-day { border-top: 1px solid var(--line); padding: 16px 0 14px; scroll-margin-top: 70px; }
.ag-day.today { box-shadow: inset 3px 0 0 var(--ta); padding-left: 12px; margin-left: -12px; }
.ag-outside { opacity: .85; }
.ag-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ag-head h3 { margin: 0 0 2px; font-size: 17px; letter-spacing: -.01em; }
.ag-wx { white-space: nowrap; font-size: 15px; }
.ag-note { margin: 6px 0 4px; }
.ag-note button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: inherit; }
.ag-note-text { font-style: italic; color: var(--ta) !important; }
.ag-note-add:hover, .ag-note-text:hover { text-decoration: underline; }
.ag-note-form { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-empty { margin: 6px 0; }
.ag-ideas { margin: 8px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--ta-soft, var(--surface-2)); }
.ag-idea { display: grid; grid-template-columns: 24px 1fr; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.ag-idea:first-of-type { border-top: 0; }
.ag-idea a { color: var(--text); }
.day-plan { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.day-plan input { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.day-plan .btn, .ag-buttons .btn { padding: 5px 10px; font-size: 13px; }
.ag-actions { margin-top: 8px; }
.day-add { display: flex; gap: 6px; }
.day-add .invite-note { padding: 6px 10px; font-size: 14px; }
.ag-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.nudge { color: var(--warn); }
.ag-msg:empty { display: none; }
.ag-msg { margin: 6px 0 0; }
.ag-msg.err { color: var(--bad); }
@media (max-width: 560px) {
  .ag-day.today { padding-left: 8px; margin-left: -8px; }
}
.ag-links { display: flex; gap: 4px 16px; flex-wrap: wrap; align-items: center; }
button.link { font: inherit; font-size: 13px; background: none; border: 0; padding: 2px 0; color: var(--accent); cursor: pointer; }
button.link:hover { text-decoration: underline; }
button.link.nudge { color: var(--warn); }
.day-add { margin-top: 8px; }
.day-add[hidden] { display: none; }
