/* ═══════════════════════════════════════════════════════════════════
   Atelye — the customer site design system (PRD-216, LOOM-323).
   Source of truth: mobile DS v2 (2026-11-14) and the site mockup v3
   (~/.config/loom/state/site-mockup-2026-11-14/loom-atelye-site.html).

   Every Atelye page loads THIS file and nothing of the old skin
   (theme.css, nav.css, auth.css, login-modal.css, market.css,
   products-catalog.css). No skin block, no override of old classes:
   every class here is atl-*. Header, bottom nav and footer markup come
   from assets/shell.js.

   Font: each page links Archivo from Google Fonts (same source as the
   configurator):
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..800&display=swap" rel="stylesheet">

   Token values equal assets/cfg-atelye.css (scoped there to
   html.cfg-atelye under 900 px). Some class names also exist in
   cfg-atelye.css (atl-chip, atl-sheet, atl-toast, atl-tag, ...): the
   configurator must never load this file whole.

   Breakpoint: 900 px (phone below, desktop from 900). Coral --brand
   is decoration only (logo slash), never under text. Targets >= 44 px.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --page: #f5f5f2; --card: #ffffff;
  --canvas: #e4e7ea; --grid: rgba(20, 23, 26, .07);
  --surface: #ffffff; --surface2: #e9ecef;
  --ink: #14171a; --mut: #59616a; --ln: rgba(20, 23, 26, .16);
  --brand: #fc5044; --cta: #d93529; --cta-press: #b82a20; --on-cta: #ffffff;
  --alert: #c4291d; --alert-bg: #fdecea; --ok: #1d7a46; --ok-bg: #e3f2e9;
  --r-chip: 6px; --r-btn: 8px; --r-panel: 12px; --r-sheet: 14px;
  --e1: 0 0 0 1px var(--ln), 0 6px 14px -6px rgba(14, 18, 24, .28);
  --e2: 0 0 0 1px var(--ln), 0 -14px 30px -12px rgba(14, 18, 24, .3);
  --t-fast: 100ms; --t-base: 140ms; --t-sheet: 220ms;
  --ease: cubic-bezier(.2, 0, 0, 1); --ease-out: cubic-bezier(.4, 0, 1, 1);
  --f: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Safe areas; inside Telegram 8.0+ the Mini App insets win. */
  --atl-st: env(safe-area-inset-top, 0px);
  --atl-sb: env(safe-area-inset-bottom, 0px);
  --atl-bnav-h: 60px;
  color-scheme: light;
}
html.tma {
  --atl-st: var(--tma-top, env(safe-area-inset-top, 0px));
  --atl-sb: var(--tma-bottom, env(safe-area-inset-bottom, 0px));
}
/* boot.js stamps data-theme; light is the default (LOOM-360), so a page
   whose boot script failed stays light whatever the device setting. */
:root[data-theme="dark"] {
  --page: #121315; --card: #1b1d20; --canvas: #1c1f23; --grid: rgba(255, 255, 255, .05);
  --surface: #2a2e33; --surface2: #3a4047;
  --ink: #f0f2f4; --mut: #a3abb3; --ln: rgba(255, 255, 255, .16);
  --alert: #ff9a8f; --alert-bg: #40211e; --ok: #5fd08f; --ok-bg: #163223;
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--page); color: var(--ink);
  font: 400 15px/1.5 var(--f);
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--page); }

.atl-ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.atl-ic-s { width: 18px; height: 18px; }
.atl-num { font-variant-numeric: tabular-nums; }
.atl-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.atl-skip { position: fixed; left: 8px; top: 8px; z-index: 100; transform: translateY(-200%); background: var(--ink); color: var(--page); min-height: 44px; padding: 12px 16px; border-radius: var(--r-btn); font-weight: 700; text-decoration: none; }
.atl-skip:focus-visible { transform: none; }

