/* Studio Iyayo: soft grey canvas, rounded panels, glossy black for "selected", pastels for kinds. */
:root {
  --bg: #ececef;
  --panel: rgba(250, 250, 252, 0.78);
  --surface: #ffffff;
  --sunk: #f2f2f5;
  --ink: #141416;
  --ink-2: #3b3b42;
  --muted: #777783;
  --faint: #a8a8b3;
  --line: #e4e4ea;
  --line-2: #d8d8e0;

  --lilac: #e7e2fc;  --lilac-ink: #5b4fb8;
  --sky: #dcebfb;    --sky-ink: #2e679f;
  --mint: #d9f2e5;   --mint-ink: #2c7752;
  --peach: #fde3d7;  --peach-ink: #b0563a;
  --butter: #fbf1cc; --butter-ink: #85660f;
  --rose: #fbdcdc;   --rose-ink: #a3343a;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-panel: 0 1px 2px rgba(20, 20, 30, 0.04), 0 18px 40px -18px rgba(20, 20, 30, 0.14);
  --shadow-pop: 0 10px 22px -8px rgba(10, 10, 14, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-soft: 0 1px 2px rgba(20, 20, 30, 0.05), 0 6px 16px -8px rgba(20, 20, 30, 0.12);
  --black: linear-gradient(180deg, #34343a 0%, #141416 100%);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --fast: 160ms;
  --mid: 280ms;
  --slow: 480ms;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 0% -10%, #e4e8f6 0%, transparent 60%),
    radial-gradient(700px 480px at 100% 0%, #f2e9f3 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  font-family: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); }
h2 { font-size: 1.12rem; letter-spacing: -0.015em; }
h3 { font-size: 0.95rem; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.86rem; }
svg.i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--black); color: #fff; box-shadow: var(--shadow-pop);
}
.mark svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- panels ---------- */
.panel {
  background: var(--panel);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-panel);
  padding: 24px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--black); color: #fff; font-weight: 500; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-pop);
  transition: transform var(--fast) var(--ease), box-shadow var(--mid) var(--ease), opacity var(--mid) var(--ease), filter var(--fast);
}
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { cursor: default; background: #d6d6dc; color: #8b8b95; box-shadow: none; }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 0.9rem; }
.btn.soft { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft); }
.btn.soft:hover:not(:disabled) { filter: none; background: #fafafb; }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { filter: none; background: rgba(20, 20, 30, 0.05); }
.btn.danger { background: var(--rose); color: var(--rose-ink); box-shadow: none; }
.btn.danger:hover:not(:disabled) { filter: brightness(0.97); }
.btn.danger.armed { background: var(--rose-ink); color: #fff; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-soft);
  transition: transform var(--fast) var(--ease), background var(--fast), opacity var(--mid);
}
.icon-btn:hover:not(:disabled) { background: #fafafb; }
.icon-btn:active:not(:disabled) { transform: scale(0.92); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }

/* loading state on any .btn */
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 700ms linear infinite;
}
.btn.soft.loading::after { border-color: rgba(0, 0, 0, 0.15); border-top-color: var(--ink); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- segmented control (sliding black thumb) ---------- */
.seg {
  --n: 2; --i: 0;
  position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  padding: 5px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft);
}
.seg::before {
  content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 10px) / var(--n)); border-radius: 13px;
  background: var(--black); box-shadow: var(--shadow-pop);
  transform: translateX(calc(100% * var(--i)));
  transition: transform var(--mid) var(--ease);
}
.seg:has(> :nth-child(2) input:checked), .seg:has(> :nth-child(2)[aria-selected="true"]), .seg:has(> :nth-child(2)[aria-pressed="true"]) { --i: 1; }
.seg:has(> :nth-child(3) input:checked), .seg:has(> :nth-child(3)[aria-selected="true"]), .seg:has(> :nth-child(3)[aria-pressed="true"]) { --i: 2; }
.seg:has(> :nth-child(4) input:checked) { --i: 3; }
.seg > label, .seg > button {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 12px; border: 0; background: none; cursor: pointer; border-radius: 13px;
  color: var(--muted); font-weight: 500; transition: color var(--mid) var(--ease);
}
.seg > label:has(input:checked), .seg > [aria-selected="true"], .seg > [aria-pressed="true"] { color: #fff; }
.seg > label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg.compact > label, .seg.compact > button { min-height: 34px; padding: 0 10px; }
.seg.compact { border-radius: 14px; padding: 4px; }
.seg.compact::before { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 10px; }

/* ---------- chips & tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-soft); font-size: 0.82rem; font-weight: 500; color: var(--ink-2);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-ink); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 500; background: var(--sunk); color: var(--ink-2); }
.k-shoot { --tint: var(--lilac); --tint-ink: var(--lilac-ink); }
.k-event { --tint: var(--peach); --tint-ink: var(--peach-ink); }
.k-personal { --tint: var(--mint); --tint-ink: var(--mint-ink); }
.k-blocked { --tint: #e9e9ee; --tint-ink: #5d5d68; }
.k-pending { --tint: var(--butter); --tint-ink: var(--butter-ink); }
.tag[class*="k-"] { background: var(--tint); color: var(--tint-ink); }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field > label, .label { font-size: 0.82rem; font-weight: 500; color: var(--ink-2); }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset;
  transition: box-shadow var(--mid) var(--ease), background var(--mid);
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23777783' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:focus, .field input:focus, .field textarea:focus, .field select:focus {
  outline: none; box-shadow: 0 0 0 1.5px var(--ink) inset, 0 0 0 5px rgba(20, 20, 22, 0.06);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field.invalid input { box-shadow: 0 0 0 1.5px var(--rose-ink) inset, 0 0 0 5px rgba(163, 52, 58, 0.08); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.86rem; color: var(--muted); margin: 4px 0 18px; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; margin-top: -1px;
  background: var(--sunk); box-shadow: 0 0 0 1px var(--line) inset; color: transparent;
  transition: background var(--mid) var(--ease), box-shadow var(--mid) var(--ease), transform var(--fast) var(--ease);
}
.check .box svg { width: 14px; height: 14px; stroke-width: 2.4; transform: scale(0.4); transition: transform var(--mid) var(--ease); }
.check:active .box { transform: scale(0.9); }
.check input:checked + .box { background: var(--black); color: #fff; box-shadow: var(--shadow-pop); }
.check input:checked + .box svg { transform: none; }
.check input:focus-visible + .box { outline: 2px solid var(--ink); outline-offset: 2px; }

.stepper { display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.stepper button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--sunk); cursor: pointer; font-size: 1.1rem; transition: transform var(--fast) var(--ease), background var(--fast); }
.stepper button:active { transform: scale(0.9); background: var(--line); }
.stepper input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; text-align: center; min-height: 38px !important; padding: 0 !important; background: none !important; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- notices & toast ---------- */
.notice { border-radius: var(--r-md); padding: 12px 16px; margin: 0 0 16px; background: var(--butter); color: var(--butter-ink); font-size: 0.9rem; animation: rise var(--slow) var(--ease) both; }
.notice.error { background: var(--rose); color: var(--rose-ink); }
.notice a { font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 12px 18px 12px 14px; border-radius: 16px; background: var(--black); color: #fff; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem; transform: translate(-50%, 20px) scale(0.96); opacity: 0; pointer-events: none;
  transition: transform var(--mid) var(--ease), opacity var(--mid) var(--ease);
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.toast .ticon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--mint); color: var(--mint-ink); }
.toast.error .ticon { background: var(--rose); color: var(--rose-ink); }
.toast .ticon svg { width: 13px; height: 13px; stroke-width: 2.4; }

