/* Inkfile — black & grey with vermilion ink (the logo's drop color). */
:root {
  --paper: #f4f2ef; --surface: #ffffff; --sunk: #eae7e2; --ink: #1c1a18; --muted: #6b665f; --line: #ddd8d0;
  --accent: #c2411c; --accent-ink: #ffffff; --accent-soft: #fbe4db;
  --ok: #2c7650; --ok-soft: #ddf0e5; --warn: #8a6a06; --warn-soft: #f5eccb; --bad: #b3261e; --bad-soft: #fbe1de;
  --f-display: "Unbounded", "Onest", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141312; --surface: #1d1b19; --sunk: #272421; --ink: #eeebe7; --muted: #a8a29a; --line: #34302c;
    --accent: #f2805c; --accent-ink: #141312; --accent-soft: #3a221a;
    --ok: #7bcb9e; --ok-soft: #1f3328; --warn: #e3c068; --warn-soft: #352c14; --bad: #f2a29b; --bad-soft: #3a1d1a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141312; --surface: #1d1b19; --sunk: #272421; --ink: #eeebe7; --muted: #a8a29a; --line: #34302c;
  --accent: #f2805c; --accent-ink: #141312; --accent-soft: #3a221a;
  --ok: #7bcb9e; --ok-soft: #1f3328; --warn: #e3c068; --warn-soft: #352c14; --bad: #f2a29b; --bad-soft: #3a1d1a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; font-size: 14px; border-radius: 10px; padding: 10px 14px; min-height: 42px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.chip.new { background: var(--accent-soft); color: var(--accent); }
.chip.replied { background: var(--warn-soft); color: var(--warn); }
.chip.booked { background: var(--ok-soft); color: var(--ok); }
.chip.declined, .chip.archived { background: var(--sunk); color: var(--muted); }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.logo svg { width: 26px; height: 26px; flex: none; }
.logo span { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.logo .drop { fill: var(--accent); }

/* ---------- request form ---------- */
.form-page { max-width: 640px; margin: 0 auto; padding: 20px 16px 64px; }
.form-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.form-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.form-head h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 6vw, 34px); letter-spacing: -.02em; line-height: 1.1; }
.form-head p { color: var(--muted); }
form.req { display: flex; flex-direction: column; gap: 28px; }
.fs { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.fs > legend { padding: 0; margin-bottom: 14px; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > label, .fld > .lbl { font-size: 13.5px; font-weight: 600; }
.fld .opt { font-weight: 400; color: var(--muted); }
.fld .help { font-size: 12.5px; color: var(--muted); }
.fld .err { font-size: 12.5px; color: var(--bad); font-weight: 500; }
.input, .fld input[type="text"], .fld input[type="email"], .fld input[type="tel"], .fld textarea, .fld select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; width: 100%;
}
.fld textarea { min-height: 120px; resize: vertical; }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.fld.has-err input, .fld.has-err textarea { border-color: var(--bad); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: minmax(0, 1fr); } }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card-opt { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; background: var(--surface); min-width: 0; }
.card-opt b { font-size: 14.5px; }
.card-opt small { font-size: 12px; color: var(--muted); }
.card-opt input { position: absolute; opacity: 0; pointer-events: none; }
.card-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.card-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.photos-in { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .photos-in { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sunk); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .65); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.thumb.heic { display: grid; place-items: center; font-family: var(--f-mono); font-size: 11px; color: var(--muted); text-align: center; padding: 4px; }
.add-photo { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line); background: var(--surface); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 6px; }
.add-photo:hover { border-color: var(--accent); color: var(--accent); }
.add-photo b { display: block; font-size: 22px; font-weight: 400; line-height: 1; }

.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-size: 12.5px; }

.form-error { border-radius: var(--radius); background: var(--bad-soft); color: var(--bad); padding: 12px 14px; font-size: 14px; font-weight: 500; }
.submit-row { display: flex; flex-direction: column; gap: 10px; }
.submit-row .btn { min-height: 50px; font-size: 16px; }
.fine { font-size: 12px; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.done { display: flex; flex-direction: column; gap: 14px; padding: 48px 0; }
.done .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 28px; }
.done h1 { font-family: var(--f-display); font-weight: 500; font-size: 28px; line-height: 1.15; }

.center-msg { max-width: 520px; margin: 0 auto; padding: 80px 16px; display: flex; flex-direction: column; gap: 12px; }
.center-msg h1 { font-family: var(--f-display); font-weight: 500; font-size: 24px; }