/* ── Type ───────────────────────────────────────────────────────── */
.atl-wm { font: 800 18px/1 var(--f); font-stretch: 125%; letter-spacing: .14em; display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.atl-wm i { font-style: normal; color: var(--brand); margin-left: .06em; }
.atl-wm i::before { content: "/"; }
.atl-t1 { font: 700 27px/1.08 var(--f); font-stretch: 118%; letter-spacing: -.01em; }
.atl-t2 { font: 700 18px/1.2 var(--f); font-stretch: 108%; }
.atl-t3 { font: 700 15px/1.3 var(--f); }
.atl-lead { color: var(--mut); font-size: 15px; max-width: 58ch; }
.atl-sm { font-size: 13px; color: var(--mut); }
.atl-warn { color: var(--alert); font-weight: 700; }
.atl-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.atl-lnk { font: 600 14px var(--f); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; }
/* garment landing links under the catalog and home cards (LOOM-332) */
.atl-glinks { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px 0 0; }
@media (min-width: 900px) {
  .atl-t1 { font-size: 42px; }
  .atl-t2 { font-size: 22px; }
}

/* ── Layout ─────────────────────────────────────────────────────── */
.atl-wrap { padding: 16px; display: flex; flex-direction: column; gap: 22px; width: 100%; }
.atl-two { display: flex; flex-direction: column; gap: 22px; }
/* .atl-only-d hides below 900 px and leaves the element's own display
   alone above it (no `revert`, which made an a.atl-btn inline). */
@media (max-width: 899.98px) { .atl-only-d { display: none !important; } }
@media (min-width: 900px) {
  /* 1184 px content column, same as the header and footer */
  .atl-wrap { max-width: 1280px; margin: 0 auto; padding: 40px 48px 72px; gap: 32px; }
  .atl-wrap-narrow { max-width: 720px; }
  .atl-two { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
  .atl-two-left { grid-template-columns: 400px minmax(0, 1fr); }
  .atl-stick { position: sticky; top: 96px; }
  .atl-only-m { display: none !important; }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.atl-btn {
  height: 48px; padding: 0 16px; border-radius: var(--r-btn);
  font: 700 14.5px var(--f); white-space: nowrap; text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0;
  background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background var(--t-fast) var(--ease);
}
.atl-btn:hover, .atl-btn:active { background: var(--surface2); }
.atl-btn-p { background: var(--cta); color: var(--on-cta); box-shadow: none; }
.atl-btn-p:hover, .atl-btn-p:active { background: var(--cta-press); }
.atl-btn-g { background: var(--ink); color: var(--page); box-shadow: none; }
.atl-btn-g:hover, .atl-btn-g:active { background: var(--ink); opacity: .88; }
.atl-btn-w { width: 100%; }
.atl-btn:disabled, .atl-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.atl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.atl-btns > * { flex: 1 1 140px; }
.atl-ib { width: 44px; height: 44px; border-radius: var(--r-chip); display: grid; place-items: center; flex: none; position: relative; color: var(--ink); text-decoration: none; }
.atl-ib:hover, .atl-ib:active { background: var(--surface2); }
.atl-bdg { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--cta); color: var(--on-cta); font: 700 11px/18px var(--f); text-align: center; padding: 0 4px; font-variant-numeric: tabular-nums; }

/* ── Chips, sizes, swatches ─────────────────────────────────────── */
.atl-chip { height: 44px; min-width: 44px; padding: 0 13px; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--ln); background: var(--surface); font: 600 13.5px var(--f); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; text-decoration: none; }
.atl-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.atl-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.atl-chips::-webkit-scrollbar { display: none; }
.atl-szs { display: flex; flex-wrap: wrap; gap: 6px; }
.atl-sz { width: 44px; height: 44px; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--ln); background: var(--surface); font: 600 13.5px var(--f); font-variant-numeric: tabular-nums; text-align: center; }
.atl-sz[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.atl-szs-need .atl-sz:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1.5px var(--cta); }
.atl-sw { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-chip); flex: none; }
.atl-sw i { width: 30px; height: 30px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--ln); display: block; }
.atl-sw[aria-pressed="true"] i { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (min-width: 900px) {
  .atl-chips { margin: 0; padding: 0; flex-wrap: wrap; }
}

/* ── Forms ──────────────────────────────────────────────────────── */
.atl-form { display: flex; flex-direction: column; gap: 16px; }
.atl-fs { display: flex; flex-direction: column; gap: 14px; border: 0; margin: 0; padding: 0; min-width: 0; }
.atl-fs legend { font: 700 16px var(--f); padding: 0; margin-bottom: 12px; }
.atl-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.atl-field-l { font: 600 13.5px var(--f); }
.atl-field-l i { font-style: normal; font-weight: 500; color: var(--mut); }
.atl-inp { height: 48px; border-radius: var(--r-btn); box-shadow: inset 0 0 0 1.5px var(--ln); background: var(--surface); padding: 0 12px; font: 500 16px var(--f); width: 100%; border: 0; min-width: 0; display: flex; align-items: center; gap: 8px; }
textarea.atl-inp { height: 88px; padding: 12px; resize: vertical; }
select.atl-inp { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.atl-inp:focus, .atl-inp:focus-within { box-shadow: inset 0 0 0 2px var(--ink); outline: none; }
.atl-inp-err, .atl-inp[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--alert); }
.atl-inp input { border: 0; background: none; flex: 1; min-width: 0; height: 100%; font: 500 16px var(--f); outline: none; padding: 0; }
.atl-inp-pre { font: 600 16px var(--f); color: var(--mut); font-variant-numeric: tabular-nums; }
.atl-inp-ok { font: 700 12px var(--f); color: var(--ok); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.atl-hint { font-size: 13px; color: var(--mut); }
.atl-ferr { font-size: 13px; color: var(--alert); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.atl-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.atl-opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--r-btn); box-shadow: inset 0 0 0 1px var(--ln); background: var(--surface); min-height: 56px; width: 100%; text-align: left; }
.atl-opt[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.atl-opt[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.atl-opt-rd { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--mut); flex: none; margin-top: 1px; }
.atl-opt[aria-checked="true"] .atl-opt-rd { box-shadow: inset 0 0 0 7px var(--ink); }
.atl-opt-tx { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.atl-opt-tx b { font-weight: 700; font-size: 15px; }
.atl-opt-tx i { font-style: normal; font-size: 13px; color: var(--mut); }
.atl-tgl { width: 52px; height: 44px; flex: none; display: grid; place-items: center; }
.atl-tgl i { width: 44px; height: 26px; border-radius: 13px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--ln); position: relative; display: block; transition: background var(--t-fast) var(--ease); }
.atl-tgl i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform var(--t-base) var(--ease); }
.atl-tgl[aria-checked="true"] i { background: var(--ink); }
.atl-tgl[aria-checked="true"] i::after { transform: translateX(18px); }
.atl-qty { display: inline-flex; align-items: center; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--ln); }
.atl-qty button { width: 44px; height: 44px; display: grid; place-items: center; }
.atl-qty output { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Tags and status pills ──────────────────────────────────────── */
.atl-tag { font: 700 11.5px var(--f); padding: 3px 7px; border-radius: 4px; background: var(--surface2); color: var(--ink); white-space: nowrap; align-self: center; }
.atl-pill { font: 700 12px var(--f); padding: 4px 8px; border-radius: 4px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; background: var(--surface2); color: var(--ink); }
.atl-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.atl-pill-ok { background: var(--ok-bg); color: var(--ok); }
.atl-pill-no { background: var(--alert-bg); color: var(--alert); }

/* ── Lists, rows, panels ────────────────────────────────────────── */
.atl-lst { display: flex; flex-direction: column; }
.atl-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--ln); width: 100%; text-align: left; text-decoration: none; }
.atl-row:last-child { border-bottom: 0; }
a.atl-row:active, button.atl-row:active { background: var(--surface2); }
.atl-row-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.atl-row-tx b { font-weight: 600; font-size: 15px; }
.atl-row-tx i { font-style: normal; font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
.atl-row-v { font-size: 14px; color: var(--mut); white-space: nowrap; }
.atl-row-ico { width: 36px; height: 36px; border-radius: 8px; background: var(--surface2); display: grid; place-items: center; flex: none; }
.atl-row-dg, .atl-row-dg .atl-row-ico { color: var(--alert); }
.atl-grp { display: flex; flex-direction: column; gap: 6px; }
.atl-grp > h2 { font: 700 13px var(--f); color: var(--mut); }
.atl-panel { background: var(--surface); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--ln); padding: 4px 14px; }
.atl-card { background: var(--surface); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--ln); padding: 16px; display: flex; flex-direction: column; gap: 12px; }

