/* DBIJOU v4 - /obraczki/konfigurator/ (page-obraczki.php): hand-written skin of the wedding-band configurator,
   restyled in place. It mirrors the /projekt skin (assets/v4/pages/projekt.css + projekt-core.css): app shell with
   one scroll container (the options panel #kob-cfg), compact top bar, rail "Wasz wybór", film-black viewer with the
   caption and the estimate under it, step head, tiles, segment, pills, system fields and slider, bottom bar,
   fullscreen and the phone shell. Class names are the legacy kob-* the page script reads plus kob-* parts of the
   restyle; system tokens only. Theme-only file (vh units allowed). Breakpoints: tablet 1024 px, phone 640 px; small
   laptops (1025-1279 px) get the 260 px rail of /projekt.
   The 3D engine draws its own chrome inside the frame (pair tabs top centre, settings bottom left, reset bottom
   right, hint bottom centre): page controls stay off those places (fullscreen button top right, close pill top left,
   caption and estimate under the frame).
   1 document shell, 2 app grid, 3 top bar, 4 rail and summary bar, 5 viewer, caption, estimate, 6 fullscreen,
   7 options panel and step head, 8 pair segment, 9 tiles, 10 sliders, 11 options with a box and sizes,
   11b catalog controls (fineness, division, parts, grooves, stones, engraving type and pictograms), 12 contact step,
   13 done, 14 bottom bar, 15 small laptop, 16 tablet, 17 phone, 18 motion. */

/* ------------------------------------------------------------------ 1. document shell
   html and body are pinned to the screen; only #kob-cfg scrolls (iOS: no second scrollbar from the address bar).
   Never add -webkit-overflow-scrolling to an ancestor of the viewer (it traps the fixed fullscreen viewer on iOS).
   box-sizing on body: the consent banner pads the body bottom, the shell then ends above the banner.
   Legacy variable names resolve to the system tokens (nothing in the script reads them; kept for safety). */
html.v4:has(body.dbijou-konfigurator){height:100%;overflow:hidden;background:var(--ink)}
body.dbijou-konfigurator{
  box-sizing:border-box;height:100vh;height:100dvh;overflow:hidden;
  --muted-on-dark:var(--fg-2);--muted:var(--fg-2);--serif:var(--ff-display);--sans:var(--ff-text);--mono:var(--ff-mono);--gold-strong:var(--gold);
}
body.dbijou-konfigurator,
body.dbijou-konfigurator *{touch-action:manipulation}   /* kills double-tap zoom, keeps pan and pinch */
/* Admin bar (logged-in, without the dbj_noadminbar cookie): WordPress adds a top margin on html. */
body.admin-bar.dbijou-konfigurator{height:calc(100vh - 32px);height:calc(100dvh - 32px)}
@media screen and (max-width:782px){
  body.admin-bar.dbijou-konfigurator{height:calc(100vh - 46px);height:calc(100dvh - 46px)}
}

/* ------------------------------------------------------------------ 2. app grid
   Desktop: top bar over everything; rail on the left; main (viewer column + options panel); bottom bar under main.
   The bottom-bar row is auto, so the done screen (bar hidden) takes the full height. */
.kob{
  --kob-top-h:var(--sp-8);
  --kob-nav-h:calc(var(--h-btn) + 2 * var(--sp-4));
  --kob-bar-h:calc(var(--tap) + var(--sp-3));
  --kob-pad:var(--sp-7);
  --kob-cfg-top:var(--sp-6);
  --kob-rail:320px;
  --kob-panel:min(520px,42vw);
  --kob-on:var(--ink-3);
  position:relative;
  display:grid;
  grid-template-columns:var(--kob-rail) minmax(0,1fr);
  grid-template-rows:var(--kob-top-h) minmax(0,1fr) auto;
  height:100%;
  overflow:hidden;
  background:var(--bg);
  color:var(--fg);
}

/* ------------------------------------------------------------------ 3. top bar
   The /projekt app header: wordmark, two site links, the way back (to the wedding-band page). */
.kob-top{grid-column:1 / -1;grid-row:1;display:flex;align-items:center;justify-content:space-between;gap:var(--sp-5);height:var(--kob-top-h);padding-inline:var(--sp-5) var(--kob-pad);background:var(--bg)}
.kob-top__wm{display:inline-flex;align-items:baseline;padding-block:max(var(--sp-2),calc((var(--tap) - 1em) / 2));font-family:var(--ff-mark);font-size:30px;line-height:1;letter-spacing:0;color:var(--fg);white-space:nowrap}
.kob-top__wm .d{display:inline-block;margin-right:.1em}
.kob-top__wm .rest{letter-spacing:.1em}
.kob-top__wm .pl{font-size:max(.38em,12px);letter-spacing:.06em;margin-left:.12em;opacity:.9}
.kob-top__right{display:flex;align-items:center;gap:clamp(12px,1.7vw,26px)}
.kob-top__link{display:inline-flex;align-items:center;min-height:var(--tap);font-size:var(--fs-ui);font-weight:500;line-height:1;white-space:nowrap;color:var(--fg-2);transition:color var(--dur-2) var(--ease-out)}
.kob-top__link:hover{color:var(--fg)}
.kob-close{display:inline-flex;align-items:center;min-height:var(--tap);margin-left:var(--sp-2);font-size:var(--fs-ui);font-weight:500;line-height:1.2;white-space:nowrap;color:var(--fg);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:6px;text-decoration-color:var(--fg-3);transition:text-decoration-color var(--dur-2) var(--ease-out)}
.kob-close:hover{text-decoration-color:var(--fg)}

