/* ---------- Шрифты (локально, работают офлайн) ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-cyrillic-ext-400-normal.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-cyrillic-ext-500-normal.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-cyrillic-ext-600-normal.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-cyrillic-ext-700-normal.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/unbounded-cyrillic-ext-700-normal.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/unbounded-cyrillic-700-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-weight: 700; font-display: swap; src: url(/fonts/unbounded-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Токены ---------- */
:root {
  --paper: #F5F6FA;
  --surface: #FFFFFF;
  --ink: #161C33;
  --ink-2: #454D6B;
  --muted: #6E7591;
  --line: #E1E4ED;
  --line-2: #CDD2DF;
  --brand: #3B3FD8;
  --brand-ink: #2B2EAE;
  --brand-soft: #ECEDFD;
  --sun: #F5B700;
  --ok: #10794F; --ok-soft: #E3F3EB;
  --warn: #8F5300; --warn-soft: #FFF3D6;
  --danger: #BF3127; --danger-soft: #FCEAE8;
  --accent: var(--brand);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, white);
  --accent-ink: color-mix(in srgb, var(--accent) 80%, black);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 28, 51, .06), 0 8px 24px -12px rgba(22, 28, 51, .18);
  --header-h: 60px;
  --tabbar-h: 64px;
  color-scheme: light;
}

/* ---------- три приложения: свои цвета ---------- */
:root[data-app="biz"] {
  --paper: #F4F7F5; --brand: #0B6B4F; --brand-ink: #08513C; --brand-soft: #E2F1EA; --sun: #F5B700;
}
:root[data-app="admin"] {
  --paper: #F6F5F1; --brand: #2A2D37; --brand-ink: #17191F; --brand-soft: #ECEAE2; --sun: #C9A227; --line: #E3E1D9; --line-2: #CFCCC1;
}
.app-badge { font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 6px; margin-left: 8px; background: var(--brand-soft); color: var(--brand-ink); align-self: center; }
:root[data-app="admin"] .app-badge { background: var(--brand); color: #F0E2B4; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Типографика ---------- */
.h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 6vw, 44px); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 12px; }
.h2 { font-size: 22px; font-weight: 700; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.01em; }
.h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 36em; margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
p { margin: 0 0 12px; }

/* ---------- Каркас ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: .02em; display: flex; align-items: baseline; }
.wordmark i { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); margin-left: 3px; display: inline-block; }
.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.topnav a:hover { background: var(--paper); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.spacer { flex: 1; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
#view { min-height: calc(100dvh - var(--header-h)); }
.page { max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; }
.page.narrow { max-width: 640px; }
.page.mid { max-width: 880px; }

.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 28px 16px 8px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot-col { display: grid; gap: 8px; align-content: start; }
.foot-col a:not(.wordmark) { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.foot-col a:not(.wordmark):hover { color: var(--ink); text-decoration: underline; }
.foot-h { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.foot-copy { max-width: 1180px; margin: 0 auto; padding: 8px 16px 24px; }
@media (max-width: 760px) {
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-in .foot-col:first-child { grid-column: 1 / -1; }
  .foot { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}
@media print { .foot { display: none !important; } }
.tabbar { display: none; }
@media (max-width: 760px) {
  .topnav { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--brand); }
  .tabbar .ic { width: 24px; height: 24px; }
}

/* ---------- Кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
  background: var(--surface); color: var(--ink); border-color: var(--line-2); white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--paper); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 17px; border-radius: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.danger).busy::after { border-color: var(--ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--paper); color: var(--ink); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field small, .hint { font-size: 13px; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .field select, .field textarea, .select {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
  font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 90px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.row.gap { gap: 10px; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.nowrap { flex-wrap: nowrap; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 20px; } .mb { margin-bottom: 20px; }

/* ---------- Карточки ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--paper); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); margin-bottom: 16px; font-weight: 500; }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--brand-soft); color: var(--brand-ink); }
.notice .btn { margin-left: auto; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); }
.empty p { max-width: 30em; margin: 0 auto 14px; }

/* ---------- Главная ---------- */
.hero { padding: 20px 0 8px; }
.hero .h1 { max-width: 12em; }
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.searchbox { flex: 1 1 320px; position: relative; }
.searchbox .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox input { padding-left: 44px !important; min-height: 52px !important; border-radius: 14px !important; font-size: 17px !important; }
.searchbar .select { flex: 0 1 200px; min-height: 52px; border-radius: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line-2); background: var(--surface); padding: 8px 16px; border-radius: 999px; font-weight: 500; font-size: 15px;
  cursor: pointer; color: var(--ink-2); white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 10px; }
