/* ==========================================================================
   «Запишись» design system
   Display: Unbounded (variable) · Text: Onest (variable) — both self-hosted, OFL
   ========================================================================== */

@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/fonts/unbounded-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/onest-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/onest-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/onest-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #fbf8f5;
  --surface: #ffffff;
  --surface-2: #f6f1ec;
  --surface-3: #efe7e1;
  --border: #ebe3dd;
  --border-strong: #dcd1c9;
  --text: #1b1320;
  --text-2: #5e5462;
  --muted: #9a8f9c;

  --rose: #f0457a;
  --rose-soft: #fde7ee;
  --lilac: #8b6cff;
  --lilac-soft: #efeaff;
  --peach: #ffad86;
  --peach-soft: #fff0e8;
  --grad: linear-gradient(120deg, #ffad86 0%, #f0457a 48%, #8b6cff 100%);
  --grad-soft: linear-gradient(120deg, #fff0e8 0%, #fde7ee 50%, #efeaff 100%);
  --accent: var(--rose);
  --accent-ink: #ffffff;
  --accent-soft: var(--rose-soft);
  --focus: 0 0 0 3px rgb(240 69 122 / 25%);

  --meter: #8b6cff;
  --meter-track: #ece6ff;
  --st-booked: #6a5cff;
  --st-booked-bg: #eeecff;
  --st-done: #19a463;
  --st-done-bg: #e3f6ec;
  --st-noshow: #e5484d;
  --st-noshow-bg: #fdecec;
  --st-cancel: #9a8f9c;
  --st-cancel-bg: #f3efec;
  --offhours: repeating-linear-gradient(135deg, #f4eee9 0 7px, #efe8e2 7px 14px);

  --shadow-sm: 0 1px 2px rgb(27 19 32 / 5%);
  --shadow: 0 1px 2px rgb(27 19 32 / 4%), 0 8px 24px -8px rgb(27 19 32 / 10%);
  --shadow-lg: 0 30px 80px -20px rgb(60 20 60 / 30%);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #120d18; --surface: #1b1422; --surface-2: #231a2b; --surface-3: #2c2236;
    --border: #2f2539; --border-strong: #41344d;
    --text: #f6f1f7; --text-2: #c9bfcd; --muted: #8e8296;
    --rose: #ff5c8d; --rose-soft: #3b1a2a; --lilac: #a58dff; --lilac-soft: #2a2245; --peach: #ffb894; --peach-soft: #3a2620;
    --grad-soft: linear-gradient(120deg, #3a2620 0%, #3b1a2a 50%, #2a2245 100%);
    --accent-ink: #1b0a12;
    --meter: #a58dff; --meter-track: #2c2445;
    --st-booked: #9488ff; --st-booked-bg: #262247; --st-done: #3ccf8a; --st-done-bg: #173226;
    --st-noshow: #ff6b6f; --st-noshow-bg: #3d1d20; --st-cancel: #8e8296; --st-cancel-bg: #241c2b;
    --offhours: repeating-linear-gradient(135deg, #171120 0 7px, #1a1323 7px 14px);
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -8px rgb(0 0 0 / 50%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120d18; --surface: #1b1422; --surface-2: #231a2b; --surface-3: #2c2236;
  --border: #2f2539; --border-strong: #41344d;
  --text: #f6f1f7; --text-2: #c9bfcd; --muted: #8e8296;
  --rose: #ff5c8d; --rose-soft: #3b1a2a; --lilac: #a58dff; --lilac-soft: #2a2245; --peach: #ffb894; --peach-soft: #3a2620;
  --grad-soft: linear-gradient(120deg, #3a2620 0%, #3b1a2a 50%, #2a2245 100%);
  --accent-ink: #1b0a12;
  --meter: #a58dff; --meter-track: #2c2445;
  --st-booked: #9488ff; --st-booked-bg: #262247; --st-done: #3ccf8a; --st-done-bg: #173226;
  --st-noshow: #ff6b6f; --st-noshow-bg: #3d1d20; --st-cancel: #8e8296; --st-cancel-bg: #241c2b;
  --offhours: repeating-linear-gradient(135deg, #171120 0 7px, #1a1323 7px 14px);
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -8px rgb(0 0 0 / 50%);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(20px, 2.4vw, 26px); }
h3 { font-size: 16px; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
::selection { background: var(--rose); color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.num { font-variant-numeric: tabular-nums; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* one solid accent word in a heading; the gradient is reserved for the hero headline and the main buttons */
.accent-text { color: var(--rose); }
.dark .accent-text { color: var(--peach); }

/* ---------- controls ---------- */
button, .btn {
  font: inherit; font-weight: 500; cursor: pointer; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); padding: 9px 16px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), border-color .2s, background .2s;
}
button:hover, .btn:hover { border-color: var(--border-strong); }
button:active, .btn:active { transform: scale(.98); }
button.primary, .btn.primary {
  background: var(--grad); background-size: 140% 100%; background-position: 0 0; border: 0; color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px -8px rgb(240 69 122 / 60%), inset 0 1px 0 rgb(255 255 255 / 25%);
}
button.primary:hover, .btn.primary:hover { background-position: 100% 0; box-shadow: 0 12px 28px -10px rgb(139 108 255 / 60%), inset 0 1px 0 rgb(255 255 255 / 25%); }
button.dark, .btn.dark { background: var(--text); color: var(--bg); border-color: var(--text); }
button.danger { color: var(--st-noshow); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; }
button.ghost:hover, .btn.ghost:hover { background: var(--surface-2); }
button.icon { width: 40px; padding: 0; }
.btn.xl, button.xl { min-height: 52px; padding: 12px 24px; font-size: 16px; border-radius: 16px; }
button:disabled { opacity: .5; cursor: default; transform: none; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 12px; min-height: 42px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: var(--focus); }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); }
label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; color: var(--text); }
label.check input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--rose); flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.error { color: var(--st-noshow); font-size: 14px; min-height: 1.2em; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.pill.grad { background: var(--grad-soft); color: var(--text); }

.avatar { --h: 330; width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font: 600 13px/1 var(--font-display); color: #fff;
  background: linear-gradient(135deg, hsl(calc(var(--h) + 25) 95% 72%), hsl(var(--h) 80% 58%)); box-shadow: inset 0 -2px 6px rgb(0 0 0 / 12%); }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }

/* ---------- icon tiles (line icons from /img/icons.svg) ---------- */
.ico { --s: 52px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3); flex: none; display: inline-grid; place-items: center;
  color: #fff; background: var(--grad); box-shadow: 0 14px 28px -12px rgb(240 69 122 / 55%), inset 0 1px 0 rgb(255 255 255 / 35%); }
.ico svg { width: 48%; height: 48%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { --s: 38px; } .ico.lg { --s: 72px; } .ico.xl { --s: 104px; }
.ico.lg svg, .ico.xl svg { stroke-width: 1.6; }
.ico.soft { background: var(--grad-soft); color: var(--rose); box-shadow: inset 0 0 0 1px var(--border); }
.ico.lilac { background: linear-gradient(135deg, #b39bff, #8b6cff 60%, #f0457a); }
.ico.peach { background: linear-gradient(135deg, #ffc49f, #ff8a6b 55%, #f0457a); }
.ico.glass { background: rgb(255 255 255 / 10%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%); backdrop-filter: blur(10px); }
/* 3D icons (img from /img/3d, see design/icons3d): no tile, a bit larger than the tile they replace, ground shadow via drop-shadow */
.ico.i3d { width: calc(var(--s) * 1.6); height: calc(var(--s) * 1.6); margin: calc(var(--s) * -.18); border-radius: 0; background: none; box-shadow: none; object-fit: contain;
  filter: drop-shadow(0 calc(var(--s) * .1) calc(var(--s) * .12) rgb(91 58 110 / 24%)); }
.dark .ico.i3d, .b-dark > .ico.i3d { filter: drop-shadow(0 calc(var(--s) * .1) calc(var(--s) * .16) rgb(0 0 0 / 55%)); }

/* ---------- status ---------- */
.st-booked { --c: var(--st-booked); --b: var(--st-booked-bg); }
.st-done { --c: var(--st-done); --b: var(--st-done-bg); }
.st-no_show { --c: var(--st-noshow); --b: var(--st-noshow-bg); }
.st-cancelled { --c: var(--st-cancel); --b: var(--st-cancel-bg); }
.status { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--b); color: var(--text); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* ==========================================================================
   App shell: sidebar on desktop, bottom tab bar on mobile
   ========================================================================== */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px;
  background: var(--surface); border-right: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 18px/1 var(--font-display); letter-spacing: -.03em; color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px; background: url(/img/logo.svg) center/cover no-repeat; flex: none; box-shadow: 0 6px 14px -6px rgb(240 69 122 / 60%); }
.sidebar .brand { padding: 4px 10px 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav a svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--grad-soft); color: var(--text); }
.nav a.active svg { stroke: var(--rose); }
.side-card { margin-top: auto; padding: 14px; border-radius: 16px; background: var(--grad-soft); font-size: 13px; }
.side-card b { display: block; font-family: var(--font-display); font-size: 14px; margin-bottom: 2px; }
.side-card a.btn { margin-top: 10px; width: 100%; }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; font-size: 13px; color: var(--muted); }

.page { min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px 28px 0; }
.page-head h1 { font-size: 26px; margin: 0; }
main { padding: 20px 28px 40px; max-width: 1360px; }
.banner { margin: 16px 28px 0; padding: 12px 16px; border-radius: 14px; background: var(--grad-soft); font-size: 14px; border: 1px solid var(--border); }
.banner.warn { background: var(--st-noshow-bg); border-color: var(--st-noshow); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.banner.warn button { margin-left: auto; }

.mobile-top, .tabbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .tabbar { display: grid; grid-template-columns: repeat(7, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.active { color: var(--rose); }
  .page-head { padding: 16px 16px 0; }
  .page-head h1 { font-size: 22px; }
  main { padding: 14px 16px 96px; }
  .banner { margin: 12px 16px 0; }
  #j-date { display: none; }
  .journal-date { font-size: 15px; padding: 0 4px; }
  .cal { max-height: calc(100vh - 260px); }
  .cal-head, .cal-col { min-width: 140px; }
}

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; }
th { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.card.flush { padding: 4px 12px; }
.cell-person { display: flex; align-items: center; gap: 12px; }

.empty { text-align: center; padding: 40px 20px; }
.empty .ico { margin: 0 auto 16px; }
.empty h3 { font-size: 18px; }

/* ---------- onboarding ---------- */
.onboard { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-bottom: 18px; background: var(--grad-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }

.onboard ol { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.onboard li { display: flex; gap: 10px; align-items: center; }
.onboard li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--surface); }
.onboard li.done .dot { background: var(--st-done); border-color: var(--st-done); color: #fff; }
.onboard li.done a { color: var(--muted); text-decoration: line-through; }
@media (max-width: 560px) { .onboard { grid-template-columns: 1fr; } .onboard > .ico { display: none; } }

/* ---------- journal ---------- */
.journal-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.journal-toolbar input[type=date] { width: auto; }
.date-nav { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 3px; }
.date-nav button { border: 0; min-height: 34px; border-radius: 10px; }
.journal-date { font: 600 18px/1.2 var(--font-display); letter-spacing: -.02em; padding: 0 10px; }
.day-sum { display: inline-flex; gap: 14px; font-size: 13px; color: var(--text-2); padding: 0 6px; }
.day-sum b { font-family: var(--font-display); color: var(--text); font-weight: 600; }
.cal { display: grid; overflow: auto; max-height: calc(100vh - 210px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: relative; box-shadow: var(--shadow); }
.cal-head { position: sticky; top: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); z-index: 3;
  padding: 10px 12px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); min-width: 170px; display: flex; gap: 10px; align-items: center; }
.cal-head b { display: block; font-size: 14px; }
.cal-head small { display: block; color: var(--muted); font-size: 12px; }
.cal-head > div { min-width: 0; }
.cal-head b, .cal-head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-corner { position: sticky; top: 0; left: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--border); }
.cal-times { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--border); }
.cal-times span { position: absolute; right: 8px; font-size: 11px; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.cal-times span:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--border); background: var(--offhours); cursor: copy; min-width: 170px; }
.cal-work { position: absolute; left: 0; right: 0; background: var(--surface); pointer-events: none; }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); pointer-events: none; }
.cal-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--rose); z-index: 2; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.bk { position: absolute; left: 5px; right: 5px; border-radius: 12px; padding: 5px 9px 5px 11px; font-size: 12px; line-height: 1.35; overflow: hidden; cursor: pointer; z-index: 1;
  background: var(--b); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); box-shadow: 0 0 0 2px var(--surface);
  transition: transform .15s var(--ease), box-shadow .15s; }
.bk::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.bk:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--surface), var(--shadow); z-index: 2; }
.bk b { display: block; font-size: 12px; font-weight: 600; }
.bk .bk-time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.bk.st-cancelled { opacity: .55; }
.bk.st-cancelled b { text-decoration: line-through; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 13px; color: var(--text-2); }

.slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.slots button { min-height: 36px; padding: 4px 12px; font-variant-numeric: tabular-nums; border-radius: 10px; }
.slots button.sel { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- cards grid (services / masters) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.tile-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.tile-head h3 { margin: 0; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0; }
.week span { text-align: center; font-size: 11px; padding: 6px 0; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.week span.on { background: var(--grad-soft); color: var(--text); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.price-tag { font: 600 18px/1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.svc-tile { display: flex; flex-direction: column; gap: 14px; }
.svc-head { display: flex; align-items: center; gap: 12px; }
.svc-head .ico.i3d { --s: 44px; }
.svc-name { flex: 1; min-width: 0; }
.svc-name h3 { margin: 0 0 2px; font-size: 15px; line-height: 1.25; }
.svc-name h3 { overflow-wrap: anywhere; hyphens: auto; }
.svc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.svc-masters { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-master { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 99px; padding: 3px 10px 3px 3px; }
.svc-master .avatar { width: 24px; height: 24px; font-size: 11px; }

/* ---------- segmented control, waitlist ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; min-height: 34px; border-radius: 10px; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.wl-link { width: 100%; margin-top: 4px; }
.wl-link button { padding-left: 0; color: var(--rose); font-weight: 500; white-space: normal; text-align: left; }
.wl-form { width: 100%; margin-top: 10px; padding: 16px; border-radius: 16px; background: var(--surface-2); }
.wl-btn { background: var(--peach-soft); border-color: color-mix(in srgb, var(--peach) 50%, var(--border)); }
.wl-btn b { font-family: var(--font-display); }

/* ---------- discounts ---------- */
.hot-card { position: relative; overflow: hidden; background: var(--ink, #120d18); color: #f6f1f7; border: 0; }
.hot-card::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgb(240 69 122 / 55%), transparent 70%); filter: blur(30px); pointer-events: none; }
.hot-card > * { position: relative; }
.hot-card .muted { color: #b9adc2; }
.hot-card > .ico { position: absolute; right: 22px; top: 22px; }
.hot-card select { background: rgb(255 255 255 / 8%); color: #f6f1f7; border-color: rgb(255 255 255 / 18%); }
.hot-card select option { color: #1b1320; }
.hot-card label { color: #d6cbdc; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; margin: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; min-height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--rose); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }
.promo-code { font: 600 15px/1 var(--font-display); letter-spacing: .02em; padding: 6px 10px; border-radius: 10px; background: var(--grad-soft); border: 1px dashed var(--border-strong); display: inline-block; }
.tpl-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tpl-row button { font-size: 13px; min-height: 34px; border-style: dashed; }
.price-old { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-right: 6px; }
.badge-hot { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(120deg, #ff8a5c, #f0457a); padding: 2px 7px; border-radius: 99px; }
.slots button.hot { border-color: color-mix(in srgb, var(--rose) 45%, var(--border)); background: var(--rose-soft); position: relative; }
.slots button.hot::after { content: "🔥"; position: absolute; top: -9px; right: -6px; font-size: 13px; }
.slots button.hot.sel { background: var(--grad); }
.promo-box { display: flex; gap: 8px; }
.promo-box input { text-transform: uppercase; }
.promo-ok { color: var(--st-done); font-size: 14px; font-weight: 500; margin: -4px 0 10px; }
.hot-banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; margin: 0 4px 14px;
  background: linear-gradient(120deg, #fff0e8, #fde7ee); border: 1px solid #f9cbd8; font-size: 14px; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hot-banner { background: var(--grad-soft); border-color: var(--border); } }
:root[data-theme="dark"] .hot-banner { background: var(--grad-soft); border-color: var(--border); }

/* ---------- stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.kpi .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi .value { font: 600 28px/1.1 var(--font-display); letter-spacing: -.03em; margin: 8px 0 4px; }
.kpi .hint { font-size: 12px; color: var(--muted); }
.kpi.kpi-hero { grid-row: span 2; background: var(--grad-soft); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.kpi.kpi-hero .value { font-size: 64px; margin-top: auto; }
.kpi.kpi-hero > .ico { position: absolute; right: 18px; top: 18px; }
.meter-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 56px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.meter-row:last-of-type { border-bottom: 0; }
.meter-row .who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.meter { height: 12px; background: var(--meter-track); border-radius: 4px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--meter); border-radius: 0 4px 4px 0; transition: width .8s var(--ease); }
.meter-row .num { text-align: right; font: 600 15px/1 var(--font-display); }
.stats-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; } }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgb(18 13 24 / 45%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 12px; z-index: 50; overflow-y: auto; animation: fade .2s var(--ease); }
.modal { background: var(--surface); border-radius: 24px; width: 100%; max-width: 540px; padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .25s var(--ease); }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; flex: 1; font-size: 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.modal details { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.modal summary { cursor: pointer; font-weight: 500; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; z-index: 60;
  max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg); animation: rise .3s var(--ease); font-weight: 500; }
@media (max-width: 900px) { .toast { bottom: 90px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ==========================================================================
   Public booking (client-facing) & manage page
   ========================================================================== */
.book-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.book-bg::before, .book-bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.book-bg::before { width: 420px; height: 420px; background: #ffc2a6; top: -140px; left: -120px; }
.book-bg::after { width: 460px; height: 460px; background: #cdbdff; top: -120px; right: -160px; }
.book { max-width: 580px; margin: 0 auto; padding: 16px 16px 120px; }
.book-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 20px 4px 18px; }
.book-head h1 { font-size: clamp(24px, 6vw, 32px); margin-bottom: 6px; }
@media (max-width: 560px) { .book-head > .ico.i3d { --s: 52px; align-self: start; } }

.book-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 4px 16px; }
.progress i { height: 4px; border-radius: 4px; background: var(--border); }
.progress i.on { background: var(--grad); }
.step { margin-bottom: 14px; }
.step h3 { display: flex; gap: 10px; align-items: center; font-size: 15px; margin-bottom: 14px; }
.step h3 .n { width: 26px; height: 26px; border-radius: 9px; background: var(--grad); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.choice { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 8px; padding: 14px 16px; white-space: normal; border-radius: 16px; min-height: 60px; }
.choice b { white-space: nowrap; font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
.choice .who { display: flex; gap: 12px; align-items: center; }
.choice.sel { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 2px solid transparent; padding: 13px 15px; box-shadow: 0 10px 24px -14px rgb(240 69 122 / 60%); }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; scroll-snap-type: x mandatory; }
.days button { flex-direction: column; gap: 0; min-width: 58px; padding: 8px 8px; line-height: 1.2; border-radius: 14px; scroll-snap-align: start; }
.days button b { font: 600 18px/1.2 var(--font-display); }
.days button small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.days button.sel { background: var(--grad); color: #fff; border-color: transparent; }
.days button.sel small { color: rgb(255 255 255 / 85%); }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); z-index: 10; }
.sticky-cta > div { max-width: 548px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.sticky-cta .sum { flex: 1; font-size: 13px; color: var(--text-2); line-height: 1.3; }
.sticky-cta .sum b { color: var(--text); font-size: 14px; display: block; }
.done-box { text-align: center; padding: 30px 22px; }
.done-box > .ico { margin: 4px auto 18px; }
.ticket { margin: 18px 0; border-radius: 18px; background: var(--grad-soft); padding: 18px; text-align: left; display: grid; gap: 10px; }
.ticket div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ticket div span:first-child { color: var(--text-2); }
.confirm-box { margin: 14px 0; padding: 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2); }
.confirm-box p { margin: 8px 0; }
.ticket div span:last-child { font-weight: 600; text-align: right; }
.powered { text-align: center; font-size: 12px; color: var(--muted); margin-top: 24px; }
.powered a { color: inherit; }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   Lead-magnet guide (/guide)
   ========================================================================== */
.guide { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; }
.guide-head { text-align: center; padding: 10px 0 24px; }
.guide-head .brand { margin-bottom: 18px; }
.guide-head > .ico { display: grid; margin: 0 auto 8px; }
.guide-head h1 { font-size: clamp(34px, 7vw, 56px); margin: 14px 0 10px; letter-spacing: -.04em; }
.guide-lead { font-size: 18px; color: var(--text-2); max-width: 560px; margin: 0 auto; }
.guide-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 28px; margin-bottom: 14px; box-shadow: var(--shadow-sm); break-inside: avoid; }
.guide-card h2 { font-size: 20px; }
.guide-card p { color: var(--text-2); }
.guide-card p:last-child { margin-bottom: 0; }
.guide-n { position: absolute; top: 22px; right: 24px; font: 700 40px/1 var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .9; }
.guide-card:has(.guide-n) h2 { padding-right: 56px; }
.guide-note, .guide-tpl { padding: 14px 16px; border-radius: 14px; background: var(--grad-soft); font-size: 14px; margin-top: 12px; }
.guide-tpl { border: 1px dashed var(--border-strong); background: var(--surface-2); }
.guide-cta { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: var(--grad-soft); }
@media (max-width: 560px) { .guide-cta { grid-template-columns: 1fr; } }
@media print {
  .book-bg, .guide-cta .row, .guide-head .brand { display: none; }
  body { background: #fff; }
  .guide-card { box-shadow: none; }
}

/* ---------- legal documents (/legal/…) ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 20px 16px 80px; }
.legal-head { padding: 8px 0 28px; }
.legal article { line-height: 1.6; }
.legal h1 { font-size: clamp(24px, 5vw, 34px); }
.legal h2 { font-size: 19px; margin: 30px 0 10px; }
.legal ol, .legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .edition { color: var(--muted); font-size: 14px; }
.legal mark.todo { background: #ffe08a; color: #4a3500; padding: 0 4px; border-radius: 4px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; }
.legal-nav a { color: var(--text-2); }
