/* Shoot Portal — warm paper + ink, one brass accent. No external assets. */
:root {
  --paper: #f5f2ec; --surface: #ffffff; --sunken: #efebe3; --line: #e3ded4; --line-strong: #cfc8ba;
  --ink: #1c1a17; --text: #38342d; --muted: #787163; --accent: #8a6a2f; --accent-soft: #f3ead8;
  --ok: #2f6b4a; --ok-soft: #e2f0e7; --info: #2c5a86; --info-soft: #e1ecf6; --warn: #8f5a12; --warn-soft: #f8ebd3;
  --edit: #5b4a8a; --edit-soft: #ebe6f6; --bad: #9a3a2e; --bad-soft: #f7e3df; --off: #6f6a60; --off-soft: #eceae4;
  --shadow: 0 1px 2px rgba(40, 32, 20, .05), 0 8px 24px -12px rgba(40, 32, 20, .12);
  --radius: 14px; --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151412; --surface: #1e1c19; --sunken: #191815; --line: #2e2b26; --line-strong: #433f37;
    --ink: #f3efe7; --text: #d6d0c4; --muted: #958e80; --accent: #d1ad68; --accent-soft: #33291a;
    --ok: #7fc79d; --ok-soft: #1b2e23; --info: #8bb9e4; --info-soft: #1a2837; --warn: #e5b566; --warn-soft: #33270f;
    --edit: #b5a5e6; --edit-soft: #262038; --bad: #ec9185; --bad-soft: #3a1e1a; --off: #9b9588; --off-soft: #26241f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .6);
  }
}
*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute must always win, even over buttons and flex rows that set their own display. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; }
h1 { font: 600 clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem)/1.15 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 1.02rem; letter-spacing: .005em; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 26px 16px 18px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--sunken); }
.brand { font: 600 1.18rem/1.2 var(--serif); color: var(--ink); text-decoration: none; padding: 0 10px; letter-spacing: -.01em; }
.brand small { display: block; font: 500 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--line); }
.nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav .count { margin-left: auto; background: var(--warn-soft); color: var(--warn); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.nav-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 18px 10px 6px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; }
.side-foot:hover { background: var(--line); }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar.soft { background: var(--accent-soft); color: var(--accent); }
.side-foot b { display: block; color: var(--ink); font-size: .9rem; line-height: 1.2; }
.side-foot span { font-size: .78rem; color: var(--muted); }
.main { padding: 34px clamp(16px, 4vw, 48px) 80px; max-width: 1080px; width: 100%; }
.topbar, .tabbar { display: none; }

