/* Smile Perspective design system. Mobile first, light and dark, no inline styles (CSP). */

:root {
    color-scheme: light dark;
    --brand: #0f6e56;
    --brand-hover: #0b5c48;
    --brand-ink: #ffffff;
    --brand-soft: #e1f5ee;
    --brand-soft-ink: #085041;
    --brand-mid: #9fe1cb;

    --bg: #f5f6f4;
    --surface: #ffffff;
    --surface-2: #f0f2ef;
    --ink: #17201d;
    --ink-2: #55625d;
    --ink-3: #8a958f;
    --line: #e3e7e3;
    --line-strong: #cfd6d1;

    --ok: #17663a; --ok-bg: #e6f4ea;
    --err: #a32d2d; --err-bg: #fcebeb;
    --warn: #7a5200; --warn-bg: #fdf1d6;

    --av1: #e1f5ee; --av1-ink: #085041;
    --av2: #faece7; --av2-ink: #712b13;
    --av3: #eeedfe; --av3-ink: #3c3489;
    --av4: #fbeaf0; --av4-ink: #72243e;
    --av5: #e6f1fb; --av5-ink: #0c447c;

    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --shadow: 0 1px 2px rgb(16 24 20 / 5%), 0 4px 16px rgb(16 24 20 / 6%);
    --shadow-lg: 0 10px 40px rgb(16 24 20 / 16%);
    --sidebar: 248px;
    --tabbar: 68px;
    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
    :root {
        --brand: #2bb38c;
        --brand-hover: #39c79e;
        --brand-ink: #04241b;
        --brand-soft: #123a30;
        --brand-soft-ink: #9fe1cb;
        --brand-mid: #1d9e75;
        --bg: #0f1412;
        --surface: #171d1b;
        --surface-2: #1f2724;
        --ink: #e8eeeb;
        --ink-2: #a5b1ac;
        --ink-3: #74807b;
        --line: #26302c;
        --line-strong: #34403b;
        --ok: #7fd49d; --ok-bg: #143322;
        --err: #f09595; --err-bg: #3a1717;
        --warn: #f0c46a; --warn-bg: #3a2c0d;
        --av1: #123a30; --av1-ink: #9fe1cb;
        --av2: #3d2015; --av2-ink: #f5c4b3;
        --av3: #262257; --av3-ink: #cecbf6;
        --av4: #3d1626; --av4-ink: #f4c0d1;
        --av5: #0f2a45; --av5-ink: #b5d4f4;
        --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
        --shadow-lg: 0 10px 40px rgb(0 0 0 / 50%);
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; margin: 0 0 .25rem; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 1.75rem 0 .75rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 600; margin: 0; }
p { margin: 0 0 .75rem; }
p.lead, .lead { color: var(--ink-2); margin: 0 0 1.25rem; }
.muted, .hint { color: var(--ink-2); }
.hint { font-size: .85rem; font-weight: 400; }
.mono { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .8rem; word-break: break-all; }
.sprite { display: none; }
[hidden] { display: none !important; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-lg { width: 24px; height: 24px; }
.i-sm { width: 16px; height: 16px; }

/* ---------- App shell ---------- */
.app { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; z-index: 30; transform: translateX(-100%); transition: transform .22s ease; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.scrim { position: fixed; inset: 0; background: rgb(0 0 0 / 35%); z-index: 25; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: 1.02rem; padding: 4px 8px 18px; text-decoration: none !important; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.logo small { display: block; font-weight: 450; font-size: .78rem; color: var(--ink-2); margin-top: -2px; }
.nav { display: grid; gap: 2px; }
.nav a, .nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; text-decoration: none; border: 0; background: none; font: inherit; width: 100%; cursor: pointer; text-align: left; }
.nav a:hover, .nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand-soft-ink); }
.nav-sep { height: 1px; background: var(--line); margin: 10px 4px; }
.side-foot { margin-top: auto; display: grid; gap: 2px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.me-chip .who { min-width: 0; }
.me-chip .who strong { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip .who span { display: block; font-size: .78rem; color: var(--ink-2); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .logo { padding: 0; font-size: .98rem; }
.topbar .logo-mark { width: 30px; height: 30px; border-radius: 9px; }
.topbar .spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.content { width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 16px 40px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; height: calc(var(--tabbar) + var(--safe-b)); padding: 0 6px var(--safe-b); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--line); }
.tabbar a { display: grid; justify-items: center; gap: 3px; padding: 10px 0 12px; font-size: .7rem; font-weight: 550; color: var(--ink-3); text-decoration: none; }
.tabbar a.active { color: var(--brand); }
.tabbar a.shoot { align-self: center; }
.tabbar a.shoot span.fab { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 40%, transparent); margin-top: -26px; border: 4px solid var(--bg); }
.tabbar a.shoot span.fab .i { width: 26px; height: 26px; }
.has-tabbar .content { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 32px); }
.has-tabbar .toasts { bottom: calc(var(--tabbar) + var(--safe-b) + 12px); }

@media (min-width: 960px) {
    .sidebar { transform: none; }
    .scrim, .menu-btn, .topbar .logo { display: none; }
    .main { margin-left: var(--sidebar); }
    .content { padding: 12px 36px 56px; }
    .topbar { padding: 14px 36px; }
    .tabbar { display: none; }
    .has-tabbar .content { padding-bottom: 56px; }
    .has-tabbar .toasts { bottom: 24px; }
}

.banner { margin: 0 16px 12px; padding: 12px 16px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn); display: flex; gap: 10px; align-items: center; font-size: .92rem; }
@media (min-width: 960px) { .banner { margin: 0 36px 16px; } }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 8px 0 20px; }
.page-head .eyebrow { font-size: .82rem; font-weight: 550; color: var(--ink-2); margin: 0 0 4px; display: flex; gap: 6px; align-items: center; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 500; font-size: .9rem; margin: 4px 0 6px; }
.back:hover { color: var(--ink); text-decoration: none; }
.spread { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Surfaces ---------- */
.panel, .card-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel h2, .card-box h2 { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.card .lbl { display: block; color: var(--ink-2); font-size: .82rem; font-weight: 500; }
.card .num { display: block; font-size: 1.65rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; margin-top: 2px; }
.card .lbl:first-child + .num { margin-top: 4px; }
.cards .card .num { order: 2; }

/* ---------- Buttons ---------- */
button, .button { font: inherit; font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink); cursor: pointer; text-decoration: none !important; transition: background .15s, transform .08s, box-shadow .15s; white-space: nowrap; }
button:hover, .button:hover { background: var(--brand-hover, var(--brand)); }
button:active, .button:active { transform: scale(.98); }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover, .button.secondary:hover { background: var(--surface-2); }
button.ghost, .button.ghost { background: transparent; color: var(--ink-2); }
button.ghost:hover, .button.ghost:hover { background: var(--surface-2); color: var(--ink); }
button.danger, .button.danger { background: var(--surface); color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
button.danger:hover { background: var(--err-bg); }
button.small, .button.small { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 10px; }
button.link { background: none; border: 0; color: var(--ink-2); padding: 0; min-height: 0; font-weight: 500; }
button.link:hover { color: var(--ink); background: none; }
button.round { width: 40px; min-height: 40px; padding: 0; border-radius: 12px; }
button:disabled, .button[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
button.block, .button.block { width: 100%; }
form.inline { display: inline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

/* ---------- Forms ---------- */
form.stack { display: grid; gap: 16px; max-width: 560px; }
form.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label { display: grid; gap: 6px; font-weight: 550; font-size: .88rem; color: var(--ink); }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 450; font-size: .92rem; cursor: pointer; }
input[type=text], input[type=search], input[type=tel], input[type=datetime-local], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
    font: inherit; font-size: 1rem; width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); margin: 1px 0 0; flex: none; }
input[type=range] { accent-color: var(--brand); width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0; }
legend { font-weight: 600; padding: 0 6px; font-size: .9rem; }
.checks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- Lists, avatars, badges ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none !important; min-height: 64px; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-2); }
.list-item .body { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; font-size: .95rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { color: var(--ink-2); font-size: .84rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .end { display: flex; align-items: center; gap: 8px; flex: none; color: var(--ink-3); }
.list-empty { padding: 28px 20px; text-align: center; color: var(--ink-2); }
.list-empty .i { width: 32px; height: 32px; color: var(--ink-3); display: block; margin: 0 auto 8px; }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: .85rem; flex: none; background: var(--av1); color: var(--av1-ink); }
.avatar.sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.h2 { background: var(--av2); color: var(--av2-ink); }
.avatar.h3 { background: var(--av3); color: var(--av3-ink); }
.avatar.h4 { background: var(--av4); color: var(--av4-ink); }
.avatar.h5 { background: var(--av5); color: var(--av5-ink); }
.thumb-sq { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); flex: none; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-soft-ink); white-space: nowrap; }
.tag.bad { background: var(--err-bg); color: var(--err); }
.tag.mid { background: var(--warn-bg); color: var(--warn); }
.tag.off { background: var(--surface-2); color: var(--ink-2); }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; background: var(--surface); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td.actions { white-space: nowrap; text-align: right; }
.empty { color: var(--ink-2); padding: 24px 20px; margin: 0; text-align: center; }

/* ---------- Notices and toasts ---------- */
.note { border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.note p { margin: 0 0 8px; }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.err { background: var(--err-bg); color: var(--err); }
[data-camera-error] { white-space: pre-line; }
.note.invite { background: var(--brand-soft); color: var(--brand-soft-ink); display: block; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: .82rem; }
.toasts { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500; font-size: .92rem; animation: toast-in .25s ease; }
.toast.err { background: var(--err); color: #fff; }
.toast .msg { flex: 1; }
.toast button { background: transparent; color: inherit; min-height: 30px; width: 30px; padding: 0; border-radius: 8px; }
.toast button:hover { background: rgb(255 255 255 / 15%); }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Auth / welcome ---------- */
.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%), var(--bg); }
.auth { width: 100%; max-width: 420px; }
.auth .logo { justify-content: center; font-size: 1.15rem; padding-bottom: 22px; }
.auth .logo-mark { width: 44px; height: 44px; border-radius: 13px; }
.auth .panel { padding: 28px 26px; border-radius: 24px; }
.auth h1 { font-size: 1.45rem; }
.auth form.stack { max-width: none; }
.auth-foot { text-align: center; color: var(--ink-3); font-size: .8rem; margin-top: 18px; }

