/* =========================================================
   BEST CLEAN — калькулятор вартості клінінгу
   ========================================================= */

:root {
  --brand: #0284c7;
  --brand-2: #0ea5e9;
  --brand-3: #06b6d4;
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-200: #bae6fd;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --ok: #10b981;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px -6px rgba(15, 23, 42, .06);
  --shadow-md: 0 14px 30px -14px rgba(2, 132, 199, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bar-h: 150px;
}

/* ---------- Базовий reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
* { -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; text-align: inherit; }
svg { display: block; flex-shrink: 0; }
img { display: block; max-width: 100%; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; line-height: 1.5; }

body {
  min-height: 100vh;
  color: var(--text);
  background: #eef3f8;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

button { cursor: pointer; font: inherit; }
button:focus-visible,
a:focus-visible,
input:focus-visible { outline: 3px solid rgba(14, 165, 233, .45); outline-offset: 2px; }

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(14, 165, 233, .16), transparent 60%),
    radial-gradient(700px 500px at 100% 40%, rgba(6, 182, 212, .12), transparent 60%),
    radial-gradient(600px 400px at 30% 100%, rgba(2, 132, 199, .08), transparent 60%),
    #eef3f8;
}

/* ---------- Оболонка ---------- */
.app-shell {
  position: relative;
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f8fafc;
  padding-bottom: calc(var(--bar-h) + 28px);
}

@media (min-width: 672px) {
  .app-shell {
    margin-top: 28px;
    min-height: calc(100vh - 28px);
    border-radius: 32px 32px 0 0;
    box-shadow: 0 40px 90px -40px rgba(15, 23, 42, .35), 0 0 0 1px rgba(226, 232, 240, .8);
    overflow: clip;
  }
}

/* ---------- Шапка ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 26px 20px 22px;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(140deg, #075985 0%, #0284c7 38%, #0ea5e9 78%, #22d3ee 115%);
}

.hero-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .35), rgba(255, 255, 255, .06) 70%);
  border: 1px solid rgba(255, 255, 255, .18);
  animation: float 9s ease-in-out infinite;
}
.hero-bubble--1 { width: 210px; height: 210px; top: -90px; right: -60px; }
.hero-bubble--2 { width: 90px; height: 90px; bottom: 30px; right: 40px; animation-delay: -3s; opacity: .7; }
.hero-bubble--3 { width: 140px; height: 140px; bottom: -80px; left: -40px; animation-delay: -6s; opacity: .6; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.04); }
}

.logo-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.logo-mark svg { width: 26px; height: 26px; }

.logo-text {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .05em;
}
.logo-text span { color: #bae6fd; }

.hero-sub {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
}

.phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 15px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(3, 60, 100, .7);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.phone-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(3, 60, 100, .8); }
.phone-btn:active { transform: scale(.97); }
.phone-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
}
.badges svg { width: 14px; height: 14px; }

.hero-calc {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, .3);
}
.hero-calc > svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #bae6fd;
}
.hero-calc h1 { font-size: 17px; font-weight: 800; line-height: 1.2; }
.hero-calc p { font-size: 13px; color: rgba(255, 255, 255, .8); margin-top: 2px; }

/* ---------- Вкладки ---------- */
.tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 16px 12px;
  background: linear-gradient(#f8fafc 75%, rgba(248, 250, 252, 0));
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.tab-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 4);
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px -10px rgba(2, 132, 199, .9);
  transition: transform .45s cubic-bezier(.35, 1.35, .45, 1);
}

.tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 2px 8px;
  border-radius: 15px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--muted);
  transition: color .3s;
}
.tab:hover { color: var(--brand); }
.tab.is-active { color: #fff; }
.tab svg { width: 21px; height: 21px; transition: transform .3s var(--ease); }
.tab.is-active svg { transform: scale(1.08); }

.tab-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 7px);
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  color: #fff;
  background: var(--ok);
  box-shadow: 0 0 0 2px #fff;
  transform: scale(0);
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.tab-badge.show { transform: scale(1); }
.tab.is-active .tab-badge { background: #fff; color: var(--brand); box-shadow: none; }

/* ---------- Панелі ---------- */
.panel { display: none; padding: 2px 16px 6px; }
.panel.is-active { display: block; animation: panelIn .5s var(--ease); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.section {
  margin-bottom: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.section-head p {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}

.step-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-100);
}
.step-num svg { width: 15px; height: 15px; }

/* ---------- Картки типу ---------- */
.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  transition: border-color .25s, background .25s, box-shadow .25s, transform .25s var(--ease);
}
.type-card:hover { border-color: var(--brand-200); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.type-card:active { transform: scale(.98); }
.type-card.is-active {
  border-color: var(--brand-2);
  background: linear-gradient(160deg, #f5fbff, var(--brand-100));
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .13), var(--shadow-md);
}

.type-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  margin-bottom: 2px;
  border-radius: 13px;
  color: var(--brand);
  background: var(--soft);
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.type-icon svg { width: 21px; height: 21px; }
.type-card.is-active .type-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: rotate(-6deg);
}