.vcard { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s, transform .15s; }
.vcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.vcover { aspect-ratio: 2 / 1; background: var(--accent); position: relative; overflow: hidden; }
.vcover img { width: 100%; height: 100%; object-fit: cover; }
.vcover .ph {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  font-family: var(--display); font-size: 48px; letter-spacing: .04em;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px),
    var(--accent);
}
.vlogo { position: absolute; left: 14px; bottom: -22px; width: 52px; height: 52px; border-radius: 14px; background: var(--surface); border: 3px solid var(--surface); box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; font-weight: 700; color: var(--accent); }
.vlogo img { width: 100%; height: 100%; object-fit: cover; }
.vbody { padding: 30px 16px 16px; }
.vbody .h3 { margin-bottom: 4px; }
.vmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.vmeta span { display: inline-flex; align-items: center; gap: 5px; }
.vmeta .ic { width: 16px; height: 16px; }
.vcard.has-logo .vcover { overflow: visible; }
.vcard .vcover { overflow: visible; }
.vcard .vcover > img, .vcard .vcover > .ph { border-radius: 0; }
.vcard .vcover::after { content: ''; position: absolute; inset: 0; pointer-events: none; }

/* стили карточек заведения */
.style-classic { --r-lg: 6px; --r-md: 6px; }
.style-soft { --r-lg: 24px; --r-md: 18px; }
.style-strict { --r-lg: 2px; --r-md: 2px; }
.style-strict .slot, .style-strict .btn { border-radius: 2px; }
.style-classic .vbody .h3, .style-classic .vhead h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; letter-spacing: 0; }

.ad { display: block; position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); margin: 16px 0; background: var(--surface); }
.ad img { width: 100%; max-height: 180px; object-fit: cover; }
.ad-label { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }

/* ---------- Страница заведения ---------- */
.vhero { position: relative; background: var(--accent); }
.vhero .cover { height: clamp(180px, 34vw, 340px); overflow: hidden; position: relative; }
.vhero .cover img { width: 100%; height: 100%; object-fit: cover; }
.vhero .cover .ph { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 18px, transparent 18px 36px), var(--accent); }
.vhero .back { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.95); }
.vhead { max-width: 1180px; margin: 0 auto; padding: 0 16px; position: relative; display: flex; gap: 16px; align-items: flex-end; margin-top: -44px; }
.vhead .vlogo { position: static; width: 88px; height: 88px; border-radius: 22px; border-width: 4px; font-size: 28px; flex: none; }
.vhead h1 { font-family: var(--display); font-size: clamp(24px, 4.6vw, 36px); line-height: 1.1; margin: 0 0 4px; }
.vtitle { padding-bottom: 2px; min-width: 0; margin-top: 50px; }
.vlayout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .vlayout { grid-template-columns: minmax(0, 1fr); } }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { border: 0; background: none; padding: 12px 4px; margin-right: 18px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; font-size: 16px; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.bookbox { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
@media (max-width: 960px) { .bookbox { position: static; box-shadow: none; order: -1; } }
.bookbox h2 { margin: 0 0 14px; }
.daypick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 14px; }
.daypick::-webkit-scrollbar { display: none; }
.day { flex: none; width: 58px; padding: 8px 0; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); text-align: center; cursor: pointer; line-height: 1.2; }
.day b { display: block; font-size: 19px; font-weight: 700; }
.day small { font-size: 12px; color: var(--muted); }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.day[aria-pressed="true"] small { color: rgba(255,255,255,.85); }
.day.closed { opacity: .45; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--paper); }
.stepper output { min-width: 36px; text-align: center; font-weight: 700; font-size: 17px; }
.bk-controls { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; margin-bottom: 16px; }
.bk-controls > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }

.res { padding: 14px 0; border-top: 1px solid var(--line); }
.res:first-child { border-top: 0; padding-top: 4px; }
.res-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.res-head b { font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; }
.slot { border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 8px 0; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; font-size: 15px; }
.slot:hover { border-color: var(--accent); color: var(--accent-ink); }
.slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.slots-more { margin-top: 6px; }

.menu-cats { position: sticky; top: var(--header-h); background: var(--paper); z-index: 5; padding: 8px 0; }
.menu-sec { margin-bottom: 26px; scroll-margin-top: calc(var(--header-h) + 60px); }
.menu-sec h3 { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.dish { display: grid; grid-template-columns: 1fr 96px; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dish:last-child { border-bottom: 0; }
.dish.nophoto { grid-template-columns: 1fr; }
.dish img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-md); background: var(--paper); }
.dish .name { font-weight: 600; }
.dish .desc { font-size: 14px; color: var(--muted); margin: 2px 0 6px; }
.dish .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
.tag.spicy { background: #FDECE6; color: #B23A0E; }
.tag.vegan { background: var(--ok-soft); color: var(--ok); }
.info-list { display: grid; gap: 10px; }
.info-list > div { display: flex; gap: 10px; align-items: flex-start; }
.info-list .ic { color: var(--muted); margin-top: 2px; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours-table td { padding: 4px 0; }
.hours-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours-table tr.today td { font-weight: 700; }
#vmap, .mapbox { height: 260px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.map-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Билет-подтверждение ---------- */
.ticket {
  position: relative; background: var(--surface); border-radius: 18px; border: 1px solid var(--line);
  max-width: 420px; margin: 8px auto 20px; overflow: hidden;
}
.ticket-top { padding: 22px 22px 18px; background: var(--accent); color: #fff; }
.ticket-top .h3 { color: #fff; }
.ticket-mid { padding: 18px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; }
.ticket-mid dt { font-size: 13px; color: var(--muted); }
.ticket-mid dd { margin: 0; font-weight: 600; }
.ticket-cut { border-top: 2px dashed var(--line-2); margin: 0 22px; position: relative; }
.ticket-cut::before, .ticket-cut::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--notch-bg, var(--paper)); border: 1px solid var(--line); }
.ticket-cut::before { left: -35px; } .ticket-cut::after { right: -35px; }
.bookbox .ticket { --notch-bg: var(--surface); }
.ticket-code { padding: 18px 22px 22px; text-align: center; }
.ticket-code b { display: block; font-family: var(--display); font-size: 34px; letter-spacing: .12em; color: var(--ink); }
.ticket-code small { color: var(--muted); }
.success-anim { animation: ticketIn .5s cubic-bezier(.2,.9,.3,1.2); }
@keyframes ticketIn { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Мои брони ---------- */
.blist { display: grid; gap: 12px; }
.bitem { display: grid; grid-template-columns: 64px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.bdate { border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); text-align: center; padding: 8px 0; line-height: 1.15; align-self: start; }
.bdate b { display: block; font-size: 22px; font-family: var(--display); }
.bdate small { font-size: 12px; font-weight: 600; }
.bitem.past { opacity: .7; }

/* ---------- Бизнес ---------- */
.biz-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .biz-hero { grid-template-columns: minmax(0, 1fr); } }
.feat { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.feat li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.feat .ic { color: var(--ok); margin-top: 3px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--surface); }
.plan b { font-size: 16px; }
.plan .price { font-size: 26px; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.authbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.seg button { border: 0; background: none; padding: 10px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- Кабинеты ---------- */
.dash { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 20px 16px 60px; }
.side { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
.side-venue { display: flex; gap: 10px; align-items: center; padding: 6px 8px 16px; }
.side-venue .vlogo { position: static; width: 40px; height: 40px; border-radius: 10px; border-width: 0; box-shadow: none; background: var(--accent); color: #fff; font-size: 14px; }
.side-venue b { display: block; line-height: 1.2; font-size: 15px; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.side nav a:hover { background: var(--surface); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
@media (max-width: 900px) {
  .dash { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 8px; }
  .side { min-width: 0; }
  .side { position: sticky; top: var(--header-h); z-index: 20; background: var(--paper); margin: 0 -16px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
  .side-venue { display: none; }
  .side nav { display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .side nav a { white-space: nowrap; padding: 8px 12px; }
  .side nav a[aria-current="page"] { box-shadow: inset 0 -2.5px 0 var(--accent); border-radius: 10px 10px 0 0; }
  .side hr { display: none; }
}
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head .h2 { margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.kpi span { font-size: 14px; color: var(--muted); }
.kpi b { display: block; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.1; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; opacity: .85; }
.bars div:hover { opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FAFBFD; white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }

.blist-admin { display: grid; gap: 10px; }
.brow { display: grid; grid-template-columns: 70px minmax(0,1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.brow.pending { border-color: var(--sun); box-shadow: inset 4px 0 0 var(--sun); }
.brow .time { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.brow .time small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.brow .who b { font-weight: 600; }
.brow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .brow { grid-template-columns: 60px 1fr; } .brow .acts { grid-column: 1 / -1; justify-content: flex-start; } }

.list-rows { display: grid; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.lrow .grow { flex: 1; min-width: 0; }
.lrow .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--paper); flex: none; display: grid; place-items: center; color: var(--muted); }
.lrow.off { opacity: .6; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; position: relative; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.stylepick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stylepick label { border: 1.5px solid var(--line-2); border-radius: 12px; padding: 12px; cursor: pointer; text-align: center; font-weight: 600; }
.stylepick input { position: absolute; opacity: 0; }
.stylepick label:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.stylepick i { display: block; height: 34px; margin-bottom: 8px; background: var(--accent-soft); border: 1.5px solid var(--accent); }
.upload { display: flex; gap: 14px; align-items: center; }
.upload .prev { width: 88px; height: 88px; border-radius: 14px; background: var(--paper) center / cover no-repeat; border: 1px solid var(--line); flex: none; display: grid; place-items: center; color: var(--muted); }
.upload .prev.wide { width: 160px; height: 90px; }
.upload input[type=file] { display: none; }
.daysgrid { display: grid; gap: 8px; }
.dayrow { display: grid; grid-template-columns: 56px 1fr 1fr auto; gap: 10px; align-items: center; }
.dayrow input[type=time] { min-height: 42px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); width: 100%; }
.dayrow.off input[type=time] { opacity: .35; }

/* ---------- Модалки, тосты ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(22, 28, 51, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: var(--r-lg); box-shadow: 0 24px 60px -20px rgba(22,28,51,.4); animation: pop .2s; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 6px 20px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 10px 20px 20px; }
@media (max-width: 560px) {
  .modal-wrap { place-items: end stretch; padding: 0; }
  .modal { width: 100%; border-radius: 22px 22px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); animation: up .25s; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
@keyframes up { from { transform: translateY(40px); } }
#toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 20px); display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 500; box-shadow: var(--shadow); animation: up .2s; transition: opacity .3s; }
.toast-err { background: var(--danger); }
.toast.out { opacity: 0; }

.skeleton { background: linear-gradient(90deg, #ECEEF4 0, #F5F6FA 50%, #ECEEF4 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-md); }
@keyframes sk { to { background-position: -200% 0; } }
.offline-bar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 6px 12px; font-size: 14px; font-weight: 500; }

/* ---------- Счёт (печать) ---------- */
.invoice-doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 40px; color: #000; font-size: 14px; border: 1px solid var(--line); }
.invoice-doc h1 { font-size: 20px; margin: 0 0 4px; }
.invoice-doc table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.invoice-doc th, .invoice-doc td { border: 1px solid #333; padding: 6px 8px; text-align: left; vertical-align: top; }
.invoice-doc .r { text-align: right; }
.invoice-doc .req td { border: 1px solid #333; }
.invoice-doc .total { font-size: 16px; font-weight: 700; text-align: right; }
@media print {
  .topbar, .tabbar, .no-print, #toasts { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .invoice-doc { border: 0; padding: 0; }
}

/* ---------- v2: вход, визитка, отзывы ---------- */
.code-input { font-size: 28px !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; min-height: 60px !important; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
#gbtn { display: flex; justify-content: center; min-height: 44px; }

.stars { display: inline-flex; gap: 1px; color: var(--line-2); font-size: 15px; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.stars i { font-style: normal; }
.stars i.on { color: var(--sun); }
.stars.lg { font-size: 22px; }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { font-size: 36px; line-height: 1; color: var(--line-2); cursor: pointer; transition: color .1s, transform .1s; }
.stars-input label:hover, .stars-input label:hover ~ label, .stars-input input:checked ~ label { color: var(--sun); }
.stars-input input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, white); border-radius: 6px; }
.stars-input label:active { transform: scale(.9); }
.rating { display: inline-flex; align-items: baseline; gap: 3px; font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; }
.rating small { font-weight: 500; color: var(--muted); }
.big-rating { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.upload .prev.round { border-radius: 50%; }
.guest-link { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.guest-link b { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.guest-link:hover b { text-decoration-color: var(--ink); }

/* визитка гостя — карточка с «чипом» */
.visa { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; overflow: hidden; }
.visa::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--brand), var(--brand) 70%, var(--sun) 70%); }
.visa-head { display: flex; gap: 14px; align-items: center; }
.visa-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.visa-stats div { display: grid; gap: 2px; }
.visa-stats b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.visa-stats span { font-size: 12px; color: var(--muted); line-height: 1.25; }
@media (max-width: 420px) { .visa-stats { grid-template-columns: repeat(2, 1fr); row-gap: 12px; } }

.reviews { display: grid; gap: 10px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.review.incident { border-color: #F2C4BF; box-shadow: inset 4px 0 0 var(--danger); }
.review p { white-space: pre-line; }
.reply { margin-top: 10px; padding: 10px 12px; background: var(--paper); border-radius: 10px; }
.reply p { margin: 2px 0 0; }
.modal .visa { border-radius: 16px; }

/* ---------- v2.1: отпечаток, блокировка ---------- */
.pk-btn { gap: 10px; }
.pk-btn .ic { width: 24px; height: 24px; }
.ic.fp.lg { width: 56px; height: 56px; color: var(--brand); }
.pk-offer { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.pk-offer p { margin: 0; color: var(--ink-2); }
.admin-login .pk-offer { text-align: left; }

.lock-screen { position: fixed; inset: 0; z-index: 300; background: var(--paper); display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); animation: fade .15s; }
.lock-in { width: min(340px, 100%); text-align: center; display: grid; gap: 6px; justify-items: center; }
.lock-mark { font-size: 24px; justify-content: center; }
.lock-who { color: var(--muted); margin: 0 0 18px; }
.lock-body { width: 100%; display: grid; justify-items: center; gap: 8px; }
.lock-title { font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.lock-err { min-height: 20px; color: var(--danger); font-size: 14px; margin: 0; }
.lock-foot { display: grid; gap: 6px; justify-items: center; margin-top: 18px; }
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 4px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand); }
.pin-dots i.on { background: var(--brand); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; justify-content: center; margin-top: 8px; }
.pin-pad button { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 28px; font-weight: 500; cursor: pointer; color: var(--ink); font-variant-numeric: tabular-nums; }
.pin-pad button:active { background: var(--brand-soft); }
.pattern { position: relative; width: 252px; height: 252px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); touch-action: none; user-select: none; margin-top: 6px; }
.pattern span { place-self: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 14px transparent; transition: background .1s, box-shadow .1s; position: relative; z-index: 1; pointer-events: none; }
.pattern span.on { background: var(--brand); box-shadow: 0 0 0 10px var(--brand-soft); }
.pattern-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pattern-lines polyline { fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.modal #setup { display: grid; justify-items: center; margin: 4px 0 16px; }
.modal #setup .pin-pad { grid-template-columns: repeat(3, 60px); gap: 10px 18px; }
.modal #setup .pin-pad button { width: 60px; height: 60px; font-size: 24px; }