/* ---------- Client home ---------- */
.hero { background: var(--brand); color: var(--brand-ink); border-radius: 24px; padding: 18px; margin-bottom: 16px; box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 28%, transparent); }
.hero .eyebrow { color: color-mix(in srgb, var(--brand-ink) 75%, transparent); font-size: .82rem; font-weight: 550; margin: 0; }
.hero .big { font-size: 1.35rem; font-weight: 650; letter-spacing: -.01em; margin: 2px 0 14px; }
.hero-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.hero-pair figure { margin: 0; position: relative; }
.hero-pair img, .hero-pair .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; background: color-mix(in srgb, var(--brand-ink) 18%, transparent); }
.hero-pair figcaption { position: absolute; left: 8px; bottom: 8px; font-size: .72rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: rgb(0 0 0 / 50%); color: #fff; }
.hero .button { margin-top: 14px; background: var(--brand-ink); color: var(--brand); }
.hero .button:hover { background: color-mix(in srgb, var(--brand-ink) 88%, var(--brand)); }
.hero-empty { display: grid; gap: 6px; }
.hero-empty p { margin: 0; color: color-mix(in srgb, var(--brand-ink) 85%, transparent); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 8px; }
.tile { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; font-weight: 600; }
.tile:hover { border-color: var(--line-strong); }
.tile .sub { color: var(--ink-2); font-weight: 450; font-size: .82rem; margin-top: -6px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.home-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .home-grid { grid-template-columns: 1.15fr 1fr; align-items: start; } }

/* ---------- Timeline and photos ---------- */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); scroll-margin-top: 80px; }
.entry-head { display: flex; align-items: flex-start; gap: 12px; }
.entry-head .body { flex: 1; min-width: 0; }
.entry-date { display: grid; place-items: center; width: 48px; height: 52px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-soft-ink); flex: none; line-height: 1.05; }
.entry-date b { font-size: 1.2rem; }
.entry-date span { font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.entry-note { white-space: pre-wrap; margin: 10px 0 0; color: var(--ink); }
.thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.thumbs li { position: relative; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; background: var(--surface-2); cursor: zoom-in; }
.thumb-actions { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .8rem; margin-top: 6px; color: var(--ink-2); }
.thumb-actions a { color: var(--ink-2); }
.small-check { font-size: .8rem; gap: 6px; font-weight: 500; }
.small-check input { width: 16px; height: 16px; }
.danger-link { color: var(--err) !important; font-size: .8rem; }
.compare-pick { margin-bottom: 14px; }

.photo-grid { display: grid; gap: 4px; grid-template-columns: repeat(3, 1fr); margin: 0 -16px 16px; }
.photo-grid a { position: relative; display: block; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-2); }
.photo-grid .d { position: absolute; left: 6px; bottom: 6px; font-size: .68rem; font-weight: 650; color: #fff; background: rgb(0 0 0 / 45%); padding: 1px 7px; border-radius: 999px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 16px; } .photo-grid img { border-radius: 14px; } }
@media (min-width: 1000px) { .photo-grid { grid-template-columns: repeat(5, 1fr); } }

/* Full-screen photo viewer */
.viewer { position: fixed; inset: 0; z-index: 60; background: #050706; color: #fff; display: grid; grid-template-rows: auto 1fr auto; touch-action: pan-y; }
.viewer-bar { display: flex; align-items: center; gap: 8px; padding: 10px 10px calc(10px); }
.viewer-bar .t { flex: 1; font-weight: 600; font-size: .95rem; text-align: center; }
.viewer .icon-btn { color: #fff; }
.viewer .icon-btn:hover { background: rgb(255 255 255 / 12%); }
.viewer-stage { position: relative; display: grid; place-items: center; overflow: hidden; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .2s ease; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgb(255 255 255 / 12%) !important; }
.viewer-nav.prev { left: 10px; } .viewer-nav.next { right: 10px; }
.viewer-foot { display: flex; justify-content: center; gap: 10px; padding: 12px 12px calc(16px + var(--safe-b)); }
.viewer-foot .button { background: rgb(255 255 255 / 14%); color: #fff; }

/* ---------- Entry form and camera ---------- */
.entry-form { max-width: 760px; }
.add-entry summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
.add-entry summary::-webkit-details-marker { display: none; }
.add-entry[open] summary { margin-bottom: 14px; }
.add-entry .entry-form { border: 0; padding: 0; margin: 0; box-shadow: none; }
.capture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.capture-actions .button, .capture-actions button { min-height: 76px; flex-direction: column; gap: 6px; border-radius: 16px; }
.file-pick { position: relative; display: block; overflow: hidden; }
.file-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-pick:focus-within .button { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.file-pick .button { width: 100%; }
.previews { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.previews li { position: relative; }
.previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.previews .rm { position: absolute; top: 6px; right: 6px; width: 28px; min-height: 28px; padding: 0; border-radius: 50%; background: rgb(0 0 0 / 60%); color: #fff; }
.previews .src { position: absolute; left: 6px; bottom: 6px; font-size: .66rem; font-weight: 650; background: rgb(0 0 0 / 55%); color: #fff; border-radius: 999px; padding: 1px 7px; }

.camera { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.camera-top { display: flex; align-items: center; justify-content: space-between; padding: 12px; }
.camera .icon-btn { color: #fff; background: rgb(255 255 255 / 12%); }
.camera-view { position: relative; overflow: hidden; }
.camera-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-view video.mirror { transform: scaleX(-1); }
.camera .guide { position: absolute; left: 50%; top: 52%; width: min(62vw, 360px); aspect-ratio: 2 / 1; transform: translate(-50%, -50%); border: 3px dashed rgb(255 255 255 / 85%); border-radius: 0 0 50% 50% / 0 0 100% 100%; pointer-events: none; }
.camera-tip { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); width: max-content; max-width: 90%; text-align: center; font-size: .86rem; font-weight: 550; background: rgb(0 0 0 / 55%); padding: 6px 12px; border-radius: 999px; }
.camera-tip.warn { background: #b87a00; color: #fff; }
.camera-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 24px calc(22px + var(--safe-b)); }
.shutter { width: 76px; height: 76px; min-height: 76px; border-radius: 50%; padding: 0; background: #fff; border: 5px solid rgb(255 255 255 / 35%); background-clip: padding-box; }
.shutter:hover { background: #f0f0f0; background-clip: padding-box; }
.shutter:active { transform: scale(.92); }
.shutter { transition: background .15s; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* Moved by the user: placed anywhere on the camera screen (left/top set by capture.js). */
.shutter.moved { position: fixed; z-index: 3; margin: 0; transform: translate(-50%, -50%); box-shadow: 0 4px 18px rgb(0 0 0 / 45%); }
.shutter.moved:active { transform: translate(-50%, -50%) scale(.92); }
.cam-reset { background: rgb(255 255 255 / 16%); color: #fff; }
.cam-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content; max-width: 90%; text-align: center; font-size: .8rem; background: rgb(0 0 0 / 55%); padding: 5px 12px; border-radius: 999px; margin: 0; }
/* Fixed columns, so the shutter stays in the middle while the photo count is hidden. */
.camera-bottom .shutter { grid-column: 2; }
.cam-done { grid-column: 3; }
.cam-count { grid-column: 1; justify-self: start; display: flex; align-items: center; gap: 8px; }
.cam-count img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 2px solid #fff; }
.cam-count span { font-size: .8rem; font-weight: 600; }
.cam-done { justify-self: end; background: #fff; color: #000; }
.cam-done:hover { background: #e9e9e9; }
.camera.flash::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: .7; pointer-events: none; }

/* ---------- Comparison ---------- */
.compare { margin: 0 0 16px; }
.compare-stage { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; position: relative; }
.compare-stage img { width: 100%; border-radius: var(--r-lg); display: block; background: var(--surface-2); }
.compare-handle, .compare-range, .compare-tag { display: none; }
/* iPhone: without the -webkit- versions a press on the photo selects and highlights it instead of moving the slider. */
.compare.slider .compare-stage { display: block; max-width: 920px; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.compare.slider .compare-stage *, .compare.slider .compare-stage *::before, .compare.slider .compare-stage *::after { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.compare.slider .compare-stage img { border-radius: 0; pointer-events: none; -webkit-user-drag: none; }
.compare.slider .compare-after { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.compare.slider .compare-handle { display: block; position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; box-shadow: 0 0 0 1px rgb(0 0 0 / 15%); }
.compare.slider .compare-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgb(0 0 0 / 30%); }
.compare.slider .compare-handle::before { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -52%); z-index: 1; color: #17201d; font-weight: 700; letter-spacing: 2px; font-size: 15px; white-space: nowrap; }
.compare.slider .compare-tag { display: block; position: absolute; top: 12px; background: rgb(0 0 0 / 55%); color: #fff; font-size: .76rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.compare.slider .compare-tag.left { left: 12px; }
.compare.slider .compare-tag.right { right: 12px; }
.compare.slider .compare-range { display: grid; max-width: 920px; margin-top: 10px; font-size: .85rem; color: var(--ink-2); -webkit-user-select: none; user-select: none; }
/* A big, easy thumb for fingers (the browser's own is tiny on iPhone). */
.compare.slider .compare-range input[type=range] { -webkit-appearance: none; appearance: none; height: 44px; background: transparent; margin: 0; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.compare.slider .compare-range input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
.compare.slider .compare-range input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
.compare.slider .compare-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -13px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 30%); }
.compare.slider .compare-range input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 30%); }

/* ---------- Misc ---------- */
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .84rem; font-weight: 500; }
.chip.on { background: var(--brand-soft); color: var(--brand-soft-ink); }
.chip .i { width: 16px; height: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 10px; }
.section-title h2 { margin: 0; }
.section-title a { font-size: .88rem; font-weight: 600; }
.foot { text-align: center; color: var(--ink-3); font-size: .78rem; padding: 8px 16px 24px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.capture-actions.single { grid-template-columns: 1fr; }
.note:not(.ok):not(.err):not(.invite) { background: var(--surface-2); color: var(--ink-2); }
@media (max-width: 600px) {
    .list-item { flex-wrap: wrap; }
    .list-item .body { min-width: 160px; }
    .list-item .end { margin-left: auto; }
}
.list-item a.title { color: var(--ink); }
.list-item a.title:hover { color: var(--brand); text-decoration: none; }
.client-head { display: flex; align-items: center; gap: 14px; }
.welcome-list { box-shadow: none; margin: 18px 0; }
.welcome-note { text-align: center; margin: 14px 0 0; }
.auth .auth { max-width: none; }
.content .auth { margin: 24px auto; }
.auth form.stack button[type=submit] { width: 100%; }
.nav button { justify-content: flex-start; min-height: 0; font-weight: 500; font-size: inherit; color: var(--ink-2); }
.nav button:active { transform: none; }
.auth .panel h1 { margin-bottom: 18px; }
.auth .panel form + p { margin: 16px 0 0; font-size: .85rem; }
.cam-done.ready { background: var(--brand); color: var(--brand-ink); }
.cam-done.ready:hover { background: var(--brand-hover); }

/* ---------- Smile analysis ---------- */
.analysis-status { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--r); background: var(--brand-soft); color: var(--brand-soft-ink); font-size: .9rem; font-weight: 500; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-badge { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; padding: 2px 8px 2px 6px; border-radius: 999px; background: rgb(255 255 255 / 92%); color: var(--brand-soft-ink); box-shadow: 0 1px 4px rgb(0 0 0 / 15%); }
.ai-badge.warn { color: #8a5a00; }
.ai-badge.wait { color: var(--ink-3); font-weight: 600; }
.ai-badge .i { width: 13px; height: 13px; }

.result { border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.result.ok { background: var(--brand-soft); border-color: transparent; color: var(--brand-soft-ink); }
.result-head { display: flex; gap: 12px; align-items: flex-start; }
.result.ok .tile-icon { background: var(--brand); color: var(--brand-ink); }
.result h2 { margin: 0 0 4px; font-size: 1.1rem; }
.result p { margin: 0; font-size: .9rem; opacity: .92; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.result-stats > div { background: color-mix(in srgb, var(--surface) 70%, transparent); border-radius: 12px; padding: 8px 12px; }
.result-stats .lbl { display: block; font-size: .75rem; font-weight: 600; opacity: .8; }
.result-stats .num { display: block; font-size: 1.05rem; font-weight: 700; }

.chart { margin: 0 0 16px; padding: 12px 14px 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: color-mix(in srgb, var(--brand) 12%, transparent); stroke: none; }
.chart .dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.chart .dot.weak { fill: var(--surface); stroke: var(--brand); }
.chart figcaption { margin-top: 6px; }

.tips .tip.good .tile-icon { background: var(--brand); color: var(--brand-ink); }
.tips .tip.warn .tile-icon { background: var(--warn-bg); color: var(--warn); }
.list-item .sub.wrap { white-space: normal; }

.camera .guide { transition: border-color .2s; }
/* The outline for each kind of business: eyes (lashes and brows), a hand (nails), a face (skin), a frame (hair, tan, mixed). */
.camera .guide.guide-lashes { width: min(72vw, 400px); aspect-ratio: 3 / 1; border-radius: 50%; top: 45%; }
.camera .guide.guide-nails { width: min(58vw, 300px); aspect-ratio: 3 / 4; border-radius: 40% 40% 14px 14px / 30% 30% 14px 14px; }
.camera .guide.guide-skin, .camera .guide.guide-face { width: min(60vw, 320px); aspect-ratio: 3 / 4; border-radius: 50%; top: 48%; }
.camera .guide.guide-hair, .camera .guide.guide-tan, .camera .guide.guide-results { width: min(72vw, 400px); aspect-ratio: 4 / 5; border-radius: 18px; top: 48%; }
.camera.ready .guide { border-color: #4ade80; border-style: solid; }
.camera-tip.good { background: #15803d; }
.hero .score-line { display: flex; align-items: baseline; gap: 8px; margin: -8px 0 12px; }
.hero .score-line b { font-size: 2rem; letter-spacing: -.02em; }
.hero .score-line span { font-size: .85rem; opacity: .85; }

.compare-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button { min-height: 34px; background: transparent; color: var(--ink-2); padding: 0 14px; font-size: .85rem; }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.adjust { margin-bottom: 16px; }
.adjust .grid2 label { font-weight: 500; }

/* ---------- Email ---------- */
.tpl-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .tpl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .tpl-preview { position: sticky; top: 80px; } }
.blocks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.tpl-block { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 8px; background: var(--surface); }
.block-head { display: flex; align-items: center; justify-content: space-between; }
.block-head .row { gap: 2px; }
.block-head button.round { width: 32px; min-height: 32px; }
.add-blocks { gap: 6px; }
.vars { margin: 8px 0; }
.vars .chip { cursor: pointer; border: 0; font-family: ui-monospace, monospace; min-height: 30px; }
.preview-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--r); background: #f5f6f4; }
.preview-frame.tall { height: 720px; }
.step-row { align-items: end; }
a.card { color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--line-strong); }
.support-banner { background: #312e81; color: #eef2ff; justify-content: space-between; flex-wrap: wrap; }
.support-banner button { background: #eef2ff; color: #312e81; }
.support-row { display: block; }
.support-row summary { list-style: none; cursor: pointer; }
.support-row summary::-webkit-details-marker { display: none; }
.support-form { margin: 12px 0 4px 52px; max-width: 520px; }
.logo-img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff; }
.brand-preview { --bp: var(--brand); }
.bp-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bp-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--bp); color: #fff; display: grid; place-items: center; overflow: hidden; }
.bp-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.bp-hero { background: var(--bp); color: #fff; border-radius: 18px; padding: 14px; display: grid; gap: 2px; margin-bottom: 12px; }
.bp-hero span { font-size: .8rem; opacity: .85; }
.bp-button { display: inline-flex; background: var(--bp); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; }
.warn-text { color: var(--warn); }
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.ad-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; margin: 0 0 16px; box-shadow: var(--shadow); }
.ad-card img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; }
.ad-body { display: grid; gap: 4px; min-width: 0; }
.ad-body p { margin: 0; color: var(--ink-2); font-size: .88rem; }
.ad-body .button { justify-self: start; margin-top: 4px; }
.ad-label { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.block-head button[aria-label="Move up"] .i, .block-head button[aria-label="Move down"] .i { transform: rotate(90deg); }

/* Photo consent and signature */
.consent-form { max-width: 640px; }
.consent-q { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.consent-q legend { font-weight: 650; font-size: 1.02rem; margin-bottom: 4px; }
.consent-q p { margin: 0; color: var(--ink-2); }
.choice-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: 14px; cursor: pointer; font-weight: 450; }
.choice:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.choice input { margin-top: 3px; accent-color: var(--brand); }
.sign-box { display: grid; gap: 8px; }
.sign-box .lbl { font-weight: 550; font-size: .92rem; }
#signature-pad { width: 100%; aspect-ratio: 3 / 1; background: #fff; border: 1.5px dashed var(--line-strong); border-radius: 14px; touch-action: none; cursor: crosshair; }
#signature-pad.signed { border-style: solid; border-color: var(--brand); }
.err-text { color: var(--err); font-weight: 550; }
.qr-box { display: grid; justify-items: center; gap: 10px; text-align: center; }
.qr-box img { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; padding: 10px; border-radius: 14px; border: 1px solid var(--line); }
.qr-box code { word-break: break-all; font-size: .78rem; color: var(--ink-3); }
.biz-switch { display: grid; gap: 4px; padding: 10px 12px; }
.biz-switch label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.biz-switch select { width: 100%; }
.consent-sig { max-width: 220px; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.biz-switch-top select { max-width: 190px; padding: 6px 30px 6px 10px; font-size: .85rem; border-radius: 999px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plain-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.plain-list li .icon, .plain-list li svg { flex: none; margin-top: 4px; }
.add-choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; margin-bottom: 16px; }
.add-choices .add-entry { margin: 0; }
.added-client { display: grid; gap: 20px; grid-template-columns: auto 1fr; align-items: center; margin-bottom: 16px; }
@media (max-width: 640px) { .added-client { grid-template-columns: 1fr; } }
.auth:has(.shared-view) { max-width: 760px; }
.shared-view .compare { margin: 12px 0; }
.share-result .copy-row { margin-top: 8px; }
.added-client .copy-row { flex-wrap: wrap; }
.added-client .copy-row input { flex: 1 1 220px; min-width: 0; }

/* Treatment plans */
.plan-progress { display: grid; gap: 12px; }
.plan-head { gap: 10px; align-items: center; flex-wrap: wrap; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.meter .w0 { width: 0%; }
.meter .w5 { width: 5%; }
.meter .w10 { width: 10%; }
.meter .w15 { width: 15%; }
.meter .w20 { width: 20%; }
.meter .w25 { width: 25%; }
.meter .w30 { width: 30%; }
.meter .w35 { width: 35%; }
.meter .w40 { width: 40%; }
.meter .w45 { width: 45%; }
.meter .w50 { width: 50%; }
.meter .w55 { width: 55%; }
.meter .w60 { width: 60%; }
.meter .w65 { width: 65%; }
.meter .w70 { width: 70%; }
.meter .w75 { width: 75%; }
.meter .w80 { width: 80%; }
.meter .w85 { width: 85%; }
.meter .w90 { width: 90%; }
.meter .w95 { width: 95%; }
.meter .w100 { width: 100%; }
.plan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-steps li { display: flex; align-items: center; gap: 12px; }
.plan-steps .dot { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 650; background: var(--surface-2); color: var(--ink-2); }
.plan-steps li.done .dot { background: var(--brand); color: var(--brand-ink); }
.plan-steps li.due .dot, .plan-steps li.overdue .dot { box-shadow: 0 0 0 2px var(--brand); }
.plan-steps .body { flex: 1; display: grid; }
.plan-steps .sub { font-size: .8rem; color: var(--ink-3); }
.plan-rows { display: grid; grid-template-columns: 80px minmax(140px, 1fr) minmax(200px, 2fr); gap: 8px; align-items: center; }
.plan-rows .lbl { font-size: .8rem; font-weight: 600; color: var(--ink-3); }
@media (max-width: 640px) { .plan-rows { grid-template-columns: 64px 1fr; } .plan-rows input[name=tips] { grid-column: 1 / -1; } .plan-rows .lbl:last-of-type { display: none; } }
.next-step { border: 1.5px solid var(--brand); }
.next-step .when { font-size: 1.15rem; font-weight: 650; }
.credit { font-size: 1.5rem; font-weight: 650; letter-spacing: -.01em; }
.showcase-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.showcase-grid figure { margin: 0; }
.showcase-grid figcaption { padding: 8px 2px 0; font-size: .88rem; color: var(--ink-2); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pair img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; display: block; }
.pair span { font-size: .72rem; color: var(--ink-3); }
.auth:has(.public-wide) { max-width: 1000px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.book-cta { text-align: center; margin: 16px 0; }
.book-cta .big { font-size: 1.15rem; font-weight: 650; margin: 0; }
.filter-seg { display: flex; gap: 8px; margin: 0 0 12px; }
.zone-search { margin-bottom: 6px; }
select[size] { height: auto; padding: 6px; border-radius: 12px; }
select[size] option { padding: 6px 8px; border-radius: 8px; }
button.link.title-link { font-weight: 600; color: var(--ink); font-size: inherit; text-align: left; }
button.link.title-link:hover { color: var(--brand); text-decoration: underline; }
.details-fields { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.details-fields legend { font-weight: 650; margin-bottom: 4px; }
.inline-h { display: inline; margin: 0; }
.support-card { border: 1.5px solid var(--brand); }
.support-levels { display: flex; flex-wrap: wrap; gap: 10px; }
.support-level { flex-direction: column; min-height: 64px; padding: 10px 18px; gap: 2px; }
.support-level .name { font-weight: 700; }
.support-level .amount { font-size: .82rem; opacity: .9; }
.level-rows { display: grid; grid-template-columns: 40px 1fr 140px 120px; gap: 8px; align-items: center; }
.level-rows .lbl { font-size: .8rem; font-weight: 600; color: var(--ink-3); }
.mapper { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.mapper-col { flex: 0 0 190px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-md, 10px); padding: 10px; background: var(--surface); }
.mapper-col.skipped { opacity: .6; }
.mapper-head { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapper-samples { list-style: none; margin: 0; padding: 0; font-size: .82rem; color: var(--ink-2); min-height: 3.6em; }
.mapper-samples li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-warn { display: block; font-size: .78rem; color: var(--ink-3); }
.phone-qrs { display: flex; flex-wrap: wrap; gap: 24px; }
.panel.panel-wide { max-width: none; }
.clinic-banner { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; margin: 0 0 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); border-left: 4px solid var(--brand); }
.clinic-banner img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; flex: none; }
.clinic-banner .cb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.clinic-banner .cb-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.clinic-banner strong { font-size: .98rem; }
.clinic-banner .cb-body { font-size: .86rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clinic-banner .cb-go { flex: none; }
.clinic-banner .cb-close { background: transparent; color: var(--ink-3); border: 0; width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.clinic-banner .cb-close:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
@media (max-width: 640px) { .clinic-banner { flex-wrap: wrap; gap: 10px; } .clinic-banner .cb-body { white-space: normal; } .clinic-banner .cb-text { flex-basis: calc(100% - 110px); } }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.leave-out { display: grid; gap: 8px; }
.mapper-col.warn { border-color: #d97706; box-shadow: 0 0 0 2px rgb(217 119 6 / 18%); }
.mapper-warn { display: flex; gap: 6px; align-items: flex-start; font-size: .78rem; font-weight: 600; color: #b45309; }
.mapper-warn .i { flex: none; width: 16px; height: 16px; }
.confirm-cols { padding: 10px 12px; border: 1px solid #d97706; border-radius: 10px; background: rgb(217 119 6 / 6%); }
.banner.setup-needed { border-left: 4px solid #d97706; } .banner.setup-needed a { font-weight: 600; }
.whiten-steps { align-items: center; gap: 6px; }
.chip { display: inline-grid; place-items: center; min-width: 40px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.illustration-note { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--ink-2); margin: 0; }
.illustration-note .i { flex: none; margin-top: 2px; }
details.explain summary { cursor: pointer; }
details.explain ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.week .day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; align-content: start; }
.week .day.today { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent); }
.week .day h3 { margin: 0; font-size: .95rem; }
.appt { border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); border-radius: 8px; padding: 6px 8px; }
.appt summary { cursor: pointer; display: grid; gap: 1px; list-style: none; }
.appt .time { font-weight: 700; font-size: .85rem; }
.appt .what { font-size: .8rem; color: var(--ink-2); }
.appt.status-cancelled, .appt.status-noshow { opacity: .55; border-left-color: var(--ink-3); }
.week-nav { align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.steps li.done { color: var(--ink-3); text-decoration: line-through; }
table.hours input[type=time] { min-width: 110px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-decoration: none; color: var(--ink); }
.slot:hover, .slot.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.day-picker { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.day-picker a { flex: none; display: grid; justify-items: center; min-width: 64px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.day-picker a.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.day-picker a.none { opacity: .45; }
.day-picker .dow { font-size: .72rem; text-transform: uppercase; color: var(--ink-3); }
.setup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.setup-list li { display: flex; gap: 8px; align-items: flex-start; }
.setup-list li.done { color: var(--ink-3); }
.setup-list li .i { flex: none; margin-top: 2px; }
.setup-needed-panel { border: 1.5px solid #d97706; } .setup-needed-panel h2 { display: flex; gap: 8px; align-items: center; }
.menu { display: grid; gap: 14px; }
.menu-group h3 { margin: 0 0 6px; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.menu-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.menu-item + .menu-item { margin-top: 6px; }
.menu-item.in-cart { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.menu-text { display: grid; gap: 2px; min-width: 0; }
.menu-desc { font-size: .85rem; color: var(--ink-2); }
.menu-act { display: flex; gap: 6px; align-items: center; flex: none; }
.cart { border: 1.5px solid var(--brand); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.cart h2 { margin: 0; font-size: 1rem; }
.cart ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cart li { display: flex; justify-content: space-between; gap: 10px; }
.cart p { margin: 0; }
body.embedded { background: transparent; }
.embed-content { max-width: 760px; margin: 0 auto; padding: 8px; }
/* Booking page design: a fluid banner and photo cards (two per row on wide screens, one on phones). */
.book-banner { margin: 0 0 12px; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.book-banner img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
@media (max-width: 640px) { .book-banner img { aspect-ratio: 16 / 9; } }
.menu.layout-cards .menu-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.menu.layout-cards .menu-group h3 { grid-column: 1 / -1; }
.menu.layout-cards .menu-item { display: grid; grid-template-rows: auto 1fr auto; align-items: start; padding: 0; overflow: hidden; margin: 0; }
.menu.layout-cards .menu-item + .menu-item { margin-top: 0; }
.menu.layout-cards .menu-text { padding: 12px 14px 0; }
.menu.layout-cards .menu-act { padding: 10px 14px 14px; }
.menu.layout-cards .menu-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.menu.layout-list .menu-img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
@media (max-width: 640px) { .menu.layout-cards .menu-group { grid-template-columns: 1fr; } .menu.layout-cards .menu-img { aspect-ratio: 4 / 3; } }
.banner-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.treat-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.share-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
@media (max-width: 760px) { .share-grid { grid-template-columns: 1fr; } }
.share-grid textarea { font-family: ui-monospace, monospace; font-size: .8rem; }
.busy-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 8px; border-radius: 8px; background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); color: var(--ink-2); }
.small-link { font-size: .75rem; font-weight: 600; margin-left: 6px; }

/* Locations on the booking setup page */
.loc-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.loc-switch:empty { display: none; }
.loc-switch .lbl { font-weight: 600; color: var(--ink-2); }
.list-item.location-item { display: block; }
.location-item > summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.location-item > form { margin-top: 12px; }
.panel-sub > summary { cursor: pointer; }
.panel-sub > form { margin-top: 12px; }
fieldset.checks { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
fieldset.checks legend { font-weight: 600; font-size: .86rem; padding: 0 4px; }
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.place { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.place:hover { border-color: var(--brand); }
.place.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.place .tag { align-self: flex-start; margin-top: 4px; }

/* Payments setup */
.grid > .wide { grid-column: 1 / -1; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; }
.pay-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-soft-ink); margin: 6px 0; }
.pay-note .i { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.pay-row { align-items: center; gap: 8px; }

/* Forms, waitlist, reports, photo tags */
table.questions td { vertical-align: top; }
table.questions textarea { min-width: 220px; }
table.questions input[type=text] { min-width: 180px; margin-bottom: 4px; }
table.questions .num { width: 56px; }
.form-fill .q { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.form-fill .q:last-of-type { border-bottom: 0; }
.form-fill .q .opts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.form-fill .q.note { color: var(--ink-2); font-size: .92rem; }
.answers { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 6px 16px; }
.answers dt { color: var(--ink-2); }
.answers dd { margin: 0; font-weight: 500; }
.answers .flag { color: var(--warn); font-weight: 700; }
.pinned { display: flex; flex-wrap: wrap; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat span { color: var(--ink-2); font-size: .86rem; }
table.report { width: 100%; border-collapse: collapse; }
table.report td, table.report th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.report td.n, table.report th.n { text-align: right; font-variant-numeric: tabular-nums; }
.stars { display: flex; gap: 6px; flex-wrap: wrap; }
.stars label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 700; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars input:checked + span { color: var(--brand); }
.stars label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.waitlist-join { border-top: 1px dashed var(--line); padding-top: 12px; }
.photo-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.photo-tags .tag { font-size: .72rem; }
.tag-edit > summary { cursor: pointer; font-size: .76rem; }
.tag-edit form { gap: 4px; margin-top: 4px; }
.tag-edit input[type=text] { min-width: 0; width: 140px; font-size: .8rem; padding: 4px 8px; }
form.panel.form-editor { max-width: 1100px; }
table.questions select { min-width: 150px; }
.note.policy { display: block; }

.cancel-flow .note { display: block; }
.cancel-flow .choice-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cancel-flow a.choice { color: var(--ink); text-decoration: none; }

/* Hand-over screen on the clinic's device */
body.kiosk { background: var(--bg, #f5f6f4); }
.kiosk-head { display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.kiosk-logo { height: 36px; width: auto; }
.kiosk-content { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
form.kiosk-form { max-width: none; font-size: 1.05rem; }
.kiosk-form section { border-top: 1px solid var(--line); padding-top: 16px; }
.kiosk-form input[type=text], .kiosk-form input[type=tel], .kiosk-form input[type=password] { min-height: 48px; font-size: 1.05rem; }
.kiosk-form .choice-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
button.big, .button.big { min-height: 56px; font-size: 1.15rem; padding: 0 28px; }
.kiosk-done { text-align: center; align-items: center; padding: 48px 24px; }
.kiosk-done h1 { font-size: 2rem; }

/* ---------- On-screen step-by-step instructions ----------
   Deliberately large and high-contrast (readable without glasses); the person can hide them. */
.guide-bar { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; margin: 0 0 18px; padding: 16px 18px; border-radius: var(--r-lg);
    background: var(--brand-soft); color: #0b2a22; border: 2px solid var(--brand); box-shadow: var(--shadow); }
.guide-bar.done { background: #e8f7ec; border-color: #15803d; }
.guide-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); }
.guide-bar.done .guide-icon { background: #15803d; color: #fff; }
.guide-body { min-width: 0; }
.guide-step { margin: 0 0 2px; font-size: 1rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--brand-soft-ink); }
.guide-text { margin: 0; font-size: 1.22rem; line-height: 1.45; font-weight: 600; }
.guide-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; font-size: 1.12rem; font-weight: 600; }
.guide-list li { display: flex; align-items: center; gap: 10px; }
.guide-list li.done span:last-of-type { color: #3f5f55; }
.guide-list a { text-decoration: underline; text-underline-offset: 3px; }
.guide-tick { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--brand); font-weight: 800; color: #fff; }
.guide-list li.done .guide-tick { background: #15803d; border-color: #15803d; }
.guide-hide { grid-column: 2; }
.guide-hide button { min-height: 44px; font-size: 1rem; background: #fff; }
@media (max-width: 560px) {
    .guide-bar { grid-template-columns: 1fr; padding: 14px 16px; }
    .guide-icon { display: none; }
    .guide-hide { grid-column: 1; }
    .guide-text { font-size: 1.18rem; }
}
/* Dark mode (phones set to dark): the instructions box keeps its high contrast with light text on its dark green. */
@media (prefers-color-scheme: dark) {
    .guide-bar { color: var(--ink); }
    .guide-bar.done { background: var(--ok-bg); border-color: var(--ok); }
    .guide-list li.done span:last-of-type { color: var(--ink-2); }
    .guide-bar .guide-tick { color: var(--ink); }
    .guide-bar .guide-hide button { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
    .guide-bar .guide-intro { background: var(--surface); color: var(--ink); }
}
/* Inside the camera: a dark, solid panel above the shutter, still large. */
/* Below the mouth outline, just above the shutter bar: compact, so it never covers the teeth. */
.cam-guide { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; padding: 12px 16px; border-radius: 16px; background: rgb(0 0 0 / 78%); color: #fff; border: 2px solid rgb(255 255 255 / 35%); }
.cam-guide .guide-step { color: #9ff0cf; font-size: .95rem; }
.cam-guide .guide-text { font-size: 1.12rem; line-height: 1.35; color: #fff; }
.cam-guide { padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: end; }
.cam-guide .guide-step, .cam-guide .guide-text { grid-column: 1; }
.cam-guide .guide-hide { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.cam-guide .guide-hide button { min-height: 38px; padding: 0 12px; font-size: .9rem; }
.cam-guide .guide-hide button { background: rgb(255 255 255 / 16%); color: #fff; border-color: transparent; }
.camera.ready .cam-guide { border-color: #4ade80; }
/* The kiosk sign-up: big numbered steps. */
.kiosk-step { display: inline-block; margin-right: 8px; padding: 2px 12px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .95rem; font-weight: 800; vertical-align: middle; }
.kiosk-last { font-size: 1.15rem; font-weight: 600; margin: 0; }
.guide-switch { margin: 12px 0; }
.whiten-explain { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink); }
/* Invitation rows: the buttons wrap instead of running off the screen. */
.list-item .end.inv-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 560px) {
    .list-item:has(.inv-actions) { flex-wrap: wrap; }
    .list-item .end.inv-actions { width: 100%; justify-content: flex-start; padding-left: 52px; }
}

/* ---------- Help: guides and the walkthrough player (large, readable text) ---------- */
.help-search { display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 0 0 18px; padding: 0 14px; border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.help-search input { border: 0; outline: 0; background: transparent; font-size: 1.15rem; min-height: 52px; flex: 1; padding: 0; box-shadow: none; }
.help-search:focus-within { border-color: var(--brand); }
.help-group { margin-bottom: 8px; }
.help-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 18px; }
.help-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; border: 2px solid transparent; }
.help-card:hover, .help-card:focus-visible { border-color: var(--brand); }
.help-card-title { font-size: 1.15rem; font-weight: 700; }
.help-card-sub { font-size: 1rem; color: var(--ink-2); line-height: 1.4; }
.help-card-meta { font-size: .9rem; font-weight: 600; color: var(--brand-soft-ink); margin-top: 4px; }

.walk { margin: 0 0 22px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); border: 2px solid var(--brand); }
.walk-stage { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 22px; align-items: center; }
/* Always the phone's exact shape (375 × 812), sized by width, so the picture is never cropped and the marked spot stays on target. */
.walk-screen { position: relative; border-radius: 22px; overflow: hidden; background: #111; border: 6px solid #1d2626; aspect-ratio: 375 / 812; margin: 0 auto; width: min(100%, 340px, calc(72vh * 375 / 812)); box-sizing: content-box; touch-action: pan-y; }
.walk-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.walk-noimg { position: absolute; inset: 0; display: grid; place-items: center; background: var(--brand-soft); }
.walk-bignum { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 3.2rem; font-weight: 800; }
.walk-spot { position: absolute; border: 4px solid #ff3d7f; border-radius: 14px; box-shadow: 0 0 0 4px rgb(255 255 255 / 70%), 0 0 0 9999px rgb(0 0 0 / 18%); pointer-events: none; }
.walk-spot.still { box-shadow: 0 0 0 3px rgb(255 255 255 / 70%); }
.walk-spot.pulse { animation: walk-pulse 1.4s ease-out 2; }
@keyframes walk-pulse { 0% { transform: scale(1.25); opacity: 0; } 40% { transform: scale(1); opacity: 1; } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .walk-spot.pulse { animation: none; } }
.walk-side { display: grid; gap: 12px; align-content: center; }
.walk-n { margin: 0; font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--brand-soft-ink); }
.walk-text { margin: 0; font-size: 1.45rem; line-height: 1.4; font-weight: 650; color: var(--ink); min-height: 4.2em; }
.walk-tip { margin: 0; font-size: 1.08rem; line-height: 1.45; color: var(--ink-2); background: var(--surface-2); padding: 10px 14px; border-radius: 12px; }
.walk-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.walk-bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.walk-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.walk-controls button { min-height: 52px; font-size: 1.08rem; padding: 0 20px; }
.walk-controls [data-walk-play] { min-width: 130px; }
.walk-voice { font-size: 1.05rem; }
@media (max-width: 720px) {
    .walk { padding: 12px; }
    .walk-stage { grid-template-columns: 1fr; gap: 14px; }
    .walk-screen { width: min(calc(100% - 12px), 300px, calc(60vh * 375 / 812)); }
    .walk-text { font-size: 1.3rem; min-height: 0; }
    .walk-controls button { flex: 1; padding: 0 12px; }
}

.help-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.help-steps li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.help-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 1.3rem; font-weight: 800; }
.help-step-body { min-width: 0; display: grid; gap: 10px; }
.help-step-text { margin: 0; font-size: 1.2rem; line-height: 1.5; font-weight: 600; }
.help-step-tip { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 1.05rem; line-height: 1.45; color: var(--ink-2); }
.help-shot { position: relative; margin: 0; width: min(100%, 300px); border-radius: 18px; overflow: hidden; border: 4px solid #1d2626; }
.help-shot img { display: block; width: 100%; height: auto; }
.help-problems { display: grid; gap: 10px; margin-bottom: 20px; }
.help-problems summary { font-size: 1.12rem; font-weight: 700; cursor: pointer; }
.help-problems p { font-size: 1.08rem; line-height: 1.5; margin: 10px 0 0; }
.topbar .help-btn { color: var(--ink-2); }

/* The first box also explains how the boxes work, until "Got it". */
.guide-intro { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 2px dashed var(--brand); }
.guide-intro-list { margin: 6px 0 12px; padding-left: 22px; display: grid; gap: 6px; font-size: 1.1rem; line-height: 1.45; }
.guide-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px; }
.guide-actions .button { min-height: 44px; font-size: 1rem; }
.guide-actions .guide-hide { grid-column: auto; }
@media (max-width: 560px) { .guide-actions { grid-column: 1; } }
/* Narrow phones: the two date labels would collide at the top, so the right one sits at the bottom. */
@media (max-width: 480px) { .compare.slider .compare-tag.right { top: auto; bottom: 12px; } }

/* Clinic guides: computer/tablet screenshots (1024 x 768), shown wider, caption under the picture. */
.walk.wide .walk-stage { grid-template-columns: 1fr; }
.walk.wide .walk-screen { aspect-ratio: 1024 / 768; width: min(100%, 820px); border-radius: 12px; border-width: 5px; }
.help-shot.wide { width: min(100%, 620px); border-radius: 10px; }

/* ---------- "What is ...?" introductions (pop-up and page), large and friendly ---------- */
.about-dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.about-dialog::backdrop { background: rgb(10 20 16 / 55%); }
.about-close { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.6rem; line-height: 1; background: var(--surface-2); color: var(--ink); z-index: 2; }
.about { padding: 22px 26px 26px; }
.about-page .about { padding: 0 0 10px; }
.about-title { font-size: 1.7rem; line-height: 1.25; margin: 0 0 12px; }
.about-h { font-size: 1.35rem; line-height: 1.35; margin: 18px 0 10px; color: var(--brand); }
.about-p { font-size: 1.1rem; line-height: 1.6; margin: 0 0 14px; }
.about-note { font-size: .98rem; color: var(--ink-2); margin: 0 0 12px; }
.about-list { margin: 0 0 16px; padding-left: 24px; font-size: 1.08rem; line-height: 1.55; display: grid; gap: 6px; }
.about-feature { margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.about-feature p { margin: 0; font-size: 1.06rem; line-height: 1.55; }
.about-feature-title { font-weight: 800; font-size: 1.14rem !important; margin-bottom: 4px !important; }
.about-cta { margin: 18px 0 4px; }
.about-cta .button { width: 100%; min-height: 54px; font-size: 1.15rem; }
.about-hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.about-link { margin: 14px 0 0; font-size: 1.02rem; }
.about-link a, .signin-more a { display: inline-flex; align-items: center; gap: 6px; }
.signin-more { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 1.02rem; }
.signin-more p { margin: 0; }
.signin-new { font-size: 1.08rem; }
/* A form field only robots fill in. */
.trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.request-message { font-style: italic; color: var(--ink); }

/* ---------- Smart editor (emails and pages): placeholders, preview sizes, versions ---------- */
.placeholders { border-top: 1px solid var(--line); padding-top: 12px; }
.placeholders .vars .chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; height: auto; padding: 6px 12px; border-radius: 12px; text-align: left; }
.vars .chip-desc { font-family: var(--font, system-ui), sans-serif; font-size: .74rem; font-weight: 400; color: var(--ink-2); max-width: 220px; white-space: normal; }
.vars .chip.must { box-shadow: inset 0 0 0 2px var(--brand); }
.note.warn { background: #fff4d6; color: #6b4b00; }
.editor-actions { flex-wrap: wrap; gap: 8px; }
.preview-head { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.preview-head .hint { margin: 0; }
.preview-stage { display: grid; justify-items: center; }
.preview-stage.phone .preview-frame { width: 390px; max-width: 100%; height: 720px; border-radius: 28px; border-width: 8px; border-color: #20262a; }
.editor-history { margin-top: 16px; }
.editor-history .between { justify-content: space-between; align-items: center; }
.versions .list-item { gap: 10px; }

/* ---------- Writing assistant ---------- */
.assistant { margin-top: 16px; }
.assistant h2 { display: inline-flex; align-items: center; gap: 8px; }
.assistant .between { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.ask-presets .chip { cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 40px; font-size: .95rem; }
.ask-presets .chip:hover { background: var(--brand-soft); }
.suggest-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .suggest-grid { grid-template-columns: 1fr 1fr; } }
.suggest-grid .preview-frame { height: 620px; }

/* ---------- Search, filters and pages over long lists ---------- */
.list-search { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 0 0 14px; }
.list-search .search-box { flex: 1 1 260px; position: relative; display: block; margin: 0; }
.list-search .search-box .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.list-search .search-box input { padding-left: 40px; width: 100%; }
.list-search .list-filter { display: grid; gap: 2px; margin: 0; }
.list-search .list-filter .hint { font-size: .78rem; }
.list-search .list-filter select { min-width: 90px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0 20px; }
.pager-steps { gap: 6px; align-items: center; }
.list-switch { margin: 6px 0 14px; }
.list-switch a { text-decoration: none; }
.list-switch .count { margin-left: 6px; font-weight: 400; color: var(--ink-2); }
.seg.list-switch a.button { min-height: 44px; background: transparent; color: var(--ink-2); padding: 0 18px; font-size: 1rem; border: 0; box-shadow: none; }
.seg.list-switch a.button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 700; }

/* ---------- Desk sign-up QR code ---------- */
.desk-signup h1 { font-size: 1.7rem; }
.desk-signup .lead { font-size: 1.15rem; }
.desk-signup input, .desk-signup button.big { font-size: 1.15rem; min-height: 54px; }
.step-label { margin: 0; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.code-input { font-size: 2rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr-sheet { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 10px; }
.qr-sheet h2 { font-size: 1.8rem; margin: 0; }
.qr-sheet img { width: min(360px, 80vw); height: auto; image-rendering: pixelated; }
.qr-link { word-break: break-all; }
@media print {
    body * { visibility: hidden; }
    .print-sheet, .print-sheet * { visibility: visible; }
    .print-sheet { position: absolute; inset: 0; border: 0; box-shadow: none; }
    .qr-sheet img { width: 12cm; }
    .qr-sheet h2 { font-size: 26pt; }
}

/* ---------- "For businesses" on the main sign-in page ---------- */
.business-cta { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; border: 2px solid var(--brand); }
.business-cta h2 { margin: 0; font-size: 1.35rem; }
.business-cta p { margin: 0; font-size: 1.05rem; }
.business-cta .row { flex-wrap: wrap; gap: 10px; }

/* ---------- The page for businesses (home page on the main address) ---------- */
.auth.wide { max-width: 820px; }
.landing { display: grid; gap: 16px; }
.landing-top { display: flex; justify-content: flex-end; }
.landing-hero h1 { font-size: 2rem; line-height: 1.2; margin: 4px 0 14px; }
.landing-hero .row { flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }

/* ---------- Client manager (CRM) ---------- */
.crm-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1000px) { .crm-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.crm-nudge { display: flex; gap: 14px; align-items: flex-start; border: 2px solid var(--brand); margin-bottom: 16px; }
.crm-nudge p { margin: 0; font-size: 1.05rem; }

/* ---------- The owner's and a business's menus in accordion groups ----------
   A group's header is a tinted bar with a coloured edge, set apart from the links inside it, which sit indented on a
   guide line in a smaller size. */
.nav-group { display: grid; gap: 2px; margin-top: 8px; }
.nav-group > summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; list-style: none; font-weight: 800; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); background: var(--surface-2); border-left: 4px solid var(--brand); }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover, .nav-group[open] > summary { background: var(--brand-soft); color: var(--brand-soft-ink); }
.nav-group > summary .i { transition: transform .15s ease; flex: none; }
.nav-group[open] > summary .i { transform: rotate(90deg); }
.nav-group > summary::after { content: ""; flex: 1; }
.nav-group[open] { padding-bottom: 4px; }
.nav-group > a { margin-left: 16px; width: calc(100% - 16px); padding: 7px 10px 7px 12px; border-left: 2px solid var(--line); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .92rem; }
.nav-group > a .i { width: 17px; height: 17px; }
.nav-group > a.active { border-left-color: var(--brand); }

/* ---------- Sign-in page: privacy line and footer ---------- */
.signin-private { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); font-size: .95rem; line-height: 1.45; }
.signin-private .i { flex: none; margin-top: 3px; }
.auth-foot p { margin: 0 0 6px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.invite-only { display: flex; gap: 8px; align-items: flex-start; } .invite-only .i { flex: none; margin-top: 3px; }
.text-row .title { font-weight: 500; }

/* ---------- Extras, sales, chat, check-in ---------- */
.wrap-seg { flex-wrap: wrap; }
.voucher-sheet { text-align: center; padding: 32px 20px; }
.voucher-amount { font-size: 2.6rem; font-weight: 700; letter-spacing: -.02em; margin: 6px 0; }
.voucher-message { font-style: italic; }
.voucher-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; letter-spacing: .12em; margin: 18px 0 6px; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 12px; background: var(--surface-2); border-radius: var(--r); }
.chat-msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.mine { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.chat-msg .meta { display: block; font-size: .75rem; opacity: .75; margin-top: 2px; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 44px; }
.chat-status { display: inline-flex; align-items: center; gap: 6px; }
.chat-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3, #aaa); }
.chat-status.online::before { background: #2e9d5b; }
.checkin { max-width: 460px; margin: 8vh auto; text-align: center; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.address-picture { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; margin: 8px 0 16px; }
@media (max-width: 640px) { .address-picture { grid-template-columns: 1fr; justify-items: center; } }
.ap-phone { width: 210px; border: 8px solid var(--ink); border-radius: 28px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.ap-bar { display: flex; align-items: center; gap: 4px; margin: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); font-size: .72rem; color: var(--ink-2); overflow: hidden; white-space: nowrap; }
.ap-bar b { color: var(--brand); }
.ap-screen { display: grid; justify-items: center; gap: 8px; padding: 18px 14px 24px; }
.ap-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); }
.ap-line { width: 85%; height: 10px; border-radius: 5px; background: var(--surface-2); }
.ap-line.short { width: 60%; }
.ap-button { margin-top: 6px; padding: 6px 22px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .8rem; font-weight: 600; }
.ap-uses { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ap-uses li { display: flex; gap: 8px; align-items: center; }
.subdomain-status { display: block; margin-top: -6px; }
.chat-msg.internal { background: var(--warn-bg); color: var(--ink); border: 1px dashed var(--warn); }
.chat-file { display: block; margin-top: 6px; color: inherit; }
.chat-file img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; }
.chat-form .file-pick { display: inline-flex; align-items: center; }
.chat-form input[type=file] { max-width: 160px; font-size: .8rem; }
.setup-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.setup-bar { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.setup-fill { display: block; height: 100%; background: var(--brand); width: 0; }
.setup-fill.setup-1 { width: 12.5%; } .setup-fill.setup-2 { width: 25%; } .setup-fill.setup-3 { width: 37.5%; } .setup-fill.setup-4 { width: 50%; }
.setup-fill.setup-5 { width: 62.5%; } .setup-fill.setup-6 { width: 75%; } .setup-fill.setup-7 { width: 87.5%; } .setup-fill.setup-8 { width: 100%; }
.setup-steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.setup-step-head { display: flex; gap: 12px; align-items: flex-start; }
.setup-step-head h2 { margin: 0; font-size: 1.05rem; }
.setup-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 700; }
.setup-step.done .setup-num { background: var(--brand); color: var(--brand-ink); }
.setup-step.done h2, .setup-step.skipped h2 { color: var(--ink-2); }
.early-support-banner { display: flex; align-items: center; gap: 10px; }
.early-support-banner > span { flex: 1; }

/* ---------- The consent form (laid out like the paper intake form) ---------- */
.consent-body { background: #edf2f6; }
.consent-shell { max-width: 900px; margin: auto; padding: 16px; }
.consent-toolbar { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.consent-paper { background: #fff; color: #15263d; padding: 27px 34px; box-shadow: 0 3px 24px #1232; border-radius: 4px; font-family: Arial, Helvetica, sans-serif; }
.cp-head { display: flex; gap: 14px; align-items: center; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #d5dee5; }
.cp-head > div { display: grid; gap: 2px; }
.cp-logo { max-height: 52px; max-width: 160px; object-fit: contain; }
.cp-business { font-size: 17px; }
.cp-small { font-size: 11px; color: #4c6070; }
.cp-title { margin: 0; font-size: 21px; letter-spacing: .2px; }
.cp-subtitle { font-size: 10px; letter-spacing: 1.2px; color: #4c7885; margin: 7px 0 15px; text-transform: uppercase; font-weight: 700; }
.cp-line { display: flex; gap: 13px; margin: 9px 0; flex-wrap: wrap; }
.cp-entry { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 150px; }
.cp-wide { flex: 2; }
.cp-inline { margin: 7px 0; }
.cp-label { font-size: 12px; font-weight: 700; white-space: nowrap; }
.cp-value { flex: 1; border-bottom: 1px solid #98a7b4; background: #f5f8fa; font-size: 14px; padding: 5px 7px; min-height: 28px; }
.consent-paper input[type=text], .consent-paper input[type=date], .consent-paper textarea { flex: 1; width: 100%; border: 0; border-bottom: 1px solid #98a7b4; border-radius: 0; background: #f5f8fa; font: 14px Arial; padding: 5px 7px; min-width: 0; color: #14283c; min-height: 0; box-shadow: none; }
.cp-block { display: grid; gap: 4px; margin: 8px 0; font-size: 12px; }
.cp-opt { display: inline-flex; gap: 5px; margin-right: 12px; font-size: 12px; align-items: center; }
.cp-section { margin-top: 14px; border-top: 4px solid #0e4662; background: #edf5f6; padding: 6px 10px; font-size: 12px; letter-spacing: .4px; font-weight: 800; color: #143a55; text-transform: uppercase; }
.cp-para { font-size: 12px; line-height: 1.45; margin: 8px 1px; }
.cp-q { display: flex; gap: 6px; align-items: center; border-bottom: 1px solid #e0e6ea; padding: 6px 2px; font-size: 12.5px; min-height: 36px; }
.cp-question { flex: 1; }
.cp-num { width: 26px; color: #326574; font-weight: bold; flex: none; }
.cp-choices { width: 130px; flex: none; display: flex; justify-content: space-between; gap: 8px; }
.cp-choices label { display: flex; gap: 5px; align-items: center; font-size: 12.5px; cursor: pointer; padding: 4px 0; }
.consent-paper input[type=radio], .consent-paper input[type=checkbox] { accent-color: #12627b; width: 20px; height: 20px; margin: 0; flex: none; }
.cp-ack { display: flex; gap: 10px; align-items: flex-start; margin: 8px 2px; font-size: 12.5px; cursor: pointer; }
.cp-approve { margin-top: 12px; padding: 10px; background: #f3f8f6; border-radius: 6px; }
.cp-signature-area { display: flex; align-items: flex-end; gap: 16px; margin-top: 8px; }
.cp-signature-wrap { flex: 1; min-width: 0; }
.cp-signature-label { font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cp-signature-pad { border: 2px solid #6d96a6; background: #fff; position: relative; border-radius: 5px; overflow: hidden; min-height: 90px; }
.cp-signature-pad canvas { width: 100%; height: 160px; display: block; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: crosshair; overscroll-behavior: contain; }
.cp-placeholder { position: absolute; top: 60px; left: 0; right: 0; text-align: center; color: #aec2cb; font-size: 13px; pointer-events: none; }
.cp-signature-pad.signed .cp-placeholder { display: none; }
.cp-sign-status { font-size: 12px; color: #146451; font-weight: 700; margin-top: 5px; min-height: 17px; }
.cp-sigdate { max-width: 180px; }
.cp-footer { font-size: 9px; color: #6e8390; margin-top: 12px; text-align: center; }
.consent-paper .error, .consent-paper .cp-signature-pad.error { outline: 2px solid #b23e42; outline-offset: 2px; background: #fdf1f1; border-radius: 4px; }
.consent-done { max-width: 560px; margin: 12vh auto; text-align: center; }
@media (max-width: 650px) { .consent-paper { padding: 20px 15px; } .cp-choices { width: 110px; } .cp-signature-area { flex-direction: column; align-items: stretch; } .cp-sigdate { max-width: none; } }
@media print {
    @page { size: letter; margin: .32in; }
    .consent-body * { visibility: visible; }
    .consent-body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .consent-shell { max-width: none; padding: 0; }
    .consent-toolbar, .no-print { display: none !important; }
    .consent-paper { box-shadow: none; border-radius: 0; padding: 0; }
    .cp-section { break-after: avoid; }
    .cp-q, .cp-ack { break-inside: avoid; }
    .consent-paper input, .consent-paper textarea { background: transparent !important; }
}
.doc-paper { font-family: inherit; }
.doc-paper h2 { font-size: 1.15rem; margin: 18px 0 6px; }
.doc-paper p { line-height: 1.55; }
.doc-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.doc-frame-text { height: 60vh; }
.doc-image { max-width: 100%; height: auto; display: block; margin: 8px auto; }
.doc-reader.for-client .doc-paper { font-size: 1.1rem; }
.doc-reader.for-client .doc-frame { height: 84vh; }

/* The document library's space: full or nearly full, with the two ways out. */
.space-panel { border-left: 4px solid var(--warn, #b7791f); }
.space-panel.full { border-left-color: var(--err); background: color-mix(in srgb, var(--err-bg) 45%, var(--surface)); }
.space-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .9rem; }
.space-steps li { display: grid; gap: .35rem; justify-items: start; }
.space-steps form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Legal links: the page footer, the legal pages' own list, and under the tablet consent form. */
.foot .foot-links, .legal-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; justify-content: center; margin: .4rem 0 0; font-size: .85rem; }
.foot p { margin: 0; }
.legal-links { justify-content: flex-start; margin: 1.2rem 0; }
.consent-legal { text-align: center; font-size: .8rem; color: var(--muted, #5b6460); margin: 1rem 0 2rem; }

/* Word, Excel and PowerPoint files shown on screen in the reading view. */
.doc-office h2, .doc-office h3, .doc-office h4 { margin: 1.1em 0 .4em; }
.doc-office .doc-section { border-bottom: 1px solid var(--line, #d6dcd9); padding-bottom: .25em; margin-top: 1.6em; }
.doc-office .doc-item { padding-left: 1.2em; position: relative; }
.doc-office .doc-item::before { content: "•"; position: absolute; left: .3em; }
.doc-table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: .6em 0 1em; }
.doc-table td { border: 1px solid var(--line, #d6dcd9); padding: .3em .5em; vertical-align: top; }
.doc-media { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.doc-audio { width: 100%; margin: 1em 0; }
.cp-notice { border-left: 3px solid var(--ink, #13283b); padding-left: .7em; }
.q.note.notice { border-left: 3px solid currentColor; padding-left: .7em; }
.cp-guardian-notice { font-size: .8rem; letter-spacing: .01em; }

/* The printed consent form: a signature line at the foot of every printed page (the client signs each page). */
.cp-pagefoot { display: none; }
@media print {
    .cp-pagefoot { display: flex; gap: .5em; align-items: flex-end; position: fixed; left: 0; right: 0; bottom: 0; padding: 4mm 12mm 0; font-size: 9pt; background: #fff; border-top: 1px solid #c8d2da; }
    .cp-pagefoot-line { flex: 1; border-bottom: 1px solid #13283b; height: 1.2em; }
    .cp-pagefoot-line.short { flex: 0 0 28mm; }
    .consent-paper { padding-bottom: 16mm; }
    @page { margin-bottom: 20mm; }
}

/* The printed consent form, compact: site.js adds .cp-printing just before printing (and measures with it), so the
   client's part fits on one page; the parent or guardian part prints on a page of its own. */
.cp-printing.consent-paper { box-shadow: none; border-radius: 0; padding: 0; }
.cp-printing .cp-head { padding-bottom: 6px; margin-bottom: 8px; }
.cp-printing .cp-subtitle { margin: 4px 0 8px; }
.cp-printing .cp-line { margin: 5px 0; }
.cp-printing .cp-value { min-height: 22px; padding: 3px 6px; }
.cp-printing .cp-inline { margin: 4px 0; }
.cp-printing .cp-para { font-size: 10.2px; line-height: 1.25; margin: 5px 1px; }
.cp-printing .cp-q { min-height: 21px; padding: 2px 2px; font-size: 10.5px; }
.cp-printing .cp-choices label { padding: 1px 0; font-size: 10.5px; }
.cp-printing input[type=radio], .cp-printing input[type=checkbox] { width: 14px; height: 14px; }
.cp-printing .cp-ack { margin: 3px 2px; font-size: 10px; }
.cp-printing .cp-block { margin: 5px 0; }
.cp-printing textarea { min-height: 34px; }
.cp-printing .cp-signature-area { margin-top: 4px; }
.cp-printing .cp-signature-pad { min-height: 64px; }
.cp-printing .cp-section { margin-top: 7px; padding: 4px 8px; }
.cp-printing .cp-footer { margin-top: 6px; }
.cp-printing .no-print { display: none !important; }
.cp-onepage .cp-pagefoot { display: none !important; }
.cp-onepage .cp-part { margin: 0 auto; }
.cp-minor-note { font-weight: 700; }
.cp-guardian-page { margin-top: 28px; padding-top: 18px; border-top: 2px dashed #c8d2da; }
.cp-guardian-page .cp-guardian-notice { font-size: 12px; line-height: 1.45; }
@media print {
    .cp-guardian-page { break-before: page; margin-top: 0; padding-top: 0; border-top: 0; }
    .cp-onepage .cp-part { break-inside: avoid; }
}

/* ---------- Add-ons: tables, short forms, the walk-in QR code, the planning tools ---------- */
.table-scroll { overflow-x: auto; margin-bottom: 8px; }
.form-row { align-items: end; }
input.narrow { width: 84px; }
.panel.center { text-align: center; justify-items: center; }
img.qr { display: block; margin: 0 auto; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 8px; }
.compare-table td:first-child { font-weight: 600; }
.ticks { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.ticks li::marker { content: "✓  "; color: var(--brand); }
/* "Projected versus actual" on the progress chart: the plan's target as a dashed line. */
.chart .projected { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 6 5; opacity: .8; }
.chart-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key-line { display: inline-block; width: 26px; border-top: 3px solid var(--brand); }
.key-line.projected { border-top: 2px dashed var(--ink-2); }

/* ---------- The owner's screens on large monitors ----------
   From 1400px wide the owner's pages use the width: panels flow into columns (two on a 1920px screen, three on wider),
   lists show two items a row, spacing is a little tighter, and long pages get a sticky bar to jump between sections.
   Headings, notes, tables and anything else that isn't a panel keep the full width. Smaller screens are unchanged. */
@media (min-width: 1400px) {
    .content.owner-wide { max-width: 1760px; display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 14px 18px; align-items: start; padding-top: 4px; }
    .content.owner-wide > * { grid-column: 1 / -1; margin-top: 0; margin-bottom: 0; }
    .content.owner-wide > .panel, .content.owner-wide > form.panel, .content.owner-wide > section.panel, .content.owner-wide > details.panel { grid-column: auto; min-width: 0; }
    .content.owner-wide > .page-head { margin-bottom: 2px; }
    .content.owner-wide > form.stack, .content.owner-wide > form.panel { max-width: none; }
    .content.owner-wide > p.note { grid-column: auto; align-self: start; }
    .content.owner-wide > .section-title { margin-top: 10px; }
    .content.owner-wide .panel { padding: 16px 18px; }
    .content.owner-wide .panel h2 { margin-top: 0; }
    .content.owner-wide > .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); column-gap: 0; }
    .content.owner-wide > .list > .list-item { min-height: 54px; padding: 9px 16px; border-right: 1px solid var(--line); }
    .content.owner-wide table.report td, .content.owner-wide table.report th { padding: 5px 8px; }
    .jumpbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; background: color-mix(in srgb, var(--bg, var(--surface)) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--r-lg); }
    .jumpbar a { font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
    .jumpbar a:hover { background: var(--brand-soft); color: var(--brand-soft-ink); }
}
.jumpbar { display: none; }
@media (min-width: 1400px) { .jumpbar { display: flex; } }

/* "Are you sure?" box: opens where the person clicked (OK under the pointer); centred on small screens. */
.confirm-pop { width: min(380px, calc(100vw - 24px)); padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg, 0 10px 30px rgb(0 0 0 / 25%)); }
.confirm-pop.placed { position: fixed; margin: 0; }
.confirm-pop::backdrop { background: rgb(10 20 16 / 25%); }
.confirm-pop p { margin: 0 0 14px; line-height: 1.45; }
.confirm-pop-actions { display: flex; gap: 10px; }

/* Clients who hid the instructions: a small way back on, where the instruction box would be. */
.guide-show { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.guide-show[hidden] { display: none; }
.guide-show button { min-height: 40px; font-size: .95rem; }

/* Online shelf: the client's shop and the shelf manager. */
.shelf-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.shelf-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 18px; }
.shelf-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.shelf-card img, .shelf-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2, #eef3f0); display: grid; place-items: center; color: var(--ink-2); }
.shelf-body { display: grid; gap: 6px; padding: 12px 14px 14px; align-content: start; }
.shelf-body h2 { font-size: 1.1rem; margin: 0; }
.shelf-price { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.shelf-price s { color: var(--ink-2); }
.shelf-desc { margin: 0; color: var(--ink-2); line-height: 1.4; }
.shelf-body .row { display: flex; gap: 8px; align-items: center; }
.qty { width: 4.5em; }
.shelf-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: var(--r); }
.shelf-thumb.sm { width: 44px; height: 44px; flex: none; }
.shelf-home { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shelf-home a { display: grid; gap: 4px; color: var(--ink); text-decoration: none; }
.shelf-home img, .shelf-home .shelf-noimg { aspect-ratio: 1; border-radius: var(--r); object-fit: cover; width: 100%; }
table.compact { width: 100%; border-collapse: collapse; }
table.compact td, table.compact th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.compact .num { text-align: right; white-space: nowrap; }
table.compact th { font-size: 1rem; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; border-bottom: 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }

/* Openings, rebook, flash deals and scratch cards on the client's home screen. */
.engage-card { margin-bottom: 14px; }
a.engage-card { display: flex; gap: 14px; align-items: center; color: var(--ink); text-decoration: none; border: 2px solid var(--brand); }
.engage-card.deal { border-left: 4px solid var(--brand); }
.engage-card .code { font-family: ui-monospace, monospace; letter-spacing: .05em; }
.scratch { position: relative; width: min(100%, 360px); height: 170px; border-radius: var(--r-lg); overflow: hidden; touch-action: none; user-select: none; }
.scratch-prize { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; background: #fff8e6; border: 2px dashed #d9a400; border-radius: var(--r-lg); font-size: 1.1rem; }
.scratch-prize strong { font-size: 1.35rem; }
.scratch-cover { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; border-radius: var(--r-lg); }

/* Loyalty levels: how far the next one is. */
.tier-bar { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.tier-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* Polls and the wishlist. */
.poll-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 10px; align-items: center; }
.heart { background: none; border: 0; color: #c2185b; font-size: 1.6rem; line-height: 1; padding: 4px 8px; min-height: 44px; cursor: pointer; box-shadow: none; }
.heart:hover { background: none; transform: scale(1.1); }
.shelf-body { position: relative; }
.heart-form { position: absolute; top: 4px; right: 4px; }

/* Help: contents lists and "back to top". */
.help-toc { margin: 0 0 16px; }
.help-toc h2 { font-size: 1.1rem; margin: 0 0 8px; }
.help-toc ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.help-toc a { font-size: 1.02rem; }
.to-top { display: inline-block; margin-top: 8px; font-size: .95rem; }
.section-title .to-top { margin: 0; }
.to-top-float { position: fixed; right: 16px; bottom: 16px; z-index: 30; padding: 10px 14px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-lg, 0 6px 20px rgb(0 0 0 / 18%)); text-decoration: none; font-weight: 600; }
body.has-tabbar .to-top-float { bottom: 96px; }
html { scroll-behavior: smooth; }

/* The one-page manual. */
.manual-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.manual-bar .help-search { flex: 1 1 260px; margin: 0; }
.manual-toc { columns: 2 260px; column-gap: 28px; }
.manual-toc > h2 { column-span: all; }
.manual-toc-group { break-inside: avoid; margin-bottom: 10px; }
.manual-toc-group h3 { font-size: 1rem; margin: 6px 0 4px; }
.manual-guide { margin-bottom: 16px; scroll-margin-top: 70px; }
.manual-guide h3 { font-size: 1.25rem; margin: 0 0 4px; }
.manual-guide h4 { margin: 14px 0 6px; }
.manual-group { scroll-margin-top: 70px; }
.manual-problem { margin: 4px 0; }
@media print {
    /* An older print rule hides everything but print sheets; the manual is shown again. */
    body:has(.manual-guide) * { visibility: visible; }
    .sidebar, .topbar, .tabbar, .manual-tools, .to-top-float, .toasts, .guide-bar, [data-guide-show], .foot, .ad-card, .clinic-banner { display: none !important; }
    .content { max-width: none !important; padding: 0 !important; }
    .manual-toc { columns: 2; box-shadow: none; border: 0; }
    .manual-guide { break-before: page; box-shadow: none; border: 0; padding: 0; }
    .manual-guide .help-shot { max-width: 60%; break-inside: avoid; }
    .manual-guide .help-shot:not(.wide) { max-width: 32%; }
    .help-steps li { break-inside: avoid; }
    a[href^="#"] { color: inherit; text-decoration: none; }
}

.to-top-float { opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top-float.on { opacity: 1; pointer-events: auto; }

/* Cards that open a list (the owner's overview): the chosen one is outlined. */
a.card.pick { cursor: pointer; }
a.card.pick[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
a.card.pick.due { border-color: var(--warn); background: var(--warn-bg); }
a.card.pick.due .lbl, a.card.pick.due .num { color: var(--warn); }
a.card.pick.none .num { color: var(--ink-2); }

/* Ideas: the vote count on the left, the owner's answer, and the owner's small forms. */
.list-item.idea { align-items: flex-start; }
.idea-votes { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 8px; border-radius: var(--r); background: var(--surface-2); font-size: .75rem; color: var(--ink-2); text-align: center; }
.idea-votes strong { font-size: 1.25rem; color: var(--ink); line-height: 1.2; }
.idea-answer { color: var(--ink); }
.idea-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 8px; }
.idea-form label { margin: 0; }
.idea-form .grow { flex: 1 1 240px; }
.idea-more { margin-top: 6px; }
.idea-filters { gap: 6px; margin-bottom: 12px; }
.idea-filters a.tag { text-decoration: none; }
.idea-gap { width: 10px; }

/* v1.66: before-visit checklist, smile journey, wallet card, staff "Today", review stars, results proof, benchmarks. */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; }
.checklist li .i { flex: none; margin-top: 3px; color: var(--brand); }
.proof-box { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--r); background: var(--surface-2); font-weight: 550; }
.journey { list-style: none; padding: 0; margin: 0 0 20px; position: relative; }
.journey::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.journey-step { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.journey-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; color: var(--brand); z-index: 1; }
.journey-step.start .journey-dot { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.journey-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.journey-body .tag { align-self: flex-start; }
.journey-photo { width: 120px; border-radius: var(--r); margin-top: 4px; }
.journey-sum .lead { margin-top: 0; }
.voucher-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 380px; margin: 0 auto; }
.voucher-amount { font-size: 2rem; }
.voucher-qr { width: 200px; height: 200px; image-rendering: pixelated; }
.voucher-code { font-size: 1.2rem; letter-spacing: .08em; }
.today-row { align-items: center; }
.today-row.here { background: var(--surface-2); }
.today-time { flex: none; min-width: 58px; font-weight: 650; font-size: 1.1rem; display: flex; flex-direction: column; line-height: 1.1; }
.today-time small { font-size: .7rem; color: var(--ink-2); font-weight: 500; }
.today-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stars-pick { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 320px; }
.stars-pick button { font-size: 1.4rem; letter-spacing: .1em; justify-content: center; }
.card.bench.good { border-color: var(--brand); }
.card.bench.low { border-color: var(--warn); }
.card.bench .lbl:last-child { margin-top: 4px; }
.prep .checklist { margin-bottom: 4px; }
@media print { body:has(.voucher-card) .sidebar, body:has(.voucher-card) .topbar, body:has(.voucher-card) .tabbar, body:has(.voucher-card) .back { display: none !important; } body:has(.voucher-card) * { visibility: visible; } }
.group-row { flex-wrap: wrap; }
.group-row > .end { flex-basis: 100%; justify-content: flex-start; flex-wrap: wrap; }

/* Help: the floating button goes back to the topics (at the top of the page). */
.manual-toc, #contents { scroll-margin-top: 70px; }
.logo-tips { margin: -4px 0 8px; padding-left: 18px; display: grid; gap: 2px; }

/* The guided square camera, avatars with photos, and the logo gallery. */
.squarecam { display: grid; gap: 10px; }
.cam-stage { position: relative; width: min(300px, 100%); aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: #111; touch-action: none; }
.cam-stage video, .cam-stage canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-frame { position: absolute; inset: 8%; border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 999px rgb(0 0 0 / 35%); pointer-events: none; }
.squarecam[data-shape="circle"] .cam-frame { border-radius: 50%; }
.cam-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cam-controls input[type=range] { flex: 1 1 140px; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.gallery-pick { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; font-size: .8rem; cursor: pointer; }
.gallery-pick img { width: 80px; height: 80px; object-fit: contain; border-radius: 14px; background: #fff; border: 2px solid var(--line); }
.gallery-pick input:checked + img { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.gallery-pick input { position: absolute; opacity: 0; pointer-events: none; }
.gallery-owner { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery-item { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; }
.gallery-item.off img { opacity: .4; }
.today-name { display: inline-flex; align-items: center; gap: 8px; }

/* "I didn't ask for this invitation" */
.not-me { margin: .5rem 0 0; text-align: center; }
.not-me button.link { font-size: .85rem; text-decoration: underline; }

/* Go-live checklist */
.golive .fix { color: var(--ink); }
.golive-todo .tile-icon { color: var(--err); }
.golive-ready .tile-icon { color: var(--ok); }

/* "Your progress was reviewed" */
.reviewed-card .review-note { margin: 0; padding: .5rem .75rem; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: var(--r-sm); }
.panel.reviewed summary .tag { margin-left: .5rem; }

/* Check-ups at 3 and 6 months */
.checkup-marks { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }

/* Keep my scores, delete my photos */
.photos-only { border-top: 1px solid var(--line); padding-top: .75rem; }
.photos-only summary { cursor: pointer; font-weight: 600; }

/* Updates */
.update-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .2rem; }
.update-steps .step-error { color: var(--err); }
.update-steps .step-ok { color: var(--ok); }
.key-print { font-family: ui-monospace, monospace; font-size: .9rem; }

/* ---------- Phone-first team screens (v1.74) ---------- */
.tabbar .tab-more { display: grid; justify-items: center; gap: 3px; padding: 10px 0 12px; font-size: .7rem; font-weight: 550; color: var(--ink-3); background: none; border: 0; min-height: 0; border-radius: 0; }
.tabbar .tab-more:active { transform: none; }
@media (max-width: 959px) {
    .team-app .menu-btn { display: none; }
}
@media (max-width: 600px) {
    .team-app .content { padding-left: 12px; padding-right: 12px; }
    .team-app form.grid, .team-app .grid2, .team-app .grid { grid-template-columns: 1fr; }
    .team-app button, .team-app .button { min-height: 46px; }
    .team-app button.small, .team-app .button.small { min-height: 40px; }
    .team-app input, .team-app select, .team-app textarea { font-size: 16px; }
    .team-app .page-head { flex-wrap: wrap; gap: 10px; }
    .team-app .page-head .row { width: 100%; }
    .team-app .page-head .row .button { flex: 1 1 auto; }
    .team-app .list-item .end { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
    .team-app table.report { font-size: .84rem; }
    .team-app table.report th:first-child, .team-app table.report td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
    .team-app .seg.list-switch { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
}

/* ---------- Drag and drop onto uploads ---------- */
.droppable.drop-on { outline: 2px dashed var(--brand); outline-offset: 4px; background: var(--brand-soft); }
.feel .hint { flex-basis: 100%; margin: 4px 0 0; }
.drop-hint { display: block; font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.drop-hint::before { content: "\2193  "; }
.gallery-group { margin: 18px 0 8px; font-size: .95rem; }
.gallery-fold { margin: 0 0 10px; }
.gallery-fold > summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
.gallery-fold[open] > summary { margin-bottom: 10px; }
/* The check before upload: each preview says whether the photo can be measured. */
.previews .check { margin-top: 6px; font-size: .74rem; font-weight: 600; display: grid; gap: 4px; }
.previews .check.ok { color: var(--brand); }
.previews .check.checking { color: var(--ink-3); }
.previews .check.bad { color: var(--danger, #b42318); }
.previews .check.bad.kept { color: var(--ink-3); }
.previews .check button { min-height: 32px; font-size: .74rem; padding: 0 8px; }
.previews li.bad img { outline: 3px solid var(--danger, #b42318); outline-offset: -3px; }
.previews li.bad:has(.kept) img { outline-color: var(--line); }
.previews:has(.check) { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.previews li:has(.check) .src { top: 6px; bottom: auto; }
.previews .check button { width: 100%; white-space: normal; line-height: 1.2; padding: 4px 6px; }
/* Things waiting: a small number next to a menu page, or its group. */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger, #c0392b); color: #fff; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.nav-group > summary .nav-badge { margin-left: auto; }
.nav-group[open] > summary .nav-badge { display: none; }

/* The store apps: businesses buy from the platform on the website (StoreApp). */
.web-only-note { display: none; }
.store-app .web-only-note { display: flex; }
.store-app [data-web-only] { display: none !important; }

/* Lab and colour check (beta): the measured-areas picture. */
.lab-overlay { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; border-radius: var(--r); background: var(--surface-2); }
.lab-cam { display: grid; gap: 10px; }
.lab-cam video { width: 100%; max-height: 480px; border-radius: var(--r); background: #000; object-fit: contain; }
.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.list-item .sub.colour-lines { display: block; white-space: normal; overflow: visible; text-overflow: clip; }
.colour-help { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.colour-help li { display: list-item; }
/* Salons and spas: the cover photo on the client home and the branding page. */
.cover-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r); }
.salon-hero { display: grid; gap: 10px; }
.salon-hero .cover { width: 100%; height: 180px; object-fit: cover; border-radius: var(--r); }
.allergy { color: var(--err); background: var(--err-bg); border-radius: var(--r-sm); padding: 6px 10px; font-weight: 600; }
.staff-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.staff-pick label { display: grid; justify-items: center; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; text-align: center; }
.staff-pick input { position: absolute; opacity: 0; }
.staff-pick input:checked + .staff-card { outline: 2px solid var(--brand); }
.staff-pick img, .staff-face { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand-soft-ink); font-weight: 700; }
.quiet-tag { background: var(--ok-bg); color: var(--ok); border-radius: 999px; padding: 1px 8px; font-size: .8em; }

/* Booking a person: the "Who" choice on the booking page, and a person's hours on the Team page. */
.staff-pick .staff-card { display: grid; justify-items: center; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); text-align: center; color: inherit; text-decoration: none; }
.staff-pick .staff-card.on { outline: 2px solid var(--brand); outline-offset: -1px; }
.staff-pick .staff-card .hint { font-size: .85em; }
.staff-hours { display: grid; gap: 6px; }
.staff-hours label { display: grid; grid-template-columns: 3em 1fr 1fr; gap: 8px; align-items: center; }
.person-tag { font-weight: 600; }
.report.rota td { white-space: nowrap; vertical-align: top; }
.report.rota td.changed { background: var(--brand-soft); }
.report.rota details summary { cursor: pointer; }
.itinerary { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* Demo accounts: the banner on every demo page, and the simulated messages. */
.demo-banner { background: #fff7e0; color: #6b4e00; border-bottom: 1px solid #f0dca0; }
.demo-message { white-space: pre-wrap; font: inherit; background: var(--surface-2); padding: 12px; border-radius: var(--r); margin: 8px 0 0; }
/* Check-ins in the treatment form: "After [n] days" and the message side by side. */
.checkin-step { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: end; }
.checkin-step label { margin: 0; }
.checkin-step .qty { width: 5.5em; display: inline-block; }
.checkin-card { border-left: 4px solid var(--brand); }
.photo-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.list-item.attention { border-left: 4px solid #b91c1c; }
/* Automatic shutter: the Auto switch, and the countdown ("Hold still… 3") shown large and green. */
.camera .cam-auto { color: #fff; background: rgb(255 255 255 / 14%); border-color: transparent; }
.camera .cam-auto[aria-pressed="true"] { background: #15803d; }
.camera-tip.good { background: #15803d; color: #fff; }
.camera.counting .camera-tip { font-size: 1.3rem; padding: 10px 18px; }
.camera.counting .guide { border-color: #4ade80; border-style: solid; }
.camera .camera-bottom .hint { color: #fff; justify-self: end; }
.cc-cue.good { color: #15803d; font-weight: 600; }
.cc-cue.warn { color: #b87a00; font-weight: 600; }
.picked-count { display: block; margin-top: 4px; }