/* ------------------------------------------------------------------ 4. rail "Wasz wybór" and summary bar
   Rail: the six steps (#kob-steps, the script's step navigation) as two-line rows on a tone ground, the current row
   one tone step up; a value line per step for the pair ("Jej ... · Jego ..." when the bands differ). Steps not reached
   yet are not clickable (the script ignores them) and show their preset value dimmed. */
.kob-side{grid-column:1;grid-row:2 / 4;--bg:var(--ink-2);--tone:var(--ink-3);display:flex;flex-direction:column;min-height:0;overflow-y:auto;background:var(--bg);scrollbar-width:none}
.kob-side::-webkit-scrollbar{display:none}
.kob-bar{display:none}
.kob-side__body{display:flex;flex-direction:column;flex:1 1 auto;padding-block:var(--sp-6) var(--sp-4)}
.kob-side__title{margin:0 var(--sp-5) var(--sp-4);font-family:var(--ff-mono);font-size:var(--fs-label);font-weight:500;line-height:1.4;letter-spacing:.16em;text-transform:uppercase;color:var(--fg-2)}
.kob-steps{display:flex;flex-direction:column}
.kob-step{display:flex;flex-direction:column;gap:2px;width:100%;min-height:var(--sp-8);padding:var(--sp-3) var(--sp-5);text-align:left;color:var(--fg);transition:background-color var(--dur-2) var(--ease-out)}
.kob-step:focus-visible{outline-offset:-2px}   /* the rail clips anything outside its width */
.kob-step[aria-disabled="true"]{cursor:default}
.kob-step:not([aria-disabled="true"]):hover,
.kob-step.is-on{background:var(--tone)}
.kob-step__lbl{font-size:var(--fs-small);line-height:1.4;color:var(--fg-2);font-variant-numeric:tabular-nums lining-nums}
.kob-step.is-on .kob-step__lbl{font-weight:500;color:var(--fg)}
.kob-step__val{font-family:var(--ff-display);font-size:var(--fs-lead);line-height:1.25;color:var(--fg);font-variant-numeric:lining-nums;overflow-wrap:anywhere}
.kob-step[aria-disabled="true"] .kob-step__val{color:var(--fg-3)}

/* ------------------------------------------------------------------ 5. viewer, caption, estimate
   Viewer column: the film-black frame fills the height; under it the caption of the band shown (name line, materials
   line) and the estimate in the /projekt type. Nothing of the page sits over the frame except the fullscreen button. */