/* ── Products ───────────────────────────────────────────────────── */
.atl-cv { background-color: var(--canvas); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 17.3px 17.3px; position: relative; }
.atl-gtile { border-radius: var(--r-panel); aspect-ratio: 1 / 1.1; display: grid; place-items: center; padding: 12%; max-width: 100%; overflow: hidden; }
.atl-gtile img { width: 100%; height: 100%; object-fit: contain; }
.atl-pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
.atl-pc { display: flex; flex-direction: column; gap: 8px; text-align: left; min-width: 0; width: 100%; text-decoration: none; }
.atl-pc-nm { font: 600 14.5px/1.25 var(--f); }
.atl-pc-pr { font: 700 14px var(--f); font-variant-numeric: tabular-nums; }
.atl-pc .atl-tag { align-self: flex-start; }
.atl-hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.atl-hscroll::-webkit-scrollbar { display: none; }
.atl-hscroll .atl-pc { width: 150px; flex: none; }
.atl-thumb { width: 64px; height: 72px; border-radius: 8px; flex: none; display: grid; place-items: center; padding: 6px; overflow: hidden; }
.atl-thumb img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 900px) {
  .atl-pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
  .atl-hscroll { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
  .atl-hscroll .atl-pc { width: auto; }
}

/* ── Money: price lines ─────────────────────────────────────────── */
.atl-price-lines { display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.atl-price-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.atl-price-lines .atl-price-tot { font: 700 17px var(--f); border-top: 1px solid var(--ln); padding-top: 10px; }

/* ── Feedback: banner, toast, spinner, skeleton, empty ──────────── */
.atl-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-btn); background: var(--alert-bg); color: var(--alert); font-size: 14px; font-weight: 600; }
.atl-banner-info { background: var(--surface2); color: var(--ink); font-weight: 500; }
.atl-banner-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.atl-toast { position: fixed; left: 50%; top: calc(66px + var(--atl-st)); transform: translateX(-50%); background: var(--ink); color: var(--surface); font: 600 13.5px var(--f); padding: 11px 14px; border-radius: var(--r-chip); z-index: 60; display: flex; gap: 8px; align-items: center; width: max-content; max-width: calc(100% - 24px); box-shadow: var(--e1); animation: atl-upc var(--t-sheet) var(--ease); }
.atl-toast-err { background: var(--alert-bg); color: var(--alert); box-shadow: inset 0 0 0 1.5px var(--alert); }
.atl-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.2px solid currentColor; border-right-color: transparent; animation: atl-spin .8s linear infinite; flex: none; display: inline-block; }
.atl-skel { display: block; background: var(--surface2); border-radius: 8px; animation: atl-shim 1.1s ease-in-out infinite alternate; }
.atl-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px 0; }
.atl-empty .atl-cv { width: 120px; height: 120px; border-radius: var(--r-panel); display: grid; place-items: center; padding: 18px; }
.atl-center { align-items: center; text-align: center; }
.atl-center .atl-lead { margin: 0 auto; }

