/* ═══════════════════════════════════════════════════════════════════
   Atelye — the phone configurator (PRD-215, LOOM_FLAGS.cfgAtelye)
   Every rule sits under html.cfg-atelye (set by configurator.js only while
   the flag is on) AND the phone breakpoint, so the flag-off page and the
   desktop page never match one. Tokens: design source of truth D-12
   (~/.config/loom/state/mobile-ds-2026-11-14, Version 3). No has-selector
   and no bare dynamic-viewport unit here (LOOM-304, LOOM-305).
   LOOM-307: tokens, Archivo, the shell (full-bleed canvas, top row, action
   bar). LOOM-308: the tool rail (right) and the colour stack (left).
   LOOM-309: the context strip and its tag. LOOM-310: the corner buttons on
   the selected print. LOOM-311: the bottom sheet. LOOM-312: strip messages
   and the toast. LOOM-313: the text bar on the keyboard. Telegram comes in
   LOOM-314.
   ═══════════════════════════════════════════════════════════════════ */

/* The Atelye rows exist only while the flag is on; outside the mode
   (desktop, or before the class lands) they are never drawn. */
.atl-top, .atl-bar, .atl-rail, .atl-col, .atl-strip, .atl-tag, .atl-hand, .atl-sh, .atl-shade, .atl-up-ph, .atl-toast, .atl-kb { display: none; }