@media (max-width: 860px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; font-size: 1.05rem; }
  .main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar > a, .tabbar summary { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: .68rem; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px; position: relative; list-style: none; cursor: pointer; }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tabbar details { flex: 1; display: flex; }
  .tabbar details > summary { width: 100%; }
  .tabbar a.on, .tabbar details[open] summary { color: var(--ink); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
  .more-sheet { position: fixed; left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px; }
  .more-sheet a { padding: 12px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--text); }
  .more-sheet a:active { background: var(--sunken); }
}
.nav svg { width: 18px; height: 18px; flex: none; opacity: .8; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .eyebrow, .eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; display: block; text-decoration: none; }
a.eyebrow:hover { color: var(--ink); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sub { color: var(--muted); margin-top: 6px; }

/* ---------- buttons ---------- */
.btn { appearance: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 .92rem/1 var(--sans); padding: 11px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; transition: transform .06s ease, background .15s ease; }
.btn:hover { background: var(--sunken); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.btn.good { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--sunken); }
.btn.sm { padding: 7px 11px; min-height: 34px; font-size: .84rem; border-radius: 8px; }
.btn.block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--ink); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head .tag { font-size: .78rem; color: var(--muted); }
.card-head a { font-size: .85rem; color: var(--muted); }
.card-body { padding: 20px; }
.card.attn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.card.attn .card-head { background: var(--warn-soft); border-bottom-color: color-mix(in srgb, var(--warn) 25%, var(--line)); }
.card.attn .card-head h2 { color: var(--warn); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid2 > div > .card:last-child { margin-bottom: 20px; }
@media (max-width: 980px) { .grid2 { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.empty { padding: 30px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font: 600 1.1rem var(--serif); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: block; }
.stat:hover { border-color: var(--line-strong); }
.stat b { display: block; font: 600 1.7rem/1.1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.hot b { color: var(--warn); }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- shoot rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.rows li:last-child .row, .row:last-child { border-bottom: 0; }
a.row:hover { background: var(--sunken); }
.date { width: 58px; text-align: center; border: 1px solid var(--line); border-radius: 11px; padding: 6px 0 7px; background: var(--paper); line-height: 1.1; }
.date i { display: block; font-style: normal; font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.date b { display: block; font: 600 1.35rem/1.1 var(--serif); color: var(--ink); }
.date em { display: block; font-style: normal; font-size: .64rem; color: var(--muted); }
.date.tbd { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.date.tbd i { color: var(--muted); }
.row-main { min-width: 0; }
.row-main b { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { display: block; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-side .due { font-size: .75rem; color: var(--muted); }
.row-side .due.late { color: var(--bad); font-weight: 600; }
@media (max-width: 520px) { .row { padding: 13px 14px; gap: 11px; grid-template-columns: 52px minmax(0, 1fr) auto; } .date { width: 52px; } .card-head, .card-body { padding-left: 14px; padding-right: 14px; } }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; padding: 4px 9px; border-radius: 20px; white-space: nowrap; background: var(--off-soft); color: var(--off); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.requested { background: var(--warn-soft); color: var(--warn); }
.pill.confirmed { background: var(--info-soft); color: var(--info); }
.pill.completed { background: var(--edit-soft); color: var(--edit); }
.pill.delivered { background: var(--ok-soft); color: var(--ok); }
.pill.declined { background: var(--bad-soft); color: var(--bad); }
.pill.lg { font-size: .84rem; padding: 6px 12px; }

/* ---------- tabs + search ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: inline-flex; background: var(--sunken); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 7px 13px; border-radius: 8px; text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.search { display: flex; gap: 6px; flex: 1; max-width: 320px; min-width: 200px; }

/* ---------- forms ---------- */
label, .label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: 5px; }
label .hint { display: inline; margin-left: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; min-height: 44px; appearance: none; -webkit-appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field { margin-bottom: 16px; }
.fields { display: grid; gap: 0 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.three { grid-template-columns: 2fr 1fr 1fr; }
.fields .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields, .fields.three { grid-template-columns: minmax(0, 1fr); } }
.form-section { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; }
.form-section > h2 { margin-bottom: 4px; }
.form-section > .muted { margin-bottom: 16px; font-size: .9rem; }
.step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 16px 20px; background: var(--sunken); border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-foot .grow { margin-right: auto; font-size: .85rem; color: var(--muted); }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 22px; border: 1px solid var(--line-strong); font-size: .9rem; font-weight: 500; color: var(--text); background: var(--surface); }
.chip span small { color: var(--muted); font-weight: 400; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:checked + span small { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 10px; cursor: pointer; font-weight: 400; font-size: .95rem; color: var(--text); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.check b { display: block; color: var(--ink); font-weight: 600; }
.check small { color: var(--muted); font-size: .84rem; }
.nested { margin-left: 22px; }
.is-disabled { opacity: .5; }

.windows { display: grid; gap: 10px; margin-bottom: 12px; }
.window { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.window label { font-size: .72rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.window .x { height: 44px; border: 0; background: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; border-radius: 8px; }
.window .x:hover { color: var(--bad); background: var(--bad-soft); }
.window .say { grid-column: 1 / -1; font-size: .84rem; color: var(--accent); font-weight: 600; min-height: 1.2em; }
@media (max-width: 560px) { .window { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; } .window .w-day { grid-column: 1 / -1; } }

/* ---------- shoot detail ---------- */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.hero-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.hero .when { font: 600 1.35rem/1.25 var(--serif); color: var(--ink); margin-top: 14px; }
.hero .when small { display: block; font: 400 .9rem var(--sans); color: var(--muted); margin-top: 3px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; counter-reset: step; }
.steps li { list-style: none; position: relative; text-align: center; font-size: .78rem; font-weight: 600; color: var(--muted); padding-top: 26px; }
.steps { padding: 0; margin-bottom: 0; }
.steps li::before { content: ""; position: absolute; top: 5px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ink); border-color: var(--ink); }
.steps li.done::after { background: var(--ink); }
.steps li.now::before { box-shadow: 0 0 0 4px var(--accent-soft); background: var(--accent); border-color: var(--accent); }
.steps li small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.notice { border-radius: 11px; padding: 12px 14px; margin-top: 16px; font-size: .92rem; background: var(--sunken); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; }
.kv dt { font-size: .82rem; color: var(--muted); padding-right: 12px; }
.kv dd { color: var(--ink); overflow-wrap: anywhere; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.kv dd.pre, .pre { white-space: pre-wrap; }
@media (max-width: 480px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dt { border: 0; padding-bottom: 0; } .kv dd { padding-top: 3px; } }
.secret { background: var(--accent-soft); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 11px; padding: 12px 14px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.secret-label { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.people { display: flex; flex-direction: column; gap: 12px; }
.person { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.person b { display: block; color: var(--ink); font-size: .94rem; line-height: 1.25; }
.person span { font-size: .8rem; color: var(--muted); }
.winlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.winlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-weight: 500; color: var(--ink); }
.medialist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.medialist li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.medialist .ico { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.medialist .ico svg { width: 19px; height: 19px; }
.medialist a.open { flex: 1; min-width: 0; text-decoration: none; }
.medialist a.open b { display: block; color: var(--ink); }
.medialist a.open span { display: block; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--line); font-size: .9rem; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); border: 2px solid var(--surface); }
.timeline li:first-child::before { background: var(--accent); }
.timeline small { display: block; color: var(--muted); font-size: .78rem; }
.stack { display: grid; gap: 10px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
details.fold { border-top: 1px solid var(--line); }
details.fold > summary { cursor: pointer; padding: 14px 20px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: .94rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; font-weight: 400; }
details.fold[open] > summary::after { content: "–"; }
details.fold > div { padding: 0 20px 20px; }
.card > details.fold:first-child { border-top: 0; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cal-head h2 { font: 600 1.25rem var(--serif); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .dow { padding: 8px 4px; text-align: center; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal .cell { min-height: 108px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal .cell:nth-child(7n) { border-right: 0; }
.cal .cell.out { background: var(--sunken); }
.cal .cell.out .n { opacity: .45; }
.cal .n { font-size: .8rem; font-weight: 600; color: var(--muted); display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; margin-bottom: 3px; }
.cal .today .n { background: var(--ink); color: var(--paper); }
.ev { display: block; text-decoration: none; font-size: .73rem; line-height: 1.25; padding: 4px 6px; border-radius: 6px; margin-bottom: 3px; background: var(--info-soft); color: var(--info); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-left: 3px solid currentColor; }
.ev b { font-weight: 700; }
.ev.requested { background: transparent; color: var(--warn); border: 1px dashed currentColor; }
.ev.completed { background: var(--edit-soft); color: var(--edit); }
.ev.delivered { background: var(--ok-soft); color: var(--ok); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 12px 16px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: currentColor; margin-right: 6px; }
.legend .l-req { color: var(--warn); } .legend .l-con { color: var(--info); } .legend .l-edi { color: var(--edit); } .legend .l-del { color: var(--ok); }
.agenda-day { padding: 10px 20px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--sunken); border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .cal .cell { min-height: 54px; padding: 4px 2px; text-align: center; }
  .ev { font-size: 0; padding: 0; width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin: 0 1px; border: 0; background: currentColor; }
  .ev.requested { border: 1.5px solid currentColor; background: transparent; }
}

/* ---------- misc ---------- */
.flash { position: fixed; z-index: 50; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; font-size: .93rem; max-width: calc(100vw - 32px); animation: rise .25s ease, fade .4s ease 5s forwards; }
@media (max-width: 860px) { .flash { bottom: calc(84px + env(safe-area-inset-bottom)); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes fade { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: fade .1s linear 6s forwards; } .btn { transition: none; } }
.copybox { display: flex; gap: 8px; }
.copybox input { font-size: .82rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mailbody { white-space: pre-wrap; font: .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sunken); padding: 14px; border-radius: 10px; margin-top: 10px; overflow-wrap: anywhere; }
.badge { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; margin-left: 6px; }
.badge.off { background: var(--off-soft); color: var(--off); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- signed-out pages ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { display: block; text-align: center; font-size: 1.5rem; margin-bottom: 26px; padding: 0; }
.auth-card .card-body { padding: 26px; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 6px; }
.auth-card .sub { margin: 0 0 20px; font-size: .93rem; }
.auth-foot { text-align: center; font-size: .88rem; color: var(--muted); }
.mt { margin-top: 18px; }
.btn svg { width: 16px; height: 16px; }
.secret-label svg { width: 14px; height: 14px; }
.due.late { color: var(--bad); font-weight: 600; }
.profile { display: flex; gap: 16px; align-items: center; }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
a.avatar { text-decoration: none; }

/* ---------- address type-ahead ---------- */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.combo-opt { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--text); cursor: pointer; }
.combo-opt b { display: block; color: var(--ink); font-weight: 600; }
.combo-opt span { font-size: .84rem; color: var(--muted); }
.combo-opt[aria-selected=true], .combo-opt:hover { background: var(--sunken); }
.combo-credit { padding: 6px 14px; font-size: .7rem; color: var(--muted); text-align: right; }
details.fold.flush { border: 1px solid var(--line); border-radius: 11px; margin-top: 2px; }
details.fold.flush > summary { padding: 12px 14px; font-weight: 500; color: var(--muted); font-size: .9rem; }
details.fold.flush > div { padding: 0 14px 14px; }

/* ---------- notification nudge ---------- */
.nudge { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.nudge[hidden] { display: none; }
.nudge-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); }
.nudge-ico svg { width: 20px; height: 20px; }
.nudge-text { flex: 1; min-width: 0; }
.nudge-text b { display: block; color: var(--ink); }
.nudge-text span { font-size: .88rem; color: var(--text); }
.nudge-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 640px) { .nudge { flex-wrap: wrap; } .nudge-text { flex-basis: calc(100% - 52px); } .nudge-actions { width: 100%; } .nudge-actions .btn { flex: 1; } }

/* ---------- reveal blocks + calendar add ---------- */
.reveal { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); border-radius: 12px; padding: 16px 16px 2px; }
.reveal[hidden] { display: none; }
.reveal-head { margin-bottom: 12px; }
.reveal-head b { display: block; color: var(--ink); }
.cal a.n.add { text-decoration: none; cursor: pointer; }
.cal a.n.add:hover { background: var(--accent-soft); color: var(--accent); }
.cal .today a.n.add:hover { background: var(--accent); color: var(--paper); }

/* ---------- chat ---------- */
.chat-card { overflow: hidden; }
.chat { display: flex; flex-direction: column; }
.chat-scroll { padding: 18px 18px 8px; overflow-y: auto; height: min(56vh, 560px); min-height: 260px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.chat-empty { margin: auto; max-width: 340px; text-align: center; color: var(--muted); font-size: .95rem; }
.msg { max-width: min(78%, 520px); align-self: flex-start; display: flex; flex-direction: column; align-items: flex-start; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 16px 16px 16px 5px; background: var(--sunken); border: 1px solid var(--line); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.msg.mine .bubble { background: var(--ink); color: var(--paper); border-color: var(--ink); border-radius: 16px 16px 5px 16px; }
.msg .meta { font-size: .72rem; color: var(--muted); margin: 4px 4px 0; }
.msg-ref { font-size: .74rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 20px; margin-bottom: 4px; text-decoration: none; }
.composer { border-top: 1px solid var(--line); padding: 12px; background: var(--sunken); }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; resize: none; border-radius: 14px; }
.composer-ref { font-size: .82rem; color: var(--accent); margin: 0 4px 8px; }
.composer-error { color: var(--bad); font-size: .85rem; margin: 0 4px 8px; }
@media (max-width: 860px) { .chat-scroll { height: calc(100vh - 360px); height: calc(100dvh - 360px); } }

/* ---------- homeowner (guest) page ---------- */
.guest { max-width: 620px; margin: 0 auto; padding: 28px 16px 48px; }
.guest-brand { font: 600 1.05rem var(--serif); color: var(--ink); letter-spacing: -.01em; margin-bottom: 26px; }
.guest h1 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 1.9rem); }
.guest .sub { margin-bottom: 22px; }
.guest-appt { display: grid; gap: 14px; }
.guest-appt b { display: block; font: 600 1.2rem/1.3 var(--serif); color: var(--ink); }
.guest .chat-scroll { height: min(48vh, 460px); }
.guest-foot { margin-top: 18px; text-align: center; }

/* ---------- video packages ---------- */
.pkgs { display: grid; gap: 14px; }
.pkg { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); }
.pkg-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pkg-top b { display: block; color: var(--ink); }
.pkg-count { text-align: right; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.pkg-count b { display: inline; font: 600 1.5rem/1 var(--serif); color: var(--ink); }
.pkg-count small { display: block; font-size: .72rem; }
.meter { display: flex; gap: 5px; margin-top: 12px; }
.meter i { flex: 1; height: 8px; border-radius: 6px; background: var(--line); max-width: 64px; }
.meter i.mid { background: color-mix(in srgb, var(--edit) 45%, var(--line)); }
.meter i.on { background: var(--ok); }
.pkg-details { margin: 12px 0 0; }
.field label input, .field label textarea, .field label select { margin-top: 6px; font-weight: 400; }

/* ---------- assistant messages ---------- */
.msg.ai .bubble { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-soft); color: var(--ink); }
.msg.ai.mine .bubble { background: var(--accent-soft); color: var(--ink); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.msg.ai .meta { color: var(--accent); }
.bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.owners { display: grid; gap: 8px; margin: 10px 0; }
.owner-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 40px; gap: 8px; align-items: center; }
.owner-row .x { height: 44px; border: 0; background: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; border-radius: 8px; }
.owner-row .x:hover { color: var(--bad); background: var(--bad-soft); }
@media (max-width: 480px) { .owner-row { grid-template-columns: minmax(0, 1fr) 40px; } .owner-row input[type=email] { grid-column: 1; grid-row: 2; } }

.fields.addr-line { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
@media (max-width: 560px) { .fields.addr-line { grid-template-columns: minmax(0, 1fr); } }
.nudge.announce { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); align-items: flex-start; }
.nudge.announce .nudge-text span { display: block; margin-top: 2px; }
code { font: .85em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sunken); padding: 1px 5px; border-radius: 5px; }

.nudge { flex-wrap: wrap; }
.nudge-hint { flex-basis: 100%; margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 500; }

/* ---------- photos and videos in chat ---------- */
.msg-media { max-width: 320px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--sunken); margin-bottom: 4px; }
.msg-media img, .msg-media video { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #000; }
.msg-media img { background: var(--sunken); }
.media-note { padding: 14px 16px; font-size: .88rem; color: var(--muted); }
.media-note.bad { color: var(--bad); }
.attach { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer; margin: 0; }
.attach:hover { color: var(--ink); }
.attach svg { width: 20px; height: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.composer-attach { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--text); margin: 0 4px 8px; }
.upbar { flex-basis: 100%; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.upbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
