/* Kuanfy Mini App.
   The palette is built on Telegram theme variables, with light / dark
   fallbacks for a normal browser. Phones 320–430 px first; wider screens get
   a centered 480 px column. */

:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #10151b);
  --hint: var(--tg-theme-hint-color, #7f8a96);
  --link: var(--tg-theme-link-color, #2481cc);
  --accent: var(--tg-theme-button-color, #2481cc);
  --on-accent: var(--tg-theme-button-text-color, #ffffff);
  --surface: var(--tg-theme-secondary-bg-color, #f0f2f5);
  --section: var(--tg-theme-section-bg-color, #ffffff);
  --danger: var(--tg-theme-destructive-text-color, #e0392f);
  --ok: #1e9e58;
  --warn: #b9770e;
  --line: rgba(127, 138, 150, 0.22);
  --accent-soft: rgba(36, 129, 204, 0.12);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.14);

  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --gutter: 16px;
  --tap: 44px;

  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--tg-theme-bg-color, #17212b);
    --text: var(--tg-theme-text-color, #f2f4f6);
    --hint: var(--tg-theme-hint-color, #8696a6);
    --link: var(--tg-theme-link-color, #6ab3f3);
    --accent: var(--tg-theme-button-color, #5aa3e6);
    --surface: var(--tg-theme-secondary-bg-color, #232e3c);
    --section: var(--tg-theme-section-bg-color, #1c2733);
    --danger: var(--tg-theme-destructive-text-color, #f0625a);
    --ok: #4cc38a;
    --warn: #e0a84a;
    --accent-soft: rgba(90, 163, 230, 0.18);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  }
}
/* Inside Telegram the app theme, not the OS one, decides. */
:root[data-scheme='light'] { --ok: #1e9e58; --warn: #b9770e; --shadow: 0 6px 24px rgba(0, 0, 0, 0.14); color-scheme: light; }
:root[data-scheme='dark'] { --ok: #4cc38a; --warn: #e0a84a; --shadow: 0 6px 24px rgba(0, 0, 0, 0.45); color-scheme: dark; }

@supports (color: color-mix(in srgb, red 10%, transparent)) {
  :root {
    --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --line: color-mix(in srgb, var(--hint) 26%, transparent);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3, p, ul, dl, dd, dt, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 8px; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--safe-bottom) + 24px);
}
body.has-mainbar #app { padding-bottom: calc(var(--safe-bottom) + 96px); }

.view { animation: view-in 0.16s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page { padding: 0 var(--gutter); }
.icon { width: 22px; height: 22px; flex: none; display: block; }
.icon-sm { width: 16px; height: 16px; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--hint); }
.link { color: var(--link); font-size: 15px; padding: 10px 0 10px 12px; }
.is-open { color: var(--ok); }
.is-closed { color: var(--danger); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hscroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter);
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  transition: opacity 0.15s, transform 0.1s, background-color 0.15s;
}
.btn:active:not(:disabled) { transform: scale(0.985); opacity: 0.85; }
.btn:disabled { opacity: 0.45; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-tinted { background: var(--accent-soft); color: var(--link); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-text { background: none; color: var(--danger); }
.btn-add { min-height: var(--tap); padding: 8px 14px; font-weight: 500; font-size: 15px; }
.btn .spinner { display: none; }
.btn.is-loading { opacity: 0.8; }
.btn.is-loading .spinner { display: block; }
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative;
  width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  flex: none;
}
.icon-btn:active { background: var(--surface); }

/* Sticky primary action for the browser (Telegram draws its own MainButton). */
.mainbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px var(--gutter) calc(var(--safe-bottom) + 12px);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.mainbar .btn { display: flex; max-width: 448px; margin: 0 auto; min-height: 52px; font-size: 15.5px; }

/* ---------- sheets, toast ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.2s; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 8px var(--gutter) calc(var(--safe-bottom) + 16px);
  transform: translateY(100%);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow);
}
.sheet-wrap.is-open .sheet { transform: none; }
.sheet-wrap.is-open .sheet-backdrop { opacity: 1; }
.sheet-grabber { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; flex: none; }
.sheet-title { font-size: 19px; line-height: 1.25; font-weight: 700; margin: 4px 0 14px; flex: none; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-text { color: var(--hint); font-size: 15px; }
.sheet-status { color: var(--danger); font-size: 14px; min-height: 20px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; position: sticky; bottom: 0; background: var(--bg); padding-top: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 104px);
  z-index: 60;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: rgba(28, 32, 38, 0.94);
  color: #fff;
  font-size: 14.5px;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.demo-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--link);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- shared blocks ---------- */
.nav { display: flex; align-items: center; gap: 4px; min-height: 56px; margin: 0 -8px 4px; padding: 0 8px; }
.nav-back { margin-left: -6px; }
.in-tg .nav-back { display: none; }
.nav-titles { flex: 1 1 auto; min-width: 0; }
.nav-title { font-size: 20px; line-height: 1.2; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub { color: var(--hint); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ph { position: relative; overflow: hidden; background: var(--surface); color: var(--hint); display: flex; align-items: center; justify-content: center; }
.ph-icon { width: 28px; height: 28px; opacity: 0.45; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s; }
.ph.is-loaded img { opacity: 1; }

.pill { display: inline-flex; align-items: center; align-self: flex-start; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.pill-ok { color: var(--ok); background: rgba(30, 158, 88, 0.14); }
.pill-warn { color: var(--warn); background: rgba(217, 149, 30, 0.16); }
.pill-bad { color: var(--danger); background: rgba(224, 57, 47, 0.13); }
.pill-muted { color: var(--hint); background: var(--surface); }

.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 16px; }
.state-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); color: var(--hint); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.state-title { font-size: 17px; font-weight: 600; }
.state-text { color: var(--hint); font-size: 15px; max-width: 320px; }
.state .btn { margin-top: 10px; min-height: var(--tap); }

.sk { background: var(--surface); border-radius: var(--r-sm); animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.sk-line { height: 14px; margin: 6px 0; }
.sk-title { height: 26px; width: 70%; margin: 4px 0 8px; }
.sk-block { height: 72px; margin: 14px 0; border-radius: var(--r-md); }
.sk-row { height: 48px; width: 100%; border-radius: var(--r-md); }
.w40 { width: 40%; } .w60 { width: 60%; } .w80 { width: 80%; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title { display: block; font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.section-aside { color: var(--hint); font-size: 14px; }
.block { margin-top: 24px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.chip.is-selected { background: var(--accent); color: var(--on-accent); }
.chip-round { min-width: var(--tap); min-height: var(--tap); justify-content: center; padding: 8px; font-variant-numeric: tabular-nums; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-inline { display: flex; gap: 8px; }
.tag { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13.5px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); font-size: 14.5px; margin-top: 14px; }
.notice .icon { color: var(--hint); margin-top: 1px; }
.notice-bad { background: rgba(224, 57, 47, 0.1); }
.notice-bad .icon { color: var(--danger); }

.rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; flex: none; }
.rating .icon { width: 15px; height: 15px; color: #f5a623; }

/* ---------- catalog ---------- */
.topbar { display: flex; align-items: center; gap: 6px; min-height: 56px; margin-right: -8px; }
.city-btn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-size: 20px; font-weight: 700; min-width: 0; }
.city-btn .icon:first-child { color: var(--link); }
.city-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.searchrow { position: sticky; top: var(--safe-top); z-index: 10; display: flex; align-items: center; gap: 4px; margin: 0 calc(var(--gutter) * -1); padding: 6px 8px 8px var(--gutter); background: var(--bg); }
.search { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border-radius: var(--r-md); background: var(--surface); color: var(--hint); cursor: text; }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--link); }
.search-input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; }
.search-input::placeholder { color: var(--hint); }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.filter-btn.is-active { color: var(--link); }
.badge-dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

.chips-row { padding-top: 4px; padding-bottom: 4px; }
.chip-emoji { font-size: 16px; }

.upcoming { margin-top: 16px; }
.upcoming .section-title { margin-bottom: 4px; }
.ucard { display: flex; gap: 12px; width: min(300px, 82vw); padding: 10px; border-radius: var(--r-lg); background: var(--surface); }
.ucard-photo { width: 64px; height: 64px; border-radius: var(--r-sm); flex: none; background: var(--bg); }
.ucard-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ucard-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucard-when { color: var(--hint); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list-count { color: var(--hint); font-size: 13.5px; min-height: 19px; margin: 14px 0 8px; }
.vlist, .vlist-tail { display: flex; flex-direction: column; gap: 22px; }
.vlist-tail { margin-top: 22px; }
.vlist-tail:empty { margin-top: 0; }
.sentinel { height: 1px; }
.vcard { position: relative; display: block; }
.vcard-link { display: block; }
.vcard-link:active .vcard-photo { opacity: 0.9; }
.vcard-photo { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
.vcard-body { padding: 10px 2px 0; }
.vcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.vcard-name { font-size: 17px; line-height: 1.25; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard-meta { color: var(--hint); font-size: 14.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The quick-booking chip sits on the photo's corner: the overlay box has the
   photo's exact size, so the chip never shifts the card layout. */
.vcard-slot { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 16 / 9; display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px; pointer-events: none; }
.slot-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 10px 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.1s;
}
.slot-chip:active { transform: scale(0.96); }
.slot-chip-label { opacity: 0.9; }
.slot-chip-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.slot-chip .icon { width: 16px; height: 16px; }

.options { display: flex; flex-direction: column; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 4px; border-bottom: 1px solid var(--line); font-size: 16.5px; text-align: left; width: 100%; }
.option:last-child { border-bottom: 0; }
.option.is-selected { color: var(--link); font-weight: 600; }

.filters { display: flex; flex-direction: column; gap: 20px; }
.fgroup-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); position: relative; cursor: pointer; }
.switch-label { font-size: 15px; font-weight: 600; }
.switch-input { position: absolute; opacity: 0; width: 52px; height: 32px; right: 0; margin: 0; }
.switch { width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex: none; transition: background-color 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch-input:checked + .switch { background: var(--accent); }
.switch-input:checked + .switch::after { transform: translateX(20px); }
.switch-input:focus-visible + .switch { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---------- venue ---------- */
.venue { padding: 0; }
.fab-back { position: absolute; z-index: 5; top: calc(var(--safe-top) + 10px); left: 10px; background: var(--bg); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
#app { position: relative; }
.gallery { position: relative; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 100%; aspect-ratio: 4 / 3; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery-sk { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; }
.gallery-counter { position: absolute; right: 12px; bottom: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.venue-body { padding: 16px var(--gutter) 0; }
.venue-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.venue-name { font-size: 24px; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.venue-meta { color: var(--hint); font-size: 15px; margin-top: 4px; }
.venue-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 14.5px; }
.venue-rating { display: inline-flex; align-items: center; gap: 6px; }
.tags { margin-top: 12px; }
.quick-slot { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 16px; padding: 0 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--link); }
.quick-slot-text { flex: 1 1 auto; font-size: 15px; }
.quick-slot-time { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; margin-top: 16px; }
.action { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; padding: 8px 4px; border-radius: var(--r-md); background: var(--surface); color: var(--link); font-size: 12.5px; font-weight: 500; }
.action span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action:active { opacity: 0.7; }
.rows { margin-top: 16px; border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; text-align: left; }
.rows > * + * { border-top: 1px solid var(--line); }
.row-btn:active { opacity: 0.7; }
.row-icon { color: var(--hint); }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-size: 15.5px; overflow-wrap: anywhere; }
.row-sub { color: var(--hint); font-size: 13.5px; }
.row-sub.is-closed { color: var(--danger); }
.row-chev { color: var(--hint); transition: transform 0.15s; }
.row-btn.is-expanded .row-chev { transform: rotate(180deg); }
.hours-list { padding: 2px 14px 10px 48px; }
.hours-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14.5px; color: var(--hint); font-variant-numeric: tabular-nums; }
.hours-row.is-today { color: var(--text); font-weight: 600; }
.prose { font-size: 15.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.reviews { display: flex; flex-direction: column; gap: 10px; }
.review { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); }
.review-head { display: flex; align-items: center; gap: 8px; }
.review-author { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-date { margin-left: auto; font-size: 13px; flex: none; }
.review-text { margin-top: 6px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.stars { display: inline-flex; gap: 1px; flex: none; }
.stars .icon { width: 13px; height: 13px; }
.star-on { color: #f5a623; }
.star-off { color: var(--line); }

/* ---------- booking screen ---------- */
.book-body > .block:first-child, .book-body > :first-child { margin-top: 8px; }
.days { gap: 8px; }
.day { width: 54px; height: 66px; border-radius: var(--r-md); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: background-color 0.15s, color 0.15s; }
.day-wd { font-size: 12.5px; color: var(--hint); text-transform: capitalize; }
.day-num { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.day.is-selected { background: var(--accent); color: var(--on-accent); }
.day.is-selected .day-wd { color: inherit; opacity: 0.85; }
.day.is-closed { opacity: 0.38; }
.day.is-closed .day-num { text-decoration: line-through; font-weight: 500; }
.day-sk { width: 54px; height: 66px; border-radius: var(--r-md); }

.guests-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; border-radius: 999px; background: var(--surface); padding: 2px; }
.stepper-btn { width: var(--tap); height: var(--tap); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--link); }
.stepper-btn:disabled { color: var(--hint); opacity: 0.4; }
.stepper-btn:active:not(:disabled) { background: var(--bg); }
.stepper-value { min-width: 34px; text-align: center; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.slots-box { min-height: 152px; } /* three rows: no jump while a day loads */
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot { height: var(--tap); border-radius: var(--r-sm); background: var(--surface); font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color 0.15s, color 0.15s, box-shadow 0.15s; }
.slot.is-selected { background: var(--accent); color: var(--on-accent); }
.slot.is-off { opacity: 0.32; font-weight: 400; }
.slot.is-near { box-shadow: inset 0 0 0 2px var(--accent); animation: near 0.9s ease-in-out 2; }
@keyframes near { 50% { transform: scale(1.05); } }
.slot-sk { height: var(--tap); }
.slots-empty { color: var(--hint); font-size: 15px; padding: 14px 0; }
.slots-hint { color: var(--warn); font-size: 14px; margin-bottom: 10px; }

.textarea { display: block; width: 100%; min-height: 84px; padding: 12px 14px; border: 0; border-radius: var(--r-md); background: var(--surface); resize: vertical; outline: none; }
.textarea:focus { box-shadow: inset 0 0 0 2px var(--link); }
.textarea::placeholder { color: var(--hint); }
.fineprint { color: var(--hint); font-size: 13.5px; margin-top: 20px; }

.summary-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); }
.summary-caption { color: var(--hint); font-size: 13px; }
.summary-title { font-weight: 700; }
.summary-line { font-size: 15px; }

/* ---------- my bookings ---------- */
.tabs { display: flex; padding: 3px; border-radius: 12px; background: var(--surface); margin-bottom: 14px; }
.tab { flex: 1 1 0; min-height: 38px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--hint); transition: background-color 0.15s, color 0.15s; }
.tab.is-selected { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.blist { display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.bcard { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-lg); background: var(--surface); }
.bcard:active { opacity: 0.8; }
.bcard-photo { width: 72px; height: 72px; border-radius: var(--r-sm); flex: none; background: var(--bg); }
.bcard-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bcard-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-when { color: var(--hint); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-flat { background: none; padding: 0 0 14px; border-radius: 0; border-bottom: 1px solid var(--line); }
.bcard-flat .bcard-photo { width: 56px; height: 56px; background: var(--bg); }

/* ---------- booking detail / success ---------- */
.card { padding: 14px; border-radius: var(--r-lg); background: var(--surface); }
.status-block { display: flex; flex-direction: column; gap: 6px; padding: 14px 0 2px; }
.status-block .notice { margin-top: 6px; }
.status-hint { color: var(--hint); font-size: 14.5px; }
.status-inline { padding-top: 12px; }
.facts { display: flex; flex-direction: column; margin-top: 8px; }
.fact { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact-icon { color: var(--hint); }
.fact-main { min-width: 0; }
.fact-label { color: var(--hint); font-size: 13px; }
.fact-value { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.page-actions { margin-top: 16px; }

.success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 8px 22px; }
.success-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
.success-mark .icon { width: 38px; height: 38px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.success-title { font-size: 24px; line-height: 1.2; font-weight: 800; }
.success-text { color: var(--hint); font-size: 15.5px; max-width: 340px; }
.success-demo { color: var(--warn); font-size: 13.5px; max-width: 340px; }

@media (max-width: 350px) {
  :root { --gutter: 12px; }
  .city-btn { font-size: 18px; }
  .slot { font-size: 14.5px; }
  .venue-name { font-size: 22px; }
}

@media (min-width: 520px) {
  body { background: var(--surface); }
  #app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
  .mainbar { left: 50%; right: auto; width: 480px; transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