@media (max-width: 900px) {
  html.cfg-atelye {
    --canvas: #e4e7ea; --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;
    --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;
    /* Insets and the action bar's height; Telegram overrides them (LOOM-314). */
    --atl-st: env(safe-area-inset-top, 0px); --atl-sb: env(safe-area-inset-bottom, 0px); --atl-bar: 52px;
  }
  html.cfg-atelye[data-theme="dark"] {
    --canvas: #1c1f23; --surface: #2a2e33; --surface2: #3a4047;
    --ink: #f0f2f4; --mut: #a3abb3; --ln: rgba(255, 255, 255, .16);
    --alert: #ff9a8f; --alert-bg: #40211e;
  }

  /* ── LOOM-314: inside Telegram ──────────────────────────────────
     MainButton (Savatga qo'shish), SecondaryButton (Hozir sotib olish) and
     BackButton replace the action bar and Orqaga; the top row keeps 2D / 3D.
     A client older than 7.10 keeps Hozir sotib olish in the page
     (html.tma-atl-buy). --tma-top / --tma-bottom come from Telegram 8.0+. */
  html.cfg-atelye.tma-atl {
    --atl-st: var(--tma-top, env(safe-area-inset-top, 0px));
    --atl-sb: var(--tma-bottom, env(safe-area-inset-bottom, 0px));
  }
  html.cfg-atelye.tma-atl:not(.tma-atl-buy) { --atl-bar: 0px; }
  html.cfg-atelye.tma-atl:not(.tma-atl-buy) .atl-bar,
  html.cfg-atelye.tma-atl #atl-back,
  html.cfg-atelye.tma-atl-buy .atl-bar .atl-pr,
  html.cfg-atelye.tma-atl-buy .atl-bar #btn-add-to-cart { display: none !important; }

  /* ── Shell: the garment owns the screen ─────────────────────── */
  html.cfg-atelye body { background: var(--canvas); font-family: var(--f); }
  html.cfg-atelye .nav,
  html.cfg-atelye .mobile-menu,
  html.cfg-atelye .studio-sheet,
  html.cfg-atelye .p3-prog,
  html.cfg-atelye .p3-hint,
  html.cfg-atelye .stage-chip,
  html.cfg-atelye .chip-fs-slot,
  html.cfg-atelye .view-toggle { display: none !important; }
  html.cfg-atelye .studio { --nav-h: 0px; padding-top: 0; background: var(--canvas); }
  html.cfg-atelye .studio::before { content: none; }
  html.cfg-atelye #three-container,
  html.cfg-atelye .flat-editor,
  html.cfg-atelye .loading-overlay {
    position: fixed; inset: 0; width: auto; height: auto; min-height: 0;
  }
  /* The garment is drawn between the top row and the action bar. */
  html.cfg-atelye .flat-stagebox {
    padding: calc(var(--atl-st) + 56px) 12px calc(var(--atl-sb) + var(--atl-bar) + 8px);
  }

  /* ── Top row: Orqaga (left), 2D / 3D (right) ───────────────── */
  html.cfg-atelye .atl-top {
    position: fixed; z-index: 60; left: 12px; right: 12px;
    top: calc(var(--atl-st) + 5px);
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-family: var(--f); pointer-events: none;
  }
  html.cfg-atelye .atl-top > * { pointer-events: auto; }
  html.cfg-atelye .atl-ibtn {
    width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0;
    border-radius: var(--r-chip); background: var(--surface); color: var(--ink);
    box-shadow: var(--e1); font-family: var(--f); cursor: pointer;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-ibtn:active { background: var(--surface2); }
  html.cfg-atelye .atl-top .surface-toggle {
    position: static; transform: none; inset: auto; margin: 0 0 0 auto;
    display: flex; height: 44px; padding: 0; gap: 0; border: 0;
    border-radius: var(--r-chip); background: var(--surface); box-shadow: var(--e1);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  html.cfg-atelye .atl-top .surface-btn {
    width: 44px; height: 44px; min-width: 0; padding: 0; margin: 0;
    border: 3px solid transparent; background-clip: padding-box; border-radius: 7px;
    background-color: transparent; color: var(--mut); box-shadow: none;
    font: 700 13px var(--f); letter-spacing: 0; text-transform: none; cursor: pointer;
  }
  html.cfg-atelye .atl-top .surface-btn[aria-pressed="true"] { background-color: var(--ink); color: var(--surface); }
  /* LOOM-312: the 3D button spins while the model loads. */
  html.cfg-atelye .atl-top .surface-btn.atl-busy { position: relative; color: transparent; }
  html.cfg-atelye .atl-top .surface-btn.atl-busy::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
    box-sizing: border-box; border-radius: 50%; border: 2px solid var(--ink); border-right-color: transparent;
    animation: atl-spin .8s linear infinite;
  }
  html.cfg-atelye .atl-top .surface-btn.atl-busy[aria-pressed="true"]::after { border-color: var(--surface); border-right-color: transparent; }

  /* ── Action bar: price + caption, Hozir sotib olish, Savatga qo'shish ── */
  html.cfg-atelye .atl-bar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    box-sizing: border-box; height: calc(52px + var(--atl-sb));
    padding: 3px max(10px, env(safe-area-inset-right, 0px)) var(--atl-sb) max(10px, env(safe-area-inset-left, 0px));
    display: flex; align-items: center; gap: 7px;
    background: var(--surface); color: var(--ink); box-shadow: 0 -1px 0 var(--ln);
    font-family: var(--f);
  }
  html.cfg-atelye .atl-pr {
    display: flex; flex-direction: column; flex: none; line-height: 1.15;
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  html.cfg-atelye .atl-pr b { font: 700 14px var(--f); color: var(--ink); }
  html.cfg-atelye .atl-pr span { font: 400 11.5px var(--f); font-stretch: 90%; color: var(--mut); }
  html.cfg-atelye .atl-pr span.warn { color: var(--alert); font-weight: 600; }
  html.cfg-atelye .atl-bar #btn-place-order,
  html.cfg-atelye .atl-bar #btn-add-to-cart {
    all: unset; box-sizing: border-box;
    flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--r-btn); cursor: pointer; text-align: center;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    font: 700 13.5px/1.1 var(--f); font-stretch: 82%;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-bar #btn-place-order { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
  html.cfg-atelye .atl-bar #btn-place-order:active { background: var(--surface2); }
  html.cfg-atelye .atl-bar #btn-add-to-cart { flex-grow: 1.15; background: var(--cta); color: var(--on-cta); }
  html.cfg-atelye .atl-bar #btn-add-to-cart:active { background: var(--cta-press); }
  html.cfg-atelye .atl-bar #btn-place-order:disabled,
  html.cfg-atelye .atl-bar #btn-add-to-cart:disabled { cursor: default; opacity: .6; }
  /* `all: unset` above outranks the shared .atl-bar :focus-visible ring (LOOM-315). */
  html.cfg-atelye .atl-bar #btn-place-order:focus-visible,
  html.cfg-atelye .atl-bar #btn-add-to-cart:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  /* Text only, except the busy spinner addToCart() puts in. */
  html.cfg-atelye .atl-bar #btn-add-to-cart > svg:not(.spinner),
  html.cfg-atelye .atl-bar #btn-place-order .cta-ico { display: none; }
  html.cfg-atelye .atl-bar #btn-add-to-cart > svg.spinner { flex: none; animation: atl-spin .8s linear infinite; }
  /* Labels wrap to two lines rather than being cut (small phones, or
     system-ui when Archivo does not load). */
  html.cfg-atelye .atl-bar button > span { min-width: 0; overflow-wrap: anywhere; }

  /* ── Tool rail (right edge): Kiyim, Rasm, Matn, Orqa / Old, Ko'proq ── */
  html.cfg-atelye .atl-rail,
  html.cfg-atelye .atl-col {
    position: fixed; z-index: 55; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; padding: 3px;
    background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--e1);
    font-family: var(--f);
  }
  html.cfg-atelye .atl-rail { right: calc(10px + env(safe-area-inset-right, 0px)); min-width: 52px; box-sizing: border-box; }
  html.cfg-atelye .atl-tool {
    all: unset; box-sizing: border-box; min-width: 46px; height: 48px; padding: 0 3px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    border-radius: var(--r-chip); color: var(--ink); cursor: pointer; text-align: center;
    font: 600 10.5px/1.1 var(--f); white-space: nowrap;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-tool svg { flex: none; }
  html.cfg-atelye .atl-tool:active,
  html.cfg-atelye .atl-tool[aria-expanded="true"] { background: var(--surface2); }
  @media (hover: hover) {
    html.cfg-atelye .atl-tool:hover,
    html.cfg-atelye .atl-chip:not(:disabled):not([aria-pressed="true"]):hover { background: var(--surface2); }
    html.cfg-atelye .atl-sw:not(:disabled):hover i { transform: scale(1.06); }
    html.cfg-atelye .atl-cb:hover i { background: var(--mut); }
    html.cfg-atelye .atl-kb-done:hover { background: var(--cta-press); }
  }
  /* A garment sold without print: only Kiyim (R-13). */
  html.cfg-atelye body.blank-only .atl-print { display: none; }

  /* ── Colour stack (left edge): only while the design is empty ── */
  html.cfg-atelye .atl-col { left: calc(10px + env(safe-area-inset-left, 0px)); }
  html.cfg-atelye .atl-col[hidden] { display: none; }
  html.cfg-atelye .atl-sw {
    all: unset; box-sizing: border-box; width: 44px; height: 44px; flex: none;
    display: grid; place-items: center; border-radius: var(--r-chip); cursor: pointer;
  }
  html.cfg-atelye .atl-sw i {
    display: block; width: 30px; height: 30px; border-radius: 6px;
    box-shadow: inset 0 0 0 1px var(--ln); transition: transform var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-sw[aria-pressed="true"] i { outline: 2px solid var(--ink); outline-offset: 3px; }
  html.cfg-atelye .atl-sw:active i { transform: scale(.9); }
  /* Switched off in admin: keeps its place, struck through, not tappable. */
  html.cfg-atelye .atl-sw:disabled { cursor: default; }
  html.cfg-atelye .atl-sw:disabled i {
    opacity: .4;
    background-image: linear-gradient(to top right, transparent 45%, var(--ink) 45%, var(--ink) 55%, transparent 55%);
  }

  /* ── Context strip: 8 px over the action bar, one row ─────────── */
  html.cfg-atelye .atl-strip {
    position: fixed; z-index: 55; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--atl-bar) + 8px + var(--atl-sb));
    box-sizing: border-box; width: max-content; max-width: calc(100vw - 20px);
    display: flex; padding: 4px; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; background: var(--surface); border-radius: var(--r-panel);
    box-shadow: var(--e1); font-family: var(--f);
  }
  html.cfg-atelye .atl-strip::-webkit-scrollbar { display: none; }
  html.cfg-atelye .atl-strip[hidden],
  html.cfg-atelye .atl-grp[hidden],
  html.cfg-atelye .atl-tag[hidden] { display: none; }
  html.cfg-atelye .atl-grp { display: flex; align-items: center; gap: 4px; flex: none; }
  html.cfg-atelye .atl-chip {
    all: unset; box-sizing: border-box; flex: none; height: 44px; min-width: 44px; padding: 0 11px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--r-chip); background: var(--surface); color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ln); cursor: pointer; white-space: nowrap;
    font: 600 13px var(--f); font-variant-numeric: tabular-nums;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-chip svg { flex: none; }
  html.cfg-atelye .atl-ico, html.cfg-atelye .atl-sz { width: 44px; padding: 0; }
  html.cfg-atelye .atl-chip:active { background: var(--surface2); }
  html.cfg-atelye .atl-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
  html.cfg-atelye .atl-chip:disabled { opacity: .38; cursor: default; }
  /* A cart or buy tap waits for the size: every free size is outlined. */
  html.cfg-atelye .atl-strip.need .atl-sz:not([aria-pressed="true"]):not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--cta); }
  /* The font chip is today's select under a chip skin, the chevron drawn over it. */
  html.cfg-atelye .atl-sel { position: relative; display: inline-flex; flex: none; }
  html.cfg-atelye .atl-sel select { -webkit-appearance: none; appearance: none; padding-right: 30px; max-width: 150px; }
  html.cfg-atelye .atl-sel svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink); }
  /* Text colour: today's colour input as a 44 px dot. */
  html.cfg-atelye .atl-dot {
    -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: none;
    width: 44px; height: 44px; padding: 8px; margin: 0; border: 0; border-radius: 50%;
    background: transparent; cursor: pointer;
  }
  html.cfg-atelye .atl-dot::-webkit-color-swatch-wrapper { padding: 0; }
  html.cfg-atelye .atl-dot::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ln); }
  html.cfg-atelye .atl-dot::-moz-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ln); }
  /* The tag over the strip: the size prompt in button red, the blank note in ink on surface. */
  html.cfg-atelye .atl-tag {
    position: fixed; z-index: 55; left: 50%; transform: translateX(-50%); margin: 0; display: block;
    bottom: calc(var(--atl-bar) + 66px + var(--atl-sb));
    max-width: calc(100vw - 20px); box-sizing: border-box; padding: 5px 10px;
    border-radius: 4px; background: var(--cta); color: var(--on-cta);
    font: 700 12.5px/1.25 var(--f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  html.cfg-atelye .atl-tag.note { background: var(--surface); color: var(--ink); box-shadow: var(--e1); }

  /* ── LOOM-312: messages on the strip (upload, low quality, 3D failed) ── */
  html.cfg-atelye .atl-strip.msg { padding-left: 12px; min-height: 52px; }
  html.cfg-atelye .atl-msg { flex: 1 1 auto; min-width: 0; gap: 10px; font: 600 13px/1.3 var(--f); }
  html.cfg-atelye .atl-msg-ic { display: flex; flex: none; }
  html.cfg-atelye .atl-msg-t { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  html.cfg-atelye .atl-strip.err { background: var(--alert-bg); color: var(--alert); box-shadow: inset 0 0 0 1.5px var(--alert); }
  html.cfg-atelye .atl-strip.err .atl-chip { color: var(--ink); }
  html.cfg-atelye .atl-spin {
    display: block; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent; animation: atl-spin .8s linear infinite;
  }
  /* Where the image will land while it is read. */
  html.cfg-atelye .atl-up-ph {
    position: fixed; z-index: 45; left: 0; top: 0; display: grid; place-items: center;
    border-radius: 3px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--ln);
    pointer-events: none; animation: atl-shim 1.1s ease-in-out infinite alternate;
  }
  html.cfg-atelye .atl-up-ph::after {
    content: ""; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%;
    border: 2.4px solid var(--ink); border-right-color: transparent; animation: atl-spin .9s linear infinite;
  }
  html.cfg-atelye .atl-up-ph[hidden] { display: none; }
  html.cfg-atelye.atl-up .flat-empty { visibility: hidden; }

  /* ── LOOM-312: toast, one block under the top row ── */
  html.cfg-atelye .atl-toast {
    position: fixed; z-index: 70; left: 50%; top: calc(var(--atl-st) + 57px);
    display: flex; align-items: center; gap: 8px; box-sizing: border-box;
    width: max-content; max-width: calc(100vw - 40px); margin: 0; padding: 11px 14px;
    border-radius: var(--r-chip); background: var(--surface); color: var(--ink); box-shadow: var(--e1);
    font: 600 13px/1.3 var(--f); overflow-wrap: anywhere; pointer-events: none;
    opacity: 0; transform: translate(-50%, -8px);
    transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out);
  }
  html.cfg-atelye .atl-toast.show {
    opacity: 1; transform: translate(-50%, 0);
    transition: opacity var(--t-sheet) var(--ease), transform var(--t-sheet) var(--ease);
  }
  html.cfg-atelye .atl-toast svg { display: none; flex: none; }
  html.cfg-atelye .atl-toast.err { background: var(--alert-bg); color: var(--alert); box-shadow: inset 0 0 0 1.5px var(--alert); }
  html.cfg-atelye .atl-toast.err svg { display: block; }
  /* The delete toast keeps today's Undo. */
  html.cfg-atelye .atl-toast button { display: none; }
  html.cfg-atelye .atl-toast.undo.show { pointer-events: auto; }
  html.cfg-atelye .atl-toast.undo button {
    all: unset; box-sizing: border-box; display: inline-flex; align-items: center; flex: none;
    height: 44px; margin: -11px -6px -11px 4px; padding: 0 8px; cursor: pointer; color: var(--ink);
    font: 700 13px var(--f); text-decoration: underline; text-underline-offset: 3px;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  html.cfg-atelye .atl-toast button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--r-chip); }

  /* ── Corner buttons on the selected print (2D) ────────────────
     The layer itself is the focusable group; it takes no pointer, so the
     print under it still drags. Each button is a 32 px circle in a 44 px
     target, placed by configurator.js (atlSyncSel) on a corner of the
     outline the canvas draws. Only these are round: part of the print. */
  html.cfg-atelye .atl-hand {
    position: fixed; z-index: 50; left: 0; top: 0; width: 0; height: 0; display: block;
    pointer-events: none; outline: 0; font-family: var(--f);
  }
  html.cfg-atelye .atl-hand[hidden],
  html.cfg-atelye .atl-hand-tag[hidden] { display: none; }
  html.cfg-atelye .atl-hand-ring {
    position: absolute; left: 0; top: 0; box-sizing: border-box; display: none;
    transform-origin: 50% 50%; pointer-events: none;
    outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--surface);
  }
  html.cfg-atelye .atl-hand:focus-visible .atl-hand-ring { display: block; }
  html.cfg-atelye .atl-cb {
    all: unset; box-sizing: border-box; position: absolute; left: 0; top: 0;
    width: 44px; height: 44px; display: grid; place-items: center;
    pointer-events: auto; cursor: pointer; touch-action: none;
    -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  }
  html.cfg-atelye .atl-cb i {
    width: 32px; height: 32px; box-sizing: border-box; display: grid; place-items: center;
    border-radius: 50%; background: var(--ink); color: var(--surface);
    box-shadow: 0 0 0 1.6px var(--surface);
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-cb:active i { background: var(--mut); }
  html.cfg-atelye .atl-cb:focus-visible i { outline: 2px solid var(--ink); outline-offset: 3px; }
  html.cfg-atelye .atl-hand-tag {
    position: absolute; left: 0; top: 0; display: block; padding: 3px 8px;
    border-radius: 3px; background: var(--ink); color: var(--surface);
    font: 600 11.5px/1.25 var(--f); font-variant-numeric: tabular-nums; white-space: nowrap;
    pointer-events: none;
  }

  /* ── Bottom sheet: Kiyim, Ko'proq, Qatlamlar, size table, add ──
     Peek 160 px, half 50 %, full 92 % of the window (a fixed box's % is
     the viewport's). It covers the strip and the action bar; the shade
     under it takes the tap on the garment. */
  html.cfg-atelye .atl-shade { position: fixed; inset: 0; z-index: 64; display: block; touch-action: none; }
  html.cfg-atelye .atl-shade[hidden],
  html.cfg-atelye .atl-sh[hidden] { display: none; }
  html.cfg-atelye.atl-sheet body { overflow: hidden; }
  html.cfg-atelye .atl-sh {
    position: fixed; z-index: 65; left: 0; right: 0; bottom: 0; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 4px;
    height: calc(160px + var(--atl-sb));
    padding: 0 12px calc(10px + var(--atl-sb));
    background: var(--surface); color: var(--ink); font-family: var(--f);
    border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--e2);
    overflow: hidden; overscroll-behavior: contain;
    transform: translateY(100%);
    transition: transform 120ms var(--ease-out), height var(--t-sheet) var(--ease);
  }
  html.cfg-atelye .atl-sh.open { transform: none; transition: transform var(--t-sheet) var(--ease), height var(--t-sheet) var(--ease); }
  html.cfg-atelye .atl-sh[data-lvl="half"] { height: 50%; }
  html.cfg-atelye .atl-sh[data-lvl="full"] { height: 92%; }
  html.cfg-atelye .atl-sh.drag { transition: none; }
  /* The grabber's bar, centred on the sheet whatever the head holds. */
  html.cfg-atelye .atl-sh::before {
    content: ""; position: absolute; left: 50%; top: 9px; width: 38px; height: 4px; margin-left: -19px;
    border-radius: 2px; background: var(--mut); opacity: .55; pointer-events: none;
  }
  html.cfg-atelye .atl-sh-head {
    flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px;
    height: 44px; align-items: end;
  }
  html.cfg-atelye .atl-grab {
    all: unset; grid-area: 1 / 1; align-self: stretch; box-sizing: border-box; margin-left: -12px;
    cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
  }
  html.cfg-atelye .atl-sh-title {
    grid-area: 1 / 1; margin: 0 0 2px; min-width: 0; pointer-events: none;
    font: 700 15px/20px var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  html.cfg-atelye .atl-sh-aside { grid-area: 1 / 2; align-self: stretch; display: flex; align-items: flex-end; padding-bottom: 2px; font: 500 12.5px/20px var(--f); color: var(--mut); }
  html.cfg-atelye .atl-sh-link {
    all: unset; box-sizing: border-box; height: 44px; margin-bottom: -2px; padding: 0 2px 4px;
    display: flex; align-items: flex-end; cursor: pointer; color: var(--ink);
    font: 600 12.5px/1.2 var(--f); text-decoration: underline; text-underline-offset: 3px;
  }
  html.cfg-atelye .atl-sh-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 6px; padding: 2px 0;
  }
  html.cfg-atelye .atl-gt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; flex: none; }
  html.cfg-atelye .atl-gtile {
    all: unset; box-sizing: border-box; min-height: 46px; min-width: 0; padding: 4px 6px;
    display: flex; align-items: center; gap: 5px; border-radius: var(--r-chip);
    box-shadow: inset 0 0 0 1px var(--ln); color: var(--ink); cursor: pointer; text-align: left;
    font: 600 12px/1.15 var(--f); transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-sh-more .atl-gtile { font-size: 11.5px; gap: 4px; padding: 4px 5px; }
  html.cfg-atelye .atl-gtile svg { flex: none; }
  html.cfg-atelye .atl-gtile span { display: flex; flex-direction: column; min-width: 0; }
  html.cfg-atelye .atl-gtile b { font-weight: 600; overflow-wrap: anywhere; }
  html.cfg-atelye .atl-gtile i { font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--mut); }
  html.cfg-atelye .atl-gtile[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
  html.cfg-atelye .atl-gtile[aria-disabled="true"] { opacity: .38; cursor: default; }
  html.cfg-atelye .atl-gtile:not([aria-disabled="true"]):active,
  html.cfg-atelye .atl-lrow:active { background: var(--surface2); }
  html.cfg-atelye .atl-sh-row { display: flex; flex-wrap: wrap; gap: 4px; flex: none; }
  html.cfg-atelye .atl-lrow {
    all: unset; box-sizing: border-box; flex: none; width: 100%; min-height: 44px; padding: 4px 8px;
    display: flex; align-items: center; gap: 12px; border-radius: var(--r-chip); color: var(--ink);
    cursor: pointer; text-align: left; transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-lrow svg { flex: none; }
  html.cfg-atelye .atl-lrow span { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
  html.cfg-atelye .atl-lrow b { font: 600 14px/1.2 var(--f); }
  html.cfg-atelye .atl-lrow i { font: 400 12px/1.25 var(--f); font-style: normal; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.cfg-atelye .atl-lrow[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
  html.cfg-atelye .atl-lrow.big { min-height: 52px; box-shadow: inset 0 0 0 1px var(--ln); }
  html.cfg-atelye .atl-sh-note { margin: 0; padding: 4px 8px; font: 400 13px/1.35 var(--f); color: var(--mut); }
  /* The size table: today's guide content in Atelye type. */
  html.cfg-atelye .atl-sh-size { display: block; font-size: 13px; line-height: 1.45; }
  html.cfg-atelye .atl-sh-size .size-guide-intro,
  html.cfg-atelye .atl-sh-size .size-guide-notes { color: var(--mut); font-size: 12.5px; }
  html.cfg-atelye .atl-sh-size .size-guide-sub { margin: 10px 0 4px; font: 700 13px var(--f); color: var(--ink); text-transform: none; letter-spacing: 0; }
  html.cfg-atelye .atl-sh-size .size-guide-scroll { overflow-x: auto; }
  html.cfg-atelye .atl-sh-size table { border-collapse: collapse; font: 400 13px var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }
  html.cfg-atelye .atl-sh-size th,
  html.cfg-atelye .atl-sh-size td { padding: 8px 10px 8px 0; text-align: left; border: 0; border-bottom: 1px solid var(--ln); background: none; color: var(--ink); }
  html.cfg-atelye .atl-sh-size th:first-child,
  html.cfg-atelye .atl-sh-size td:first-child { position: sticky; left: 0; background: var(--surface); font-weight: 600; }
  html.cfg-atelye .atl-sh-size th { font-weight: 600; color: var(--mut); }
  html.cfg-atelye .atl-sh-size ul { margin: 0; padding-left: 18px; }
  html.cfg-atelye .atl-sh button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  html.cfg-atelye .atl-sh :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--surface); }
  html.cfg-atelye .atl-sh .atl-grab:focus-visible { outline-offset: -2px; }

  /* A sheet or the keyboard owns the screen: the edge tools step aside. */
  html.cfg-atelye.atl-sheet .atl-rail,
  html.cfg-atelye.atl-sheet .atl-col,
  html.cfg-atelye.atl-sheet .atl-strip,
  html.cfg-atelye.atl-sheet .atl-tag,
  html.cfg-atelye.atl-sheet .atl-hand,
  html.cfg-atelye body.kb-open .atl-hand,
  html.cfg-atelye body.kb-open .atl-rail,
  html.cfg-atelye body.kb-open .atl-col,
  html.cfg-atelye body.kb-open .atl-strip,
  html.cfg-atelye body.kb-open .atl-tag { display: none; }

  /* ── LOOM-313: text bar on the keyboard top ─────────────────────
     Fixed to the layout viewport's bottom; configurator.js lifts it by the
     keyboard height (visualViewport) with a transform. */
  html.cfg-atelye .atl-kb {
    position: fixed; z-index: 62; left: 0; right: 0; bottom: 0; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 7px;
    padding: 7px max(10px, env(safe-area-inset-right, 0px)) calc(7px + var(--atl-sb)) max(10px, env(safe-area-inset-left, 0px));
    background: var(--surface); color: var(--ink); box-shadow: 0 -1px 0 var(--ln);
    font-family: var(--f);
  }
  html.cfg-atelye .atl-kb.up { padding-bottom: 7px; }
  html.cfg-atelye .atl-kb[hidden],
  html.cfg-atelye .atl-kb-err[hidden] { display: none; }
  html.cfg-atelye .atl-kb-r { display: flex; align-items: center; gap: 6px; min-width: 0; }
  html.cfg-atelye .atl-kb-r + .atl-kb-r { overflow-x: auto; scrollbar-width: none; }
  html.cfg-atelye .atl-kb-r::-webkit-scrollbar { display: none; }
  /* 16 px: iOS zooms the page into a smaller field. */
  html.cfg-atelye .atl-kb-in {
    flex: 1 1 auto; min-width: 0; box-sizing: border-box; height: 44px; margin: 0; padding: 0 12px;
    border: 0; border-radius: var(--r-chip); outline: none;
    background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink);
    font: 500 16px var(--f); caret-color: var(--ink);
  }
  html.cfg-atelye .atl-kb-in::placeholder { color: var(--mut); opacity: 1; }
  html.cfg-atelye .atl-kb-in:focus-visible { box-shadow: inset 0 0 0 2.5px var(--ink); }
  html.cfg-atelye .atl-kb-in.is-err { box-shadow: inset 0 0 0 1.5px var(--alert); }
  html.cfg-atelye .atl-kb-in.is-err:focus-visible { box-shadow: inset 0 0 0 2.5px var(--alert); }
  html.cfg-atelye .atl-kb-err { margin: -2px 2px 0; color: var(--alert); font: 700 12.5px/1.3 var(--f); }
  html.cfg-atelye .atl-kb-done {
    all: unset; box-sizing: border-box; flex: none; height: 44px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-btn); background: var(--cta); color: var(--on-cta);
    font: 700 13.5px var(--f); white-space: nowrap; cursor: pointer;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye .atl-kb-done:active { background: var(--cta-press); }
  html.cfg-atelye .atl-kb-b { font-weight: 800; font-size: 15px; }
  html.cfg-atelye .atl-kb-i { font-style: italic; font-size: 15px; font-family: Georgia, serif; }
  html.cfg-atelye .atl-kb :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  html.cfg-atelye .atl-kb .atl-kb-in:focus-visible { outline: none; }
  /* While it is open, the edge tools and the action bar step aside. */
  html.cfg-atelye.atl-typing .atl-rail,
  html.cfg-atelye.atl-typing .atl-col,
  html.cfg-atelye.atl-typing .atl-strip,
  html.cfg-atelye.atl-typing .atl-tag,
  html.cfg-atelye.atl-typing .atl-hand,
  html.cfg-atelye.atl-typing .atl-bar { display: none; }

  /* No double-tap zoom delay and no grey flash on the Atelye controls. */
  html.cfg-atelye .atl-top button,
  html.cfg-atelye .atl-bar button,
  html.cfg-atelye .atl-rail button,
  html.cfg-atelye .atl-col button,
  html.cfg-atelye .atl-strip button,
  html.cfg-atelye .atl-strip select,
  html.cfg-atelye .atl-strip input,
  html.cfg-atelye .atl-kb button,
  html.cfg-atelye .atl-kb select,
  html.cfg-atelye .atl-kb input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

  /* Focus: 2 px, visible on every surface (R-16). */
  html.cfg-atelye .atl-top :focus-visible,
  html.cfg-atelye .atl-bar :focus-visible,
  html.cfg-atelye .atl-rail :focus-visible,
  html.cfg-atelye .atl-col :focus-visible,
  html.cfg-atelye .atl-strip :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--surface); }

  /* Small phones: a tighter bar. */
  @media (max-width: 374px) {
    html.cfg-atelye .atl-bar { gap: 5px; padding-left: 8px; padding-right: 8px; }
    html.cfg-atelye .atl-bar #btn-place-order,
    html.cfg-atelye .atl-bar #btn-add-to-cart { font-size: 12.5px; padding: 0 5px; }
    html.cfg-atelye .atl-pr b { font-size: 13px; }
  }
}

