/* 03moto checkout (/poruchka/) — docs/CHECKOUT-SPEC.md. Loaded only on this page, after site.css (same tokens).
 * One screen, no page scroll: top bar · the order as a pill · 3 steps that slide (Ти → Доставка → Потвърди) · actions.
 * Words kept short; the visuals carry it: glass cards, big delivery tiles, outline type, a lit concrete set behind.
 * Phone: the summary is a bottom sheet behind the pill. ≥1024px: the steps in a glass card left, the summary right. */
@layer components {
  .page-checkout { height: 100svh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  html.co-lock { overflow: hidden; }

  /* the set: concrete under a dark wash, one soft light that moves a little with each step */
  .cobg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(70% 45% at var(--lx, 50%) 18%, rgb(255 255 255 / .1), transparent 70%),
      radial-gradient(60% 40% at 50% 110%, color-mix(in oklab, var(--acid) 6%, transparent), transparent 70%),
      linear-gradient(180deg, rgb(14 15 17 / .72), rgb(14 15 17 / .9) 55%, rgb(14 15 17 / .97)),
      url(/assets/img/bg/concrete-v.webp) center / cover, var(--c-ground); }
  @media (min-width: 900px) { .cobg { background:
      radial-gradient(50% 50% at var(--lx, 50%) 10%, rgb(255 255 255 / .09), transparent 70%),
      radial-gradient(50% 40% at 50% 115%, color-mix(in oklab, var(--acid) 6%, transparent), transparent 70%),
      linear-gradient(180deg, rgb(14 15 17 / .7), rgb(14 15 17 / .94)),
      image-set(url(/assets/img/bg/concrete-h.avif) type("image/avif"), url(/assets/img/bg/concrete-h.webp) type("image/webp")) center / cover, var(--c-ground); } }
  .page-checkout:has([data-step="1"]) .cobg { --lx: 30%; }
  .page-checkout:has([data-step="2"]) .cobg { --lx: 70%; }

  /* ── top ── */
  .cotop { flex: none; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 12px; width: 100%; max-width: 1180px; margin: 0 auto;
    padding: calc(8px + env(safe-area-inset-top)) var(--gut) 4px; }
  .cotop__logo { justify-self: center; display: block; width: 50px; filter: drop-shadow(0 2px 10px rgb(0 0 0 / .6)); }
  .cotop__logo img { width: 100%; height: auto; }
  .cotop__btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--c-text);
    background: linear-gradient(180deg, rgb(255 255 255 / .1), rgb(255 255 255 / .03)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), inset 0 0 0 1px rgb(255 255 255 / .1); }
  .cotop__btn .i { width: 20px; height: 20px; }
  .cotop__btn:active { scale: .94; }

  .co { --co-bad: #FF7A7F; --co-line: rgb(255 255 255 / .12);
    flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: 1180px; margin: 0 auto; padding: 6px var(--gut) calc(10px + env(safe-area-inset-bottom)); }

  /* ── the order pill ── */
  .copill { flex: none; position: relative; align-self: center; display: flex; align-items: center; gap: 12px; width: min(100%, 440px); min-height: 56px; padding: 6px 14px 6px 8px;
    border-radius: var(--r-pill); background: rgb(20 21 24 / .6); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 0 0 1px rgb(255 255 255 / .1), 0 14px 30px -18px rgb(0 0 0 / .8); text-align: left; }
  .copill:active { scale: .98; }
  .copill__pics { display: flex; flex: none; }
  .copill__pics i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; margin-left: -12px;
    background: radial-gradient(90% 80% at 50% 38%, #fff, var(--c-tile) 55%, var(--c-tile-2)); box-shadow: 0 0 0 2px #17181b; font: 800 14px/1 var(--f-mono); color: var(--c-on-acid); font-style: normal; }
  .copill__pics i:first-child { margin-left: 0; }
  .copill__pics img { width: 100%; height: 100%; object-fit: contain; padding: 12%; mix-blend-mode: multiply; }
  .copill__pics .is-more { background: var(--c-text); }
  .copill__n { flex: 1; min-width: 0; color: var(--c-dim); font: 600 16px/1.1 var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .copill__sum { font: 800 var(--t-lead)/1 var(--f-ui); color: var(--acid); white-space: nowrap; font-feature-settings: "tnum", "locl" 0; }
  .copill__chev { display: inline-grid; color: var(--c-dim); transition: rotate .3s var(--ease); }
  .copill__chev .i { width: 18px; height: 18px; }
  .copill[aria-expanded="true"] .copill__chev { rotate: 180deg; }
  .copill__dot { position: absolute; top: 4px; left: 40px; width: 12px; height: 12px; border-radius: 50%; background: var(--co-bad); box-shadow: 0 0 0 2px #17181b; animation: co-pulse 1.6s ease-in-out infinite; }
  @keyframes co-pulse { 50% { box-shadow: 0 0 0 2px #17181b, 0 0 0 7px rgb(255 122 127 / .25); } }

  /* ── loading ── */
  .cowait { flex: 1; display: grid; place-items: center; }
  .cowait i { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .12); border-top-color: var(--c-text); animation: co-spin .8s linear infinite; }

  /* ── app ── */
  .co__app { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 12px; }
  .cowiz { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }

  /* progress: 3 segments */
  .coprog { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
  .coprog button { display: grid; gap: 8px; width: 100%; padding: 4px 0; text-align: left; color: var(--c-dim); font: 700 var(--t-mono)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; transition: color .3s; }
  .coprog button:disabled { cursor: default; }
  .coprog i { position: relative; display: block; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .12); overflow: hidden; }
  .coprog i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c-text); transform-origin: 0 50%; transform: scaleX(0); transition: transform .6s var(--ease); }
  .coprog .is-done button, .coprog .is-now button { color: var(--c-text); }
  .coprog .is-done i::after { transform: scaleX(1); }
  .coprog .is-now i::after { transform: scaleX(.42); }

  /* the stage: one step at a time; scrolls inside only on very short screens */
  .costage { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; margin-inline: -4px; padding: 6px 4px 4px; }
  .costage::-webkit-scrollbar { display: none; }
  .costep { display: flex; flex-direction: column; gap: 18px; }
  .costep.in-r { animation: co-in-r .5s var(--ease) both; }
  .costep.in-l { animation: co-in-l .5s var(--ease) both; }
  @keyframes co-in-r { from { opacity: 0; transform: translateX(40px); } }
  @keyframes co-in-l { from { opacity: 0; transform: translateX(-40px); } }
  .costep__t { font: 800 clamp(36px, 11vw, 64px)/.92 var(--f-display); text-transform: uppercase; letter-spacing: -.045em; outline: none; text-wrap: balance; }
  /* outline word: a stroke on transparent text draws the variable font's inner overlap contours (lines inside П Р Ъ В А);
     an opaque fill painted over the stroke hides them, the stroke is doubled because the fill covers its inner half (fix 231) */
  .costep__t em { display: block; font-style: normal; color: rgb(20 21 24); paint-order: stroke fill; -webkit-text-stroke: 2.8px rgb(255 255 255 / .85); }
  .costep__body { display: flex; flex-direction: column; gap: 14px; }

  /* fields: floating labels */
  .cof { position: relative; display: grid; gap: 6px; min-width: 0; }
  .cof__in { width: 100%; height: 64px; padding: 24px 18px 6px; border-radius: 18px; border: 1px solid var(--co-line);
    background: rgb(255 255 255 / .05); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font: 600 var(--t-ui)/1.2 var(--f-ui); color: var(--c-text); transition: border-color .2s, box-shadow .2s, background-color .2s; }
  .cof__in:focus { outline: none; border-color: rgb(255 255 255 / .8); background-color: rgb(255 255 255 / .07); box-shadow: 0 0 0 4px rgb(255 255 255 / .07); }
  .cof__in[aria-invalid="true"] { border-color: var(--co-bad); box-shadow: 0 0 0 4px rgb(255 122 127 / .1); }
  .cof__l { position: absolute; left: 19px; top: 21px; color: var(--c-dim); font: 500 var(--t-ui)/1 var(--f-ui); pointer-events: none; transform-origin: 0 0; transition: transform .25s var(--ease), color .2s; }
  .cof__in:focus + .cof__l, .cof__in:not(:placeholder-shown) + .cof__l { transform: translateY(-11px) scale(.84); color: var(--c-text); }
  .cof__ta { height: auto; min-height: 84px; padding-top: 28px; resize: none; line-height: 1.4; }
  .cof__e { display: flex; align-items: center; gap: 8px; padding-left: 4px; color: var(--co-bad); font: 600 16px/1.25 var(--f-ui); }
  .cof__e .i { width: 18px; height: 18px; flex: none; }
  .cof__e:not([hidden]) { animation: co-drop .3s var(--ease); }
  @keyframes co-drop { from { opacity: 0; transform: translateY(-4px); } }

  .comore summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; color: var(--c-dim); font-weight: 700; cursor: pointer; list-style: none; transition: color .2s; }
  .comore summary::-webkit-details-marker { display: none; }
  .comore summary .i { width: 18px; height: 18px; transition: rotate .3s var(--ease); }
  .comore[open] summary { color: var(--c-text); margin-bottom: 6px; }
  .comore[open] summary .i { rotate: 45deg; }

  /* delivery tiles: 2×2, big art; once one is picked they shrink to a row of 4 and its fields open below */
  .cotiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cotile { position: relative; display: grid; align-content: end; gap: 4px; min-height: 148px; padding: 16px; border-radius: 22px; cursor: pointer; isolation: isolate; overflow: hidden;
    background: linear-gradient(160deg, rgb(255 255 255 / .09), rgb(255 255 255 / .02) 60%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 0 0 1px rgb(255 255 255 / .1); transition: box-shadow .25s, transform .25s var(--ease); }
  .cotile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 70% at 30% 20%, rgb(255 255 255 / .14), transparent 70%); opacity: 0; transition: opacity .3s; }
  .cotile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
  .cotile__art { position: absolute; top: 14px; left: 14px; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px;
    background: radial-gradient(70% 70% at 35% 30%, rgb(255 255 255 / .18), rgb(255 255 255 / .04)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); transition: background-color .3s, color .3s; }
  .cotile__art .i { width: 30px; height: 30px; stroke-width: 1.4; }
  .cotile b { white-space: nowrap; font: 800 clamp(16px, 4.6vw, 22px)/1 var(--f-display); text-transform: uppercase; letter-spacing: -.03em; }
  .cotile small { color: var(--c-dim); font: 500 16px/1.2 var(--f-ui); }
  .cotile__px { position: absolute; top: 16px; right: 16px; padding: 6px 10px; border-radius: var(--r-pill); background: rgb(255 255 255 / .08); color: var(--c-text); font: 700 15px/1 var(--f-mono); }
  .cotile__px:empty { display: none; }
  .cotile__px.is-free { background: var(--c-text); color: var(--c-on-acid); }
  .cotile::after { content: ""; position: absolute; right: 14px; bottom: 14px; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .35);
    background: center / 15px no-repeat; transition: background-color .2s, box-shadow .2s; }
  .cotile.is-on { box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), inset 0 0 0 1.5px var(--c-text), 0 18px 40px -22px rgb(0 0 0 / .9); }
  .cotile.is-on::before { opacity: 1; }
  .cotile.is-on::after { background-color: var(--c-text); box-shadow: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B0C0D' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5 9.5 17.5 19.5 6.5'/%3E%3C/svg%3E"); }
  .cotile.is-on .cotile__art { background: var(--c-text); color: var(--c-on-acid); }
  .cotile:has(input:focus-visible) { outline: 2px solid var(--c-text); outline-offset: 3px; }
  .cotile:active { transform: scale(.98); }
  .cotiles.is-bad .cotile { box-shadow: inset 0 0 0 1px var(--co-bad); }
  /* picked: a compact row */
  .cotiles.is-picked { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .cotiles.is-picked .cotile { min-height: 92px; padding: 10px 6px 12px; justify-items: center; align-content: center; text-align: center; animation: co-shrink .4s var(--ease); }
  @keyframes co-shrink { from { opacity: .4; transform: scale(.94); } }
  .cotiles.is-picked .cotile__art { position: static; width: 42px; height: 42px; border-radius: 14px; margin-bottom: 4px; }
  .cotiles.is-picked .cotile__art .i { width: 22px; height: 22px; }
  .cotiles.is-picked .cotile b { font: 700 15px/1.1 var(--f-ui); text-transform: none; letter-spacing: 0; }
  .cotiles.is-picked small, .cotiles.is-picked .cotile__px, .cotiles.is-picked .cotile::after { display: none; }
  .co-combo .cotiles { display: none; }

  .copanel { display: flex; flex-direction: column; gap: 12px; animation: co-rise .45s var(--ease) both; }
  @keyframes co-rise { from { opacity: 0; transform: translateY(14px); } }
  .colink { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; padding: 0 4px; color: var(--c-dim); font-weight: 700; }
  .colink .i { width: 18px; height: 18px; }

  /* Econt office search */
  .combo { display: grid; gap: 8px; }
  .combo__in { padding-left: 50px; }
  .combo .cof__l { left: 51px; }
  .combo .cof::before { content: ""; position: absolute; left: 18px; top: 22px; width: 20px; height: 20px; z-index: 1; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F4F4F2' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.8'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E") center / contain no-repeat; }
  .combo__list { max-height: min(46svh, 360px); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 6px; list-style: none; border-radius: 18px;
    background: rgb(24 25 28 / .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--co-line), 0 20px 40px -20px rgb(0 0 0 / .9); }
  .combo__o { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
  .combo__o[aria-selected="true"] { background: rgb(255 255 255 / .09); }
  @media (hover: hover) { .combo__o:hover { background: rgb(255 255 255 / .06); } }
  .combo__ic .i { width: 20px; height: 20px; color: var(--c-dim); }
  .combo__o[aria-selected="true"] .combo__ic .i { color: var(--c-text); }
  .combo__t { display: grid; gap: 2px; min-width: 0; }
  .combo__t b { font: 700 16px/1.25 var(--f-ui); }
  .combo__t small { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .combo__t mark { background: none; color: var(--c-text); font-weight: 800; }
  .combo__tag { padding: 5px 8px; border-radius: 8px; background: rgb(255 255 255 / .08); color: var(--c-dim); font: 700 14px/1 var(--f-mono); letter-spacing: .02em; }
  .combo__none { padding: 16px 12px; color: var(--c-dim); }
  .copick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 10px 14px 14px; border-radius: 20px;
    background: linear-gradient(160deg, rgb(255 255 255 / .1), rgb(255 255 255 / .03)); box-shadow: inset 0 0 0 1.5px var(--c-text); animation: co-rise .4s var(--ease) both; }
  .copick__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--c-text); color: var(--c-on-acid); }
  .copick__ic .i { width: 24px; height: 24px; }
  .copick__txt { display: grid; gap: 3px; min-width: 0; }
  .copick__txt b { font: 700 var(--t-ui)/1.2 var(--f-ui); }
  .copick__txt small { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); }
  .copick__x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--c-dim); }
  .copick__x .i { width: 18px; height: 18px; }

  /* pickup: the shop as a lit map card */
  .costore { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; border-radius: 22px;
    background: linear-gradient(160deg, rgb(255 255 255 / .09), rgb(255 255 255 / .02)); box-shadow: inset 0 0 0 1px var(--co-line); }
  .costore > .i { width: 20px; height: 20px; color: var(--c-dim); }
  .costore__map { position: relative; width: 84px; height: 84px; border-radius: 18px; overflow: hidden;
    background: linear-gradient(90deg, transparent 47%, rgb(255 255 255 / .16) 47% 53%, transparent 53%), linear-gradient(28deg, transparent 58%, rgb(255 255 255 / .12) 58% 62%, transparent 62%),
      repeating-linear-gradient(0deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 14px), repeating-linear-gradient(90deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 14px), #1f2024; }
  .costore__map i { position: absolute; left: 50%; top: 46%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 4px rgb(198 255 0 / .25); }
  .costore__map i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--acid); animation: co-ping 1.8s ease-out infinite; }
  @keyframes co-ping { to { transform: scale(3); opacity: 0; } }
  .costore__txt { display: grid; gap: 4px; min-width: 0; }
  .costore__txt b { font: 800 20px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
  .costore__txt small { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); }

  /* review */
  .corev { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .corev li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 10px 10px 10px; border-radius: 20px;
    background: linear-gradient(160deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .09); }
  .corev__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgb(255 255 255 / .08); }
  .corev__ic .i { width: 22px; height: 22px; }
  .corev__t { display: grid; gap: 3px; min-width: 0; }
  .corev__t b { font: 700 var(--t-ui)/1.2 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .corev__t small { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* where it goes (an Econt office's name + address, a street) wraps in full, never cut: the address is what the buyer
     checks (over a third of the offices need 4+ lines at 390); the receipt's .codone__how likewise */
  .corev__t small[data-rev-where] { white-space: normal; overflow-wrap: anywhere; }
  .corev button { min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); color: var(--c-dim); font: 700 16px/1 var(--f-ui); box-shadow: inset 0 0 0 1px var(--co-line); transition: color .2s, background-color .2s; }
  @media (hover: hover) { .corev button:hover { color: var(--c-text); background: rgb(255 255 255 / .06); } }
  .cototal { display: grid; justify-items: center; gap: 4px; padding: 4px 0 0; text-align: center; }
  .cototal > span { color: var(--c-dim); font: 700 var(--t-mono)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
  .cototal .price { font-size: clamp(38px, 11vw, 56px); line-height: 1; letter-spacing: -.03em; font-feature-settings: "tnum", "locl" 0; }
  .cototal small { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); }
  .coterms { margin: 0; color: var(--c-dim); font: 500 15px/1.45 var(--f-ui); white-space: pre-line; text-align: center; }
  .coterms[hidden] { display: none; }
  .cochk { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; cursor: pointer; font: 600 var(--t-ui)/1.3 var(--f-ui); }
  .cochk--soft { color: var(--c-dim); font-weight: 500; }
  .cochk input { position: absolute; left: 0; top: 50%; width: 26px; height: 26px; margin: -13px 0 0; opacity: 0; cursor: pointer; }
  .cochk__box { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid rgb(255 255 255 / .45); color: transparent; transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease); }
  .cochk__box .i { width: 16px; height: 16px; stroke-width: 2.6; }
  .cochk input:checked + .cochk__box { background: var(--c-text); border-color: var(--c-text); color: var(--c-on-acid); transform: scale(1.06); }
  .cochk input:focus-visible + .cochk__box { outline: 2px solid var(--c-text); outline-offset: 3px; }
  .cochk input[aria-invalid="true"] + .cochk__box { border-color: var(--co-bad); }
  .coturn { min-height: 66px; }
  .coextras { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
  .coextras .comore[open] { flex-basis: 100%; order: 2; }

  /* alert (server / network) */
  .coalert { flex: none; display: grid; gap: 4px; padding: 12px 16px; border-radius: 18px; background: rgb(255 122 127 / .1); box-shadow: inset 0 0 0 1px rgb(255 122 127 / .35); outline: none; animation: co-rise .3s var(--ease); }
  .coalert b { display: flex; align-items: center; gap: 8px; color: var(--co-bad); }
  .coalert b .i { width: 20px; height: 20px; flex: none; }
  .coalert span { color: var(--c-dim); }
  .coalert a { color: var(--c-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

  /* actions */
  .coact { flex: none; display: flex; gap: 10px; }
  .coact__back { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: var(--c-text);
    background: linear-gradient(180deg, rgb(255 255 255 / .1), rgb(255 255 255 / .03)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), inset 0 0 0 1px rgb(255 255 255 / .1); }
  .coact__back .i { width: 22px; height: 22px; }
  .coact__back:active { scale: .94; }
  .coact__go { position: relative; flex: 1; min-height: 60px; font-size: var(--t-lead); gap: 12px; box-shadow: 0 16px 34px -18px rgb(198 255 0 / .55); }
  .coact__go .i { transition: translate .3s var(--ease); }
  .coact__go.is-ready .i { animation: co-nudge 1.6s var(--ease) infinite; }
  @keyframes co-nudge { 50% { translate: 5px 0; } }
  .coact__l { font-feature-settings: "tnum", "locl" 0; }
  .coact__spin { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 2.5px solid rgb(11 12 13 / .25); border-top-color: var(--c-on-acid); opacity: 0; }
  .coact__go.is-busy { pointer-events: none; }
  .coact__go.is-busy > :not(.coact__spin) { opacity: 0; }
  .coact__go.is-busy .coact__spin { opacity: 1; animation: co-spin .7s linear infinite; }
  @keyframes co-spin { to { rotate: 360deg; } }
  /* the toast („Махнато: …“, „Копирано“) never covers the action button or takes its tap: above the bar on the phone,
     beside the card (under the summary) on desktop */
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); pointer-events: none; }
  @media (min-width: 1024px) { .toast { left: auto; right: var(--gut); translate: none; bottom: 32px; } }

  /* ── summary: bottom sheet (phone) / panel (desktop) ── */
  .coscrim { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: co-fade .3s both; }
  @keyframes co-fade { from { opacity: 0; } }
  .cosum { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 14px; max-height: 86dvh; padding: 18px var(--gut) calc(18px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0; background: radial-gradient(120% 50% at 50% 0%, #2a2b30, #17181b 60%); box-shadow: 0 -20px 60px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .1);
    transform: translateY(105%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; }
  .cosum.is-open { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
  .cosum__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .cosum__t { font: 800 26px/1 var(--f-display); text-transform: uppercase; letter-spacing: -.03em; }
  .cosum__t span { color: var(--c-dim); font: 700 var(--t-mono)/1 var(--f-mono); letter-spacing: .02em; vertical-align: middle; }
  .cosum__x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--co-line); }
  .cosum__x .i { width: 18px; height: 18px; }
  .cosum__notice { padding: 10px 14px; border-radius: 14px; background: rgb(255 255 255 / .06); font: 500 16px/1.35 var(--f-ui); }
  .cosum__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; list-style: none; }
  .coli { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--c-hair); }
  .coli:first-child { padding-top: 4px; }
  .coli__img { align-self: start; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: radial-gradient(90% 80% at 50% 38%, #fff, var(--c-tile) 52%, var(--c-tile-2)); }
  .coli__img img { width: 100%; height: 100%; object-fit: contain; padding: 10%; mix-blend-mode: multiply; }
  .coli__body { display: grid; gap: 6px; min-width: 0; }
  .coli__name { font: 600 16px/1.25 var(--f-ui); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .coli__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--c-dim); font: 500 16px/1.2 var(--f-ui); }
  .coli__meta:empty { display: none; }
  .coli__meta b { padding: 4px 8px; border-radius: 7px; background: rgb(255 255 255 / .1); color: var(--c-text); font: 700 15px/1 var(--f-mono); }
  .coli__chk { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); }
  .coli__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .coli__px { font: 800 var(--t-ui)/1 var(--f-ui); color: var(--acid); white-space: nowrap; font-feature-settings: "tnum", "locl" 0; }
  .coqty { display: inline-flex; align-items: center; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--co-line); }
  .coqty button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
  .coqty button:active { background: rgb(255 255 255 / .1); }
  .coqty button:disabled { opacity: .3; cursor: default; }
  .coqty button:focus-visible { outline: 2px solid var(--c-text); outline-offset: -3px; }
  .coqty .i { width: 16px; height: 16px; }
  .coqty b { min-width: 18px; text-align: center; font: 800 16px/1 var(--f-mono); }
  .coli.is-gone .coli__img, .coli.is-gone .coli__name, .coli.is-gone .coli__px { opacity: .4; }
  .coli__err { display: flex; align-items: center; gap: 8px; color: var(--co-bad); font: 600 16px/1.25 var(--f-ui); }
  .coli__err .i { width: 18px; height: 18px; flex: none; }
  .csz { display: flex; flex-wrap: wrap; gap: 6px; }
  .csz button { min-width: 48px; min-height: 44px; padding: 0 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgb(255 122 127 / .55); font: 700 16px/1 var(--f-ui); transition: background-color .15s; }
  .csz button:active, .csz button:focus-visible { background: var(--c-text); color: var(--c-on-acid); outline: none; }
  .cosum__rows { display: grid; gap: 8px; margin: 0; }
  .cosum__rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
  .cosum__rows dt { color: var(--c-dim); }
  .cosum__rows dd { margin: 0; font-weight: 700; white-space: nowrap; font-feature-settings: "tnum", "locl" 0; }
  .cosum__rows dd.is-soft { font-weight: 500; color: var(--c-dim); }
  .cosum__total { padding-top: 10px; border-top: 1px solid var(--co-line); }
  .cosum__total dt { color: var(--c-text); font-weight: 700; white-space: nowrap; }
  .cosum__total .price { font-size: 28px; line-height: 1; }
  .cosum__trust { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .cosum__trust li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-pill); background: rgb(255 255 255 / .06); color: var(--c-dim); font: 500 16px/1 var(--f-ui); }
  .cosum__trust .i { width: 18px; height: 18px; color: var(--c-text); }

  /* ── desktop: steps in a glass card, the summary beside it ── */
  @media (min-width: 1024px) {
    .co { padding-bottom: 28px; }
    .copill { display: none; }
    .co__app { flex-direction: row; align-items: stretch; justify-content: center; gap: 28px; margin-top: 8px; }
    .cowiz { flex: 0 1 600px; padding: 30px 34px; border-radius: 34px; background: rgb(20 21 24 / .55); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
      box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), inset 0 0 0 1px rgb(255 255 255 / .08), 0 40px 80px -40px rgb(0 0 0 / .9); }
    .coscrim { display: none; }
    .cosum { position: static; flex: 0 0 380px; max-height: none; transform: none; visibility: visible; transition: none; border-radius: 34px; padding: 28px;
      background: rgb(20 21 24 / .55); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
      box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), inset 0 0 0 1px rgb(255 255 255 / .08), 0 40px 80px -40px rgb(0 0 0 / .9); }
    .cosum__x { display: none; }
    .costep__t { font-size: clamp(44px, 4.4vw, 64px); }
  }
  @media (min-width: 1024px) and (max-height: 760px) { .cotile { min-height: 124px; } .costep__t { font-size: 44px; } }
  /* short phones: tighter */
  @media (max-height: 700px) and (max-width: 1023px) {
    .costep__t { font-size: clamp(28px, 8.4vw, 40px); }
    .cotile { min-height: 124px; }
    .cof__in { height: 58px; padding-top: 21px; }
    .cof__l { top: 18px; }
    .cotop__logo { width: 42px; }
    .costep { gap: 12px; }
    .costep__t em { display: inline; }
    .corev li { padding: 6px 8px 6px 6px; gap: 12px; }
    .corev__ic { width: 40px; height: 40px; }
    .cototal small { display: none; }
    .cototal { grid-template-columns: auto auto; align-items: baseline; justify-content: center; gap: 12px; }
    .cototal .price { font-size: 36px; }
    .cochk { min-height: 40px; }
    .copill { min-height: 50px; }
    .copill__pics i { width: 34px; height: 34px; }
    .codone { gap: 14px; }
    .codone__mark svg { width: 68px; height: 68px; }
    .codone__ic { width: 46px; height: 46px; }
    .codone__flow::before { top: 22px; }
  }

  /* ── empty ── */
  .coempty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; width: min(100%, 420px); margin: 0 auto; text-align: center; }
  .coempty__art { display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; color: var(--c-text);
    background: radial-gradient(60% 60% at 50% 30%, rgb(255 255 255 / .12), transparent 72%); box-shadow: inset 0 0 0 1px var(--co-line); }
  .coempty__art .i { width: 56px; height: 56px; stroke-width: 1.2; }
  .coempty__t { font: 800 clamp(40px, 12vw, 64px)/.9 var(--f-display); text-transform: uppercase; letter-spacing: -.045em; }
  .coempty__cats { display: grid; gap: 8px; width: 100%; }
  .coempty__cats a { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0 20px; border-radius: 18px; font-weight: 700;
    background: linear-gradient(160deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
  .coempty__cats .i { width: 20px; height: 20px; transition: translate .3s var(--ease); }
  @media (hover: hover) { .coempty__cats a:hover .i { translate: 4px 0; } }

  /* ── done ── */
  .codone { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; width: min(100%, 520px); margin: 0 auto; text-align: center; }
  .codone__mark { position: relative; }
  .codone__mark::before { content: ""; position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(closest-side, rgb(198 255 0 / .16), transparent); }
  .codone__mark svg { position: relative; width: 96px; height: 96px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .codone__mark circle { stroke: rgb(255 255 255 / .2); stroke-width: 2; }
  .codone__mark path { stroke: var(--acid); stroke-width: 3.2; stroke-dasharray: 40; }
  .codone.is-in .codone__mark path { animation: co-tick .7s .15s var(--ease) both; }
  .codone.is-in .codone__mark svg { animation: co-pop .6s var(--ease) both; }
  @keyframes co-tick { from { stroke-dashoffset: 40; } }
  @keyframes co-pop { from { transform: scale(.6); opacity: 0; } }
  .codone__t { font: 800 clamp(34px, 10vw, 60px)/.95 var(--f-display); text-transform: uppercase; letter-spacing: -.045em; text-wrap: balance; outline: none; }
  .codone__num { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: var(--r-pill);
    background: rgb(255 255 255 / .07); box-shadow: inset 0 0 0 1px var(--co-line); transition: background-color .2s; }
  .codone__num span { color: var(--c-dim); font: 700 var(--t-mono)/1 var(--f-mono); }
  .codone__num b { font: 800 var(--t-lead)/1 var(--f-mono); letter-spacing: .02em; }
  .codone__num .i { width: 18px; height: 18px; color: var(--c-dim); }
  .codone__num:active { background: rgb(255 255 255 / .12); }
  .codone__flow { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin: 4px 0 0; padding: 0; list-style: none; }
  .codone__flow::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 27px; height: 1px; background: linear-gradient(90deg, var(--c-text), rgb(255 255 255 / .15)); }
  .codone__flow li { position: relative; display: grid; justify-items: center; gap: 10px; }
  .codone__ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #1b1c1f; box-shadow: inset 0 0 0 1px var(--co-line); }
  .codone__flow li:first-child .codone__ic { background: var(--c-text); color: var(--c-on-acid); box-shadow: 0 0 0 6px rgb(255 255 255 / .08); }
  .codone__ic .i { width: 24px; height: 24px; }
  .codone__flow b { font: 700 16px/1.2 var(--f-ui); }
  .codone.is-in .codone__flow li { animation: co-rise .5s var(--ease) both; }
  .codone.is-in .codone__flow li:nth-child(2) { animation-delay: .1s; }
  .codone.is-in .codone__flow li:nth-child(3) { animation-delay: .2s; }
  .codone__bag { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 16px; width: 100%; padding: 14px 18px 14px 14px; border-radius: 24px; text-align: left;
    background: linear-gradient(160deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
  .codone__how { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); overflow-wrap: anywhere; }
  .codone__bag .copill__pics { grid-row: span 2; }
  .codone__bag .price { font-size: 26px; white-space: nowrap; }
  .codone__items { display: grid; gap: 10px; width: 100%; margin: 0; padding: 0 4px; list-style: none; text-align: left; }
  .codone__items li { display: grid; gap: 2px; font: 600 16px/1.3 var(--f-ui); }
  .codone__items small { color: var(--c-dim); font: 500 16px/1.3 var(--f-ui); }
  .codone__items small b { color: var(--c-text); }
  .codone__note { margin: 0; color: var(--c-dim); font: 500 16px/1.4 var(--f-ui); text-wrap: balance; }
  .codone__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .codone__acts .btn .i { width: 20px; height: 20px; }

  @media (prefers-reduced-motion: reduce) {
    .costep.in-r, .costep.in-l, .copanel, .copick, .cof__e:not([hidden]), .coact__go.is-ready .i, .copill__dot, .costore__map i::after, .cotiles.is-picked .cotile,
    .codone.is-in .codone__mark path, .codone.is-in .codone__mark svg, .codone.is-in .codone__flow li, .coalert, .coscrim { animation: none; }
    .cosum { transition: none; }
  }
}
