/* ===== Дизайн-система: «Темный хвост» — глубокий синий + золото ===== */
:root {
  --bg0: #060a13;
  --bg1: #0c1424;
  --bg2: #131f37;
  --card: rgba(255, 255, 255, .045);
  --card-hi: rgba(255, 255, 255, .085);
  --line: rgba(217, 179, 108, .20);
  --line-hi: rgba(217, 179, 108, .60);
  --gold-1: #f6dda4;
  --gold-2: #d9b36c;
  --gold-3: #b8893b;
  --gold-grad: linear-gradient(135deg, #f6dda4 0%, #d9b36c 46%, #b8893b 100%);
  --text: #f4ecdd;
  --muted: #98a3b8;
  --danger: #f2908f;
  --ok: #8fd9a8;
  --warn: #f0c56f;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Manrope", -apple-system, "SF Pro Text", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html { background: var(--bg0); }
body {
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(120% 60% at 50% -10%, #182744 0%, rgba(24, 39, 68, 0) 60%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 70%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  overscroll-behavior-y: none;
}
input, button { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
input { -webkit-user-select: text; user-select: text; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ===== Фон: боке как на логотипе ===== */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg i {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 221, 164, var(--o)) 0%, rgba(217, 179, 108, calc(var(--o) * .45)) 45%, rgba(217, 179, 108, 0) 70%);
  filter: blur(3px);
  animation: drift var(--d) ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -38px, 0) scale(1.14); }
}
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

/* ===== Каркас ===== */
#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; }
.view { padding: calc(14px + var(--safe-t)) 18px calc(36px + var(--safe-b)); animation: enter .5s var(--ease) both; }
.view.back { animation-name: enterBack; }
.view.has-cta { padding-bottom: calc(120px + var(--safe-b)); }
@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.rise { animation: enter .6s var(--ease) both; animation-delay: calc(var(--n, 0) * 60ms); }

/* ===== Типографика ===== */
.brand { display: flex; align-items: center; gap: 10px; margin: 4px 2px 16px; }
.brand b { font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: .28em; text-transform: uppercase; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand span { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.brand .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 10px var(--gold-2); }
.display { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.04; letter-spacing: -.01em; }
.display em { font-style: normal; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.5; margin-top: 10px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.section { margin-top: 30px; }
.section > .eyebrow { display: block; margin: 0 4px 12px; }

/* ===== Шапка и прогресс ===== */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; min-height: 44px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .2s var(--ease), background .2s; }
.icon-btn:active { transform: scale(.92); background: var(--card-hi); }
.topbar .title { flex: 1; }
.steps { display: flex; gap: 6px; margin: -6px 0 22px; }
.steps i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; position: relative; }
.steps i::after { content: ""; position: absolute; inset: 0; background: var(--gold-grad); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.steps i.on::after { transform: scaleX(1); }

/* ===== Стекло-карточки ===== */
.card {
  position: relative; border-radius: var(--r-lg); padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  border: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.hero { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-hi); box-shadow: 0 24px 60px -24px rgba(217, 179, 108, .35); aspect-ratio: 1376 / 568; background: var(--bg2); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 10, 19, 0) 70%, rgba(6, 10, 19, .35) 100%); }
@keyframes slowzoom { to { transform: scale(1.12); } }

/* ===== Кнопки ===== */
.btn { position: relative; width: 100%; height: 58px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .01em; transition: transform .2s var(--ease), opacity .2s, filter .2s; overflow: hidden; }
.btn:active { transform: scale(.975); }
.btn-gold { color: #241905; background: var(--gold-grad); box-shadow: 0 14px 34px -10px rgba(217, 179, 108, .6), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn-gold::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: shimmer 3.8s ease-in-out infinite; }
@keyframes shimmer { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.btn-gold[disabled] { opacity: .4; filter: grayscale(.5); box-shadow: none; pointer-events: none; }
.btn-gold[disabled]::after { display: none; }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--text); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-danger { background: rgba(242, 144, 143, .1); border: 1px solid rgba(242, 144, 143, .4); color: var(--danger); }
.btn.sm { height: 44px; border-radius: 14px; font-size: 14px; }
.btn .i { font-size: 20px; }
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 26px 18px calc(14px + var(--safe-b)); background: linear-gradient(180deg, rgba(6, 10, 19, 0), rgba(6, 10, 19, .92) 45%); }
.cta-bar > div { max-width: 484px; margin: 0 auto; }

