/* Next Chair — shared styles for index.html, app.html and book.html.
   One committed dark look: near-black ground, champagne accent, editorial serif headlines. */
/* ---------- themes
   Each shop picks one theme; it styles both the pro app and the public booking page.
   Every color in this file comes from these tokens. --gold is the theme's accent
   (gold only in Champagne). Any element can carry data-nc-theme to preview a theme
   locally, which is how the theme picker draws its swatches. */
:root {
  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --body: 'Manrope', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --display-weight: 400;
  --display-track: 0;
  --brand: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif; /* Next Chair wordmark, never changes */
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --shadow: rgba(0, 0, 0, .5);
  --scrim: rgba(0, 0, 0, .62);
}

/* Champagne: near-black and soft gold (default) */
:root,
[data-nc-theme="champagne"] {
  --ink: #0E0D0C;
  --deep: #080706;
  --surface: #1A1816;
  --raised: #24211E;
  --line: #2E2A26;
  --line-soft: #221F1C;
  --bar: #141210;
  --fg: #F4EFE8;
  --soft: #CFC6BB;
  --muted: #A39B91;
  --dim: #7D756C;
  --gold: #D9B98C;
  --gold-hi: #EBD3B0;
  --gold-ink: #0E0D0C;
  --paper: #F4EFE8;
  --paper-ink: #0E0D0C;
  --paper-muted: #4A433C;
  --paper-chip: #E3DACE;
  --paper-line: #DCD2C4;
  --dash: #5A4E40;
  --chip-line: #3A3530;
  --blk: #3B2F26;
  --blk-sub: #CDBFAF;
  --hatch-a: #161412;
  --hatch-b: #1C1A17;
  --topbar: rgba(14, 13, 12, .92);
  --closed: rgba(255, 255, 255, .02);
  --ok: #B9D7A5;
  --ok-bg: #22301F;
  --warn: #E8B27A;
  --bad: #F0A39A;
  --bad-bg: #3A1F1C;
  --danger-line: #5A2E2A;
  color-scheme: dark;
}

/* Rose Noir: black cherry and blush */
[data-nc-theme="rose"] {
  --ink: #110D0E;
  --deep: #0A0708;
  --surface: #1C1618;
  --raised: #262022;
  --line: #33292C;
  --line-soft: #241D1F;
  --bar: #161112;
  --fg: #F7EEEE;
  --soft: #D8C8CA;
  --muted: #AE9B9E;
  --dim: #84727A;
  --gold: #E9A9A4;
  --gold-hi: #F4C6C1;
  --gold-ink: #1A0E0F;
  --paper: #F7ECEB;
  --paper-ink: #1A0E0F;
  --paper-muted: #5A4245;
  --paper-chip: #EEDBDA;
  --paper-line: #E3CFCD;
  --dash: #6A4B4E;
  --chip-line: #45373A;
  --blk: #43292C;
  --blk-sub: #DCC0C2;
  --hatch-a: #181213;
  --hatch-b: #1F1819;
  --topbar: rgba(17, 13, 14, .92);
  --closed: rgba(255, 255, 255, .02);
  --ok: #B9D7A5;
  --ok-bg: #22301F;
  --warn: #E8B27A;
  --bad: #F0A39A;
  --bad-bg: #3A1F1C;
  --danger-line: #5A2E2A;
  color-scheme: dark;
}

/* Sage: forest black and soft green */
[data-nc-theme="sage"] {
  --ink: #0D100E;
  --deep: #070908;
  --surface: #161B18;
  --raised: #1F2521;
  --line: #2A322D;
  --line-soft: #1C221E;
  --bar: #121613;
  --fg: #EEF2EC;
  --soft: #C7D0C4;
  --muted: #97A396;
  --dim: #707C70;
  --gold: #B9CFA0;
  --gold-hi: #D1E2BD;
  --gold-ink: #0D100E;
  --paper: #EEF2EA;
  --paper-ink: #0D100E;
  --paper-muted: #3F4A40;
  --paper-chip: #DCE5D6;
  --paper-line: #CBD6C5;
  --dash: #4A5A48;
  --chip-line: #354036;
  --blk: #2B3A2C;
  --blk-sub: #C3D2BE;
  --hatch-a: #141815;
  --hatch-b: #1A1F1B;
  --topbar: rgba(13, 16, 14, .92);
  --closed: rgba(255, 255, 255, .02);
  --ok: #B9D7A5;
  --ok-bg: #22301F;
  --warn: #E8B27A;
  --bad: #F0A39A;
  --bad-bg: #3A1F1C;
  --danger-line: #5A2E2A;
  color-scheme: dark;
}