.type-title { font-size: 15px; font-weight: 800; line-height: 1.2; color: var(--ink); padding-right: 22px; }
.type-desc { font-size: 12px; line-height: 1.35; color: var(--muted); }
.type-price { margin-top: auto; padding-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.type-price b { font-size: 19px; font-weight: 800; color: var(--ink); }
.type-card.is-active .type-price b { color: var(--brand); }

.type-check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  border: 1.5px solid #cbd5e1;
  transition: background .25s, border-color .25s;
}
.type-check svg { width: 13px; height: 13px; stroke-width: 3; transform: scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.type-card.is-active .type-check { background: var(--brand-2); border-color: var(--brand-2); }
.type-card.is-active .type-check svg { transform: scale(1); }

.type-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding-right: 46px;
}
.type-card--wide .type-icon { margin-bottom: 0; }
.type-card--wide .type-check { top: 50%; margin-top: -11px; }
.type-card--wide.is-active { background: linear-gradient(160deg, #fff, var(--soft)); border-color: #94a3b8; box-shadow: 0 0 0 4px rgba(148, 163, 184, .15); }
.type-card--wide.is-active .type-icon { background: #64748b; transform: none; }
.type-card--wide.is-active .type-check { background: #64748b; border-color: #64748b; }

/* ---------- Площа / повзунок ---------- */
.num-input {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 15px;
  background: var(--brand-50);
  border: 1.5px solid var(--brand-200);
  cursor: text;
  transition: border-color .2s, box-shadow .2s;
}
.num-input:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(14, 165, 233, .15); }
.num-input input {
  width: 62px;
  text-align: right;
  font-size: 23px;
  font-weight: 800;
  color: var(--brand);
  background: transparent;
  border: 0;
  outline: none;
}
.num-input span { font-size: 15px; font-weight: 800; color: var(--brand); }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin: 22px 0 8px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background:
    linear-gradient(90deg, var(--brand), var(--brand-2)) 0 / var(--fill, 0%) 100% no-repeat,
    #e2e8f0;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--brand-2);
  box-shadow: 0 4px 14px rgba(2, 132, 199, .45);
  cursor: grab;
  transition: transform .15s;
}
.range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--brand-2);
  box-shadow: 0 4px 14px rgba(2, 132, 199, .45);
  cursor: grab;
}
.range::-moz-range-track { background: transparent; }
.range:active::-webkit-slider-thumb { transform: scale(1.18); cursor: grabbing; }

