/* Booking pages: shared styles for every company site and the colleague admin.
   Each company's colours, fonts and logo come from its row in the `sites` table and arrive as CSS tokens
   (see applyBrand in common.js). The values below are a neutral fallback only.
   Token roles: --accent = interactive UI (selected day, slots, links); --cta = the one primary button per view;
   --head = headings; --eyebrow = small uppercase labels; --highlight = decorative brand mark (e.g. today). */
:root {
  --bg: #f3f3f1; --card: #ffffff; --card-2: #f3f3f1; --fg: #1d2129; --muted: #5d6270; --line: #dcdcd8; --head: #1d2129;
  --accent: #2b4a8b; --accent-fg: #ffffff; --cta: #2b4a8b; --cta-fg: #ffffff; --eyebrow: #5d6270; --highlight: #c99a06;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--card));
  --danger: #b4443a; --ok: #2f7a4f;
  --font-head: system-ui, "Segoe UI", sans-serif;
  --font-body: system-ui, "Segoe UI", sans-serif;
  --body-size: 15px;
  --radius: 10px;
  --logo-light: block; --logo-dark: none; --logo-plate: transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #10131a; --card: #171b24; --card-2: #1c212c; --fg: #e9ebef; --muted: #a2a7b3; --line: #2a303d; --head: #f4f5f7;
    --accent: #9db4f0; --accent-fg: #10131a; --cta: #9db4f0; --cta-fg: #10131a; --eyebrow: #a2a7b3; --danger: #e0756b; --ok: #6fcf97; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #10131a; --card: #171b24; --card-2: #1c212c; --fg: #e9ebef; --muted: #a2a7b3; --line: #2a303d; --head: #f4f5f7;
  --accent: #9db4f0; --accent-fg: #10131a; --cta: #9db4f0; --cta-fg: #10131a; --eyebrow: #a2a7b3; --danger: #e0756b; --ok: #6fcf97; color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--body-size); line-height: 1.55;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
/* Hide the page for a moment until the company's brand is applied (max ~2.5s, see Booking.init) */
html:not(.brand-ready) .wrap { opacity: 0; animation: reveal-anyway 0s 3s forwards; }
@keyframes reveal-anyway { to { opacity: 1; } }
.wrap { transition: opacity .15s ease; }
body.embed { background: transparent; padding: 0; }
body.embed .topbar, body.embed .foot { display: none; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; text-wrap: balance; line-height: 1.2; color: var(--head); letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 800; } h2 { font-size: 1.15rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; } a { color: var(--accent); }
button, input, select, textarea { font-family: var(--font-head); }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--highlight) 40%, transparent); color: var(--head); }

