/* GENERATED by redesign-taste/v4/tools/sync-theme-css.mjs from redesign-taste/v4/canvas/src/V4-lab/extra.css - do not edit here, edit the source and run the tool. */
/* DBIJOU v4 - Lab (/projekt2): the brand skin of the full-screen 3D app. Shared tokens and components live in system/system.css.
   Restyle in place: every id, data-* hook, aria-pressed state and body state class of page-projekt2.php keeps its name.
   Body state classes (on <body class="pg lab ...">, on the canvas on the board root): ready, tp (project bar), sheet (phone tool
   sheet), t-<tool>, modal (a dialog is open), cine, imm, disc-done, lead-sent.
   Geometry mirrors the live shell: a 400 px instrument panel on the right (= SIDE in the script) and on phones a header over the
   stage, the project bar and a 64 px tool dock. The script measures #hd, #name, #disc, #price, #acts, #dock and #panel, so their
   order stays. In the theme the split / phone switch stays on the live query (min-width:900px) and (min-height:600px) that the
   script mirrors (mqDesk); the canvas can only express width, so the boards switch at the system phone width.
   Gold: only the one main action (#tpGo, or #wa before the project bar exists, #leadGo in the sheet). The stone colour never
   reaches the interface: the script may keep writing --gem, nothing here reads it. No gradients on text, no glow. */

/* ------------------------------------------------------------------ shell */
.lab{
  --lab-side:400px;                   /* instrument panel width: SIDE in the script */
  --lab-dock:64px;                    /* phone tool dock (was --dockH 66) */
  --lab-pad:var(--sp-6);              /* panel side padding */
  height:100%;min-height:100%;overflow:hidden;
  -webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;overscroll-behavior:none;
}
.lab [hidden]{display:none !important}
.lab input,
.lab textarea{-webkit-user-select:text;user-select:text}
/* Stroke icons of the sprite, drawn like the system .ico. */
.lab .i{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;pointer-events:none}

/* ------------------------------------------------------------------ stage (locked: position and size only) */
#stage{position:fixed;top:0;bottom:0;left:0;right:var(--lab-side);overflow:hidden;margin:0;background:var(--film)}
#fr{position:absolute;left:0;top:0;width:100%;height:100%;border:0;display:block;background:transparent;opacity:0;transition:opacity var(--dur-3) var(--ease-out)}
.ready #fr{opacity:1}

/* Loader: the brand line runs under the title (no rainbow ring); faded out it stops. */
#loader{position:absolute;left:50%;top:50%;z-index:var(--z-base);display:flex;flex-direction:column;align-items:center;gap:var(--sp-3);transform:translate(-50%,-50%);text-align:center;pointer-events:none;transition:opacity var(--dur-3) var(--ease-out)}
#loader i{position:relative;overflow:hidden;width:var(--sp-9);height:2px;background:var(--line)}
#loader i::after{content:"";position:absolute;left:0;top:0;width:40%;height:100%;background:var(--fg);animation:btn-load var(--dur-3) var(--ease-inout) infinite alternate}
#loader b{font-family:var(--ff-display);font-size:var(--fs-h4);font-weight:400;line-height:1.2;color:var(--fg)}
#loader span{font-size:var(--fs-small);color:var(--fg-2)}
#retry{pointer-events:auto}
.ready #loader{opacity:0;visibility:hidden}
.ready #loader i::after{animation:none}

/* The light handle is retired (fixed light since v5-lab.9): kept in the markup for the script, never shown. */
#sun,#beam,#sunread{display:none !important}

/* Camera utilities on the edge of the stage (Obrót, Kadr, Przechyl, Postument, Wskazówki, Pełny ekran). */
.row3{position:fixed;left:var(--sp-5);bottom:var(--sp-5);z-index:3;display:flex;gap:var(--sp-1);color:var(--fg)}
.row3 .icon-btn{border-color:transparent;color:var(--fg-2)}
.row3 .icon-btn:hover{border-color:var(--line);color:var(--fg)}
.row3 .icon-btn[aria-pressed="true"]{background:transparent;border-color:var(--fg);color:var(--fg)}

/* ------------------------------------------------------------------ instrument panel (desktop) */
#side{position:fixed;top:0;right:0;bottom:0;z-index:5;width:var(--lab-side);display:flex;flex-direction:column;overflow:hidden}