/* ---------- app shell / inbox ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar .who { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .inbox { grid-template-columns: 400px minmax(0, 1fr); } .inbox .list-col { border-right: 1px solid var(--line); } }
.list-col { display: flex; flex-direction: column; min-width: 0; }
.list-head { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.list-head h1 { font-family: var(--f-display); font-weight: 500; font-size: 24px; letter-spacing: -.01em; }
.linkbox { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: var(--radius); background: var(--accent-soft); padding: 8px 8px 8px 12px; font-size: 13px; min-width: 0; }
.linkbox span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbox b { font-family: var(--f-mono); font-weight: 500; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.filters button { border: 0; cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.filters .n { font-family: var(--f-mono); font-weight: 500; margin-left: 4px; opacity: .8; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; align-items: start; text-decoration: none; color: inherit; }
.row:hover { background: var(--surface); }
.row[aria-current="true"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.row.unread .name { font-weight: 700; }
.row .ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--sunk); }
.row.unread .ava { background: var(--accent); color: var(--accent-ink); }
.row .name { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row .snip { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .meta { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.row .tags { display: flex; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.empty { padding: 40px 16px; color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }

@media (max-width: 899px) { .hide-mobile, .desktop-only { display: none !important; } }
.detail-col { min-width: 0; }
.detail { padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.detail .back { align-self: flex-start; }
@media (min-width: 900px) { .detail .back { display: none; } }
.d-head { display: flex; gap: 14px; align-items: center; }
.d-head .ava { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--f-display); font-size: 20px; flex: none; }
.d-head h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: -.01em; }
.d-head .sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.reply-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.reply-bar .btn.primary { grid-column: span 2; }
@media (max-width: 520px) { .reply-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .reply-bar .btn.primary { grid-column: 1 / -1; } }
.sec { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.sec-t { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.idea { white-space: pre-wrap; font-size: 15.5px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gallery button { padding: 0; border: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sunk); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.status-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.status-bar .btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.history a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 14px; }

/* merge */
.dupe { display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius); background: var(--warn-soft); padding: 12px; font-size: 14px; }
.dupe > .muted { font-size: 13px; }
.cand { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 9px 10px; flex-wrap: wrap; }
.cand > div:first-child { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.cand .muted { font-size: 12.5px; overflow-wrap: anywhere; }
.cand-confirm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.merge-open { align-self: flex-start; padding-left: 0; }
.merge-box { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); }
.merge-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.merge-box .input { font-size: 16px; padding: 9px 11px; }
.contacts { display: flex; flex-direction: column; gap: 2px; }

/* AI */
.btn.ai { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.btn.ai:hover { background: var(--accent-soft); }
.ai-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.foot-actions { display: flex; gap: 6px; flex: none; }

/* conversation */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; flex-direction: column; gap: 4px; max-width: 86%; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.note, .msg.sys { align-self: stretch; max-width: none; }
.msg.sys { align-items: center; }
.msg-bubble { border-radius: 14px; padding: 9px 12px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.in .msg-bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.out .msg-bubble { background: var(--accent-soft); border-bottom-right-radius: 4px; }
.msg.note .msg-bubble { background: var(--warn-soft); border-radius: 10px; }
.msg-tag { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--warn); margin-bottom: 2px; }
.msg-meta { font-size: 12px; color: var(--muted); }
.linkbtn { border: 0; background: none; padding: 0 2px; font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.linkbtn.danger { color: var(--bad); font-weight: 600; }
.composer { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px; }
.composer textarea { font-size: 15px; min-height: 76px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; background: var(--paper); color: var(--ink); font-family: inherit; }
.composer textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.composer .err { font-size: 12.5px; color: var(--bad); }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.composer-foot .btn { white-space: nowrap; flex: none; }
@media (max-width: 520px) { .composer-foot { flex-direction: column-reverse; align-items: stretch; } .foot-actions { justify-content: flex-end; } }
.seg { flex-shrink: 0; display: inline-flex; align-self: flex-start; background: var(--sunk); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.chan-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.chan-pick button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.chan-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgb(8 7 6 / .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 110px); object-fit: contain; border-radius: 8px; }
.lightbox .bar { display: flex; gap: 8px; }
.lightbox .btn { background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 60; }

.home { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 40px; }
.home h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(36px, 8vw, 60px); letter-spacing: -.03em; line-height: 1; }
.home .lede { color: var(--muted); font-size: 17px; max-width: 52ch; }
.home .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.skeleton { background: linear-gradient(90deg, var(--sunk), var(--surface), var(--sunk)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---------- top tabs ---------- */
.tabs { display: flex; gap: 2px; background: var(--sunk); border-radius: 999px; padding: 3px; }
.tabs a { text-decoration: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
@media (max-width: 560px) { .topbar .who { display: none; } }

/* ---------- calendar ---------- */
.kind-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--accent); }
.kind-dot.consult { background: var(--warn); }
.kind-dot.personal { background: var(--muted); }
.kind-dot.blocked { background: repeating-linear-gradient(135deg, var(--muted) 0 2px, transparent 2px 4px); border: 1px solid var(--muted); }
.appt-line { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 14px; }

.cal { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 14px 12px 40px; display: flex; flex-direction: column; gap: 12px; }
.cal-head { display: flex; flex-direction: column; gap: 10px; }
.cal-head h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 4.5vw, 26px); letter-spacing: -.01em; }
.cal-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.ar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.jump { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--ink); max-width: 150px; }