/* Lilac: deep plum and lavender */
[data-nc-theme="lilac"] {
  --ink: #110E15;
  --deep: #09070C;
  --surface: #1B1720;
  --raised: #25202B;
  --line: #322B39;
  --line-soft: #221D28;
  --bar: #15111A;
  --fg: #F2EEF7;
  --soft: #D0C7DB;
  --muted: #A498B3;
  --dim: #7D7189;
  --gold: #CDB6EC;
  --gold-hi: #E0D1F5;
  --gold-ink: #120E16;
  --paper: #F3EEF8;
  --paper-ink: #120E16;
  --paper-muted: #4B4157;
  --paper-chip: #E2D8EE;
  --paper-line: #D6CAE4;
  --dash: #5A4C6B;
  --chip-line: #3E3549;
  --blk: #352A44;
  --blk-sub: #D3C6E4;
  --hatch-a: #18141C;
  --hatch-b: #1E1A23;
  --topbar: rgba(17, 14, 21, .92);
  --closed: rgba(255, 255, 255, .02);
  --ok: #B9D7A5;
  --ok-bg: #22301F;
  --warn: #E8B27A;
  --bad: #F0A39A;
  --bad-bg: #3A1F1C;
  --danger-line: #5A2E2A;
  color-scheme: dark;
}

/* Chrome: gunmetal and ice blue */
[data-nc-theme="chrome"] {
  --ink: #0C0F12;
  --deep: #06080A;
  --surface: #151A1F;
  --raised: #1E242A;
  --line: #2A323A;
  --line-soft: #1C2228;
  --bar: #11151A;
  --fg: #EDF2F6;
  --soft: #C5CFD8;
  --muted: #95A3B0;
  --dim: #6E7B88;
  --gold: #A9CBE0;
  --gold-hi: #C8DFEC;
  --gold-ink: #0C0F12;
  --paper: #EEF3F6;
  --paper-ink: #0C0F12;
  --paper-muted: #3E4954;
  --paper-chip: #DCE5EC;
  --paper-line: #CAD6DF;
  --dash: #46576A;
  --chip-line: #34404C;
  --blk: #233241;
  --blk-sub: #BFD0DE;
  --hatch-a: #12161A;
  --hatch-b: #181D22;
  --topbar: rgba(12, 15, 18, .92);
  --closed: rgba(255, 255, 255, .02);
  --ok: #B9D7A5;
  --ok-bg: #22301F;
  --warn: #E8B27A;
  --bad: #F0A39A;
  --bad-bg: #3A1F1C;
  --danger-line: #5A2E2A;
  color-scheme: dark;
}

/* Barbershop: navy and pole red */
[data-nc-theme="barbershop"] {
  --ink: #0D1220;
  --deep: #070A13;
  --surface: #161D2D;
  --raised: #1F2738;
  --line: #2B3448;
  --line-soft: #1D2435;
  --bar: #111727;
  --fg: #F3F2EE;
  --soft: #CFD1D8;
  --muted: #9CA3B4;
  --dim: #737B8E;
  --gold: #E8665A;
  --gold-hi: #F28C82;
  --gold-ink: #0D1220;
  --paper: #F4F2EC;
  --paper-ink: #0D1220;
  --paper-muted: #454B5C;
  --paper-chip: #E3E1DA;
  --paper-line: #D6D4CC;
  --dash: #4C5670;
  --chip-line: #36405A;
  --blk: #2E3A55;
  --blk-sub: #C9D1E3;
  --hatch-a: #121828;
  --hatch-b: #182030;
  --topbar: rgba(13, 18, 32, .92);
  --closed: rgba(255, 255, 255, .02);
  --ok: #B9D7A5;
  --ok-bg: #22301F;
  --warn: #E8B27A;
  --bad: #F0A39A;
  --bad-bg: #3A1F1C;
  --danger-line: #5A2E2A;
  color-scheme: dark;
}