.kob-main{grid-column:2;grid-row:2;position:relative;display:flex;min-width:0;min-height:0;overflow:hidden}
.kob-preview{position:relative;flex:0 0 50%;display:flex;flex-direction:column;gap:var(--sp-3);min-width:0;min-height:0;padding:var(--sp-6) 0 var(--sp-4) var(--kob-pad)}
.kob-stage{position:relative;flex:1 1 auto;min-height:200px;overflow:hidden;background:var(--film)}
.kob-preview__iframe{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;background:var(--film)}
/* Loading poster: film black, one centred caption, a thin running line; out after the first frame. */
.kob-poster{position:absolute;inset:0;z-index:var(--z-raise);background:var(--film);transition:opacity var(--dur-2) var(--ease-out),visibility 0s linear 0s}
.kob-poster.is-out{opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--dur-2) var(--ease-out),visibility 0s linear var(--dur-2)}
.kob-poster__cap{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:var(--fs-small);line-height:1.4;color:var(--fg-2);white-space:nowrap}
.kob-poster__bar{position:absolute;left:0;right:0;bottom:0;height:2px;overflow:hidden}
.kob-poster__bar i{display:block;width:40%;height:100%;background:var(--fg-3);animation:btn-load var(--dur-3) var(--ease-inout) infinite alternate}
/* Fullscreen button (44 px square, top right) and the close pill (top left, fullscreen only). */
.kob-fs-btn,
.kob-fs-close{position:absolute;z-index:calc(var(--z-raise) + 1);display:inline-flex;align-items:center;justify-content:center;height:var(--tap);background:var(--ink-2);color:var(--fg);transition:background-color var(--dur-2) var(--ease-out)}
.kob-fs-btn{top:var(--sp-3);right:var(--sp-3);width:var(--tap)}
.kob-fs-btn:hover,
.kob-fs-close:hover{background:var(--ink-3)}
.kob-fs-btn svg{width:16px;height:16px}
.kob-fs-close{display:none;top:calc(var(--sp-3) + env(safe-area-inset-top,0px));left:calc(var(--sp-3) + env(safe-area-inset-left,0px));gap:var(--sp-2);padding-inline:var(--sp-3);font-size:var(--fs-small);font-weight:500;line-height:1}
.kob-fs-close svg{width:14px;height:14px}
/* Caption of the band shown: a name line and a materials line (written by the script). */
.kob-preview__caption{display:flex;flex-direction:column;justify-content:flex-end;gap:2px;flex:none;min-height:calc(var(--sp-7) + var(--sp-2))}
.kob-cap__name{font-family:var(--ff-display);font-size:var(--fs-lead);line-height:1.25;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kob-cap__sub{font-size:var(--fs-small);line-height:1.45;color:var(--fg-2);font-variant-numeric:lining-nums;overflow-wrap:anywhere}
/* Estimate: "Wycena orientacyjna za parę", tabular figures. */
.kob-est{display:flex;flex-direction:column;flex:none;min-width:0}
.kob-est__lbl{font-size:var(--fs-small);line-height:1.35;color:var(--fg-2)}
.kob-est__val{font-size:var(--fs-h4);font-weight:500;line-height:1.3;color:var(--fg);font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}

/* ------------------------------------------------------------------ 6. fullscreen
   .is-fs on #kob-preview (fixed overlay on the film black), .kob-fs-active on the body (both set by the script).
   Desktop: the step stays on the right as a panel (as /projekt), the frame ends before it, so the engine's own
   corner controls stay clear of the panel. Tablet and phone: the viewer alone. */
.kob-preview.is-fs{position:fixed;inset:0;z-index:var(--z-sheet);padding:0;gap:0;background:var(--film)}
.kob-preview.is-fs .kob-stage{flex:1 1 auto;height:auto;min-height:0}
.kob-preview.is-fs .kob-preview__caption,
.kob-preview.is-fs .kob-est,
.kob-preview.is-fs .kob-fs-btn{display:none}
.kob-preview.is-fs .kob-fs-close{display:inline-flex}
body.kob-fs-active{overflow:hidden}
@media (min-width:1025px){
  body.kob-fs-active:not(.kob-step-done) .kob-preview.is-fs .kob-stage{margin-right:calc(var(--kob-panel) + 2 * var(--sp-3))}
  body.kob-fs-active:not(.kob-step-done) .kob-cfg{
    position:fixed;top:var(--sp-3);right:var(--sp-3);bottom:var(--sp-3);z-index:calc(var(--z-sheet) + 1);
    width:var(--kob-panel);padding:0 var(--sp-5) var(--sp-6);--kob-cfg-top:var(--sp-5);
    --bg:var(--ink-2);--tone:var(--ink-3);background:var(--bg);scrollbar-width:none;
  }
  body.kob-fs-active:not(.kob-step-done) .kob[data-kob-step="7"] .kob-cfg{padding-top:var(--kob-cfg-top)}
  body.kob-fs-active .kob-cfg::-webkit-scrollbar{display:none}
  body.kob-fs-active .kob-cfg .kob-step-head__h{font-size:var(--fs-h4)}
  body.kob-fs-active .kob-cfg .kob-step-head__sub{font-size:var(--fs-small)}
}

/* ------------------------------------------------------------------ 7. options panel and step head
   The one scroll container (the script scrolls it to the top on every step). Step head as /projekt: mono label,
   display title, one lead sentence. */
.kob-cfg{position:relative;flex:1 1 0;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:0 var(--kob-pad) var(--sp-7);scrollbar-width:thin;scrollbar-color:var(--ink-3) transparent}
/* without the pair segment (contact step, single mode) the panel takes its top space back */
.kob[data-kob-step="7"] .kob-cfg,
.kob-mode-single .kob-cfg{padding-top:var(--kob-cfg-top)}
.kob-step-head{display:flex;flex-direction:column;gap:var(--sp-3);margin-bottom:var(--sp-5)}
.kob-step-head__eyebrow{font-family:var(--ff-mono);font-size:var(--fs-label);font-weight:500;line-height:1.4;letter-spacing:.16em;text-transform:uppercase;color:var(--fg-2)}
.kob-step-head__h{font-family:var(--ff-display);font-size:var(--fs-h3);font-weight:400;line-height:1.06;letter-spacing:-.02em;color:var(--fg);text-wrap:balance}
.kob-step-head__sub{font-size:var(--fs-body);line-height:1.6;color:var(--fg-2);max-width:var(--measure)}
.kob-sec__lbl{margin:var(--sp-5) 0 var(--sp-2);font-size:var(--fs-small);font-weight:500;line-height:1.3;color:var(--fg)}
.kob-sec__lbl--first{margin-top:0}
.kob [hidden]{display:none !important}

/* ------------------------------------------------------------------ 8. pair segment
   Jej / Jego / Obie naraz: the /projekt segment (equal parts, the pressed part filled), pinned to the top of the panel
   while the options scroll (the panel has no top padding: Chrome pins a sticky child below the scroll container's
   padding, content would show above it). Hidden in single mode and on the contact step. */
.kob-pair{position:sticky;top:0;z-index:var(--z-raise);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:calc(var(--kob-cfg-top) - var(--sp-3)) 0 var(--sp-4);padding-block:var(--sp-3);background:var(--bg)}
.kob-pair__tab{display:grid;place-items:center;min-width:0;min-height:var(--tap);padding:var(--sp-1) var(--sp-2);border:1px solid var(--fg-3);font-size:var(--fs-small);font-weight:500;line-height:1.2;text-align:center;color:var(--fg);transition:background-color var(--dur-2) var(--ease-out),color var(--dur-2) var(--ease-out),border-color var(--dur-2) var(--ease-out)}
.kob-pair__tab + .kob-pair__tab{margin-left:-1px}
.kob-pair__tab:hover{border-color:var(--fg);z-index:var(--z-base)}
.kob-pair__tab.is-on{z-index:var(--z-base);background:var(--fg);border-color:var(--fg);color:var(--bg)}
.kob-mode-single .kob-pair,
.kob[data-kob-step="7"] .kob-pair{display:none}

/* ------------------------------------------------------------------ 9. tiles
   The /projekt tile: a tone block; the chosen tile gets the text-colour outline and a tick. Profiles carry the
   cross-section drawing, metals and woods a colour disc (the colour is data in the markup, --sw). */
.kob-tiles{display:grid;gap:var(--sp-2)}
.kob-tiles--profiles{grid-template-columns:repeat(4,minmax(0,1fr))}
.kob-tiles--fins,
.kob-tiles--presets{grid-template-columns:repeat(2,minmax(0,1fr))}
.kob-tiles--mats,
.kob-tiles--woods{grid-template-columns:repeat(3,minmax(0,1fr))}
.kob-tile{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:var(--sp-1);min-width:0;min-height:var(--tap);padding:var(--sp-4);background:var(--tone);border:1px solid transparent;text-align:left;color:var(--fg);transition:border-color var(--dur-2) var(--ease-out),background-color var(--dur-2) var(--ease-out)}
.kob-tile:hover{border-color:var(--fg-3)}
.kob-tile.is-on{background:var(--kob-on);border-color:var(--fg)}
.kob-tile::after{content:"";position:absolute;top:var(--sp-2);right:var(--sp-2);width:12px;height:12px;background:var(--fg);clip-path:polygon(12% 46%,0 60%,40% 100%,100% 18%,86% 6%,38% 70%);opacity:0;transition:opacity var(--dur-1) var(--ease-out)}
.kob-tile.is-on::after{opacity:1}
.kob-tile__art{display:block;width:80px;height:48px;margin-bottom:var(--sp-2);color:var(--fg-2);transition:color var(--dur-2) var(--ease-out)}
.kob-tile.is-on .kob-tile__art{color:var(--fg)}
.kob-tile__art svg{width:100%;height:100%}
.kob-tile__title{font-family:var(--ff-display);font-size:var(--fs-lead);line-height:1.25;color:var(--fg)}
.kob-tile__sub{font-size:var(--fs-small);line-height:1.45;color:var(--fg-2)}
.kob-swatch{display:block;flex:none;width:calc(var(--sp-7) + var(--sp-2));height:calc(var(--sp-7) + var(--sp-2));margin-bottom:var(--sp-2);border-radius:50%;background:var(--sw,var(--fg-3));box-shadow:inset 0 0 0 1px var(--line)}
.kob-swatch--sm{width:var(--sp-7);height:var(--sp-7)}
/* Profile tiles P1-P24: compact, the drawing across the tile, the catalog id in mono, the name small. */
.kob-tile--prof{gap:2px;padding:var(--sp-3)}
.kob-tile--prof .kob-tile__art{width:100%;height:auto;aspect-ratio:80 / 48;max-height:48px;margin-bottom:var(--sp-1)}
.kob-tile__id{font-family:var(--ff-mono);font-size:var(--fs-label);font-weight:500;line-height:1.3;letter-spacing:.08em;color:var(--fg-2)}
.kob-tile.is-on .kob-tile__id{color:var(--fg)}
.kob-tile--prof .kob-tile__title,
.kob-tile--color .kob-tile__title{font-family:var(--ff-text);font-size:var(--fs-small);line-height:1.3}
/* Diamond settings: top view of the band (stones as dots). */
.kob-tile--preset .kob-tile__art{width:80px;height:32px}

/* ------------------------------------------------------------------ 10. sliders
   Width and thickness: the system slider (.range, filled to --p by the view layer), the value in tabular figures. */
.kob-field{display:flex;flex-direction:column;gap:var(--sp-2);margin-top:var(--sp-5)}
.kob-step-head + .kob-field{margin-top:0}
.kob-field__lbl{display:flex;justify-content:space-between;align-items:baseline;gap:var(--sp-4);font-size:var(--fs-small);font-weight:500;line-height:1.3;color:var(--fg)}
.kob-field__val{font-size:var(--fs-lead);font-weight:500;line-height:1.2;color:var(--fg);font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}
.kob-field__scale{display:flex;justify-content:space-between;margin-top:calc(var(--sp-2) * -1);font-size:var(--fs-label);line-height:1.4;color:var(--fg-2);font-variant-numeric:tabular-nums lining-nums}

/* ------------------------------------------------------------------ 11. options with a box, sizes
   Accents (pavé, engraving) and "Nie znamy rozmiarów": a tone row with the system check box on the right.
   Sizes 8-30: small tiles in the tile recipe. */
.kob-opts{display:flex;flex-direction:column;gap:var(--sp-2)}
.kob-opt{display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;column-gap:var(--sp-4);width:100%;min-height:var(--tap);padding:var(--sp-4);background:var(--tone);border:1px solid transparent;text-align:left;color:var(--fg);transition:border-color var(--dur-2) var(--ease-out),background-color var(--dur-2) var(--ease-out)}
.kob-opt:hover{border-color:var(--fg-3)}
.kob-opt.is-on{background:var(--kob-on);border-color:var(--fg)}
.kob-opt__txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.kob-opt__name{font-family:var(--ff-display);font-size:var(--fs-lead);line-height:1.25;color:var(--fg)}
.kob-opt__desc{font-size:var(--fs-small);line-height:1.45;color:var(--fg-2)}
.kob-opt__box{display:grid;place-content:center;width:24px;height:24px;border:1px solid var(--fg-3);transition:background-color var(--dur-1) var(--ease-out),border-color var(--dur-1) var(--ease-out)}
.kob-opt__box::before{content:"";width:12px;height:12px;background:var(--ink);clip-path:polygon(12% 46%,0 60%,40% 100%,100% 18%,86% 6%,38% 70%);transform:scale(0);transition:transform var(--dur-1) var(--ease-out)}
.kob-opt:hover .kob-opt__box{border-color:var(--fg)}
.kob-opt.is-on .kob-opt__box{background:var(--fg);border-color:var(--fg)}
.kob-opt.is-on .kob-opt__box::before{transform:scale(1)}
.kob-engrave{margin-top:var(--sp-4)}
.kob-size-unknown{margin-top:var(--sp-3)}
.kob-size-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--sp-2)}
.kob-size{display:grid;place-items:center;min-width:0;min-height:var(--tap);padding:var(--sp-2) 0;background:var(--tone);border:1px solid transparent;font-size:var(--fs-body);font-weight:500;line-height:1;color:var(--fg);font-variant-numeric:tabular-nums lining-nums;transition:border-color var(--dur-2) var(--ease-out),background-color var(--dur-2) var(--ease-out)}
.kob-size:hover{border-color:var(--fg-3)}
.kob-size.is-on{background:var(--kob-on);border-color:var(--fg)}

