/* KLAMPO shared stylesheet (site/assets/site.css)
 * Design: "Работилница" (direction C), see DESIGN.md at the repo root.
 * ---------------------------------------------------------------------------
 * Every page links this file with a RELATIVE path:
 *   site/bg/*.html          <link rel="stylesheet" href="../assets/site.css">
 *   site/bg/pravni/*.html   <link rel="stylesheet" href="../../assets/site.css">
 *
 * PAGE SKELETON (paths shown for site/bg/*.html; add one more ../ in pravni/)
 *
 *   <body>
 *     <a class="skip" href="#main">Към съдържанието</a>
 *     <header class="site-header">
 *       <a class="site-logo" href="./" aria-label="KLAMPO – начало">
 *         <img src="../assets/brand/klampo-logo-on-light.svg" alt="KLAMPO" width="109" height="28">
 *       </a>
 *       <nav class="site-nav" aria-label="Основна навигация">
 *         <a href="dostavka.html">Доставка</a>
 *         <a href="otgovori.html">Въпроси</a>
 *       </nav>
 *     </header>
 *
 *     <main id="main" class="page prose">   (.prose = long text: legal and info pages)
 *       <h1>…</h1> <p class="lead">…</p> <h2>…</h2> <p>…</p> <ul>…</ul> <table>…</table>
 *       <p class="note">…</p>               (boxed note)
 *       <span class="tbd">X</span>          (a value that is still to be decided)
 *       <a class="btn btn-primary" href="./">…</a>   (at most ONE primary button per screen)
 *       <a class="btn btn-ghost" href="…">…</a>
 *     </main>
 *
 *     <footer class="site-footer">
 *       <nav class="footer-nav" aria-label="Информация">
 *         <a href="dostavka.html">Доставка и плащане</a>
 *         <a href="otgovori.html">Въпроси и отговори</a>
 *         <a href="za-nas.html">За нас</a>
 *         <a href="pravni/usloviya.html">Общи условия</a>
 *         <a href="pravni/poveritelnost.html">Поверителност</a>
 *         <a href="pravni/otkaz.html">Отказ и рекламации</a>
 *         <a href="pravni/proizvoditel.html">Производител и безопасност</a>
 *       </nav>
 *       <p class="footer-note">KLAMPO · изработва се по поръчка в България</p>
 *     </footer>
 *   </body>
 *
 * Colours: --paper (page, cards, inputs), --ink (text, borders, plates), --muted (helper text),
 * --rule (hairlines), --lamp (the one primary action), --night (the 3D first screen only).
 * Fonts: Onest (text and headings), JetBrains Mono (labels, numbers, buttons, chips); self-hosted in assets/fonts.
 * Unbounded stays declared for the night first screen (wow.css).
 * ------------------------------------------------------------------------- */