/* ── Sheet (bottom on phone, centred dialog on desktop) ─────────── */
.atl-dim { position: fixed; inset: 0; background: rgba(10, 12, 14, .38); z-index: 50; }
.atl-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--surface); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--e2); padding: 0 16px calc(16px + var(--atl-sb)); display: flex; flex-direction: column; gap: 12px; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; animation: atl-up var(--t-sheet) var(--ease); }
.atl-sheet-grab { height: 22px; display: grid; place-items: center; flex: none; }
.atl-sheet-grab::before { content: ""; width: 38px; height: 4px; border-radius: 2px; background: var(--mut); opacity: .55; }
.atl-sheet-h { font: 700 17px var(--f); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
@media (min-width: 900px) {
  .atl-sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(480px, calc(100% - 48px)); transform: translate(-50%, -50%); border-radius: var(--r-sheet); box-shadow: var(--e1); padding: 20px 24px 24px; animation: none; }
  .atl-sheet-grab { display: none; }
}

/* ── Steps (order timeline) and FAQ ─────────────────────────────── */
.atl-steps { list-style: none; display: flex; flex-direction: column; }
.atl-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.atl-steps li:last-child { padding-bottom: 0; }
.atl-steps li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; background: var(--ln); }
.atl-steps li:last-child::before { display: none; }
.atl-steps-dot { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ln); display: grid; place-items: center; background: var(--page); position: relative; }
.atl-steps .atl-done .atl-steps-dot { background: var(--ink); color: var(--surface); box-shadow: none; }
.atl-steps li.atl-done::before { background: var(--ink); }
.atl-steps .atl-cur .atl-steps-dot { box-shadow: inset 0 0 0 2px var(--ink); }
.atl-steps .atl-cur .atl-steps-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cta); }
.atl-steps b { font-weight: 700; display: block; }
.atl-steps i { font-style: normal; font-size: 13px; color: var(--mut); }
.atl-faq { border-bottom: 1px solid var(--ln); }
.atl-faq summary { list-style: none; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 600 15.5px var(--f); cursor: pointer; }
.atl-faq summary::-webkit-details-marker { display: none; }
.atl-faq summary::after { content: "+"; font: 400 24px/1 var(--f); color: var(--mut); }
.atl-faq[open] summary::after { content: "\2013"; }
.atl-faq p { padding: 0 0 16px; color: var(--mut); max-width: 62ch; }