/* ------------------------------------------------------------------ 11b. catalog controls
   Optimal ratio and rhodium rows, notes, the division (family pills, proportion tiles with a top-view drawing,
   wave sliders), one block per colour part (gold colour tiles, fineness pills, surface select), grooves as tone
   cards, the separation groove and the edge, stone options and the stone sum, the engraving preview. */
.kob-ratio{margin-top:var(--sp-4)}
.kob-rhod{margin-top:var(--sp-5)}
.kob-sub{margin-top:var(--sp-4)}
.kob-note{margin-top:var(--sp-2);font-size:var(--fs-small);line-height:1.5;color:var(--fg-2);max-width:var(--measure)}
.kob-note--sum{margin-top:var(--sp-4);font-weight:500;color:var(--fg);font-variant-numeric:lining-nums}
.range[disabled]{opacity:.4;cursor:default}
.kob-tiles--divs{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));margin-top:var(--sp-3)}
.kob-tile--div{gap:var(--sp-1);padding:var(--sp-3)}
.kob-tile--div .kob-tile__art{width:100%;height:auto;aspect-ratio:80 / 32;margin-bottom:0}
.kob-tile--div .kob-tile__sub{font-variant-numeric:tabular-nums lining-nums}
.kob-tiles--colors{grid-template-columns:repeat(5,minmax(0,1fr))}
.kob-tile--color{padding:var(--sp-3)}
.kob-tile--color .kob-swatch{margin-bottom:var(--sp-1)}
.kob-part + .kob-part{margin-top:var(--sp-5);padding-top:var(--sp-1);border-top:1px solid var(--line)}
.kob-groove{padding:var(--sp-4);background:var(--tone)}
.kob-groove + .kob-groove{margin-top:var(--sp-2)}
.kob-groove__h{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-4)}
.kob-groove__t{font-family:var(--ff-display);font-size:var(--fs-lead);line-height:1.25;color:var(--fg)}
.kob-groove__del{display:inline-flex;align-items:center;min-height:var(--tap);font-size:var(--fs-small);font-weight:500;color:var(--fg);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:var(--fg-3);transition:text-decoration-color var(--dur-2) var(--ease-out)}
.kob-groove__del:hover{text-decoration-color:var(--fg)}
.kob-groove .kob-field{margin-top:var(--sp-4)}
.kob-add{margin-top:var(--sp-3)}
.kob-add[disabled]{opacity:.4;cursor:default}
/* add groove + "remove all" (shown from two grooves) on one line */
.kob-add-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2) var(--sp-5);margin-top:var(--sp-3)}
.kob-add-row .kob-add{margin-top:0}
.kob-note--small{font-size:var(--fs-label)}
.kob-sep__body{margin-top:var(--sp-1)}
.kob-engr-prev{margin-top:0;padding:var(--sp-5) var(--sp-4);background:var(--tone);font-size:26px;line-height:1.3;text-align:center;color:var(--fg);overflow-wrap:anywhere}
.kob-engr-prev.is-empty{color:var(--fg-3)}
/* pictogram after the text in the preview: line drawing at the text height, in the text colour */
.kob-engr-prev__sym{display:inline-block;margin-left:.3em;vertical-align:-.12em}
.kob-engr-prev__sym svg{display:block;width:1em;height:1em}
/* Engraving pictograms A-T: square tone cells (44 px minimum), the drawing in the muted colour, the chosen cell
   with the text-colour outline; "Bez symbolu" as a full-width row above them. */