/* Header: wordmark and close, the model loop, the name, the materials line, the price, the jeweller's line, discoveries. */
#hd{flex:none;padding:var(--sp-1) var(--lab-pad) 0}
#hd .row{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);min-height:var(--sp-7);margin-right:calc(var(--sp-4) * -1)}
.brand{display:flex;align-items:center;gap:var(--sp-3);min-width:0}
.wm--lab{min-height:var(--tap);justify-content:center}
.wm--lab .wm__n{font-size:26px}
/* The Lab tag: the system label (.lbl) in a hairline box. */
.lab-tag{display:inline-flex;align-items:center;height:var(--sp-5);padding:0 var(--sp-2);border:1px solid var(--line)}
.brand em{display:none;font-style:normal;font-size:var(--fs-label);color:var(--fg-3)}
.dbg .brand em{display:inline}

#hd .nav{display:flex;align-items:center;gap:var(--sp-1);margin-top:var(--sp-1)}
#cnt{min-width:var(--sp-8);text-align:center;font-size:var(--fs-ui);font-weight:500;line-height:1;color:var(--fg)}
#dice{margin-left:auto;gap:var(--sp-2);text-decoration-color:transparent}
#dice:hover{text-decoration-color:var(--fg-3)}
#dice .i{width:20px;height:20px}
.ring-busy #cnt{color:var(--fg-3)}

#name{margin-top:var(--sp-4);font-family:var(--ff-display);font-weight:400;font-size:var(--fs-fact);line-height:1.04;letter-spacing:-.015em;text-wrap:balance;transform-origin:0 0;transition:transform var(--dur-3) var(--ease-out)}
#nmS,#nmM{display:block}
#nmS{color:var(--fg)}
#nmM{color:var(--fg-2)}
#spec{margin-top:var(--sp-3);font-size:var(--fs-small);font-weight:500;line-height:1.45;color:var(--fg);transition:opacity var(--dur-2) var(--ease-out)}
#price{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:var(--sp-3);row-gap:var(--sp-1);margin-top:var(--sp-2);transition:opacity var(--dur-2) var(--ease-out)}
#pr{font-size:var(--fs-label);line-height:1.4;color:var(--fg-2)}
#famL{margin-top:var(--sp-3);font-size:var(--fs-small);line-height:1.5;color:var(--fg-2);max-width:40ch}

/* Discoveries: a reserved row from the first paint (no jump), a hairline progress bar filled to --dp. */
#disc{display:inline-flex;align-items:center;gap:var(--sp-2);max-width:100%;min-height:var(--tap);font-size:var(--fs-small);line-height:1;color:var(--fg-2);white-space:nowrap;transition:opacity var(--dur-2) var(--ease-out)}
#disc::before{content:"";flex:none;width:var(--sp-6);height:2px;margin-right:var(--sp-1);background:linear-gradient(90deg,var(--fg) var(--dp,0%),var(--fg-3) var(--dp,0%))}
#disc b{font-weight:500;color:var(--fg);font-variant-numeric:tabular-nums}
#disc::after{content:"Następne: " attr(data-next);margin-left:var(--sp-2);color:var(--fg-2)}
#disc[data-next=""]::after,
.disc-done #disc::after{display:none}
#disc[hidden]{display:inline-flex !important;visibility:hidden}

/* Actions. Before the project bar: save (an outline icon square) and Napisz na WhatsApp (the gold action, the rest of the
   row). With the bar (body.tp): the gold action is Chcę go wykonać and WhatsApp becomes an outline icon square too. The
   desktop header already carries the name and the price, so the bar's top row is folded away here. */
#acts{flex:none;padding:var(--sp-2) var(--lab-pad) var(--sp-4)}
.tpRow{display:flex;gap:var(--sp-2)}
#tpTop{display:none !important}
#save .i,#wa .i{width:20px;height:20px}
#wa{flex:1 1 auto;min-width:0;gap:var(--sp-2);padding:0 var(--sp-4)}
.tp #tpGo{flex:1 1 auto;min-width:0;padding:0 var(--sp-4)}
#save,
.tp #wa{flex:none;width:var(--h-btn);padding:0;background:transparent;border-color:var(--line);color:var(--fg)}
#save:hover,
.tp #wa:hover{border-color:var(--fg);background:transparent;color:var(--fg)}
#save .t,
.tp #wa .t2{display:none}
#save.pop .i{animation:lab-pop var(--dur-3) var(--ease-out)}