@keyframes atl-spin { to { transform: rotate(360deg); } }
@keyframes atl-shim { from { opacity: .55; } to { opacity: .95; } }

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  html.cfg-atelye .atl-top *, html.cfg-atelye .atl-bar *,
  html.cfg-atelye .atl-rail *, html.cfg-atelye .atl-col *,
  html.cfg-atelye .atl-strip *, html.cfg-atelye .atl-hand *,
  html.cfg-atelye .atl-kb * { transition: none !important; animation: none !important; }
  html.cfg-atelye .atl-sh, html.cfg-atelye .atl-sh * { transition: none !important; animation: none !important; }
  html.cfg-atelye .atl-toast, html.cfg-atelye .atl-up-ph, html.cfg-atelye .atl-up-ph::after,
  html.cfg-atelye .atl-top .surface-btn.atl-busy::after { transition: none !important; animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   Atelye on desktop (PRD-218, LOOM_FLAGS.cfgAtelyeDesktop)
   Every rule sits under html.cfg-atelye-d (set by configurator.js only
   from 901px with the flag on), so the flag-off page and the phone never
   match one. The left panel is an order list that never changes shape
   (Kiyim, Rang, O'lcham, Dizayn, Jami, the buy buttons); a print's tools
   are a bar under it on the stage while it is selected. The phone parts
   it reuses (corner buttons, strip messages, toast, sheet as a centred
   dialog) are restyled here; the phone block above is not touched.
   Tokens live on .studio (and the cart drawer), not on html: the site
   header keeps the old skin's own values.
   ═══════════════════════════════════════════════════════════════════ */
.atd-panel, .atd-side, .atd-view, .atd-hint, .atd-drop, .atd-bar, .atd-x { display: none; }

@media (min-width: 901px) {
  html.cfg-atelye-d .studio,
  html.cfg-atelye-d .atl-drw,
  html.cfg-atelye-d .atl-drw-dim,
  html.cfg-atelye-d .loom-modal-backdrop {
    --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;
    --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;
    /* Motion of the bar and the dialogs (transitions.dev dropdown / modal). */
    --atd-open: 250ms; --atd-close: 150ms; --atd-ease: cubic-bezier(.22, 1, .36, 1);
  }
  html.cfg-atelye-d[data-theme="dark"] .studio,
  html.cfg-atelye-d[data-theme="dark"] .atl-drw,
  html.cfg-atelye-d[data-theme="dark"] .atl-drw-dim,
  html.cfg-atelye-d[data-theme="dark"] .loom-modal-backdrop {
    --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;
  }

  /* ── Shell: order list left, the garment owns the rest ───────── */
  html.cfg-atelye-d .studio {
    --atd-w: clamp(400px, 30vw, 440px); --stage-l: var(--atd-w);
    --stage-cx: calc(var(--stage-l) + (100% - var(--stage-l)) / 2);
    background: var(--canvas); font-family: var(--f);
  }
  html.cfg-atelye-d .studio::before { content: none; }
  html.cfg-atelye-d .studio-sheet,
  html.cfg-atelye-d .stage-chip,
  html.cfg-atelye-d .chip-fs-slot,
  html.cfg-atelye-d .view-toggle,
  html.cfg-atelye-d .p3-prog,
  html.cfg-atelye-d .p3-hint,
  html.cfg-atelye-d .p3-cam,
  html.cfg-atelye-d .atl-hand-tag { display: none !important; }
  /* Room for Old / Orqa and 2D / 3D above the garment, the bar and the hint under it. */
  html.cfg-atelye-d .studio .flat-stagebox { padding: 80px 32px 88px; }

  html.cfg-atelye-d .atd-vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html.cfg-atelye-d .atd-panel {
    position: absolute; z-index: 40; left: 0; top: var(--nav-h); bottom: 0; width: var(--atd-w);
    box-sizing: border-box; display: flex; flex-direction: column; padding: 10px 32px 0;
    overflow-y: auto; overscroll-behavior: contain;
    scroll-padding-bottom: 170px; /* a focused row is never left under the sticky foot */
    background: var(--surface); color: var(--ink); box-shadow: 1px 0 0 var(--ln);
    font: 400 15px/1.4 var(--f); text-align: left;
  }
  html.cfg-atelye-d .atd-panel [hidden],
  html.cfg-atelye-d .atd-side[hidden],
  html.cfg-atelye-d .atd-view [hidden],
  html.cfg-atelye-d .atd-hint[hidden],
  html.cfg-atelye-d .atd-low[hidden] { display: none; }
  html.cfg-atelye-d .atd-rows { display: flex; flex-direction: column; flex: none; }
  /* One row style for every row: label left, value right, the control under them. */
  html.cfg-atelye-d .atd-row { display: flex; flex-direction: column; gap: 12px; padding: 18px 0; box-shadow: 0 1px 0 var(--ln); }
  html.cfg-atelye-d .atd-row-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
  html.cfg-atelye-d .atd-row-h h2 { margin: 0; font: 400 13.5px/1.3 var(--f); letter-spacing: 0; text-transform: none; color: var(--mut); }
  html.cfg-atelye-d .atd-val { font: 600 13.5px/1.3 var(--f); font-variant-numeric: tabular-nums; color: var(--ink); }
  html.cfg-atelye-d #atd-count { color: var(--mut); font-weight: 500; }
  html.cfg-atelye-d .atd-link {
    all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; margin: -8px -8px -8px 0; padding: 0 8px; border-radius: var(--r-chip);
    color: var(--ink); cursor: pointer; font: 600 14px/1.2 var(--f); text-align: right;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atd-link b { font-weight: 600; }
  html.cfg-atelye-d .atd-link svg { flex: none; }
  html.cfg-atelye-d .atd-u { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

  /* Rang */
  html.cfg-atelye-d .atd-colors { display: flex; flex-wrap: wrap; gap: 2px; margin: -6px; }
  html.cfg-atelye-d .atl-sw {
    all: unset; box-sizing: border-box; width: 40px; height: 40px; flex: none;
    display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  }
  html.cfg-atelye-d .atl-sw i {
    display: block; width: 28px; height: 28px; border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--ln); transition: transform var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atl-sw[aria-pressed="true"] i { box-shadow: inset 0 0 0 1px var(--ln), 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
  html.cfg-atelye-d .atl-sw:disabled { cursor: default; }
  html.cfg-atelye-d .atl-sw:disabled i {
    opacity: .4;
    background-image: linear-gradient(to top right, transparent 45%, var(--ink) 45%, var(--ink) 55%, transparent 55%);
  }

  /* O'lcham: never pre-selected; a refused buy outlines the free sizes. */
  html.cfg-atelye-d .atd-sizes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  html.cfg-atelye-d .atd-sizes button {
    all: unset; box-sizing: border-box; height: 44px; min-width: 0;
    display: grid; place-items: center; border-radius: var(--r-chip);
    box-shadow: inset 0 0 0 1px var(--ln); color: var(--ink); cursor: pointer;
    font: 600 13.5px var(--f); transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atd-sizes button[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
  html.cfg-atelye-d .atd-sizes button:disabled { opacity: .38; cursor: default; text-decoration: line-through; }
  html.cfg-atelye-d .atd-panel.need .atd-sizes button:not([aria-pressed="true"]):not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--cta); }
  /* The focus moved here by itself: show it even after a mouse click. */
  html.cfg-atelye-d .atd-panel.need .atd-sizes button:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
  html.cfg-atelye-d .atd-err {
    display: flex; align-items: flex-start; gap: 6px; margin: 0;
    color: var(--alert); font: 600 13px/1.35 var(--f);
  }
  html.cfg-atelye-d .atd-err svg { flex: none; margin-top: 1px; }

  /* Dizayn: every print, its picture and its side. */
  html.cfg-atelye-d .atd-layers { display: flex; flex-direction: column; gap: 4px; }
  html.cfg-atelye-d .atd-layers:empty { display: none; }
  html.cfg-atelye-d .atd-lrow {
    all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px;
    min-height: 52px; padding: 4px 10px 4px 4px; border-radius: var(--r-chip);
    color: var(--ink); text-align: left; transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d button.atd-lrow { cursor: pointer; }
  html.cfg-atelye-d .atd-lrow[aria-current="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
  html.cfg-atelye-d .atd-th {
    width: 44px; height: 44px; flex: none; display: grid; place-items: center; overflow: hidden;
    border-radius: 6px; background: var(--canvas); color: var(--ink);
  }
  html.cfg-atelye-d .atd-th img { width: 36px; height: 36px; object-fit: contain; }
  html.cfg-atelye-d .atd-th b { font: 800 17px var(--f); }
  html.cfg-atelye-d .atd-lrow > span:last-child { display: flex; flex-direction: column; flex: 1; min-width: 0; }
  html.cfg-atelye-d .atd-lrow > span:last-child > b { font: 600 14px/1.25 var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.cfg-atelye-d .atd-lrow > span:last-child > i { font: 400 12.5px/1.3 var(--f); font-style: normal; color: var(--mut); }
  html.cfg-atelye-d .atd-prog { display: block; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--surface2); overflow: hidden; }
  html.cfg-atelye-d .atd-prog i { display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--ink); animation: atd-prog 1.1s ease-in-out infinite alternate; }
  html.cfg-atelye-d .atd-note { margin: 0; font: 400 13.5px/1.4 var(--f); color: var(--mut); }
  html.cfg-atelye-d .atd-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  html.cfg-atelye-d .atd-btn {
    all: unset; box-sizing: border-box; height: 44px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--r-btn); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink);
    cursor: pointer; font: 700 14px var(--f); transition: background var(--t-fast) var(--ease);
  }

  /* Jami, then the one red button directly under it. */
  html.cfg-atelye-d .atd-foot {
    position: sticky; bottom: 0; z-index: 1; flex: none; margin-top: auto;
    display: flex; flex-direction: column; gap: 10px; padding: 18px 0 20px; background: var(--surface);
  }
  html.cfg-atelye-d .atd-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 2px; }
  html.cfg-atelye-d .atd-total span { font: 400 13.5px var(--f); color: var(--mut); }
  html.cfg-atelye-d .atd-total b { font: 700 21px/1.2 var(--f); font-variant-numeric: tabular-nums; color: var(--ink); }
  html.cfg-atelye-d .atd-foot #btn-add-to-cart,
  html.cfg-atelye-d .atd-foot #btn-place-order {
    all: unset; box-sizing: border-box; width: 100%; padding: 0 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--r-btn); cursor: pointer; text-align: center;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atd-foot #btn-add-to-cart { height: 52px; background: var(--cta); color: var(--on-cta); font: 700 15.5px/1.1 var(--f); }
  html.cfg-atelye-d .atd-foot #btn-add-to-cart:active { background: var(--cta-press); }
  html.cfg-atelye-d .atd-foot #btn-place-order { height: 40px; color: var(--ink); font: 600 14px/1.1 var(--f); }
  html.cfg-atelye-d .atd-foot #btn-place-order:active { background: var(--surface2); }
  html.cfg-atelye-d .atd-foot #btn-add-to-cart:disabled,
  html.cfg-atelye-d .atd-foot #btn-place-order:disabled { cursor: default; opacity: .5; }
  html.cfg-atelye-d .atd-foot #btn-add-to-cart:focus-visible,
  html.cfg-atelye-d .atd-foot #btn-place-order:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  /* Text only, except the busy spinner addToCart() puts in. */
  html.cfg-atelye-d .atd-foot button > svg:not(.spinner),
  html.cfg-atelye-d .atd-foot button .cta-ico,
  html.cfg-atelye-d .atd-foot button .cta-price { display: none; }
  html.cfg-atelye-d .atd-foot button > svg.spinner { flex: none; animation: atl-spin .8s linear infinite; }
  /* Inside Telegram its own buttons buy (LOOM-314); an old client keeps Hozir sotib olish here. */
  html.cfg-atelye-d.tma-atl .atd-foot #btn-add-to-cart,
  html.cfg-atelye-d.tma-atl:not(.tma-atl-buy) .atd-foot #btn-place-order { display: none; }

  /* ── Stage: Old / Orqa (left), 2D / 3D (right), view buttons, hint ── */
  html.cfg-atelye-d .atd-side,
  html.cfg-atelye-d .surface-toggle {
    position: absolute; z-index: 30; top: calc(var(--nav-h) + 24px); transform: none;
    display: flex; gap: 0; height: auto; padding: 3px; border: 0; border-radius: var(--r-chip);
    background: var(--surface); box-shadow: var(--e1); font-family: var(--f);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  html.cfg-atelye-d .atd-side { left: calc(var(--stage-l) + 24px); }
  html.cfg-atelye-d .surface-toggle { left: auto; right: 24px; }
  html.cfg-atelye-d body.blank-only .surface-toggle { display: none; }
  html.cfg-atelye-d .atd-side button,
  html.cfg-atelye-d .surface-toggle .surface-btn {
    all: unset; box-sizing: border-box; height: 40px; min-width: 44px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border-radius: 5px; color: var(--mut); cursor: pointer;
    font: 700 13.5px var(--f); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atd-side button[aria-pressed="true"],
  html.cfg-atelye-d .surface-toggle .surface-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
  /* How many prints the side carries. */
  html.cfg-atelye-d .atd-side i {
    min-width: 18px; height: 18px; box-sizing: border-box; padding: 0 5px; display: grid; place-items: center;
    border-radius: 9px; background: var(--surface2); color: var(--ink);
    font: 700 11px var(--f); font-style: normal; font-variant-numeric: tabular-nums;
  }
  html.cfg-atelye-d .atd-side i:empty { display: none; }
  html.cfg-atelye-d .atd-side button[aria-pressed="true"] i { background: var(--surface); }
  /* The 3D button spins while the model loads (LOOM-312). */
  html.cfg-atelye-d .surface-toggle .surface-btn.atl-busy { position: relative; color: transparent; }
  html.cfg-atelye-d .surface-toggle .surface-btn.atl-busy::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
    box-sizing: border-box; border-radius: 50%; border: 2px solid var(--ink); border-right-color: transparent;
    animation: atl-spin .8s linear infinite;
  }
  html.cfg-atelye-d .surface-toggle .surface-btn.atl-busy[aria-pressed="true"]::after { border-color: var(--surface); border-right-color: transparent; }

  html.cfg-atelye-d .atd-view { position: absolute; z-index: 30; right: 24px; bottom: 24px; display: flex; gap: 8px; }
  html.cfg-atelye-d .atd-ib {
    all: unset; box-sizing: border-box; width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: var(--r-chip); background: var(--surface); color: var(--ink); box-shadow: var(--e1);
    cursor: pointer; transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atd-ib[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
  html.cfg-atelye-d .atd-hint {
    position: absolute; z-index: 30; left: var(--stage-cx); bottom: 30px; transform: translateX(-50%);
    display: block; box-sizing: border-box; width: max-content; max-width: calc(100% - var(--stage-l) - 420px);
    margin: 0; color: var(--mut); text-align: center; pointer-events: none; font: 400 12.5px/1.35 var(--f);
  }

  /* The empty print area: one button that opens the image / text choice. */
  html.cfg-atelye-d .flat-empty,
  html.cfg-atelye-d .flat-empty:hover { color: var(--on-cta); }
  html.cfg-atelye-d .flat-empty .flat-empty-plus { display: none; }
  html.cfg-atelye-d .flat-empty .flat-empty-label {
    display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
    border-radius: var(--r-btn); background: var(--cta); color: var(--on-cta);
    font: 700 14px var(--f) !important; letter-spacing: 0; text-transform: none; white-space: nowrap;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .flat-empty:focus-visible { outline: 0; }
  html.cfg-atelye-d .flat-empty:focus-visible .flat-empty-label { outline: 2px solid var(--ink); outline-offset: 2px; }
  html.cfg-atelye-d.atl-up .flat-empty,
  html.cfg-atelye-d.atd-drag .flat-empty { visibility: hidden; }

  /* A file from the desktop over the stage: the print area lights up. */
  html.cfg-atelye-d.atd-drag .atd-drop {
    position: fixed; z-index: 47; left: 0; top: 0; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    border: 2px dashed var(--cta); border-radius: 4px; background: rgba(217, 53, 41, .1);
    color: var(--cta); pointer-events: none; text-align: center;
  }
  html.cfg-atelye-d .atd-drop span {
    padding: 5px 10px; border-radius: var(--r-chip); background: var(--surface); color: var(--ink);
    box-shadow: var(--e1); font: 700 13.5px/1.25 var(--f);
  }

  /* ── The bar under the selected print (transitions.dev menu dropdown) ──
     Open 250 ms from .97, close 150 ms to .99; the origin is the edge that
     touches the print. Hidden from the keyboard and the pointer while shut. */
  html.cfg-atelye-d .atd-bar {
    position: fixed; z-index: 46; left: 0; top: 0; box-sizing: border-box;
    display: flex; align-items: center; padding: 4px; white-space: nowrap;
    border-radius: var(--r-panel); background: var(--surface); color: var(--ink);
    box-shadow: var(--e1); font-family: var(--f);
    transform-origin: top center; transform: scale(.97); opacity: 0;
    visibility: hidden; pointer-events: none;
    transition: transform var(--atd-open) var(--atd-ease), opacity var(--atd-open) var(--atd-ease);
    will-change: transform, opacity;
  }
  html.cfg-atelye-d .atd-bar[data-origin="bottom-center"] { transform-origin: bottom center; }
  html.cfg-atelye-d .atd-bar.is-open { transform: scale(1); opacity: 1; visibility: visible; pointer-events: auto; }
  html.cfg-atelye-d .atd-bar.is-closing {
    transform: scale(.99); opacity: 0; visibility: visible; pointer-events: none;
    transition: transform var(--atd-close) var(--atd-ease), opacity var(--atd-close) var(--atd-ease);
  }
  html.cfg-atelye-d.atl-sheet .atd-bar { display: none; }
  html.cfg-atelye-d .atd-g { display: none; align-items: center; gap: 4px; }
  html.cfg-atelye-d .atd-bar[data-g="image"] .atd-g[data-g="image"],
  html.cfg-atelye-d .atd-bar[data-g="text"] .atd-g[data-g="text"] { display: flex; }
  html.cfg-atelye-d .atd-tb {
    all: unset; box-sizing: border-box; height: 40px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-chip); color: var(--ink); cursor: pointer;
    font: 600 13.5px var(--f); transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atd-sq { width: 40px; padding: 0; font-size: 18px; }
  html.cfg-atelye-d .atd-tb:disabled { opacity: .38; cursor: default; }
  html.cfg-atelye-d .atd-tb[aria-pressed="true"] { background: var(--surface2); box-shadow: inset 0 0 0 1.5px var(--ink); }
  html.cfg-atelye-d .atd-b { font-weight: 800; font-size: 15px; }
  html.cfg-atelye-d .atd-i { font-style: italic; font-size: 16px; font-family: Georgia, serif; }
  html.cfg-atelye-d .atd-cm { min-width: 56px; text-align: center; font: 700 13.5px var(--f); font-variant-numeric: tabular-nums; }
  html.cfg-atelye-d .atd-sep { flex: none; width: 1px; height: 24px; margin: 0 4px; background: var(--ln); }
  html.cfg-atelye-d .atd-low {
    display: inline-flex; align-items: center; gap: 5px; height: 28px; margin: 0 4px 0 6px; padding: 0 8px;
    border-radius: 4px; background: var(--alert-bg); color: var(--alert); font: 700 12.5px var(--f);
  }
  html.cfg-atelye-d .atd-tin {
    box-sizing: border-box; width: 190px; height: 40px; margin: 0; padding: 0 10px;
    border: 0; border-radius: var(--r-chip); outline: none;
    background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink);
    font: 500 15px var(--f); caret-color: var(--ink);
  }
  html.cfg-atelye-d .atd-tin::placeholder { color: var(--mut); opacity: 1; }
  html.cfg-atelye-d .atd-tin:focus-visible { box-shadow: inset 0 0 0 2.5px var(--ink); }
  html.cfg-atelye-d .atd-tin.is-err { box-shadow: inset 0 0 0 1.5px var(--alert); }
  html.cfg-atelye-d .atd-tin.is-err:focus-visible { box-shadow: inset 0 0 0 2.5px var(--alert); }
  html.cfg-atelye-d .atl-sel { position: relative; display: inline-flex; flex: none; }
  /* An explicit background: the option list follows it in a dark theme. */
  html.cfg-atelye-d .atl-sel select { -webkit-appearance: none; appearance: none; padding-right: 30px; max-width: 150px; font-weight: 700; background-color: var(--surface); }
  html.cfg-atelye-d .atl-sel svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink); }
  html.cfg-atelye-d .atl-dot {
    -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: none;
    width: 40px; height: 40px; padding: 8px; margin: 0; border: 0; border-radius: 50%;
    background: transparent; cursor: pointer;
  }
  html.cfg-atelye-d .atl-dot::-webkit-color-swatch-wrapper { padding: 0; }
  html.cfg-atelye-d .atl-dot::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ln); }
  html.cfg-atelye-d .atl-dot::-moz-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ln); }

  /* ── Corner buttons on the selected print (LOOM-310, as on the phone) ── */
  html.cfg-atelye-d .atl-hand {
    position: fixed; z-index: 45; left: 0; top: 0; width: 0; height: 0; display: block;
    pointer-events: none; outline: 0; font-family: var(--f);
  }
  html.cfg-atelye-d .atl-hand[hidden],
  html.cfg-atelye-d.atl-sheet .atl-hand { display: none; }
  html.cfg-atelye-d .atl-hand-ring {
    position: absolute; left: 0; top: 0; box-sizing: border-box; display: none;
    transform-origin: 50% 50%; pointer-events: none;
    outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--surface);
  }
  html.cfg-atelye-d .atl-hand:focus-visible .atl-hand-ring { display: block; }
  html.cfg-atelye-d .atl-cb {
    all: unset; box-sizing: border-box; position: absolute; left: 0; top: 0;
    width: 44px; height: 44px; display: grid; place-items: center;
    pointer-events: auto; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none;
  }
  html.cfg-atelye-d .atl-cb[data-act="scale"] { cursor: nwse-resize; }
  html.cfg-atelye-d .atl-cb i {
    width: 32px; height: 32px; box-sizing: border-box; display: grid; place-items: center;
    border-radius: 50%; background: var(--ink); color: var(--surface);
    box-shadow: 0 0 0 1.6px var(--surface); transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atl-cb:active i { background: var(--mut); }
  html.cfg-atelye-d .atl-cb:focus-visible i { outline: 2px solid var(--ink); outline-offset: 3px; }

  /* ── Messages (LOOM-312): upload, low quality, 3D failed ─────── */
  html.cfg-atelye-d .atl-strip {
    position: absolute; z-index: 48; left: var(--stage-cx); bottom: 84px; transform: translateX(-50%);
    box-sizing: border-box; width: max-content; max-width: min(560px, calc(100% - var(--stage-l) - 48px));
    display: flex; padding: 4px 4px 4px 14px; min-height: 52px;
    background: var(--surface); color: var(--ink); border-radius: var(--r-panel);
    box-shadow: var(--e1); font-family: var(--f);
  }
  html.cfg-atelye-d .atl-strip[hidden],
  html.cfg-atelye-d .atl-grp[hidden] { display: none; }
  html.cfg-atelye-d .atl-grp { display: flex; align-items: center; gap: 4px; flex: none; }
  html.cfg-atelye-d .atl-msg { flex: 1 1 auto; min-width: 0; gap: 10px; font: 600 13.5px/1.3 var(--f); }
  html.cfg-atelye-d .atl-msg-ic { display: flex; flex: none; }
  html.cfg-atelye-d .atl-msg-t { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  html.cfg-atelye-d .atl-strip.err { background: var(--alert-bg); color: var(--alert); box-shadow: inset 0 0 0 1.5px var(--alert); }
  html.cfg-atelye-d .atl-strip .atl-chip {
    all: unset; box-sizing: border-box; flex: none; height: 44px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-chip); background: var(--surface); color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ln); cursor: pointer; white-space: nowrap;
    font: 600 13px var(--f); transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atl-spin {
    display: block; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent; animation: atl-spin .8s linear infinite;
  }
  /* Where the image will land while it is read. */
  html.cfg-atelye-d .atl-up-ph {
    position: fixed; z-index: 44; left: 0; top: 0; display: grid; place-items: center;
    border-radius: 3px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--ln);
    pointer-events: none; animation: atl-shim 1.1s ease-in-out infinite alternate;
  }
  html.cfg-atelye-d .atl-up-ph::after {
    content: ""; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%;
    border: 2.4px solid var(--ink); border-right-color: transparent; animation: atl-spin .9s linear infinite;
  }
  html.cfg-atelye-d .atl-up-ph[hidden] { display: none; }

  /* Toast: one block under the stage's top row, over a dialog too. */
  html.cfg-atelye-d .atl-toast {
    position: fixed; z-index: 9100; left: var(--stage-cx); top: calc(var(--nav-h) + 86px);
    display: flex; align-items: center; gap: 8px; box-sizing: border-box;
    width: max-content; max-width: min(520px, calc(100vw - var(--stage-l) - 48px)); margin: 0; padding: 11px 14px;
    border-radius: var(--r-chip); background: var(--surface); color: var(--ink); box-shadow: var(--e1);
    font: 600 13.5px/1.3 var(--f); overflow-wrap: anywhere; pointer-events: none;
    opacity: 0; transform: translate(-50%, -8px);
    transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out);
  }
  html.cfg-atelye-d .atl-toast.show {
    opacity: 1; transform: translate(-50%, 0);
    transition: opacity var(--t-sheet) var(--ease), transform var(--t-sheet) var(--ease);
  }
  html.cfg-atelye-d .atl-toast svg { display: none; flex: none; }
  html.cfg-atelye-d .atl-toast.err { background: var(--alert-bg); color: var(--alert); box-shadow: inset 0 0 0 1.5px var(--alert); }
  html.cfg-atelye-d .atl-toast.err svg { display: block; }
  html.cfg-atelye-d .atl-toast button { display: none; }
  html.cfg-atelye-d .atl-toast.undo.show { pointer-events: auto; }
  html.cfg-atelye-d .atl-toast.undo button {
    all: unset; box-sizing: border-box; display: inline-flex; align-items: center; flex: none;
    height: 44px; margin: -11px -6px -11px 4px; padding: 0 8px; cursor: pointer; color: var(--ink);
    font: 700 13.5px var(--f); text-decoration: underline; text-underline-offset: 3px;
  }
  html.cfg-atelye-d .atl-toast button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--r-chip); }

  /* ── The sheets as centred dialogs (transitions.dev modal: .96, 250 / 150 ms) ── */
  html.cfg-atelye-d .atl-shade { position: fixed; inset: 0; z-index: 9000; display: block; background: rgba(10, 12, 14, .38); }
  html.cfg-atelye-d .atl-shade[hidden],
  html.cfg-atelye-d .atl-sh[hidden] { display: none; }
  html.cfg-atelye-d .atl-sh {
    position: fixed; z-index: 9001; left: 50%; top: 50%; box-sizing: border-box;
    width: min(520px, calc(100vw - 48px)); max-height: calc(100vh - 96px);
    display: flex; flex-direction: column; gap: 14px; padding: 18px 24px 24px;
    background: var(--surface); color: var(--ink); font-family: var(--f);
    border-radius: var(--r-sheet); box-shadow: var(--e1), 0 28px 60px -20px rgba(14, 18, 24, .45);
    opacity: 0; transform: translate(-50%, -50%) scale(.96);
    transition: transform var(--atd-close) var(--atd-ease), opacity var(--atd-close) var(--atd-ease);
  }
  html.cfg-atelye-d .atl-sh.open {
    opacity: 1; transform: translate(-50%, -50%) scale(1);
    transition: transform var(--atd-open) var(--atd-ease), opacity var(--atd-open) var(--atd-ease);
  }
  html.cfg-atelye-d .atl-sh[data-view="garment"] { width: min(860px, calc(100vw - 48px)); }
  html.cfg-atelye-d .atl-sh[data-view="size"] { width: min(680px, calc(100vw - 48px)); }
  html.cfg-atelye-d .atl-sh[data-view="add"] { width: min(440px, calc(100vw - 48px)); }
  html.cfg-atelye-d .atl-sh-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 44px; }
  html.cfg-atelye-d .atl-grab { display: none; }
  html.cfg-atelye-d .atl-sh-title { flex: 1; min-width: 0; margin: 0; font: 700 19px/1.25 var(--f); }
  html.cfg-atelye-d .atl-sh-aside { font: 500 13px var(--f); color: var(--mut); }
  html.cfg-atelye-d .atd-x {
    all: unset; box-sizing: border-box; flex: none; width: 44px; height: 44px; margin-right: -10px;
    display: grid; place-items: center; border-radius: var(--r-chip); color: var(--ink); cursor: pointer;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atl-sh-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 10px; padding: 2px; margin: -2px;
  }
  html.cfg-atelye-d .atl-sh-note { margin: 4px 0 0; font: 400 13.5px/1.4 var(--f); color: var(--mut); }
  /* Mahsulotni o'zgartirish */
  html.cfg-atelye-d .atd-gt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; flex: none; }
  html.cfg-atelye-d .atd-gtile {
    all: unset; box-sizing: border-box; min-width: 0; padding: 12px;
    display: flex; flex-direction: column; gap: 8px; border-radius: var(--r-panel);
    box-shadow: inset 0 0 0 1px var(--ln); color: var(--ink); cursor: pointer; text-align: left;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atd-gtile[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
  html.cfg-atelye-d .atd-gimg { height: 130px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--canvas); }
  html.cfg-atelye-d .atd-gimg img { width: 112px; height: 112px; max-width: 86%; object-fit: contain; }
  html.cfg-atelye-d .atd-gtx { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  html.cfg-atelye-d .atd-gtx b { min-width: 0; font: 600 14px/1.25 var(--f); overflow-wrap: anywhere; }
  html.cfg-atelye-d .atd-gtx span { flex: none; font: 400 12.5px var(--f); font-variant-numeric: tabular-nums; color: var(--mut); }
  html.cfg-atelye-d .atd-gtile i { font: 400 12.5px/1.3 var(--f); font-style: normal; color: var(--mut); }
  /* Ko'proq and "Nima qo'shamiz?" */
  html.cfg-atelye-d .atl-gt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex: none; }
  html.cfg-atelye-d .atl-gtile,
  html.cfg-atelye-d .atl-lrow {
    all: unset; box-sizing: border-box; min-height: 52px; min-width: 0; padding: 6px 12px;
    display: flex; align-items: center; gap: 12px; border-radius: var(--r-chip);
    box-shadow: inset 0 0 0 1px var(--ln); color: var(--ink); cursor: pointer; text-align: left;
    transition: background var(--t-fast) var(--ease);
  }
  html.cfg-atelye-d .atl-gtile svg,
  html.cfg-atelye-d .atl-lrow svg { flex: none; }
  html.cfg-atelye-d .atl-gtile span,
  html.cfg-atelye-d .atl-lrow span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  html.cfg-atelye-d .atl-gtile b,
  html.cfg-atelye-d .atl-lrow b { font: 600 14px/1.25 var(--f); }
  html.cfg-atelye-d .atl-gtile i,
  html.cfg-atelye-d .atl-lrow i { font: 400 12.5px/1.3 var(--f); font-style: normal; color: var(--mut); }
  html.cfg-atelye-d .atl-gtile[aria-disabled="true"] { opacity: .38; cursor: default; }
  html.cfg-atelye-d .atl-lrow[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
  /* The size table: today's guide content in Atelye type. */
  html.cfg-atelye-d .atl-sh-size { display: block; font-size: 13.5px; line-height: 1.45; }
  html.cfg-atelye-d .atl-sh-size .size-guide-intro,
  html.cfg-atelye-d .atl-sh-size .size-guide-notes { color: var(--mut); font-size: 13px; }
  html.cfg-atelye-d .atl-sh-size .size-guide-sub { margin: 12px 0 4px; font: 700 13.5px var(--f); color: var(--ink); text-transform: none; letter-spacing: 0; }
  html.cfg-atelye-d .atl-sh-size .size-guide-scroll { overflow-x: auto; }
  html.cfg-atelye-d .atl-sh-size table { width: 100%; border-collapse: collapse; font: 400 13.5px var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }
  html.cfg-atelye-d .atl-sh-size th,
  html.cfg-atelye-d .atl-sh-size td { padding: 9px 12px 9px 0; text-align: left; border: 0; border-bottom: 1px solid var(--ln); background: none; color: var(--ink); }
  html.cfg-atelye-d .atl-sh-size th { font-weight: 600; color: var(--mut); }
  html.cfg-atelye-d .atl-sh-size td:first-child { font-weight: 600; }
  html.cfg-atelye-d .atl-sh-size ul { margin: 0; padding-left: 18px; }

  /* Hover (a mouse is the main pointer here). */
  @media (hover: hover) {
    html.cfg-atelye-d .atd-link:hover,
    html.cfg-atelye-d .atd-btn:hover,
    html.cfg-atelye-d button.atd-lrow:hover,
    html.cfg-atelye-d .atd-sizes button:not(:disabled):not([aria-pressed="true"]):hover,
    html.cfg-atelye-d .atd-side button:not([aria-pressed="true"]):hover,
    html.cfg-atelye-d .surface-toggle .surface-btn:not([aria-pressed="true"]):hover,
    html.cfg-atelye-d .atd-ib:not([aria-pressed="true"]):hover,
    html.cfg-atelye-d .atd-tb:not(:disabled):hover,
    html.cfg-atelye-d .atd-x:hover,
    html.cfg-atelye-d .atd-gtile:hover,
    html.cfg-atelye-d .atl-gtile:not([aria-disabled="true"]):hover,
    html.cfg-atelye-d .atl-lrow:hover,
    html.cfg-atelye-d .atl-strip .atl-chip:hover,
    html.cfg-atelye-d .atd-foot #btn-place-order:not(:disabled):hover { background: var(--surface2); }
    html.cfg-atelye-d .atd-foot #btn-add-to-cart:not(:disabled):hover,
    html.cfg-atelye-d .flat-empty:hover .flat-empty-label { background: var(--cta-press); }
    html.cfg-atelye-d .atl-sw:not(:disabled):hover i { transform: scale(1.08); }
    html.cfg-atelye-d .atl-cb:hover i { background: var(--mut); }
  }

  /* A touch screen on a laptop: no double-tap zoom delay on the controls. */
  html.cfg-atelye-d .atd-panel button,
  html.cfg-atelye-d .atd-side button,
  html.cfg-atelye-d .surface-toggle button,
  html.cfg-atelye-d .atd-view button,
  html.cfg-atelye-d .atd-bar button,
  html.cfg-atelye-d .atl-sh button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

  /* Focus: 2 px ink, visible on every surface. */
  html.cfg-atelye-d .atd-panel :focus-visible,
  html.cfg-atelye-d .atd-side :focus-visible,
  html.cfg-atelye-d .surface-toggle :focus-visible,
  html.cfg-atelye-d .atd-view :focus-visible,
  html.cfg-atelye-d .atd-bar :focus-visible,
  html.cfg-atelye-d .atl-strip :focus-visible,
  html.cfg-atelye-d .atl-sh :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  html.cfg-atelye-d .atl-sw:focus-visible { outline-offset: -2px; }
  html.cfg-atelye-d .atd-bar .atd-tin:focus-visible { outline: none; }

  /* ── Hand-off: the header's cart drawer (cart.js, LOOM-333) ──────
     ponytail: the drawer's own rules are in assets/atelye.css, which this
     page must not load whole (class names collide with the phone block), so
     the few it needs are repeated here. Move them to one shared file when
     the configurator header becomes the Atelye header. */
  html.cfg-atelye-d.atl-drw-open { overflow: hidden; }
  html.cfg-atelye-d .atl-drw-dim { position: fixed; inset: 0; z-index: 9200; background: rgba(10, 12, 14, .38); }
  html.cfg-atelye-d .atl-drw {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 9201; width: 460px; max-width: 100%;
    display: flex; flex-direction: column; background: var(--surface); color: var(--ink);
    box-shadow: var(--e2); font: 400 15px/1.5 var(--f); animation: atd-drw-in var(--t-sheet) var(--ease);
  }
  html.cfg-atelye-d .atl-drw button { all: unset; box-sizing: border-box; cursor: pointer; }
  html.cfg-atelye-d .atl-drw button:disabled { cursor: not-allowed; }
  html.cfg-atelye-d .atl-drw a { color: inherit; }
  html.cfg-atelye-d .atl-drw h2,
  html.cfg-atelye-d .atl-drw p { margin: 0; }
  html.cfg-atelye-d .atl-drw svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  html.cfg-atelye-d .atl-drw svg.atl-ic-s { width: 18px; height: 18px; }
  /* the configurator page smooths text in grayscale; the site does not */
  html.cfg-atelye-d .atl-drw, html.cfg-atelye-d .atl-drw * { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
  html.cfg-atelye-d .atl-drw .atl-t3 { font: 700 15px/1.3 var(--f); }
  html.cfg-atelye-d .atl-drw .atl-sm { font-size: 13px; color: var(--mut); }
  html.cfg-atelye-d .atl-drw .atl-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
  html.cfg-atelye-d .atl-drw .atl-warn { color: var(--alert); font-weight: 700; }
  html.cfg-atelye-d .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); }
  html.cfg-atelye-d .atl-drw-bd { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px; display: flex; flex-direction: column; }
  html.cfg-atelye-d .atl-drw .atl-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px 0; }
  html.cfg-atelye-d .atl-drw .atl-row { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--ln); }
  html.cfg-atelye-d .atl-drw .atl-row:last-child { border-bottom: 0; }
  html.cfg-atelye-d .atl-drw .atl-row-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 6px; line-height: 1.25; }
  html.cfg-atelye-d .atl-drw .atl-row-tx b { font-weight: 600; font-size: 15px; }
  html.cfg-atelye-d .atl-drw .atl-row-tx i { font-style: normal; font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
  html.cfg-atelye-d .atl-drw .atl-thumb {
    width: 72px; height: 72px; flex: none; display: grid; place-items: center; padding: 6px; overflow: hidden;
    box-sizing: border-box; border-radius: 8px; 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;
  }
  html.cfg-atelye-d .atl-drw .atl-thumb img { width: 100%; height: 100%; object-fit: contain; }
  html.cfg-atelye-d .atl-drw-top { display: flex; justify-content: space-between; gap: 12px; }
  html.cfg-atelye-d .atl-drw-ctl { display: flex; gap: 8px; align-items: center; }
  html.cfg-atelye-d .atl-drw .atl-qty { display: inline-flex; align-items: center; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--ln); }
  html.cfg-atelye-d .atl-drw .atl-qty button { width: 44px; height: 44px; display: grid; place-items: center; }
  html.cfg-atelye-d .atl-drw .atl-qty output { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
  html.cfg-atelye-d .atl-drw .atl-ib { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r-chip); color: var(--ink); text-decoration: none; }
  html.cfg-atelye-d .atl-drw .atl-ib:hover { background: var(--surface2); }
  html.cfg-atelye-d .atl-drw-ft { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 24px; box-shadow: 0 -1px 0 var(--ln); }
  html.cfg-atelye-d .atl-drw .atl-price-lines { display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
  html.cfg-atelye-d .atl-drw .atl-price-lines > div { display: flex; justify-content: space-between; gap: 12px; }
  html.cfg-atelye-d .atl-drw .atl-price-lines .atl-price-tot { font: 700 17px var(--f); border-top: 1px solid var(--ln); padding-top: 10px; }
  html.cfg-atelye-d .atl-drw .atl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
  html.cfg-atelye-d .atl-drw .atl-btn {
    box-sizing: border-box; min-height: 48px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-btn); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink);
    font: 700 14.5px var(--f); text-decoration: none; text-align: center; cursor: pointer;
  }
  html.cfg-atelye-d .atl-drw .atl-btn-p { background: var(--cta); color: var(--on-cta); box-shadow: none; }
  html.cfg-atelye-d .atl-drw .atl-btn-p:hover { background: var(--cta-press); }
  html.cfg-atelye-d .atl-drw .atl-btn-w { width: 100%; }
  html.cfg-atelye-d .atl-drw :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  /* The line "Savatga qo'shish" just added: a bar on its edge and a tag, not colour alone. */
  html.cfg-atelye-d .atl-drw .atd-new { margin: 8px -16px; padding: 16px; border-bottom: 0; border-radius: 8px; background: var(--surface2); box-shadow: inset 3px 0 0 var(--ink); }
  html.cfg-atelye-d .atl-drw .atd-newtag { align-self: flex-start; padding: 2px 7px; border-radius: 3px; background: var(--ink); color: var(--surface); font: 700 11.5px/1.4 var(--f); }
}