.grid-wrap { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.grid-heads, .allday { display: grid; border-bottom: 1px solid var(--line); }
.dh { border: 0; background: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; cursor: pointer; color: var(--muted); }
.dh b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.dh small { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.dh.today b { color: var(--accent-ink); background: var(--accent); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.grid-wrap.single .dh { flex-direction: row; gap: 8px; justify-content: flex-start; padding-left: 8px; }
.allday-l { font-size: 10px; color: var(--muted); padding: 6px 4px; text-align: right; }
.allday-col { display: flex; flex-direction: column; gap: 2px; padding: 3px 2px; border-left: 1px solid var(--line); min-width: 0; }
.allday .ev { position: static; height: auto; padding: 3px 6px; }
.grid-scroll { height: min(68dvh, 680px); overflow-y: auto; }
.grid { display: grid; position: relative; }
.hours { position: relative; }
.hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10.5px; color: var(--muted); font-family: var(--f-mono); white-space: nowrap; }
.col { position: relative; border-left: 1px solid var(--line); }
/* hour lines, lighter half-hour lines, faint quarter-hour lines when zoomed in — each drawn at an exact pixel, like Square */
.grid-lines { position: absolute; left: 44px; right: 0; top: 0; bottom: 0; pointer-events: none; z-index: 0; }
.gl { position: absolute; left: 0; right: 0; height: 1px; }
.gl.h { background: color-mix(in srgb, var(--line), var(--ink) 22%); }
.gl.half { background: color-mix(in srgb, var(--line), var(--ink) 4%); }
.gl.q { background: color-mix(in srgb, var(--line) 55%, transparent); }
.slot { position: absolute; left: 0; right: 0; border: 0; background: none; cursor: pointer; padding: 0; }
@media (hover: hover) { .slot:hover { background: var(--accent-soft); } }
.now { position: absolute; left: 0; right: 0; height: 2px; background: #d2463c; z-index: 2; pointer-events: none; }
.now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #d2463c; }
.ev { position: absolute; z-index: 1; border: 0; border-left: 3px solid; border-radius: 6px; padding: 3px 6px; text-align: left; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.25; color: var(--ink); min-width: 0; }
.ev b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .ev-notes { white-space: normal; }
.ev.session { background: var(--accent-soft); border-color: var(--accent); }
.ev.consult { background: var(--warn-soft); border-color: var(--warn); }
.ev.personal { background: var(--sunk); border-color: var(--muted); }
.ev.blocked { background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--surface) 6px 12px); border-color: var(--muted); color: var(--muted); }
.ev.st-done { opacity: .6; }
.ev.st-no_show b { text-decoration: line-through; }
.grid-loading { position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 50%, transparent); }