@font-face { font-family: Onest; font-weight: 400 700; font-style: normal; font-display: swap; src: url(fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-weight: 400 700; font-style: normal; font-display: swap; src: url(fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-600.woff2) format('woff2'); }
@font-face { font-family: Unbounded; font-weight: 400 800; font-style: normal; font-display: swap; src: url(fonts/unbounded-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; font-weight: 400 800; font-style: normal; font-display: swap; src: url(fonts/unbounded-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* direction C (DESIGN.md) */
  --paper: #F1EFEA; --ink: #121212; --muted: #5E5B55; --rule: #D3CFC6;
  --sand: #E6D8C2; --sand-card: #F3EADB; --sand-edge: #8A7A62;
  --night: #0E1015; --on-night: #F1EFEA; --on-night-muted: #A9A6A0;
  --lamp: #F0A848; --lamp-hover: #E8962E; --on-lamp: #121212;
  --error: #B3261E; --error-ground: #F8E6E3; --ok: #2E6B3A; --focus: #121212;
  --tbd: #1F4E8C; /* "still to be decided": dark blue, 7.2:1 on paper */
  --text: Onest, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter: 16px; --radius: 2px; --bar-h: 76px;
  --stage-light: #E4E0D8; --stage-dark: #1B1E25;
  /* old names (night theme), kept as aliases so older rules and other stylesheets keep working.
     wow.css sets its own night values for these on .wow. */
  --midnight: var(--paper); --graphite: var(--paper); --field: var(--paper);
  --steel: var(--muted); --line: var(--rule); --monitor: var(--tbd); --head: var(--text);
  color-scheme: light;
}
@media (prefers-contrast: more) { :root { --muted: #3D3A35; --rule: #8A867E; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--text); -webkit-font-smoothing: antialiased; }
img, svg, canvas { max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 8vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 7vw, 2.25rem); }
h3 { font-size: 1.375rem; }
p { margin: 0 0 12px; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius); }
mark { background: var(--sand); color: var(--ink); padding: 0 .2em; border-radius: var(--radius); }
.mono { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; background: var(--ink); color: var(--paper); padding: 0 14px; border-radius: var(--radius); font: 600 0.875rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
.skip:focus { top: 8px; color: var(--paper); }
.tbd { color: var(--tbd); font-weight: 600; text-decoration: underline dotted 2px; text-underline-offset: 3px; cursor: help; }
[hidden] { display: none !important; }
/* the plate: an ink bar with the bottom-right corner cut, like the hanger's name plate */
.plate { display: inline-block; line-height: 1.1; background: var(--ink); color: var(--paper); padding: 0 .3em 0 .18em; clip-path: polygon(0 0, 100% 0, 100% 72%, calc(100% - .35em) 100%, 0 100%); }

/* ---- header / footer ---- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 6px var(--gutter); min-height: 56px; }
/* inner pages: a rule under the bar across the whole width (the home page styles its own bar over the night scene) */
body:not(.has-wow) > .site-header { max-width: none; padding-inline: max(var(--gutter), calc((100% - 1120px) / 2 + var(--gutter))); border-bottom: 1px solid var(--rule); }
.site-logo { display: inline-flex; align-items: center; min-height: 44px; }
.site-logo img { display: block; height: 28px; width: auto; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font: 600 0.8125rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer { border-top: 1px solid var(--rule); margin-top: 64px; padding: 24px var(--gutter) 40px; max-width: 1120px; margin-inline: auto; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 20px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.875rem; color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { margin: 12px 0 0; font: 400 0.75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---- page + long text ---- */
.page { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.page > h1, .prose h1 { text-align: center; }
.page > h1 { margin: 24px 0 16px; }
.page > h1:first-child { margin-top: 40px; }
/* a short plate under the page title */
.page > h1::after { content: ''; display: block; width: 44px; height: 8px; margin: 16px auto 0; background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 40%, calc(100% - 5px) 100%, 0 100%); }
.prose { max-width: 720px; padding-top: 24px; }
.prose > h1:first-child { margin-top: 16px; }
.prose h2 { font-size: clamp(1.25rem, 5vw, 1.5rem); margin: 40px 0 12px; letter-spacing: -.01em; }
.prose h3 { font-size: 1.0625rem; margin: 24px 0 8px; letter-spacing: 0; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 12px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.9375rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 8px; border-top: 1px solid var(--rule); }
.prose thead th { font: 600 0.75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.table-scroll { overflow-x: auto; }
.lead { font-size: 1.125rem; line-height: 1.5; color: var(--ink); }
.note { background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--ink); border-radius: var(--radius); padding: 12px 16px; font-size: 0.9375rem; }
.legal-check { border-left-style: dashed; }
.form-model { border: 1px solid var(--ink); border-radius: var(--radius); padding: 16px 20px 4px; margin: 12px 0 20px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: var(--radius); border: 1px solid transparent; font: 600 0.9375rem/1.25 var(--mono); letter-spacing: .04em; text-transform: uppercase; text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn-primary { background: var(--lamp); color: var(--on-lamp); }
.btn-primary:hover { background: var(--lamp-hover); color: var(--on-lamp); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; }
.btn-primary[disabled]:hover, .btn-primary[aria-disabled='true']:hover { background: var(--lamp); }
.btn-ghost[disabled]:hover, .btn-ghost[aria-disabled='true']:hover { background: transparent; color: var(--ink); }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.linkish:hover { text-decoration-thickness: 2px; }

/* ---- forms ---- */
.field { display: block; margin: 0 0 16px; }
.field > .label, .opt > legend { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 600 0.75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; padding: 0; width: 100%; }
.label .opt-tag, .label .count, legend .opt-tag { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: .02em; }
.input { display: block; width: 100%; min-height: 48px; padding: 12px 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); font: 400 1rem/1.3 var(--text); -webkit-appearance: none; appearance: none; }
textarea.input { min-height: 88px; resize: vertical; }
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.input[aria-invalid='true'] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.hint { display: block; margin-top: 6px; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.error { display: block; margin-top: 6px; font-size: 0.875rem; line-height: 1.4; color: var(--error); font-weight: 600; }
.error:empty { display: none; }
.error::before { content: '! '; font-weight: 700; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 10px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--ink); }
.opt { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.picker { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); padding: 3px var(--gutter) 8px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: thin; scrollbar-color: var(--rule) transparent; -webkit-overflow-scrolling: touch; }
.chip { position: relative; flex: none; scroll-snap-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip-body { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); font: 400 0.8125rem/1.25 var(--mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.chip:hover .chip-body { border-color: var(--ink); }
.chip input:checked + .chip-body { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.chip input:focus-visible + .chip-body { outline: 2px solid var(--focus); outline-offset: 3px; }
.chip svg { width: 24px; height: 24px; flex: none; }
/* phones: the sets, the icons and the fonts (4, 12 and 6 choices) wrap in two columns, all on screen, no sideways swipe (18 Nov) */
@media (max-width: 959px) {
  .picker[data-picker="look"], .picker[data-picker="icon"], .picker[data-picker="font"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 3px 0 4px; }
  .picker[data-picker="look"] .chip, .picker[data-picker="icon"] .chip, .picker[data-picker="font"] .chip { min-width: 0; }
  .picker[data-picker="look"] .chip-body, .picker[data-picker="icon"] .chip-body, .picker[data-picker="font"] .chip-body { height: 100%; white-space: normal; }
}
/* the fonts: each name in its own letters once the font file is in (product.js loadFontSamples), plain Onest until then */
.font-sample { font: 400 1rem/1.2 var(--text); letter-spacing: 0; text-transform: none; }
/* a font's name is one long word in its own (wide) letters: no larger than the chip, also at a large iPhone text size (textsize.js) */
.font-sample { overflow-wrap: anywhere; }
.has-sample .font-sample { font-family: var(--sample-font), var(--text); font-size: min(1.125rem, 5vw); font-synthesis: none; }
.has-sample[data-font="pixel"] .font-sample { font-size: min(0.75rem, 3.3vw); line-height: 1.6; }

/* colours (22 Nov 2026): a radio group of 11 swatches per part. 44 px squares, the colour inside a paper rim so white
   reads on paper; the chosen one has the chip's ink ring and a check in the swatch's contrast colour; its name is
   written in the part's legend (and is each radio's label). Six to a row on a 360 px phone. */
.opt-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; font: 600 0.75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.opt-head .opt-tag { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: .02em; }
.colours { margin: 0 0 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.colours .colour-opt { margin-bottom: 12px; }
.colour-opt[hidden] { display: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; padding: 3px 0 4px; }
.sw-chip { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw { position: relative; display: block; width: 44px; height: 44px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); }
.sw::before { content: ''; position: absolute; inset: 4px; background: var(--sw); border-radius: 1px; box-shadow: inset 0 0 0 1px rgb(18 18 18 / .2); forced-color-adjust: none; }
.sw-chip:hover .sw { border-color: var(--ink); }
.sw-chip input:checked + .sw { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sw-chip input:checked + .sw::after { content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 7px; border: solid var(--paper); border-width: 0 0 3px 3px; transform: translate(-50%, -70%) rotate(-45deg); forced-color-adjust: none; }
.sw-chip input:checked + .sw[data-on="light"]::after { border-color: var(--ink); }
.sw-chip input:focus-visible + .sw { outline: 2px solid var(--focus); outline-offset: 3px; }
.order-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); font-size: 0.9375rem; line-height: 1.35; }
.order-summary a, #editConfig { white-space: nowrap; display: inline-block; padding: 12px 0; margin: -12px 0; } /* a 44 px tap */
.swatch { width: 36px; height: 24px; border-radius: var(--radius); flex: none; display: grid; place-items: center; font: 700 0.75rem/1 var(--text); letter-spacing: 0; text-transform: none; border: 1px solid var(--ink); }

/* ---- product configurator ---- */
.hero { display: grid; gap: 16px; grid-template-areas: 'copy' 'stage' 'buy'; padding-top: 8px; }
.hero-copy { grid-area: copy; }
.hero-copy p { margin: 8px 0 0; color: var(--muted); font-size: 1rem; }
.stage-wrap { grid-area: stage; position: relative; aspect-ratio: 16 / 10.6; min-width: 0; }
.stage { position: absolute; inset: 0; border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--stage-light); transition: background-color .25s; isolation: isolate; }
.stage[data-tone='dark'] { background: var(--stage-dark); }
.stage img, .stage > canvas, .stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage img { object-fit: cover; }
.stage > canvas { touch-action: pan-y; cursor: grab; opacity: 0; }
.stage > canvas:active { cursor: grabbing; }
.stage > svg { opacity: 0; }
.stage[data-mode='live'] > canvas, .stage[data-mode='illus'] > svg { opacity: 1; }
.stage[data-mode="live"] img, .stage[data-mode="illus"] img { opacity: 0; }
.stage[data-busy='true']::after { content: ''; position: absolute; right: 12px; top: 12px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgb(18 18 18 / .25); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.stage[data-tone='dark'][data-busy='true']::after { border-color: rgb(241 239 234 / .3); border-top-color: var(--paper); }
@keyframes spin { to { transform: rotate(1turn); } }
/* the label on every picture ("Истинска снимка …", "3D визуализация") */
.stage-tag { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 5px 8px; border-radius: var(--radius); background: rgb(241 239 234 / .92); color: var(--ink); font: 400 0.75rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.stage-views { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 6px; }
.stage-views button { min-height: 36px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 600 0.75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; position: relative; }
.stage-views button::after { content: ''; position: absolute; inset: -6px -3px; } /* 48 px tap target */
.stage-views button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.stage-more { position: absolute; right: 8px; bottom: 8px; z-index: 3; min-height: 44px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 0.8125rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.stage-more:hover { background: var(--paper); color: var(--ink); }
.illus-body { fill: var(--c-face, var(--c-body, #1b1d21)); stroke: var(--c-body, #1b1d21); stroke-width: 1.6px; paint-order: stroke; } /* the face's colour covers the whole front (deskhanger 'face' layout); the body shows at the edges */ .illus-face { fill: var(--c-face, var(--c-body, #1b1d21)); } .illus-name { fill: var(--c-name, #f1efe8); font: 700 0.8125rem var(--text); }

.buy { grid-area: buy; min-width: 0; }
.name-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.name-row .field { margin: 0; }
.name-input { min-height: 52px; font-size: 1.125rem; font-weight: 600; }
.name-row .btn { min-height: 52px; padding: 0 14px; font-size: 0.8125rem; }
.customise .when-chosen, .is-chosen .customise .when-new { display: none; }
.is-chosen .customise .when-chosen { display: inline; }
.is-chosen .name-row .customise { background: transparent; color: var(--ink); border-color: var(--ink); } /* once chosen, the order is the main action */
#nameError { min-height: 0; }

.buybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font: 600 1.5rem/1 var(--mono); letter-spacing: -.01em; display: block; }
.price-note { display: block; margin-top: 4px; font-size: 0.7812rem; line-height: 1.25; color: var(--muted); }
.buybar .btn { flex: none; min-width: 132px; min-height: 52px; }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sheet-head h2 { font: 600 0.8125rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.sheet-close { min-height: 44px; }
.sheet-name { margin-bottom: 16px; }
.seg-note { font-size: 0.875rem; color: var(--muted); margin: 0 0 16px; }
.desk-field { max-width: 260px; }

@media (max-width: 959.98px) {
  /* Phones (22 Nov 2026, the owner: "Поръчай" at the bottom of every screen made no sense before anything was chosen).
     First the name and one button to the choices; "Поръчай" lives at the foot of the choices, and after "Готово" under
     the name. Nothing is pinned to the bottom of the page. */
  .name-row { grid-template-columns: 1fr; }
  .name-row .customise { width: 100%; min-height: 56px; font-size: 0.9375rem; }
  .buybar { margin-top: 12px; padding: 12px; background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); }
  .buy:not(.is-chosen) .buybar { display: none; }
  .sheet-open .buy .buybar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; margin: 0; min-height: var(--bar-h); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); border: 0; border-top: 1px solid var(--ink); border-radius: 0; }
  .sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); z-index: 50; height: calc(100vh - var(--stage-h, 200px) - var(--bar-h) - 24px); height: calc(100dvh - var(--stage-h, 200px) - var(--bar-h) - env(safe-area-inset-bottom, 0px) - 24px); min-height: 220px; overflow-y: auto; overscroll-behavior: contain; padding: 8px var(--gutter) 16px; background: var(--paper); border-top: 1px solid var(--ink); border-radius: var(--radius) var(--radius) 0 0; transform: translateY(calc(100% + var(--bar-h) + 40px)); visibility: hidden; transition: transform .22s ease-out, visibility 0s linear .22s; }
  .sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: var(--radius); background: var(--ink); margin: 0 auto 6px; }
  .sheet-open .sheet { transform: none; visibility: visible; transition: transform .22s ease-out; }
  .sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(18 18 18 / .6); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
  .sheet-open .stage { position: fixed; inset: auto; left: var(--gutter); right: var(--gutter); top: 10px; height: var(--stage-h, 200px); z-index: 45; }
  .sheet-open { overflow: hidden; }
}
@media (min-width: 900px) {
  :root { --gutter: 48px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: 'stage copy' 'stage buy'; gap: 24px 48px; align-items: start; padding-top: 16px; grid-template-rows: auto 1fr; }
  .stage-wrap { position: sticky; top: 16px; aspect-ratio: 16 / 11; }
  .name-row { grid-template-columns: 1fr; }
  .name-row .btn, .sheet-head, .sheet-name, .sheet-backdrop { display: none; }
  .sheet { margin-top: 24px; }
  .picker { flex-wrap: wrap; overflow: visible; margin: 0; padding: 3px 0 4px; }
  .buy { display: flex; flex-direction: column; }
  .buy > * { order: 3; }
  .buy > .name-row { order: 1; }
  .buy > #nameError { order: 1; }
  .buybar { order: 4; margin-top: 24px; padding: 16px; background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); }
  .price { font-size: 1.875rem; }
  .price-note { font-size: 0.875rem; }
  .buybar .btn { min-width: 180px; }
}

/* ---- older product-page sections (kept for any page that still uses them) ---- */
.section { margin-top: 64px; }
.section > h2 { margin-bottom: 16px; }
.section > p { max-width: 68ch; color: var(--ink); }
.trust { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trust li { background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); padding: 12px; font-size: 0.875rem; line-height: 1.35; color: var(--muted); }
.trust b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; counter-increment: step; }
.steps svg { width: 96px; height: 96px; display: block; }
.steps h3 { font-size: 1.125rem; }
.steps h3::before { content: '0' counter(step) ' '; font: 600 0.75rem/1 var(--mono); letter-spacing: .06em; vertical-align: .2em; color: var(--muted); }
.steps p { margin: 4px 0 0; font-size: 0.9375rem; color: var(--muted); }
.figures { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
figure { margin: 0; }
.figures figure { background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.figures img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--stage-light); border-bottom: 1px solid var(--ink); }
.figures .wide { grid-column: 1 / -1; }
.figures .wide img { aspect-ratio: 3 / 2; }
figcaption { padding: 8px 12px 10px; font-size: 0.8125rem; line-height: 1.35; color: var(--muted); }
figcaption b { color: var(--ink); font-weight: 600; }
.gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gets li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); padding: 12px 14px; }
.gets li::before { content: ''; width: 10px; height: 10px; margin: 7px 0 0 6px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%); }
.gets span { color: var(--muted); font-size: 0.875rem; display: block; }
.spec { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 11px 0; border-top: 1px solid var(--rule); }
.spec th { width: 38%; font: 600 0.75rem/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-right: 12px; }
.qa { display: grid; gap: 4px; margin: 0; }
.qa dt { font-weight: 600; margin-top: 16px; }
.qa dd { margin: 4px 0 0; color: var(--muted); max-width: 68ch; }
@media (min-width: 720px) {
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps li { grid-template-columns: 1fr; align-items: start; }
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figures .wide { grid-column: auto; }
  .figures .wide img { aspect-ratio: 4 / 3; }
  .gets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
  .two-col .section { margin-top: 64px; }
}

/* ---- checkout + order received ---- */
.narrow { max-width: 560px; }
.steps-nav { display: flex; gap: 8px; margin: 8px 0 24px; padding: 0; list-style: none; font: 400 0.75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.steps-nav li { flex: 1; padding-top: 8px; border-top: 3px solid var(--rule); }
.steps-nav li[aria-current='step'] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.card { background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); padding: clamp(16px, 5vw, 24px); margin: 0 0 16px; }
.card h2 { font: 600 0.75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.form-group { margin: 0 0 24px; }
.form-group > h2 { font-size: 1.375rem; letter-spacing: -.01em; margin: 0 0 16px; padding-top: 16px; border-top: 1px solid var(--rule); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg .chip-body { justify-content: center; white-space: normal; text-align: center; }
.summary { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center; }
/* the picture above the list at every width: beside it (220 px + the rest of a 560 px column) the list had 178 px and
   „Форма на табелката“ left its values 16 px, one letter a line (found on the live site, 25 Nov) */
.summary .mini { max-width: 360px; }
.summary .mini { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--stage-light); }
.summary .mini[data-tone='dark'] { background: var(--stage-dark); }
.summary .mini canvas, .summary .mini svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.summary .mini canvas { opacity: 0; } .summary .mini[data-mode='live'] canvas { opacity: 1; } .summary .mini[data-mode='live'] svg { opacity: 0; }
.kv { margin: 0; display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: 6px 16px; font-size: 0.9375rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 600 1.25rem/1.2 var(--mono); margin: 0 0 6px; padding-top: 12px; border-top: 1px solid var(--ink); }
.alert { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; background: var(--error-ground); border: 1px solid var(--error); border-left-width: 3px; color: #5C1410; font-size: 0.9375rem; }
.alert:empty { display: none; }
.alert p:last-child { margin: 0; }
.alert-info { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.consent { font-size: 0.875rem; color: var(--muted); }
.turnstile { min-height: 65px; margin: 0 0 12px; }
.order-no { font: 600 1.75rem/1.1 var(--mono); letter-spacing: .02em; }
.next { margin: 0; padding-left: 22px; }
.next li { margin: 8px 0; color: var(--ink); }
.next li::marker { font-family: var(--mono); color: var(--muted); }
.actions { display: grid; gap: 8px; margin-top: 16px; }

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

/* illustration colours follow the chosen colours (preview.js sets --c-body, --c-face, --c-name on the stage); the rim is the name's */
.illus-rim { fill: var(--c-name, #f1efe8); }
.illus-icon { color: var(--c-icon, var(--c-name, #f1efe8)); } /* preview.js draws the chosen icon beside the name */
.stage-wrap picture { display: contents; }

.gets-figure { background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.gets-figure img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--stage-light); }

/* Fit check (fit.js): soft hint vs. blocked order button. */
.error.soft { color: var(--muted); }
.is-blocked, [aria-disabled="true"].btn { opacity: .45; cursor: not-allowed; }

/* The page of one shared nick (/n/<nick>, deploy/site/src/share-page.js). Centred like every page. */
.share { text-align: center; }
.share-kicker { color: var(--muted); margin: 40px 0 0; }
.share .share-title { margin: 12px 0 16px; font-size: clamp(1.75rem, 8vw, 3.25rem); line-height: 1.1; overflow-wrap: anywhere; }
.share .share-title::after { display: none; }
.share-figure { margin: 24px 0 0; border: 1px solid var(--ink); background: var(--paper); }
.share-figure img { display: block; width: 100%; height: auto; }
.share-figure figcaption { color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--rule); text-align: left; }
.share-terms { margin: 12px 0 32px; }
.share-send { text-align: center; }
.share-send h2 { margin-bottom: 8px; }
.share-send p { margin: 0 0 16px; }
.share-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.share-buttons .btn { flex: 1 1 140px; }
.share-link-field { margin: 16px 0 0; text-align: left; }
.share-status { margin: 8px 0 0; min-height: 1.5em; }
.share-own { margin: 40px 0 64px; }
.share-own h2 { font: 600 0.75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.share-own-form { display: grid; gap: 8px; text-align: left; }
.share-from-shop { margin: 4px 0 0; font-size: 0.875rem; }
.share-from-shop a { color: var(--ink); text-underline-offset: 3px; }

/* Windows high contrast / forced colours: keep the chip choice and the plates visible */
@media (forced-colors: active) {
  .chip input:checked + .chip-body, .sw-chip input:checked + .sw { outline: 2px solid CanvasText; }
  .plate, .page > h1::after { forced-color-adjust: none; }
}

/* Long words in headings (Bulgarian has many) break instead of pushing the page wider than a narrow phone
   when the browser's font size is set large. Hyphens where the browser knows Bulgarian, a plain break otherwise. */
h1, h2, h3, .band-title, .hero-title { overflow-wrap: break-word; hyphens: auto; }

/* the Christmas season (site/shared/season.js): without JavaScript the Christmas version shows */
html.season-off [data-season="koleda"], html:not(.season-off) [data-season="off"] { display: none !important; }

/* the EU's harmonised notice on the legal guarantee (Общи условия, т. 9): the official image whole, never cropped or stretched; tap opens it full size */
.eu-notice { margin: 16px 0 20px; max-width: 520px; }
.eu-notice img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.eu-notice figcaption { margin-top: 6px; font-size: 0.875rem; color: var(--muted); }

/* AI testers on iPhone, 23 Nov 2026: */
.opt-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
@media (max-width: 959.98px) {
  /* "Готово" stays in reach however large the text: the panel's head sticks to its top */
  .sheet-head { position: sticky; top: -1px; z-index: 2; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 6px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--rule); }
}

/* A large iPhone text size (textsize.js, up to 140 %) makes the page's text larger, but not the labels laid over the
   3D preview (at 360 px they ran into each other) nor the order bar under the open choices (it took a quarter of
   the screen and left little room for the choices): those keep about their usual size on a phone. */
@media (max-width: 899px) {
  .stage-tag { font-size: min(0.75rem, 3vw); letter-spacing: .04em; }
  .stage-views button { font-size: min(0.75rem, 3.2vw); }
  .stage-more { font-size: min(0.8125rem, 3.6vw); }
  .buybar .price { font-size: min(1.5rem, 6.7vw); }
  .buybar .price-note { font-size: min(0.7812rem, 3.5vw); }
  .buybar .btn { font-size: min(0.9375rem, 4.2vw); }
}
/* the shop's profiles and email in every footer (25 Nov: Merchant Center and the law want a way to reach us) */
.footer-social { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }
.footer-social a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