/* ---------- skeletons & entrances ---------- */
.skel {
  background: linear-gradient(90deg, #ececf0 0%, #f6f6f8 40%, #ececf0 80%); background-size: 300% 100%;
  animation: shimmer 1.4s var(--ease-io) infinite; border-radius: var(--r-sm); color: transparent !important; box-shadow: none !important;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.94); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
.rise { animation: rise var(--slow) var(--ease) both; }
.stagger > * { animation: rise var(--slow) var(--ease) both; animation-delay: calc(var(--d, 0) * 28ms); }

/* =========================================================
   Client booking page
   ========================================================= */
.client .shell { max-width: 1120px; margin: 0 auto; padding: 20px 16px 120px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 20px; }
.topbar .where { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.85rem; text-align: right; }
.topbar .where svg { width: 16px; height: 16px; }

.layout { display: grid; gap: 16px; grid-template-columns: 1fr; grid-template-areas: "pick" "times" "details"; }
.pick { grid-area: pick; }
.times { grid-area: times; }
.details { grid-area: details; }
@media (min-width: 900px) {
  .client .shell { padding: 28px 24px 60px; }
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "pick times" "details times"; align-items: start; gap: 20px; }
  .times { position: sticky; top: 20px; }
}

.intro { margin-bottom: 22px; }
.intro p { color: var(--muted); margin-top: 6px; }
.kinds { margin-bottom: 10px; }
.kinds label { flex-direction: column; gap: 0; min-height: 58px; line-height: 1.2; }
.kinds label small { font-size: 0.78rem; font-weight: 400; opacity: 0.75; }
.kind-meta { font-size: 0.84rem; color: var(--muted); padding: 2px 4px 22px; min-height: 1.5em; }