/* Tool dock: five tabs, the pressed one in cream with a 2 px underline (no colour, no glow). */
#dock{flex:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:0 var(--sp-4);border-top:1px solid var(--line)}
#dock button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-1);height:64px;font-size:var(--fs-small);font-weight:500;line-height:1;color:var(--fg-2);transition:color var(--dur-2) var(--ease-out)}
#dock button:hover,
#dock button[aria-pressed="true"]{color:var(--fg)}
#dock button::after{content:"";position:absolute;left:50%;bottom:0;width:32px;height:2px;margin-left:-16px;background:var(--fg);transform:scaleX(0);transition:transform var(--dur-2) var(--ease-out)}
#dock button[aria-pressed="true"]::after{transform:none}
.bdg{position:absolute;top:var(--sp-2);left:calc(50% + var(--sp-2));display:grid;place-items:center;min-width:18px;height:18px;padding:0 var(--sp-1);background:var(--cream);color:var(--ink);font-size:var(--fs-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}

/* Tool panel. Desktop: the rest of the column, one tone darker, the pane scrolls. The pressed tab right above is the title
   of the pane, so the head row (.ph) is visually hidden here and shown only in the phone sheet. */
#panel{--bg:var(--ink);--tone:var(--ink-2);flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:var(--bg)}
#grip,#phP,#phS,#phX{display:none}
.ph{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.phc{flex:1 1 auto;min-width:0}
#phV{font-family:var(--ff-display);font-size:var(--fs-h4);font-weight:400;line-height:1.2;letter-spacing:-.005em;color:var(--fg)}
.pane{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:var(--sp-5) var(--lab-pad) var(--sp-5);scrollbar-width:thin}

/* Group title inside a pane: sentence case (no mono labels in the panes), the current value after it. */
.lab-gl{display:flex;align-items:baseline;justify-content:space-between;gap:var(--sp-3);margin:var(--sp-5) 0 var(--sp-3);font-size:var(--fs-small);font-weight:500;line-height:1.3;color:var(--fg)}
.pane > .lab-gl:first-child{margin-top:0}
.lab-gl b{font-weight:400;color:var(--fg-2)}
.hint,.fine{margin-top:var(--sp-4);font-size:var(--fs-small);line-height:1.5;color:var(--fg-2)}
.lab-note{margin-top:var(--sp-3);min-height:1.5em;font-size:var(--fs-small);line-height:1.5;color:var(--fg-2)}
.lab-note b{font-weight:500;color:var(--fg)}

/* Pressed pills (segments): the system pill, two per row on the narrow panel when the words are long. */
.seg{display:flex;flex-wrap:wrap;gap:var(--sp-2)}
.seg .pill{flex:1 1 40%;justify-content:center;padding:0 var(--sp-3)}
#mp .pill::before{content:"";flex:none;width:12px;height:12px;background:var(--c);box-shadow:inset 0 0 0 1px var(--line)}
#bgs .pill::before{content:"";flex:none;width:12px;height:12px;background:var(--c);box-shadow:inset 0 0 0 1px var(--fg-3)}

/* Folded extras (advanced light, alloy shade): the summary is the system text link (.lnk). */
.lab-more{margin-top:var(--sp-4)}
.lab-more summary{list-style:none;cursor:pointer}
.lab-more summary::-webkit-details-marker{display:none}
.lab-more[open] summary{text-decoration-color:var(--fg)}

/* Sliders with a name and a value. */
.sl{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:var(--sp-2);margin-top:var(--sp-4)}
.sl span{font-size:var(--fs-small);color:var(--fg-2)}
.sl output{font-size:var(--fs-small);font-weight:500;color:var(--fg);font-variant-numeric:tabular-nums}
.sl .range{grid-column:1 / -1}
.g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--sp-5)}
.alt{display:flex;justify-content:space-between;font-size:var(--fs-label);color:var(--fg-2)}

/* Scenes: nine tiles in three rows, the picture of the light (--sky, kept from the live sheet) with the name under it. */
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-3) var(--sp-2)}
.tile{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:var(--sp-2);min-height:var(--tap);font-size:var(--fs-small);font-weight:500;line-height:1.2;text-align:left;color:var(--fg-2)}
.tile::before{content:"";display:block;aspect-ratio:3 / 2;background:var(--sky,var(--ink-3));background-size:cover;box-shadow:inset 0 0 0 1px var(--line)}
.tile[aria-pressed="true"]{color:var(--fg)}
.tile[aria-pressed="true"]::before{box-shadow:0 0 0 1px var(--bg),0 0 0 2px var(--fg)}
.tile.ld::before{opacity:.6}