/* Numbered steps (a real sequence only): <ol class="atl-ol"><li><b>1</b>
   <span><b>Title</b><i>Sub</i></span></li></ol> */
.atl-ol { list-style: none; display: grid; gap: 14px; }
.atl-ol > li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.atl-ol > li > b { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: var(--surface); display: grid; place-items: center; font: 700 14px var(--f); }
.atl-ol > li > span { display: flex; flex-direction: column; gap: 2px; }
.atl-ol > li > span i { font-style: normal; font-size: 14px; color: var(--mut); }

/* Phone action bar: price + the money button(s), replaces the bottom
   nav (body.atl-abar-on). Desktop uses the page's own panel button.
   .atl-abar-fit: price takes the room, buttons hug their label, and the
   bar stays in Telegram (only the [data-tma-main] button hides). */
.atl-abar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + var(--atl-sb)); background: var(--surface); box-shadow: 0 -1px 0 var(--ln); }
.atl-abar-pr { display: flex; flex-direction: column; line-height: 1.15; flex: none; min-width: 0; font-variant-numeric: tabular-nums; }
.atl-abar-pr b { font: 700 15px var(--f); white-space: nowrap; }
.atl-abar-pr span { font-size: 12px; color: var(--mut); white-space: nowrap; }
.atl-abar .atl-btn { flex: 1 1 0; padding: 0 10px; }
.atl-abar-fit .atl-abar-pr { flex: 1 1 auto; }
.atl-abar-fit .atl-btn { flex: none; padding: 0 14px; }
body.atl-abar-on { padding-bottom: calc(64px + var(--atl-sb)); }
body.atl-abar-on .atl-bnav { display: none; }
@media (min-width: 900px) {
  .atl-abar { display: none; }
  body.atl-abar-on { padding-bottom: 0; }
}
html.tma .atl-abar:not(.atl-abar-fit) { display: none; }
html.tma body.atl-abar-on:not(:has(.atl-abar-fit)) { padding-bottom: var(--atl-sb); }

/* Address picker (markup from assets/address-picker.js) */
.atl-addr { display: flex; flex-direction: column; gap: 10px; isolation: isolate; }
.atl-addr-search { position: relative; }
.atl-addr-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mut); pointer-events: none; }
.atl-addr-search-input { height: 48px; width: 100%; border: 0; border-radius: var(--r-btn); box-shadow: inset 0 0 0 1.5px var(--ln); background: var(--surface); padding: 0 12px 0 40px; font: 500 16px var(--f); }
.atl-addr-search-input:focus { box-shadow: inset 0 0 0 2px var(--ink); outline: none; }
.atl-addr-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5; background: var(--surface); border-radius: var(--r-btn); box-shadow: var(--e1); overflow: hidden; }
.atl-addr-suggest-item { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 48px; justify-content: center; padding: 8px 14px; border-bottom: 1px solid var(--ln); font-size: 14.5px; }
.atl-addr-suggest-item:last-child { border-bottom: 0; }
.atl-addr-suggest-item:hover { background: var(--surface2); }
.atl-addr-suggest-item small { color: var(--mut); font-size: 12.5px; }
/* The map paints only inside its own box: isolation keeps MapLibre's control z-indexes
   local, and paint containment clips the canvas even where WebKit ignores
   overflow + border-radius on composited layers. */
