/* Customer pages (booking, cancel, offers) and, under b/b.css, the barber page. Same look as the shop's website
   (clients/kultura/site): warm black, glass cards, one amber accent, Onest. Change colours here only.
   Contrast (WCAG AA, measured 2026-11-11 over the brightest glow): text2 ≥9:1, text3 ≥5.8:1, accent ~8:1, red on card ~5:1. */
@font-face { font-family: "Onest"; font-weight: 400 800; font-display: swap; src: url(/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400 800; font-display: swap; src: url(/fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  color-scheme: dark;
  --bg: #080605; --card: rgba(30, 24, 18, .62); --card2: rgba(52, 42, 32, .7); --line: rgba(255, 255, 255, .08);
  --text: #f5f1ea; --text2: rgba(245, 241, 234, .8); --text3: rgba(245, 241, 234, .6);
  --accent: #f2a33a; --on-accent: #140d05; --tint: rgba(242, 163, 58, .12); --ok: #30d158; --err: #ff6961;
  --edge: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .05);
  --glow: 0 8px 30px -8px rgba(242, 163, 58, .55);
  --r: 18px; --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 17px; }
/* iPhone: follow the user's text size setting (Dynamic Type). Everything below is in rem. */
@supports (font: -apple-system-body) { html { font: -apple-system-body; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Onest", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
/* Warm light behind everything, like the website (still, not moving: these pages are used on the go) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(90% 45% at 15% -5%, rgba(200, 105, 30, .16), transparent 70%),
    radial-gradient(70% 40% at 100% 45%, rgba(210, 140, 55, .06), transparent 70%),
    radial-gradient(80% 45% at 30% 110%, rgba(120, 45, 15, .18), transparent 70%);
}
main { max-width: 36rem; margin: 0 auto; padding: max(1.25rem, env(safe-area-inset-top)) 1rem calc(3rem + env(safe-area-inset-bottom)); }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.eyebrow { margin: .5rem 0 0; color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: .15rem 0 .35rem; font-size: 2rem; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1.75rem; color: var(--text2); font-size: .9rem; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 1rem;
  border-radius: 999px; background: var(--card); box-shadow: var(--edge); color: var(--text); text-decoration: none; font-weight: 600;
}
.pill .ico { color: var(--accent); }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Steps */
section { margin-bottom: 1.75rem; animation: push .3s var(--ease) both; }
h2 { margin: .25rem 0 1rem; font-size: 1.75rem; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; outline: none; }
h2:focus-visible { outline: none; }
h3 { margin: 1.5rem .25rem .5rem; font-size: 1.05rem; font-weight: 600; }
.group { background: var(--card); box-shadow: var(--edge); border-radius: var(--r); overflow: hidden; }
.fine { margin: .6rem .25rem 0; color: var(--text2); font-size: .8rem; }
.msg { margin: .6rem .25rem 0; color: var(--text2); }
.msg:empty { display: none; }
.err, .msg.err { color: var(--err); }
.ok { color: var(--ok); font-weight: 600; }
.muted { color: var(--text2); }

/* List rows (services) — iOS inset grouped list */
.opt { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 3.25rem; padding: .7rem 1rem; cursor: pointer; }
.opt + .opt::before { content: ""; position: absolute; top: 0; left: 1rem; right: 0; border-top: .5px solid var(--line); }
.opt:active { background: var(--card2); }
.opt .grow { flex: 1; min-width: 0; }
.opt small { display: block; margin-top: .1rem; color: var(--text2); font-size: .85rem; }
.opt .end { color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tick { width: 1.25rem; height: 1.25rem; color: var(--accent); visibility: hidden; }
.opt:has(input:checked) .tick { visibility: visible; }
.opt:has(input:checked) .end { color: var(--text); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r); }

/* Services: one card each. Chosen = gold ring, warm tint and a gold tick, like the chosen barber and time. */
.cards { display: grid; gap: .6rem; }
.cards .opt { min-height: 4rem; padding: .9rem 1rem; border-radius: var(--r); background: var(--card); box-shadow: var(--edge); transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease); }
.cards .opt + .opt::before { content: none; }
.cards .opt:active { transform: scale(.98); }
.cards .tick { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: .25rem; border-radius: 50%; visibility: visible; color: transparent; box-shadow: inset 0 0 0 1.5px var(--text3); stroke-width: 3; }
.cards .opt:has(input:checked) { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cards .opt:has(input:checked) .grow { font-weight: 600; }
.cards .opt:has(input:checked) .end { color: var(--accent); font-weight: 600; }
.cards .opt:has(input:checked) .tick { background: var(--accent); color: var(--on-accent); box-shadow: none; }
@media (forced-colors: active) { .cards .opt:has(input:checked) { outline: 3px solid Highlight; } }

/* People (barbers) — round avatars like iOS contacts */
.people { display: flex; gap: .75rem; overflow-x: auto; padding: .25rem .25rem .5rem; scrollbar-width: none; }
.person { flex: none; display: grid; justify-items: center; gap: .4rem; width: 5rem; cursor: pointer; text-align: center; font-size: .85rem; color: var(--text2); }
.av {
  position: relative; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%;
  background: linear-gradient(160deg, #3b2f23, #1c1611); box-shadow: var(--edge); color: var(--text); font-size: 1.15rem; font-weight: 600;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.av .ico { width: 1.6rem; height: 1.6rem; }
.person:active .av { transform: scale(.95); }
.person:has(input:checked) { color: var(--text); font-weight: 600; }
.person:has(input:checked) .av { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.person:has(input:focus-visible) .av { outline: 2px solid var(--text); outline-offset: 7px; }

/* Days strip and time grid */
.days { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .25rem .5rem; scroll-snap-type: x proximity; scrollbar-width: none; }
.chip {
  flex: none; min-height: 2.75rem; padding: .55rem .5rem; border: 0; border-radius: 14px; background: var(--card); box-shadow: var(--edge);
  color: var(--text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s, transform .15s var(--ease);
}
.chip:active { transform: scale(.96); }
.day { width: 3.6rem; scroll-snap-align: start; display: grid; gap: .05rem; text-align: center; }
.day small { color: var(--text2); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.day b { font-size: 1.3rem; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.chip[aria-pressed="true"] small { color: rgba(20, 13, 5, .72); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: .5rem; margin-top: .5rem; }
.times .chip { font-weight: 600; }

/* Form — grouped fields with the label inside the row */
.field { position: relative; display: block; padding: .55rem 1rem .6rem; }
.field + .field::before { content: ""; position: absolute; top: 0; left: 1rem; right: 0; border-top: .5px solid var(--line); }
.field > span { display: block; color: var(--text2); font-size: .8rem; }
.field input { display: block; width: 100%; padding: .15rem 0 0; border: 0; background: none; color: var(--text); font: inherit; font-size: max(1rem, 16px); outline: none; }
.field input::placeholder { color: var(--text3); }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); border-radius: var(--r); }
.field:has([aria-invalid="true"]) > span { color: var(--err); }
.check { display: flex; gap: .75rem; align-items: flex-start; margin: .9rem .25rem 1rem; color: var(--text2); font-size: .9rem; cursor: pointer; }
.check input { flex: none; width: 1.4rem; height: 1.4rem; margin: 0; accent-color: var(--accent); }
#turnstile { margin: 0 0 .9rem; min-height: 0; }

button.main {
  display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3.25rem; padding: .8rem 1rem;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); box-shadow: var(--glow);
  font: inherit; font-weight: 600; cursor: pointer; transition: transform .15s var(--ease), opacity .15s;
}
button.main:active { transform: scale(.98); }
button.main:disabled { background: var(--card2); color: var(--text3); box-shadow: none; cursor: default; transform: none; }
button.main.danger { background: var(--card2); color: var(--err); box-shadow: var(--edge); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Done */
.done { text-align: center; padding-top: 1rem; }
.done .badge { display: inline-grid; place-items: center; width: 4.5rem; height: 4.5rem; margin-bottom: .75rem; border-radius: 50%; background: rgba(48, 209, 88, .16); color: var(--ok); }
.done .badge .ico { width: 2.2rem; height: 2.2rem; stroke-width: 2.4; }
.done h2 { justify-content: center; font-size: 1.6rem; margin: 0 0 1rem; }
.summary { list-style: none; margin: 0; padding: 0; text-align: left; }
.summary li { position: relative; padding: .8rem 1rem; }
.summary li + li::before { content: ""; position: absolute; top: 0; left: 1rem; right: 0; border-top: .5px solid var(--line); }
.summary + * { margin-top: 1rem; }

@keyframes push { from { opacity: 0; transform: translateX(18px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .chip[aria-pressed="true"], .opt:has(input:checked) { outline: 2px solid CanvasText; }
}

/* Review card before confirming (date, time, service, price, cancel rule) */
.review { margin-bottom: 1rem; }
.review .opt { cursor: default; }
.review .opt:active { background: none; }
.review .ico { color: var(--text2); }
.review .end { color: var(--text); font-weight: 600; }
.fine-row { color: var(--text2); font-size: .85rem; }

/* Bottom bar: price + one button for the next step, like a checkout bar on iPhone */
body:has(.bar:not([hidden])) main { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem max(1rem, calc((100% - 34rem) / 2)) calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(22, 17, 12, .72); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  animation: rise .3s var(--ease) both;
}
.bar-sum { flex: 1; min-width: 0; margin: 0; }
.bar-sum b { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.bar-sum small { display: block; color: var(--text2); font-size: .8rem; }
.bar button.main { width: auto; flex: none; padding: .8rem 1.4rem; border-radius: 999px; }
@media (forced-colors: active) { .bar { border-top: 1px solid CanvasText; } }

/* Top bar on steps 2-4: back button (44 px target) and where you are */
.top { display: flex; align-items: center; justify-content: space-between; margin: 0 -.5rem .75rem; min-height: 2.75rem; }
.back { display: inline-flex; align-items: center; gap: .1rem; min-height: 2.75rem; padding: 0 .5rem; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.back .ico { width: 1.4rem; height: 1.4rem; stroke-width: 2.4; }
.stepno { padding: 0 .5rem; color: var(--text2); font-size: .85rem; }

/* Contact details on the last step: one card per field, same as the service cards */
.cards .field { border-radius: var(--r); background: var(--card); box-shadow: var(--edge); padding: .7rem 1rem .75rem; }
.cards .field + .field::before { content: none; }
.cards .field:has([aria-invalid="true"]) { box-shadow: inset 0 0 0 2px var(--err); }

#intro .logo { display: block; height: 32px; width: auto; margin-bottom: 1rem; } /* official logo, white */