/* Porcelain: ivory and bronze */
[data-nc-theme="porcelain"] {
  --ink: #F7F3EE;
  --deep: #EDE7DF;
  --surface: #FFFFFF;
  --raised: #F1ECE5;
  --line: #E2DAD0;
  --line-soft: #ECE6DE;
  --bar: #FBF8F4;
  --fg: #1C1915;
  --soft: #4A433C;
  --muted: #6E665D;
  --dim: #857C72;
  --gold: #8A5A2B;
  --gold-hi: #A06C38;
  --gold-ink: #FFFFFF;
  --paper: #1C1915;
  --paper-ink: #F7F3EE;
  --paper-muted: #CFC6BB;
  --paper-chip: #34302A;
  --paper-line: #3A352F;
  --dash: #C9BBA8;
  --chip-line: #D5CBBE;
  --blk: #EADFD2;
  --blk-sub: #6E5F50;
  --hatch-a: #EFE9E2;
  --hatch-b: #E7E0D7;
  --topbar: rgba(247, 243, 238, .92);
  --closed: rgba(0, 0, 0, .025);
  --ok: #2F6B3A;
  --ok-bg: #E1EEDA;
  --warn: #8F5410;
  --bad: #A3362C;
  --bad-bg: #F7E0DC;
  --danger-line: #E3B7B0;
  color-scheme: light;
}

/* Blush: rosewater and berry */
[data-nc-theme="blush"] {
  --ink: #FBF3F0;
  --deep: #F3E6E1;
  --surface: #FFFFFF;
  --raised: #F6EAE6;
  --line: #EBD9D3;
  --line-soft: #F2E5E1;
  --bar: #FDF8F6;
  --fg: #2A1A1C;
  --soft: #5A4246;
  --muted: #7A6266;
  --dim: #8E7478;
  --gold: #B24A5A;
  --gold-hi: #C4606F;
  --gold-ink: #FFFFFF;
  --paper: #2A1A1C;
  --paper-ink: #FBF3F0;
  --paper-muted: #D9C3C6;
  --paper-chip: #43292D;
  --paper-line: #4A3034;
  --dash: #D9B3AE;
  --chip-line: #E2CCC7;
  --blk: #F1D9D6;
  --blk-sub: #7A5257;
  --hatch-a: #F6ECE9;
  --hatch-b: #EFE2DE;
  --topbar: rgba(251, 243, 240, .92);
  --closed: rgba(0, 0, 0, .025);
  --ok: #2F6B3A;
  --ok-bg: #E1EEDA;
  --warn: #8F5410;
  --bad: #A3362C;
  --bad-bg: #F7E0DC;
  --danger-line: #E3B7B0;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--deep); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- type */
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.display { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); margin: 0; line-height: 1.05; text-wrap: balance; }
.display em { color: var(--gold); }
.xl { font-size: 34px; } .lg { font-size: 28px; } .md { font-size: 22px; }
.label { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.big { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 44px; line-height: 1; }
.sm { font-size: 13px; } .xs { font-size: 11px; } .b { font-weight: 700; }
.muted { color: var(--muted); } .soft { color: var(--soft); } .gold { color: var(--gold); } .bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }
p { margin: 0; }

/* ---------- layout */
.stack { display: flex; flex-direction: column; gap: var(--gap, 14px); min-width: 0; }
.row { display: flex; align-items: center; gap: var(--gap, 12px); min-width: 0; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.card.tight { padding: 4px 16px; }
.tile { background: var(--surface); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .v { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 26px; }
.paper { background: var(--paper); color: var(--paper-ink); border-radius: 24px; padding: 18px; }
.paper .pm { color: var(--paper-muted); }
.pchip { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--paper-chip); color: var(--paper-ink); }
.dash { border: 1px dashed var(--dash); border-radius: 18px; padding: 14px 16px; }
.goldline { border: 1px solid var(--gold); border-radius: 22px; padding: 16px; }
.notice { border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.notice.err { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- controls */
.btn { min-height: 48px; border-radius: 24px; padding: 0 20px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; background: transparent; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 19px; }
.btn.full { width: 100%; min-height: 54px; border-radius: 27px; font-size: 16px; }
.btn.flex { flex: 1; }
.btn-gold { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.btn-gold:hover { background: var(--gold-hi); color: var(--gold-ink); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--muted); color: var(--fg); }
.btn-light { border-color: var(--fg); color: var(--fg); }
.btn-dark { background: var(--ink); color: var(--fg); }
.btn-ondark { border-color: var(--paper-ink); color: var(--paper-ink); }
.btn-danger { border-color: var(--danger-line); color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.link { border: none; background: none; color: var(--gold); font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px 0; text-decoration: none; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--soft); font-weight: 600; font-size: 13px; cursor: pointer; flex: none; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--ink); border-color: var(--fg); font-weight: 700; }
.opt { min-height: 50px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 12px; }
.opt[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 700; }
.opt:disabled { background: transparent; color: var(--dim); border-color: var(--line-soft); cursor: not-allowed; }
.pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; display: inline-block; white-space: nowrap; }
.pill.gold { background: var(--gold); color: var(--gold-ink); }
.pill.line { border: 1px solid var(--chip-line); color: var(--soft); font-weight: 600; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; min-width: 0; }
.field .hint { font-weight: 500; color: var(--dim); font-size: 12px; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 48px; border-radius: 14px; background: var(--raised); color: var(--fg);
  border: 1px solid var(--line); padding: 10px 14px; font-size: 16px; font-weight: 500;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--gold); }
