/* Elf Bar Store — light, product-first, mobile-first.
   Phone is the base layout; 720px and 960px widen it. Single deliberate light theme. */
:root {
  --paper: #ffffff;
  --ground: #f2f3f5;
  --tile: #f3f4f6;
  --ink: #101217;
  --ink-2: #5b6170;
  --ink-3: #8a909c;
  --line: #e3e6eb;
  --on-ink-2: #b4b8c2;
  --hero-hi: #f8f9fb;
  --hero-lo: #e4e7ec;
  --tint: #d9dce2;
  --font-display: "Geologica", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --max: 1200px;
  --gutter: 16px;
  --header-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body.locked { overflow: hidden; }
body.has-bar { padding-bottom: calc(84px + var(--safe-bottom)); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; color: inherit; touch-action: manipulation; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
p { margin: 0; }
.wrap { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; }
[data-icon] { display: inline-flex; }
.hide-phone, .btn.hide-phone { display: none; }
.no-scrollbar, .tabs, .chips, .lines { scrollbar-width: none; }
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar, .lines::-webkit-scrollbar { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 16px; transition: background .15s, color .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(0.98); }
.btn .ic { font-size: 18px; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--line { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--wide { width: 100%; }

/* gate */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(16, 18, 23, 0.55); padding: var(--gutter); }
.gate[hidden] { display: none; }
.gate__card { width: min(420px, 100%); background: var(--paper); border-radius: 20px; padding: 32px 24px 24px; text-align: center; }
.gate__badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-bottom: 16px; }
.gate__card h2 { font-size: 22px; margin-bottom: 8px; }
.gate__card p { color: var(--ink-2); margin-bottom: 22px; font-size: 15px; }
.gate__actions { display: grid; gap: 10px; }

/* header */
.header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); padding-top: var(--safe-top); }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: 0.02em; display: flex; align-items: baseline; gap: 8px; }
.logo span { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--ink-2); letter-spacing: 0; }
.nav { display: none; }
.cart { display: inline-flex; align-items: center; gap: 8px; height: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px 0 12px; font-size: 14px; font-weight: 600; }
.cart .ic { font-size: 19px; }
.cart__label { display: none; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.acct { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; font-size: 14px; font-weight: 600; }
.acct .ic { font-size: 19px; }
.acct__label { display: none; }
.cart__count { min-width: 26px; height: 26px; padding-inline: 7px; border-radius: 999px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.bump { animation: bump .32s ease; }
@keyframes bump { 40% { transform: scale(1.06); } }

/* hero: light; the vapor is a background layer for the whole first screen and rises behind the headline */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-block: 26px 30px;
  background: radial-gradient(130% 70% at 50% 100%, var(--hero-lo) 0%, var(--hero-hi) 72%); }
.hero__smoke { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero__grid { position: relative; z-index: 1; display: grid; gap: 14px; }
.stage { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  position: relative; margin-inline: calc(var(--gutter) * -1); aspect-ratio: 1 / 0.8; cursor: pointer; }
.stage::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: 3%; height: 8%; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(16,18,23,0.20), rgba(16,18,23,0) 70%); }
.stage__img { position: absolute; height: auto; pointer-events: none; -webkit-user-drag: none; }
.stage__img--c { width: 66%; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 2; }
.stage__img--l { width: 50%; left: -6%; bottom: 4%; transform: rotate(-7deg); z-index: 1; }
.stage__img--r { width: 50%; right: -6%; bottom: 4%; transform: rotate(7deg); z-index: 1; }
.stage__hint { position: absolute; right: var(--gutter); top: 4px; z-index: 3; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
/* телефон: спершу девайси з димом, під ними заголовок і «Обрати смак» — як у першій версії */
.hero .stage { order: -1; }

.hero h1 { font-size: clamp(27px, 7.6vw, 40px); font-weight: 800; line-height: 1.06; margin-bottom: 12px; }
.h1-line { display: block; white-space: nowrap; }
.lead { font-size: 16px; color: var(--ink-2); max-width: 52ch; margin-bottom: 18px; }
.hero__cta { display: flex; gap: 10px; }

/* tap on a device: it swells toward the viewer and springs back (individual `scale`/`translate` keep each device's own tilt) */
.stage__img.is-pressed { animation: press .62s cubic-bezier(.3,.7,.3,1); }
@keyframes press { 0% { scale: 1; } 18% { scale: 0.95; translate: 0 1%; } 52% { scale: 1.09; translate: 0 -2.5%; } 76% { scale: 0.985; } 100% { scale: 1; translate: 0 0; } }

/* sections */
.section { padding-block: 40px; }
.section--ground { background: var(--ground); }
.section__head { margin-bottom: 18px; max-width: 60ch; }
.section__head--row { display: flex; justify-content: space-between; align-items: end; gap: 16px; max-width: none; }
.section h2 { font-size: clamp(25px, 6.6vw, 40px); font-weight: 800; margin-bottom: 6px; }
.section__head p { color: var(--ink-2); font-size: 15px; }
.section__head--center { text-align: center; margin-inline: auto; }
.count { color: var(--ink-2); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-bottom: 2px; }

/* lines: phone — swipeable cards with a peek of the next one */
/* lines: phone — swipeable cards, each snaps to the centre; side padding = half the free space, so nothing trails after the last */
.lines { --card: min(82%, 330px); display: grid; grid-auto-flow: column; grid-auto-columns: var(--card); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: calc((100% - var(--card)) / 2); padding-bottom: 4px; overscroll-behavior-x: contain; }
.line-card { scroll-snap-align: center; background: var(--paper); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.line-card__art { position: relative; aspect-ratio: 1 / 0.8; background: var(--tile); background: color-mix(in srgb, var(--tint) 24%, #ffffff); overflow: hidden; }
.line-card__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform: scale(1.06); transform-origin: 50% 96%; }
.line-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.line-card__body h3 { font-size: 20px; font-weight: 700; }
.line-card__note { color: var(--ink-2); font-size: 14px; margin-top: -8px; }
.specs { margin: 0; display: grid; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.line-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-card__foot .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }

/* catalog filters: line pills stick under the header */
.filters { position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter); }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.tab--plain { padding-left: 14px; }
.tabs > :first-child, .chips > :first-child { margin-left: auto; }
.tabs > :last-child, .chips > :last-child { margin-right: auto; }
.tab__thumb { width: 32px; height: 32px; border-radius: 50%; background: var(--tile); background: color-mix(in srgb, var(--tint) 35%, #ffffff); display: grid; place-items: center; overflow: hidden; }
.tab__thumb img { width: 40px; max-width: none; height: auto; margin-top: 12px; }
.tab em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tab.is-active em { color: var(--on-ink-2); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 14px var(--gutter) 16px; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* flavor tiles */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
.tile { display: flex; flex-direction: column; min-width: 0; }
.tile__art { aspect-ratio: 1 / 1.06; display: grid; place-items: center; background: var(--tile); background: color-mix(in srgb, var(--tint) 22%, #ffffff); border-radius: var(--radius); overflow: hidden; }
.tile__art img { width: 96%; height: auto; margin-top: 4%; }
/* flavor ingredients: real fruit lying at the foot of the device with a shadow, like a product photo —
   first on the left, second on the right, a third (usually ice) smaller in front; the mix is spelled out under the name. */
.tile__art.has-fx > img { transform: scale(0.84); transform-origin: 50% 88%; }
.tile__art.has-fx::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 7%; height: 7%; background: radial-gradient(closest-side, rgba(16, 18, 23, 0.16), transparent); }
.tile__fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tile__fx .fx { position: absolute; bottom: 5%; width: 33%; height: auto; filter: drop-shadow(0 5px 4px rgba(16, 18, 23, 0.22)); }
.tile__fx .fx--1 { left: 0; }
.tile__fx .fx--2 { right: 0; }
.tile__fx .fx--3 { right: 22%; bottom: 2%; width: 19%; }
.tile.is-out .tile__fx { opacity: 0.5; }
.tile__mix { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.tile__mix > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tile__mix > span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(16, 18, 23, 0.08); }
.tile__body { padding: 10px 2px 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tile__line { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.tile__body h3 { font-family: var(--font-body); font-size: 14.5px; font-weight: 600; line-height: 1.3; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; min-height: 46px; }
.tile__price { font-family: var(--font-display); font-weight: 700; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.add { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 20px; flex: none; transition: transform .1s; }
.add:active { transform: scale(0.92); }
.stepper { display: inline-flex; align-items: center; height: 38px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper button { width: 34px; height: 38px; border: 0; background: none; color: inherit; display: grid; place-items: center; font-size: 16px; }
.stepper span { min-width: 16px; text-align: center; font-size: 14px; }
.grid__empty { grid-column: 1 / -1; color: var(--ink-2); text-align: center; padding: 40px 0; }

/* steps: phone — compact list */
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding-block: 16px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; padding-top: 4px; }
.steps__n { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.steps b { font-size: 16px; font-family: var(--font-display); font-weight: 700; display: block; margin-bottom: 2px; }
.steps p { color: var(--ink-2); font-size: 14px; }

/* support */
.support { background: var(--ground); border-radius: 20px; padding: 22px 20px; display: grid; gap: 16px; text-align: center; justify-items: center; }
.support h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.support p { color: var(--ink-2); font-size: 14px; max-width: 46ch; }
.support .btn { width: 100%; max-width: 360px; }
.support .btn.is-busy { opacity: 0.6; pointer-events: none; }

/* footer */
.footer { padding-block: 28px; background: var(--ground); color: var(--ink-2); font-size: 13px; }
.footer__row { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.credits { font-size: 11px; color: var(--ink-3); margin-bottom: 10px; }
.warning { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 12px; }

/* cart bar: phone only, appears once something is in the cart */
.cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 70; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 16px 0 10px; border: 0; border-radius: 18px; background: var(--ink); color: var(--paper); text-align: left; box-shadow: 0 14px 34px rgba(16,18,23,0.28); animation: rise .3s cubic-bezier(.2,.8,.2,1); }
.cartbar[hidden] { display: none; }
.cartbar__icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,0.12); display: grid; place-items: center; font-size: 21px; }
.cartbar__text { display: grid; line-height: 1.2; }
.cartbar__text b { font-family: var(--font-display); font-size: 17px; font-variant-numeric: tabular-nums; }
.cartbar__text small { font-size: 12px; color: var(--on-ink-2); }
.cartbar__go { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 15px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* cart: phone — bottom sheet */
.drawer { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh; max-height: 88dvh; z-index: 90; background: var(--paper); border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; padding-bottom: var(--safe-bottom); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 0; flex: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 12px 20px; }
.drawer__head h3 { font-size: 20px; }
.drawer__close { background: var(--tile); border: 0; font-size: 20px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.drawer__list { flex: 1; overflow: auto; padding: 4px 16px 12px; display: grid; gap: 8px; align-content: start; overscroll-behavior: contain; }
.line { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: var(--tile); font-size: 14px; min-width: 0; }
.line__img { width: 60px; height: 60px; border-radius: 10px; background: var(--paper); background: color-mix(in srgb, var(--tint) 30%, #ffffff); display: grid; place-items: center; overflow: hidden; }
.line__img img { width: 74px; max-width: none; height: auto; margin-top: 10px; }
.line b { display: block; line-height: 1.25; }
.line small { display: block; color: var(--ink-2); }
.line .stepper { height: 34px; }
.line .stepper button { height: 34px; width: 32px; }
.drawer__foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer__total { display: flex; justify-content: space-between; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.drawer__note { font-size: 12px; color: var(--ink-2); text-align: center; }
.drawer__empty { color: var(--ink-2); text-align: center; padding: 32px 0; }
.scrim { position: fixed; inset: 0; background: rgba(16,18,23,0.45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.toast { position: fixed; left: 50%; top: calc(var(--header-h) + var(--safe-top) + 12px); transform: translate(-50%, -12px); z-index: 95; max-width: calc(100% - 32px); background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 999px; font-size: 14px; text-align: center; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* stock states on tiles */
.tile__art { position: relative; }
.tile__badge { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 3px 8px; border-radius: 999px; background: var(--paper); font-size: 11px; font-weight: 600; color: var(--ink); }
.tile__badge--out { background: var(--ink); color: var(--paper); }
.tile.is-out .tile__art img { opacity: 0.45; filter: grayscale(0.6); }
.tile__out { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.stepper button:disabled { opacity: 0.35; }
.btn:disabled { opacity: 0.45; cursor: default; }

/* drawer views */
.drawer__back { background: var(--tile); border: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; margin-right: 8px; }
.drawer__back .ic { transform: rotate(180deg); }
.drawer__head h3 { margin-right: auto; }
.drawer__foot[hidden] { display: none; }

/* checkout form */
.checkout { gap: 18px; padding-bottom: 20px; }
.ck-group { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.ck-group legend { font-family: var(--font-display); font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 8px; }
.ck-field { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); position: relative; min-width: 0; }
.ck-field input, .ck-field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
.ck-field input:focus, .ck-field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.ck-field input:disabled { background: var(--tile); color: var(--ink-3); }
.ck-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--tile); border-radius: 14px; }
.ck-seg label { position: relative; }
.ck-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ck-seg span { display: grid; place-items: center; min-height: 42px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; text-align: center; padding: 0 6px; }
.ck-seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(16,18,23,0.12); }
.ck-seg input:focus-visible + span { outline: 2px solid var(--ink); }
.ck-np, .ck-courier { display: grid; gap: 10px; }
.ck-np[hidden], .ck-courier[hidden] { display: none; }
.ck-note { font-size: 12.5px; color: var(--ink-2); }
.ck-options { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); max-height: 220px; overflow: auto; box-shadow: 0 10px 28px rgba(16,18,23,0.12); }
.ck-options[hidden] { display: none; }
.ck-options button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 10px; border-radius: 8px; font-size: 14px; color: var(--ink); line-height: 1.35; }
.ck-options button:hover, .ck-options button:focus { background: var(--tile); }
.ck-empty { padding: 10px; font-size: 14px; color: var(--ink-3); }
.ck-radio { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.ck-radio:has(input:checked) { border-color: var(--ink); }
.ck-radio input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.ck-radio b { display: block; font-weight: 600; font-size: 15px; }
.ck-radio small { display: block; color: var(--ink-2); font-size: 12.5px; }
.ck-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ck-field.is-invalid input { border-color: #b42318; outline: 2px solid #b42318; outline-offset: -1px; }
.ck-field__err { color: #b42318; font-size: 13px; }
.ck-error { background: #fdecea; color: #b42318; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.ck-error[hidden] { display: none; }

/* order accepted */
.done { gap: 14px; padding-bottom: 24px; }
.done__head { text-align: center; display: grid; gap: 6px; justify-items: center; padding-top: 6px; }
.done__check { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); position: relative; }
.done__check::after { content: ""; position: absolute; left: 20px; top: 15px; width: 12px; height: 22px; border: solid var(--paper); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.done__head h4 { font-family: var(--font-display); font-size: 20px; margin: 4px 0 0; }
.done__head p { color: var(--ink-2); }
.done__pay { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.done__pay h5 { font-family: var(--font-display); font-size: 16px; margin: 0 0 2px; }
.done__pay p { font-size: 12.5px; color: var(--ink-2); }
.done__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.done__row span { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); }
.done__row b { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.done__copy { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; }
.done__tg { text-align: center; color: var(--ink-2); font-size: 14px; }
.done__tg a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } /* «напишіть менеджеру» має читатися як посилання */
.done .btn { width: 100%; }
.done__qr { display: none; margin: 4px 0; text-align: center; }
.done__qr img { width: 190px; height: 190px; display: block; margin: 0 auto 6px; }
.done__qr figcaption { font-size: 12.5px; color: var(--ink-2); }
@media (pointer: fine) { .done__qr { display: block; } } /* на телефоні свій екран не відскануєш — там лише кнопка */
.done__req summary { cursor: pointer; font-size: 13.5px; font-weight: 600; padding: 4px 0; }
.done__req[open] summary { margin-bottom: 4px; }

/* account */
.account { gap: 20px; padding-bottom: 24px; }
.acc-hello { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acc-hello h4 { font-family: var(--font-display); font-size: 20px; margin: 0; }
.acc-hello small { color: var(--ink-2); font-size: 13px; }
.acc-link { background: none; border: 0; padding: 6px 0; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.acc-sec { display: grid; gap: 10px; }
.acc-sec h5 { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin: 0; }
.acc-note { color: var(--ink-2); font-size: 13px; margin: 0; }
.acc-box { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tile); font-size: 14px; }
.acc-order { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.acc-order__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.acc-order__top b { font-family: var(--font-display); font-size: 17px; font-variant-numeric: tabular-nums; }
.acc-pill { padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; white-space: nowrap; }
.acc-order.is-closed .acc-pill { background: var(--tile); color: var(--ink-2); }
.acc-order__meta { color: var(--ink-2); font-size: 13px; margin: 0; }
.acc-order__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.acc-order__items li { display: flex; justify-content: space-between; gap: 12px; }
.acc-order__items li span:last-child { color: var(--ink-2); white-space: nowrap; }
.acc-order__box { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--tile); font-size: 13px; }
.acc-order__foot { display: flex; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.acc-order__foot > b { margin-right: auto; font-variant-numeric: tabular-nums; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.acc-intro { display: grid; gap: 16px; padding-top: 4px; }
.acc-perks { list-style: none; margin: 0; padding: 0; display: grid; }
.acc-perks li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.acc-perks li:first-child { border-top: 0; padding-top: 0; }
.acc-perks b { display: block; color: var(--ink); font-weight: 600; }
.acc-waiting { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--tile); font-size: 14px; }
.acc-waiting p { margin: 0; }
.acc-waiting small { color: var(--ink-2); }
.acc-spin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.account .line .acc-link { padding-inline: 6px; }
.ck-acct { padding: 10px 12px; border-radius: 12px; background: var(--tile); font-size: 13px; }
.ck-acct .acc-link { font-size: 13px; padding: 0; }

/* out-of-stock tile: «повідомити, коли з'явиться» */
.notify { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.notify.is-on { background: var(--ink); color: var(--paper); }
.notify .ic { font-size: 15px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ≥720: tablet */
@media (min-width: 720px) {
  :root { --gutter: 24px; --header-h: 64px; }
  .hide-phone, .btn.hide-phone { display: inline-flex; }
  .cart__label { display: inline; }
  .acct { padding: 0 14px 0 12px; }
  .acct__label { display: inline; }
  .hero__cta .btn--wide { width: auto; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .steps li, .steps li:first-child { grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--paper); }
  .support { grid-template-columns: 1fr auto; text-align: left; justify-items: start; align-items: center; padding: 28px 32px; }
  .support .btn { width: auto; }
  .drawer { left: auto; top: 0; bottom: 0; width: min(420px, 100%); max-height: none; border-radius: 0; transform: translateX(100%); }
  .drawer__grab { display: none; }
  .drawer__head { padding: 18px 16px 12px 20px; }
}

/* ≥960: desktop */
@media (min-width: 960px) {
  .header { background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); }
  .nav { display: flex; gap: 24px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
  .nav a:hover { color: var(--ink); }
  /* desktop hero: light band; copy on the left, devices on the right, vapor drifting left behind the text */
  .hero { padding-block: 0; background: radial-gradient(62% 95% at 76% 92%, var(--hero-lo) 0%, var(--hero-hi) 70%); }
  .hero__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); grid-template-areas: "copy stage";
    grid-template-rows: auto; column-gap: 32px; row-gap: 30px; align-content: center; min-height: min(660px, calc(100vh - var(--header-h))); }
  .hero__copy { grid-area: copy; align-self: center; padding-block: 48px; }
  .stage { grid-area: stage; margin-inline: 0; aspect-ratio: 1 / 0.9; align-self: end; order: 0; }
  .stage__img--c { width: 58%; }
  .stage__img--l { width: 44%; left: 1%; }
  .stage__img--r { width: 44%; right: 1%; }
  .stage__hint { right: 8px; top: auto; bottom: 18px; }
  .hero h1 { font-size: clamp(40px, 4vw, 58px); margin-bottom: 18px; }
  .lead { font-size: 17px; margin-bottom: 26px; }
  .section { padding-block: 64px; }
  .section__head { margin-bottom: 26px; }
  .lines-scroll { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
  .lines { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 360px)); justify-content: center; overflow: visible; padding: 0; gap: 16px; }
  .line-card { border: 1px solid var(--line); }
  .line-card__body { padding: 18px 20px 20px; }
  .filters { top: var(--header-h); }
  .tab:hover, .chip:hover { border-color: var(--ink); }
  .tab.is-active:hover { border-color: var(--ink); }
  .chips { flex-wrap: wrap; overflow: visible; justify-content: center; }
  .chips > :first-child, .chips > :last-child { margin-inline: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .tile__art { transition: background .2s; }
  .tile:hover .tile__art { background: color-mix(in srgb, var(--tint) 32%, #ffffff); }
  .cartbar { display: none !important; }
  body.has-bar { padding-bottom: 0; }
  .toast { top: auto; bottom: 24px; transform: translate(-50%, 12px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage__img, .cart, .cartbar, .drawer, .btn, .add { transition: none; animation: none; }
  .acc-spin { animation-duration: 2.4s; }
}