.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.preset {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  background: var(--soft);
  border: 1px solid transparent;
  transition: all .2s;
}
.preset:hover { color: var(--brand); border-color: var(--brand-200); }
.preset.is-active { color: #fff; background: var(--brand-2); }

.calc-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
}
.calc-line b { font-size: 17px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.calc-line.is-zero b { color: #94a3b8; }

.hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.hint svg { flex-shrink: 0; width: 16px; height: 16px; color: #f59e0b; margin-top: 1px; }

/* ---------- Згортання / акордеон ---------- */
.collapsible {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition: grid-template-rows .45s var(--ease), opacity .35s ease;
}
.collapsible > * { min-height: 0; overflow: hidden; }
.collapsible.is-collapsed { grid-template-rows: 0fr; opacity: 0; }

.acc {
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.acc.is-open { border-color: var(--brand-200); box-shadow: 0 8px 22px -14px rgba(2, 132, 199, .4); }
.acc-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.acc-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 10px;
  color: var(--ok);
  background: #ecfdf5;
}
.acc-ico svg { width: 17px; height: 17px; }
.acc-chevron { width: 20px; height: 20px; margin-left: auto; color: var(--muted); transition: transform .35s var(--ease); flex-shrink: 0; }
.acc.is-open .acc-chevron { transform: rotate(180deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.acc.is-open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { min-height: 0; overflow: hidden; }

.includes { display: grid; gap: 9px; padding: 2px 14px 16px 14px; }
.includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}
.acc.is-open .includes li { animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.includes li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  stroke-width: 3;
  color: #fff;
  background: var(--ok);
  margin-top: 1px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Опції (перемикачі / лічильники) ---------- */
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 17px;
  transition: border-color .25s, background .25s, box-shadow .25s, opacity .25s, transform .2s var(--ease);
}
button.opt:hover:not(:disabled) { border-color: var(--brand-200); }
button.opt:active:not(:disabled) { transform: scale(.98); }
.opt.is-active { border-color: var(--brand-2); background: var(--brand-50); box-shadow: 0 8px 20px -14px rgba(2, 132, 199, .6); }
.opt:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }

.row-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--brand);
  background: var(--soft);
  transition: background .3s, color .3s;
}
.row-icon svg { width: 20px; height: 20px; }
.opt.is-active .row-icon { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

.row-title { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.row-sub { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.row-sub b { color: var(--brand); font-weight: 800; }
.row-note { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #92400e; background: #fef3c7; }

.checkbox {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #fff;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  transition: background .2s, border-color .2s;
}
.checkbox svg { width: 14px; height: 14px; stroke-width: 3; transform: scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.opt.is-active .checkbox { background: var(--brand-2); border-color: var(--brand-2); }
.opt.is-active .checkbox svg { transform: scale(1); }

.opt.tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
.opt.tile .checkbox { position: absolute; top: 12px; right: 12px; }
.opt.tile .row-title { padding-right: 4px; }

.opt.wide { grid-column: 1 / -1; }

.counter {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 14px;
  background: var(--soft);
  transition: background .25s;
}
.counter-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--brand);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
  transition: transform .15s, background .2s, color .2s, opacity .2s;
}
.counter-btn:active:not(:disabled) { transform: scale(.88); }
.counter-btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.counter-btn svg { width: 16px; height: 16px; stroke-width: 2.6; }
.counter-val { display: inline-block; min-width: 34px; text-align: center; font-size: 15px; font-weight: 800; color: var(--ink); }
.counter-val.pop { animation: pop .3s var(--ease); }
.opt.is-active .counter { background: var(--brand-100); }
.opt.is-active .counter-btn[data-step="1"] { color: #fff; background: var(--brand-2); }

@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---------- Плашки ---------- */
.note {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #0c4a6e;
  background: linear-gradient(135deg, #ecfeff, var(--brand-50));
  border: 1px solid var(--brand-200);
}
.note > svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--brand); margin-top: 1px; }
.note--accent { margin-bottom: 14px; padding: 16px; }
.note--accent > svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
}
.note-link {
  display: block;
  margin-top: 6px;
  font-weight: 800;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand-200);
  transition: transform .2s;
}
.mini-btn:hover { transform: translateY(-1px); }
.mini-btn svg { width: 15px; height: 15px; }

/* ---------- Майстер 24/7 ---------- */
.master-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 22px 18px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(150deg, #0f172a 0%, #0c4a6e 60%, #075985 100%);
  box-shadow: 0 24px 50px -24px rgba(12, 74, 110, .8);
}
.master-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  top: -140px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, .55), transparent 65%);
  animation: float 8s ease-in-out infinite;
}
.pill-247 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
}
.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34d399;
  animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.master-title { margin-top: 14px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.master-sub { margin-top: 6px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .78); }

.master-grid { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 520px) { .master-grid { grid-template-columns: 1fr 1fr; } }

.master-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
}
.master-box-head { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 800; }
.master-box-head span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
}
.master-box-head svg { width: 18px; height: 18px; }
.master-box ul { display: grid; gap: 7px; margin-top: 12px; }
.master-box li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.master-box li svg { flex-shrink: 0; width: 16px; height: 16px; color: #67e8f9; margin-top: 2px; stroke-width: 3; }

.master-note { display: flex; gap: 8px; margin-top: 12px; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, .65); }
.master-note svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 2px; }

/* ---------- Кнопки ---------- */
.cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 15px 20px;
  border-radius: 17px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 60%, #06b6d4 100%);
  box-shadow: 0 14px 26px -12px rgba(2, 132, 199, .9);
  transition: transform .2s var(--ease), box-shadow .2s, filter .3s, opacity .3s;
}
.cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  animation: shine 4s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -120%; } 100% { left: 160%; } }
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -12px rgba(2, 132, 199, 1); }
.cta:active { transform: scale(.97); }
.cta svg { width: 18px; height: 18px; flex-shrink: 0; }
.cta.is-dim { filter: saturate(.25); opacity: .7; box-shadow: none; }
.cta.is-dim::after { display: none; }

