@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #3c3c3e;
  --muted: #76767b;
  --faint: #aeaeb2;
  --line: #ececec;
  --fill: #f4f4f5;
  --fill-2: #ebebed;
  --danger: #c4352b;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--ink);
  font: 400 16px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; }
.screen { padding: 0 20px calc(92px + var(--safe-b)); }
.screen.flow { padding-bottom: calc(112px + var(--safe-b)); }

/* ---------- типографика ---------- */
.h1 { font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: -.025em; margin: 0; }
.h2 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; margin: 0; }
.sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.small { font-size: 14px; }
.xs { font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.page-top { padding-top: 28px; }
.block { margin-top: 36px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }

/* ---------- splash ---------- */
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; padding: 0 24px; }
.splash-logo { width: 132px; }
.loader { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- главная ---------- */
.brand { padding: 36px 0 0; text-align: center; }
.brand img { width: 118px; margin: 0 auto; }
.brand-meta { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.brand-meta .open { color: var(--ink); }
.cta { margin-top: 28px; }

.visit { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.visit-when { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.visit-what { margin-top: 4px; color: var(--muted); font-size: 15px; }
.visit-actions { display: flex; gap: 20px; margin-top: 14px; }
.text-btn { font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--faint); }
.text-btn.danger { color: var(--danger); text-decoration-color: rgba(196, 53, 43, .35); }

.offer { background: var(--fill); border-radius: 14px; padding: 16px 18px; font-size: 15px; line-height: 1.45; }
.offer b { font-weight: 600; }

/* ---------- списки ---------- */
.list { border-top: 1px solid var(--line); }
.item {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 16px 0; border-bottom: 1px solid var(--line); text-align: left;
  transition: opacity .15s;
}
button.item:active { opacity: .55; }
.item-title { font-size: 16px; font-weight: 500; }
.item-sub { margin-top: 2px; font-size: 14px; color: var(--muted); }
.item-end { text-align: right; white-space: nowrap; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.item-end s { display: block; color: var(--faint); font-weight: 400; font-size: 13px; }
.chev { width: 16px; height: 16px; color: var(--faint); flex: none; }
.list-note { font-size: 14px; color: var(--muted); margin-top: 12px; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:first-child { border-top: 1px solid var(--line); }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 0; }
.total .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.total s { color: var(--faint); font-size: 16px; font-weight: 400; margin-right: 8px; letter-spacing: 0; }

/* ---------- кнопки ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 52px; padding: 0 20px; border-radius: 12px; font-size: 16px; font-weight: 600;
  transition: opacity .15s, transform .1s; user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .3; pointer-events: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: var(--fill); color: var(--ink); }
.btn-danger { background: #fbeceb; color: var(--danger); }
.btn-sm { height: 40px; font-size: 15px; border-radius: 10px; width: auto; padding: 0 16px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.loading { color: transparent !important; position: relative; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-light.loading::after, .btn-danger.loading::after { border-color: var(--line); border-top-color: var(--ink); }

/* ---------- запись ---------- */
.flow-top { padding-top: 24px; padding-bottom: 8px; }
.step { font-size: 14px; color: var(--muted); }
.flow-top .h1 { margin-top: 4px; }
.flow-ctx { margin-top: 8px; font-size: 15px; color: var(--muted); }

.days { display: flex; gap: 4px; overflow-x: auto; margin: 16px -20px 0; padding: 0 20px 4px; scrollbar-width: none; scroll-padding: 0 20px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; }
.day .wd { font-size: 12px; color: var(--muted); text-transform: lowercase; }
.day .dn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background .15s; }
.day.sel .dn { background: var(--ink); color: #fff; }
.day.off { pointer-events: none; }
.day.off .dn { color: var(--faint); }
.month { font-size: 15px; font-weight: 600; margin-top: 20px; text-transform: capitalize; }

.slots-group { margin-top: 24px; }
.slots-title { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { height: 44px; border-radius: 10px; background: var(--fill); font-size: 15px; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; transition: background .12s; }
.slot.sel { background: var(--ink); color: #fff; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); font-size: 15px; }
.empty b { display: block; color: var(--ink); font-size: 17px; font-weight: 600; margin-bottom: 6px; }

.skel { background: linear-gradient(90deg, var(--fill) 0%, #fafafa 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- формы ---------- */
.field { display: block; margin-top: 16px; }
.field-label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 50px; padding: 0 14px; border: 1px solid transparent; border-radius: 12px; outline: none;
  background: var(--fill); font-size: 16px; transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { background: #fff; border-color: var(--ink); }
textarea.input { height: 88px; padding: 13px 14px; resize: none; line-height: 1.4; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2376767b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.input-with { position: relative; }
.input-with .input { padding-right: 96px; }
.input-with .inner { position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 12px; border-radius: 9px; background: #fff; font-size: 14px; font-weight: 500; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 16px; }

.switch-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--line); text-align: left; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--fill-2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .2s; }
.switch.on { background: var(--ink); }
.switch.on::after { transform: translateX(20px); }

/* ---------- нижняя панель ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line); padding: 12px 20px calc(12px + var(--safe-b)); }
.bar-inner { max-width: 480px; margin: 0 auto; }
.bar-hint { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 10px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar-inner { max-width: 520px; margin: 0 auto; display: flex; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; color: var(--faint); font-size: 11px; font-weight: 500; position: relative; }
.tab.on { color: var(--ink); }
.tab .dot { position: absolute; top: 7px; left: calc(50% + 8px); width: 7px; height: 7px; border-radius: 50%; background: var(--ink); border: 1.5px solid #fff; }

/* ---------- готово ---------- */
.done { padding-top: 56px; text-align: center; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--ink); margin: 0 auto 22px; display: grid; place-items: center; }
.done-mark svg { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .35s .1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- бонусы ---------- */
.balance { font-size: 48px; font-weight: 650; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.linkbox { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--fill); font-size: 14px; }
.linkbox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.cert { height: 64px; border-radius: 12px; border: 1px solid var(--line); font-size: 16px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.cert:active { background: var(--fill); }
.promo-text { font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.tag { display: inline-block; font-size: 13px; color: var(--muted); }

/* ---------- админка ---------- */
.adm-sum { margin-top: 20px; font-size: 15px; color: var(--muted); }
.adm-sum b { color: var(--ink); font-weight: 600; }
.adm-time { width: 52px; flex: none; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-time .e { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.item.st-done .item-title::after { content: " · пришёл"; color: var(--muted); font-weight: 400; }
.item.st-noshow { opacity: .45; }
.item.st-noshow .item-title::after { content: " · не пришёл"; font-weight: 400; }

/* ---------- шторка и уведомления ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.32); animation: fade .2s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 520px; margin: 0 auto; background: #fff;
  border-radius: 18px 18px 0 0; padding: 8px 20px calc(20px + var(--safe-b)); max-height: 88vh; overflow-y: auto;
  animation: up .26s cubic-bezier(.2,.9,.3,1); }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 18px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 22px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

#toast { position: fixed; left: 0; right: 0; bottom: calc(84px + var(--safe-b)); z-index: 60; display: flex; justify-content: center; pointer-events: none; padding: 0 20px; }
.toast { max-width: 440px; padding: 11px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; animation: drop .22s ease; }
.toast.err { background: var(--danger); }
@keyframes drop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

svg.i { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