/* ===== Плитки ===== */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile { text-align: left; padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: 118px; transition: transform .25s var(--ease), border-color .25s; }
.tile:active { transform: scale(.97); border-color: var(--line-hi); }
.tile.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; }
.ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; color: var(--gold-1); background: radial-gradient(circle at 30% 20%, rgba(246, 221, 164, .22), rgba(217, 179, 108, .06)); border: 1px solid var(--line); flex: none; }
.tile b { display: block; font-size: 15px; font-weight: 700; }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile .grow { flex: 1; }
.tile > .i:last-child { color: var(--muted); font-size: 18px; }

/* ===== Услуги ===== */
.cat { margin-top: 22px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; font-family: var(--serif); font-size: 23px; font-weight: 600; }
.cat-head .i { color: var(--gold-2); font-size: 20px; }
.cat-note { color: var(--muted); font-size: 13px; margin: -4px 4px 12px; }
.svc { width: 100%; text-align: left; display: flex; align-items: center; gap: 14px; padding: 15px 16px; margin-bottom: 10px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s; }
.svc:active { transform: scale(.98); }
.svc.on { border-color: var(--gold-2); background: linear-gradient(180deg, rgba(217, 179, 108, .16), rgba(217, 179, 108, .05)); box-shadow: 0 0 0 1px rgba(217, 179, 108, .25), 0 16px 36px -18px rgba(217, 179, 108, .55); }
.svc .txt { flex: 1; min-width: 0; }
.svc b { display: block; font-size: 15.5px; font-weight: 700; }
.svc small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 3px; }
.price { font-family: var(--serif); font-size: 21px; font-weight: 700; white-space: nowrap; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Календарь ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; text-transform: capitalize; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav .icon-btn { width: 38px; height: 38px; font-size: 17px; }
.cal-nav .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-week span { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; padding-bottom: 8px; }
.day { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-weight: 600; font-size: 15px; position: relative; transition: transform .2s var(--ease), background .2s; }
.day.free { background: var(--card); border: 1px solid rgba(255, 255, 255, .06); }
.day.free:active { transform: scale(.9); }
.day.off { color: rgba(152, 163, 184, .28); font-weight: 500; pointer-events: none; }
.day.full { color: rgba(152, 163, 184, .4); pointer-events: none; }
.day.full::after { content: ""; position: absolute; width: 55%; height: 1.5px; background: rgba(152, 163, 184, .4); transform: rotate(-35deg); }
.day.today { box-shadow: inset 0 0 0 1px var(--gold-2); }
.day.sel { background: var(--gold-grad); color: #241905; border-color: transparent; font-weight: 800; box-shadow: 0 10px 24px -8px rgba(217, 179, 108, .7); transform: scale(1.06); animation: pop .4s var(--ease); }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.14); } 100% { transform: scale(1.06); } }
.legend { display: flex; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 4px; }

/* ===== Время / чипы ===== */
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip { height: 50px; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 15px; background: var(--card); border: 1px solid var(--line); transition: transform .2s var(--ease), background .2s, border-color .2s; }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--gold-grad); color: #241905; border-color: transparent; box-shadow: 0 10px 22px -8px rgba(217, 179, 108, .7); }
.chip.tall { height: auto; padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 130px; }
.chip.tall small { font-weight: 500; font-size: 12px; opacity: .75; }
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.empty-note { color: var(--muted); font-size: 14px; text-align: center; padding: 22px 10px; }
.skeleton { border-radius: 15px; height: 50px; background: linear-gradient(100deg, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, .10) 50%, rgba(255, 255, 255, .04) 70%); background-size: 250% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -150% 0; } }

