/* DEAL Tech — формы Mini App. Палитра из брендбука: графит, серебро, фиолетовый, синий. */
:root {
  --bg: #0b0b0f;
  --surface: rgba(22, 22, 29, 0.78);
  --surface-solid: #16161d;
  --surface-2: #1d1d26;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f6f8;
  --muted: #9a9daa;
  --faint: #6f7280;
  --silver: #c0c4cc;
  --violet: #7b61ff;
  --blue: #3b82f6;
  --grad: linear-gradient(135deg, #7b61ff 0%, #5a74ff 55%, #3b82f6 100%);
  --radius: 20px;
  --spring: cubic-bezier(.3, 1.3, .45, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.35; min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { -webkit-user-select: none; user-select: none; }
.wrap { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 18px 16px 120px; }
.in-tg .wrap { padding-bottom: 40px; }

/* ---------- живой фон: медленно плывущие пятна света ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; will-change: transform; }
.aurora span:nth-child(1) {
  width: 520px; height: 520px; top: -260px; right: -180px;
  background: radial-gradient(closest-side, rgba(123, 97, 255, .34), transparent);
  animation: drift1 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  width: 440px; height: 440px; top: -120px; left: -220px;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .22), transparent);
  animation: drift2 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(3) {
  width: 380px; height: 380px; bottom: -200px; right: -120px;
  background: radial-gradient(closest-side, rgba(123, 97, 255, .12), transparent);
  animation: drift3 30s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-90px, 70px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(110px, 40px) scale(.9); } }
@keyframes drift3 { to { transform: translate(-60px, -90px) scale(1.2); } }

/* ---------- появление ---------- */
.rise { animation: rise .6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
.enter { animation: rise .45s var(--ease) backwards; }
.pop-in { animation: popIn .42s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes popIn { from { opacity: 0; transform: translateY(6px) scale(.86); } }

.leaving {
  overflow: hidden; opacity: 0; pointer-events: none; margin-bottom: 0 !important;
  transition: height .28s var(--ease), opacity .18s, margin .28s var(--ease);
}

/* ---------- шапка ---------- */
.brandbar { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.logo-mark { width: 26px; height: 26px; flex: none; overflow: visible; }
.logo-mark .mk-main { transform-origin: 50% 50%; animation: markIn .7s var(--spring) both; }
.logo-mark .mk-wedge {
  animation: wedgeIn .7s var(--spring) .35s both, wedgeGlow 5s ease-in-out 1.6s infinite;
}
@keyframes markIn { from { opacity: 0; transform: scale(.6); } }
/* клин «подъезжает» к букве — две стороны сделки встречаются */
@keyframes wedgeIn { from { opacity: 0; transform: translate(-22px, 22px); } }
@keyframes wedgeGlow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 6px rgba(123, 97, 255, .9)); } }
.wordmark { font-size: 20px; letter-spacing: .32em; color: var(--text); white-space: nowrap; }
.wordmark b { font-weight: 800; }
.wordmark span { font-weight: 300; color: var(--silver); }
.wordmark i {
  display: inline-block; font-style: normal;
  animation: letterIn .55s var(--ease) backwards; animation-delay: calc(120ms + var(--i) * 45ms);
}
@keyframes letterIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.lead { color: var(--muted); font-size: 15px; margin: 0 0 24px; }

/* ---------- секции ---------- */
.section { margin-bottom: 22px; }
.section-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  margin: 0 0 10px 2px; font-weight: 600;
}

/* ---------- плитки брендов ---------- */
.brands { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  position: relative; z-index: 1; height: 82px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-weight: 600; font-size: 14.5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  transition: transform .25s var(--spring), opacity .3s, background .3s, border-color .3s;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.tile:active { transform: scale(.94); }
.tile-ico { display: grid; place-items: center; color: var(--silver); transition: color .3s, transform .4s var(--spring); }
.tile-ico .ico { width: 24px; height: 24px; }
.brands.picked .tile:not(.on) { opacity: .62; }
.tile.on { background: rgba(123, 97, 255, .09); border-color: transparent; opacity: 1; }
.tile.on .tile-ico { color: #b3a6ff; transform: translateY(-1px) scale(1.12); }

/* перетекающая подсветка */
.slider {
  position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none;
  transition: transform .5s var(--spring), width .5s var(--spring), height .5s var(--spring), opacity .25s;
}
.slider.shown { opacity: 1; }
.slider.instant { transition: none; }
.slider.pop { animation: sliderPop .45s var(--spring); }
@keyframes sliderPop { from { scale: .85; opacity: 0; } }
.tile-glow {
  z-index: 2; border-radius: 18px;
  box-shadow: 0 10px 34px rgba(123, 97, 255, .32), 0 0 0 1px rgba(123, 97, 255, .2);
}
.tile-glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--angle), #7b61ff, #3b82f6, #c0c4cc, #7b61ff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 4s linear infinite;
}
@keyframes spin { to { --angle: 360deg; } }

/* ---------- чипсы ---------- */
.chips { position: relative; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrapped { flex-wrap: wrap; overflow: visible; }
.chip {
  position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px 9px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--spring), background .3s, border-color .3s, color .3s, box-shadow .3s;
}
.chip:active { transform: scale(.93); }
.chip-ico { display: grid; place-items: center; color: var(--muted); transition: color .3s; }
.chip-ico .ico { width: 17px; height: 17px; }
.chip.on { color: #fff; border-color: transparent; background: transparent; }
.chip.on .chip-ico { color: #fff; }
.chip-glow { z-index: 0; border-radius: 999px; background: var(--grad); box-shadow: 0 6px 22px rgba(91, 110, 255, .4); }
/* ассортимент: множественный выбор, заливка на самой чипсе */
.brand-card .chip.on { background: var(--grad); box-shadow: 0 6px 20px rgba(91, 110, 255, .32); }
.chip.pop { animation: chipPop .45s var(--spring); }
@keyframes chipPop { 0% { transform: scale(.88); } 60% { transform: scale(1.06); } }

/* ---------- карточка с полями ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 20px 40px rgba(0, 0, 0, .25);
  transition: border-color .4s, box-shadow .4s;
}
.card.complete { border-color: rgba(123, 97, 255, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 20px 50px rgba(123, 97, 255, .14); }
.progress { display: flex; align-items: center; gap: 12px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.progress-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; min-width: 108px; display: inline-block; }
.card.complete .progress-text { color: #b3a6ff; }
.bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad);
  transition: width .6s var(--spring); box-shadow: 0 0 12px rgba(123, 97, 255, .6);
}

.field {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px;
  background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: background .2s;
}
.field:last-child { border-bottom: 0; }
.field:active { background: rgba(255, 255, 255, .035); }
.field .txt { flex: 1; min-width: 0; }
.field .lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.field .val { display: block; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field .val.empty { color: var(--faint); font-weight: 400; }
.field.fixed { cursor: default; }
.field.fixed .val { color: var(--silver); }
.field .state { position: relative; width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.field .chev { width: 18px; height: 18px; color: var(--muted); transition: opacity .2s, transform .3s var(--spring); }
.field .ok {
  position: absolute; inset: 0; border-radius: 50%; background: var(--grad); display: grid; place-items: center;
  opacity: 0; transform: scale(.3); transition: opacity .2s, transform .45s var(--spring);
  box-shadow: 0 4px 14px rgba(91, 110, 255, .45);
}
.field .ok svg { width: 14px; height: 14px; }
.field.done .chev { opacity: 0; transform: scale(.4); }
.field.done .ok { opacity: 1; transform: none; }
.field.fixed .state { display: none; }
.field.grow { animation: grow .42s var(--ease) backwards; }
@keyframes grow { from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; } to { max-height: 90px; } }
.field.flash::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(123, 97, 255, .16), transparent);
  animation: sweep .7s var(--ease) both;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.swap { animation: swapIn .38s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(55%); filter: blur(2px); } }

/* ---------- день и время визита ---------- */
.visit-wrap { margin-top: 18px; }
.card.visit { padding: 12px 0 14px; }
.days {
  position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 4px; scrollbar-width: none;
  scroll-padding: 0 14px;
}
.days::-webkit-scrollbar { display: none; }
.day {
  position: relative; z-index: 1; flex: none; min-width: 74px; padding: 9px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px; transition: transform .25s var(--spring), color .3s, background .3s;
}
.day b { font-size: 14px; font-weight: 600; }
.day span { font-size: 12px; color: var(--muted); transition: color .3s; }
.day:active { transform: scale(.94); }
.day.on { background: transparent; border-color: transparent; color: #fff; }
.day.on span { color: rgba(255, 255, 255, .8); }
.day.ghost { height: 52px; background: linear-gradient(90deg, #17171e 0%, #22222b 50%, #17171e 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.day-glow { z-index: 0; border-radius: 14px; background: var(--grad); box-shadow: 0 6px 22px rgba(91, 110, 255, .4); }
.times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 14px 0; }
.times:empty { display: none; }
.time {
  height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: transform .25s var(--spring), background .3s, box-shadow .3s, border-color .3s;
}
.time:active { transform: scale(.92); }
.time.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(91, 110, 255, .4); }
.time.pop { animation: chipPop .45s var(--spring); }
.visit-note { margin: 0; padding: 0 16px; font-size: 14px; color: var(--muted); }
.visit-note:empty { display: none; }
.card.visit.loading .times { display: none; }

/* ---------- часы работы продавца ---------- */
.card.hours { padding: 14px; }
.hours-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.presets { display: flex; gap: 2px; }
.presets .link { font-size: 13px; padding: 4px 6px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd {
  height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 0;
  transition: transform .25s var(--spring), background .3s, color .3s, box-shadow .3s;
}
.wd:active { transform: scale(.9); }
.wd.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 5px 16px rgba(91, 110, 255, .35); }
.wd.pop { animation: chipPop .45s var(--spring); }
.tboxes { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.tbox {
  flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 8px; height: 50px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer;
  transition: transform .25s var(--spring), border-color .3s;
}
.tbox:active { transform: scale(.96); border-color: rgba(123, 97, 255, .5); }
.tbox span { font-size: 13px; color: var(--muted); }
.tbox b { display: inline-block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash { width: 10px; height: 2px; border-radius: 2px; background: var(--faint); flex: none; }
.hours-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
.hours-note.warn { color: #ff8a8a; }

/* ---------- итог ---------- */
.summary {
  position: relative; margin-top: 18px; padding: 16px 16px 15px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(123, 97, 255, .10), rgba(59, 130, 246, .04) 60%), var(--surface);
  border: 1px solid var(--line); overflow: hidden;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.summary::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; opacity: 0;
  background: conic-gradient(from var(--angle), #7b61ff, #3b82f6, #c0c4cc, #7b61ff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity .5s;
  animation: spin 5s linear infinite; pointer-events: none;
}
.summary.ready::before { opacity: 1; }
.summary.celebrate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%);
  animation: sweep 1s var(--ease) both;
}
.sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sum-ico {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none;
  background: var(--grad); box-shadow: 0 6px 18px rgba(91, 110, 255, .4);
}
.sum-ico .ico { width: 19px; height: 19px; }
.summary h3 { margin: 0; flex: 1; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.badge {
  font-size: 11.5px; font-weight: 600; color: #cfc6ff; padding: 4px 9px; border-radius: 999px;
  background: rgba(123, 97, 255, .16); border: 1px solid rgba(123, 97, 255, .3);
  opacity: 0; transform: scale(.7); transition: opacity .3s, transform .45s var(--spring);
}
.summary.ready .badge { opacity: 1; transform: none; }
.summary .title { margin: 0 0 9px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  font-size: 13px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); color: #e3e5ea;
}
.summary .foot { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- кнопка вне Telegram (предпросмотр в браузере) ---------- */
.cta {
  position: fixed; z-index: 5; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 528px; margin: 0 auto; height: 54px; overflow: hidden;
  border: 0; border-radius: 16px; background: var(--grad); color: #fff; font: inherit; font-weight: 700; font-size: 16px;
  box-shadow: 0 12px 32px rgba(91, 110, 255, .4); cursor: pointer; transition: transform .2s var(--spring), box-shadow .3s;
}
.cta:active { transform: scale(.97); }
.cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-100%); animation: shine 3.2s ease-in-out 1s infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.cta:disabled { background: #22222a; color: var(--faint); box-shadow: none; }
.cta:disabled::after { display: none; }
.cta.arrive { animation: arrive .5s var(--spring); }
@keyframes arrive { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } }
.in-tg .cta { display: none; }

/* ---------- нижняя шторка ---------- */
.sheet-bg {
  position: fixed; inset: 0; z-index: 10; background: rgba(5, 5, 8, .55); opacity: 0; pointer-events: none;
  transition: opacity .3s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: -40px; z-index: 11; max-height: calc(80vh + 40px);
  display: flex; flex-direction: column; padding-bottom: 40px; max-width: 640px; margin: 0 auto;
  background: rgba(19, 19, 25, .97); border-top-left-radius: 24px; border-top-right-radius: 24px;
  border-top: 1px solid var(--line-strong); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  transform: translateY(110%); transition: transform .48s var(--spring);
}
.sheet.open { transform: none; }
.sheet:not(.open) { transition: transform .28s var(--ease); }
.sheet.dragging { transition: none; }
.sheet .grab-zone { padding: 9px 0 4px; touch-action: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #3a3a46; margin: 0 auto; }
.sheet .head { padding: 8px 20px 10px; font-weight: 700; font-size: 18px; touch-action: none; }
.sheet .search { margin: 0 16px 8px; }
.sheet .search input {
  width: 100%; height: 44px; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--surface-solid);
  color: var(--text); font: inherit; padding: 0 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.sheet .search input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(123, 97, 255, .2); }
.sheet .list { overflow-y: auto; padding: 0 8px calc(12px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.opt {
  display: flex; align-items: center; width: 100%; padding: 14px 12px; border: 0; background: none; color: var(--text);
  font: inherit; text-align: left; border-radius: 14px; cursor: pointer; gap: 10px; transition: background .2s;
  animation: optIn .36s var(--ease) backwards; animation-delay: calc(60ms + var(--i, 0) * 24ms);
}
@keyframes optIn { from { opacity: 0; transform: translateY(10px); } }
.opt:active { background: rgba(255, 255, 255, .05); }
.opt.on { background: rgba(123, 97, 255, .1); }
.opt .name { flex: 1; }
.opt .hint { font-size: 13px; color: var(--muted); margin-top: 1px; }
.opt .tick {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #3a3a46; flex: none; display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.opt.on .tick { background: var(--grad); border-color: transparent; box-shadow: 0 4px 12px rgba(91, 110, 255, .45); }
.opt.on .tick::after {
  content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.opt.picked .tick { animation: tickPop .4s var(--spring); }
@keyframes tickPop { 0% { transform: scale(.5); } 60% { transform: scale(1.2); } }

/* ---------- экран «готово» ---------- */
.done-screen {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px; text-align: center; background: rgba(11, 11, 15, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity .3s;
}
.done-screen.on { opacity: 1; }
.done-mark { width: 116px; height: 116px; margin-bottom: 14px; transform: scale(.7); transition: transform .6s var(--spring); }
.done-screen.on .done-mark { transform: none; }
.done-mark svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 22px rgba(123, 97, 255, .55)); }
.done-mark .ring {
  fill: none; stroke: url(#dg); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327;
  transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke-dashoffset .7s var(--ease) .1s;
}
.done-mark .check {
  fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 72; stroke-dashoffset: 72; transition: stroke-dashoffset .4s var(--ease) .6s;
}
.done-screen.on .ring, .done-screen.on .check { stroke-dashoffset: 0; }
.done-screen h2, .done-screen p { margin: 0; opacity: 0; transform: translateY(10px); transition: opacity .4s .35s, transform .5s var(--ease) .35s; }
.done-screen h2 { font-size: 22px; }
.done-screen p { color: var(--muted); font-size: 15px; transition-delay: .45s; }
.done-screen.on h2, .done-screen.on p { opacity: 1; transform: none; }

/* ---------- загрузка ---------- */
.skeleton { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 32px; }
.skeleton i {
  height: 82px; border-radius: 18px; background: linear-gradient(90deg, #15151b 0%, #1f1f28 50%, #15151b 100%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- ассортимент продавца ---------- */
.total {
  margin: -6px 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.total-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.total-num {
  display: inline-block; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: border-color .4s, box-shadow .4s;
}
.brand-card.active { border-color: rgba(123, 97, 255, .28); box-shadow: 0 14px 40px rgba(123, 97, 255, .08); }
.brand-card .row { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.brand-ico {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  color: var(--silver); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: color .3s, background .3s;
}
.brand-ico .ico { width: 21px; height: 21px; }
.brand-card.active .brand-ico { color: #fff; background: var(--grad); border-color: transparent; }
.brand-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.brand-meta b { font-size: 17px; }
.brand-meta .sub { font-size: 12.5px; color: var(--muted); display: inline-block; }
.ring { width: 22px; height: 22px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: rgba(255, 255, 255, .08); }
.ring .fill { stroke: #8f7bff; stroke-linecap: round; transition: stroke-dashoffset .6s var(--spring); }
.link {
  background: none; border: 0; color: #9aa9ff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 6px 4px; transition: opacity .2s;
}
.link:active { opacity: .6; }
.empty-note { color: var(--muted); text-align: center; padding: 30px 0; }


/* ---------- модели в ассортименте ---------- */
.chip-count {
  font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 1px;
  background: rgba(123, 97, 255, .22); color: #cfc6ff; font-variant-numeric: tabular-nums;
}
.chip-count:empty { display: none; }
.brand-card .chip.part { border-color: rgba(123, 97, 255, .55); background: rgba(123, 97, 255, .1); }
.brand-card .chip.part .chip-ico { color: #b3a6ff; }
.total-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.card.visit.refreshing .times, .card.visit.refreshing .days { opacity: .45; transition: opacity .2s; }

.sheet .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.head-text { display: flex; flex-direction: column; min-width: 0; }
.head-sub { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.head-sub:empty { display: none; }
.sheet .head .link { flex: none; font-size: 14px; }
.sheet-foot { display: none; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet.is-multi .sheet-foot { display: block; }
.sheet.is-multi .list { padding-bottom: 8px; }
.sheet-done {
  width: 100%; height: 50px; border: 0; border-radius: 14px; background: var(--grad); color: #fff;
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 10px 28px rgba(91, 110, 255, .35);
  transition: transform .2s var(--spring);
}
.sheet-done:active { transform: scale(.97); }
.opt.multi .tick { border-radius: 7px; }
.tick.pop { animation: tickPop .4s var(--spring); }

@media (min-width: 420px) { .tile { height: 88px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