/* Stones: named chips, four to a row; the colour wheel only behind Inny kolor. */
.sw{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-4) var(--sp-2)}
.sw button{display:flex;flex-direction:column;align-items:center;gap:var(--sp-2);min-height:var(--tap);font-size:var(--fs-label);line-height:1.25;text-align:center;color:var(--fg-2)}
.sw button::before{content:"";display:block;width:40px;height:40px;flex:none;background:var(--c,var(--ink-3));box-shadow:inset 0 0 0 1px var(--line)}
.sw [data-st="brylant"],.sw [data-sst="brylant"]{--c:var(--white)}
.sw [data-st="moissanit"],.sw [data-sst="moissanit"]{--c:var(--cream)}
.sw [data-st="wlasny"]::before{background:transparent;box-shadow:inset 0 0 0 1px var(--fg-3)}
.sw button[aria-pressed="true"]{color:var(--fg)}
.sw button[aria-pressed="true"]::before{box-shadow:inset 0 0 0 1px var(--line),0 0 0 2px var(--bg),0 0 0 3px var(--fg)}
.sws{grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--sp-2)}
.sws button::before{width:32px;height:32px}
.sws .fol{grid-column:span 2;justify-content:center;border:1px solid var(--fg-3);font-size:var(--fs-small);color:var(--fg)}
.sws .fol::before{display:none}
.sws .fol[aria-pressed="true"]{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.wbox{position:relative;width:144px;height:144px;margin:var(--sp-4) auto 0}
#wheel{display:block;width:100%;height:100%;border-radius:50%;touch-action:none;cursor:crosshair}
#wmark{position:absolute;left:0;top:0;width:20px;height:20px;margin:-10px 0 0 -10px;border:2px solid var(--white);pointer-events:none}

/* Metal finishes: three tiles, the finish picture (--fx, kept from the live sheet, tinted by --metal) over the name. */
.fin{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-2)}
.fin button{display:flex;flex-direction:column;gap:var(--sp-2);min-height:var(--tap);font-size:var(--fs-small);font-weight:500;text-align:left;color:var(--fg-2)}
.fin button::before{content:"";display:block;height:48px;background-image:var(--fx,none);background-size:var(--fs,auto);background-color:var(--metal,var(--gold));background-blend-mode:multiply;box-shadow:inset 0 0 0 1px var(--line)}
.fin button[aria-pressed="true"]{color:var(--fg)}
.fin button[aria-pressed="true"]::before{box-shadow:0 0 0 1px var(--bg),0 0 0 2px var(--fg)}

/* Size: the carat in Marcellus, the diameter in millimetres, the stone outline at true relative scale inside 1 ct and 2 ct. */
.szrow{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4)}
.szread{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--sp-2)}
.szread b{font-family:var(--ff-display);font-size:var(--fs-h2);font-weight:400;line-height:1;letter-spacing:-.03em}
.szread i{font-family:var(--ff-display);font-size:var(--fs-h4);font-style:normal;color:var(--fg-2)}
.szread span{flex-basis:100%;margin-top:var(--sp-2);font-size:var(--fs-small);line-height:1.45;color:var(--fg-2);white-space:pre-line}
.dia{position:relative;flex:none;width:108px;height:108px}
.dia i{position:absolute;left:50%;top:50%;font-style:normal;border:1px dashed var(--fg-3);border-radius:50%;transform:translate(-50%,-50%)}
.dia i[data-l]::after{content:attr(data-l);position:absolute;left:50%;top:-8px;padding:0 var(--sp-1);background:var(--bg);font-size:var(--fs-label);line-height:1;color:var(--fg-2);white-space:nowrap;transform:translateX(-50%)}
.dia i[data-l="1 ct"]::after{top:auto;bottom:-7px}
#dcur{width:100px;height:100px;border:1px solid var(--fg) !important;background:var(--tone);transition:transform var(--dur-2) var(--ease-out)}
.ctdrag #dcur{transition:none}
#ctr{margin-top:var(--sp-4)}
.ticks{position:relative;height:20px;margin-top:calc(var(--sp-2) * -1);font-size:var(--fs-label);line-height:20px;color:var(--fg-2);font-variant-numeric:tabular-nums}
.ticks span{position:absolute;top:0;white-space:nowrap;transform:translateX(-50%)}
.ticks span:last-child{transform:translateX(-100%)}
.pbox{display:none;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:var(--sp-1) var(--sp-3);margin-top:var(--sp-5);padding:var(--sp-4) var(--sp-5);background:var(--tone)}
#prB{font-size:var(--fs-label);color:var(--fg-2)}