.atl-addr-map-wrap { position: relative; isolation: isolate; contain: paint; border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--ln); overflow: hidden; }
.atl-addr-map { height: 260px; width: 100%; background: var(--canvas); }
.atl-addr-pin { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
.atl-addr-locate { position: absolute; right: 10px; bottom: 34px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--e1); }
.atl-addr-line { min-height: 22px; }
.atl-addr-line-text { font-size: 14px; color: var(--mut); }
.atl-addr-line-text[data-state="ok"] { color: var(--ink); }
.atl-addr-map .maplibregl-ctrl-group { background: var(--surface); border-radius: var(--r-btn); box-shadow: var(--e1); }
.atl-addr-map .maplibregl-ctrl-group button { width: 44px; height: 44px; }
.atl-addr-map .maplibregl-ctrl-group button + button { border-top-color: var(--ln); }
html[data-theme="dark"] .atl-addr-map .maplibregl-ctrl-icon { filter: invert(1); }
.atl-addr-map .maplibregl-ctrl-attrib { background: var(--surface); color: var(--mut); font-size: 10px; max-width: 100%; }
.atl-addr-map .maplibregl-ctrl-attrib a { color: inherit; }

.atl-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font: 700 19px var(--f); flex: none; overflow: hidden; }
.atl-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ Shell (markup from assets/shell.js) ════════════════════════ */

/* Phone top bar */
.atl-mbar { height: calc(56px + var(--atl-st)); padding: var(--atl-st) 8px 0 16px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20; background: var(--page); box-shadow: 0 1px 0 var(--ln); }
.atl-mbar .atl-wm { font-size: 16px; min-height: 44px; }
.atl-mbar-sp { flex: 1; }
.atl-mbar-sub { padding-left: 6px; }
.atl-mbar h1 { font: 700 17px/1.2 var(--f); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 359px) { .atl-mbar h1 { font-size: 15px; } }

/* Desktop header (shown from 900 px) */
.atl-hdr { display: none; }

/* Bottom nav (phone) */
.atl-bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 4px 4px var(--atl-sb); background: var(--surface); box-shadow: 0 -1px 0 var(--ln); }
.atl-bnav a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 600 11px/1.1 var(--f); color: var(--mut); border-radius: var(--r-chip); position: relative; min-width: 0; text-decoration: none; white-space: nowrap; }
.atl-bnav-t { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.atl-bnav a[aria-current="page"] { color: var(--ink); }
.atl-bnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2.5px; border-radius: 2px; background: var(--ink); }
.atl-bnav-mk { width: 40px; height: 30px; border-radius: 7px; background: var(--ink); color: var(--surface); display: grid; place-items: center; }
.atl-bnav .atl-bdg { top: 4px; left: calc(50% + 4px); right: auto; min-width: 17px; height: 17px; font-size: 10.5px; line-height: 17px; }
.atl-has-bnav { padding-bottom: calc(var(--atl-bnav-h) + var(--atl-sb)); }

/* Language picker (header and footer) */
.atl-lang { height: 44px; border: 0; border-radius: var(--r-chip); background: none; padding: 0 8px; font: 600 14px var(--f); color: var(--ink); cursor: pointer; }
.atl-lang:hover { background: var(--surface2); }
.atl-lang option { background: var(--surface); color: var(--ink); }