@keyframes atd-prog { from { transform: translateX(0); } to { transform: translateX(150%); } }
@keyframes atd-drw-in { from { transform: translateX(24px); opacity: 0; } }

@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  html.cfg-atelye-d .atd-bar,
  html.cfg-atelye-d .atl-sh,
  html.cfg-atelye-d .atl-toast,
  html.cfg-atelye-d .atl-drw,
  html.cfg-atelye-d .atd-panel *,
  html.cfg-atelye-d .atd-bar *,
  html.cfg-atelye-d .atd-side *,
  html.cfg-atelye-d .atd-view *,
  html.cfg-atelye-d .surface-toggle *,
  html.cfg-atelye-d .surface-toggle .surface-btn.atl-busy::after,
  html.cfg-atelye-d .atl-hand *,
  html.cfg-atelye-d .atl-strip *,
  html.cfg-atelye-d .atl-sh *,
  html.cfg-atelye-d .atl-up-ph,
  html.cfg-atelye-d .atl-up-ph::after { transition: none !important; animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   Site header from assets/shell.js (LOOM-338)
   The configurator draws the same desktop header as every Atelye page.
   It cannot load atelye.css whole (its class names collide with the phone
   block above), so the header's rules from atelye.css are repeated here,
   each one under .atl-hdr, with the tokens on the header itself (the old
   skin keeps its own on html). Fixed, not sticky: .studio is 100vh and
   offsets everything by --nav-h (72 px, configurator.html). Below 901 px
   the configurator's own top row is the header, so the shell's phone bar
   never shows. "Dizayn yaratish" is hidden: this page is where it goes.
   ponytail: a second copy of atelye.css's header rules; move both into one
   shared file if the header changes again.
   ═══════════════════════════════════════════════════════════════════ */
.atl-mbar, .atl-hdr, .atl-offline { display: none; }
.atl-skip { position: fixed; left: 8px; top: 8px; z-index: 300; transform: translateY(-200%); min-height: 44px; padding: 12px 16px; border-radius: 8px; background: #14171a; color: #fff; font: 700 15px var(--f, sans-serif); text-decoration: none; }
.atl-skip:focus-visible { transform: none; }
@keyframes atl-menu-in { from { opacity: 0; transform: translateY(-4px); } }

@media (min-width: 901px) {
  .atl-hdr {
    --surface: #ffffff; --surface2: #e9ecef;
    --ink: #14171a; --mut: #59616a; --ln: rgba(20, 23, 26, .16); --brand: #fc5044;
    --r-chip: 6px; --r-panel: 12px; --t-fast: 100ms; --t-base: 140ms; --ease: cubic-bezier(.2, 0, 0, 1);
    --f: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    position: fixed; top: 0; left: 0; right: 0; z-index: 200; box-sizing: border-box;
    display: flex; align-items: center; gap: 28px; height: 72px; padding: 0 max(40px, calc((100% - 1184px) / 2));
    background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--ln); font: 400 15px/1.5 var(--f);
  }
  html[data-theme="dark"] .atl-hdr { --surface: #2a2e33; --surface2: #3a4047; --ink: #f0f2f4; --mut: #a3abb3; --ln: rgba(255, 255, 255, .16); }
  .atl-hdr *, .atl-hdr *::before, .atl-hdr *::after { box-sizing: border-box; }
  .atl-hdr [hidden] { display: none !important; }
  .atl-hdr button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; margin: 0; text-align: inherit; }
  .atl-hdr a { color: inherit; }
  .atl-hdr :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
  .atl-hdr .atl-ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .atl-hdr .atl-ic-s { width: 18px; height: 18px; }
  .atl-hdr .atl-wm { display: inline-flex; align-items: center; min-height: 44px; font: 800 20px/1 var(--f); font-stretch: 125%; letter-spacing: .14em; color: var(--ink); text-decoration: none; }
  .atl-hdr .atl-wm i { font-style: normal; color: var(--brand); margin-left: .06em; }
  .atl-hdr .atl-wm i::before { content: "/"; }
  .atl-hdr .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-hdr .atl-ib:hover, .atl-hdr .atl-ib:active { background: var(--surface2); }
  .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-r { display: flex; gap: 8px; align-items: center; flex: none; }
  .atl-hdr-r > .atl-btn-p { display: none; }
  .atl-hdr .atl-hdr-btn, .atl-hdr .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 { min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--ink); color: var(--surface); text-align: center; font: 700 11.5px/20px var(--f); font-variant-numeric: tabular-nums; }
  .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-pop { position: relative; }
  .atl-hdr .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-hdr .atl-menu > a, .atl-hdr .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-hdr .atl-menu > a:hover, .atl-hdr .atl-menu > button:hover, .atl-hdr .atl-menu > a:focus-visible, .atl-hdr .atl-menu > button:focus-visible { background: var(--surface2); }
  .atl-hdr .atl-menu [aria-checked="true"] { font-weight: 700; }
  .atl-hdr .atl-menu-ic { width: 18px; flex: none; }
  .atl-hdr .atl-menu hr { border: 0; border-top: 1px solid var(--ln); margin: 4px 0; width: 100%; }
  .atl-hdr .atl-menu-who { display: flex; flex-direction: column; padding: 8px 12px 10px; }
  .atl-hdr .atl-menu-who span { font-size: 12.5px; color: var(--mut); }
  .atl-hdr .atl-num { font-variant-numeric: tabular-nums; }
  html.tma .atl-hdr { display: none; }
}
/* 901–1199 px: the full header does not fit (atelye.css drops Lab first). */
@media (min-width: 901px) 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 .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 .atl-hdr-btn, .atl-hdr .atl-hdr-cart { padding: 0 6px; }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .atl-hdr nav a, .atl-hdr .atl-menu { transition: none; animation: none; }
}