/* month calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h2 { font-size: 1rem; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
.cal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); padding: 14px 10px 10px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 0.74rem; color: var(--faint); padding-bottom: 8px; }
.cal-grid { align-content: start; }
.day {
  position: relative; aspect-ratio: 1 / 0.92; display: grid; place-items: center; border: 0; border-radius: 12px; cursor: pointer;
  background: none; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink);
  transition: background var(--mid) var(--ease), color var(--mid) var(--ease), transform var(--fast) var(--ease), box-shadow var(--mid) var(--ease);
}
.day::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--mint-ink); opacity: 0.8; transition: opacity var(--mid); }
.day.low::after { background: var(--peach-ink); }
.day:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--sunk); }
.day:active:not(:disabled) { transform: scale(0.92); }
.day:disabled { cursor: default; color: #c3c3cc; }
.day:disabled::after, .day.pad::after { opacity: 0; }
.day.full { text-decoration: line-through; text-decoration-color: #d4d4dc; }
.day.today:not([aria-pressed="true"]) { box-shadow: 0 0 0 1px var(--line-2) inset; }
.day[aria-pressed="true"] { background: var(--black); color: #fff; box-shadow: var(--shadow-pop); animation: pop var(--mid) var(--ease); }
.day[aria-pressed="true"]::after { background: #fff; opacity: 0.7; }
.day.pad { visibility: hidden; }
.cal-key { display: flex; gap: 14px; justify-content: center; font-size: 0.74rem; color: var(--muted); padding: 10px 0 2px; }
.cal-key span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-ink); }
.cal-key i.low { background: var(--peach-ink); }

/* time slots */
.times h2 { font-size: 1.05rem; }
.times .hint { margin: -6px 0 16px; min-height: 1.4em; transition: opacity var(--mid); }
.slots { display: grid; gap: 6px; }
.slot {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%;
  min-height: 50px; padding: 0 16px; border: 0; border-radius: 14px; cursor: pointer; text-align: left;
  background: var(--surface); box-shadow: 0 1px 2px rgba(20, 20, 30, 0.04);
  transition: background var(--mid) var(--ease), color var(--mid) var(--ease), transform var(--fast) var(--ease), box-shadow var(--mid) var(--ease), border-radius var(--mid) var(--ease);
}
.slot .t { font-weight: 600; font-variant-numeric: tabular-nums; }
.slot .t small { font-weight: 400; color: var(--faint); margin-left: 4px; transition: color var(--mid); }
.slot .s { justify-self: end; font-size: 0.8rem; color: var(--muted); transition: color var(--mid); }
.slot .s.free { color: var(--mint-ink); }
.slot .tick { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--sunk); color: transparent; transition: background var(--mid), color var(--mid), transform var(--mid) var(--ease); }
.slot .tick svg { width: 12px; height: 12px; stroke-width: 2.6; }
.slot:hover:not(:disabled):not(.sel) { background: #fbfbfd; box-shadow: 0 0 0 1px var(--line-2) inset; }
.slot:active:not(:disabled) { transform: scale(0.985); }
.slot:disabled {
  cursor: not-allowed; color: var(--faint); box-shadow: none;
  background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(20, 20, 30, 0.035) 7px 8px), rgba(255, 255, 255, 0.45);
}
.slot:disabled .s { color: var(--faint); }
.slot:disabled .tick { opacity: 0; }
.slot.sel { background: var(--black); color: #fff; box-shadow: var(--shadow-pop); }
.slot.sel .t small, .slot.sel .s { color: rgba(255, 255, 255, 0.6); }
.slot.sel .tick { background: rgba(255, 255, 255, 0.16); color: #fff; }
.slot.sel:not(.first) { border-top-left-radius: 6px; border-top-right-radius: 6px; }
.slot.sel:not(.last) { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.slot.pulse { animation: pop var(--mid) var(--ease); }
.slots-empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.slots-empty strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.slot.skel { min-height: 50px; border-radius: 14px; }

/* summary ticket */
.ticket {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 18px 18px 16px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--tint, var(--lilac)) 0%, #fff 140%);
  color: var(--tint-ink, var(--lilac-ink));
  transition: background var(--slow) var(--ease);
}
.ticket .what { font-size: 0.8rem; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.ticket .when { font-size: 1.15rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; margin: 4px 0 14px; }
.ticket .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px dashed rgba(20, 20, 30, 0.14); color: var(--ink-2); font-size: 0.88rem; }
.ticket .total strong { font-size: 1.35rem; color: var(--ink); letter-spacing: -0.02em; }
.ticket-empty { border-radius: var(--r-lg); padding: 18px; margin-bottom: 20px; background: rgba(255, 255, 255, 0.55); color: var(--muted); font-size: 0.88rem; display: flex; gap: 10px; align-items: center; box-shadow: 0 0 0 1px var(--line) inset; }

/* sticky summary bar on phones */
.bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 20px; background: var(--black); color: #fff;
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.55);
  transform: translateY(calc(100% + 24px)); transition: transform var(--slow) var(--ease);
}
.bar.show { transform: none; }
.bar .sum { line-height: 1.25; }
.bar .sum strong { display: block; font-size: 1.1rem; }
.bar .sum span { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }
.bar .btn { background: #fff; color: var(--ink); box-shadow: none; }
@media (min-width: 900px) { .bar { display: none; } }

.foot { color: var(--muted); font-size: 0.8rem; text-align: center; padding: 28px 0 0; }

/* confirmation page */
.solo { max-width: 520px; margin: 0 auto; padding: 20px 16px 60px; }
.solo .panel { text-align: center; padding: 36px 24px 28px; }
.state-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-soft); }
.state-icon.ok { background: var(--mint); color: var(--mint-ink); animation: pop var(--slow) var(--ease); }
.state-icon.bad { background: var(--rose); color: var(--rose-ink); }
.state-icon svg { width: 28px; height: 28px; stroke-width: 2; }
.state-icon.ok path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 520ms 160ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.solo .lede { color: var(--muted); margin: 8px auto 0; max-width: 34ch; }
.solo .ticket { text-align: left; margin: 26px 0 14px; }
.solo .address { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 0.86rem; margin-bottom: 22px; }
.solo .actions { display: grid; gap: 8px; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: bounce 1.1s var(--ease-io) infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.35; } 40% { transform: translateY(-6px); opacity: 1; } }

/* =========================================================
   Admin
   ========================================================= */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 380px; }
.login .brand { justify-content: center; margin-bottom: 20px; }
.login h1 { font-size: 1.5rem; text-align: center; margin-bottom: 4px; }
.login .hint { text-align: center; margin-bottom: 22px; }
.boot { min-height: 100vh; display: grid; place-items: center; }