.kob-syms{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--tap),1fr));gap:var(--sp-2)}
.kob-sym{display:grid;place-items:center;min-width:0;min-height:var(--tap);aspect-ratio:1;padding:var(--sp-2);background:var(--tone);border:1px solid transparent;color:var(--fg-2);transition:border-color var(--dur-2) var(--ease-out),background-color var(--dur-2) var(--ease-out),color var(--dur-2) var(--ease-out)}
.kob-sym:hover{border-color:var(--fg-3);color:var(--fg)}
.kob-sym.is-on{background:var(--kob-on);border-color:var(--fg);color:var(--fg)}
.kob-sym svg{display:block;width:28px;height:28px}
.kob-sym--none{grid-column:1 / -1;justify-self:start;aspect-ratio:auto;padding:var(--sp-2) var(--sp-4);font-size:var(--fs-small);font-weight:500;line-height:1.2}
.kob-part .kob-rhod{margin-top:var(--sp-4)}

/* ------------------------------------------------------------------ 12. contact step
   Project card first (estimate, both bands side by side), then the form in one column: system fields, pills,
   the error notice, the legal line. The send action is the gold button of the bottom bar. */
.kob-card{display:flex;flex-direction:column;padding:var(--sp-5);background:var(--tone)}
.kob-card__h{display:flex;justify-content:space-between;gap:var(--sp-4);font-size:var(--fs-small);line-height:1.4;color:var(--fg-2)}
.kob-card__h b{font-weight:500;color:var(--fg)}
.kob-card__est{margin-top:var(--sp-4)}
.kob-card__est-lbl{font-size:var(--fs-small);line-height:1.35;color:var(--fg-2)}
.kob-card__est-v{font-size:var(--fs-fact);font-weight:500;line-height:1.2;color:var(--fg);font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}
.kob-card__note{margin-top:var(--sp-1);font-size:var(--fs-small);line-height:1.5;color:var(--fg-2);max-width:var(--measure)}
.kob-card__tbl{margin-top:var(--sp-4);font-size:var(--fs-small);table-layout:fixed}
.kob-card__tbl th,
.kob-card__tbl td{padding:var(--sp-2) var(--sp-3) var(--sp-2) 0;white-space:normal;overflow-wrap:anywhere;vertical-align:top;font-variant-numeric:lining-nums}
.kob-card__tbl thead th{padding-top:0;border-bottom-color:var(--line);color:var(--fg)}
.kob-card__tbl thead th:first-child{width:34%}
.kob-card__tbl tbody th{font-weight:400;color:var(--fg-2);border-bottom:1px solid var(--line)}
.kob-card__tbl tbody tr:last-child th,
.kob-card__tbl tbody tr:last-child td{border-bottom:0;padding-bottom:0}
.kob-fh{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--sp-1) var(--sp-4);margin-top:var(--sp-7)}
.kob-fh h3{font-family:var(--ff-display);font-size:var(--fs-h4);font-weight:400;line-height:1.3;color:var(--fg)}
.kob-fh span{font-size:var(--fs-small);color:var(--fg-2)}
.kob-form{display:flex;flex-direction:column;gap:var(--sp-5);margin-top:var(--sp-4)}
.kob-f__lbl{margin-bottom:var(--sp-2)}
.kob-pill.is-on{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.kob-hp{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
.kob-legal{font-size:var(--fs-label);line-height:1.5;color:var(--fg-2);max-width:var(--measure)}

/* ------------------------------------------------------------------ 13. done screen
   After sending (body.kob-step-done, set by the script): the viewer stays, the panel shows the number, the statement
   and three time-labelled steps in one column; the bottom bar leaves. */
.kob-done{display:none}
body.kob-step-done .kob-cfg,
body.kob-step-done .kob-pay{display:none}
body.kob-step-done .kob-done{display:block;flex:1 1 0;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:var(--sp-6) var(--kob-pad) var(--sp-7)}
.kob-done__head{display:flex;flex-direction:column;gap:var(--sp-3);max-width:720px}
.kob-done__id{font-size:var(--fs-small);color:var(--fg-2);font-variant-numeric:tabular-nums lining-nums}
.kob-done__h{font-family:var(--ff-display);font-size:var(--fs-h3);font-weight:400;line-height:1.06;letter-spacing:-.02em;color:var(--fg);text-wrap:balance}
.kob-done__h:focus{outline:none}   /* takes focus after the send (announced and in view); not a control */
.kob-done__sub{font-size:var(--fs-body);line-height:1.6;color:var(--fg-2);max-width:var(--measure)}
.kob-done__steps{display:grid;grid-template-columns:minmax(0,1fr);row-gap:var(--sp-5);margin-top:var(--sp-7)}
.kob-done__step{min-width:0}
.kob-done__step-n{font-size:var(--fs-small);font-weight:500;line-height:1.3;color:var(--fg-2)}
.kob-done__step-t{margin-top:var(--sp-1);font-family:var(--ff-display);font-size:var(--fs-h4);line-height:1.2;color:var(--fg)}
.kob-done__step-d{margin-top:var(--sp-2);font-size:var(--fs-body);line-height:1.6;color:var(--fg-2);max-width:var(--measure)}
.kob-done__step-d a{color:var(--fg);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;white-space:nowrap}
.kob-done__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2) var(--sp-5);margin-top:var(--sp-7)}