.cta--light { color: #0c4a6e; background: linear-gradient(135deg, #fff, #e0f2fe); box-shadow: 0 14px 30px -12px rgba(14, 165, 233, .8); }

.cta .btn-loading { display: none; align-items: center; gap: 10px; }
.cta .btn-label { display: inline-flex; align-items: center; gap: 8px; }
.cta.is-loading { pointer-events: none; }
.cta.is-loading .btn-label { display: none; }
.cta.is-loading .btn-loading { display: inline-flex; }

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-100);
  transition: background .2s, transform .2s;
}
.btn-secondary:hover { background: var(--brand-200); }
.btn-secondary:active { transform: scale(.98); }
.btn-secondary svg { width: 18px; height: 18px; }
.btn-secondary.is-done { color: #047857; background: #d1fae5; }

.btn-ghost {
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: background .2s;
}
.btn-ghost:hover { background: var(--soft); }

/* ---------- Футер ---------- */
.app-footer {
  padding: 6px 28px 10px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
}

/* ---------- Підсумкова панель ---------- */
.summary-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  pointer-events: none;
}
.summary-bar {
  pointer-events: auto;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -16px 40px -18px rgba(15, 23, 42, .28);
}

.total-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ink);
  white-space: nowrap;
}
.total-prefix,
.total-cur { font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.total-prefix.is-hidden { display: none; }
.total.bump #totalValue { display: inline-block; animation: bump .45s var(--ease); }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); color: var(--brand); }
  100% { transform: scale(1); }
}

.details-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--brand);
}
.details-btn svg { width: 15px; height: 15px; }
.details-btn .chev { transition: transform .35s var(--ease); }
.details-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.min-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.min-hint svg { flex-shrink: 0; width: 16px; height: 16px; color: #d97706; margin-top: 1px; }

/* Чек */
.receipt {
  max-height: 44vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-bottom: 12px;
  padding: 4px 4px 14px;
  border-bottom: 1.5px dashed #cbd5e1;
}
.r-title { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 800; color: var(--ink); padding-top: 4px; }
.r-group { margin: 12px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.r-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 5px 0; font-size: 13.5px; font-weight: 600; color: var(--text); }
.r-line small { display: block; margin-top: 1px; font-size: 12px; font-weight: 600; color: var(--muted); }
.r-line b { white-space: nowrap; font-weight: 800; }
.r-sum { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--muted); }
.r-sum + .r-sum { border-top: 0; margin-top: 0; padding-top: 4px; }
.r-sum--warn { color: #b45309; }
.r-total { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 16px; font-weight: 800; color: var(--ink); }
.r-total b { color: var(--brand); }
.r-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #e11d48;
}
.r-empty { padding: 16px 4px 4px; text-align: center; font-size: 13.5px; color: var(--muted); }
.r-empty b { display: block; margin-bottom: 4px; font-size: 15px; color: var(--ink); }