/* Więcej: six mode tiles in two rows; the collection as captioned cards, two to a row. */
.gg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-2)}
.gt{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-2);min-height:84px;padding:var(--sp-2);background:var(--tone);font-size:var(--fs-small);font-weight:500;line-height:1.2;text-align:center;color:var(--fg-2);transition:color var(--dur-2) var(--ease-out),box-shadow var(--dur-2) var(--ease-out)}
.gt .i{color:var(--fg)}
.gt:hover{color:var(--fg)}
.gt[aria-pressed="true"]{color:var(--fg);box-shadow:inset 0 0 0 1px var(--fg)}
#cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-5) var(--sp-3)}
.lab-card{position:relative;display:flex;flex-direction:column}
.cA{display:block;width:100%;aspect-ratio:1;background:var(--film) center / cover no-repeat}
.lab-card .cap{padding-top:var(--sp-3)}
.lab-card .cap__name{font-size:var(--fs-body)}
.cX{position:absolute;right:0;top:0;width:var(--tap);height:var(--tap);display:grid;place-items:center;color:var(--fg)}
.empty{padding:var(--sp-4) 0;font-size:var(--fs-small);line-height:1.5;color:var(--fg-2)}
#collBack{margin-top:var(--sp-4)}

/* ------------------------------------------------------------------ stage overlays */
/* Toast: the system toast over the stage; the script sets .on and --tb (phone baseline). */
#toast{bottom:calc(var(--sp-5) + var(--tap) + var(--sp-4));left:calc((100% - var(--lab-side)) / 2);max-width:calc(100% - var(--lab-side) - 2 * var(--sp-8));opacity:0;transform:translate(-50%,var(--sp-4));transition:opacity var(--dur-2) var(--ease-out),transform var(--dur-3) var(--ease-out);pointer-events:none}
#toast.on{opacity:1;transform:translate(-50%,0)}
.toast-top #toast{top:var(--ot,160px);bottom:auto}

/* Exit nudge: the toast with two actions, on the toast line above the camera rail. */
#nudge{position:fixed;left:calc((100% - var(--lab-side)) / 2);bottom:calc(var(--sp-5) + var(--tap) + var(--sp-4));z-index:var(--z-toast);display:flex;align-items:center;gap:var(--sp-3);width:min(420px,calc(100% - 2 * var(--gutter)));padding:var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-5);background:var(--ink-2);color:var(--cream);font-size:var(--fs-ui);line-height:1.4;box-shadow:0 0 0 1px var(--line);opacity:0;transform:translate(-50%,var(--sp-4));transition:opacity var(--dur-2) var(--ease-out),transform var(--dur-3) var(--ease-out)}
#nudge.on{opacity:1;transform:translate(-50%,0)}
#nudge span{flex:1 1 auto}
#nudge button{flex:none;min-height:var(--tap);padding:0 var(--sp-3);font-size:var(--fs-ui);font-weight:500;color:var(--cream)}
#nuGo{text-decoration:underline;text-underline-offset:6px;text-decoration-thickness:1px}

/* Onboarding card: cream, square, a small arrow square. */
#coach{position:fixed;left:0;top:0;z-index:31;width:min(320px,calc(100% - 2 * var(--sp-4)));padding:var(--sp-5) var(--sp-5) var(--sp-3);opacity:0;transform:translate3d(var(--cx,0),var(--cy,0),0);transition:opacity var(--dur-2) var(--ease-out)}
#coach.on{opacity:1}
#coach::after{content:"";position:absolute;left:var(--ax,50%);top:-6px;width:12px;height:12px;margin-left:-6px;background:var(--cream);transform:rotate(45deg)}
#coach.up::after{top:auto;bottom:-6px}
#coach.side::after{left:-6px;top:var(--ay,50%);margin:-6px 0 0}
#coach.sideR::after{left:auto;right:-6px;top:var(--ay,50%);margin:-6px 0 0}
#coach.noarr::after{display:none}
#coach.mini{width:auto;max-width:min(280px,calc(100% - 2 * var(--sp-4)));padding:var(--sp-3) var(--sp-3) var(--sp-1) var(--sp-4)}
#coach.mini #coK,#coach.mini #coD{display:none}
#coT{margin:var(--sp-2) 0;font-family:var(--ff-display);font-size:var(--fs-h4);line-height:1.15}
#coD{font-size:var(--fs-small);line-height:1.5;color:var(--fg-2)}
.cob{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);margin-top:var(--sp-3)}
#coNext{height:var(--tap);padding:0 var(--sp-5)}
#hl{position:fixed;left:0;top:0;z-index:30;pointer-events:none;box-shadow:0 0 0 2px var(--cream)}

