/* KM Auto: the garage's back office.
   Built like an iPhone app (big titles, grouped lists, sheets that slide up and
   swipe away, a frosted tab bar) in KM's own colours: warm black, cream type,
   Libre Franklin, purple for actions, the yellow plate for every reg. */

@font-face { font-family: "Libre Franklin"; src: url(../fonts/libre-franklin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

[hidden] { display: none !important; }  /* first, so no class that sets display can beat it */

:root {
  --bg: #0c0b0a;
  --card: #1b1916;
  --card-2: #26231f;
  --sep: rgba(243,238,228,.1);
  --fill: rgba(243,238,228,.08);
  --fill-2: rgba(243,238,228,.14);
  --text: #f3eee4;
  --text-2: #aca597;
  --text-3: #7d776b;
  --purple: #59378c;
  --violet: #a786e8;           /* purple as text on black: the brand purple is too dark to read */
  --plate: #f7c600;
  --paper: #f3eee4;
  --paper-ink: #17140f;
  --paper-muted: #6b6355;
  --red: #ef6a55;
  --green: #5cc58a;
  --font: "Libre Franklin", -apple-system, system-ui, sans-serif;
  --r: 14px;                   /* card corners */
  --nav: calc(48px + env(safe-area-inset-top));
  --tabs: calc(58px + env(safe-area-inset-bottom));
  --ease: cubic-bezier(.32, .72, 0, 1);  /* the curve iOS sheets move on */
  --gutter: max(16px, env(safe-area-inset-left));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 12px; font-weight: 700; font-size: 16.5px; text-decoration: none; cursor: pointer; transition: transform .12s ease-out, opacity .12s; }
.btn svg { width: 20px; height: 20px; stroke-width: 2.2; flex: none; }
.btn:active { transform: scale(.97); opacity: .85; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-tinted { background: rgba(167,134,232,.16); color: var(--violet); }
.btn-plain { background: var(--fill); color: var(--text); }
.btn-danger { background: rgba(239,106,85,.14); color: var(--red); }
.btn-block { width: 100%; }
.pill { min-height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: rgba(167,134,232,.16); color: var(--violet); font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .12s ease-out; }
.pill:active { transform: scale(.95); }
.link { border: 0; background: none; padding: 6px 0; color: var(--violet); font-weight: 600; font-size: 15px; cursor: pointer; }
.link:active { opacity: .5; }
.link.danger { color: var(--red); }

/* ---------- sign in ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.gate-photo { position: relative; height: 38vh; min-height: 220px; overflow: hidden; }
.gate-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.gate-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,11,10,.1) 0%, rgba(12,11,10,.5) 50%, var(--bg) 100%); }
.gate-inner { width: 100%; max-width: 420px; margin: -40px auto 0; padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom)); position: relative; z-index: 1; }
.gate-logo { width: 200px; height: auto; margin-bottom: 18px; }
.gate-title { margin: 0 0 6px; font: 800 34px/1.1 var(--font); letter-spacing: -.02em; color: #fff; }
.gate-sub { margin: 0 0 22px; color: var(--text-2); font-size: 15px; }
.gate-form { display: grid; gap: 12px; margin-top: 18px; }
.gate-field input { width: 100%; min-height: 54px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--card-2); font-size: 17px; }
.gate-field input:focus { outline: 2px solid var(--violet); outline-offset: 0; }
.gate-error { margin: 2px 0 0; color: var(--red); font-weight: 600; font-size: 15px; }

/* ---------- the app shell ---------- */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--nav); padding: env(safe-area-inset-top) var(--gutter) 0; transition: background .25s, box-shadow .25s; }
.navbar.scrolled { background: rgba(12,11,10,.72); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 .5px 0 var(--sep); }
.nav-title { font-weight: 700; font-size: 17px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .25s var(--ease); white-space: nowrap; }
.navbar.scrolled .nav-title { opacity: 1; transform: none; }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.nav-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(167,134,232,.16); color: var(--violet); cursor: pointer; transition: transform .12s ease-out; }
.nav-btn svg { width: 20px; height: 20px; stroke-width: 2.4; }
.nav-btn:active, .avatar:active { transform: scale(.9); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; transition: transform .12s ease-out; }