.month { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.dow, .mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow span { font-size: 11px; color: var(--muted); text-align: center; padding: 6px 0; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.mday { min-height: 92px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mday:nth-child(7n) { border-right: 0; }
.mday.other { background: var(--paper); }
.mday.other .mnum { color: var(--muted); }
.mday.blocked { background: repeating-linear-gradient(135deg, var(--sunk) 0 5px, var(--surface) 5px 10px); }
.mnum { align-self: flex-start; border: 0; background: none; font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 5px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.mday.today .mnum { background: var(--accent); color: var(--accent-ink); }
.mev { display: flex; align-items: center; gap: 4px; border: 0; background: none; padding: 1px 2px; font-size: 11.5px; text-align: left; cursor: pointer; min-width: 0; border-radius: 4px; }
.mev:hover { background: var(--sunk); }
.mev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mev em { font-style: normal; color: var(--muted); }
.mmore { border: 0; background: none; font-size: 11px; color: var(--muted); text-align: left; cursor: pointer; padding: 0 2px; }
@media (max-width: 560px) { .mday { min-height: 64px; } .mev span { font-size: 0; } .mev .kind-dot { width: 7px; height: 7px; } .mev { gap: 0; } }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.sheet-bg { position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); height: var(--vv-h, 100dvh); box-sizing: border-box; padding-top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 40; background: rgb(10 8 6 / .45); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: min(92dvh, 100%); overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .sheet { border-radius: 18px; } }
.sheet > * { flex-shrink: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { font-family: var(--f-display); font-weight: 500; font-size: 20px; }
.sheet .input { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; width: 100%; }
/* iPhone: date/time inputs ignore width:100% and push the sheet sideways; a sideways-scrolled sheet also draws the text cursor in the wrong place. */
.sheet { overflow-x: hidden; overscroll-behavior: contain; }
.sheet .input { min-width: 0; max-width: 100%; }
.sheet input[type="date"].input, .sheet input[type="time"].input, .sheet input[type="datetime-local"].input { -webkit-appearance: none; appearance: none; display: block; min-height: 44px; text-align: left; }
.sheet input::-webkit-date-and-time-value { text-align: left; }
/* While a sheet is open the page behind it doesn't scroll (iPhone moves fixed layers when it does, and the cursor lands in the wrong spot). */
html:has(.sheet-bg), html:has(.sheet-bg) body { overflow: hidden; }
.sheet textarea.input { resize: vertical; }
.seg.kinds { align-self: stretch; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.picked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.hits { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hits button { border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; padding: 9px 11px; cursor: pointer; font-size: 14px; }
.hits button:last-child { border-bottom: 0; }
.hits button:hover { background: var(--sunk); }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: sticky; bottom: 0; background: var(--surface); padding-top: 6px; }
.sheet-foot .btn.primary { margin-left: auto; min-width: 140px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- legal pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 12px; line-height: 1.6; }
.legal h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 6vw, 34px); margin-top: 16px; }
.legal h2 { font-size: 17px; margin-top: 14px; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

.dl.delivered { color: var(--ok); }
.dl.failed { color: var(--bad); font-weight: 600; }
.foot-actions .btn.primary { order: 2; }

/* clients */
.list-head .search { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; }
.row .tags .next { color: var(--accent); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.stat b { font-family: var(--f-display); font-weight: 500; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.contact-line { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.contact-add { display: flex; flex-direction: column; gap: 8px; }
.contact-row { display: flex; gap: 6px; align-items: center; }
.contact-row .input { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; flex: 1; min-width: 0; }
.contact-add .err { font-size: 12.5px; color: var(--bad); }
.req-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 14px; }
.req-line .snip { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-line .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; flex: none; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { text-decoration: underline; }
.gear { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.gear:hover, .gear.on { color: var(--ink); background: var(--sunk); }
@media (max-width: 420px) { .tabs a { padding: 6px 10px; font-size: 13px; } }

/* settings */
.settings { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; display: flex; flex-direction: column; gap: 16px; }
.settings > h1 { font-family: var(--f-display); font-weight: 500; font-size: 24px; }
.set-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.set-card h2 { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-row > div { min-width: 0; overflow-wrap: anywhere; }
.set-form { display: flex; flex-direction: column; gap: 14px; }
.set-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.small { font-size: 12.5px; }
.note { font-size: 13px; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; }
.err-box { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; }
select.input { appearance: auto; }
.switch { flex: none; width: 46px; height: 28px; border-radius: 999px; border: 0; padding: 3px; background: var(--line); cursor: pointer; display: inline-flex; transition: background .15s; }
.switch span { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(18px); }
.switch:disabled { opacity: .5; cursor: default; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
:root[data-theme="dark"] .swatch { background: var(--sw-dark); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .swatch { background: var(--sw-dark); } }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.autos { display: flex; flex-direction: column; gap: 8px; }
.auto { border: 1px solid var(--line); border-radius: 10px; }
.auto.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.auto-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.auto-title { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; }
.auto-title::after { content: ""; }
.auto-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.auto-body textarea.input { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; width: 100%; resize: vertical; }
.preview { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.preview .msg-bubble { background: var(--accent-soft); border-radius: 14px 14px 4px 14px; padding: 9px 12px; white-space: pre-wrap; max-width: 100%; }
.runs, .conns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.runs li { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.runs-what { flex: 1; min-width: 0; }
.conns li { display: grid; grid-template-columns: 10px auto 1fr; align-items: center; gap: 10px; font-size: 14px; }
.conns li .muted { text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--ok); }

/* deposits */
.dep-line { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.dep-line:first-of-type { border-top: 0; }
.dep-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dep-main b { font-family: var(--f-display); font-weight: 500; font-size: 17px; }
.dep-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.presets button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 14px 0; font-family: var(--f-display); font-size: 20px; cursor: pointer; }
.presets button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.presets button.other { font-family: var(--f-body); font-size: 16px; font-weight: 600; }
.money-in { position: relative; display: flex; align-items: center; gap: 6px; }
.money-in > span { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.money-in .input { padding-left: 26px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding-top: 10px; padding-bottom: 10px; width: 100%; }
.amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; align-items: center; }

/* pictures that came with a text */
.msg-media { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.msg-media a, .msg-media .msg-pic { display: block; padding: 0; border: 0; cursor: zoom-in; width: 140px; height: 140px; border-radius: 10px; overflow: hidden; background: var(--line); }
.msg-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* wrap-up & money */
.wrap h1, .money h1 { font-family: var(--f-display); font-weight: 500; font-size: 24px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; padding: 4px 0; }
.sum-line b { font-variant-numeric: tabular-nums; }
.wrap-foot { display: flex; flex-direction: column; gap: 10px; }
.wrap textarea.input { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; width: 100%; resize: vertical; box-sizing: border-box; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.work-ph { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); }
.work-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-ph button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .55); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.work-add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 26px; cursor: pointer; position: relative; }
.work-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pct-in { display: flex; align-items: center; gap: 8px; max-width: 140px; }
.pct-in .input { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; width: 100%; }
.finish-btn { justify-content: center; text-align: center; }
.next-note { display: block; font-size: 12.5px; color: var(--accent); margin-top: 2px; }
.money-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.money-nav { display: flex; align-items: center; gap: 6px; }
.money-nav b { min-width: 120px; text-align: center; }
.net { font-family: var(--f-display); font-weight: 500; font-size: 36px; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiles > div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tiles span { font-size: 12px; color: var(--muted); }
.tiles b { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.neg { color: var(--bad); }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lines li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lines li:first-child { border-top: 0; }
.lines li > .muted { flex: none; width: 48px; }
.lines-what { flex: 1; min-width: 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.lines b { font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .tabs a { padding: 6px 8px; font-size: 12.5px; } }
@media (max-width: 480px) {
  .topbar .logo span { display: none; }
  .topbar-in { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .tabs { min-width: 0; }
}
.gear { flex: none; }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; }
@media (max-width: 360px) { .tabs a { padding: 6px 7px; font-size: 12px; } }

/* assistant */
.sheet.assist { gap: 12px; }
.assist-log { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.assist-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; white-space: pre-wrap; }
.assist-msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 14px 14px 4px 14px; }
.assist-msg.assistant { align-self: flex-start; background: var(--sunk); border-radius: 14px 14px 14px 4px; }
.assist-input { display: flex; flex-direction: column; gap: 8px; }
.assist-input textarea.input { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: none; width: 100%; box-sizing: border-box; }
.assist-actions { display: flex; align-items: center; gap: 8px; }
.assist-actions .btn.primary { margin-left: auto; }
.mic { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.mic.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .mic.on { animation: none; } }
.proposal { border: 1px solid var(--accent); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 30; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgb(0 0 0 / .22); cursor: pointer; }
.fab:hover { filter: brightness(1.05); }
.fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.app main { padding-bottom: 88px; }

/* waiver */
.waiver-text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.waiver-text.plain { max-height: none; border: 0; padding: 0; background: none; }
.waiver-edit { font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; width: 100%; resize: vertical; box-sizing: border-box; }
.sigpad { position: relative; }
.sigpad canvas { display: block; width: 100%; height: 160px; background: #fff; border: 1px solid var(--line); border-radius: 12px; touch-action: none; cursor: crosshair; }
.sigpad .linkbtn { position: absolute; right: 10px; top: 8px; }
.has-err .sigpad canvas { border-color: var(--bad); }
.confirm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sig-img { max-width: 320px; width: 100%; border-bottom: 1px solid var(--ink); background: #fff; }
.id-img { max-width: 420px; width: 100%; border-radius: 8px; }
.waiver-doc h2 { margin-top: 6px; }
@media print {
  .topbar, .fab, .no-print { display: none !important; }
  body, .app, .set-card { background: #fff !important; color: #000 !important; }
  .set-card { border: 0 !important; padding: 0 !important; }
  .waiver-doc { max-width: none; padding: 0; }
}
.zoom-btns { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.zoom-btns button { width: 26px; height: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 6px; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.zoom-btns button:hover { color: var(--ink); }
.grid-scroll { touch-action: pan-x pan-y; }

/* booking */
.book-link { display: inline-block; margin-top: 4px; font-size: 14px; color: var(--ink); text-decoration: none; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.book-link b { color: var(--accent); }
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.svc.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.svc input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.svc-main { display: flex; flex-direction: column; min-width: 0; }
.svc-main small { color: var(--muted); font-size: 13px; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-pill { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.day-pill small { font-size: 11.5px; color: var(--muted); }
.day-pill b { font-size: 17px; }
.day-pill:disabled { opacity: .4; cursor: default; background: var(--sunk); }
.day-pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-pill.on small { color: inherit; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.time-pill { padding: 11px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.time-pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.bk-summary { font-size: 14.5px; }
.svc-edit { display: flex; flex-direction: column; gap: 10px; }
.svc-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.svc-row.off { opacity: .6; }
.svc-row .input, .hours-row .input { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; width: 100%; box-sizing: border-box; min-width: 0; }
.svc-row .money-in .input { padding-left: 22px; }
.svc-row .wide { grid-column: 1 / -2; }
.svc-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.check.small { font-size: 13.5px; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; align-items: center; }
.check.small input { width: 16px; height: 16px; margin: 0; }
.hours-edit { display: flex; flex-direction: column; gap: 6px; }
.hours-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 40px; }
.hours-times { display: flex; align-items: center; gap: 6px; max-width: 280px; }
@media (max-width: 520px) {
  .svc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .svc-row > input:first-child, .svc-row .wide { grid-column: 1 / -1; }
  .svc-row-actions { grid-column: 1 / -1; }
  .hours-row { grid-template-columns: 112px minmax(0, 1fr); }
}
.ev.pending { border-style: dashed; border-left-style: solid; background: repeating-linear-gradient(135deg, var(--accent-soft) 0 8px, color-mix(in srgb, var(--accent-soft) 60%, var(--surface)) 8px 16px); }
.ev .needs { font-weight: 700; color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.pending-box { border: 1.5px dashed var(--accent); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); }
@media (max-width: 520px) {
  .hours-row { grid-template-columns: 1fr; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .hours-times { max-width: none; }
  .hours-times .input { flex: 1; }
}
/* Calendar: follows the finger sideways, then slides to the next/previous day, week or month */
.cal-swipe-clip { overflow: hidden; }
.cal-swipe { touch-action: pan-y pinch-zoom; will-change: transform; }
/* Client confirmed: a check mark in the top-right corner, like Square */
.ev .ev-ok { position: absolute; top: 3px; right: 4px; width: 16px; height: 16px; border-radius: 50%; background: #2e9d5b; color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.ev:has(.ev-ok) b { padding-right: 18px; }
.mev .mev-ok { margin-left: auto; flex-shrink: 0; color: #2e9d5b; font-style: normal; font-weight: 700; font-size: 11px; }
.confirm-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.client-link { color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.client-link b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.client-link span { font-size: 18px; line-height: 1; }
/* What's new strip under the header */
.activity { display: flex; align-items: stretch; gap: 4px; max-width: 1100px; margin: 0 auto; padding: 6px 12px 8px; }
.activity-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 9px 12px; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.activity-main > span:not(.activity-go) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-main em { font-style: normal; color: var(--muted); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.activity-go { color: var(--accent); font-size: 20px; line-height: 1; }
.activity-x { border: 0; background: none; color: var(--muted); font-size: 22px; padding: 0 8px; cursor: pointer; }
.activity-list { display: flex; flex-direction: column; gap: 6px; }
.activity-list button { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; }
.activity-list button.new { border-color: var(--accent); background: var(--accent-soft); }
.activity-list b { grid-column: 1; }
.activity-list span { grid-column: 1; color: var(--muted); font-size: 13.5px; }
.activity-list small { grid-column: 2; grid-row: 1; color: var(--muted); }
.photo-btn { position: relative; overflow: hidden; cursor: pointer; }
.photo-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.photo-btn.busy { opacity: .6; }

/* Studio routing: take a request or send it to an artist */
.route-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); }
.route-state { font-size: 14px; color: var(--muted); }
.route-state b { color: var(--ink); }
.route-state.ok { color: var(--ok); font-weight: 600; }
.route-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.sent { background: var(--sunk); color: var(--ink); }
.chip.mine { background: var(--ok-soft); color: var(--ok); }
.artist-pick { display: grid; gap: 8px; margin: 4px 0 12px; }
.artist-pick button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card, transparent); color: inherit; font: inherit; cursor: pointer; }
.artist-pick button .nm { font-weight: 600; }
.artist-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.artist-pick button.add { justify-content: center; border-style: dashed; color: var(--muted); }
.artist-form { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.artist-form .row-btns { display: flex; justify-content: flex-end; gap: 8px; }
.share-text { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--sunk); padding: 10px 12px; border-radius: 10px; max-height: 180px; overflow: auto; }
.sa-list { display: grid; gap: 8px; margin-top: 10px; }
.sa-row { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.sa-row .nm { font-weight: 600; }
.btn.ghost.danger { background: transparent; border-color: transparent; color: var(--bad); }
.fwd-page { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 14px; }
.fwd-page .facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.fwd-page .facts dt { color: var(--muted); }
.fwd-page .facts dd { margin: 0; overflow-wrap: anywhere; }
.fwd-page .ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.fwd-page .ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sw-row > span { display: grid; gap: 2px; }
.sa-h { margin: 16px 0 4px; font-size: 15px; }

html.embedded .form-page { padding-top: 8px; }
.studio-form { display: grid; gap: 8px; }
.studio-form .row-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
html.embedded .form-page { border-radius: 16px; }

/* Drag an entry to a new time or day */
.ev, .mev { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ev.drag-src, .mev.drag-src { opacity: .3; }
.ev.ghost { left: 2px; width: calc(100% - 4px); z-index: 5; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); outline: 2px solid var(--accent); outline-offset: -1px; }
.grid.dragging .slot { pointer-events: none; }
.grid.dragging, .month:has(.drag-chip) { cursor: grabbing; }
@media (hover: hover) { .ev:not(.ghost), .mev { cursor: grab; } }
.mday.drop { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.mev.drag-chip { position: fixed; z-index: 50; transform: translate(-50%, -120%); pointer-events: none; max-width: 160px; background: var(--card, #fff); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); border-radius: 8px; padding: 4px 8px; }
.warn-box { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); }

/* A field scrolled into view stops a little below the sheet's top edge. */
.sheet .input { scroll-margin-top: 16px; }
/* Behind the iPhone keyboard's see-through toolbar: the sheet's colour, not the calendar. */
.sheet-bg::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: var(--surface); pointer-events: none; }
@media (min-width: 700px) { .sheet-bg::after { display: none; } }
.consent-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 16px; background: #2b2420; color: #f4efe6; font-size: 13px; }
.demo-bar .linkbtn { color: #ffd3bf; font-weight: 600; }
#demo .row-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Studio calendar: artists, colours, columns (like Square Appointments) */
.staff-bar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.staff-bar::-webkit-scrollbar { display: none; }
.staff-bar button { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.staff-bar button i { width: 10px; height: 10px; border-radius: 50%; }
.staff-bar button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ev.staffed { background: color-mix(in srgb, var(--c) 15%, var(--surface)); border-color: var(--c); }
.ev.staffed.consult { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 15%, var(--surface)) 0 6px, color-mix(in srgb, var(--c) 7%, var(--surface)) 6px 12px); }
.ev .ev-staff { color: var(--c, var(--muted)); font-weight: 600; }
.dh.staff-h { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px; min-width: 0; }
.dh.staff-h i { width: 22px; height: 4px; border-radius: 2px; background: var(--c); }
.dh.staff-h b { font-size: 12.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid.staff-cols .col + .col { border-left: 1px solid var(--line); }
.staff-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-pick button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.staff-pick button i { width: 10px; height: 10px; border-radius: 50%; }
.staff-pick button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.by-artist .ba-head, .by-artist .ba-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 0.6fr 1.3fr 0.9fr; gap: 8px; align-items: center; }
.by-artist .ba-head { padding: 4px 8px; }
.by-artist .ba-head span:not(:first-child), .by-artist .ba-row span:not(:first-child) { text-align: right; }
.by-artist .ba-row { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; padding: 10px 8px; text-align: left; cursor: pointer; border-radius: 0; }
.by-artist .ba-row[aria-pressed="true"] { background: var(--sunk); }
.by-artist .ba-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.by-artist .ba-name i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.by-artist .ba-row small { display: block; font-size: 11px; }
.by-artist .ba-total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }

/* Instagram DMs from new people: add to requests or skip */
.ig-inbox { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 4px 0 12px; background: var(--surface); display: grid; gap: 10px; }
.ig-head { display: flex; justify-content: space-between; align-items: center; }
.ig-head b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); margin-right: 8px; vertical-align: 1px; }
.ig-item { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.ig-who { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ig-who .ig-when { margin-left: auto; }
.ig-msgs p { margin: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ig-msgs p.out { color: var(--muted); }
.ig-btns { display: flex; justify-content: flex-end; gap: 8px; }
.ig-skipped-link { margin: 0 0 8px; text-align: right; font-size: 13px; }
.rows .az { position: sticky; top: 0; z-index: 1; padding: 6px 14px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.del-client { align-self: flex-start; padding-left: 0; margin-top: 2px; }
.del-box { display: grid; gap: 6px; padding: 12px; border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); border-radius: 12px; margin-top: 8px; }
.del-box .row-btns { display: flex; justify-content: flex-end; gap: 8px; }
.btn.danger-fill { background: var(--bad); color: #fff; border-color: var(--bad); }
.keep-sync { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0 10px; } .keep-sync input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.ig-diag { display: grid; gap: 2px; margin: 4px 0 10px; }
.detail-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; display: grid; }

/* Number of new requests on the "Requests" tab */
.tab-badge { display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px; margin-left:6px; border-radius:9px; background:var(--accent, #C2411C); color:#fff; font-size:11px; font-weight:700; line-height:1; vertical-align:2px; font-variant-numeric:tabular-nums; }
@media (max-width: 520px) {
  .tabs a { position: relative; }
  .tab-badge { position:absolute; top:0; right:0; margin:0; min-width:16px; height:16px; padding:0 4px; font-size:10px; }
}

/* Photo viewer: always a visible way back */
.lightbox { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); touch-action: pan-y; z-index: 200; background: rgb(0 0 0 / .95); }
.lb-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgb(255 255 255 / .16); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.lb-count { color: rgb(255 255 255 / .8); font-size: 13px; align-self: center; min-width: 44px; text-align: center; }

/* Pull to refresh */
.ptr { position: fixed; top: env(safe-area-inset-top); left: 50%; z-index: 120; width: 36px; height: 36px; border-radius: 18px; background: var(--surface); box-shadow: 0 2px 10px rgb(0 0 0 / .18); display: grid; place-items: center; pointer-events: none; }
.ptr-ic { font-size: 18px; font-weight: 700; color: var(--accent, #C2411C); line-height: 1; transition: transform .1s; }
.ptr-ic.spin { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

.need-contact { display: grid; gap: 6px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft, #fbe7df); }
.need-contact label { font-weight: 600; font-size: 13.5px; }
.need-contact .req { color: var(--bad, #b42318); font-weight: 600; font-size: 12px; margin-left: 4px; }

.list-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Waiver / deposit actions in the client card: real buttons, easy to spot */
.sec-action { width: 100%; margin-top: 8px; justify-content: center; font-weight: 600; }

/* ===== Fancy 3D action buttons (waiver / deposit) ===== */
.btn.fancy { position:relative; height:58px; border:0; border-radius:16px; gap:14px; padding:0 18px; display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:17px; font-weight:650; letter-spacing:.01em; text-shadow:0 1px 1px rgb(80 20 0 / .35);
  background:linear-gradient(180deg, #DA5A2E 0%, #C2411C 55%, #A7350F 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -2px 0 rgb(0 0 0 / .15), 0 6px 14px -4px rgb(167 53 15 / .55), 0 2px 3px rgb(0 0 0 / .08);
  transition:transform .15s, box-shadow .15s; overflow:visible; }
.btn.fancy:active { transform:translateY(1px) scale(.99); }
.btn.fancy:disabled { opacity:.7; }
.btn.fancy::after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .22) 48%, transparent 60%); background-size:250% 100%; background-position:120% 0; }
.btn.fancy.play::after { animation:fx-sweep 1.1s 1.2s ease-out both; }
@keyframes fx-sweep { to { background-position:-60% 0; } }
.fx-stage { width:44px; height:44px; flex:none; position:relative; perspective:220px; }

.fx-coin { position:absolute; left:50%; top:50%; width:34px; height:34px; margin:-17px 0 0 -17px; transform-style:preserve-3d; transform:rotateY(-18deg) rotateX(8deg); }
.fx-face, .fx-edge { position:absolute; inset:0; border-radius:50%; }
.fx-face { display:grid; place-items:center; backface-visibility:hidden; -webkit-backface-visibility:hidden;
  background: radial-gradient(circle at 32% 28%, #FFF6CF 0 8%, #FFD86A 22%, #F0B232 48%, #C98612 72%, #9C6408 100%);
  box-shadow: inset 0 0 0 2px #B97B0E, inset 0 0 0 4px #FFE08A, inset 0 0 0 5px #C98612, inset 0 -3px 5px rgb(120 70 0 / .45); }
.fx-face b { font:900 17px/1 Georgia, "Times New Roman", serif; color:#8A5406; text-shadow:0 1px 0 #FFE9A8, 0 -1px 0 rgb(90 50 0 / .5); }
.fx-face.front { transform:translateZ(2.5px); }
.fx-face.back { transform:rotateY(180deg) translateZ(2.5px); }
.fx-edge { background:linear-gradient(90deg, #8E5A08, #E7A92B 30%, #FFE08A 50%, #D8971C 70%, #8E5A08); }
.fx-edge.e1 { transform:translateZ(1.5px); } .fx-edge.e2 { transform:translateZ(.5px); } .fx-edge.e3 { transform:translateZ(-.5px); } .fx-edge.e4 { transform:translateZ(-1.5px); }
.fx-gloss { position:absolute; inset:0; border-radius:50%; transform:translateZ(2.6px); pointer-events:none; overflow:hidden; }
.fx-gloss::before { content:""; position:absolute; top:-20%; bottom:-20%; width:30%; left:-60%; background:linear-gradient(90deg, transparent, rgb(255 255 255 / .85), transparent); transform:skewX(-18deg); }
.fx-shadow { position:absolute; left:50%; bottom:1px; width:28px; height:6px; margin-left:-14px; border-radius:50%; background:radial-gradient(rgb(60 15 0 / .45), transparent 70%); }
.fx-spark { position:absolute; width:10px; height:10px; opacity:0; border-radius:50%;
  background:radial-gradient(circle, #fff 0 20%, transparent 22%), conic-gradient(from 0deg, transparent 0 40deg, #fff 45deg, transparent 50deg 130deg, #fff 135deg, transparent 140deg 220deg, #fff 225deg, transparent 230deg 310deg, #fff 315deg, transparent 320deg); }
.fx-spark.sp1 { top:0; right:0; } .fx-spark.sp2 { bottom:6px; left:-2px; width:7px; height:7px; }
.play .fx-coin { animation:fx-coinIn 1.25s cubic-bezier(.25,.9,.3,1) both; }
.play .fx-shadow { animation:fx-shadowIn 1.25s cubic-bezier(.25,.9,.3,1) both; }
.play .fx-gloss::before { animation:fx-gloss .6s 1.05s ease-out both; }
.play .fx-spark.sp1 { animation:fx-twinkle .6s 1.15s ease-out both; } .play .fx-spark.sp2 { animation:fx-twinkle .6s 1.3s ease-out both; }
@keyframes fx-coinIn { 0% { transform:translateY(-34px) rotateY(0deg) rotateX(8deg) scale(.7); opacity:0; } 15% { opacity:1; }
  60% { transform:translateY(2px) rotateY(620deg) rotateX(8deg) scale(1.05); } 75% { transform:translateY(-4px) rotateY(690deg) rotateX(8deg) scale(1); }
  100% { transform:translateY(0) rotateY(702deg) rotateX(8deg) scale(1); } }
@keyframes fx-shadowIn { 0% { transform:scale(.3); opacity:0; } 60% { transform:scale(1.1); opacity:1; } 75% { transform:scale(.85); } 100% { transform:scale(1); opacity:1; } }
@keyframes fx-gloss { to { left:130%; } }
@keyframes fx-twinkle { 0% { opacity:0; transform:scale(.2) rotate(0); } 50% { opacity:1; transform:scale(1.2) rotate(45deg); } 100% { opacity:0; transform:scale(.6) rotate(90deg); } }

.fx-scroll { position:absolute; left:50%; top:50%; width:34px; height:40px; margin:-20px 0 0 -17px; transform-style:preserve-3d; transform:rotateX(14deg) rotateY(-10deg); }
.fx-rod { position:absolute; left:-2px; right:-2px; height:8px; border-radius:4px; z-index:2;
  background:linear-gradient(180deg, #F3DDB0 0%, #D9B477 35%, #A97A35 70%, #6E4A18 100%); box-shadow:0 1px 2px rgb(60 30 0 / .45); }
.fx-rod::before, .fx-rod::after { content:""; position:absolute; top:-1px; width:5px; height:10px; border-radius:3px; background:linear-gradient(180deg,#8b5a2b,#4a2b10); }
.fx-rod::before { left:-3px; } .fx-rod::after { right:-3px; }
.fx-rod.top { top:0; } .fx-rod.bottom { bottom:0; }
.fx-parch { position:absolute; left:1px; right:1px; top:4px; bottom:4px; transform-origin:50% 0;
  background: linear-gradient(90deg, rgb(150 100 40 / .28), transparent 18%, transparent 82%, rgb(150 100 40 / .28)), radial-gradient(120% 80% at 50% 40%, #FFF8E6 0%, #F6E6C2 70%, #E9D2A0 100%);
  box-shadow: inset 0 0 4px rgb(140 90 30 / .35); }
.fx-parch i { position:absolute; left:6px; right:6px; height:1.6px; border-radius:1px; background:#C9AE7E; }
.fx-parch i:nth-child(1){ top:7px; } .fx-parch i:nth-child(2){ top:11px; } .fx-parch i:nth-child(3){ top:15px; right:12px; }
.fx-ink { position:absolute; left:6px; bottom:6px; width:18px; height:8px; }
.fx-ink path { stroke-dasharray:40; stroke-dashoffset:0; }
.fx-seal { position:absolute; right:-6px; bottom:3px; width:17px; height:17px; border-radius:50%; z-index:3; display:grid; place-items:center;
  background: radial-gradient(circle at 35% 30%, #F0605A 0 12%, #C2231E 40%, #8E0F0D 80%, #6A0807 100%);
  box-shadow: 0 2px 3px rgb(60 0 0 / .45), inset 0 -2px 3px rgb(0 0 0 / .35), inset 0 1px 1px rgb(255 160 150 / .6);
  font:800 9px/1 Georgia, serif; color:#5E0605; text-shadow:0 1px 0 rgb(255 140 130 / .5); }
.play .fx-parch { animation:fx-unroll .75s cubic-bezier(.2,.8,.2,1) both; }
.play .fx-rod.bottom { animation:fx-rodDown .75s cubic-bezier(.2,.8,.2,1) both; }
.play .fx-ink path { animation:fx-write .55s .75s ease-out both; }
.play .fx-seal { animation:fx-stamp .45s 1.25s cubic-bezier(.3,1.6,.5,1) both; }
.play .fx-scroll { animation:fx-settle 1.8s ease-out both; }
@keyframes fx-unroll { 0% { transform:rotateX(-88deg); } 100% { transform:rotateX(0); } }
@keyframes fx-rodDown { 0% { transform:translateY(-30px); } 100% { transform:translateY(0); } }
@keyframes fx-write { from { stroke-dashoffset:40; } to { stroke-dashoffset:0; } }
@keyframes fx-stamp { 0% { transform:translateZ(40px) scale(2.2); opacity:0; } 60% { transform:translateZ(0) scale(.85); opacity:1; } 80% { transform:scale(1.08); } 100% { transform:scale(1); opacity:1; } }
@keyframes fx-settle { 0% { transform:rotateX(30deg) rotateY(-25deg); } 100% { transform:rotateX(14deg) rotateY(-10deg); } }
@media (prefers-reduced-motion: reduce) { .btn.fancy.play, .btn.fancy.play * , .btn.fancy.play::after { animation:none !important; } }
.settings .back { align-self: flex-start; justify-self: start; padding-left: 0; }

.map-page h1 { margin: 6px 0 4px; }
.map-addr { font-size: 17px; margin: 0 0 18px; }
.map-btns { display: grid; gap: 10px; margin-bottom: 14px; }
.map-btns .btn { height: 52px; font-size: 16px; justify-content: center; }

.sa-access { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.invite-box { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--accent-soft, #fbe7df); }
.chip.waiting { background: #fdecc8; color: #7a4a00; }

.txns .txn-day h3 { font-size: 14px; font-weight: 700; margin: 14px 0 4px; }
.txns .txn-method { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 92px; }
.txns .lines-what { display: grid; gap: 2px; }
.txns .txn-sub { font-weight: 400; }