/* Footer */
.atl-foot { border-top: 1px solid var(--ln); padding: 22px 16px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.atl-foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.atl-foot nav a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.atl-foot nav a:hover { text-decoration: underline; }
.atl-foot-meta { font-size: 13px; color: var(--mut); }
.atl-foot-meta a { display: inline-flex; align-items: center; min-height: 44px; }
/* phone footer wrapper: layout as if its children sat in .atl-foot */
.atl-foot-m { display: contents; }

@media (min-width: 900px) {
  .atl-mbar, .atl-bnav { display: none; }
  .atl-has-bnav { padding-bottom: 0; }
  /* Header (desktop mockup 2026-11-15): surface bar, content on the
     1184 px column, hover = grey fill, focus = 2 px ink ring. */
  .atl-hdr { display: flex; align-items: center; gap: 28px; height: 72px; padding: 0 max(40px, calc((100% - 1184px) / 2)); position: sticky; top: 0; z-index: 20; background: var(--surface); box-shadow: 0 1px 0 var(--ln); }
  .atl-hdr .atl-wm { font-size: 20px; min-height: 44px; }
  .atl-hdr nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
  .atl-hdr nav a { height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; border-radius: var(--r-chip); display: inline-flex; align-items: center; font: 600 14.5px var(--f); color: var(--mut); text-decoration: none; white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
  .atl-hdr nav a:hover { color: var(--ink); background: var(--surface2); }
  .atl-hdr nav a[aria-current="page"] { color: var(--ink); border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: inset 0 -2px 0 var(--ink); }
  .atl-hdr nav a[aria-current="page"]:hover { background: none; }
  .atl-hdr-r { display: flex; gap: 8px; align-items: center; flex: none; }
  .atl-hdr-r .atl-btn-p { padding: 0 16px; }
  .atl-hdr-btn, .atl-hdr-cart { width: auto; min-width: 44px; padding: 0 10px; display: inline-flex; gap: 6px; font: 600 14px var(--f); white-space: nowrap; }
  .atl-hdr-cart .atl-bdg { position: static; min-width: 20px; height: 20px; border-radius: 10px; background: var(--ink); color: var(--surface); line-height: 20px; font-size: 11.5px; }
  .atl-hdr-av { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font: 700 12px var(--f); }
  .atl-hdr a[aria-current="page"].atl-hdr-btn { box-shadow: inset 0 -2px 0 var(--ink); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  /* header menus (language, profile) */
  .atl-hdr-pop { position: relative; }
  .atl-menu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 25; min-width: 220px; padding: 6px; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-panel); box-shadow: 0 0 0 1px var(--ln), 0 24px 48px -18px rgba(14, 18, 24, .4); animation: atl-menu-in var(--t-base) var(--ease); }
  .atl-menu[hidden] { display: none; }
  .atl-menu > a, .atl-menu > button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--r-chip); font: 500 14.5px var(--f); color: var(--ink); text-decoration: none; text-align: left; white-space: nowrap; }
  .atl-menu > a:hover, .atl-menu > button:hover, .atl-menu > a:focus-visible, .atl-menu > button:focus-visible { background: var(--surface2); }
  .atl-menu [aria-checked="true"] { font-weight: 700; }
  .atl-menu-ic { width: 18px; flex: none; }
  .atl-menu hr { border: 0; border-top: 1px solid var(--ln); margin: 4px 0; width: 100%; }
  .atl-menu-who { display: flex; flex-direction: column; padding: 8px 12px 10px; }
  .atl-menu-who span { font-size: 12.5px; color: var(--mut); }
  @keyframes atl-menu-in { from { opacity: 0; transform: translateY(-4px); } }
  /* desktop strip under the header (offline, unpaid order) */
  .atl-offline { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding: 12px max(40px, calc((100% - 1184px) / 2)); min-height: 48px; align-items: center; box-shadow: inset 0 -1.5px 0 var(--alert); }
  /* Footer: brand column + three link columns, base row */
  .atl-foot { display: block; border-top: 0; padding: 44px max(40px, calc((100% - 1184px) / 2)) 28px; background: var(--surface); box-shadow: 0 -1px 0 var(--ln); }
  .atl-foot-d { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
  .atl-foot-col { display: flex; flex-direction: column; align-items: flex-start; }
  .atl-foot-col h2 { font: 700 13.5px var(--f); min-height: 44px; display: flex; align-items: center; }
  .atl-foot-col > a:not(.atl-wm), .atl-foot-land a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; color: var(--mut); font-size: 14px; text-decoration: none; }
  .atl-foot-col > a:not(.atl-wm):hover, .atl-foot-land a:hover { color: var(--ink); text-decoration: underline; }
  .atl-foot-brand .atl-wm { min-height: 44px; }
  .atl-foot-brand p { margin-top: 12px; max-width: 34ch; font-size: 13.5px; color: var(--mut); }
  .atl-foot-brand p a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }
  .atl-foot-base { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; padding-top: 20px; box-shadow: 0 -1px 0 var(--ln); font-size: 13px; color: var(--mut); }
  .atl-foot-land { display: flex; flex-wrap: wrap; gap: 0 18px; flex: 1; }
  .atl-foot-land a { font-size: 13px; }
  .atl-foot-langl { display: inline-flex; align-items: center; gap: 4px; }
  .atl-foot-langl .atl-lang { color: var(--ink); }
}
/* 900–1199 px: the full header does not fit; Lab also lives in the
   footer, so it drops out of the header first (Yordam stays: PRD D-6). */