/* ===== Поля ===== */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px; }
.field input { width: 100%; height: 56px; border-radius: 17px; padding: 0 18px; font-size: 16px; font-weight: 500; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); outline: none; transition: border-color .25s, box-shadow .25s, background .25s; }
.field input::placeholder { color: rgba(152, 163, 184, .55); }
.field input:focus { border-color: var(--gold-2); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 4px rgba(217, 179, 108, .12); }
.field.bad input { border-color: var(--danger); animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 2px 4px 0; }
.check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--line-hi); background: transparent; display: grid; place-items: center; }
.check input:checked { background: var(--gold-grad); border-color: transparent; }
.check input:checked::after { content: ""; width: 5px; height: 10px; border: solid #241905; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }

/* ===== Сводка ===== */
.summary { margin-top: 22px; }
.summary .line { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.summary .line + .line { border-top: 1px solid rgba(255, 255, 255, .06); }
.summary .ico { width: 36px; height: 36px; border-radius: 12px; font-size: 17px; }
.summary small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.summary b { font-size: 15px; font-weight: 700; }

/* ===== Записи и питомцы ===== */
.list { display: flex; flex-direction: column; gap: 12px; }
.bk .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bk h4 { font-size: 16.5px; font-weight: 700; }
.bk .meta { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; color: var(--muted); font-size: 14px; }
.bk .meta span { display: flex; align-items: center; gap: 9px; }
.bk .meta .i { color: var(--gold-2); font-size: 17px; }
.bk .meta b { color: var(--text); font-weight: 600; }
.status { font-size: 11.5px; font-weight: 700; padding: 6px 11px; border-radius: 30px; white-space: nowrap; }
.status.pending { color: var(--warn); background: rgba(240, 197, 111, .12); border: 1px solid rgba(240, 197, 111, .35); }
.status.confirmed { color: var(--ok); background: rgba(143, 217, 168, .12); border: 1px solid rgba(143, 217, 168, .35); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pet { display: flex; align-items: center; gap: 14px; }
.pet .grow { flex: 1; min-width: 0; }
.pet b { font-size: 16px; font-weight: 700; display: block; }
.pet small { color: var(--muted); font-size: 13px; }
.pet .icon-btn { width: 40px; height: 40px; font-size: 17px; }
.pet .icon-btn.gold { color: #241905; background: var(--gold-grad); border-color: transparent; }
.empty { text-align: center; padding: 44px 14px; }
.empty .ico { margin: 0 auto 18px; width: 72px; height: 72px; border-radius: 24px; font-size: 34px; }
.empty h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.empty p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 8px 0 22px; }

/* ===== Контакты ===== */
.contact-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.contact-row + .contact-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.contact-row small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.contact-row b { font-size: 15.5px; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

/* ===== Успех ===== */
.success { text-align: center; padding-top: 30px; }
.success .ring { width: 116px; height: 116px; margin: 0 auto 26px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(246, 221, 164, .3), rgba(217, 179, 108, .06)); border: 1px solid var(--line-hi); box-shadow: 0 0 60px rgba(217, 179, 108, .35); animation: ringpop .8s var(--ease) both; }
@keyframes ringpop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.success .ring svg { width: 56px; height: 56px; fill: none; stroke: var(--gold-1); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success .card { text-align: left; margin-top: 26px; }
.success .note { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 16px; }

/* ===== Шторка ===== */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(3, 6, 12, .66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .3s both; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 520px; margin: 0 auto; padding: 12px 20px calc(22px + var(--safe-b)); border-radius: 30px 30px 0 0; background: linear-gradient(180deg, #16223a, #0d1526); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, .8); animation: up .45s var(--ease) both; }
.sheet .grab { width: 44px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); margin: 0 auto 18px; }
.sheet h3 { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.sheet p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 8px 0 20px; }
.sheet .stack { margin-top: 18px; }
.closing .backdrop { animation: fadeOut .25s both; }
.closing .sheet { animation: down .25s ease-in both; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

/* ===== Тост ===== */
#toast { position: fixed; left: 50%; top: calc(16px + var(--safe-t)); z-index: 80; transform: translate(-50%, -260%); opacity: 0; visibility: hidden; pointer-events: none; max-width: calc(100% - 36px); padding: 13px 20px; border-radius: 16px; font-size: 14px; font-weight: 600; text-align: center; background: #1a2740; border: 1px solid var(--line-hi); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .7); transition: transform .5s var(--ease), opacity .3s, visibility 0s .5s; }
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
#toast.err { border-color: rgba(242, 144, 143, .6); color: #ffd6d6; }

/* ===== Заставка ===== */
.splash { min-height: 100dvh; display: grid; place-items: center; text-align: center; }
.splash .ico { width: 84px; height: 84px; border-radius: 28px; font-size: 40px; margin: 0 auto 22px; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 46px rgba(217, 179, 108, .45); } }
.splash h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.splash p { color: var(--muted); margin-top: 8px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
a.btn { text-decoration: none; }

/* ===== Страница политики ===== */
.doc { max-width: 720px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 22px calc(48px + var(--safe-b)); line-height: 1.65; font-size: 15px; }
.doc h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; margin-bottom: 10px; }
.doc h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 26px 0 6px; color: var(--gold-1); }
.doc p { color: #d8d2c4; }
.doc .muted { color: var(--muted); font-size: 13px; }

.link { color: var(--gold-1); text-decoration: underline; text-underline-offset: 3px; }
.consent { margin: 4px 4px 18px; }
.consent-ok { display: flex; align-items: center; gap: 8px; color: var(--ok); font-size: 13px; margin: 2px 4px 18px; }
.doc { -webkit-user-select: text; user-select: text; }