main { max-width: 680px; margin: 0 auto; padding: calc(var(--nav) + 4px) var(--gutter) calc(var(--tabs) + 40px); }
.large-title { margin: 0 0 4px; font: 800 34px/1.12 var(--font); letter-spacing: -.022em; color: #fff; }
.sub { margin: 0 0 22px; color: var(--text-2); font-size: 15.5px; line-height: 1.4; }
.empty { margin: 24px 0; color: var(--text-2); text-align: center; font-size: 15.5px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabs); padding: 0 max(4px, env(safe-area-inset-left)) env(safe-area-inset-bottom); background: rgba(16,15,13,.78); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 -.5px 0 var(--sep); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--text-3); font-weight: 600; font-size: 10.5px; letter-spacing: .01em; cursor: pointer; }
.tabbar svg { width: 26px; height: 26px; stroke-width: 1.6; transition: transform .15s ease-out; }
.tabbar button:active svg { transform: scale(.88); }
.tabbar button.active { color: var(--violet); }
.tabbar button.active svg { stroke-width: 2; }
.badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11.5px/18px var(--font); font-style: normal; text-align: center; }

/* ---------- grouped lists (the Settings-app pattern) ---------- */
.group { margin: 0 0 28px; border-radius: var(--r); background: var(--card); overflow: hidden; }
.group-label { margin: 0 0 7px 16px; color: var(--text-2); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.group-foot { margin: -20px 16px 28px; color: var(--text-2); font-size: 13.5px; line-height: 1.4; }
.cell { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 10px 16px; border: 0; background: none; text-align: left; color: var(--text); font-size: 17px; }
.cell + .cell::before, .cell + .cell-wrap::before, .cell-wrap + .cell::before, .cell-wrap + .cell-wrap::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.cell-wrap { position: relative; }
.cell-link { cursor: pointer; transition: background .15s; }
.cell-link:active { background: var(--fill-2); transition: none; }
.cell-main { flex: 1; min-width: 0; }
.cell-sub { display: block; margin-top: 1px; color: var(--text-2); font-size: 14.5px; line-height: 1.35; }
.cell-value { color: var(--text-2); font-size: 16px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.cell-value.accent { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.cell-value.muted { color: var(--text-3); }
.chev { width: 16px; height: 16px; flex: none; color: var(--text-3); stroke-width: 2.4; }
.cell-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--purple); color: #fff; }
.cell-icon svg { width: 19px; height: 19px; stroke-width: 2; }
.tint-rust { background: #b0412e; }
.cell.danger { justify-content: center; color: var(--red); font-weight: 600; cursor: pointer; }
.cell.action { color: var(--violet); font-weight: 600; cursor: pointer; }
.cell input[type=text], .cell input[type=tel], .cell input:not([type]), .cell input[type=date], .cell input[type=time], .cell input[type=number], .cell textarea {
  flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: 17px; text-align: right; color: var(--text); color-scheme: dark; }
.cell textarea { text-align: left; resize: none; line-height: 1.4; }
.cell input:focus, .cell textarea:focus { outline: none; }
.cell input::placeholder, .cell textarea::placeholder { color: var(--text-3); }
.cell-label { flex: none; min-width: 92px; }
.cell.stack { flex-direction: column; align-items: stretch; gap: 4px; }
.cell.stack .cell-label { font-size: 13px; color: var(--text-2); }
.cell.stack textarea, .cell.stack input { text-align: left; }

/* The switch, drawn as iOS draws it. */
.switch { position: relative; width: 51px; height: 31px; flex: none; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 16px; background: var(--fill-2); cursor: pointer; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25), 0 1px 1px rgba(0,0,0,.16); transition: transform .3s var(--ease); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.switch:active::after { width: 33px; }
.switch:checked:active::after { transform: translateX(14px); }

/* − 4 + */
.stepper { display: flex; align-items: center; flex: none; border-radius: 9px; background: var(--fill); }
.stepper button { width: 46px; height: 34px; border: 0; background: none; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.stepper button:active { background: var(--fill-2); }
.stepper button:first-child { border-radius: 9px 0 0 9px; }
.stepper button:last-child { border-radius: 0 9px 9px 0; }
.stepper svg { width: 18px; height: 18px; stroke-width: 2.4; }
.stepper output { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; border-inline: .5px solid var(--sep); line-height: 34px; }

/* ---------- segmented control ---------- */
.segmented { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0 0 12px; padding: 2px; border-radius: 10px; background: var(--fill); }
.seg-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; border-radius: 8px; background: #3a3631; box-shadow: 0 3px 8px rgba(0,0,0,.2), 0 .5px 0 rgba(255,255,255,.06) inset; transition: transform .35s var(--ease), width .35s var(--ease); }
.segmented button { position: relative; z-index: 1; min-height: 34px; padding: 0 6px; border: 0; background: none; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: opacity .15s; }
.segmented button:active { opacity: .6; }
.segmented button b { margin-left: 3px; color: var(--text-2); font-weight: 600; }
.segmented button.active b { color: var(--violet); }
.segmented.small button { min-height: 32px; font-size: 13.5px; }

.search { display: flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 0 10px; min-height: 38px; border-radius: 10px; background: var(--fill); color: var(--text-3); }
.search svg { width: 18px; height: 18px; flex: none; stroke-width: 2.2; }
.search input { flex: 1; min-width: 0; padding: 8px 0; border: 0; background: none; font-size: 17px; color: var(--text); }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }

/* ---------- cards ---------- */
.card { margin: 0 0 22px; padding: 16px; border-radius: var(--r); background: var(--card); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { margin: 0; font-size: 17px; font-weight: 700; }
.card-foot { margin: 12px 0 0; color: var(--text-2); font-size: 14px; }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.tally > div { display: grid; gap: 2px; }
.tally > div + div { border-left: .5px solid var(--sep); }
.tally b { font: 800 30px/1.1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tally span { color: var(--text-2); font-size: 13px; }
.tally .hl b { color: var(--violet); }

/* The registration as a UK rear plate: the one thing everyone at a garage reads first. */
.plate { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 94px; height: 28px; padding: 0 9px 0 19px; border-radius: 5px; background: var(--plate) linear-gradient(90deg, #1d4fb3 0 11px, transparent 11px) no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6); color: #111; font: 800 14.5px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.plate.big { min-width: 0; height: 44px; padding: 0 16px 0 30px; border-radius: 7px; font-size: 24px; letter-spacing: .09em; background-image: linear-gradient(90deg, #1d4fb3 0 17px, transparent 17px); }
.plate.none { background: var(--fill-2); color: var(--text-2); box-shadow: none; padding: 0 10px; font-size: 12px; letter-spacing: .04em; }

/* ---------- a booking in a list ---------- */
.bk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; width: 100%; padding: 12px 14px 12px 16px; border: 0; background: none; text-align: left; cursor: pointer; transition: background .15s; position: relative; }
.bk:active { background: var(--fill-2); transition: none; }
.bk + .bk::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.bk-main { display: grid; gap: 2px; min-width: 0; }
.bk-work { font-weight: 700; font-size: 16.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-meta { color: var(--text-2); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-when { color: var(--violet); font-weight: 600; }
.bk .dot { position: absolute; left: 5px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--violet); }
.bk-flag { color: var(--red); font-weight: 600; }
.bk.off { cursor: default; grid-template-columns: auto minmax(0, 1fr); }
.bk.off:active { background: none; }
.off-tag { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; background: rgba(239,106,85,.14); color: var(--red); font-weight: 700; font-size: 13px; }

/* ---------- the diary ---------- */
.month { margin: 30px 0 12px; font: 800 22px/1.2 var(--font); letter-spacing: -.015em; color: #fff; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 7px 16px; }
.day-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.day-head h3 b { color: var(--violet); font-weight: 700; }
.day-head.today h3 { color: var(--text); }
.day-head .link { font-size: 14px; padding: 0 12px 0 0; }
.day-group { margin-bottom: 22px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; }
.quick .btn { white-space: nowrap; padding: 0 14px; }
.quick .btn:only-child { grid-column: 1 / -1; }
.past { margin-top: 26px; }
.past > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: var(--r); background: var(--card); cursor: pointer; font-weight: 600; }
.past > summary::-webkit-details-marker { display: none; }
.past > summary .chev { transition: transform .25s var(--ease); }
.past[open] > summary { margin-bottom: 18px; }
.past[open] > summary .chev { transform: rotate(90deg); }

/* ---------- the sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .4s var(--ease); }
.scrim.in { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; display: flex; flex-direction: column; max-height: calc(100dvh - env(safe-area-inset-top) - 12px); border-radius: 14px 14px 0 0; background: #141210; box-shadow: 0 -10px 50px rgba(0,0,0,.5); transform: translateY(100%); transition: transform .5s var(--ease); will-change: transform; }
.sheet.in { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet-grip { flex: none; width: 36px; height: 5px; margin: 6px auto 0; border-radius: 3px; background: rgba(243,238,228,.28); }
.sheet-bar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 48px; padding: 0 8px; touch-action: none; cursor: grab; }
.sheet-title { margin: 0; padding: 0 6px; font-size: 17px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.sheet-btn { justify-self: start; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--violet); font-size: 17px; cursor: pointer; }
.sheet-btn:active { opacity: .5; }
.sheet-done { justify-self: end; font-weight: 700; }
.sheet-done[disabled] { opacity: .35; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px var(--gutter) calc(28px + env(safe-area-inset-bottom)); }
.sheet-body .group { background: var(--card); }
.sheet-hint { margin: -18px 16px 26px; color: var(--text-2); font-size: 13.5px; line-height: 1.4; }
.sheet-actions { display: grid; gap: 10px; margin: 0 0 18px; }

/* The booking's top: the cream job card the customer saw when they pressed send. */
.ticket { margin: 0 0 18px; padding: 18px 18px 16px; border-radius: var(--r); background: var(--paper); color: var(--paper-ink); box-shadow: inset 0 6px 0 var(--purple); }
.ticket.s-done { box-shadow: inset 0 6px 0 var(--paper-muted); }
.ticket.s-turned { box-shadow: inset 0 6px 0 #b0412e; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 12px; }
.ticket-ref { color: var(--paper-muted); font-weight: 600; font-size: 13px; letter-spacing: .06em; }
.ticket-when { font-size: 15px; color: #3d3830; }
.ticket-when b { color: var(--purple); font-weight: 800; }
.ticket-work { margin: 4px 0 2px; font: 800 21px/1.25 var(--font); letter-spacing: -.01em; }
.ticket-name { font-size: 16px; color: #3d3830; }
.ticket-flag { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(89,55,140,.1); color: var(--purple); font-size: 14px; font-weight: 700; }
.ticket-by { margin: 10px 0 0; color: var(--paper-muted); font-size: 14px; }

/* Call / WhatsApp / Email: the Contacts-app row of round buttons. */
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 22px; }
.contact a, .contact span { display: grid; justify-items: center; gap: 5px; padding: 10px 4px 9px; border-radius: 12px; background: var(--card); color: var(--violet); font-size: 12.5px; font-weight: 600; text-decoration: none; transition: transform .12s ease-out; }
.contact.four { grid-template-columns: repeat(4, 1fr); }
.contact a:active { transform: scale(.95); background: var(--card-2); }
.contact span { color: var(--text-3); }
.contact svg { width: 24px; height: 24px; stroke-width: 1.9; }

.note { padding: 12px 16px; position: relative; }
.note + .note::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.note-by { color: var(--text-2); font-size: 13px; font-weight: 600; }
.note p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 16px; }
.note-add { display: flex; align-items: flex-end; gap: 10px; padding: 10px 10px 10px 16px; position: relative; }
.note + .note-add::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.note-add textarea { flex: 1; min-height: 36px; max-height: 140px; padding: 7px 0; border: 0; background: none; resize: none; font-size: 16px; line-height: 1.4; }
.note-add textarea:focus { outline: none; }
.send { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: var(--purple); color: #fff; cursor: pointer; }
.send svg { width: 18px; height: 18px; stroke-width: 2.6; }
.send[disabled] { background: var(--fill-2); color: var(--text-3); }

.dl { margin: 0 0 28px; }
.dl .cell { align-items: flex-start; }
.dl dt { flex: none; width: 92px; color: var(--text-2); font-size: 15px; padding-top: 1px; }
.dl dd { flex: 1; min-width: 0; margin: 0; font-size: 16px; overflow-wrap: anywhere; white-space: pre-line; }

/* Reg typed as a plate. */
.cell input.reg { flex: none; margin-left: auto; width: 150px; height: 36px; padding: 0 10px 0 22px; border-radius: 5px; background: var(--plate) linear-gradient(90deg, #1d4fb3 0 13px, transparent 13px) no-repeat; color: #111; font-weight: 800; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.cell input.reg::placeholder { color: rgba(0,0,0,.35); letter-spacing: .04em; font-weight: 700; font-size: 14px; }

/* A price typed big, the way a calculator shows it. */
.price-big { display: flex; align-items: baseline; justify-content: center; gap: 2px; padding: 22px 16px 18px; }
.price-big span { font: 700 34px/1 var(--font); color: var(--text-2); }
.price-big input { width: 3.4ch; min-width: 1.4ch; max-width: 8ch; padding: 0; border: 0; background: none; font: 800 52px/1.05 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #fff; text-align: left; }
.price-big input::placeholder { color: var(--text-3); }
.price-big input:placeholder-shown { font-size: 34px; font-weight: 700; letter-spacing: 0; }
.price-big:has(input:placeholder-shown) span { display: none; }  /* no "£" in front of "Ask" */
.price-big input:focus { outline: none; }
.preview-line { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 22px; padding: 12px 16px; border-radius: 12px; border: 1px dashed rgba(243,238,228,.2); color: var(--text-2); font-size: 15px; }
.preview-line b { color: var(--text); font-weight: 700; }
.money-in { flex: none; width: 110px; display: flex; align-items: center; gap: 2px; justify-content: flex-end; color: var(--text-2); }
.money-in input { width: 80px; flex: none !important; font-variant-numeric: tabular-nums; }

/* ---------- visitors ---------- */
.preview-note { margin: 0 0 22px; padding: 12px 14px; border-radius: 12px; background: rgba(247,198,0,.1); color: #f2dc8a; font-size: 14.5px; line-height: 1.4; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 28px; }
.tile { padding: 14px 14px 13px; border-radius: var(--r); background: var(--card); }
.tile .k { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.tile .v { margin: 6px 0 2px; font: 800 34px/1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; }
.tile .s { color: var(--text-3); font-size: 13px; line-height: 1.3; }
.bars { display: grid; gap: 12px; padding: 14px 16px 16px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
.bar-row .l { font-size: 15px; overflow-wrap: anywhere; }
.bar-row .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 3px; background: var(--violet); }
.bar-row .s { grid-column: 1 / -1; margin-top: -2px; color: var(--text-2); font-size: 13px; }
/* The month as columns: a day's height is its visitors. */
.spark { display: flex; align-items: flex-end; gap: 2px; height: 96px; padding: 16px 16px 0; }
.spark i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--violet); opacity: .9; }
.spark i.zero { background: var(--fill-2); }
.spark-axis { display: flex; justify-content: space-between; padding: 6px 16px 14px; color: var(--text-3); font-size: 12px; }

/* ---------- your site ---------- */
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 8px; }
.photo { border-radius: var(--r); background: var(--card); overflow: hidden; }
.photo-wide { grid-column: 1 / -1; }
.photo-frame { position: relative; aspect-ratio: 4 / 3; background: var(--card-2); }
.photo-wide .photo-frame { aspect-ratio: 16 / 8; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-wide .photo-frame img { object-position: 70% center; }
.photo-frame .own { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(12,11,10,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12px; font-weight: 700; }
.photo-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.photo-foot b { font-size: 15px; }
.photo.busy { opacity: .5; pointer-events: none; }
.photo.busy .photo-frame::after { content: "Uploading…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(12,11,10,.55); font-weight: 700; }
.notice-preview { margin: 0 0 22px; padding: 10px 14px; border-radius: 10px; background: var(--purple); color: #fff; font-size: 14.5px; font-weight: 600; text-align: center; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + 14px); z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(92vw, 440px); padding: 12px 18px 12px 14px; border-radius: 26px; background: rgba(40,37,33,.92); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); box-shadow: 0 10px 40px rgba(0,0,0,.45); font-weight: 600; font-size: 15px; transform: translate(-50%, 0); animation: toast-in .45s var(--ease); }
.toast svg { width: 22px; height: 22px; flex: none; stroke-width: 2.4; color: var(--green); }
.toast.bad svg { color: var(--red); }
body.sheet-open .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }

/* ---------- wider screens: the sheet becomes a centred card ---------- */
@media (min-width: 760px) {
  main { padding-top: calc(var(--nav) + 20px); }
  .large-title { font-size: 40px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; max-height: min(86vh, 860px); border-radius: 16px; transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .45s var(--ease), opacity .3s; }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grip { display: none; }
  .sheet-bar { cursor: default; }
  body.sheet-open .toast { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; }
  .sheet, .seg-thumb, .switch::after, .nav-title { transition-property: opacity !important; }
  .sheet { transform: none; opacity: 0; }
  .sheet.in { opacity: 1; }
  @media (min-width: 760px) { .sheet, .sheet.in { transform: translate(-50%, -50%); } }
}
@media (prefers-reduced-transparency: reduce) {
  .navbar.scrolled, .tabbar, .toast { background: #161412; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- printing a day ---------- */
.print-sheet { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; color: #000; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; font: 11pt/1.35 var(--font); color: #000; }
  .print-sheet h1 { margin: 0; font: 900 22pt/1.1 var(--font); text-transform: uppercase; }
  .print-sheet header p { margin: 4px 0 14px; }
  .print-sheet table { width: 100%; border-collapse: collapse; }
  .print-sheet th { text-align: left; font-size: 9pt; letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid #000; padding: 4px 8px 4px 0; }
  .print-sheet td { vertical-align: top; border-bottom: 1px solid #999; padding: 8px 8px 14px 0; break-inside: avoid; }
  .print-sheet td b { display: block; }
  .print-sheet td small { display: block; font-size: 9.5pt; }
  .print-sheet td:first-child b { font-size: 13pt; letter-spacing: .05em; }
  .print-sheet td:nth-child(4) { width: 28%; }
  .print-sheet td.tick { width: 12mm; }
  .print-sheet td.tick::after { content: ""; display: block; width: 8mm; height: 8mm; border: 1.5px solid #000; }
}
.reminder-text { margin: 0; white-space: pre-wrap; color: var(--text-2); font-size: 15px; line-height: 1.45; }

/* ---------- prices: section picker + order arrows ---------- */
.cell.pick .pick-tick { width: 20px; height: 20px; flex: none; color: var(--violet); stroke-width: 2.6; visibility: hidden; }
.cell.pick.on .pick-tick { visibility: visible; }
.order-btn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 10px; background: var(--fill); color: var(--text); cursor: pointer; }
.order-btn svg { width: 18px; height: 18px; stroke-width: 2.4; }
.order-btn.down svg { transform: rotate(180deg); }
.order-btn:disabled { opacity: .3; cursor: default; }
.order-btn:not(:disabled):active { background: var(--fill-2); }