.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.side {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; padding: 6px; border-radius: 22px;
  background: rgba(252, 252, 253, 0.86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 18px 40px -14px rgba(20, 20, 30, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}
.side .brand, .side .side-label, .side .side-foot { display: none; }
.nav { display: flex; flex: 1; gap: 4px; }
.nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border: 0; border-radius: 16px;
  background: none; color: var(--muted); font-size: 0.7rem; font-weight: 500; cursor: pointer;
  transition: background var(--mid) var(--ease), color var(--mid) var(--ease), transform var(--fast) var(--ease), box-shadow var(--mid) var(--ease);
}
.nav button:active { transform: scale(0.95); }
.nav button[aria-selected="true"] { background: var(--black); color: #fff; box-shadow: var(--shadow-pop); }
.nav .badge { display: none; }
.main { padding: 20px 16px 120px; min-width: 0; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.86rem; }
.crumb b { color: var(--ink); font-weight: 500; }
.crumb .mark { width: 28px; height: 28px; border-radius: 9px; }
.crumb .mark svg { width: 12px; height: 12px; }

@media (min-width: 900px) {
  .admin-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 0; padding: 16px; }
  .side {
    position: sticky; top: 16px; left: auto; right: auto; bottom: auto; height: calc(100vh - 32px);
    flex-direction: column; align-items: stretch; padding: 20px 14px; border-radius: var(--r-xl);
    box-shadow: var(--shadow-panel), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  }
  .side .brand { display: flex; padding: 0 8px 22px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
  .side .side-label { display: block; font-size: 0.74rem; color: var(--faint); padding: 0 12px 8px; }
  .nav { flex-direction: column; flex: 0; gap: 2px; }
  .nav button { flex-direction: row; gap: 12px; padding: 0 12px; min-height: 44px; font-size: 0.92rem; border-radius: 14px; }
  .nav button:hover:not([aria-selected="true"]) { background: rgba(20, 20, 30, 0.045); color: var(--ink); }
  .nav button:active { transform: scale(0.98); }
  .nav .badge { display: inline-grid; place-items: center; margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.72rem; }
  .nav button[aria-selected="true"] .badge { background: #fff; color: var(--ink); }
  .side .side-foot { display: grid; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
  .side-foot .btn { justify-content: flex-start; padding: 0 12px; color: var(--muted); }
  .main { padding: 8px 8px 40px 28px; }
  .crumb .mark { display: none; }
}

.view { animation: rise var(--slow) var(--ease) both; }
.view-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.view-head h1 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.view-head .sub { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pager { display: flex; align-items: center; gap: 6px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
.stat .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; background: var(--tint); color: var(--tint-ink); }
.stat .ico svg { width: 16px; height: 16px; }
.stat .v { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 0.78rem; color: var(--muted); }
.stat .v.skel { width: 60%; height: 1.6rem; }
@media (max-width: 520px) { .stat { padding: 12px; } .stat .ico { display: none; } .stat .v { font-size: 1.15rem; } }

.filters { display: flex; gap: 6px; overflow-x: auto; padding: 4px 4px 16px; margin: -4px -4px 0; scrollbar-width: none; }
.filters button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--ink-2); font-size: 0.84rem; font-weight: 500; box-shadow: var(--shadow-soft);
  transition: background var(--mid) var(--ease), color var(--mid) var(--ease), transform var(--fast) var(--ease);
}
.filters button i { width: 8px; height: 8px; border-radius: 50%; background: var(--tint-ink, var(--ink)); }
.filters button:active { transform: scale(0.95); }
.filters button[aria-pressed="true"] { background: var(--black); color: #fff; box-shadow: var(--shadow-pop); }
.filters button[aria-pressed="true"] i { background: #fff; }

/* agenda list */
.agenda { display: grid; gap: 18px; }
.agenda-day h3 { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--ink-2); margin: 0 4px 8px; }
.agenda-day h3 .count { color: var(--faint); font-weight: 400; }
.agenda-day h3 .now { height: 20px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.7rem; display: inline-flex; align-items: center; }
.rows { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 4px 5.2rem minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px 14px 12px; border: 0; background: none; text-align: left; cursor: pointer;
  transition: background var(--fast);
}
.row + .row { border-top: 1px solid var(--line); }
.row:hover { background: #fafafc; }
.row:active { background: var(--sunk); }
.row .bar-tint { align-self: stretch; border-radius: 4px; background: var(--tint); }
.row .time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.92rem; line-height: 1.3; }
.row .time span { display: block; font-weight: 400; color: var(--faint); font-size: 0.8rem; }
.row .who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .right { display: flex; align-items: center; gap: 10px; color: var(--faint); }
.row .amt { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.88rem; font-weight: 500; }
@media (max-width: 520px) { .row { grid-template-columns: 4px 4.4rem minmax(0, 1fr); } .row .right { display: none; } }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); background: rgba(255, 255, 255, 0.5); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line) inset; }
.empty .state-icon { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 14px; }
.empty strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }

/* week planner */
.week-wrap { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); overflow: auto; max-height: 72vh; }
.week { --hr: 56px; display: grid; grid-template-columns: 56px repeat(7, minmax(108px, 1fr)); min-width: 820px; position: relative; }
.week .wh { position: sticky; top: 0; z-index: 3; background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 6px; text-align: center; font-size: 0.8rem; color: var(--muted); }
.week .wh b { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; margin-left: 4px; border-radius: 9px; color: var(--ink); font-weight: 600; }
.week .wh.today b { background: var(--black); color: #fff; box-shadow: var(--shadow-pop); }
.week .wh.corner { left: 0; z-index: 4; }
.week .gutter { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.week .gutter span { display: block; height: var(--hr); font-size: 0.72rem; color: var(--faint); text-align: right; padding: 0 10px 0 0; transform: translateY(-0.55em); font-variant-numeric: tabular-nums; }
.week .gutter span:first-child { transform: translateY(4px); }
.week .col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% var(--hr); }
.week .col.closed { background-color: #fafafb; }
.week .col.today { background-color: #fbfbfe; }
.blk {
  position: absolute; left: 4px; right: 4px; display: flex; flex-direction: column; gap: 1px; overflow: hidden;
  padding: 6px 8px; border: 0; border-radius: 10px; text-align: left; cursor: pointer;
  background: var(--tint); color: var(--tint-ink); font-size: 0.76rem; line-height: 1.25;
  box-shadow: 0 0 0 2px var(--surface);
  transition: transform var(--fast) var(--ease), box-shadow var(--mid) var(--ease);
  animation: rise var(--slow) var(--ease) both; animation-delay: calc(var(--d, 0) * 30ms);
}
.blk:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--surface), 0 10px 20px -10px rgba(20, 20, 30, 0.35); z-index: 1; }
.blk:active { transform: scale(0.98); }
.blk b { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.k-blocked { background: repeating-linear-gradient(135deg, #ededf1 0 6px, #e5e5ea 6px 7px); }
.blk .pill { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); font-size: 0.68rem; color: var(--ink-2); }
.nowline { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--ink); z-index: 2; pointer-events: none; }
.nowline::before { content: attr(data-t); position: absolute; left: -2px; top: -11px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.66rem; display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; transform: translateX(-100%); }
.nowline::after { content: ""; position: absolute; left: -4px; top: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }

/* forms in admin */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .form-grid.two { grid-template-columns: 1fr 1fr; align-items: start; } }
.form-card { padding: 22px; }
.form-card h2 { margin-bottom: 4px; }
.form-card .hint { margin-bottom: 16px; }
.form-card > .field:last-child, .form-card .row2:last-child .field { margin-bottom: 0; }
.days-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days-pick label {
  position: relative; display: grid; place-items: center; height: 42px; border-radius: 12px; cursor: pointer; font-size: 0.84rem; font-weight: 500;
  background: var(--sunk); color: var(--muted);
  transition: background var(--mid) var(--ease), color var(--mid) var(--ease), transform var(--fast) var(--ease), box-shadow var(--mid) var(--ease);
}
.days-pick label:active { transform: scale(0.93); }
.days-pick label:has(input:checked) { background: var(--black); color: #fff; box-shadow: var(--shadow-pop); }
.days-pick label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.days-pick input { position: absolute; opacity: 0; pointer-events: none; }
.preview { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--tint); color: var(--tint-ink); font-size: 0.88rem; margin: 4px 0 16px; transition: background var(--slow) var(--ease), color var(--slow); }
.preview b { color: var(--ink); font-weight: 600; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; min-width: 0; font-size: 0.82rem; color: var(--muted); }
.status-list { display: grid; gap: 8px; margin-top: 16px; }
.status-list div { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.save-bar { position: sticky; bottom: 96px; z-index: 5; display: flex; justify-content: flex-end; margin-top: 16px; }
@media (min-width: 900px) { .save-bar { bottom: 16px; } }

/* detail sheet */
dialog.sheet {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--r-xl);
  background: #fbfbfc; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(10, 10, 20, 0.45);
  opacity: 0; transform: translateY(14px) scale(0.97);
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease), overlay var(--mid) allow-discrete, display var(--mid) allow-discrete;
}
dialog.sheet[open] { opacity: 1; transform: none; }
@starting-style { dialog.sheet[open] { opacity: 0; transform: translateY(14px) scale(0.97); } }
dialog.sheet::backdrop { background: rgba(30, 30, 40, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background var(--mid), backdrop-filter var(--mid), overlay var(--mid) allow-discrete, display var(--mid) allow-discrete; }
dialog.sheet[open]::backdrop { background: rgba(30, 30, 40, 0.28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@starting-style { dialog.sheet[open]::backdrop { background: rgba(30, 30, 40, 0); } }
.sheet-top { padding: 22px 22px 18px; background: linear-gradient(160deg, var(--tint) 0%, #fbfbfc 90%); }
.sheet-top .x { float: right; }
.sheet-top h2 { font-size: 1.3rem; margin: 12px 0 4px; }
.sheet-top .when { color: var(--ink-2); font-size: 0.92rem; }
.sheet-body { padding: 6px 22px 8px; }
.kv { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.kv:first-child { border-top: 0; }
.kv svg { color: var(--muted); margin-top: 2px; }
.kv a { text-decoration: none; border-bottom: 1px solid var(--line-2); }
.kv .note { white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-actions { display: grid; gap: 8px; padding: 12px 22px 22px; }
.sheet-actions .hint { text-align: center; }

@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

.week .col { cursor: cell; }
@media (max-width: 640px) { .topbar .where { display: none; } }
@media (min-width: 900px) { .filters { overflow: visible; } }

/* booking page: notice period */
.notice-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.notice-line svg { width: 15px; height: 15px; }

/* admin: quick add pop-up (fades in and slides up) */
.quick {
  position: fixed; z-index: 50; width: 360px; max-width: calc(100vw - 16px); padding: 16px;
  border-radius: 22px; background: rgba(252, 252, 253, 0.97);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 28px 64px -20px rgba(10, 10, 20, 0.42), 0 0 0 1px rgba(20, 20, 30, 0.04);
  opacity: 0; transform: translateY(14px) scale(0.98);
  transition: opacity 240ms var(--ease), transform 380ms var(--ease);
}
.quick.open { opacity: 1; transform: none; }
.quick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.quick-head h2 { font-size: 1rem; }
.quick-head .icon-btn { width: 32px; height: 32px; border-radius: 10px; box-shadow: none; background: var(--sunk); }
.quick .seg { margin-bottom: 10px; }
.quick .seg > label { padding: 0 4px; font-size: 0.82rem; }
.quick-when {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px; margin-bottom: 12px; border-radius: 14px;
  background: var(--tint); color: var(--tint-ink); font-size: 0.86rem; transition: background var(--slow) var(--ease), color var(--slow);
}
.quick-when input[type="date"], .quick-when select {
  min-height: 32px; padding: 0 8px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.8); color: var(--ink); font-size: 0.84rem;
  -webkit-appearance: none; appearance: none;
}
.quick-when input[type="date"] { flex: 1 1 100%; }
.quick-when select { padding-right: 8px; }
.quick-when #qEnd::before { content: "– "; }
.stepper.mini { margin-left: auto; padding: 2px; gap: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.8); box-shadow: none; }
.stepper.mini button { width: 28px; height: 28px; border-radius: 8px; background: transparent; font-size: 1rem; color: var(--ink); }
.stepper.mini input { flex: none; width: 2.4em; min-height: 28px !important; color: var(--ink); }
.quick .field { margin-bottom: 10px; }
.quick .field input:not([type="checkbox"]):not([type="radio"]) { min-height: 42px; padding: 9px 12px; border-radius: 12px; }
.quick .field.invalid input { box-shadow: 0 0 0 1.5px var(--rose-ink) inset, 0 0 0 5px rgba(163, 52, 58, 0.08); }
.quick-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
@media (max-width: 640px) {
  .quick { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-width: none; transform: translateY(40px); }
}
.blk.ghost {
  pointer-events: none; z-index: 1; border: 1.5px dashed var(--tint-ink); box-shadow: none;
  background: color-mix(in srgb, var(--tint) 75%, transparent);
  transition: top var(--mid) var(--ease), height var(--mid) var(--ease), background var(--mid), border-color var(--mid);
}

/* booking page: changing an existing booking */
.move-now { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; margin-bottom: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 1px var(--line) inset; font-size: 0.88rem; color: var(--muted); }
.move-now span { white-space: nowrap; }
.move-now b { color: var(--ink); font-weight: 500; text-align: right; }
.slot.own:not(.sel) { outline: 1.5px dashed var(--line-2); outline-offset: -1.5px; }
.slot.own:not(.sel) .s { color: var(--lilac-ink); }
.layout.solo-mode { grid-template-columns: minmax(0, 560px); grid-template-areas: "details"; justify-content: center; }
.slot .s.ask { color: var(--butter-ink); }
.slot.requested:not(.sel) { outline: 1.5px dashed var(--butter-ink); outline-offset: -1.5px; }
.slot.requested:not(.sel) .s { color: var(--butter-ink); }

/* admin: toast button (Undo) */
.toast.has-action { pointer-events: auto; padding-right: 8px; }
.toast button { margin-left: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 500; cursor: pointer; transition: background var(--fast); }
.toast button:hover { background: rgba(255, 255, 255, 0.24); }
.nav .badge.alert { background: var(--peach-ink); color: #fff; }

/* admin: approvals */
.approvals { margin-bottom: 16px; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--butter) 0%, #fffdf3 70%); box-shadow: var(--shadow-soft); }
.appr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.appr-head h2 { font-size: 1rem; }
.appr-head .count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--butter-ink); color: #fff; font-size: 0.76rem; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--butter-ink); box-shadow: 0 0 0 0 rgba(133, 102, 15, 0.5); animation: pulse 1.8s var(--ease-io) infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(133, 102, 15, 0); } 100% { box-shadow: 0 0 0 0 rgba(133, 102, 15, 0); } }
.appr { padding: 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-soft); transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease); }
.appr + .appr { margin-top: 10px; }
.appr.leaving { opacity: 0; transform: translateY(-6px) scale(0.98); }
.appr-who { font-size: 0.92rem; margin-bottom: 10px; }
.appr-times { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
.appr-times > div { padding: 10px 12px; border-radius: 12px; background: var(--sunk); font-size: 0.86rem; }
.appr-times > div:last-child { background: var(--tint); }
.appr-times span { display: block; font-size: 0.74rem; color: var(--muted); }
.appr-times b { font-weight: 500; }
.appr-times svg { color: var(--faint); }
.appr-msg { min-height: 0; padding: 10px 12px; font-size: 0.88rem; resize: vertical; margin-bottom: 10px; }
.appr-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 520px) { .appr-times { grid-template-columns: 1fr; } .appr-times svg { display: none; } }

/* admin: week planner requests and dragging */
.blk.ask { background: repeating-linear-gradient(135deg, var(--butter) 0 6px, #fbf5dc 6px 12px); color: var(--butter-ink); border: 1.5px dashed var(--butter-ink); box-shadow: none; }
.blk[data-drag] { cursor: grab; touch-action: none; }
/* While dragging, the script moves the block every frame, so no transform transition here. */
.blk.dragging {
  z-index: 2; cursor: grabbing; transition: box-shadow var(--mid) var(--ease), opacity var(--mid); will-change: transform;
  box-shadow: 0 0 0 2px var(--surface), 0 24px 44px -14px rgba(20, 20, 30, 0.42), 0 8px 16px -8px rgba(20, 20, 30, 0.2);
  animation: none; opacity: 0.96;
}
.blk.dragging.clash { outline: 2px solid var(--rose-ink); outline-offset: 1px; }
.blk.landing { z-index: 2; animation: none; transition: transform 300ms cubic-bezier(0.2, 0.9, 0.25, 1.05), box-shadow 300ms var(--ease); }
.blk.saving { opacity: 0.7; }
/* Where the dragged block will land: snaps to hours and days with a soft glide. */
.drop-mark {
  position: absolute; z-index: 1; pointer-events: none; display: flex; align-items: flex-end; padding: 6px 8px;
  border-radius: 10px; border: 1.5px dashed var(--tint-ink, var(--ink-2)); background: color-mix(in srgb, var(--tint, #e9e9ee) 45%, transparent);
  color: var(--tint-ink, var(--ink-2)); font-size: 0.7rem; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: left 200ms var(--ease), top 160ms var(--ease), opacity var(--mid), background var(--mid), border-color var(--mid);
  animation: rise 220ms var(--ease) both;
}
.drop-mark.instant { transition: none; }
.drop-mark.clash { border-color: var(--rose-ink); background: color-mix(in srgb, var(--rose) 60%, transparent); color: var(--rose-ink); }
.drop-mark.fade { opacity: 0; }
.blk.ghost { pointer-events: auto; cursor: grab; touch-action: none; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* admin: moved without telling the client */
.toast { flex-wrap: wrap; }
.toast-actions { display: inline-flex; gap: 6px; }
.blk.untold::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--butter-ink); box-shadow: 0 0 0 2px var(--surface); }
.sheet-notify { margin: 14px 22px 4px; padding: 12px 14px; border-radius: var(--r-md); background: var(--butter); color: var(--butter-ink); font-size: 0.88rem; display: grid; gap: 10px; }
.sheet-notify b { color: var(--ink); font-weight: 600; }

/* admin: days that have gone (shaded by whole day) */
.week .col.past { background-color: #f1f1f4; }
.week .col.past .blk:not(.dragging):not(.landing) { opacity: 0.72; }
.week .wh.past { color: var(--faint); }
.week .wh.past b { color: var(--faint); font-weight: 500; }
.quick-past { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--sunk); color: var(--ink-2); font-size: 0.82rem; animation: rise var(--mid) var(--ease) both; }
.quick-past::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }

/* admin: notifications card */
.push-box { display: grid; gap: 10px; padding: 14px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.push-state { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.push-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); transition: background var(--mid); }
.push-dot.on { background: var(--mint-ink); box-shadow: 0 0 0 4px var(--mint); }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-actions:not(:has(button:not([hidden]))) { display: none; }
.push-box .hint:empty { display: none; }
.notify-grid { display: grid; margin-top: 4px; }
.ng-row { display: grid; grid-template-columns: 1fr 58px 58px; align-items: center; min-height: 44px; border-top: 1px solid var(--line); font-size: 0.88rem; }
.ng-row > :not(:first-child) { justify-self: center; }
.ng-head { min-height: 34px; border-top: 0; font-size: 0.74rem; color: var(--faint); padding-top: 8px; }
.ng-head + .ng-row { border-top: 0; }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background var(--mid) var(--ease); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 20, 30, 0.25); transition: transform var(--mid) var(--ease); }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch:active i::after { width: 22px; }
.switch input:checked:active + i::after { transform: translateX(12px); }

/* booking page: the client cancelling */
.cancel-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.link-btn { border: 0; background: none; padding: 6px 10px; border-radius: 10px; color: var(--muted); font-size: 0.86rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: color var(--fast), background var(--fast); }
.link-btn:hover { color: var(--rose-ink); background: rgba(163, 52, 58, 0.06); }
.cancel-box { text-align: left; padding: 14px; border-radius: var(--r-md); background: var(--rose); color: var(--rose-ink); font-size: 0.88rem; animation: rise var(--mid) var(--ease) both; }
.cancel-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.cancel-box .btn.danger { background: var(--rose-ink); color: #fff; }

/* admin: cancelling a client's booking */
.cancel-extra { display: grid; gap: 8px; animation: rise var(--mid) var(--ease) both; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--sunk); font-size: 0.88rem; cursor: pointer; }
.cancel-extra textarea { min-height: 0; padding: 10px 12px; font-size: 0.88rem; resize: vertical; }

/* admin: units inside number fields */
.affix { position: relative; }
.affix .pre, .affix .suf { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.88rem; pointer-events: none; white-space: nowrap; }
.affix .pre { left: 14px; color: var(--ink-2); }
.affix .suf { right: 14px; }
.field .affix.has-pre input:not([type="checkbox"]):not([type="radio"]) { padding-left: 30px; }
.field .affix.has-suf input:not([type="checkbox"]):not([type="radio"]) { padding-right: 96px; }
.affix input::-webkit-outer-spin-button, .affix input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.affix input[type="number"] { -moz-appearance: textfield; }
.stepper .unit { color: var(--muted); font-size: 0.86rem; margin: 0 8px 0 5px; }
.stepper input { text-align: right; }
.stepper.mini .unit { font-size: 0.78rem; margin: 0 6px 0 4px; }
.stepper.mini input { width: 1.6em; }

/* admin: notification emails as pills */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chip-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 12px; border-radius: 999px;
  background: var(--black); color: #fff; font-size: 0.84rem; box-shadow: var(--shadow-pop);
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.chip-pill.new { animation: pop var(--mid) var(--ease); }
.chip-pill.leaving { opacity: 0; transform: scale(0.85); }
.chip-pill button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; transition: background var(--fast); }
.chip-pill button:hover { background: rgba(255, 255, 255, 0.28); }
.chip-pill button svg { width: 12px; height: 12px; stroke-width: 2.2; }
.add-row { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 0; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow var(--mid) var(--ease); }
.add-row:focus-within { box-shadow: 0 0 0 1.5px var(--ink) inset, 0 0 0 5px rgba(20, 20, 22, 0.06); }
.field .add-row input:not([type="checkbox"]):not([type="radio"]) { flex: 1; min-width: 0; min-height: 38px; border: 0; box-shadow: none; background: none; }
.add-row .btn { min-height: 38px; }
.field-error { color: var(--rose-ink); }

/* =========================================================
   Admin on phones: a fixed app shell. Only the content scrolls,
   so the bottom bar never moves or covers anything.
   ========================================================= */
.fab { display: none; }
@media (max-width: 899px) {
  html:has(body.admin #app:not([hidden])), body.admin:has(#app:not([hidden])) { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .admin-shell { position: fixed; inset: 0; display: flex; flex-direction: column; }
  .admin-shell .main {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
    padding: calc(14px + env(safe-area-inset-top)) 18px 28px;
  }
  .side {
    position: static; flex: none; order: 2; margin: 0 14px calc(10px + env(safe-area-inset-bottom));
    padding: 5px; border-radius: 22px;
    box-shadow: 0 10px 30px -14px rgba(20, 20, 30, 0.28), 0 0 0 1px rgba(20, 20, 30, 0.05);
  }
  .nav button { padding: 7px 6px; gap: 3px; font-size: 0.68rem; border-radius: 17px; }
  .nav button svg.i { width: 19px; height: 19px; }

  /* the round + for a new booking, floating just above the bar, on the diary only */
  .fab {
    position: absolute; right: 20px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 25;
    display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 19px; cursor: pointer;
    background: var(--black); color: #fff; box-shadow: 0 16px 30px -10px rgba(10, 10, 14, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition: transform var(--fast) var(--ease), opacity var(--mid) var(--ease);
  }
  .fab svg.i { width: 24px; height: 24px; stroke-width: 2; }
  .fab:active { transform: scale(0.92); }
  .admin-shell[data-tab]:not([data-tab="bookings"]) .fab { opacity: 0; pointer-events: none; transform: scale(0.8); }
  #newBtn { display: none; }

  /* a slim header: just where you are */
  .main-head { margin-bottom: 10px; }
  .crumb .studio-name, .crumb > svg.i { display: none; }
  .crumb b { font-size: 0.95rem; font-weight: 600; }
  .main-head .icon-btn { width: 34px; height: 34px; border-radius: 11px; box-shadow: none; background: rgba(255, 255, 255, 0.7); }

  /* the diary's title and controls */
  .view-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 12px; margin-bottom: 16px; }
  .view-head h1 { font-size: 1.45rem; }
  .view-head .sub { font-size: 0.82rem; }
  .view-head .toolbar { display: contents; }
  .view-head .seg { grid-column: 2; grid-row: 1; }
  .view-head .pager { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; padding: 4px; border-radius: 16px; background: rgba(255, 255, 255, 0.6); }
  .view-head .pager[hidden], .view-head .pager:has(#today[hidden]) { display: none; }
  .view-head .pager .icon-btn, .view-head .pager .btn { box-shadow: none; background: transparent; }
  .view-head .pager .btn { font-weight: 600; }

  /* totals as one slim strip */
  .stats { gap: 0; padding: 12px 4px; margin-bottom: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
  .stat { padding: 0 12px; background: none; box-shadow: none; border-radius: 0; }
  .stat + .stat { border-left: 1px solid var(--line); }
  .stat .ico { display: none; }
  .stat .v { font-size: 1.15rem; }
  .stat .l { font-size: 0.72rem; }

  /* filters: smaller, and fading out at the edge where they scroll */
  .filters { gap: 6px; padding: 2px 18px 12px; margin: 0 -18px 4px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 24px), transparent); }
  .filters button { height: 32px; padding: 0 12px; font-size: 0.8rem; box-shadow: 0 0 0 1px var(--line) inset; }
  .filters button[aria-pressed="true"] { box-shadow: var(--shadow-pop); }

  /* the list */
  .agenda { gap: 20px; }
  .agenda-day h3 { font-size: 0.8rem; margin: 0 4px 8px; }
  .row { grid-template-columns: 3px 3.4rem minmax(0, 1fr); gap: 12px; padding: 13px 14px 13px 12px; }
  .row .time { font-size: 0.86rem; }
  .row .time span { font-size: 0.76rem; }
  .row .who { font-size: 0.92rem; }
  .row .meta { font-size: 0.78rem; }

  /* the week planner: one scroll (the page), sideways for the days */
  .week-wrap { max-height: none; overflow-y: visible; overflow-x: auto; border-radius: var(--r-lg); }
  .week { grid-template-columns: 46px repeat(7, minmax(96px, 1fr)); min-width: 718px; }
  .week .wh { padding: 9px 4px; font-size: 0.74rem; position: static; }
  .week .wh.corner { position: sticky; left: 0; z-index: 3; background: var(--surface); }
  .week .gutter span { font-size: 0.66rem; padding-right: 7px; }
  .blk { font-size: 0.72rem; padding: 5px 7px; }

  /* forms */
  .panel { padding: 18px; border-radius: 24px; }
  .form-card { padding: 18px; }
  .form-grid { gap: 12px; }
  .field { margin-bottom: 12px; }
  .row2 { gap: 10px; }
  .approvals { padding: 14px; }

  /* Save settings as a bar along the bottom of the content, above the app bar */
  .save-bar {
    position: sticky; bottom: -28px; margin: 18px -18px -28px; padding: 14px 18px calc(14px + 0px);
    background: linear-gradient(to bottom, rgba(236, 236, 239, 0), var(--bg) 38%);
  }
  .save-bar .btn { width: 100%; }

  /* messages sit above the app bar */
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