/* A / B compare, mode pill. */
#cmp{position:fixed;top:0;bottom:0;left:0;right:var(--lab-side);z-index:3;overflow:hidden;pointer-events:none;--cp:.5}
#cmpT{position:absolute;left:0;top:0;bottom:0;width:100%;transform:translate3d(50%,0,0);pointer-events:none}
#cmpL{position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--fg)}
#cmp span{position:absolute;top:var(--sp-5);padding:var(--sp-2) var(--sp-3);background:var(--ink-2);font-size:var(--fs-small);font-weight:500;line-height:1.3;white-space:normal}
#cmpA{right:calc(100% + var(--sp-3));width:max-content;max-width:calc(var(--cp) * 100% - var(--sp-5))}
#cmpB{left:var(--sp-3);max-width:calc((1 - var(--cp)) * 100% - var(--sp-5))}
#cmpG{position:absolute;left:-22px;top:var(--gy,50%);width:var(--tap);height:var(--tap);margin-top:-22px;background:var(--cream);color:var(--ink);pointer-events:auto;touch-action:none;cursor:ew-resize}
.cmpb{position:absolute;left:50%;top:var(--sp-9);display:flex;gap:var(--sp-2);transform:translateX(-50%);pointer-events:auto}
.cmpb .btn{background:var(--ink-2)}
#mode{position:fixed;left:calc((100% - var(--lab-side)) / 2);top:var(--sp-5);z-index:4;display:inline-flex;align-items:center;gap:var(--sp-2);height:var(--tap);padding:0 var(--sp-4);background:var(--ink-2);border:1px solid var(--line);color:var(--fg);font-size:var(--fs-ui);font-weight:500;transform:translateX(-50%)}
#mode .i{width:18px;height:18px}
#tiltpad{position:fixed;inset:0 var(--lab-side) 0 0;z-index:2;width:auto;cursor:move;touch-action:none}

/* Show: film bars, a hairline progress, the title in Marcellus. */
#cine{position:fixed;inset:0;z-index:20;width:100%;cursor:pointer;text-align:center;--bar:96px}
#cine::before,#cine::after{content:"";position:absolute;left:0;right:0;height:var(--bar);background:var(--film);transform:scaleY(0);transition:transform var(--dur-3) var(--ease-out)}
#cine::before{top:0;transform-origin:50% 0}
#cine::after{bottom:0;transform-origin:50% 100%}
.cine-on #cine::before,.cine-on #cine::after{transform:none}
.ctitle{position:absolute;left:var(--sp-4);right:var(--sp-4);bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;height:var(--bar);font-family:var(--ff-display);font-size:var(--fs-h4);color:var(--cream);opacity:0;transition:opacity var(--dur-3) var(--ease-out)}
.cprog{position:absolute;left:0;right:0;bottom:var(--bar);z-index:1;height:2px;background:var(--cream);transform-origin:0 50%;transform:scaleX(0)}
.chint{position:absolute;left:0;right:0;top:calc(var(--bar) - 32px);z-index:1;font-size:var(--fs-small);color:var(--fg-2);opacity:0;transition:opacity var(--dur-3) var(--ease-out)}
.cine-on .ctitle,.cine-on .chint{opacity:1}
.cine-on .cprog{transform:none;transition:transform 8s linear}
.cine #hd,.cine #acts,.cine #dock,.cine #panel,.cine #side,.cine #mode,.cine .row3{opacity:0;pointer-events:none;transition:opacity var(--dur-3) var(--ease-out)}
.cine #stage{right:0}
/* Immersive mode (iPhone fullscreen fallback): only the ring and one exit control. */
.imm #hd,.imm #acts,.imm #dock,.imm #disc,.imm #panel,.imm #mode,.imm #side,.imm .row3,.imm .cmpb,.imm #toast{opacity:0 !important;pointer-events:none}
#immX{position:fixed;top:calc(env(safe-area-inset-top,0px) + var(--sp-2));right:calc(env(safe-area-inset-right,0px) + var(--sp-2));z-index:30;display:none;align-items:center;gap:var(--sp-2);height:var(--tap);padding:0 var(--sp-4);background:var(--ink-2);border:1px solid var(--line);color:var(--cream);font-size:var(--fs-ui);font-weight:500}
.imm #immX{display:inline-flex}
#fly{position:fixed;left:0;top:0;z-index:26;width:120px;height:120px;background:var(--film) center / cover no-repeat;box-shadow:0 0 0 1px var(--cream);pointer-events:none}
.cf{position:fixed;left:0;top:0;z-index:37;width:6px;height:6px;background:var(--cream);pointer-events:none}

/* ------------------------------------------------------------------ dialogs */
/* The dialog shell (.dlg) and the 44 px icon control (.icon-btn) are system components (system.css, section 15).
   Used here by the contact sheet (#lead), the share box and the end card. */