@media (min-width: 900px) and (max-width: 1199px) {
  .atl-hdr { gap: 12px; padding: 0 20px; }
  .atl-hdr nav { gap: 0; }
  .atl-hdr nav a { padding: 0 8px; }
  .atl-hdr-wide { display: none !important; }
  .atl-hdr-r { gap: 2px; }
  .atl-hdr-cart > [data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .atl-hdr-btn, .atl-hdr-cart { padding: 0 6px; }
  .atl-foot-d { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 24px; }
}

/* Telegram Mini App: Telegram draws the header and the MainButton;
   no footer, no phone bar, no bottom nav. */
html.tma .atl-mbar, html.tma .atl-bnav, html.tma .atl-foot, html.tma .atl-hdr { display: none; }
html.tma .atl-has-bnav { padding-bottom: var(--atl-sb); }
html.tma-main [data-tma-main] { display: none !important; }

/* ── Motion ─────────────────────────────────────────────────────── */
@keyframes atl-spin { to { transform: rotate(360deg); } }
@keyframes atl-shim { from { opacity: .45; } to { opacity: .9; } }
@keyframes atl-up { from { transform: translateY(16px); opacity: 0; } }
@keyframes atl-upc { from { transform: translate(-50%, 10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ── Desktop shop flow (LOOM-333) ── */
@media (min-width: 900px) {
  /* Cart drawer from the header Savat link (markup from assets/cart.js) */
  html.atl-drw-open { overflow: hidden; }
  .atl-drw { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: 460px; max-width: 100%; background: var(--surface); box-shadow: var(--e2); display: flex; flex-direction: column; animation: atl-drw-in var(--t-sheet) var(--ease); }
  .atl-drw-hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 12px 24px; box-shadow: 0 1px 0 var(--ln); }
  .atl-drw-bd { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px; }
  .atl-drw-bd .atl-empty { padding: 32px 0; }
  .atl-drw-row { align-items: flex-start; padding: 16px 0; }
  .atl-drw-row .atl-thumb { width: 72px; height: 72px; }
  .atl-drw-row .atl-row-tx { gap: 6px; }
  .atl-drw-top { display: flex; justify-content: space-between; gap: 12px; }
  .atl-drw-top .atl-num { white-space: nowrap; }
  .atl-drw-ctl { display: flex; gap: 8px; align-items: center; }
  .atl-drw-ft { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 24px; box-shadow: 0 -1px 0 var(--ln); }
  @keyframes atl-drw-in { from { transform: translateX(24px); opacity: 0; } }

  /* Order summary panels (cart, checkout, payment, order): the money
     button sits directly under Jami. */
  .atl-shop .atl-two { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; }
  .atl-shop .atl-price-lines { gap: 10px; font-size: 14.5px; }
  .atl-shop .atl-price-lines .atl-price-tot { font-size: 20px; padding-top: 12px; }
  .atl-shop aside.atl-card, .atl-shop section.atl-card.atl-stick { padding: 24px; gap: 14px; }
}

/* ── Desktop pages (LOOM-333) ── */
@media (min-width: 900px) {
  /* Product and print cards: hover draws a 2 px ink frame on the canvas */
  .atl-pc .atl-gtile, .atl-mk-try .atl-gtile { transition: box-shadow var(--t-base) var(--ease); }
  .atl-pc:hover .atl-gtile, .atl-mk-try:hover .atl-gtile { box-shadow: inset 0 0 0 2px var(--ink); }
  .atl-pc:focus-visible, .atl-mk-try:focus-visible { outline-offset: 4px; border-radius: var(--r-panel); }
  .atl-pgrid { gap: 32px 24px; }
  /* Analytics consent (markup + base styles from assets/analytics.js):
     a full-width bottom bar, the two choices equal in weight. The doubled
     id outranks analytics.js's `body.atl-has-bnav #loom-consent`. */
  html body #loom-consent#loom-consent { left: 0; right: 0; bottom: 0; width: auto; max-width: none; margin: 0; border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; flex-direction: row; align-items: center; gap: 24px; min-height: 88px; padding: 16px max(48px, calc((100% - 1184px) / 2)); font-size: 15px; box-shadow: 0 -1px 0 var(--ln), 0 -18px 40px -24px rgba(0, 0, 0, .35); }
  html body #loom-consent p { flex: 1; max-width: 80ch; }
  html body #loom-consent .lc-actions { flex: none; gap: 12px; margin-left: auto; }
  html body #loom-consent .lc-btn, html body #loom-consent .lc-ok { flex: none; min-width: 140px; background: none; color: var(--ink, #14171a); box-shadow: inset 0 0 0 1.5px var(--ink, #14171a); opacity: 1; }
  html body #loom-consent .lc-btn:hover { background: var(--surface2, #e9ecef); }
}