.wrap { max-width: 1120px; margin: 0 auto; display: grid; gap: 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 40px; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 12px; color: var(--head); }
.brand-logo { display: inline-flex; align-items: center; background: var(--logo-plate); border-radius: 8px; padding: 0; }
:root:not([data-theme="light"]) .brand-logo { padding: 0; }
.brand-logo .logo-light { display: var(--logo-light); width: auto; max-width: 220px; }
.brand-logo .logo-dark { display: var(--logo-dark); width: auto; max-width: 220px; }
.brand-logo img { padding: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { padding: 6px 10px; } }
:root[data-theme="dark"] .brand-logo { padding: 6px 10px; }
.logo-text { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--head); }
.brand-sep { width: 1px; height: 22px; background: var(--line); }
.brand-product { font-family: var(--font-head); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--eyebrow); }
.eyebrow { font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--eyebrow); font-weight: 700; }
.toplink { font-family: var(--font-head); font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--accent); }
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--font-head); font-size: .84rem; font-weight: 700; color: var(--muted); }
.step { display: inline-flex; align-items: center; gap: 8px; }
.step-n { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-grid; place-items: center; font-size: .72rem; }
.step.is-current, .step.is-done { color: var(--head); }
.step.is-current .step-n, .step.is-done .step-n { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.step-line { width: 32px; height: 1px; background: var(--line); }
.step-line.is-done { background: var(--accent); }
body.embed .stepper { display: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(2, 8, 27, 0.05); }
.booking { display: grid; grid-template-columns: 320px 1fr; min-height: 560px; }
@media (max-width: 820px) { .booking { grid-template-columns: 1fr; } }
.pane-info { padding: 28px 26px; border-right: 1px solid var(--line); background: var(--card-2); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pane-info .pane-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.host-name { font-family: var(--font-head); font-weight: 800; color: var(--head); font-size: 1rem; line-height: 1.2; }
.host-org { font-size: .84rem; color: var(--muted); }
@media (max-width: 820px) { .pane-info { border-right: 0; border-bottom: 1px solid var(--line); } }
.pane-main { padding: 28px 28px 24px; min-width: 0; display: grid; align-content: start; gap: 18px; }
.host { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 48px; height: 48px; font-size: 1.1rem; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; flex-shrink: 0; }
.meta { display: grid; gap: 8px; color: var(--muted); font-size: 0.92rem; }
.meta div { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.meta span { overflow-wrap: anywhere; }
.meta svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.desc { color: var(--muted); max-width: 42ch; }
.steps { display: grid; grid-template-columns: 1fr; gap: 18px; }
/* Times sit beside the calendar when there is room; otherwise they stack below it */
@media (min-width: 980px), (min-width: 600px) and (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr) 232px; gap: 28px; } }
.calendar { min-width: 0; display: grid; gap: 12px; align-content: start; }
.cal-head { display: flex; justify-content: space-between; align-items: center; }
.cal-head h2 { font-size: 1.05rem; }
.nav { display: flex; gap: 4px; }
.nav button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); display: grid; place-items: center; }
.nav button:hover:not(:disabled) { background: var(--accent-soft); }
.nav button:disabled { opacity: 0.35; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 392px; }
.dow { text-align: center; font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 4px 0; }
.day { height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; display: grid; place-items: center; position: relative; padding: 0; }
.day.avail { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.day.avail:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.day.sel { background: var(--accent); color: var(--accent-fg); }
.day.today::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--highlight); }
.day:disabled { cursor: default; opacity: 0.6; }
.day.today:disabled { color: var(--fg); font-weight: 800; opacity: .8; }
.tz { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }
.tz svg { width: 16px; height: 16px; color: var(--accent); }
.tz select { width: auto; max-width: min(100%, 260px); font-size: 0.85rem; font-weight: 700; font-family: var(--font-head); color: var(--head); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.legend .sw.avail { background: var(--accent-soft); } .legend .sw.sel { background: var(--accent); } .legend .sw.today { width: 8px; height: 8px; background: var(--highlight); }
.slots { display: grid; gap: 10px; align-content: start; min-width: 0; }
.slots-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.slots-count { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.slot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 2px; align-content: start; }
.slot-list .empty, .slot-group { grid-column: 1 / -1; }
.slot-group { font-family: var(--font-head); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--eyebrow); margin-top: 4px; }
.slot-group:first-child { margin-top: 0; }
.slot { display: grid; grid-template-columns: 1fr; gap: 6px; }
.slot.armed { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
.slot-btn { border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: var(--radius); padding: 8px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 42px; }
.slot-btn:hover { background: var(--accent-soft); }
.slot.armed .slot-btn { background: var(--muted); border-color: var(--muted); color: var(--card); }
.slot .confirm { display: none; border: 0; background: var(--cta); color: var(--cta-fg); border-radius: var(--radius); padding: 10px 14px; font-weight: 700; }
.slot.armed .confirm { display: block; }
.empty { color: var(--muted); font-size: 0.92rem; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); }
.source { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.source .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

form { display: grid; gap: 14px; } form.narrow { max-width: 460px; }
.form-head { display: grid; gap: 4px; margin-bottom: 18px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 640px; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.hint { font-size: .84rem; color: var(--muted); }
.slot-card { display: grid; gap: 4px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.slot-card strong { font-family: var(--font-head); font-size: 1.05rem; font-weight: 800; color: var(--head); font-variant-numeric: tabular-nums; }
.slot-card-sub { font-size: .84rem; color: var(--muted); }
label { display: grid; gap: 6px; font-family: var(--font-head); font-size: 0.86rem; font-weight: 600; color: var(--fg); }
label small { font-weight: 400; color: var(--muted); font-family: var(--font-body); font-size: .8rem; }
input, textarea, select { font-size: 0.95rem; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; font-family: var(--font-body); min-height: 44px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); outline: none; }
textarea { min-height: 84px; resize: vertical; }
.btn { border: 0; border-radius: 999px; padding: 11px 22px; font-weight: 700; background: var(--cta); color: var(--cta-fg); text-decoration: none; display: inline-block; font-size: .92rem; min-height: 42px; }
.btn:hover:not(:disabled) { filter: brightness(0.95); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: transparent; color: var(--head); border: 1px solid color-mix(in srgb, var(--head) 22%, transparent); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.sm { padding: 6px 14px; font-size: 0.82rem; min-height: 32px; }
.btn.teams { background: #5B5FC7; color: #fff; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back { background: transparent; border: 0; color: var(--accent); padding: 0; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; font-size: .9rem; justify-self: start; }
.summary { display: grid; gap: 6px; padding: 14px; background: var(--card-2); border-radius: var(--radius); font-size: 0.92rem; }
.summary strong { font-family: var(--font-head); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--head); }
.notice { padding: 10px 14px; border-radius: var(--radius); font-size: 0.92rem; background: var(--accent-soft); color: var(--fg); }
.notice.err { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.notice.warn { background: color-mix(in srgb, var(--highlight) 18%, var(--card)); }
.done { display: grid; gap: 20px; max-width: 760px; }
.done-head { display: flex; gap: 16px; align-items: center; }
.done-head h2 { font-size: 1.5rem; font-weight: 800; }
.check { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 16%, var(--card)); color: var(--ok); display: grid; place-items: center; flex-shrink: 0; }
.done-grid { display: flex; flex-wrap: wrap; gap: 18px 36px; padding: 18px 22px; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; }
.done-grid > div { display: grid; gap: 3px; min-width: 150px; }
.done-grid strong { font-family: var(--font-head); font-weight: 800; color: var(--head); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.done-grid span:not(.eyebrow) { font-size: .9rem; color: var(--muted); }
.manage { display: grid; gap: 8px; }
.manage-title { font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.next-steps { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: .92rem; }
.next-steps li { display: flex; gap: 12px; align-items: flex-start; }
.next-steps .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; flex-shrink: 0; font-family: var(--font-head); font-size: .75rem; font-weight: 800; }
.next-steps .n.ok { background: color-mix(in srgb, var(--ok) 16%, var(--card)); color: var(--ok); }
.pill { display: inline-block; font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, var(--card)); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--highlight) 22%, var(--card)); color: var(--head); }
.pill.err { background: color-mix(in srgb, var(--danger) 14%, var(--card)); color: var(--danger); }
.hero { display: grid; gap: 10px; padding: 28px 24px; }
.hero p { color: var(--muted); max-width: 60ch; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 0 24px 24px; }
.person { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; color: var(--fg); min-width: 0; }
.person:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-1px); }
.person .name { font-family: var(--font-head); font-weight: 700; color: var(--head); overflow-wrap: anywhere; }
.person .sub { color: var(--muted); font-size: 0.86rem; overflow-wrap: anywhere; }