/* ---------- Модальне вікно ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .45s;
}
.modal.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .35s;
}
.modal.is-open .modal-backdrop { opacity: 1; }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 94vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 20px calc(22px + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 60px -20px rgba(15, 23, 42, .4);
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.2, .9, .3, 1);
}
.modal-card::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 42px;
  height: 5px;
  margin-left: -21px;
  border-radius: 99px;
  background: #e2e8f0;
}
.modal.is-open .modal-card { transform: none; }

@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
  .modal-card {
    border-radius: 28px;
    padding: 28px 26px 24px;
    opacity: 0;
    transform: translateY(24px) scale(.96);
    transition: transform .4s var(--ease), opacity .3s;
    box-shadow: 0 40px 80px -30px rgba(15, 23, 42, .5);
  }
  .modal-card::before { display: none; }
  .modal.is-open .modal-card { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--soft);
  transition: background .2s, color .2s, transform .2s;
}
.modal-close:hover { color: var(--ink); background: #e2e8f0; transform: rotate(90deg); }
.modal-close svg { width: 19px; height: 19px; }

.modal-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; margin-bottom: 18px; }
.modal-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow-md);
}
.modal-icon svg { width: 23px; height: 23px; }
.modal-head h3 { font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.modal-head p { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }

.modal-summary {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.ms-list { display: grid; gap: 7px; max-height: 190px; overflow-y: auto; padding-right: 4px; }
.ms-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; font-weight: 600; }
.ms-list li em { font-style: normal; color: var(--muted); font-weight: 600; }
.ms-list li b { white-space: nowrap; font-weight: 800; }
.ms-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px dashed #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.ms-total b { font-size: 21px; font-weight: 800; color: var(--brand); white-space: nowrap; }
.ms-note { margin-top: 6px; font-size: 12px; font-weight: 600; color: #b45309; }
.ms-master { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); }
.ms-master b { display: block; font-size: 15px; color: var(--ink); }
.ms-master svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--brand); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  background: var(--soft);
  border: 1.5px solid transparent;
  transition: all .2s;
}
.chip svg { width: 16px; height: 16px; }
.chip.is-active { color: var(--brand); background: var(--brand-50); border-color: var(--brand-2); }

/* Поля форми */
.field { margin-bottom: 14px; }
.field-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; color: #334155; }
.opt-label { font-weight: 600; color: #94a3b8; }
.input-wrap { position: relative; }
.input-wrap > svg {
  position: absolute;
  top: 15px;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  transition: color .2s;
}
.input-wrap:focus-within > svg { color: var(--brand-2); }
.input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-radius: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: #a3b1c2; font-weight: 500; }
.input:focus { background: #fff; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(14, 165, 233, .15); }
textarea.input { min-height: 88px; resize: vertical; line-height: 1.45; }
.field-error { display: none; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #e11d48; }
.field.has-error .input { border-color: #fb7185; box-shadow: 0 0 0 4px rgba(244, 63, 94, .12); }
.field.has-error .field-error { display: block; }
.field.has-error .input-wrap { animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.privacy { margin-top: 10px; text-align: center; font-size: 11.5px; color: #94a3b8; }
.demo-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
}
.demo-note svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Успіх */
#successView { text-align: center; padding-top: 8px; }
.success-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 6px auto 18px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 0 0 10px #d1fae5, 0 18px 34px -12px rgba(16, 185, 129, .7);
  animation: popIn .6s cubic-bezier(.2, 1.6, .4, 1) both;
}
.success-icon svg { width: 44px; height: 44px; stroke-width: 3; }
.success-icon svg path,
.success-icon svg polyline { stroke-dasharray: 26; stroke-dashoffset: 26; animation: draw .5s .35s ease forwards; }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.success-title { font-size: 22px; font-weight: 800; color: var(--ink); }
.success-text { max-width: 380px; margin: 8px auto 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 12px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.demo-badge svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Імітація Telegram */
.tg { overflow: hidden; text-align: left; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.tg-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.tg-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #22d3ee);
}
.tg-name { font-size: 14px; font-weight: 800; color: var(--ink); }
.tg-status { font-size: 12px; color: #94a3b8; }
.tg-logo { width: 20px; height: 20px; margin-left: auto; color: #229ed9; }
.tg-body {
  max-height: 340px;
  overflow-y: auto;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .45) 0 2px, transparent 3px) 0 0 / 26px 26px,
    linear-gradient(160deg, #c9e6f5, #d7efe2 60%, #e5f0c9);
}
.tg-bubble {
  position: relative;
  max-width: 100%;
  padding: 10px 12px 22px;
  border-radius: 16px 16px 16px 4px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #111827;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
  animation: fadeUp .5s .3s var(--ease) both;
}
.tg-bubble b { font-weight: 800; }
.tg-time { position: absolute; right: 10px; bottom: 5px; font-size: 11px; color: #94a3b8; }

/* ---------- Сповіщення ---------- */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  background: rgba(15, 23, 42, .94);
  box-shadow: 0 18px 40px -14px rgba(15, 23, 42, .6);
  transform: translate(-50%, -160%);
  transition: transform .4s cubic-bezier(.2, 1.3, .4, 1);
}
.toast.show { transform: translate(-50%, 0); }
.toast svg { flex-shrink: 0; width: 18px; height: 18px; color: #38bdf8; }
.toast.is-error svg { color: #fb7185; }
.toast.is-success svg { color: #34d399; }

/* ---------- Малі екрани ---------- */
@media (max-width: 380px) {
  .hero { padding: 22px 16px 20px; }
  .logo-text { font-size: 23px; }
  .phone-btn { font-size: 14px; }
  .panel, .tabs-wrap { padding-left: 12px; padding-right: 12px; }
  .section { padding: 15px; }
  .type-card { padding: 12px; }
  .total { font-size: 23px; }
  .cta { padding: 14px 14px; font-size: 14px; }
  .tab { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