/* ------------------------------------------------------------------ 14. bottom bar
   The system buttons: outline back on the left edge of the viewer, the gold forward action ("Dalej: <step>",
   "Wyślij projekt") on the right edge of the options. The estimate joins the bar from the tablet down. */
.kob-pay{grid-column:2;grid-row:3;--bg:var(--ink-2);position:relative;display:flex;align-items:center;gap:var(--sp-3);height:calc(var(--kob-nav-h) + env(safe-area-inset-bottom,0px));padding:0 var(--kob-pad) env(safe-area-inset-bottom,0px);background:var(--bg);color:var(--fg)}
#kob-back{margin-right:auto}
#kob-back .ico{transform:scaleX(-1)}
.kob-pay__est,
.kob-next__s{display:none}
.kob-pay__est-lbl{font-size:var(--fs-small);line-height:1.35;color:var(--fg-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kob-pay__est-val{font-size:var(--fs-body);font-weight:500;line-height:1.3;color:var(--fg);font-variant-numeric:tabular-nums lining-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kob-hint{position:absolute;right:var(--kob-pad);bottom:calc(100% + var(--sp-2));max-width:calc(100% - 2 * var(--kob-pad));padding:var(--sp-3) var(--sp-4);background:var(--kob-on);font-size:var(--fs-small);line-height:1.4;color:var(--fg);opacity:0;pointer-events:none;transition:opacity var(--dur-2) var(--ease-out)}
.kob-hint.on{opacity:1}

/* ------------------------------------------------------------------ 15. small laptop (as /projekt) */
@media (min-width:1025px) and (max-width:1279px){
  .kob{--kob-rail:260px;--kob-pad:var(--sp-5)}
}

/* ------------------------------------------------------------------ 16. tablet: the mobile shell
   A column pinned to the screen: top bar, summary bar (the caption and the step counter that opens the step list),
   the viewer pinned on top, the scrolling options, the bottom bar with the estimate. */
@media (max-width:1024px){
  .kob{
    --kob-pad:var(--gutter);--kob-view-h:min(clamp(280px,42vw,400px),45vh);   /* vh cap: landscape tablets keep room for the options */
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:var(--kob-top-h) var(--kob-bar-h) minmax(0,1fr) auto;
  }
  .kob-top{padding-inline:var(--kob-pad)}

  .kob-side{grid-column:1;grid-row:2;overflow:visible}
  .kob-bar{position:relative;display:flex;align-items:stretch;height:var(--kob-bar-h);padding-inline:var(--kob-pad);box-shadow:inset 0 -2px 0 var(--line)}
  .kob-bar::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--fg);transform-origin:0 50%;transform:scaleX(var(--kob-prog,0));transition:transform var(--dur-3) var(--ease-out)}
  .kob-bar__txt{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;min-width:0}
  .kob-bar__main{font-family:var(--ff-display);font-size:var(--fs-lead);line-height:1.25;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .kob-bar__sub{font-size:var(--fs-small);line-height:1.35;color:var(--fg-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .kob-bar__steps{flex:none;display:inline-flex;align-items:center;gap:var(--sp-2);min-width:var(--tap);padding-left:var(--sp-4);font-size:var(--fs-small);font-weight:500;color:var(--fg);font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}
  .kob-bar__caret{display:grid;place-items:center;width:var(--sp-3);height:var(--sp-3)}
  .kob-bar__caret::before{content:"";width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform var(--dur-2) var(--ease-out)}
  .kob-side.is-open .kob-bar__caret::before{transform:translateY(2px) rotate(-135deg)}
  /* the step list as a sheet: covers the page down to the bottom bar on its own ground */
  .kob-side__body{display:none}
  .kob-side.is-open .kob-side__body{position:absolute;z-index:var(--z-header);left:0;right:0;top:calc(var(--kob-top-h) + var(--kob-bar-h));bottom:calc(var(--kob-nav-h) + env(safe-area-inset-bottom,0px));display:flex;overflow-y:auto;overscroll-behavior:contain;padding-block:var(--sp-4) var(--sp-5);background:var(--bg)}
  .kob-side__title{margin-inline:var(--kob-pad)}
  .kob-step{padding-inline:var(--kob-pad)}

  .kob-main{grid-column:1;grid-row:3;flex-direction:column}
  .kob-preview{flex:none;padding:0;gap:0}
  .kob-stage{flex:none;height:var(--kob-view-h);min-height:0}
  /* the summary bar shows the caption here; the caption stays for screen readers */
  .kob-preview__caption{position:absolute;width:1px;height:1px;min-height:0;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .kob-est{display:none}
  .kob{--kob-cfg-top:var(--sp-5)}
  .kob-cfg{padding-inline:var(--kob-pad)}
  body.kob-step-done .kob-done{padding:var(--sp-5) var(--kob-pad) var(--sp-7)}

  .kob-pay{grid-column:1;grid-row:4}
  .kob-pay__est{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}
  #kob-back{margin-right:0}
  .kob[data-kob-step="7"] .kob-pay__est{display:none}
  .kob[data-kob-step="7"] #kob-back{margin-right:auto}

  .kob-tiles--profiles{grid-template-columns:repeat(6,minmax(0,1fr))}
  .kob-tiles--presets{grid-template-columns:repeat(3,minmax(0,1fr))}
  .kob-tiles--fins{grid-template-columns:repeat(4,minmax(0,1fr))}
  .kob-size-grid{grid-template-columns:repeat(8,minmax(0,1fr))}
}

/* ------------------------------------------------------------------ 17. phone */
@media (max-width:640px){
  .kob{--kob-top-h:calc(var(--tap) + var(--sp-3));--kob-nav-h:calc(var(--h-btn) + 2 * var(--sp-3));--kob-view-h:min(clamp(200px,60vw,280px),40vh)}
  .kob-top__wm{font-size:26px}
  .kob-top__link{display:none}

  .kob{--kob-cfg-top:var(--sp-4)}
  .kob-cfg{padding-bottom:var(--sp-6)}
  body.kob-step-done .kob-done{padding:var(--sp-4) var(--kob-pad) var(--sp-6)}
  .kob-step-head{gap:var(--sp-2);margin-bottom:var(--sp-4)}
  .kob-step-head__eyebrow{display:none}
  .kob-step-head__sub{font-size:var(--fs-small);line-height:1.5}

  .kob-tiles--profiles,
  .kob-tiles--colors{grid-template-columns:repeat(3,minmax(0,1fr))}
  .kob-tiles--fins,
  .kob-tiles--presets{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kob-tile--prof .kob-tile__art{width:100%;height:auto;margin-bottom:var(--sp-1)}
  .kob-tile--prof .kob-tile__title,
  .kob-tile--color .kob-tile__title{font-size:var(--fs-label)}
  .kob-engr-prev{font-size:22px}
  .kob-sym svg{width:24px;height:24px}
  .kob-tile{padding:var(--sp-3)}
  .kob-tile__title{font-size:var(--fs-body)}
  .kob-tile__art{width:64px;height:38px;margin-bottom:var(--sp-1)}
  /* metal tiles become rows: disc left, name right (as the /projekt metal tiles) */
  .kob-tiles--mats{grid-template-columns:minmax(0,1fr)}
  .kob-tiles--mats .kob-tile{flex-direction:row;align-items:center;gap:var(--sp-3)}
  .kob-tiles--mats .kob-swatch{width:var(--tap);height:var(--tap);margin-bottom:0}
  .kob-swatch{width:var(--tap);height:var(--tap);margin-bottom:var(--sp-1)}
  .kob-swatch--sm{width:var(--sp-6);height:var(--sp-6)}
  .kob-opt{padding:var(--sp-3) var(--sp-4)}
  .kob-opt__name{font-size:var(--fs-body)}
  .kob-size-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
  .kob-card{padding:var(--sp-4)}
  .kob-done__actions{flex-direction:column;align-items:stretch}

  /* Bottom bar: back (44 px icon), the estimate, the forward action with its short label; the contact step shows
     the send action with its full label. */
  .kob-pay{gap:var(--sp-2)}
  .kob-pay .btn{padding:0 var(--sp-3)}
  #kob-back{width:var(--tap);padding:0}
  .kob-back__lbl,
  .kob-next__l{display:none}
  .kob-next__s{display:inline}
  .kob-pay__est{padding-inline:var(--sp-1)}
  .kob-pay__est-lbl{font-size:var(--fs-label)}
  .kob-pay__est-val{font-size:var(--fs-small)}
  .kob[data-kob-step="7"] #kob-next{flex:1 1 auto}
  .kob-hint{left:var(--kob-pad);right:var(--kob-pad);max-width:none}
}

/* ------------------------------------------------------------------ 18. motion preference */
@media (prefers-reduced-motion:reduce){
  .kob-poster__bar i{animation:none}
  .kob-bar::after{transition:none}
}

/* ------------------------------------------------------------------ 19. native select lists (owner, 2026-12-03)
   The open list of a native <select> is drawn by the OS (white on Windows) but inherits the light text of the dark
   skin, so the options were invisible. Dark list with light text; color-scheme also darkens the OS scrollbar. */
.kob .select__el{color-scheme:dark}
.kob .select__el option,
.kob .select__el optgroup{background-color:var(--ink-2);color:var(--fg)}
.kob .select__el option:checked{background-color:var(--ink-3);color:var(--fg)}

/* ------------------------------------------------------------------ 20. random band button (owner, 2026-12-03)
   Dice button in the viewer, left of the fullscreen button; in fullscreen it takes the fullscreen button's corner. */
.kob-rand-btn{position:absolute;z-index:calc(var(--z-raise) + 1);top:var(--sp-3);right:calc(var(--sp-3) + var(--tap) + var(--sp-2));display:inline-flex;align-items:center;gap:var(--sp-2);height:var(--tap);padding-inline:var(--sp-3);background:var(--ink-2);color:var(--fg);font-size:var(--fs-small);font-weight:500;line-height:1;transition:background-color var(--dur-2) var(--ease-out)}
.kob-rand-btn:hover{background:var(--ink-3)}
.kob-rand-btn svg{width:16px;height:16px;flex:none}
.kob-preview.is-fs .kob-rand-btn{top:calc(var(--sp-3) + env(safe-area-inset-top,0px));right:calc(var(--sp-3) + env(safe-area-inset-right,0px))}
.kob-rand-btn.is-roll svg{animation:kob-roll .45s var(--ease-out)}
@keyframes kob-roll{from{transform:rotate(0)}to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.kob-rand-btn.is-roll svg{animation:none}}

/* ------------------------------------------------------------------ 21. viewer wordmark (owner, 2026-12-03)
   Subtle DBIJOU mark with the mirrored D (system .wm-d rule) in the top-left corner of the 3D stage, so fullscreen
   and screenshots of the preview carry the brand. Decoration only: no pointer events, hidden from assistive tech.
   In fullscreen the 'Wroc' pill holds the top-left corner, so the mark moves to the bottom-left. */
.kob-stage__wm{position:absolute;z-index:calc(var(--z-raise) + 1);top:calc(var(--sp-3) + 12px);left:var(--sp-4);display:inline-flex;align-items:baseline;font-family:var(--ff-mark);font-size:18px;line-height:1;color:var(--fg);opacity:.42;pointer-events:none;user-select:none;-webkit-user-select:none;white-space:nowrap}
.kob-stage__wm .rest{letter-spacing:.1em}
.kob-preview.is-fs .kob-stage__wm{top:auto;bottom:calc(var(--sp-4) + env(safe-area-inset-bottom,0px));left:calc(var(--sp-4) + env(safe-area-inset-left,0px))}
@media (max-width:640px){.kob-stage__wm{font-size:15px;left:var(--sp-3)}}