#leadMsg{min-height:0;font-size:var(--fs-small);line-height:1.4;color:var(--fg-2)}
#leadMsg:empty{display:none}
#leadMsg.err{color:var(--err-fg)}
.fld .input[aria-invalid="true"]{border-color:var(--err-fg)}
#leadOk p{margin:var(--sp-3) 0 var(--sp-5);font-size:var(--fs-body);line-height:1.55;color:var(--fg-2);text-wrap:pretty}
#leadOk p b{font-weight:500;color:var(--fg)}
#leadOk .lnk{display:flex;margin-top:var(--sp-2)}
/* Share box and end card: the same box, actions stacked. */
.sbox{display:grid;gap:var(--sp-2)}
.sbox .lnk{justify-self:center}
#shrImg{display:block;width:100%;aspect-ratio:4 / 5;object-fit:cover;background:var(--film)}
#shrMsg,#endMsg{font-size:var(--fs-small);line-height:1.5;color:var(--fg-2);text-align:center}
#endT{margin-bottom:var(--sp-3);font-family:var(--ff-display);font-size:var(--fs-h4);line-height:1.15}
.eg2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-2)}
.rec{display:inline-block;width:8px;height:8px;background:var(--err-fg)}
/* While a dialog is open the panel behind it is quiet. */
.modal #acts,.modal #toast{visibility:hidden}

@keyframes lab-pop{
  0%{transform:scale(1)}
  40%{transform:scale(1.25)}
  100%{transform:scale(1)}
}