.panel { padding: 22px 24px; display: grid; gap: 22px; }
.settings { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.settings .wide { grid-column: 1 / -1; }
.settings > label:not(.switch) { align-self: end; }
.settings h3 { grid-column: 1 / -1; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.settings h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { flex-direction: row; display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-weight: 600; cursor: pointer; }
.days label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.days input { width: auto; margin: 0; }
.switch { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; font-family: var(--font-body); font-weight: 400; }
.switch input { width: auto; margin-top: 4px; }
.switch strong { font-family: var(--font-head); display: block; }
.linkbox { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 12px 14px; background: var(--card-2); border-radius: var(--radius); }
.linkbox code, .linkbox pre { font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; overflow-wrap: anywhere; white-space: pre-wrap; margin: 0; user-select: all; }
@media (max-width: 520px) { .linkbox { grid-template-columns: 1fr; } }
.status-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.blist { display: grid; gap: 8px; }
.brow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.92rem; }
.brow time { font-family: var(--font-head); font-weight: 700; font-size: 0.86rem; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--head); }
.brow .who { min-width: 0; }
.brow .who span { display: block; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
@media (max-width: 560px) { .brow { grid-template-columns: 1fr; } }
.foot { font-size: 0.8rem; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: no-preference) { .day, .slot-btn, .btn, .person { transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform .2s ease; } }

/* Team pages */
.members { display: flex; flex-wrap: wrap; gap: 8px; }
.members .member { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; }
.members .avatar { width: 26px; height: 26px; font-size: .75rem; }
.modes { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.modes legend { padding: 0; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: .88rem; min-height: 40px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.person .badge { font-family: var(--font-head); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--eyebrow); }
.avatars { display: flex; }
.avatars .avatar { width: 34px; height: 34px; font-size: .85rem; border: 2px solid var(--card); margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }
/* Admin: team links and team pages */
.links-group { display: grid; gap: 6px; }
.links-group h3 { margin-top: 6px; }
.link-row { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; }
.link-row code { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; overflow-wrap: anywhere; color: var(--muted); }
.link-row .who { font-family: var(--font-head); font-weight: 700; color: var(--head); overflow-wrap: anywhere; }
@media (max-width: 560px) { .link-row { grid-template-columns: 1fr; } }
.member-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.member-picks label { display: flex; flex-direction: row; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-weight: 600; cursor: pointer; }
.member-picks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.member-picks input { width: auto; margin: 0; }

/* Admin layout: section nav + content */
.admin-wrap { max-width: 1180px; }
.admin-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.admin-nav { flex: 1 1 200px; max-width: 230px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; position: sticky; top: 16px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-family: var(--font-head); font-size: .9rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.admin-nav a:hover { background: var(--card-2); color: var(--head); }
.admin-nav a.is-current { background: var(--accent-soft); color: var(--head); }
.admin-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-count { margin-left: auto; font-size: .72rem; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; }
.admin-main { flex: 999 1 560px; min-width: 0; display: grid; gap: 16px; }
@media (max-width: 760px) { .admin-nav { position: static; max-width: none; flex-direction: row; flex-wrap: wrap; } .admin-nav a { padding: 8px 10px; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin-top: 2px; }
.share-strip { padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; }
.share-main { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.share-main code { font-family: ui-monospace, Menlo, monospace; font-size: .95rem; font-weight: 600; color: var(--head); overflow-wrap: anywhere; }
.share-embed { flex: 1 1 100%; }
.share-embed summary { list-style: none; display: inline-block; cursor: pointer; }
.share-embed summary::-webkit-details-marker { display: none; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.stat-v { font-family: var(--font-head); font-weight: 800; color: var(--head); display: flex; align-items: center; gap: 8px; }
.stat-v .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.stat-v .dot.warn { background: var(--highlight); } .stat-v .dot.err { background: var(--danger); } .stat-v .dot.off { background: var(--line); }
.field-title { font-family: var(--font-head); font-size: .86rem; font-weight: 600; margin-bottom: 6px; }
.info-line { display: flex; gap: 10px; align-items: flex-start; background: var(--card-2); border-radius: 10px; padding: 12px 14px; font-size: .88rem; color: var(--muted); }
.info-line svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.info-line strong { color: var(--head); }
.save-row { position: sticky; bottom: 0; background: var(--card); padding: 12px 0 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.login-panel { max-width: 640px; }
.settings h3 { font-size: 1.05rem; }

/* Compact host header on phones: details fold behind the info button */
.info-toggle { display: none; margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); place-items: center; flex-shrink: 0; }
.info-toggle[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.host-summary { display: none; font-size: .88rem; color: var(--muted); }
@media (max-width: 820px) {
  .pane-info { padding: 18px 20px; gap: 12px; }
  .pane-info h1 { font-size: 1.3rem; }
  .info-toggle { display: grid; }
  .host-summary { display: block; }
  .pane-info:not(.expanded) .meta, .pane-info:not(.expanded) .desc, .pane-info:not(.expanded) .pane-foot, .pane-info:not(.expanded) .members { display: none; }
  .pane-info.expanded .host-summary { display: none; }
  .pane-main { padding: 20px 16px 24px; }
  .slot-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
  .slot.armed { grid-column: auto; grid-template-columns: 1fr; }
  .slot.armed .confirm { display: none; }
  body:not(.embed) .wrap { padding-bottom: 72px; }
}
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(2, 8, 27, 0.08); }
.mobile-bar-text { display: grid; min-width: 0; }
.mobile-bar-text strong { font-family: var(--font-head); font-weight: 800; color: var(--head); font-variant-numeric: tabular-nums; }
@media (min-width: 821px) { .mobile-bar { display: none !important; } }
.reschedule-note { margin-bottom: 18px; border-left: 4px solid var(--accent); }
.reschedule-note a { color: var(--accent); font-weight: 700; }