/* ── LOOM-341: the phone-login modal (assets/login-modal.js) ─────────
   It hangs off <body>, outside .studio: the phone tokens come from
   html.cfg-atelye, the desktop ones from the list above. Overrides the
   old skin of login-modal.css only while an Atelye layout applies. */
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal-backdrop { background: rgba(14, 18, 24, .45); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal {
  --font-body: var(--f); --font-display: var(--f); --font-mono: var(--f);
  background: var(--surface); color: var(--ink); font-family: var(--f);
  border: 1px solid var(--ln); border-radius: var(--r-sheet);
  box-shadow: 0 24px 48px -18px rgba(14, 18, 24, .4);
  padding: 28px 24px 24px;
}
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__title { font: 700 20px/1.2 var(--f); font-stretch: 108%; letter-spacing: 0; }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__title::before { content: none; }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__sub,
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__waiting-sub,
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__success-sub { font-size: 14px; color: var(--mut); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__close { color: var(--mut); border-radius: var(--r-chip); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__close:hover { color: var(--ink); background: var(--surface2); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__phone-wrap {
  border: 1px solid var(--ln); border-radius: var(--r-btn); box-shadow: none; min-height: 48px;
}
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__phone-wrap:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__phone-prefix {
  border-right: 1px solid var(--ln); background: var(--surface2); color: var(--ink); font-weight: 600;
}
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__phone-input { color: var(--ink); font-variant-numeric: tabular-nums; }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__phone-input::placeholder { color: var(--mut); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__btn {
  min-height: 48px; border: 0; border-radius: var(--r-btn); box-shadow: none;
  background: var(--cta); color: var(--on-cta); font: 700 15px var(--f); letter-spacing: 0; text-transform: none;
  transition: background var(--t-fast) var(--ease);
}
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__btn:hover:not(:disabled),
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__btn:active:not(:disabled) { background: var(--cta-press); transform: none; box-shadow: none; }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__cancel-btn {
  min-height: 44px; border: 0; box-shadow: none; font: 600 14px var(--f); color: var(--mut);
}
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__cancel-btn:hover { color: var(--ink); transform: none; box-shadow: none; }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__tg-link { min-height: 48px; border-radius: var(--r-btn); font: 700 15px var(--f); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__error { color: var(--alert); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__spinner { border-color: var(--ln); border-top-color: var(--ink); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__timeout-bar { border: 0; border-radius: 2px; background: var(--surface2); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__timeout-fill { background: var(--ink); }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__success-icon { border: 0; }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
html:is(.cfg-atelye, .cfg-atelye-d) .loom-modal__phone-input:focus-visible { outline: none; }