.prefix { display: flex; align-items: stretch; border-radius: 14px; border: 1px solid var(--line); background: var(--raised); overflow: hidden; }
.prefix span { display: flex; align-items: center; padding: 0 0 0 14px; color: var(--dim); font-size: 15px; white-space: nowrap; }
.prefix input { border: none !important; background: transparent !important; padding-left: 2px !important; min-width: 0; }
.prefix:focus-within { border-color: var(--gold); }
.check { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.search { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; border-radius: 25px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--fg); font-size: 16px; outline: none; }
.search:focus-within { border-color: var(--gold); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- lists */
.list { display: flex; flex-direction: column; }
.item { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.item:last-child { border-bottom: none; }
.item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.item .time { width: 58px; font-size: 13px; color: var(--muted); flex: none; }
.line-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.line-item:last-child { border-bottom: none; }
.av { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--fg); flex: none; background: var(--raised); }
.av.serif { font-family: var(--display); font-weight: var(--display-weight); }
.empty { text-align: center; padding: 32px 12px; display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ---------- app shell */
.app { min-height: 100vh; min-height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; background: var(--ink); position: relative; }
@media (min-width: 560px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter-r) 10px var(--gutter-l); background: var(--topbar); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.mark { font-family: var(--brand); font-weight: 400; letter-spacing: 0; font-size: 22px; line-height: 1; white-space: nowrap; color: var(--fg); text-decoration: none; }
.mark em { color: var(--gold); }
.main { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 20px var(--gutter-r) 28px var(--gutter-l); }
.main.with-tabs { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.enter { animation: rise .26s ease both; }
@keyframes rise { from { opacity: .4; transform: translateY(6px); } }
.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 10; display: flex; justify-content: space-around; background: var(--bar); border-top: 1px solid var(--line); padding: 8px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
.tabs a { min-width: 60px; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--gold); font-weight: 700; }
.fab { position: fixed; z-index: 11; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); right: max(16px, calc(50% - 260px + 16px)); width: 58px; height: 58px; border-radius: 29px; border: none; background: var(--gold); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px var(--shadow); cursor: pointer; }
.spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { min-height: 60vh; display: flex; align-items: center; justify-content: center; }

/* ---------- sheet + toast */
.scrim { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.scrim-hit { position: absolute; inset: 0; border: none; background: var(--scrim); cursor: pointer; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line); border-radius: 28px 28px 0 0; display: flex; flex-direction: column; gap: 14px; padding: 20px var(--gutter-r) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); animation: up .22s ease both; }
@keyframes up { from { transform: translateY(24px); opacity: .5; } }
.sheet-open .toast { top: calc(16px + env(safe-area-inset-top, 0px)); bottom: auto; z-index: 60; }
.installtip { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); max-width: 496px; z-index: 40; display: flex; align-items: flex-start; gap: 12px; padding: 14px 10px 14px 14px; background: var(--paper); color: var(--paper-ink); border-radius: 18px; box-shadow: 0 14px 34px var(--shadow); font-size: 15px; line-height: 1.4; animation: up .25s ease both; }
body:has(.tabs) .installtip { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.installtip img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.installtip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.installtip-btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.installtip-x { flex: none; width: 36px; height: 36px; margin: -6px 0 0; border: 0; background: none; color: inherit; opacity: .6; font-size: 26px; line-height: 1; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: min(420px, calc(100% - 32px)); width: max-content; background: var(--paper); color: var(--paper-ink); font-weight: 600; font-size: 14px; padding: 12px 18px; border-radius: 16px; box-shadow: 0 12px 30px var(--shadow); z-index: 50; text-align: center; animation: up .2s ease both; }

/* ---------- calendar */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.daybtn { min-height: 62px; border-radius: 16px; border: none; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none; }
.daybtn span { font-size: 17px; color: var(--fg); font-family: var(--display); font-weight: var(--display-weight); }
.daybtn[aria-current="date"] span { color: var(--gold); }
.daybtn[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.daybtn[aria-pressed="true"] span { color: var(--gold-ink); }
.tl { position: relative; }
.hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--dim); padding-top: 3px; }
.lane { position: absolute; left: 50px; right: 0; top: 0; bottom: 0; }
.blk { all: unset; box-sizing: border-box; position: absolute; left: 0; right: 0; border-radius: 12px; padding: 6px 10px; background: var(--blk); color: var(--fg); font-size: 12px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; cursor: pointer; }
.blk:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.blk .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk .s { color: var(--blk-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.done { background: var(--raised); } .blk.done .t { color: var(--soft); } .blk.done .s { color: var(--dim); }
.blk.live { background: var(--paper); color: var(--paper-ink); } .blk.live .s { color: var(--paper-muted); }
.blk.block { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 8px, var(--hatch-b) 8px 16px); border: 1px solid var(--line); color: var(--muted); }
.blk.off { background: transparent; border: 1px dashed var(--chip-line); color: var(--dim); text-decoration: line-through; }
.closed { position: absolute; left: 50px; right: 0; background: repeating-linear-gradient(135deg, transparent 0 10px, var(--closed) 10px 20px); }
.nowline { position: absolute; left: 44px; right: 0; height: 2px; background: var(--gold); z-index: 2; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 5px; background: var(--gold); }

/* ---------- marketing */
.site { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter-l); }
.site-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(18px + env(safe-area-inset-top, 0px)) 0 18px; }
.hero { display: grid; gap: 40px; padding: 48px 0 64px; align-items: center; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: clamp(44px, 8vw, 84px); }
.lede { font-size: 18px; color: var(--soft); max-width: 34em; line-height: 1.55; }
.phone { justify-self: center; width: min(320px, 100%); border-radius: 40px; border: 1px solid var(--line); background: var(--ink); padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 40px 80px var(--shadow); }
.features { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; margin-bottom: 64px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feature { background: var(--ink); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.feature h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; }
.feature p { color: var(--muted); line-height: 1.55; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 13px; }

/* ---------- theme picker */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.themecard { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.themecard[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.themecard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.themecard:disabled { cursor: progress; opacity: .7; }
.tprev { display: flex; flex-direction: column; gap: 7px; min-height: 124px; padding: 12px; border-radius: 14px; background: var(--ink); color: var(--fg); border: 1px solid var(--line); }
.tprev .aa { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 24px; line-height: 1; }
.tprev .aa em { color: var(--gold); }
.tprev .crd { display: block; height: 24px; border-radius: 8px; background: var(--paper); }
.tprev .ln { display: block; height: 6px; border-radius: 3px; background: var(--raised); }
.tprev .pillbar { display: block; height: 20px; width: 58%; border-radius: 10px; background: var(--gold); margin-top: auto; }

/* ---------- font picker */
.fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fontcard { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.fontcard[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.fontcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fontcard:disabled { cursor: progress; opacity: .7; }
.fprev { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 88px; padding: 12px; border-radius: 14px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.fprev .fa { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 26px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fprev .fa em { color: var(--gold); }
.fprev .fb { font-family: var(--body); font-size: 13px; color: var(--soft); }

/* ---------- team calendar */
.calscroll { margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding: 0 var(--gutter-r) 4px var(--gutter-l); }
.colheads { display: grid; gap: 6px; margin-left: 50px; padding-bottom: 6px; position: sticky; top: 0; }
.colheads span { text-align: center; color: var(--soft); }
.lanes { position: absolute; left: 50px; right: 0; top: 0; bottom: 0; display: grid; gap: 6px; }
.colx { position: relative; min-width: 0; }
.colx .closed { left: 0; right: 0; }

/* ---------- Help & feedback */
.tabdot { position: absolute; top: 2px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--bar); }
.bubble { padding: 12px 14px; border-radius: 18px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; font-size: 15px; }
.bubble.me { background: var(--gold); color: var(--gold-ink); border-bottom-right-radius: 6px; }
.bubble.them { background: var(--raised); border: 1px solid var(--line); border-bottom-left-radius: 6px; }

/* ---------- Calendar sync: busy time from a linked calendar */
.busyx { position: absolute; left: 4px; right: 4px; border-radius: 10px; border: 1px dashed var(--chip-line); background: repeating-linear-gradient(45deg, var(--hatch-a) 0 6px, var(--hatch-b) 6px 12px); color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 8px; overflow: hidden; pointer-events: none; }
.tl > .lanes .colx .busyx { left: 4px; }

/* ---------- Stats & reports */
.rankbar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px; }
.rankbar span { display: block; height: 100%; border-radius: 3px; background: var(--gold); }
.rank { width: 28px; height: 28px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; background: var(--raised); color: var(--soft); }
.dowbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; }
.dowbar { width: 100%; max-width: 34px; height: 96px; border-radius: 8px; background: var(--line-soft); display: flex; align-items: flex-end; overflow: hidden; }
.dowbar span { display: block; width: 100%; background: var(--gold); border-radius: 8px 8px 0 0; min-height: 2px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
table.rt { width: 100%; border-collapse: collapse; font-size: 14px; }
.rt th, .rt td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.rt thead th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rt tbody th { font-weight: 600; }
.rt .n { text-align: right; font-variant-numeric: tabular-nums; }
.rt tr.quiet td, .rt tr.quiet th { color: var(--dim); }
.rt tfoot th, .rt tfoot td { font-weight: 800; border-bottom: 0; border-top: 1px solid var(--line); }
.report { display: flex; flex-direction: column; gap: 16px; }
@media print {
  :root { color-scheme: light; }
  body, .app, .main { background: #fff !important; color: #111 !important; }
  .top, .tabs, .noprint, .toast, .installtip { display: none !important; }
  .main { padding: 0 !important; }
  .card, .tablewrap { background: #fff !important; border-color: #bbb !important; }
  .rt th, .rt td { color: #111 !important; border-color: #ddd !important; }
  .muted, .soft, .eyebrow { color: #444 !important; }
}

/* ---------- Day calendar: clearer cards */
.daysum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.daysum span { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 6px; text-align: center; font-size: 11px; color: var(--muted); line-height: 1.25; }
.daysum b { display: block; font-size: 16px; color: var(--fg); font-weight: 700; }
.hr.half { border-top: 1px dashed var(--line-soft); opacity: .6; }
.blk { background: var(--blk); background: color-mix(in srgb, var(--gold) 20%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.blk .s { color: var(--soft); }
.blk.rich { flex-direction: row; align-items: flex-start; gap: 10px; padding: 8px 10px; font-size: 13px; }
.blk.rich .t { font-size: 15px; }
.blk .av.sm { width: 32px; height: 32px; font-size: 12px; flex: none; background: var(--raised); color: var(--fg); }
.blk .p { font-weight: 700; font-size: 13px; }
.blk .tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 8px; background: var(--raised); color: var(--soft); }
.blk .tag.ok { background: var(--ok-bg); color: var(--ok); }
.blk .tag.bad { background: var(--bad-bg); color: var(--bad); }
.blk .tag.now { background: var(--gold-ink); color: var(--gold); }
.blk.done { background: var(--raised); border: 1px solid var(--line); }
.blk.live { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.blk.live .s, .blk.live .p { color: var(--gold-ink); }
.blk.live .av.sm { background: var(--gold-ink); color: var(--gold); }
.blk.block { border: 1px solid var(--line); }
.blk.off { background: transparent; border: 1px dashed var(--chip-line); }
.blk.off .t { text-decoration: line-through; }
.gapx { all: unset; box-sizing: border-box; position: absolute; left: 4px; right: 4px; border: 1px dashed var(--line); border-radius: 12px; color: var(--dim); font-size: 12px; font-weight: 600; padding: 4px 10px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.gapx:hover, .gapx:focus-visible { border-color: var(--gold); color: var(--gold); }
.nowline span { position: absolute; left: -48px; top: -9px; font-size: 10px; font-weight: 800; background: var(--gold); color: var(--gold-ink); padding: 2px 5px; border-radius: 6px; }