/* ------------------------------------------------------------------ phone: header over the stage, the bar, the dock */
@media (max-width:640px){
  /* Set on #side, not on the page root: on the canvas the root is the query container and cannot restyle itself. */
  #side{--lab-pad:var(--gutter)}
  #stage{right:0}
  /* Film-black scrims keep the header and the bar readable over the ring (the stage is film black too). */
  .lab::before,
  .lab::after{content:"";position:fixed;left:0;right:0;z-index:2;pointer-events:none}
  .lab::before{top:0;height:260px;background:linear-gradient(180deg,var(--film) 55%,transparent)}
  .lab::after{bottom:0;height:220px;background:linear-gradient(0deg,var(--film) 50%,transparent)}

  #side{display:contents}
  #hd{position:fixed;top:0;left:0;right:0;z-index:4;padding:calc(env(safe-area-inset-top,0px) + var(--sp-1)) var(--lab-pad) 0;pointer-events:none}
  #hd a,#hd button{pointer-events:auto}
  #hd .row{min-height:var(--h-btn)}
  #hd .nav{margin-top:0;margin-left:calc(var(--sp-4) * -1)}
  #hd .nav .icon-btn{border-color:transparent}
  #cnt{min-width:var(--sp-7)}
  #name{margin-top:var(--sp-2);font-size:var(--fs-h3)}
  #spec{margin-top:var(--sp-2)}
  #price{margin-top:var(--sp-1)}
  #famL{display:none}
  #disc::after{display:none}

  /* The bar: the system tone block, square; the label, the name on two lines, the materials line and the price line. */
  #acts{position:fixed;left:var(--sp-3);right:var(--sp-3);bottom:calc(var(--lab-dock) + env(safe-area-inset-bottom,0px) + var(--sp-2));z-index:4;padding:0;transition:opacity var(--dur-2) var(--ease-out),transform var(--dur-3) var(--ease-out)}
  .tp #acts{padding:var(--sp-3);background:var(--ink-2)}
  .tp #tpTop:not([hidden]){display:flex !important;align-items:center;gap:var(--sp-3);margin-bottom:var(--sp-3)}
  #tpTh{flex:none;width:56px;height:56px;background-color:var(--ink-3);background-image:var(--tpbg,none);background-position:center;background-size:cover;background-repeat:no-repeat}
  #tpC{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
  .disc-done #tpK,.lead-sent #tpK{color:var(--fg)}
  #tpN{font-family:var(--ff-display);font-size:var(--fs-lead);font-weight:400;line-height:1.2;color:var(--fg)}
  #tpS{font-size:var(--fs-small);line-height:1.4;color:var(--fg-2)}
  #tpP{font-size:var(--fs-small);font-weight:500;line-height:1.4;color:var(--fg);white-space:nowrap}
  #tpX{align-self:flex-start;margin:calc(var(--sp-2) * -1) calc(var(--sp-2) * -1) 0 0}
  #tpX::before{content:"";width:9px;height:9px;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)}
  #acts.min #tpX::before{transform:translateY(2px) rotate(-135deg)}
  /* Collapsed: one row hugging the right edge: the price (never a cut name), the action, the chevron. The ring itself is
     right above, so the picture is dropped and the row also fits a 360 px phone. */
  .tp #acts.min{left:auto;display:flex;align-items:center;gap:var(--sp-2);padding:var(--sp-1)}
  #acts.min #tpTop:not([hidden]){display:contents !important}
  #acts.min #tpTh,#acts.min #tpK,#acts.min #tpN,#acts.min #tpS,#acts.min #save,#acts.min #wa{display:none}
  #acts.min #tpC{order:1;flex:none;padding:0 var(--sp-2) 0 var(--sp-3)}
  #acts.min #tpP{font-size:var(--fs-ui)}
  #acts.min .tpRow{order:2}
  #acts.min #tpX{order:3;margin:0}

  #dock{position:fixed;left:0;right:0;bottom:0;z-index:7;height:calc(var(--lab-dock) + env(safe-area-inset-bottom,0px));padding:0 var(--sp-1) env(safe-area-inset-bottom,0px);background:var(--ink);border-top:0}
  #dock button{height:var(--lab-dock)}
  #dock button::after{top:0;bottom:auto}
  .lab:not(.sheet) #dock button[aria-pressed="true"]{color:var(--fg-2)}
  .lab:not(.sheet) #dock button[aria-pressed="true"]::after{transform:scaleX(0)}

  /* Tool sheet: at most 45 % of the screen with the first row visible; the ring is lifted into the free band by the script. */
  #panel{position:fixed;left:0;right:0;bottom:calc(var(--lab-dock) + env(safe-area-inset-bottom,0px));z-index:6;max-height:min(45%,400px);background:var(--ink-2);transform:translate3d(0,calc(100% + var(--lab-dock) + var(--sp-5)),0);visibility:hidden;transition:transform var(--dur-3) var(--ease-out),visibility 0s var(--dur-3)}
  .sheet #panel{transform:none;visibility:visible;transition:transform var(--dur-3) var(--ease-out),visibility 0s}
  #grip{display:grid;place-items:center;height:20px;flex:none;touch-action:none;cursor:grab}
  #grip::before{content:"";width:40px;height:3px;background:var(--fg-3)}
  #panel{--bg:var(--ink-2);--tone:var(--ink-3)}
  /* Sheet head: the title never cut (scene or stone name only), the price under it, save and close on the right. */
  .ph{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal;flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;column-gap:0;padding:0 var(--sp-2) 0 var(--lab-pad);min-height:var(--h-btn);touch-action:none}
  .phc{grid-column:1;grid-row:1}
  #phP{display:block;grid-column:1;grid-row:2;font-size:var(--fs-small);font-weight:500;line-height:1.4;color:var(--fg-2);white-space:nowrap}
  #phS,#phX{display:inline-grid;grid-row:1 / span 2}
  #phV{font-size:var(--fs-h4)}
  .t-rozmiar #phP{display:none}
  .t-rozmiar .phc{grid-row:1 / span 2}
  #envN,#alN{display:none}
  .pane{padding:var(--sp-3) var(--lab-pad) var(--sp-5)}
  .pbox{display:flex}
  .sheet #acts{opacity:0;transform:translateY(var(--sp-4));pointer-events:none}
  .sheet #spec,.sheet #price,.sheet #disc,.sheet #famL{opacity:0;pointer-events:none}
  .sheet #name{transform:scale(.78)}
  .coach1 #spec,.coach1 #price,.coach1 #disc{opacity:0;pointer-events:none}
  .coach1 #name{transform:scale(.78)}

  /* Camera tools: only with the Więcej sheet, a row under the compact title. */
  .row3{display:none;left:auto;right:var(--sp-2);bottom:auto;top:var(--ot,160px);z-index:5}
  .sheet.t-gra .row3{display:flex}

  #toast{left:var(--gutter);right:var(--gutter);bottom:var(--tb,140px);width:auto;max-width:none;transform:translateY(var(--sp-4))}
  #toast.on{transform:none}
  #nudge{left:var(--gutter);right:var(--gutter);bottom:var(--tb,140px);width:auto;transform:translateY(var(--sp-4))}
  #nudge.on{transform:none}
  #cmp{right:0}
  #cmp span{top:var(--ot,200px)}
  .cmpb{top:auto;bottom:calc(var(--lab-dock) + var(--barH,52px) + var(--sp-5))}
  #mode{left:50%;top:var(--ot,200px)}
  #tiltpad{right:0}
  #cine{--bar:72px}

  /* The contact sheet rises from the bottom edge, full width. */
}

/* The exit is the text link .app-exit (as /projekt and the wedding bands, owner 2026-11-26), not the 44 px icon the
   negative right margin was made for. */
#hd .row{margin-right:0}
