/* Experience page. Logical properties only (RTL-safe). */
[hidden] { display: none !important; }
.view-page {
  --v-paper: #f4f5f7;
  --v-ink: #1d1f23;
  --v-ink-soft: #565c68;
  --v-line: #dcdfe4;
  --v-accent: #c62828;                 /* the red: text, rings, thin marks */
  --v-accent-fill: #c62828;            /* buttons and active tools: bottom of the gradient, resting colour (white text 5.6:1) */
  --v-accent-top: #d63636;             /* top of the gradient (white text 4.7:1) */
  --v-accent-deep: #a92020;            /* hover, pressed, the button's edge */
  --v-accent-ink: #ffffff;
  --v-red: linear-gradient(var(--v-accent-top), var(--v-accent-fill));
  --v-red-hover: linear-gradient(var(--v-accent-fill), var(--v-accent-deep));
  --v-red-lift: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(120, 16, 16, 0.35);
  --v-btn-top: #ffffff;                /* secondary buttons: white to light grey, a 1px highlight inside */
  --v-btn-bottom: #f3f4f6;
  --v-btn-edge: rgba(29, 31, 35, 0.22);
  --v-btn-lift: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px rgba(29, 31, 35, 0.1);
  --v-hover: rgba(29, 31, 35, 0.07);
  --v-panel: rgba(255, 255, 255, 0.95);
  --v-dialog: #ffffff;
  --v-shadow: 0 10px 30px rgba(29, 31, 35, 0.14);
  --bar-h: 56px;              /* the top bar; the room list and the Export panel start under it */
  --ctl: 40px;                 /* height of every control in the top bar */
  --strip: 102px;              /* what the tool strip takes from the start edge: the hint and the offer stay clear of it */
  margin: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--v-paper);
  color: var(--v-ink);
  overflow: hidden;
}
/* the interface is fixed to the screen: a pinch is not the page's zoom (Android Chrome can force zoom over the viewport's user-scalable;
   touch-action is the rule it keeps). Scrolling and the canvas's own touch-action: none are unchanged. */
html:has(> .view-page), .view-page { touch-action: pan-x pan-y; }
@media (prefers-color-scheme: dark) {
  .view-page {
    --v-paper: #121417;
    --v-panel: rgba(30, 33, 38, 0.95);
    --v-ink: #eceef1;
    --v-ink-soft: #b4bac4;
    --v-line: #3a3f47;
    --v-accent: #ff6b6b;
    --v-accent-fill: #d23232;          /* the same red, a little brighter; white text 4.95:1 */
    --v-accent-top: #d93838;
    --v-accent-deep: #b92a2a;
    --v-btn-top: #2d3138;
    --v-btn-bottom: #24272d;
    --v-btn-edge: rgba(236, 238, 241, 0.2);
    --v-btn-lift: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.5);
    --v-hover: rgba(236, 238, 241, 0.09);
    --v-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --v-dialog: #1e2126;
  }
  .view-page .vbar, .view-page .rooms-panel, .view-page .share-dialog { color: var(--v-ink); }
}

.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; inset-block-start: -60px; z-index: 50;
  background: var(--v-ink); color: var(--v-paper); padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { inset-block-start: 12px; }

.vbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: nowrap;
  block-size: var(--bar-h); box-sizing: border-box; padding-block: 0; padding-inline: 14px;
  background: var(--v-panel); border-block-end: 1px solid var(--v-line);
  position: relative; z-index: 5;
}
.vbar-brand { flex: none; font-weight: 700; color: inherit; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-block-size: var(--ctl); }
.vbar-room { flex: 1 1 0; margin: 0; font-weight: 600; color: var(--v-ink-soft); min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbar-actions { flex: none; display: flex; gap: 8px; align-items: center; }

.vbtn, .seg-btn, .vlang {
  font: inherit; font-size: 0.95rem; min-block-size: 44px; padding-inline: 14px;
  border-radius: 10px; border: 1px solid var(--v-btn-edge); background: linear-gradient(var(--v-btn-top), var(--v-btn-bottom)); box-shadow: var(--v-btn-lift);
  color: inherit; cursor: pointer;
}
.seg-btn { background: transparent; box-shadow: none; }
.vbar :is(.vbtn, .seg-btn, .vlang) { min-block-size: var(--ctl); block-size: var(--ctl); box-sizing: border-box; }
.vbar :is(.vbtn, .seg-btn) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
/* Done (leave editing) takes Export's place on a phone, where the header has no room for both */
@media (max-width: 760px) { body.editing #btn-export { display: none; } }
.stage canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }   /* a long press edits a piece: no callout */
.vbar .vlang { max-inline-size: 150px; text-overflow: ellipsis; }
.vbar .acct-btn { inline-size: var(--ctl); block-size: var(--ctl); }
.vbar .credits-pill, .vbar .signin-btn { block-size: var(--ctl); min-block-size: var(--ctl); }
.price { white-space: nowrap; font-weight: 500; }                       /* "(7 credits)" after a button's words (price-label.js) */
.btn-ico { inline-size: 18px; block-size: 18px; flex: none; }
.vbtn:hover:not(:disabled), .vlang:hover { background: var(--v-btn-bottom); border-color: var(--v-ink-soft); }
.vbtn:active:not(:disabled) { background: var(--v-hover); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18); }
.seg-btn:hover { background: var(--v-hover); }
.vbtn-primary { background: var(--v-red); border-color: var(--v-accent-deep); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
/* The text colour is restated on hover/active/focus: app.css `a:hover { color: var(--accent) }` is more specific than `.vbtn-primary`, so a link styled as this button turned red on red. */
.vbtn-primary:hover:not(:disabled) { background: var(--v-red-hover); border-color: var(--v-accent-deep); color: var(--v-accent-ink); }
.vbtn-primary:active:not(:disabled) { background: var(--v-accent-deep); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); color: var(--v-accent-ink); }
.vbtn-primary:focus-visible { color: var(--v-accent-ink); }
.vbtn-icon { min-inline-size: 44px; padding-inline: 0; }
.vbtn-icon:not(.vbtn-primary) { background: transparent; box-shadow: none; }   /* the panels' close buttons stay flat */
.vbtn-icon:not(.vbtn-primary):hover:not(:disabled) { background: var(--v-hover); }
.seg { display: inline-flex; border: 1px solid var(--v-btn-edge); border-radius: 10px; overflow: hidden; background: linear-gradient(var(--v-btn-top), var(--v-btn-bottom)); box-shadow: var(--v-btn-lift); }
.seg-btn { border: 0; border-radius: 0; }
.seg-btn[aria-pressed="true"], .seg-btn[aria-pressed="true"]:hover { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
:is(.vbtn, .seg-btn, .vlang, .room-btn, .room-arrow, .vbar-brand, .stage canvas):focus-visible {
  outline: 3px solid var(--v-accent); outline-offset: 2px;
}

.stage-wrap { position: relative; min-block-size: 0; overflow: hidden; overflow: clip; }   /* the closed panels wait outside the picture: they must not widen the page */
.stage { position: absolute; inset: 0; touch-action: none; }
.stage canvas { display: block; cursor: grab; object-fit: contain; }   /* a picture that is not the box's shape (a docked panel just slid, a queued view is held at its own shape) is letterboxed, never stretched */
.stage canvas:active { cursor: grabbing; }
/* the map credit of a showcase walk's city (view.js osmCredit, OpenStreetMap's ODbL) */
.osm-credit {
  position: absolute; inset-block-end: 4px; inset-inline-end: 6px; z-index: 2;
  font-size: 10px; line-height: 1.4; padding: 0 4px; border-radius: 3px;
  color: rgb(30 34 40 / 0.75); background: rgb(255 255 255 / 0.55); pointer-events: none;
}

.intro-cap {
  position: absolute; inset-block-end: 24px; inset-inline: 0; margin-inline: auto; inline-size: fit-content;
  display: flex; gap: 14px; align-items: center; padding: 8px 8px 8px 18px;
  background: var(--v-panel); border-radius: 999px; box-shadow: var(--v-shadow); z-index: 4;
}
.intro-cap[hidden] { display: none; }
.intro-line { margin: 0; font-weight: 600; letter-spacing: 0.02em; }
.stage-help {
  position: absolute; inset-block-end: 14px; inset-inline-start: var(--strip); margin: 0; max-inline-size: min(520px, calc(100% - var(--strip) - 16px));
  font-size: 0.85rem; color: var(--v-ink-soft); background: var(--v-panel); padding: 6px 10px; border-radius: 8px;
}
body[data-mode="intro"] .stage-help { display: none; }

.overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px;
  text-align: center; padding: 24px; background: var(--v-paper); z-index: 6;
}
.overlay[hidden] { display: none; }
.overlay-title { font-size: 1.4rem; margin: 0; }

/* Loading: the plan being scanned and drafted while the 3D scene is built (loading-scan.js builds the layers).
   Everything that moves is a transform, an opacity or a clip-path window of one HTML box, so it can keep going on the
   compositor while the main thread is busy building the 3D scene (a stroke-dashoffset or an SVG-internal animation
   would freeze there). The drawing itself never moves and no two animations are paired: the plan is drawn in a few
   static SVG layers, each uncovered by a clip-path window that grows over it in step with the scan band, and a piece
   that is rearranged is rubbed out and drawn in by such windows too. (Sliding a layer one way and its drawing back the
   other did slide the whole furniture layer aside when the two ran out of step on a busy page.) The drawing layers are
   rasterised once, the pencil's grain filter included; only the clip-path masks are made per frame by the compositor
   (many tiny raster tasks, about 10 ms of raster-thread time per second measured, no main-thread paint). Chrome
   composites a clip-path animation only when it stands alone, so no clip track also animates opacity or transform
   (the loop's keyframes are tested for that). The dimension lines, guides and
   crosshairs are small HTML boxes placed in percent of the plan. Drawn on paper in both colour schemes, so the colours
   are fixed here. The resting state of every part is the finished drawing; the movement is added only for people who
   accept motion, so reduced motion shows the plan still, with the plain status text. */
.overlay.scan {
  --s-paper: #f7f8fa; --s-ink: #1d1f23; --s-soft: #565c68; --s-line: #d6d9df; --s-accent: #c62828;   /* the interface's white, grey and red */
  --s-pencil: #4c5058;                                                                                /* graphite */
  display: grid; grid-template-rows: minmax(0, 1fr) auto; place-content: stretch; justify-items: stretch; gap: 0; padding: 0;
  background: var(--s-paper); color: var(--s-ink);
}
.overlay.scan.leaving { opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }   /* a plain fade: nothing zooms or slides on the way out */
.scan-stage { container-type: size; display: grid; place-items: center; min-block-size: 0; padding: 10px 12px 0; }
.scan-plan {   /* the plan's box: its aspect ratio (--ar) as large as the stage allows; always left to right, it is a drawing */
  position: relative; direction: ltr; overflow: hidden;
  aspect-ratio: var(--ar, 1.3); inline-size: min(100cqw, calc(var(--ar, 1.3) * 100cqh));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums;
}
.scan-plan .lay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.scan-svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; display: block; }
.scan-foot { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px 16px calc(22px + env(safe-area-inset-bottom)); }
.scan-dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--s-accent); }
.scan-now { display: grid; margin: 0; font-size: 0.98rem; color: var(--s-soft); text-align: center; }
.scan-now > span { grid-area: 1 / 1; opacity: 0; }
.scan-sr {   /* the screen-reader status; visible only where the steps are not */
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0;
}

/* the drawing (SVG layers) */
.scan-svg .grid { fill: none; stroke: var(--s-line); stroke-width: 1px; stroke-opacity: 0.6; }
.scan-svg .rt { fill: var(--s-line); fill-opacity: 0.4; }
.scan-svg .wp { fill: none; stroke: var(--s-pencil); stroke-linejoin: round; stroke-linecap: round; }
.scan-svg .wi { fill: var(--s-ink); stroke: var(--s-ink); stroke-linejoin: round; stroke-linecap: round; }
.scan-svg .wn { fill: none; stroke: var(--s-soft); stroke-linejoin: round; }
.scan-svg .door .lf { stroke: var(--s-ink); stroke-linecap: round; }
.scan-svg .ar { fill: none; stroke: var(--s-pencil); }
.scan-svg .door.entry .lf, .scan-svg .ar.entry { stroke: var(--s-accent); }
.scan-svg :is(.fp, .fq) { color: var(--s-pencil); }
.scan-svg .rn, .scan-svg .ra { stroke: var(--s-paper); paint-order: stroke; stroke-linejoin: round; }
.scan-svg .rn { fill: var(--s-ink); font-weight: 600; }
.scan-svg .ra { fill: var(--s-soft); }

/* dimension lines, guides and crosshairs (HTML boxes, sizes in pixels, places in percent of the plan) */
.scan-plan :is(.dim, .gd, .cx) { position: absolute; pointer-events: none; }
.dim { color: var(--s-accent); }
.dim > * { position: absolute; }
.dim .dn, .dim .da, .dim .dx { background: currentColor; }
.dim .dx { background: var(--s-soft); opacity: 0.8; }
.dim .dt { white-space: nowrap; font-size: 12.5px; font-weight: 600; line-height: 1; text-shadow: 0 0 2px var(--s-paper), 0 0 2px var(--s-paper), 0 0 3px var(--s-paper), 0 0 3px var(--s-paper); }
.dim.h .dn { inset: -0.6px 0 auto 0; block-size: 1.25px; transform-origin: 0 50%; }
.dim.h .da { block-size: 7px; inline-size: 9px; inset-block-start: -3.5px; }
.dim.h .da.a { inset-inline-start: 0; clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.dim.h .da.b { inset-inline-end: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.dim.h .dt { left: 50%; top: -3px; transform: translate(-50%, -100%); }
.dim.h .dx { inline-size: 1px; transform-origin: 50% var(--o, 0); }
.dim.v .dn { inset: 0 auto 0 -0.6px; inline-size: 1.25px; transform-origin: 50% 0; }
.dim.v .da { inline-size: 7px; block-size: 9px; inset-inline-start: -3.5px; }
.dim.v .da.a { inset-block-start: 0; clip-path: polygon(50% 0, 0 100%, 100% 100%); }
.dim.v .da.b { inset-block-end: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.dim.v .dt { top: 50%; left: -4px; writing-mode: vertical-rl; transform: translate(-100%, -50%) rotate(180deg); }   /* physical offsets: the vertical writing mode turns the logical ones */
.dim.v .dx { block-size: 1px; transform-origin: var(--o, 0) 50%; }
.gd.h { block-size: 1px; background: repeating-linear-gradient(90deg, var(--s-soft) 0 6px, transparent 6px 11px); }
.gd.v { inline-size: 1px; background: repeating-linear-gradient(180deg, var(--s-soft) 0 6px, transparent 6px 11px); }
.gd { opacity: 0.6; }
.cx { inline-size: 0; block-size: 0; color: var(--s-soft); }
.cx::before { content: ""; position: absolute; inset: -6.5px; background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat, linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
.cx::after { content: ""; position: absolute; inset: -2.5px; border: 1px solid var(--s-accent); border-radius: 50%; }

/* the pieces that are rearranged once the drawing is complete (loop: loading-scan.js, loopCss writes its keyframes). A piece
   is a box of its own (.mv, standing at home; its transform is the pose, which jumps to the next place while nothing
   shows). Inside, two copies of the drawing, each in a window (.mw) that is a clip-path animation and never moves: the
   firm line (.b) is rubbed out from the left by the eraser (.er) and drawn in again from the left; the light sketch (.a)
   is drawn in a little ahead of it by the pencil tip (.pn) and fades out under it. */
.mvs { position: absolute; inset: 0; }
.mv { position: absolute; overflow: hidden; pointer-events: none; }
.mv .mw, .mv .er, .mv .pn { position: absolute; inset: 0; }
.mv .mw.a, .mv .er, .mv .pn { opacity: 0; }
.mv .er::before, .mv .pn::before { content: ""; position: absolute; inset-block: 0; }
.mv .er::before { inset-inline-start: 0; inline-size: 5px; border-radius: 2px; background: #eab6aa; box-shadow: 0 0 2px rgba(42, 39, 36, 0.25); }
.mv .pn::before { inset-inline-end: 0; inline-size: 2px; border-radius: 1px; background: var(--s-pencil); opacity: 0.7; }

/* the scan band: a soft terracotta edge, and with it the walls and doors in terracotta (.hi: a still copy of the drawing
   in the accent colour, of which a window as wide as the band shows; both run the same round) */
.scan-band {
  position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 20%; pointer-events: none;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--s-accent) 10%, transparent) 70%, color-mix(in srgb, var(--s-accent) 38%, transparent) 99%, color-mix(in srgb, var(--s-accent) 38%, transparent));
}
.scan-plan .lay.hi { clip-path: inset(0 100% 0 0); }
.scan-svg .hw { fill: var(--s-accent); }
.scan-svg .hl { fill: none; stroke: var(--s-accent); stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  /* 3.6 s round, three rounds: the band crosses the plan in 2.6 s, then waits; pass 1 uncovers the pencil sketch, pass 2 the
     ink, pass 3 the furniture, and then the band rests. A layer is uncovered by a clip-path window that grows from the left
     (fill backwards: hidden until its turn, free of any clip afterwards). */
  .scan-band { animation: scan-sweep 3.6s linear 0.2s 3 both; }
  .scan-plan .lay.hi { animation: scan-hi 3.6s linear 0.2s 3 both, scan-hi-out 3.6s linear 0.2s 3 both; }
  .scan-plan .lay.pass { animation: scan-reveal 2.6s linear var(--d) backwards; }
  .scan-plan .lay.fade { animation: scan-fade 0.8s ease-out var(--d, 0s) both; }
  .scan-dot { animation: scan-pulse 1.2s ease-in-out infinite; }
  .scan-now > span { animation: scan-step 2.4s ease both; animation-delay: calc(var(--i) * 2.4s); }
  .scan-now > span:last-child { animation-name: scan-step-last; }      /* the last one stays until the scene is ready */
  .gd { animation: scan-fade-in 0.5s ease-out var(--d) backwards; }
  .cx { animation: scan-pop 0.45s ease-out var(--d) backwards; }
  /* a dimension line shoots out from its walls once, its arrows and metres come in behind it, and it stays */
  .dim .dn { animation: scan-in-x 0.7s cubic-bezier(0.3, 0.6, 0.3, 1) var(--d) backwards; }
  .dim.v .dn { animation-name: scan-in-y; }
  .dim .dx { animation: scan-in-y 0.4s ease-out var(--d) backwards; }
  .dim.v .dx { animation-name: scan-in-x; }
  .dim .da { animation: scan-fade-in 0.3s ease-out calc(var(--d) + 0.5s) backwards; }
  .dim .dt { animation: scan-fade-in 0.4s ease-out calc(var(--d) + 0.55s) backwards; }
  /* the furniture loop has its keyframes in a <style> next to the pieces, see loopCss */
}
@media (prefers-reduced-motion: reduce) {
  .scan-foot, .scan-band, .scan-plan .lay.hi { display: none; }
  .scan-sr { position: static; inline-size: auto; block-size: auto; clip: auto; white-space: normal; margin: 0; padding: 14px 16px calc(22px + env(safe-area-inset-bottom)); text-align: center; color: var(--s-soft); font-size: 0.98rem; }
  .overlay.scan.leaving { transition: none; }
}
@keyframes scan-sweep { 0% { transform: translateX(-100%); opacity: 1; } 72% { transform: translateX(400%); opacity: 1; } 77%, 100% { transform: translateX(400%); opacity: 0; } }
/* the accent copy: a window as wide as the band (a fifth of the plan) that moves with it: its left edge follows from a fifth of the way */
@keyframes scan-hi {
  0% { clip-path: inset(0 100% 0 0); }
  14.4% { clip-path: inset(0 80% 0 0); }
  72%, 100% { clip-path: inset(0 0 0 80%); }
}
@keyframes scan-hi-out { 0%, 72% { opacity: 1; } 77%, 100% { opacity: 0; } }   /* a clip-path animation runs on the compositor only on its own, so the fade is a second animation */
@keyframes scan-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes scan-pulse { 0%, 100% { transform: scale(0.8); opacity: 0.55; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes scan-step { 0% { opacity: 0; transform: translateY(6px); } 12%, 84% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes scan-step-last { 0% { opacity: 0; transform: translateY(6px); } 12%, 100% { opacity: 1; transform: none; } }
@keyframes scan-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scan-fade-in { from { opacity: 0; } }
@keyframes scan-pop { from { transform: scale(0.5); opacity: 0; } }
@keyframes scan-in-x { from { transform: scaleX(0); } }
@keyframes scan-in-y { from { transform: scaleY(0); } }

.rooms-panel {
  position: fixed; inset-block-start: calc(var(--bar-h) + 12px); inset-inline-end: 12px; inline-size: min(340px, calc(100% - 24px));
  max-block-size: calc(100dvh - var(--bar-h) - 24px); box-sizing: border-box;
  background: var(--v-dialog, var(--v-paper)); border: 1px solid var(--v-line); border-radius: 14px; box-shadow: var(--v-shadow);
  padding: 16px; overflow: auto; z-index: 7;
  transform: translateX(calc(100% + 24px)); transition: transform 0.25s ease; visibility: hidden;
}
[dir="rtl"] .rooms-panel { transform: translateX(calc(-100% - 24px)); }
.rooms-panel.open { transform: none; visibility: visible; }
.shelf-grip { display: none; }                          /* a computer docks its panels: no grip (shown in the phone rules below) */
.rooms-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-block-size: 36px; }
.rooms-title { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.rooms-head .vbtn-icon { min-block-size: 36px; block-size: 36px; min-inline-size: 36px; border-radius: 50%; border-color: transparent; }
.rooms-head .vbtn-icon:hover { border-color: var(--v-line); }
.rooms-total { color: var(--v-ink-soft); font-size: 0.88rem; margin-block: 6px 12px; }
.rooms-panel { container: rooms / inline-size; }
/* The rooms as a table (owner 2026-10-22): arrow, name, floor m², walls m², light. The head row and every row share --rc. */
.rooms-cols, .room-line { --rc: 32px minmax(0, 1fr) 3.4rem 3.4rem 8.4rem; display: grid; grid-template-columns: var(--rc); column-gap: 4px; align-items: center; }
.rooms-cols { padding-inline: 1px 11px; margin-block-end: 4px; font-size: 0.74rem; font-weight: 600; line-height: 1.15; color: var(--v-ink-soft); }
.rc { padding-block: 4px; border-radius: 4px; overflow-wrap: anywhere; hyphens: auto; cursor: help; }
.rc-num, .rc-light { text-align: end; }
.rc:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 1px; }
.rooms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.room-row { border: 1px solid var(--v-line); border-radius: 10px; }
.room-row:hover { border-color: var(--v-ink-soft); }
.room-row:has(.room-btn[aria-current="true"]) { border-color: var(--v-accent); box-shadow: inset 3px 0 0 var(--v-accent); }
[dir="rtl"] .room-row:has(.room-btn[aria-current="true"]) { box-shadow: inset -3px 0 0 var(--v-accent); }
.room-line { min-block-size: 44px; padding-inline-end: 10px; cursor: pointer; }
.room-arrow-slot { align-self: stretch; display: flex; }
.room-arrow {
  flex: 1; display: grid; place-items: center; min-block-size: 44px; padding: 0; border: 0; border-radius: 9px 0 0 9px;
  background: transparent; color: var(--v-ink-soft); cursor: pointer;
}
[dir="rtl"] .room-arrow { border-radius: 0 9px 9px 0; }
.room-arrow:hover { background: var(--v-hover); color: var(--v-ink); }
.room-arrow svg { inline-size: 18px; block-size: 18px; transition: transform 0.15s ease; }
.room-arrow[aria-expanded="true"] svg { transform: rotate(180deg); }
.room-btn {
  display: block; min-inline-size: 0; min-block-size: 44px; padding: 4px 6px; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: start; overflow-wrap: anywhere; hyphens: auto;
}
.room-rename {
  grid-column: 2 / -1; inline-size: 100%; min-block-size: 36px; box-sizing: border-box; margin-block: 4px; padding-inline: 8px; border-radius: 8px;
  border: 1px solid var(--v-accent); background: var(--v-paper, #fff); color: inherit; font: inherit;
}
.room-rename:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.room-cell { font-size: 0.9rem; font-variant-numeric: tabular-nums; text-align: end; color: var(--v-ink-soft); white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.room-light { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.room-light:not(.has-lamp) :is(.rl-b, .rl-sep, .rl-k), .room-light.has-lamp .rl-none { display: none; }
.room-more { padding: 2px 14px 12px; border-block-start: 1px dashed var(--v-line); }
.room-more[hidden] { display: none; }
.room-more .tool-label { margin-block: 8px 0; }
.room-more .tool-range { min-block-size: 36px; }
.room-more-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.room-rename-btn { min-block-size: 36px; padding-inline: 12px; }
.is-embed :is(.room-arrow, .room-more) { display: none; }          /* an embed has no editing: only the list */
/* a narrow list (a phone's sheet, a small window): the light in two lines, a 44 px arrow, and under 330 px no wall column */
@container rooms (max-width: 400px) {
  .rooms-cols, .room-line { --rc: 44px minmax(0, 1fr) 2.7rem 2.7rem 4.6rem; column-gap: 3px; }
  .room-cell { font-size: 0.82rem; }
  .room-light.has-lamp { display: grid; grid-template-columns: auto auto; justify-content: end; column-gap: 3px; row-gap: 0; line-height: 1.2; }
  .room-light .rl-b { grid-column: 1; grid-row: 1; }
  .room-light .rl-k { grid-column: 1; grid-row: 2; font-size: 0.74rem; }
  .room-light .rl-sep { display: none; }
  .room-rename-btn { min-block-size: 44px; }
}
@container rooms (max-width: 330px) {
  .rooms-cols, .room-line { --rc: 44px minmax(0, 1fr) 2.7rem 4.6rem; }
  .room-walls, .rc-walls { display: none; }
}
.tooltip {
  position: fixed; z-index: 90; inset: 0 auto auto 0; max-inline-size: min(260px, calc(100vw - 16px)); box-sizing: border-box; padding: 6px 10px;
  border-radius: 8px; background: var(--v-ink); color: var(--v-paper); font-size: 0.8rem; line-height: 1.35; font-weight: 500;
  box-shadow: var(--v-shadow); pointer-events: none; overflow-wrap: anywhere;
}
.tooltip[hidden] { display: none; }
.rooms-note { font-size: 0.82rem; color: var(--v-ink-soft); margin-block: 12px 0; }
.rooms-list + .rooms-note, .rooms-note + .rooms-note { padding-block-start: 12px; border-block-start: 1px solid var(--v-line); }

.share-dialog {
  border: 1px solid var(--v-line); border-radius: 16px; padding: 0; inline-size: min(560px, calc(100% - 32px));
  max-block-size: calc(100dvh - 32px); overflow: auto;
  background: var(--v-dialog, var(--v-paper)); box-shadow: var(--v-shadow);
}
.share-dialog::backdrop { background: rgba(14, 17, 22, 0.5); }
.share-inner { padding: 20px; display: grid; gap: 10px; }
.share-inner h2 { margin: 0 0 6px; font-size: 1.2rem; }
.share-label { font-weight: 600; font-size: 0.9rem; }
.share-row { display: flex; gap: 8px; }
.share-input {
  flex: 1; min-inline-size: 0; font: inherit; font-size: 0.9rem; padding: 10px; border-radius: 10px;
  border: 1px solid var(--v-line); background: transparent; color: inherit; resize: vertical;
}
.share-status { min-block-size: 1.2em; margin: 0; color: var(--v-ink-soft); }

@media (max-width: 760px) {
  .view-page { --bar-h: 58px; --ctl: 44px; --strip: 16px; }
  .vbar { gap: 4px; padding-inline: 8px; }
  .vbar-room { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; margin: -1px; }   /* "You are in ..." only took room over the picture on a phone (owner, 2026-10-25): out of sight, screen readers still hear it */
  .vbar-actions { display: contents; }                           /* phone: logo, Walk / Overview, a spacer, then Export, Share and the account on one line */
  .vbar-actions > .seg-wrap { margin-inline-end: auto; }
  /* the boards' phone bar: Walk / Overview a pill with the ink fill on the open view, Export and Share round and quiet (the one red button of a screen is the sheet's) */
  .vbar .seg { border-radius: 999px; }
  .vbar .seg-btn { border-radius: 999px; }
  .vbar .seg-btn.seg-more { border-radius: 0; }
  .vbar .seg-btn[aria-pressed="true"], .vbar .seg-btn[aria-pressed="true"]:hover { background: var(--v-ink); box-shadow: none; color: var(--v-paper); }
  .vbar :is(#btn-export, #btn-share) { border-radius: 50%; }
  .vbar #btn-export.vbtn-primary { background: linear-gradient(var(--v-btn-top), var(--v-btn-bottom)); border-color: var(--v-btn-edge); box-shadow: var(--v-btn-lift); color: inherit; }
  .vbar #btn-export.vbtn-primary:hover:not(:disabled) { background: var(--v-btn-bottom); border-color: var(--v-ink-soft); }
  .vbar-actions .vlang { display: none; }   /* one line at 340 px: the language is in the room list */
  /* the credits balance stays in the bar (owner 2026-11-13: "an indicator of credits at the top"): a short pill with the coin up to the width where
     the bar has room (430 px); the number alone in a round-ended pill the size of a control from 375 px; a small badge on the account circle below that (no room for a control at 360 or 340 px) */
  .vbar .credits-pill { padding-inline: 8px; gap: 4px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
  .vbar .credits-pill svg { inline-size: 15px; block-size: 15px; }
  .vbtn, .seg-btn { padding-inline: 11px; font-size: 0.9rem; }
  .vbar :is(.vbtn, .seg-btn) { inline-size: var(--ctl); padding-inline: 0; }   /* icons only: nothing wraps or overlaps at 375 px, in any language */
  .vbar-brand { inline-size: var(--ctl); justify-content: center; }
  /* Done (leave editing, owner 2026-10-25) keeps its word: it is wider than a round icon button and takes what the bar has left, shortening the word
     with an ellipsis rather than clipping it (360 px; a long word in another language) */
  .vbar #btn-edit-done { flex: 0 1 auto; inline-size: auto; min-inline-size: var(--ctl); max-inline-size: 104px; padding-inline: 10px; gap: 4px; }
  .vbar #btn-edit-done .btn-label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 429px) {
  .vbar .credits-pill { min-inline-size: var(--ctl); justify-content: center; padding-inline: 4px; font-size: 0.85rem; }   /* four digits still fit the 44 px of a control at 375 px */
  .vbar .credits-pill svg { display: none; }                    /* the number alone; the label says what it is */
}
@media (max-width: 374px) {
  /* no room for a control of its own under 375 px: the balance is a small badge on the corner of the account circle (it opens the account menu, which says the same) */
  .vbar .credits-pill {
    position: absolute; inset-block-start: 3px; inset-inline-end: 2px; z-index: 1; pointer-events: none;
    min-inline-size: 18px; min-block-size: 18px; block-size: 18px; padding-inline: 4px; font-size: 0.7rem; line-height: 1; border-width: 1px;
    background: var(--v-ink); border-color: var(--v-ink); color: var(--v-paper);      /* the ink of the open Walk / Overview pill, not the red of an alert */
  }
}
@media (max-width: 479px) {
  /* while editing, the bar also holds the Done button with its word: the same badge up to 479 px (measured: a 44 px pill overflowed the bar at 375 and 390 px, and cut "Done" at 430 px) */
  body.editing .vbar .credits-pill {
    position: absolute; inset-block-start: 3px; inset-inline-end: 2px; z-index: 1; pointer-events: none;
    min-inline-size: 18px; min-block-size: 18px; block-size: 18px; padding-inline: 4px; font-size: 0.7rem; line-height: 1; border-width: 1px;
    background: var(--v-ink); border-color: var(--v-ink); color: var(--v-paper);
  }
}
@media (max-width: 369px) {
  .vbar #btn-edit-done .btn-ico { display: none; }              /* the word stays whole at 360 px: it matters more than the tick */
}
@media (max-width: 760px) {
  .rooms-panel {
    inset-block: auto 0; inset-inline: 0; inline-size: auto; max-block-size: 55dvh; border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  [dir="rtl"] .rooms-panel { transform: translateY(100%); }
  .rooms-panel.open { transform: none; }
  .stage-help { font-size: 0.78rem; }
}
/* the header's Sign in (a text button, offer.css) takes the circle's place while accounts are on and nobody is signed in: on a phone it is
   a little narrower, and below 360 px the home mark steps aside (the bar already fills 340 px with icons) */
@media (max-width: 430px) {
  .vbar .signin-btn { padding-inline: 10px; font-size: 0.85rem; }
}
@media (max-width: 359px) {
  .vbar:has(.signin-btn:not([hidden])) .vbar-brand { display: none; }
}
.is-embed .vbar-actions .vlang, .is-embed #btn-export { display: none; }
@media (prefers-reduced-motion: reduce) {
  .rooms-panel { transition: none; }
}

.rooms-lang { display: none; gap: 8px; align-items: center; margin-block-start: 12px; }
@media (max-width: 760px) { .rooms-lang { display: flex; } }

/* downloads (the Share panel's Files tab) */
.dl { border-block-start: 1px solid var(--v-line); padding-block-start: 12px; margin-block-start: 4px; }
.dl-title { margin: 0 0 8px; font-size: 1rem; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dl-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.dl-text { margin: 0; display: grid; gap: 2px; flex: 1 1 220px; min-inline-size: 0; }
.dl-name { font-weight: 600; font-size: 0.92rem; }
.dl-hint { font-size: 0.8rem; color: var(--v-ink-soft); }
.dl-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.dl-btn { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; padding-inline: 12px; }
.dl-btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* graphics quality (rooms panel) */
.gfx { border: 0; padding: 0; margin: 14px 0 0; min-inline-size: 0; }
.gfx-title { font-weight: 600; font-size: 0.95rem; padding: 0; margin-block-end: 6px; }
.gfx-seg { display: flex; border: 1px solid var(--v-line); border-radius: 10px; overflow: hidden; }
.gfx-opt { flex: 1; position: relative; }
.gfx-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gfx-opt span {
  display: flex; align-items: center; justify-content: center; min-block-size: 44px; padding-inline: 6px;
  font-size: 0.9rem; text-align: center; cursor: pointer;
}
.gfx-opt + .gfx-opt span { border-inline-start: 1px solid var(--v-line); }
.gfx-opt input:checked + span { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
.gfx-opt input:focus-visible + span { outline: 3px solid var(--v-accent); outline-offset: -3px; }
/* the Camera tool's graphics: the two modes side by side, and under them one box with what the chosen mode is. Both texts share the
   box's one cell (grid), the other one hidden but still taking room, so the box does not jump when the mode changes */
.gfx-desc {
  display: grid; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(100, 108, 122, 0.1);
  font-size: 0.8rem; line-height: 1.4; color: var(--v-ink-soft);
}
.gfx-desc-text { grid-area: 1 / 1; }
#gfx:not(:has(input[value="simple"]:checked)) .gfx-desc-text[data-gfx="simple"],
#gfx:not(:has(input[value="realistic"]:checked)) .gfx-desc-text[data-gfx="realistic"] { visibility: hidden; }
.cam-hint { margin: 0 0 6px; font-size: 0.8rem; line-height: 1.4; color: var(--v-ink-soft); }

.toast {
  position: absolute; inset-block-start: 14px; inset-inline: 0; margin-inline: auto; inline-size: fit-content;
  max-inline-size: min(560px, calc(100% - 32px)); padding: 8px 16px; border-radius: 18px; z-index: 8; text-align: center;
  background: var(--v-dialog, var(--v-paper)); color: var(--v-ink); border: 1px solid var(--v-line); box-shadow: var(--v-shadow); font-weight: 600; margin-block: 0;
  pointer-events: none;                          /* a message only: taps reach the buttons under it (QA: it covered the rail on phones) */
}
.gfx-warn {
  position: absolute; inset-block-start: 60px; inset-inline: 0; margin-inline: auto; inline-size: fit-content; z-index: 8;
  max-inline-size: calc(100% - 32px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--v-dialog, var(--v-paper)); color: var(--v-ink);
  border: 1px solid var(--v-line); box-shadow: var(--v-shadow); font-weight: 600;
}
.gfx-warn[hidden] { display: none; }
.gfx-note {
  position: absolute; inset-block-end: 64px; inset-inline: 0; margin-inline: auto; inline-size: fit-content; z-index: 8;   /* above the walk hint */
  max-inline-size: calc(100% - 32px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  padding: 6px 6px 6px 16px; border-radius: 22px; background: var(--v-dialog, var(--v-paper)); color: var(--v-ink);
  border: 1px solid var(--v-line); box-shadow: var(--v-shadow); font-weight: 600; font-size: 0.92rem;
}
.gfx-note[hidden], body[data-mode="intro"] .gfx-note, .is-embed .gfx-note { display: none; }
@media (max-width: 760px) { .gfx-note { display: none; } }   /* a phone has no "You're in Simple mode" plaque (owner, 2026-11-10: Realistic is slow on a phone; Camera still switches) */
.gfx-warn-x { inline-size: 32px; block-size: 32px; border: 0; border-radius: 50%; background: none; color: var(--v-muted, inherit); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.gfx-warn-x:hover { background: var(--v-line); }
.toast.rec::before { content: ""; display: inline-block; inline-size: 10px; block-size: 10px; border-radius: 50%; background: #d23a2a; margin-inline-end: 8px; }
@media (max-width: 760px) { .toast { inset-block-start: 52px; } }

/* Photo button: puts the view in the photo queue (both graphics modes); while the queue is being shot it shows the progress and stops it */
.shot-bar {
  position: absolute; inset-block-end: 14px; inset-inline-end: 16px; z-index: 4; display: flex; flex-wrap: wrap;
  justify-content: flex-end; gap: 8px; max-inline-size: calc(100% - 32px); pointer-events: none;
}
.shot-bar > * { pointer-events: auto; }
.photo-btn {
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding-inline: 16px; border-radius: 999px;
  border: 1px solid var(--v-line); background: var(--v-panel); color: var(--v-ink);
  box-shadow: var(--v-shadow); font: inherit; font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
}
.photo-btn .btn-ico { inline-size: 18px; block-size: 18px; flex: none; }
.photo-btn[data-state="add"] .p-stop, .photo-btn[data-state="stop"] .p-cam, .photo-btn[data-state="switching"] .p-stop { display: none; }
.photo-btn[data-state="stop"] { background: var(--v-red); border-color: var(--v-accent-deep); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.photo-btn[data-state="stop"] .p-stop { fill: currentColor; }
.photo-btn[data-state="switching"] { opacity: 0.75; cursor: progress; }
.photo-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
body[data-mode="intro"] .shot-bar { display: none; }
/* waiting for a picture: a round shutter (red, a white ring, the camera); the running queue keeps the pill with its progress */
.photo-btn[data-state="add"] {
  inline-size: 64px; block-size: 64px; padding: 0; justify-content: center; border-radius: 50%;
  border: 3px solid #fff; background: linear-gradient(180deg, #e04848, #b71c1c); color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 6px 18px rgba(0, 0, 0, 0.28);
}
.photo-btn[data-state="add"] .btn-ico { inline-size: 28px; block-size: 28px; }
.photo-btn[data-state="add"] #photo-btn-text { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.photo-btn[data-state="add"]:hover { background: linear-gradient(180deg, #e85a5a, #c62828); }
.photo-btn[data-state="add"]:active { transform: scale(0.94); }
/* the camera's flash and the picture flying into Export (view.js) */
.shot-flash { position: fixed; inset: 0; background: #fff; pointer-events: none; z-index: 60; opacity: 0; }
.shot-fly { position: fixed; z-index: 61; pointer-events: none; object-fit: cover; transform-origin: 50% 50%; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }

/* tool strip (start edge of the screen; the end edge in Arabic) and the side panels it opens */
.toolbar {
  position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 4;
  display: flex; flex-direction: column; gap: 6px; padding: 6px; max-block-size: calc(100% - 24px); overflow: auto;
  background: var(--v-panel); border: 1px solid var(--v-line); border-radius: 14px; box-shadow: var(--v-shadow);
}
.tool-btn {
  inline-size: 64px; min-block-size: 58px; padding: 5px 1px; box-sizing: border-box; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; font: inherit; font-size: 0.68rem; font-weight: 600; line-height: 1.1;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer;
}
.tool-name { max-inline-size: 100%; text-align: center; overflow-wrap: anywhere; }
.tool-fold, .tool-unfold { display: none; }   /* a phone's (below) */
.tool-btn svg { flex: none; }
.tool-btn:hover { background: rgba(100, 108, 122, 0.12); }
/* Walk only (share-link.js, view.js): a tool the link's author has no subscription for is shown but shut - dimmed, and a press says why */
.walk-locked, .walk-locked:hover { opacity: 0.45; cursor: not-allowed; }
.tool-btn.walk-locked:hover { background: transparent; }
.tool-btn[aria-expanded="true"], .tool-btn[aria-expanded="true"]:hover { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.tool-sep { align-self: stretch; flex: none; block-size: 1px; margin-inline: 8px; background: var(--v-line); }
/* Undo / Redo at the top of the strip: two icon buttons, 44 px tall to touch (history-panel.js) */
.tool-history { display: flex; flex-direction: column; gap: 2px; flex: none; }
.hist-btn {
  inline-size: 64px; min-block-size: 44px; padding: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer;
}
.hist-btn:hover:not(:disabled) { background: rgba(100, 108, 122, 0.12); }
.hist-btn:active:not(:disabled) { background: rgba(100, 108, 122, 0.22); }
.hist-btn:disabled { opacity: 0.35; cursor: default; }
.hist-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.hist-btn svg { flex: none; }
:is(.tool-btn, .tool-input, .sun-range, .tool-range, .tool-check input, .north-range):focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.is-embed .toolbar, .is-embed .tool-panel:not(#tool-panel-share), body[data-mode="intro"] .toolbar, body[data-mode="intro"] .tool-panel { display: none; }

.tool-panel {
  position: absolute; inset-block-start: 12px; inset-inline-start: 100px; z-index: 5;
  inline-size: min(340px, calc(100% - 112px)); max-block-size: calc(100% - 24px); overflow: auto;
  background: var(--v-dialog, var(--v-paper)); border: 1px solid var(--v-line); border-radius: 14px; box-shadow: var(--v-shadow);
  padding: 16px; transform: translateX(calc(-100% - 110px)); transition: transform 0.25s ease; visibility: hidden;
}
[dir="rtl"] .tool-panel { transform: translateX(calc(100% + 110px)); }
.tool-panel.open { transform: none; visibility: visible; }
.tool-lead { margin: 8px 0 4px; font-size: 0.88rem; line-height: 1.45; color: var(--v-ink-soft); }
/* a panel is a short intro and then sections, each under a thin rule */
.tool-sec { margin-block-start: 14px; padding-block-start: 14px; border-block-start: 1px solid var(--v-line); }
.tool-sec > :first-child { margin-block-start: 0; }
.tool-sec > .tool-sub { font-size: 0.85rem; color: var(--v-ink-soft); margin-block-end: 6px; }
.tool-label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 0.9rem; margin-block: 12px 4px; }
.tool-input {
  inline-size: 100%; box-sizing: border-box; min-block-size: 44px; padding-inline: 10px; font: inherit; font-size: 0.95rem;
  border-radius: 10px; border: 1px solid var(--v-line); background: transparent; color: inherit;
}
.tool-wide { inline-size: 100%; margin-block-start: 8px; }
.tool-coords { margin: 6px 0 0; font-size: 0.8rem; color: var(--v-ink-soft); overflow-wrap: anywhere; unicode-bidi: isolate; }
.tool-note { margin: 4px 0 0; font-size: 0.85rem; color: var(--v-accent); }
.tool-note:empty { display: none; }
.sun-places { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--v-line); border-radius: 10px; overflow: hidden; }
.sun-opt { display: flex; align-items: center; min-block-size: 44px; padding-inline: 12px; cursor: pointer; font-size: 0.92rem; }
.sun-opt + .sun-opt { border-block-start: 1px solid var(--v-line); }
.sun-opt[aria-selected="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.sun-none { color: var(--v-ink-soft); cursor: default; }
.sun-range, .tool-range { inline-size: 100%; min-block-size: 44px; margin: 0; accent-color: var(--v-accent); }
.sun-time-label output { font-variant-numeric: tabular-nums; }
.sun-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sun-quick .vbtn { padding-inline: 4px; padding-block: 4px; font-size: 0.85rem; overflow-wrap: anywhere; hyphens: auto; }
.vbtn:disabled, .tool-input:disabled, .sun-range:disabled, .tool-range:disabled { opacity: 0.5; cursor: default; }
.tool-label output { font-variant-numeric: tabular-nums; font-weight: 500; }
.tool-check { display: flex; align-items: center; gap: 10px; min-block-size: 44px; font-size: 0.92rem; cursor: pointer; }
.tool-check input { inline-size: 22px; block-size: 22px; margin: 0; flex: none; accent-color: var(--v-accent); }
.tool-group { border: 0; padding: 0; margin: 14px 0 0; min-inline-size: 0; }
.tool-group > legend { padding: 0; font-weight: 600; font-size: 0.95rem; }
.tool-group:disabled :is(.tool-label, .tool-check) { opacity: 0.55; cursor: default; }      /* the note above them stays at full contrast */
.tool-group:disabled .tool-range { cursor: default; }
select.tool-input { padding-inline: 8px; }
.lamp-bar {                                    /* the colour of the light along the warmth slider: amber to cool white */
  block-size: 10px; margin-block: -6px 4px; border-radius: 5px; border: 1px solid var(--v-line);
  background: linear-gradient(to right, #ff8f1f 0%, #ffb56c 26%, #ffd3a8 47%, #ffeadb 68%, #eef3ff 100%);
}
[dir="rtl"] .lamp-bar { background: linear-gradient(to left, #ff8f1f 0%, #ffb56c 26%, #ffd3a8 47%, #ffeadb 68%, #eef3ff 100%); }
.lamp-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; color: var(--v-ink-soft); }
.sun-status { margin-block-start: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(100, 108, 122, 0.12); font-size: 0.9rem; }
.sun-status p { margin: 0; }
.sun-status p + p:not(:empty) { margin-block-start: 4px; color: var(--v-ink-soft); }

@media (max-width: 760px) {
  .toolbar { inset-block-start: 10px; inset-inline-start: 10px; max-block-size: calc(100% - 167px); gap: 4px; }   /* at the top (no room-name pill on a phone), above the hint and the offer */
  /* fold: a low button at the foot of the strip; folded, the strip is one small button at the top left (strip-fold.js) */
  .tool-fold {
    display: flex; flex: none; align-items: center; justify-content: center; inline-size: 58px; block-size: 28px; padding: 0; margin-block-start: 2px;
    border: 0; border-radius: 8px; background: var(--v-panel); color: var(--v-ink-soft); cursor: pointer;
    position: sticky; inset-block-end: -6px;   /* stays at the foot of a strip that scrolls on a short screen */
  }
  .tool-fold:active { background: var(--v-hover); }
  body.tools-folded .toolbar { display: none; }
  .tool-unfold:not([hidden]) {
    position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 4; display: flex; align-items: center; justify-content: center;
    inline-size: 44px; block-size: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--v-line); background: var(--v-panel);
    color: inherit; box-shadow: var(--v-shadow); cursor: pointer;
  }
  :is(.tool-fold, .tool-unfold):focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
  .tool-btn { inline-size: 58px; min-block-size: 52px; }
  .hist-btn { inline-size: 58px; }
  .tool-input { font-size: 1rem; }                                         /* 16 px: iOS does not zoom into the field */
  .tool-panel, [dir="rtl"] .tool-panel {
    position: fixed; inset-block: auto 0; inset-inline: 0; inline-size: auto; max-block-size: 62dvh;
    border-radius: 16px 16px 0 0; transform: translateY(100%); z-index: 7;
  }
  .tool-panel.open, [dir="rtl"] .tool-panel.open { transform: none; }
  /* The shelf (owner, 2026-11-10; shelf.js, shelf-state.js): every sheet has three states, set as data-shelf. The grip is the first child of the
     sheet; grip and head stay at the top while the rest scrolls. handle: grip and head only (the whole house is in view); main: 45 dvh with the
     whole panel in it, scrolling, and shelf.js scrolls the first element marked data-shelf-main up under the head; full: about 75 dvh, everything.
     The rules say #dock-end to win over the panels' own padding (Finishes) */
  .view-page { --shelf-handle: 60px; --shelf-grip: 16px; }                  /* the handle is shelf-state.js HANDLE_PX */
  /* the foot: the system bar's inset PLUS a 32 px tail (not the larger of the two: where Android's gesture or button bar draws over the page and
     reports no inset, or less than it covers, the last control stayed under it; a scrolled sheet now ends clear of the bar either way) */
  #dock-end [data-shelf] { max-block-size: 75dvh; padding-block: 0 calc(32px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; scroll-padding-block: calc(var(--shelf-handle) + 4px) calc(32px + env(safe-area-inset-bottom, 0px)); }
  #dock-end [data-shelf="main"] { max-block-size: 45dvh; }
  #dock-end [data-shelf="handle"] { block-size: var(--shelf-handle); overflow: hidden; padding-block-end: 0; }
  #dock-end [data-shelf="handle"] > :not(.shelf-grip, .rooms-head) { visibility: hidden; }            /* out of the tab order too */
  .shelf-grip {
    display: block; position: sticky; inset-block-start: 0; z-index: 4; inline-size: 100%; block-size: var(--shelf-grip); margin: 0; padding: 0;
    border: 0; background: var(--v-dialog, var(--v-paper)); cursor: grab; touch-action: none;   /* square: the sheet's own rounded edge clips it (a rounded grip let scrolled text show in the corners) */
  }
  .shelf-grip::before {
    content: ""; position: absolute; inset-block-start: 6px; inset-inline-start: calc(50% - 20px); inline-size: 40px; block-size: 4px; border-radius: 2px;
    background: var(--v-line); transition: background-color 0.15s ease;
  }
  .shelf-grip:active::before { background: var(--v-ink-soft); }
  .shelf-grip:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
  #dock-end [data-shelf] > .rooms-head {
    position: sticky; inset-block-start: var(--shelf-grip); z-index: 3; box-sizing: border-box; min-block-size: 42px; background: var(--v-dialog, var(--v-paper));
    touch-action: pan-x;                          /* a vertical drag of the head is the sheet's (pointer events), not the page's */
  }
  /* main: the whole panel scrolls; the Surroundings pictures stay one row, so that the control is a strip and the rest of the panel is under it */
  #dock-end [data-shelf="main"] .surr-grid { display: flex; margin-block-start: 8px; padding: 3px 3px 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  #dock-end [data-shelf="main"] .surr-grid > li { flex: 0 0 112px; scroll-snap-align: start; }
  .tool-panel.shelf-anim, .rooms-panel.shelf-anim { transition: block-size 0.2s ease; }
}
/* Export opens from the top bar (next to Share), so its panel comes in from the inline end */
#tool-panel-export, #tool-panel-share { inset-inline-start: auto; inset-inline-end: 12px; inline-size: min(380px, calc(100% - 112px)); transform: translateX(calc(100% + 24px)); }
[dir="rtl"] #tool-panel-export, [dir="rtl"] #tool-panel-share { transform: translateX(calc(-100% - 24px)); }
#tool-panel-export.open, #tool-panel-share.open { transform: none; }
#btn-share[aria-expanded="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
@media (max-width: 760px) {
  #tool-panel-export, [dir="rtl"] #tool-panel-export, #tool-panel-share, [dir="rtl"] #tool-panel-share { inset-inline: 0; inline-size: auto; transform: translateY(100%); }
  #tool-panel-export.open, [dir="rtl"] #tool-panel-export.open, #tool-panel-share.open, [dir="rtl"] #tool-panel-share.open { transform: none; }
}
/* Finishes: a little wider on a computer (rows of cards, the wallpaper tools); the phone's sheet stays full width */
#tool-panel-finishes { inline-size: min(404px, calc(100% - 112px)); padding: 14px 14px 16px; }
@media (max-width: 760px) {
  #tool-panel-finishes { inline-size: auto; }
}
@media (prefers-reduced-motion: reduce) { .tool-panel { transition: none; } }

/* Docked panels (wider than a phone; owner, 2026-10-22: "like in 3ds Max, the panel never hides part of the view", then "all the tool
   panels on the right, full height, the strip stays on the left, one panel at a time"). The page area under the top bar is a grid
   of two columns: the picture and the dock at the end edge (the right in LTR, the left in Arabic). The dock holds every panel (the
   tools, the room list, Export); an open panel is a column of its own, full height, and the picture is exactly as wide as what is
   left, so the edges of the camera are always the edges of the picture. The strip floats over the start edge of the picture as
   before (--strip keeps the hint and the offer clear of it). The panels keep their width while the dock slides open, so nothing
   reflows. On a phone nothing here applies: the panels are sheets over the picture. */
@media (min-width: 761px) {
  .stage-wrap {
    /* one width for every panel (owner, 2026-10-24: "the right panel is always on"): the picture keeps its size from tool to tool.
       The handle on its start edge sets --w-pick (owner, 2026-10-26; panel-width.js); the clamp keeps it between 300 px and
       720 px and under 45% of the window, the same numbers as panel-width-state.js */
    --w-dock: clamp(300px, var(--w-pick, min(400px, 38vw)), min(720px, 45vw)); --w-std: var(--w-dock); --w-wide: var(--w-dock); --w-add: var(--w-dock); --w-exp: var(--w-dock); --w-rooms: var(--w-dock);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: var(--tbar-h) minmax(0, 1fr); background: var(--v-paper);
  }
  /* everything that lies on the picture is placed in the picture's cell, under the top bar (an absolutely placed box takes its grid area as its page) */
  .stage-wrap > :not(.dock, .toolbar) { grid-area: 2 / 1 / 3 / 2; }
  .stage-wrap > .tbar { grid-area: 1 / 1 / 2 / 2; }
  .stage-wrap > .walls-editor { grid-area: 1 / 1 / 3 / 3; }   /* the wall drawing takes the whole place, the top bar's row and the dock's column too */
  .toolbar { inset-block-start: calc(var(--tbar-h) + 12px); max-block-size: calc(100% - var(--tbar-h) - 24px); }
  .dock { position: relative; min-inline-size: 0; inline-size: 0; overflow: hidden; background: var(--v-paper); transition: inline-size 0.2s ease; }
  .dock-end { grid-area: 1 / 2 / 3 / 3; }
  #dock-end { inline-size: var(--w-dock); }   /* always open: with no tool open the room list stands in it (dock-default.js) */
  body[data-mode="intro"] #dock-end, .is-embed #dock-end:not(:has(#tool-panel-share.open)) { inline-size: 0; }
  body.no-rooms #dock-end:not(:has(.open)) { inline-size: 0; }   /* a link without the room list: the dock opens with a tool only */
  body.booting #dock-end:not(:has(.open)) { inline-size: 0; }    /* while the plan loads (view.html, until view.js knows intro or not): no empty column that shuts again for the intro */
  .dock-end:has(.open) { inline-size: var(--w-std); }
  .dock-end:has(#tool-panel-finishes.open) { inline-size: var(--w-wide); }
  .dock-end:has(#tool-panel-add.open) { inline-size: var(--w-add); }
  .dock-end:has(:is(#tool-panel-export, #tool-panel-share).open) { inline-size: var(--w-exp); }
  .dock-end:has(#rooms-panel.open) { inline-size: var(--w-rooms); }
  .is-embed #dock-end:has(.tool-panel.open:not(#tool-panel-share)), body[data-mode="intro"] #dock-end:has(.tool-panel.open) { inline-size: 0; }   /* those panels are not shown there */

  #dock-end .tool-panel, #dock-end .rooms-panel {
    position: absolute; inset-block: 0; inset-inline: 0 auto; max-block-size: none; box-sizing: border-box; z-index: auto;
    border-width: 0; border-inline-start: 1px solid var(--v-line); border-radius: 0; box-shadow: none; transform: none; visibility: hidden;
    inline-size: var(--w-std);
    transition: visibility 0s linear 0.2s;           /* a closing panel stays until the dock has slid shut */
  }
  #dock-end .tool-panel.open, #dock-end .rooms-panel.open { visibility: visible; transition: none; }
  #dock-end:has(.open) :is(.tool-panel, .rooms-panel):not(.open) { transition: none; }   /* another one takes its place at once */
  #dock-end #tool-panel-finishes { inline-size: var(--w-wide); }
  #dock-end #tool-panel-add { inline-size: var(--w-add); }
  #dock-end :is(#tool-panel-export, #tool-panel-share) { inline-size: var(--w-exp); }
  #dock-end #rooms-panel { inline-size: var(--w-rooms); }
  /* the handle on the panel's start edge (panel-width.js): a thin strip over the panel's border, a line and a cursor on hover */
  #dock-end > .dock-grip {
    display: block; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 8px; z-index: 6;
    cursor: col-resize; touch-action: none; background: transparent; transition: background-color 0.15s ease;
  }
  .dock-grip::after {
    content: ""; position: absolute; inset-block: 50% auto; inset-inline-start: 2px; inline-size: 4px; block-size: 40px; margin-block-start: -20px;
    border-radius: 2px; background: var(--v-line); opacity: 0; transition: opacity 0.15s ease;
  }
  .dock-grip:hover, .dock-grip:focus-visible, .dock-resizing .dock-grip { background: color-mix(in srgb, var(--v-accent) 35%, transparent); }
  .dock-grip:hover::after, .dock-grip:focus-visible::after, .dock-resizing .dock-grip::after { opacity: 1; background: var(--v-accent); }
  .dock-grip:focus-visible { outline: none; }
  body.dock-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
  body.dock-resizing .dock { transition: none; }       /* the panel follows the pointer, it does not slide after it */
  .is-embed #dock-end > .dock-grip, body[data-mode="intro"] #dock-end > .dock-grip { display: none; }
  /* cards follow the panel's width (owner, 2026-10-26): 1 column in a narrow panel, 2 as usual, 3 in a wide one */
  #dock-end :is(.add-row, #surr-pane-env) { container-type: inline-size; }
  #dock-end :is(.add-grid, .surr-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @container (max-width: 299px) { #dock-end :is(.add-grid, .surr-grid) { grid-template-columns: minmax(0, 1fr); } }
  @container (min-width: 470px) { #dock-end :is(.add-grid, .surr-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
}
.dock-grip { display: none; }                          /* a phone: no dock, the panels are sheets */
@media (min-width: 761px) and (prefers-reduced-motion: reduce) {
  .dock { transition: none; }
}

/* The top bar above the picture on a computer (owner, 2026-10-22; topbar.js): Undo / Redo, then the buttons the open panel lends
   it (data-bar). The open panel's head (its tabs, or its title, and ✕) is as tall as the bar and stands level with it at the end
   edge, so together they read as one bar whose end block is exactly as wide as the panel. A phone has no bar. */
.view-page { --tbar-h: 52px; }
.is-embed { --tbar-h: 0px; }
.tbar { display: none; }
.bar-off { display: none !important; }      /* lent by a part of its panel that is hidden now (Edit with nothing chosen, another tab) */
.head-tabs .exp-tabs { flex: 1 1 auto; min-inline-size: 0; margin: 0; border: 0; align-self: stretch; align-items: flex-end; }
.head-tabs .exp-tab { min-block-size: 40px; }
.rooms-head.head-tabs { border-block-end: 2px solid var(--v-accent-fill); }   /* the tabs stand on the red rule, as before */
@media (min-width: 761px) {
  .tbar {
    display: flex; align-items: center; gap: 10px; min-inline-size: 0; padding-inline: 12px; box-sizing: border-box; z-index: 4;
    background: var(--v-panel); border-block-end: 1px solid var(--v-line);
  }
  .is-embed .tbar { display: none; }
  body[data-mode="intro"] .tbar > * { visibility: hidden; }        /* the bar keeps its place (the picture does not jump when the intro ends) */
  .tbar-start { display: flex; flex: none; padding-inline-end: 10px; border-inline-end: 1px solid var(--v-line); }
  .tbar-start:empty { display: none; }
  .tbar-start .tool-history { flex-direction: row; }
  .tbar-start .hist-btn { inline-size: 40px; min-block-size: 38px; }
  .tbar-tools { flex: 1 1 auto; min-inline-size: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
  .tbar-tools > * { flex: none; margin: 0; }
  .tbar-tools .vbtn { min-block-size: 36px; inline-size: auto; margin: 0; padding-inline: 12px; font-size: 0.88rem; white-space: nowrap; }
  .tbar-tools .edit-row { display: flex; gap: 6px; }
  .tbar-tools .gfx-seg { min-inline-size: 0; }
  .tbar-tools .gfx-opt { min-block-size: 36px; padding-inline: 12px; white-space: nowrap; }
  .tbar-tools .bar-field { display: flex; align-items: center; gap: 8px; }
  .tbar-tools .bar-field .tool-label { margin: 0; font-weight: 500; font-size: 0.85rem; color: var(--v-ink-soft); }
  .tbar-tools .tool-input { inline-size: 220px; min-block-size: 36px; }

  #dock-end :is(.tool-panel, .rooms-panel) { padding-block-start: 0; }
  #dock-end :is(.tool-panel, .rooms-panel) > .rooms-head {
    position: sticky; inset-block-start: 0; z-index: 3; block-size: var(--tbar-h); box-sizing: border-box;
    margin-inline: -16px; margin-block-end: 12px; padding-inline: 16px 8px; background: var(--v-panel); border-block-end: 1px solid var(--v-line);
  }
  #dock-end :is(.tool-panel, .rooms-panel) > .rooms-head.head-tabs { padding-inline-start: 8px; border-block-end: 2px solid var(--v-accent-fill); }
  #dock-end #tool-panel-finishes > .rooms-head { margin-inline: -14px; }
}

/* Surroundings panel tabs (Surroundings / Sun / North): the Export tabs' .exp-tab; the Sun pane is the old Sun tool and its sections keep their rules */
.surr-tabs { margin-block-start: 10px; }
.surr-tabs .exp-tab { flex: 1 1 auto; }   /* by the width of the word, not a third each: "Surroundings" does not break in bold (a word that is still too long wraps, as in Export) */
/* Surroundings panel: a card per environment (a picture cut from its panorama, and its name) */
.surr-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.surr-grid[aria-busy="true"] { cursor: progress; }
.surr-card {
  inline-size: 100%; box-sizing: border-box; padding: 5px 5px 7px; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  border-radius: 12px; border: 2px solid var(--v-line); background: transparent; color: inherit; font: inherit; font-size: 0.85rem;
  font-weight: 600; text-align: center; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.surr-card:hover { border-color: var(--v-accent); }
.surr-card[aria-pressed="true"] { border-color: var(--v-accent-deep); background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.surr-pic { display: block; aspect-ratio: 8 / 5; border-radius: 8px; overflow: hidden; background: #d9dde3; }
.surr-pic img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.surr-name { max-inline-size: 100%; line-height: 1.15; overflow-wrap: anywhere; }
.surr-card:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .surr-card { transition: none; } }
/* No card is lit while Blank (view options) hides the environment */
.surr-grid[data-blank] .surr-card[aria-pressed="true"] { border-color: var(--v-line); background: transparent; box-shadow: none; color: inherit; }
.surr-grid[data-blank] .surr-card[aria-pressed="true"]:hover { border-color: var(--v-accent); }

/* North tab: the plan as it stands (top up) and a compass beside it, whose red needle points to north; -15 / +15 under them */
.north-prev { display: flex; gap: 12px; align-items: center; margin-block-start: 12px; }
.north-prev-plan {
  flex: 1 1 0; min-inline-size: 0; display: grid; place-items: center; box-sizing: border-box; padding: 8px;
  background: #ffffff; border: 1px solid var(--v-line); border-radius: 10px;
}
.north-prev-plan img { display: block; inline-size: 100%; aspect-ratio: var(--ar, 1.4); max-block-size: 150px; object-fit: contain; }
.north-prev-compass { flex: none; inline-size: 112px; block-size: 112px; overflow: visible; }
.north-prev .rose-letter { font-size: 15px; }
.north-ref { stroke: var(--v-ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.north-tail { fill: var(--v-ink-soft); opacity: 0.55; }
.north-prev.is-unset .north-prev-compass { opacity: 0.45; }
.north-prev-value { margin-block-start: 8px; }
.north-step { display: flex; gap: 8px; margin-block-start: 8px; }
.north-step .vbtn { flex: 1; min-block-size: 44px; font-variant-numeric: tabular-nums; }
@media (max-width: 400px) { .north-prev-compass { inline-size: 92px; block-size: 92px; } }

/* View options: a chevron attached to the Overview button, and its drop-down (planview.js) */
.seg-wrap { position: relative; display: inline-flex; }
.vbar .seg-more { inline-size: 30px; padding-inline: 0; border-inline-start: 1px solid var(--v-btn-edge); }
.seg-more[aria-expanded="true"] { background: var(--v-hover); }
.is-embed .seg-more, .is-embed .pv-menu { display: none; }              /* an embed keeps the default view */
.seg-more .btn-ico { transition: transform 0.15s ease; }
.seg-more[aria-expanded="true"] .btn-ico { transform: rotate(180deg); }
.pv-menu {
  position: absolute; inset-block-start: calc(100% + 12px); inset-inline-end: 0; inline-size: min(300px, calc(100vw - 24px)); box-sizing: border-box;
  padding: 10px 14px 12px; background: var(--v-dialog, var(--v-paper)); color: var(--v-ink);
  border: 1px solid var(--v-line); border-radius: 14px; box-shadow: var(--v-shadow); z-index: 2;
}
.vbar:has(.pv-menu:not([hidden])) { z-index: 8; }          /* above the tool panels while it is open */
.pv-title { margin: 0 0 2px; font-size: 1.05rem; line-height: 1.25; }
.pv-hint { margin: -6px 0 6px; padding-inline-start: 32px; font-size: 0.8rem; line-height: 1.4; color: var(--v-ink-soft); }
.pv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pv-row .tool-check { flex: 1 1 auto; min-inline-size: 0; }
.pv-row .tool-check:has(:disabled) { opacity: 0.55; cursor: default; }
.pv-color { flex: none; inline-size: 44px; block-size: 36px; padding: 2px; margin: 0; box-sizing: border-box; border: 1px solid var(--v-line); border-radius: 8px; background: transparent; cursor: pointer; }
.pv-color:disabled { opacity: 0.45; cursor: default; }
.pv-width { padding-inline-start: 28px; font-size: 0.85rem; color: var(--v-muted, inherit); }
.pv-width input[type="range"] { flex: 1; min-inline-size: 0; accent-color: var(--v-accent, #c62828); }
.pv-width input:disabled { opacity: 0.45; }
.pv-color:focus-visible, .pv-menu .tool-check input:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
/* the overview's Wall height (wall-cut.js): in the top bar on a computer, in this menu on a phone, only in the overview */
.pv-cut { font-size: 0.85rem; }
.pv-cut input[type="range"] { flex: 1; min-inline-size: 0; accent-color: var(--v-accent, #c62828); }
.pv-cut output, .tbar-cut output { min-inline-size: 3.2em; text-align: end; font-variant-numeric: tabular-nums; }
body:not([data-mode="overview"]) .pv-cut { display: none; }
.tbar-cut { display: none; }
@media (min-width: 761px) {
  .pv-cut { display: none; }
  /* the tools of the open panel keep their size: when the bar is too short, the Wall height gives way (shrinks a thousand times faster, then scrolls
     sideways) - at 1000 px the Ruler and Area buttons used to be squeezed to 0 by it */
  body[data-mode="overview"] .tbar-cut { display: flex; flex: 0 1000 auto; min-inline-size: 0; overflow-x: auto; scrollbar-width: thin; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; color: var(--v-ink-soft); }
  .tbar-cut > * { flex: none; }
  .tbar-cut .tool-range { flex: 0 1 160px; min-inline-size: 72px; inline-size: 160px; min-block-size: 36px; }
  .tbar-cut .tool-check { margin: 0 0 0 6px; white-space: nowrap; }
  .tbar-cut .ov-reset { inline-size: auto; min-block-size: 36px; margin: 0 0 0 6px; padding-inline: 12px; font-size: 0.85rem; white-space: nowrap; }
}
@media (max-width: 760px) {
  .pv-menu { position: fixed; inset-block-start: calc(var(--bar-h) + 8px); inset-inline: 10px; inline-size: auto; max-block-size: calc(100dvh - var(--bar-h) - 24px); overflow: auto; }
}
@media (prefers-reduced-motion: reduce) { .seg-more .btn-ico { transition: none; } }

/* Finishes panel: the part tabs (the Export panel's look), sections of swatch cards (a picture of the material or the colour, and its name) */
.fin-grid { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.fin-grid[hidden] { display: none; }
.fin-card {
  inline-size: 100%; box-sizing: border-box; padding: 4px 4px 6px; display: flex; flex-direction: column; align-items: stretch; gap: 5px;
  border-radius: 12px; border: 2px solid var(--v-line); background: transparent; color: inherit; font: inherit; font-size: 0.75rem;
  font-weight: 600; text-align: center; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fin-card:hover { border-color: var(--v-accent); }
.fin-card[aria-pressed="true"] { border-color: var(--v-accent-deep); background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.fin-pic { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #d9dde3; box-shadow: inset 0 0 0 1px rgba(29, 31, 35, 0.14); }
.fin-pic img, .fin-pic canvas { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.fin-ways { list-style: none; margin: 8px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.fin-ways .fin-swatch { min-block-size: 0; }
.fin-name { max-inline-size: 100%; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }

/* a section as one row of cards that scrolls sideways; its arrows sit at the end of the section's name line */
.fin-carousel { margin-block-start: 10px; }
.fin-car-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-block-size: 28px; }
.fin-car-head .fin-fam-name { margin: 0; }
.fin-car-nav { display: flex; gap: 4px; flex: none; }
.fin-car-nav[hidden] { display: none; }
.fin-car-btn {
  display: grid; place-items: center; inline-size: 28px; block-size: 28px; padding: 0; border-radius: 50%;
  border: 1px solid var(--v-line); background: transparent; color: inherit; cursor: pointer;
}
.fin-car-btn[data-dir="-1"] svg { transform: scaleX(-1); }
[dir="rtl"] .fin-car-btn[data-dir="1"] svg { transform: scaleX(-1); }
[dir="rtl"] .fin-car-btn[data-dir="-1"] svg { transform: none; }
.fin-car-btn:hover:not(:disabled) { border-color: var(--v-accent); }
.fin-car-btn:disabled { opacity: 0.35; cursor: default; }
.fin-car-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.fin-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78px; grid-template-columns: none; gap: 6px; margin: 4px -4px 0; padding: 4px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; scrollbar-width: none;
}
.fin-row::-webkit-scrollbar { display: none; }
.fin-row > li { scroll-snap-align: start; }
/* a soft edge where more cards wait */
.fin-carousel[data-on] .fin-row { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.fin-carousel[data-back] .fin-row { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.fin-carousel[data-back][data-on] .fin-row { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
[dir="rtl"] .fin-carousel[data-on] .fin-row { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
[dir="rtl"] .fin-carousel[data-back] .fin-row { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
[dir="rtl"] .fin-carousel[data-back][data-on] .fin-row { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.fin-row .fin-card { block-size: 100%; padding: 3px 3px 5px; font-size: 0.72rem; }
.fin-upload .fin-pic-up { display: grid; place-items: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--v-line); color: var(--v-ink-soft); border: 1.5px dashed var(--v-line); box-sizing: border-box; }
.fin-upload:hover .fin-pic-up { color: var(--v-accent); }
.fin-upload[aria-busy="true"] { cursor: progress; opacity: 0.6; }
@media (max-width: 760px), (pointer: coarse) {
  .fin-car-btn { inline-size: 36px; block-size: 36px; }
}

/* titles of the two halves of Walls > Textures: our wallpapers, the photographed materials */
.fin-sec-title { margin: 16px 0 0; padding-block-start: 12px; border-block-start: 1px solid var(--v-line); font-size: 0.92rem; font-weight: 700; }
.fin-wp-hint { margin-block-start: 2px; }

/* the wallpaper's size: one slider and a lock; unlocked, width and height */
.fin-wp-tools { margin-block: 6px 14px; }
.fin-scale-row { display: grid; grid-template-columns: minmax(48px, auto) 1fr 48px 36px; align-items: center; gap: 6px; }
.fin-scale-row + .fin-scale-row { grid-template-columns: minmax(48px, auto) 1fr 48px 36px; }
.fin-scale-row[hidden] { display: none; }
.fin-scale-name { font-size: 0.85rem; font-weight: 600; }
.fin-scale-range { min-block-size: 36px; }
.fin-scale-out { font-size: 0.82rem; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.fin-lock { inline-size: 36px; block-size: 36px; min-block-size: 0; min-inline-size: 0; padding: 0; display: grid; place-items: center; }
.fin-lock[aria-pressed="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.fin-lock[aria-pressed="true"] .fin-lock-off, .fin-lock[aria-pressed="false"] .fin-lock-on { display: none; }
.fin-lock:disabled, .fin-scale-range:disabled { opacity: 0.45; }

/* Advanced: closed at first; a row per colour role (its colour, reflectivity and glossiness) */
.fin-adv { margin-block-start: 6px; border: 1px solid var(--v-line); border-radius: 10px; }
.fin-adv-sum { display: flex; align-items: center; gap: 8px; min-block-size: 40px; padding-inline: 10px; font-size: 0.88rem; font-weight: 600; cursor: pointer; list-style: none; }
.fin-adv-sum::-webkit-details-marker { display: none; }
.fin-adv-sum::before { content: ""; flex: none; inline-size: 7px; block-size: 7px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; }
[dir="rtl"] .fin-adv-sum::before { transform: rotate(135deg); }
.fin-adv[open] > .fin-adv-sum::before { transform: rotate(45deg); }
.fin-adv-sum:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; border-radius: 10px; }
.fin-adv-dots { display: flex; gap: 3px; margin-inline-start: auto; }
.fin-adv-dot { inline-size: 14px; block-size: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(29, 31, 35, 0.25); }
.fin-adv > :not(summary) { margin-inline: 10px; }
.fin-adv > :last-child { margin-block-end: 10px; }
.fin-adv #fin-adv-empty { margin-block: 0 10px; }
.fin-role { padding-block: 8px; border-block-start: 1px solid var(--v-line); }
.fin-role-head { display: flex; align-items: center; gap: 8px; }
.fin-role-chip { flex: none; inline-size: 32px; block-size: 32px; padding: 0; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(29, 31, 35, 0.35); cursor: pointer; }
.fin-role-chip[aria-expanded="true"] { box-shadow: 0 0 0 2.5px var(--v-accent-deep); }
.fin-role-chip:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.fin-role-name { font-size: 0.88rem; font-weight: 600; }
.fin-role-hex { margin-inline-start: auto; font-size: 0.75rem; color: var(--v-ink-soft); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.fin-role-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block-start: 2px; }
.fin-mini { display: block; min-inline-size: 0; }
.fin-mini-top { display: flex; justify-content: space-between; gap: 4px; font-size: 0.75rem; color: var(--v-ink-soft); }
.fin-mini-top output { font-variant-numeric: tabular-nums; }
.fin-mini-range { min-block-size: 30px; }
.fin-role-pick { padding: 8px 0 10px; }
.fin-role-pick[hidden] { display: none; }
.fin-mini-swatches { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; }
.fin-mini-swatches .fin-swatch { min-block-size: 0; border-radius: 5px; border-width: 1.5px; }
.fin-role-pick .fin-hex-row .vbtn-icon { inline-size: 44px; padding: 0; display: grid; place-items: center; }
.fin-own-view { display: grid; grid-template-columns: 64px 64px 1fr; align-items: center; gap: 8px; padding-block: 2px 8px; }
.fin-own-view[hidden] { display: none; }
.fin-own-pic { inline-size: 64px; block-size: 64px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(29, 31, 35, 0.2); }
.fin-own-btns { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; }
.fin-own-btns .vbtn { min-block-size: 36px; padding-inline: 8px; font-size: 0.85rem; overflow-wrap: anywhere; }

/* Your textures (finishes-own-texture.js): Improve with its question mark and progress, Size and Remove, the HQ badge */
.fin-own-tex .fin-pic { position: relative; }
.fin-badge { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; padding: 1px 5px; border-radius: 6px; background: rgba(29, 31, 35, 0.78); color: #ffffff; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.4; }
.fin-badge[hidden] { display: none; }
.fin-improve { margin-block: 8px 2px; padding: 10px; border: 1px solid var(--v-line); border-radius: 12px; background: var(--v-dialog, var(--v-paper)); }
.fin-improve[hidden] { display: none; }
.fin-improve-head { display: flex; gap: 8px; align-items: center; }
.fin-improve-go { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 44px; }
.fin-improve-head[hidden] { display: none; }
.fin-improve-what { flex: none; inline-size: 44px; min-inline-size: 44px; block-size: 44px; padding: 0; border-radius: 50%; font-size: 1.05rem; font-weight: 700; }
.fin-improve-line { margin: 8px 0 0; }
.fin-improve-head[hidden] + .fin-improve-line { margin: 0; }
.fin-improve-line[hidden] { display: none; }
.fin-improve-done { color: var(--v-ink); }
.fin-improve-done::before { content: "✓ "; font-weight: 700; }
.fin-progress { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; }
.fin-progress[hidden] { display: none; }
.fin-progress-track { grid-column: 1 / -1; block-size: 8px; border-radius: 4px; background: var(--v-line); overflow: hidden; }
.fin-progress-track span { display: block; block-size: 100%; inline-size: 0; min-inline-size: 6%; border-radius: 4px;
  background: linear-gradient(90deg, var(--v-accent-fill), var(--v-accent-top), var(--v-accent-fill)); background-size: 200% 100%;
  transition: inline-size 0.3s ease; animation: fin-shimmer 1.4s linear infinite; }
@keyframes fin-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .fin-progress-track span { animation: none; transition: none; } }
.fin-progress-text { font-size: 0.82rem; color: var(--v-ink-soft); font-variant-numeric: tabular-nums; }
.fin-progress-stop { min-block-size: 36px; padding-inline: 12px; font-size: 0.85rem; }
.fin-own-tex-tools { display: flex; gap: 8px; align-items: center; margin-block-start: 8px; }
.fin-own-tex-tools[hidden] { display: none; }
.fin-own-tex-tools { justify-content: flex-end; }
.fin-tex-scale { margin-block-end: 10px; }
.fin-tex-scale[hidden] { display: none; }
.fin-improve-title { margin: 0; font-size: 1.1rem; }
.fin-improve-steps { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 8px; font-size: 0.92rem; line-height: 1.45; }
.fin-remove { color: var(--v-accent); }
@media (max-width: 760px), (pointer: coarse) {
  .fin-mini-swatches { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
  .fin-mini-swatches .fin-swatch { min-block-size: 28px; }
  .fin-scale-range, .fin-mini-range { min-block-size: 44px; }
}
@media (prefers-reduced-motion: reduce) { .fin-adv-sum::before { transition: none; } }
.fin-card:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .fin-card { transition: none; } }

/* Finishes tabs: Floor / Walls / Ceiling are .exp-tab as in Export; Walls has a second row (Colour / Textures, the same tabs, set apart),
   the colour block a segmented third (Mix / Code / Our palette) */
.fin-tabs { margin-block-end: 2px; }
.fin-subtabs { margin-block-start: 12px; }
.fin-pane { margin-block-start: 4px; }
.fin-subpane { margin-block-start: 10px; }
.fin-sheen-box .fin-h { margin-block-start: 8px; }
.fin-modes { margin-block-start: 12px; }
.fin-mode { min-block-size: 44px; font: inherit; font-size: 0.85rem; line-height: 1.15; padding-inline: 2px; border: 0; background: transparent; color: inherit; cursor: pointer; flex: 1; min-inline-size: 0; overflow-wrap: anywhere; hyphens: auto; }
.fin-mode + .fin-mode { border-inline-start: 1px solid var(--v-line); }
.fin-mode[aria-selected="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
.fin-mode:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
.fin-mode-pane { margin-block-start: 10px; }
.fin-mode-pane[hidden] { display: none; }
.fin-mode-pane:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.fin-tex-hint { margin-block: 4px 0; }
/* the last row of a list, under a thin rule: the Reset to default card (one cell) and a line about it */
.fin-top { display: flex; align-items: center; gap: 12px; margin-block-start: 16px; padding-block-start: 12px; border-block-start: 1px solid var(--v-line); }
.fin-top .fin-card:disabled { opacity: 0.55; cursor: default; border-color: var(--v-line); }
.fin-top .fin-help { margin: 0; }
.fin-grid-one { flex: none; grid-template-columns: auto; margin: 0; }
/* the Reset card is one line: a small swatch of the plan's own look and its name */
.fin-top .fin-card { flex-direction: row; align-items: center; gap: 8px; padding-block: 4px; padding-inline: 4px 12px; min-block-size: 44px; font-size: 0.8rem; }
.fin-top .fin-pic { flex: none; inline-size: 32px; border-radius: 6px; }
.fin-pic-plain { background: repeating-linear-gradient(135deg, #e8eaee 0 7px, #d9dde3 7px 14px); }
.fin-h { margin: 14px 0 6px; font-size: 0.85rem; font-weight: 600; color: var(--v-ink-soft); }
.fin-current { display: flex; align-items: center; gap: 12px; }
.fin-current[data-idle="true"] { opacity: 0.7; }
.fin-chip { flex: none; inline-size: 52px; block-size: 52px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(29, 31, 35, 0.2); }
.fin-current-text { margin: 0; display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; font-size: 0.85rem; color: var(--v-ink-soft); }
.fin-current-text strong { font-size: 0.95rem; color: inherit; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.fin-current-text span { overflow-wrap: anywhere; unicode-bidi: isolate; }
.fin-sheen-btn { min-block-size: 44px; font: inherit; font-size: 0.85rem; padding-inline: 2px; border: 0; background: transparent; color: inherit; cursor: pointer; flex: 1; overflow-wrap: anywhere; }
.fin-sheen-btn + .fin-sheen-btn { border-inline-start: 1px solid var(--v-line); }
.fin-sheen-btn[aria-pressed="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
.fin-sheen-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
.fin-sheen-btn:disabled { opacity: 0.45; cursor: default; }
.fin-mix .tool-label { margin-block: 4px 0; }
.fin-range { -webkit-appearance: none; appearance: none; display: block; inline-size: 100%; block-size: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer; }
.fin-range::-webkit-slider-runnable-track { block-size: 14px; border-radius: 7px; border: 1px solid rgba(29, 31, 35, 0.25); background: linear-gradient(var(--dir, to right), var(--stops, #ccc, #888)); }
.fin-range::-moz-range-track { block-size: 14px; border-radius: 7px; border: 1px solid rgba(29, 31, 35, 0.25); background: linear-gradient(var(--dir, to right), var(--stops, #ccc, #888)); box-sizing: border-box; }
.fin-range::-webkit-slider-thumb { -webkit-appearance: none; inline-size: 28px; block-size: 28px; margin-block-start: -8px; border-radius: 50%; border: 3px solid #fff; background: transparent; box-shadow: 0 0 0 1.5px #1d1f23, 0 1px 4px rgba(0, 0, 0, 0.4); }
.fin-range::-moz-range-thumb { inline-size: 22px; block-size: 22px; border-radius: 50%; border: 3px solid #fff; background: transparent; box-shadow: 0 0 0 1.5px #1d1f23, 0 1px 4px rgba(0, 0, 0, 0.4); }
.fin-range:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; border-radius: 8px; }
[dir="rtl"] .fin-range { --dir: to left; }
.fin-hex-row { display: flex; gap: 8px; }
.fin-hex-row .tool-input { flex: 1; min-inline-size: 0; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.fin-hex-row .vbtn { flex: none; min-block-size: 44px; padding-inline: 14px; }
.fin-hex-row .tool-input[aria-invalid="true"] { border-color: var(--v-accent-deep); box-shadow: 0 0 0 1px var(--v-accent-deep); }
.fin-dropper { min-block-size: 44px; }
.fin-swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fin-recent { display: flex; flex-wrap: wrap; }
.fin-swatch { display: block; inline-size: 100%; aspect-ratio: 1; min-block-size: 36px; padding: 0; border-radius: 8px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(29, 31, 35, 0.22); }
.fin-recent li { inline-size: 40px; }
.fin-swatch:hover { border-color: var(--v-accent); }
.fin-swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2.5px var(--v-accent-deep), inset 0 0 0 1px rgba(29, 31, 35, 0.22); }
.fin-swatch:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.fin-family + .fin-family { margin-block-start: 8px; }
.fin-fam-name { margin: 0 0 4px; font-size: 0.78rem; font-weight: 600; color: var(--v-ink-soft); }
.fin-help { margin: 10px 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--v-ink-soft); }
@media (max-width: 760px), (pointer: coarse) {
  .fin-swatch { min-block-size: 44px; }
  .fin-recent li { inline-size: 44px; }
}

/* Walls > Offset: the crown moulding and the skirting, each a block with its switch, sizes, colour and profile */
.fin-trim-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fin-trim-title { flex: 1; }
.fin-trim-head .fin-trim-on { min-block-size: 44px; margin-block-start: 16px; padding-block-start: 12px; font-size: 0.85rem; }
.fin-trim-body[data-off="true"] { opacity: 0.7; }
.fin-trim-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fin-trim-field .tool-label { margin-block: 6px 4px; font-size: 0.82rem; }
.fin-trim-num { inline-size: 100%; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.fin-trim-row { display: flex; align-items: center; gap: 10px; margin-block-start: 10px; }
.fin-trim-chip { flex: none; inline-size: 36px; block-size: 36px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(29, 31, 35, 0.25); }
.fin-trim-row .vbtn { min-block-size: 44px; padding-inline: 14px; }
.fin-trim-colour[aria-pressed="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.fin-trim-slot:not(:empty) { margin-block-start: 6px; padding: 4px 10px 10px; border: 1px solid var(--v-line); border-radius: 10px; }
.fin-trim-pic { flex: none; border-radius: 8px; background: var(--v-paper); }
.fin-trim-prof-name { flex: 1; min-inline-size: 0; font-size: 0.85rem; color: var(--v-ink-soft); }
.fin-trim-shape { fill: #fff; stroke: #1d1f23; stroke-width: 1.5; stroke-linejoin: round; }
.fin-trim-wall { stroke: #8a8f98; stroke-width: 3; stroke-linecap: round; }
.fin-trim-editor { margin-block-start: 8px; padding: 2px 10px 10px; border: 1px solid var(--v-line); border-radius: 10px; }
.fin-trim-editor[hidden] { display: none; }
.fin-trim-presets { margin-block-start: 8px; }
.fin-trim-preset { min-block-size: 40px; font: inherit; font-size: 0.82rem; padding-inline: 2px; border: 0; background: transparent; color: inherit; cursor: pointer; flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.fin-trim-preset + .fin-trim-preset { border-inline-start: 1px solid var(--v-line); }
.fin-trim-preset[aria-pressed="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
.fin-trim-preset:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
.fin-trim-area { display: block; inline-size: 100%; max-inline-size: 280px; margin: 10px auto 0; touch-action: none; background: #f6f7f9; border-radius: 8px; direction: ltr; }
.fin-trim-frame { fill: none; stroke: #c3c7ce; stroke-dasharray: 4 4; }
.fin-trim-dot { fill: var(--v-accent, #d9433b); stroke: #fff; stroke-width: 2; cursor: grab; }
.fin-trim-btns { display: flex; gap: 8px; margin-block-start: 10px; }
.fin-trim-btns .vbtn { flex: 1; min-block-size: 44px; }
.fin-trim-ok { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }

/* Edit, Add and Export panels */
.tool-sub { margin: 14px 0 4px; font-size: 0.95rem; }
#edit-name { font-size: 1.05rem; margin-block-start: 12px; }
.edit-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-block-start: 8px; }
.edit-row-2 { grid-template-columns: repeat(2, 1fr); }
.edit-mode { margin-block-start: 8px; }
/* the door card (door-panel.js): the two rooms, the two hands, the four kinds two by two */
.door-seg .gfx-opt, .door-kinds .gfx-opt {
  min-block-size: 44px; padding-inline: 6px; font: inherit; font-size: 0.9rem; border: 0; background: transparent; color: inherit;
  cursor: pointer; overflow-wrap: anywhere;
}
.door-seg .gfx-opt + .gfx-opt { border-inline-start: 1px solid var(--v-line); }
.door-kinds { flex-wrap: wrap; }
.door-kinds .gfx-opt { flex: 1 1 50%; }
.door-kinds .gfx-opt:nth-child(even) { border-inline-start: 1px solid var(--v-line); }
.door-kinds .gfx-opt:nth-child(n + 3) { border-block-start: 1px solid var(--v-line); }
:is(.door-seg, .door-kinds) .gfx-opt:hover { background: var(--v-hover, rgba(0, 0, 0, 0.04)); }
:is(.door-seg, .door-kinds) .gfx-opt[aria-pressed="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
:is(.door-seg, .door-kinds) .gfx-opt:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
#edit-door-between { margin-block: 0 4px; }
#edit-door[aria-busy="true"] :is(.gfx-opt, .vbtn, input) { cursor: progress; opacity: 0.7; }
.edit-mode-btn, .edit-light-btn, .measure-mode-btn, .add-step { min-block-size: 44px; font: inherit; font-size: 0.9rem; border: 0; background: transparent; color: inherit; cursor: pointer; }
.edit-mode-btn + .edit-mode-btn, .edit-light-btn + .edit-light-btn, .measure-mode-btn + .measure-mode-btn, .add-step + .add-step { border-inline-start: 1px solid var(--v-line); }
.edit-mode-btn[aria-pressed="true"], .edit-light-btn[aria-pressed="true"], .measure-mode-btn[aria-pressed="true"], .add-step[aria-pressed="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
.edit-mode-btn:focus-visible, .edit-light-btn:focus-visible, .measure-mode-btn:focus-visible, .add-step:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
.edit-light-seg { margin-block-start: 6px; }.edit-row .vbtn { padding-inline: 4px; font-variant-numeric: tabular-nums; }
.edit-size { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }   /* one column a field: Edit has 3 (width, depth, height), Add 2 */
.door-size { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }   /* a door's one field: half the row, as before */
.edit-size .tool-input { inline-size: 100%; min-inline-size: 0; box-sizing: border-box; }
.edit-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 6px; }
.edit-swatch { inline-size: 44px; block-size: 44px; padding: 0; border-radius: 10px; border: 2px solid var(--v-line); cursor: pointer; }
.edit-swatch[aria-pressed="true"] { border-color: var(--v-ink); box-shadow: inset 0 0 0 2px var(--v-paper); }
.edit-any { margin-block-start: 10px; }
.edit-color { inline-size: 100%; block-size: 44px; box-sizing: border-box; padding: 2px; border-radius: 10px; border: 1px solid var(--v-line); background: transparent; cursor: pointer; }
.edit-remove { color: #b3261e; border-color: currentColor; }
/* a made object waits for Apply or Cancel (edit-panel.js): two buttons side by side, the share block of the not yet accepted object is out of the way */
.edit-pending {
  display: flex; gap: 8px; margin-block-start: 14px;
  position: sticky; inset-block-end: -16px; z-index: 2; margin-inline: -16px; padding: 10px 16px 16px;   /* stays in sight at the foot of the long panel (the panel's own padding is 16px) */
  background: var(--v-dialog, var(--v-paper)); border-block-start: 1px solid var(--v-line);
}
.edit-pending .vbtn { flex: 1 1 0; min-inline-size: 0; min-block-size: 44px; }
#edit-sel[data-pending="1"] #edit-shared { display: none; }
.add-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; }
.add-tab {
  min-block-size: 44px; padding-inline: 12px; border-radius: 999px; border: 1px solid var(--v-line); background: transparent;
  color: inherit; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.add-tab[aria-pressed="true"] { background: var(--v-red); border-color: var(--v-accent-deep); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.add-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.add-card {
  inline-size: 100%; box-sizing: border-box; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: stretch;
  gap: 6px; border-radius: 12px; border: 1px solid var(--v-line); background: transparent; color: inherit; font: inherit;
  font-size: 0.85rem; font-weight: 600; text-align: center; cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.add-card:hover { border-color: var(--v-accent); box-shadow: 0 3px 10px rgba(29, 31, 35, 0.18); transform: translateY(-1px); }
.add-card:active { transform: none; }
.add-pic {                                     /* the picture is a light 4:3 render; the tile keeps its colour in the dark theme too */
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden;
  background: #f3f4f6; color: #6b7280;
}
.add-pic img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.add-name { max-inline-size: 100%; padding-inline: 2px; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }
#tool-panel-add { inline-size: min(400px, calc(100% - 112px)); }          /* wider than the other panels: bigger pictures */
@media (prefers-reduced-motion: reduce) { .add-card { transition: none; } .add-card:hover { transform: none; } }
.add-card[aria-pressed="true"] { border-color: var(--v-accent); box-shadow: inset 0 0 0 1px var(--v-accent); }
/* the chosen piece (add-panel.js): its picture, name and size, colour and size, and "Add to room" */
.add-preview { margin-block-start: 4px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #f3f4f6; }
.add-preview img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.add-pick-name { margin: 12px 0 0; font-size: 1.15rem; }
.add-pick-size { margin: 2px 0 0; font-size: 0.88rem; color: var(--v-ink-soft); font-variant-numeric: tabular-nums; }
.add-own { background: conic-gradient(from 45deg, #c9a27a, #7f9a78, #5b7fa3, #e9e4dc, #c9a27a); }   /* "its own colours": a piece keeps the colours its model has */
.add-steps { margin-block: 6px 2px; }
.add-step { flex: 1 1 0; }
.add-go { margin-block-start: 16px; min-block-size: 48px; font-weight: 700; }
.add-go-hint { text-align: center; }
/* Finishes on a computer (owner, 2026-10-24: "scroll down, not sideways"): in the docked panel the cards of a family wrap into
   rows and the panel scrolls down; the carousel arrows are not needed there. A phone keeps its rows that scroll sideways. */
@media (min-width: 761px) {
  /* the cards grow with the panel (owner, 2026-10-26: "a wider panel, bigger squares"): 78 px at the usual width, up to 132 px in a
     wide one, so a family of five fills a row there (cqi: a hundredth of the pane's width) */
  #dock-end #tool-panel-finishes .fin-pane { container-type: inline-size; }
  #dock-end #tool-panel-finishes .fin-grid:not(.fin-grid-one) { grid-template-columns: repeat(auto-fill, minmax(clamp(84px, 19cqi, 132px), 1fr)); }
  #dock-end #tool-panel-finishes .fin-row {
    grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(clamp(78px, 19cqi, 132px), 1fr)); grid-auto-columns: auto; overflow: visible;
    scroll-snap-type: none; -webkit-mask-image: none; mask-image: none;
  }
  #dock-end #tool-panel-finishes .fin-car-nav { display: none; }
}
/* the catalog: the tabs (one row that scrolls sideways on a phone; on a computer they wrap onto lines inside the panel, owner
   2026-10-26), the search, the custom object, the cards */
.add-drawer-head .add-tabs { margin-block-start: 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-block-end: 2px; }
.add-drawer-head .add-tab { flex: none; white-space: nowrap; }
@media (min-width: 761px) {
  .add-drawer-head .add-tabs { flex-wrap: wrap; overflow-x: visible; padding-block-end: 0; }
  .add-drawer-head .add-tab { flex: 0 1 auto; max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
}
.add-find { margin-block-start: 4px; }
.add-back { display: inline-flex; align-items: center; gap: 6px; margin-block-end: 10px; }
@media (max-width: 760px) {
  #tool-panel-add { inline-size: auto; max-block-size: 70dvh; }
  .add-grid { gap: 8px; }
}
  body:has(#tool-panel-finishes.open) :is(.stage-help, .cta-wrap, .shot-bar) { visibility: hidden; }
}
:is(.edit-swatch, .edit-color, .add-tab, .add-card):focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.tool-panel .dl-list { margin-block-start: 8px; }
@media (prefers-color-scheme: dark) {
  .view-page .edit-remove { color: #f08a80; }
}
@media (max-width: 760px) {
  .tool-panel[data-tool="edit"], .tool-panel[data-tool="measure"] { max-block-size: 46dvh; }   /* the piece being edited / the points being placed stay in view above the sheet */
}

/* "which way is north" window: the whole screen, the plan inside a compass rose */
.north-dialog {
  inline-size: 100vw; max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0;
  background: var(--v-dialog, var(--v-paper)); color: var(--v-ink);
}
.north-dialog[open] { display: flex; }
.north-inner { display: flex; flex-direction: column; gap: 10px; inline-size: 100%; block-size: 100%; box-sizing: border-box; padding: 14px 16px; }
.north-title { margin: 0; font-size: 1.2rem; }
.north-lead { margin: 0; font-size: 0.9rem; color: var(--v-ink-soft); }
.north-stage { flex: 1; min-block-size: 0; container-type: size; display: grid; }
.north-disc { inline-size: min(100cqw, 100cqh); aspect-ratio: 1; margin: auto; position: relative; touch-action: none; cursor: grab; user-select: none; }
.north-disc:active { cursor: grabbing; }
.north-plan { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.north-plan img { inline-size: var(--pw, 50%); block-size: var(--ph, 50%); background: #ffffff; border-radius: 4px; box-shadow: var(--v-shadow); }
.north-rose { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; pointer-events: none; }
.rose-ring { fill: none; stroke: var(--v-ink-soft); stroke-width: 1.2; }
.rose-tick { stroke: var(--v-ink-soft); stroke-width: 1; }
.rose-letter { fill: var(--v-ink); font: 600 13px system-ui, -apple-system, 'Segoe UI', sans-serif; }
.rose-north, .rose-needle { fill: var(--v-accent); }
.north-controls { display: flex; gap: 8px; align-items: center; }
.north-range { flex: 1; min-inline-size: 0; min-block-size: 44px; margin: 0; accent-color: var(--v-accent); }
.north-value { min-inline-size: 4.5ch; text-align: end; font-variant-numeric: tabular-nums; }
.north-turn { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.north-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* "Want this for your own plan?" pill (samples only): bottom start of the picture, above the help line.
   z-index 4 keeps the tool panel (5) and the room list (7) on top of it; the Photo button sits at the other end. */
.cta-wrap {
  position: absolute; inset-block-end: 92px; inset-inline-start: var(--strip); z-index: 4; max-inline-size: calc(100% - var(--strip) - 16px);
  display: inline-flex; transition: inset-block-end 0.25s ease;
}
.cta-pill {
  box-sizing: border-box; min-inline-size: 0; max-inline-size: 100%;
  min-block-size: 44px; padding-block: 4px; padding-inline: 16px; border-radius: 999px;
  border: 1px solid var(--v-accent-deep); background: var(--v-red); color: var(--v-accent-ink); box-shadow: var(--v-red-lift), var(--v-shadow);
  font: inherit; font-size: 0.92rem; font-weight: 650; text-align: start; cursor: pointer;
  display: inline-flex; align-items: center; text-decoration: none;            /* a link to /new.html, laid out like the button it was */
}
.cta-wrap:has(.cta-x:not([hidden])) .cta-pill { padding-inline-end: 50px; }     /* room for the close button over the pill's end */
.cta-pill[hidden] { display: none; }
.cta-pill:hover, .cta-pill:active, .cta-pill:focus-visible { color: var(--v-accent-ink); }   /* beats app.css `a:hover` (red text on the red pill) */
.cta-pill:hover { background: var(--v-red-hover); }
.cta-pill:active { background: var(--v-accent-deep); }
.cta-pill:focus-visible { outline: 3px solid var(--v-ink); outline-offset: 2px; }
.cta-short { display: none; }
body[data-mode="walk"] .cta-wrap, body[data-mode="overview"] .cta-wrap { inset-block-end: 76px; }    /* the intro caption is gone */
@media (max-width: 760px) {
  .cta-wrap { inset-inline-start: 10px; max-inline-size: calc(100% - 20px); }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  body[data-mode="walk"] .cta-wrap, body[data-mode="overview"] .cta-wrap { inset-block-end: 84px; }   /* two lines of help text */
}
.is-embed .cta-wrap { display: none; }
@media (prefers-reduced-motion: reduce) { .cta-wrap { transition: none; } }

/* ?debug=1 readout */
.diag { position: fixed; inset-block-start: 70px; inset-inline-start: 12px; z-index: 20; margin: 0; padding: 8px 10px;
  background: rgba(20, 18, 16, 0.78); color: #f1ede6; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; border-radius: 8px; pointer-events: none; }

/* the top bar on narrower screens: Export and Share keep only their icons (tablet), then Walk / Overview and the logo too (phone) */
@media (max-width: 1000px) {
  :is(#btn-export, #btn-share) .btn-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vbar :is(#btn-export, #btn-share) { inline-size: var(--ctl); padding-inline: 0; }
}
@media (max-width: 760px) {
  .seg-btn .btn-label, .brand-name { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* the hint, the offer, the Photo button and the round Add-comment button step aside while a sheet is open (a phone: the sheet covers their corner, or in the handle state
   leaves one peeking out; on a computer the panels are docked beside the picture). Comments and Export offer the same actions in their own sheets */
@media (max-width: 760px) {
  body:has(.tool-panel.open, .rooms-panel.open) :is(.stage-help, .cta-wrap, .shot-bar, .c-fab) { visibility: hidden; }
}
.is-embed .stage-help { inset-inline-start: 16px; max-inline-size: min(520px, calc(100% - 32px)); }

/* "This will cancel the photo. Continue?" */
.confirm-dialog {
  inline-size: min(420px, calc(100% - 32px)); padding: 0; border: 1px solid var(--v-line); border-radius: 16px;
  background: var(--v-dialog, var(--v-paper)); color: var(--v-ink); box-shadow: var(--v-shadow);
}
.confirm-dialog::backdrop { background: rgba(14, 17, 22, 0.5); }
.confirm-inner { margin: 0; padding: 22px 22px 18px; display: grid; gap: 18px; }
.confirm-text { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.confirm-actions .vbtn { min-inline-size: 96px; }

/* Render: the style of the photo queue (3D / Realistic / Sketch); the "coming soon" note of the AI styles */
.exp-styles { margin-block-start: 8px; }
/* Render: the four size pills in one row - a name and its pixels on each, As is only its name (it is just the screen) */
.exp-size-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.size-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.size-opt {
  position: relative; display: grid; align-content: center; justify-items: center; gap: 1px; min-block-size: 52px; padding: 6px 4px;
  border: 1px solid var(--v-line); border-radius: 10px; text-align: center; cursor: pointer;
}
.size-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size-name { font-size: 0.92rem; font-weight: 600; line-height: 1.15; }
.size-px { font-size: 0.72rem; line-height: 1.2; color: var(--v-ink-soft); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.size-px:empty { display: none; }
.size-opt:has(input:checked) { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); border-color: transparent; }
.size-opt:has(input:checked) .size-px { color: inherit; opacity: 0.85; }
.size-opt:has(input:focus-visible) { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.size-opt:has(input:disabled) { opacity: 0.5; cursor: default; }
.size-opt input:disabled { cursor: default; }
.exp-size-note { margin-block-start: 8px; }
.exp-size-note[hidden] { display: none; }
@media (max-width: 760px) {           /* a phone: the same four pills in one row, a little tighter, so the sheet stays short and the view shows above it */
  .size-pills { gap: 4px; }
  .size-opt { padding-inline: 2px; min-block-size: 56px; overflow-wrap: anywhere; }
  .size-name { font-size: 0.84rem; }
  .size-px { font-size: 0.66rem; }
}
/* the AI's wishes and reference: "More" on a phone (a closed details); a computer shows them open, without the summary */
.exp-more-sum { display: none; align-items: center; min-block-size: 44px; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.exp-more-sum::-webkit-details-marker { display: none; }
.exp-more-sum:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 760px) {
  .exp-more-sum { display: flex; }
  .exp-more-sum::after { content: "▾"; margin-inline-start: 6px; }
  .exp-more[open] > .exp-more-sum::after { content: "▴"; }
}
/* the Share panel's Files: the plan's and the 3D model's ticks sit in their rows, as a full-width line after the buttons */
.dl-opts { order: 3; flex: 1 1 100%; display: grid; gap: 2px; }
.dl-opts .tool-lead { margin: 2px 0 0; }
/* the Render frame (render-frame.js): while the panel is open and the size is not As is, the view takes the shape of the size - #stage, the measure and the
   comment layers get the frame's rectangle (custom properties of .stage-wrap, set in CSS px from the picture's cell), the margins are dark, a thin light
   line runs round the frame and its size stands above it. The margins are a dead zone: nothing there takes a press. #stage-area is the cell's whole
   size, hidden: what the frame is fitted into whatever #stage is sized to. */
.stage-area { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.stage-wrap[data-framed] { background: #0b0d11; }
.stage-wrap[data-framed] :is(#stage, .measure-layer, .comment-layer) {
  inset: auto; left: var(--frame-x); top: var(--frame-y); inline-size: var(--frame-w); block-size: var(--frame-h); max-inline-size: none; max-block-size: none;
}
.stage-wrap[data-framed] #stage::after {      /* the frame's edge, inside it and above the picture: a light line with a dark one under it, so it shows on a bright wall and where the frame touches the area's edges (Full HD fills the width) */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.stage-wrap[data-framed] .gfx-warn { visibility: hidden; }   /* "Realistic runs slowly" is centred at the top, where the size line is; it is back when the Render panel closes */
.frame-label {
  position: absolute; z-index: 9; box-sizing: border-box; block-size: 18px; max-inline-size: 100%; text-align: center; direction: ltr; pointer-events: none;
  transform: translateX(-50%);   /* render-frame.js sets `left` to the frame's middle: the line is as wide as its words, so it never reaches the buttons beside it */
  font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame-label[hidden] { display: none; }
.frame-label[data-place="inside"] { background: rgba(14, 17, 22, 0.6); border-radius: 9px; padding-inline: 8px; }
.exp-soon { padding: 8px 10px; border: 1px dashed var(--v-line); border-radius: 8px; color: var(--v-ink); font-weight: 600; }
/* Export, AI render only: the visitor's words and one reference picture above the Render button (export-panel.js) */
.exp-ai { margin-block-start: 10px; padding-block-start: 4px; border-block-start: 1px dashed var(--v-line); }
.exp-ai[hidden] { display: none; }
.exp-ai-title { display: block; margin: 10px 0 6px; font-size: 13px; font-weight: 600; }
.exp-words { display: block; min-block-size: 76px; padding-block: 10px; line-height: 1.4; resize: vertical; }
.exp-ai-count { margin: 2px 0 0; text-align: end; font-size: 0.78rem; color: var(--v-ink-soft); font-variant-numeric: tabular-nums; }
.exp-ai-count:empty { display: none; }
.exp-ref { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.exp-ref-add { min-block-size: 44px; }
.exp-ref-shown { position: relative; display: inline-block; }
.exp-ref-shown[hidden] { display: none; }
.exp-ref-img { display: block; inline-size: 72px; block-size: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--v-line); }
.exp-ref-del {
  position: absolute; inset-block-start: -8px; inset-inline-end: -8px; inline-size: 28px; block-size: 28px; padding: 0; border-radius: 50%;
  border: 0; background: rgba(14, 17, 22, 0.85); color: #ffffff; font-size: 0.8rem; line-height: 1; cursor: pointer;
}
.exp-ref-del:hover { background: #b3261e; }
@media (pointer: coarse), (max-width: 760px) { .exp-ref-del { inline-size: 44px; block-size: 44px; inset-block-start: -14px; inset-inline-end: -14px; font-size: 1.05rem; } }
:is(.exp-ref-del, .exp-ref-add):focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.exp-ai-err { color: var(--v-accent); font-weight: 600; }
/* Export tabs (Photos, Plan, 3D model): folder tabs standing on a red rule, rounded only at the top, a small gap between
   them; the open one is red and runs into the rule (owner, 2026-10-21) */
.exp-tabs { display: flex; gap: 4px; margin-block-start: 12px; border-block-end: 2px solid var(--v-accent-fill); }   /* --v-red is a gradient: it cannot colour a border */
.exp-tab {
  flex: 1 1 0; min-inline-size: 0; min-block-size: 44px; padding: 4px 6px; border: 0; border-radius: 10px 10px 0 0;
  background: rgba(100, 108, 122, 0.12); color: inherit;
  font: inherit; font-size: 0.9rem; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; cursor: pointer;
}
.exp-tab:hover { background: rgba(100, 108, 122, 0.2); }
.exp-tab[aria-selected="true"] { background: var(--v-red); color: var(--v-accent-ink); font-weight: 600; }
.exp-tab:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
.exp-pane { margin-block-start: 12px; }
.exp-pane[hidden] { display: none; }
.exp-pane:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.exp-pane > .tool-lead:first-child { margin-block-start: 0; }
.exp-pane .tool-check:has(:disabled) { opacity: 0.55; cursor: default; }
/* The look ticks of the photos, set off from the style above them */
.exp-effects { margin-block-start: 10px; padding-block-start: 4px; border-block-start: 1px dashed var(--v-line); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlg-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Add: Custom object (a demo of the coming generator) */
.demo-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--v-accent-fill); color: var(--v-accent-ink, #fff); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; }
.add-custom {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; inline-size: 100%; margin-block: 10px 4px;
  padding: 10px 12px; border: 1.5px dashed var(--v-accent); border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.add-custom:hover { background: color-mix(in srgb, var(--v-accent) 8%, transparent); }
.add-custom:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.add-custom-icon { font-size: 1.4rem; color: var(--v-accent); }
.add-custom-text { display: grid; }
.add-custom-name { font-weight: 600; }
.add-custom-hint { font-size: 0.82rem; color: var(--v-ink-soft); }
.custom-dialog { inline-size: min(1080px, calc(100% - 32px)); }
/* the demo window of a paid action on a demo plan (demo-window.js): an example of the result over the words */
.demo-dialog .demo-pic { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 16 / 10; max-block-size: 30vh; object-fit: contain; border-radius: 10px; background: var(--v-soft-fill, #eef0f3); }
.demo-dialog .soon-title .demo-badge { margin-inline-start: 4px; }
.demo-dialog .demo-ok { inline-size: 100%; }
.custom-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.custom-video { margin: 0; }
.custom-video video { display: block; inline-size: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #1d1f23; }
.custom-video figcaption { margin-block-start: 6px; font-size: 0.85rem; color: var(--v-ink-soft); }
.custom-form { display: grid; gap: 8px; }
.custom-form .tool-label { margin: 0; }
.custom-text { min-block-size: 84px; padding-block: 8px; resize: vertical; }
.custom-drop {
  display: grid; place-items: center; gap: 8px; min-block-size: 150px; padding: 12px; text-align: center;
  border: 1.5px dashed var(--v-line); border-radius: 12px; color: var(--v-ink-soft); font-size: 0.9rem;
}
.custom-drop.over { border-color: var(--v-accent); background: color-mix(in srgb, var(--v-accent) 7%, transparent); }
.custom-drop:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.custom-drop img { max-inline-size: 100%; max-block-size: 180px; border-radius: 8px; }
.custom-drop p { margin: 0; }
.link-btn { padding: 0; border: 0; background: none; color: var(--v-accent); font: inherit; text-decoration: underline; cursor: pointer; }
/* the two Generate cards side by side (owner, 2026-10-26: "show clearly what a simple object is, what high quality is, and what
   each costs"): an example picture, the name, the cost in credits, what it is and when to pick it; High quality waits for the
   server (Soon) and for its example picture */
.custom-gen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.custom-gen-btn { display: grid; justify-items: center; align-content: start; gap: 2px; min-block-size: 56px; padding: 8px; text-align: center; }
.gen-pic { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 16 / 10; max-block-size: 30vh; object-fit: contain; margin-block-end: 4px; border-radius: 8px; background: #e9e6e0; }
.gen-pic-none { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--v-line) 60%, transparent) 0 6px, transparent 6px 12px); }
.gen-name { font-weight: 650; }
.gen-cost { font-size: 0.82rem; font-weight: 500; opacity: 0.85; }
.gen-what, .gen-when { font-size: 0.8rem; font-weight: 450; line-height: 1.3; }
.gen-when { opacity: 0.8; }
.gen-soon { position: absolute; inset-block-start: -8px; inset-inline-end: 6px; padding-block: 1px; font-size: 0.64rem; }
.gen-soon[hidden] { display: none; }
.custom-gen-btn { position: relative; }
.custom-gen-btn[aria-checked="true"] { border-color: var(--v-accent); box-shadow: 0 0 0 2px var(--v-accent); background: color-mix(in srgb, var(--v-accent) 7%, transparent); }
/* one Generate button under the cards (owner 2026-10-26: "where do I press? there should be a Generate button"): it makes the
   chosen kind, its cost on it */
.custom-go { justify-self: stretch; min-block-size: 48px; gap: 8px; font-size: 1rem; }
.custom-go[aria-disabled="true"] { opacity: 0.6; }
.custom-go .gen-cost { opacity: 0.9; }
#custom-demo[hidden], #add-custom-demo[hidden] { display: none; }
/* "Available to everyone" (owner 2026-10-27) and the objects users shared, at the end of the Add catalog */
.custom-share { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.custom-share-note { margin: -4px 0 0; font-size: 0.82rem; color: var(--v-ink-soft); }
.add-shared { margin-block-start: 14px; padding-block-start: 10px; border-block-start: 1px solid var(--v-line); }
.add-shared-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.add-shared-note:empty { display: none; }
.shared-card { display: grid; gap: 2px; inline-size: 100%; padding: 10px; border: 1px solid var(--v-line); border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.shared-card:hover { border-color: var(--v-accent); }
.shared-card:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.shared-swatch { inline-size: 100%; block-size: 46px; border-radius: 6px; }
.shared-name { font-weight: 600; overflow-wrap: anywhere; }
.shared-meta { font-size: 0.8rem; color: var(--v-ink-soft); }
.shared-item { display: grid; gap: 4px; align-content: start; }
.shared-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.8rem; }
.shared-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.shared-reasons .vbtn { font-size: 0.8rem; padding: 4px 8px; }
.shared-stars { display: flex; gap: 2px; }
.shared-star { border: 0; background: transparent; color: #e0a100; font-size: 1.5rem; line-height: 1; padding: 2px; cursor: pointer; }
.shared-star:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 1px; }
.add-shared-sort { display: flex; align-items: center; gap: 8px; margin-block: 8px; font-size: 0.85rem; }
.add-shared-sort[hidden] { display: none; }
.add-shared-sort select { inline-size: auto; }
.custom-balance { display: grid; gap: 2px; font-size: 0.88rem; color: var(--v-ink-soft); text-align: center; }
.custom-balance p { margin: 0; }
.custom-buy { justify-self: center; min-block-size: 32px; }
.custom-note:empty { display: none; }
.custom-note { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--v-accent) 10%, transparent); color: inherit; }
@media (max-width: 760px) { .custom-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .custom-gen { grid-template-columns: 1fr; } }

/* Camera: the white balance slider shows its effect: cooler to the left, warmer to the right */
.cam-kelvin { background: linear-gradient(90deg, #9fc3ff, #f3f4f6 47%, #ffc27a); border-radius: 999px; }

/* the photo queue: a counter on the Export button, a block of previews in the panel */
#btn-export { position: relative; }
.q-badge {
  position: absolute; inset-block-start: -6px; inset-inline-end: -6px; min-inline-size: 18px; block-size: 18px; box-sizing: border-box;
  padding-inline: 5px; border-radius: 9px; background: var(--v-accent-fill); color: var(--v-accent-ink); font-size: 0.72rem; font-weight: 700;
  line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none;
}
.queue { margin-block: 8px 12px; }
.queue-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.queue-item { position: relative; }
.queue-eye {
  position: absolute; inset-block-start: 50%; inset-inline-start: 50%; translate: -50% -50%; inline-size: 40px; block-size: 40px;
  display: grid; place-items: center; border-radius: 50%; background: rgba(14, 17, 22, 0.7); color: #ffffff;
  opacity: 0; transition: opacity 0.15s ease-out; pointer-events: none;
}
[dir="rtl"] .queue-eye { translate: 50% -50%; }
.queue-eye svg { inline-size: 22px; block-size: 22px; }
.queue-go:is(:hover, :focus-visible) .queue-eye { opacity: 1; }
@media (hover: none) { .queue-eye { opacity: 0.85; } }       /* no hover on touch screens: always shown */
/* the photo being made: its own progress along the foot of its thumbnail (the run's total is above the grid); the view a
   stopped run broke off at is dimmed with a pause sign and a dashed ring, so that it does not look as if it were still being made */
.queue-item[data-state="rendering"] .queue-go { outline: 2px solid var(--v-accent); outline-offset: 1px; }
.queue-item[data-state="halted"] .queue-go { outline: 2px dashed var(--v-ink-soft); outline-offset: 1px; }
.queue-item[data-state="halted"] .queue-go img { opacity: 0.45; filter: grayscale(0.6); }
.queue-item[data-state="halted"] .queue-go::after {
  content: ""; position: absolute; inset: 0; margin: auto; inline-size: 16px; block-size: 20px;
  background: linear-gradient(90deg, #ffffff 0 36%, transparent 36% 64%, #ffffff 64%); filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
}
.queue-item[data-state="waiting"] .queue-go:disabled img { opacity: 0.8; }
.queue-shot { position: absolute; inset-inline: 0; inset-block-end: 0; pointer-events: none; }
.queue-shot-pct {
  position: absolute; inset-block-end: 10px; inset-inline-start: 50%; translate: -50% 0; padding: 2px 8px; border-radius: 999px;
  background: rgba(14, 17, 22, 0.74); color: #ffffff; font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
[dir="rtl"] .queue-shot-pct { translate: 50% 0; }
.queue-shot-bar { display: block; block-size: 5px; background: rgba(255, 255, 255, 0.6); border-end-start-radius: 10px; border-end-end-radius: 10px; overflow: hidden; }
.queue-shot-bar > span { display: block; block-size: 100%; inline-size: 0; background: var(--v-accent, #c62828); transition: inline-size 0.3s linear; }
.queue-go {
  position: relative; display: block; inline-size: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--v-line); background: rgba(100, 108, 122, 0.16); color: inherit; font: inherit; cursor: pointer;
}
.queue-go img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.queue-go:hover:not(:disabled) { border-color: var(--v-ink); }
.queue-go:disabled, .queue-del:disabled { cursor: default; }
.queue-no, .queue-ok {
  position: absolute; inset-block-end: 4px; min-inline-size: 22px; block-size: 22px; box-sizing: border-box; padding-inline: 6px; border-radius: 11px;
  background: rgba(14, 17, 22, 0.74); color: #ffffff; font-size: 0.78rem; font-weight: 700; line-height: 22px; text-align: center;
}
.queue-no { inset-inline-start: 4px; font-variant-numeric: tabular-nums; }
.queue-ok { inset-inline-end: 4px; background: var(--v-accent-fill); }
.queue-del {
  position: absolute; inset-block-start: 4px; inset-inline-end: 4px; inline-size: 28px; block-size: 28px; padding: 0; border-radius: 50%;
  border: 0; background: rgba(14, 17, 22, 0.74); color: #ffffff; font-size: 0.8rem; line-height: 1; cursor: pointer;
}
.queue-del:hover:not(:disabled) { background: #b3261e; }
/* the finished photo's Download button: the opposite top corner from the ✕; a 44 px target on touch screens and phones */
.queue-dl {
  position: absolute; inset-block-start: 4px; inset-inline-start: 4px; inline-size: 28px; block-size: 28px; padding: 0; border-radius: 50%;
  border: 0; background: rgba(14, 17, 22, 0.74); color: #ffffff; cursor: pointer; display: grid; place-items: center;
}
.queue-dl svg { inline-size: 16px; block-size: 16px; }
.queue-dl:hover { background: var(--v-accent-fill); }
@media (pointer: coarse), (max-width: 760px) {
  .queue-dl, .queue-del { inline-size: 44px; block-size: 44px; }
  .queue-dl svg { inline-size: 22px; block-size: 22px; }
  .queue-del { font-size: 1.05rem; }
}
.queue-zip[aria-busy="true"] { opacity: 0.6; cursor: progress; }
:is(.queue-go, .queue-del, .queue-dl):focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.queue-run { margin-block-start: 10px; }
.queue-progress { margin: 0 0 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.queue-bar { block-size: 6px; border-radius: 3px; background: rgba(100, 108, 122, 0.25); overflow: hidden; }
.queue-bar span { display: block; block-size: 100%; background: var(--v-accent); transition: inline-size 0.4s linear; }
.queue-all, #queue-stop { background: var(--v-red); border-color: var(--v-accent-deep); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.queue-all:hover:not(:disabled), #queue-stop:hover:not(:disabled) { background: var(--v-red-hover); border-color: var(--v-accent-deep); }
#queue-all:disabled { opacity: 0.75; cursor: progress; }
.queue-note { font-size: 0.8rem; }
/* the queue in the Photos tab: small thumbnails (88 px, a bit larger on touch screens) of the views that wait or are being made;
   the number at the top, the ✕ at the other corner, the progress along the foot. The finished photos are in the gallery window. */
.queue-summary { font-weight: 600; font-variant-numeric: tabular-nums; margin-block-end: 0; }
.queue-mini { grid-template-columns: repeat(auto-fill, 88px); gap: 6px; margin-block-start: 8px; }
.queue-mini .queue-go { border-radius: 8px; }
.queue-mini .queue-no { inset-block: 3px auto; inset-inline-start: 3px; min-inline-size: 18px; block-size: 18px; padding-inline: 4px; border-radius: 9px; font-size: 0.68rem; line-height: 18px; }
.queue-mini .queue-del { inset-block-start: 3px; inset-inline-end: 3px; inline-size: 22px; block-size: 22px; font-size: 0.66rem; }
.queue-mini .queue-shot-pct { inset-block-end: 8px; padding: 1px 6px; font-size: 0.7rem; }
.queue-mini .queue-shot-bar { block-size: 4px; border-end-start-radius: 8px; border-end-end-radius: 8px; }
@media (pointer: coarse), (max-width: 760px) {
  .queue-mini { grid-template-columns: repeat(auto-fill, 96px); }
  .queue-mini .queue-del { inline-size: 32px; block-size: 32px; font-size: 0.85rem; }
}
/* the AI draws a view (10 to 90 seconds, no percentage): a spinner and a pulsing bar on the view, in the panel's progress line and on the Photo button;
   a view the AI step failed for keeps its thumbnail with the reason beside it (a full row of the grid), until it is rendered again */
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
:is(.queue-item[data-ai="wait"] .queue-shot-pct, .queue-run[data-ai="wait"] .queue-progress, .gallery-run[data-ai="wait"] .queue-progress, .photo-btn[data-ai="wait"] #photo-btn-text)::before {
  content: ""; display: inline-block; inline-size: 0.85em; block-size: 0.85em; margin-inline-end: 0.45em; vertical-align: -0.1em;
  border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: ai-spin 0.9s linear infinite;
}
.queue-item[data-ai="wait"] .queue-shot-pct { max-inline-size: calc(100% - 8px); box-sizing: border-box; text-align: center; line-height: 1.2; }
.queue-item[data-ai="wait"] .queue-shot-bar > span, .queue-run[data-ai="wait"] .queue-bar span { inline-size: 100% !important; animation: ai-pulse 1.4s ease-in-out infinite; }
.queue-error { margin: 0; font-size: 0.8rem; line-height: 1.3; color: #b3261e; font-weight: 600; }
.queue-error[hidden] { display: none; }
.queue-item[data-state="failed"] { grid-column: 1 / -1; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; align-items: center; }
.queue-item[data-state="failed"] .queue-go { outline: 2px solid #b3261e; outline-offset: 1px; }
.queue-item[data-state="failed"] .queue-go img { opacity: 0.55; }
.queue-item[data-state="failed"] .queue-shot { display: none; }
.queue-item[data-state="failed"] .queue-del { inset-inline-end: auto; inset-inline-start: 63px; }
@media (pointer: coarse), (max-width: 760px) {
  .queue-item[data-state="failed"] { grid-template-columns: 96px minmax(0, 1fr); }
  .queue-item[data-state="failed"] .queue-del { inset-inline-start: 61px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.queue-item[data-ai="wait"] .queue-shot-pct, .queue-run[data-ai="wait"] .queue-progress, .gallery-run[data-ai="wait"] .queue-progress, .photo-btn[data-ai="wait"] #photo-btn-text)::before { animation-duration: 3s; }
  .queue-item[data-ai="wait"] .queue-shot-bar > span, .queue-run[data-ai="wait"] .queue-bar span { animation: none; }
}
.queue-clear { margin-block-start: 8px; }
.queue-note { margin-block-end: 0; }
.queue-gallery { margin-block-start: 8px; }
/* the finished pictures not looked at yet (gallery-news-state.js): a count on Open gallery, and the same on the toolbar's Render button at its other corner (the waiting views' count is at the end corner) */
.queue-gallery { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.gallery-new, .q-badge-new {
  min-inline-size: 20px; block-size: 20px; box-sizing: border-box; padding-inline: 6px; border-radius: 10px;
  background: var(--v-badge-bg, #1d1f23); color: var(--v-badge-fg, #ffffff); font-size: 0.74rem; font-weight: 700; line-height: 20px;
  text-align: center; font-variant-numeric: tabular-nums;
}
.gallery-new[hidden], .q-badge-new[hidden] { display: none; }
.q-badge-new { position: absolute; inset-block-start: -6px; inset-inline-start: -6px; inset-inline-end: auto; box-shadow: 0 0 0 2px var(--v-paper); pointer-events: none; }
.queue-memory { font-weight: 600; }
.gallery-dialog { inline-size: min(980px, calc(100% - 32px)); }
.gallery-dialog .queue-grid { margin-block-start: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.gallery-run { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.gallery-run .queue-progress { margin: 0; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-actions .tool-wide { inline-size: auto; flex: 1 1 220px; margin-block-start: 0; }
/* the gallery's lightbox (lightbox.js): one photo big on a dark backdrop, over the gallery window. Top bar: the counter, Download, ✕. Desktop: ‹ picture › in a row;
   phone: the picture across the width and ‹ › in a row under it (so nothing covers the picture). The arrows' places are logical, so a right-to-left page mirrors them; the
   chevrons flip too. touch-action: none keeps the page behind still and leaves the swipes to the script. */
.lightbox {
  inset: 0; margin: 0; padding: 0; border: 0; inline-size: 100%; max-inline-size: none; block-size: 100%; max-block-size: none;
  background: #080a0d; color: #ffffff; touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
html:has(.lightbox[open]), body:has(.lightbox[open]) { overflow: hidden; }
.lb-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; padding-inline-start: 16px; padding-block-start: max(8px, env(safe-area-inset-top)); }
.lb-count { margin: 0; margin-inline-end: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.lb-btn {
  display: grid; place-items: center; flex: none; inline-size: 48px; block-size: 48px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #ffffff; cursor: pointer;
}
.lb-btn[hidden] { display: none; }
.lb-btn svg { inline-size: 24px; block-size: 24px; }
.lb-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.26); }
.lb-btn:disabled { opacity: 0.3; cursor: default; }
.lb-btn:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; }
[dir="rtl"] .lb-nav svg { transform: scaleX(-1); }
.lb-prev { grid-column: 1; grid-row: 2; align-self: center; margin-inline: 12px; }
.lb-next { grid-column: 3; grid-row: 2; align-self: center; margin-inline: 12px; }
.lb-stage { grid-column: 2; grid-row: 2; min-inline-size: 0; min-block-size: 0; display: grid; padding-block-end: 16px; }
.lb-stage img { inline-size: 100%; block-size: 100%; object-fit: contain; transition: opacity 0.15s ease-out; }
.lb-stage img[hidden] { display: none; }
.lb-stage img[data-loading] { opacity: 0.8; }
@media (max-width: 760px) {
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .lb-stage { grid-column: 1 / -1; padding-block-end: 0; }
  .lb-prev, .lb-next { grid-row: 3; margin: 8px 16px; margin-block-end: max(12px, env(safe-area-inset-bottom)); }
  .lb-prev { grid-column: 1; justify-self: start; }
  .lb-next { grid-column: 2; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) { .lb-stage img { transition: none; } }
@media (prefers-reduced-motion: reduce) { .queue-bar span { transition: none; } }
@media (max-width: 760px) {
  .shot-bar { inset-inline-end: 12px; max-inline-size: calc(100% - 24px); }
  .photo-btn { padding-inline: 14px; }
}
/* the hint gives way to the Photo button (a narrow window would put them over each other) */
@media (min-width: 761px) {
  body:has(.photo-btn:not([hidden])) .stage-help { max-inline-size: min(520px, calc(100% - var(--strip) - 230px)); }
}
@media (max-width: 760px) {
  body:has(.photo-btn:not([hidden])) .stage-help { visibility: hidden; }
}

/* Measure tool: the marks over the picture (an SVG that never takes a tap; measure.js) and the panel's list */
.stage.measuring canvas, .stage.measuring canvas:active { cursor: crosshair; }
.measure-layer { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; z-index: 3; pointer-events: none; overflow: hidden; direction: ltr; }
body[data-mode="intro"] .measure-layer { display: none; }
.ms-line { stroke: var(--v-accent); stroke-width: 2; fill: none; stroke-linecap: round; }
.ms-live { stroke-dasharray: 6 5; }
.ms-fill { fill: rgba(198, 40, 40, 0.16); stroke: none; }
.ms-dot { fill: #fff; stroke: var(--v-accent); stroke-width: 2; }
.ms-handle { fill: var(--v-accent); stroke: #fff; stroke-width: 2.5; }   /* a point of the chosen measurement: drag it */
.stage.measuring.on-handle canvas { cursor: grab; }
.ms-mark { fill: #fff; stroke: var(--v-accent); stroke-width: 2.5; }
.ms-open { fill: none; }
.ms-ring { fill: rgba(198, 40, 40, 0.18); }
.ms-pin { fill: var(--v-accent); stroke: #fff; stroke-width: 1.5; }
.ms-text { font: 600 13px system-ui, -apple-system, "Segoe UI", sans-serif; fill: var(--v-ink); stroke: var(--v-paper); stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.ms-big { font-size: 15px; }
.measure-list { list-style: none; margin: 8px 0 0; padding: 0; }
.measure-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 8px; border-block-start: 1px solid var(--v-line); font-variant-numeric: tabular-nums; }
.measure-item strong { display: block; font-size: 0.95rem; }
.measure-pick { flex: 1 1 auto; min-inline-size: 0; padding: 4px 8px; margin-inline-start: -8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.measure-pick:hover { background: var(--v-hover); }
.measure-pick:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 1px; }
.measure-item.on .measure-pick { background: color-mix(in srgb, var(--v-accent) 10%, transparent); box-shadow: inset 3px 0 0 var(--v-accent); }
[dir="rtl"] .measure-item.on .measure-pick { box-shadow: inset -3px 0 0 var(--v-accent); }
.measure-item span { display: block; font-size: 0.82rem; color: var(--v-ink-soft); }
.measure-remove { flex: none; }

/* Options tool: a row per design - a wide "show" button (name and state; a double click renames) and two small icon buttons, Save here
   (a floppy disk in the brand red) and Delete (a bin); a press that waits for its second one shows its question in words */
.opt-list { list-style: none; margin: 12px 0 4px; padding: 0; display: grid; gap: 6px; }
.opt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: stretch; }   /* name, save, delete */
.opt-rename { min-inline-size: 0; }
.opt-show { display: grid; justify-items: start; align-content: center; gap: 1px; min-inline-size: 0; min-block-size: 46px; padding-inline: 12px; text-align: start; }
.opt-name { font-weight: 600; max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }   /* a long name: two lines at most */
.opt-hint { font-size: 0.78rem; color: var(--v-ink-soft); font-weight: 400; }
.opt-show[aria-pressed="true"] { border-color: var(--v-accent); box-shadow: inset 0 0 0 1.5px var(--v-accent); }
:is(.opt-save, .opt-del) { display: inline-grid; place-items: center; min-inline-size: 40px; min-block-size: 46px; padding: 0; }
.opt-row :is(.opt-save, .opt-del)[data-sure="true"] { padding-inline: 10px; border-color: var(--v-accent); color: var(--v-accent-deep); font-weight: 600; }
.opt-ico { inline-size: 20px; block-size: 20px; }
.opt-row .opt-save { color: var(--v-accent); }                        /* over .vbtn's own ink */
.opt-row .opt-del { color: var(--v-ink-soft); }
.opt-row .opt-del:hover { color: var(--v-accent); }
.opt-del[hidden] { display: none; }
.opt-row:has(.opt-del[hidden]) { grid-template-columns: minmax(0, 1fr) auto; }
.opt-add { inline-size: 100%; min-block-size: 44px; margin-block-end: 8px; }
:is(.opt-show, .opt-save, .opt-del, .opt-add):focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
/* a link that brought design options, on a phone (the sheet would cover the house): this says they are there; a tap opens the Options sheet.
   Beside the tool strip, under the room-name pill; where the panels are docked it never shows (view.js opens the panel itself) */
.opts-chip {
  position: absolute; inset-block-start: 52px; inset-inline-start: 76px; z-index: 5; max-inline-size: calc(100% - 86px);
  min-block-size: 44px; padding-block: 4px; padding-inline: 16px; border-radius: 999px;
  border: 1px solid var(--v-accent-deep); background: var(--v-red); color: var(--v-accent-ink); box-shadow: var(--v-red-lift), var(--v-shadow);
  font: inherit; font-size: 0.92rem; font-weight: 650; text-align: start; cursor: pointer;
}
.opts-chip:hover { background: var(--v-red-hover); }
.opts-chip:focus-visible { outline: 3px solid var(--v-ink); outline-offset: 2px; }
@media (min-width: 761px) { .opts-chip { display: none; } }
.is-embed .opts-chip { display: none; }
@media (max-width: 760px) {
  body:has(.tool-panel.open, .rooms-panel.open) .opts-chip { visibility: hidden; }
}
/* on a phone, two design options or more: round buttons over the picture, one per option, and "..." for the Options sheet. Fixed colours,
   not the theme's (owner, 2026-10-25: white on white could not be read - the dark theme made the numbers white): solid white buttons with
   dark numbers on a dark see-through pill, the chosen one red
   (options-panel.js). Low in the picture between the start edge and the shutter, so the house above stays in sight while it changes;
   ten do not fit a narrow phone, so the numbers scroll sideways. A computer docks the panel beside the picture and has no bar */
.opts-bar { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .opts-bar:not([hidden]) {
    position: absolute; inset-block-end: 16px; inset-inline: 10px 92px; z-index: 4; display: flex; justify-content: center; pointer-events: none;
  }
  .opts-bar-pill {
    display: flex; align-items: center; gap: 6px; min-inline-size: 0; padding: 4px; border-radius: 999px; pointer-events: auto;
    background: rgba(20, 22, 26, 0.42); border: 1px solid rgba(255, 255, 255, 0.28); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .opts-bar-list { display: flex; gap: 6px; min-inline-size: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .opts-bar-list::-webkit-scrollbar { display: none; }
  .opts-bar-btn {
    flex: none; inline-size: 44px; block-size: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(29, 31, 35, 0.18);
    background: rgba(255, 255, 255, 0.94); color: #1d1f23; font: inherit; font-size: 1rem; font-weight: 700;
    font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation;
  }
  .opts-bar-more { background: transparent; border-color: transparent; color: #ffffff; font-size: 1.3rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
  .opts-bar-btn[aria-pressed="true"] { background: var(--v-red); border-color: var(--v-accent-deep); color: var(--v-accent-ink); box-shadow: var(--v-red-lift); }
  .opts-bar-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
  /* the hint would sit under the bar: the bar is the more useful of the two while there are designs to switch */
  body:has(.opts-bar:not([hidden])) .stage-help { display: none; }
  body[data-mode="intro"] .opts-bar, .is-embed .opts-bar { display: none !important; }
  body:has(#tool-panel-options.open) .opts-bar { visibility: hidden; }
}
@media (max-width: 760px) {
  body:has(.tool-panel.open, .rooms-panel.open) .opts-bar { visibility: hidden; }
}
.share-opts { margin-block: 4px; }

/* Share panel (Link / Files): switches for the camera lock, the password and the tools the receiver gets (share-panel.js). A switch is a
   checkbox with role="switch" drawn as a track and a knob that moves to the end edge; the whole row is the 44 px target */
.share-pane .share-row { margin-block-start: 6px; }
.share-pane .share-input { min-block-size: 44px; box-sizing: border-box; }
.share-pane textarea.share-input { min-block-size: 0; }
.share-note { margin-block-start: 6px; }
.sw-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sw-item { display: grid; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 44px; font-size: 0.92rem; cursor: pointer; }
.sw-text { min-inline-size: 0; overflow-wrap: anywhere; }
.sw {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; inline-size: 44px; block-size: 26px; margin: 0; border-radius: 13px;
  background: rgba(100, 108, 122, 0.35); cursor: pointer; transition: background 0.15s ease;
}
.sw::after {
  content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 20px; block-size: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform 0.15s ease;
}
.sw:checked { background: var(--v-accent-fill); }
.sw:checked::after { transform: translateX(18px); }
[dir="rtl"] .sw:checked::after { transform: translateX(-18px); }
.sw:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.sw:disabled { opacity: 0.5; cursor: default; }
.sw-hint { margin: -6px 0 6px; font-size: 0.78rem; color: var(--v-ink-soft); line-height: 1.35; }
.sw-hint[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .sw, .sw::after { transition: none; } }
.share-tools { padding-block-start: 14px; }
.share-tools > legend { float: none; }

/* a protected short link asks for its password before anything else (view.js); above the loading screen */
#share-gate { z-index: 8; }
.share-gate-form { display: grid; gap: 12px; justify-items: center; inline-size: min(360px, 100%); }
.share-gate-form .tool-input { text-align: center; }
.share-gate-form .tool-note { min-block-size: 1.3em; }
.share-gate-form .vbtn { min-inline-size: 140px; min-block-size: 44px; }

/* a link that locks the camera (perms.camera, view.js): the picture is the sender's frame and takes no mouse, touch or wheel; the keys are
   cut off in the stage's own options (keyTarget). The room list stays but a room is not entered. */
.is-locked #stage, .is-locked #stage canvas { pointer-events: none; }
.is-locked .stage-help { display: none; }   /* "drag to look around, tap the floor to walk": not for a frame that stays */
.is-locked .room-btn { cursor: default; }
.is-locked .room-btn:hover { background: transparent; }

/* The sun player (owner, 2026-10-22 / 2026-10-23; sun-player.js): one row of the Sun tab. On a computer the tab lends it to the top bar
   while it shows (data-bar, topbar.js) and it must not make the bar taller: 34 px controls, the clock beside the slider, no "Length"
   word. On a phone it is a block of the tab that wraps, with 44 px controls. */
.sun-player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-inline-size: 0; }
.sun-player[hidden] { display: none; }
body[data-mode="intro"] .sun-player, .is-embed .sun-player { display: none; }
.sunp-btn { padding-inline: 12px; font-size: 0.9rem; white-space: nowrap; }
.sunp-btn[aria-pressed="true"] { background: var(--v-red); border-color: var(--v-accent-deep); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); }
.sunp-btn:disabled { opacity: 0.5; cursor: default; }
.sunp-play { inline-size: 56px; padding-inline: 0; display: inline-flex; align-items: center; justify-content: center; }
.sunp-play[data-state="play"] .sunp-i-pause, .sunp-play[data-state="pause"] .sunp-i-play { display: none; }
.sunp-play:focus-visible, .sunp-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.sunp-btn-save { font-weight: 600; }
/* the slider with the loop's two marks on it; its thumb is 20 px, so a mark at p % stands at 10 px + p % of the rest */
.sunp-track { position: relative; flex: 1 1 100%; min-inline-size: 120px; --thumb: 20px; }
.sunp-slider { inline-size: 100%; min-block-size: 44px; margin: 0; accent-color: var(--v-accent); display: block; }
.sunp-slider:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.sunp-mark {
  position: absolute; inset-block-start: calc(50% - 7px); inline-size: 2px; block-size: 14px; margin-inline-start: -1px; border-radius: 1px;
  inset-inline-start: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--p, 0) / 100); background: var(--v-ink); pointer-events: none;
}
.sunp-mark::after { content: ""; position: absolute; inset-block-start: -4px; inset-inline-start: -3px; inline-size: 8px; block-size: 4px; background: var(--v-ink); border-radius: 2px 2px 0 0; }
.sunp-clock { min-inline-size: 3em; text-align: center; font-size: 0.85rem; font-variant-numeric: tabular-nums; color: var(--v-ink-soft); }
.sunp-len { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sunp-len-label { font-weight: 600; font-size: 0.9rem; margin-inline-end: 2px; }
.sunp-len-btn { min-inline-size: 48px; padding-inline: 8px; }
.sunp-len-input {
  inline-size: 64px; box-sizing: border-box; min-block-size: 44px; padding-inline: 8px; font: inherit; font-size: 0.95rem; font-variant-numeric: tabular-nums;
  border-radius: 10px; border: 1px solid var(--v-line); background: transparent; color: inherit;
}
.sunp-len-input:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.sunp-status { margin: 0; font-size: 0.8rem; font-weight: 600; color: var(--v-ink); }
.sunp-status:empty { display: none; }
.sunp-hint { margin: 8px 0 0; font-size: 0.8rem; color: var(--v-ink-soft); }
@media (max-width: 760px) {
  .sunp-btn, .sunp-len-input { min-block-size: 44px; }
}
/* in the top bar: one row as tall as the bar's other buttons; the slider takes what is left */
.tbar-tools > .sun-player { flex: 1 1 auto; flex-wrap: nowrap; gap: 6px; container-type: inline-size; }
.tbar-tools .sun-player .sunp-btn { min-block-size: 34px; padding-inline: 8px; font-size: 0.82rem; }
.tbar-tools .sun-player .sunp-play { inline-size: 40px; flex: 0 0 40px; padding-inline: 0; }   /* flex: none-like: the row is nowrap, so a shrinkable Play squeezed to 2 px at 1000 px */
.tbar-tools .sun-player .sunp-track { flex: 1 1 160px; min-inline-size: 110px; }
.tbar-tools .sun-player .sunp-slider { min-block-size: 32px; }
.tbar-tools .sun-player .sunp-len { flex-wrap: nowrap; gap: 3px; }
.tbar-tools .sun-player .sunp-len-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tbar-tools .sun-player .sunp-len-btn { min-inline-size: 0; padding-inline: 7px; }
.tbar-tools .sun-player .sunp-len-input { inline-size: 46px; min-block-size: 34px; padding-inline: 4px; font-size: 0.82rem; }
.tbar-tools .sun-player .sunp-status { max-inline-size: 14em; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sunp-ico { display: none; }
/* The row has to fit the bar (the bar is only as wide as the window less the dock: 493 px at 1000 px) and the bar must not grow or scroll: as the
   room shrinks, the less used parts go in turn - the 3/5/10 s presets (the number box stays), "To start" (the slider and Loop do it), the words of
   Save GIF / Save video (icons, the same names for a screen reader and the tooltip). Thresholds are the row's own width (container query). */
@container (max-width: 765px) { .sunp-len-btn { display: none; } }
@container (max-width: 652px) { #sunp-start { display: none; } }
@container (max-width: 586px) {
  .sunp-btn-save { inline-size: 34px; padding-inline: 0; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; }
  .sunp-btn-save[hidden] { display: none; }
  .sunp-btn-save .sunp-ico { display: block; }
  .sunp-save-text { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tbar-tools .sun-player .sunp-track { min-inline-size: 80px; }
}

/* The storeys of a house (floors-switch.js): a column of buttons at the end edge of the picture, under Edit walls in the overview;
   a storey above is looked at, not edited (stage 1 of research/floors-analysis.md): no Edit walls there */
.floors-switch {
  position: absolute; inset-block-start: 14px; inset-inline-end: 16px; z-index: 4;
  display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 14px;
  border: 1px solid var(--v-line); background: var(--v-panel); box-shadow: var(--v-shadow);
}
.floors-switch[hidden], .floors-note[hidden] { display: none; }
body[data-mode="overview"] .floors-switch { inset-block-start: 70px; }
body[data-mode="intro"] .floors-switch { display: none; }
.floor-btn {
  min-inline-size: 48px; min-block-size: 40px; padding-inline: 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--v-ink); font: inherit; font-size: 0.95rem; font-weight: 650; cursor: pointer;
}
.floor-btn:hover { background: var(--v-line); }
.floor-btn[aria-pressed="true"] { background: var(--v-ink); color: var(--v-panel); }
.floor-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.floors-note {
  position: absolute; inset-block-start: 14px; inset-inline-end: 92px; z-index: 4; max-inline-size: min(320px, calc(100% - 120px)); margin: 0;
  padding: 8px 12px; border-radius: 12px; border: 1px solid var(--v-line); background: var(--v-panel); color: var(--v-ink);
  box-shadow: var(--v-shadow); font-size: 0.85rem;
}
body:not([data-level="0"]) .walls-btn { display: none; }
@media (max-width: 760px) {
  body:has(.tool-panel.open, .rooms-panel.open) :is(.floors-switch, .floors-note) { visibility: hidden; }
}

/* Edit walls (walls-panel.js): the button over the overview, and the plan drawing over the whole picture */
.walls-btn {
  position: absolute; inset-block-start: 14px; inset-inline-end: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding-inline: 16px; border-radius: 999px;
  border: 1px solid var(--v-line); background: var(--v-panel); color: var(--v-ink);
  box-shadow: var(--v-shadow); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.walls-btn .btn-ico { inline-size: 18px; block-size: 18px; flex: none; }
.walls-btn:hover { border-color: var(--v-ink-soft); }
.walls-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }
.walls-btn[hidden] { display: none; }
body:not([data-mode="overview"]) .walls-btn { display: none; }
.walls-editor {
  position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #fff; color: var(--v-ink);
}
.walls-editor[hidden] { display: none; }
.we-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px;
  border-block-end: 1px solid var(--v-line); background: var(--v-panel);
}
.we-title { margin: 0; font-size: 1rem; font-weight: 700; margin-inline-end: 6px; }
.we-group { display: flex; flex-wrap: wrap; gap: 6px; }
.we-end { margin-inline-start: auto; }
.we-orig { align-items: center; gap: 10px; }
.we-orig.is-off .we-check { color: var(--v-ink-soft); cursor: default; }
.we-check { display: inline-flex; align-items: center; gap: 6px; min-block-size: 36px; font-size: 0.9rem; cursor: pointer; }
.we-check input { inline-size: 18px; block-size: 18px; accent-color: var(--v-red); }
.we-range { inline-size: 120px; accent-color: var(--v-red); }
.we-range:disabled { opacity: 0.4; }
.we-kind[aria-pressed="true"] { background: var(--v-red); border-color: var(--v-accent-deep); color: var(--v-accent-ink); }
.we-svg { flex: 1 1 auto; min-block-size: 0; inline-size: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.we-svg text { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.we-status { margin: 0; padding: 8px 16px 12px; font-size: 0.88rem; color: var(--v-ink-soft); border-block-start: 1px solid var(--v-line); }
body.walls-open :is(.toolbar, .tool-panel, .rooms-panel, .shot-bar, .tbar, .cta-wrap, .stage-help, .walls-btn, .comment-layer, .c-bubble, .c-fab) { visibility: hidden; }
@media (max-width: 760px) {
  .we-bar { padding: 8px 10px; gap: 6px; }
  .we-title { inline-size: 100%; }
  .we-end { margin-inline-start: 0; }
}

/* Comments tool (comments-panel.js): the strip's badge, the panel's list, the pins over the picture (HTML, never in the 3D scene, so
   nothing is drawn into a photo or a download), the thread bubble and, on a phone, its sheet. Logical properties; the layer itself
   is left-to-right because its children are placed by page coordinates. */
.tool-btn[data-tool="comments"] { position: relative; }
.tool-badge {
  position: absolute; inset-block-start: 3px; inset-inline-end: 7px; min-inline-size: 18px; block-size: 18px; padding-inline: 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--v-accent-fill); color: var(--v-accent-ink); font-size: 0.7rem; font-weight: 700; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.tool-btn[aria-expanded="true"] .tool-badge { background: #fff; color: var(--v-accent-deep); }
.c-key { margin-inline-start: 6px; padding: 0 6px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 5px; font: inherit; font-size: 0.78rem; line-height: 1.5; }
.c-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 12px; }
.c-filters .gfx-seg { flex: 1 1 auto; }
.c-seg-btn { flex: 1 1 0; min-block-size: 44px; font: inherit; font-size: 0.9rem; border: 0; background: transparent; color: inherit; cursor: pointer; }
.c-seg-btn + .c-seg-btn { border-inline-start: 1px solid var(--v-line); }
.c-seg-btn[aria-pressed="true"] { background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink); font-weight: 600; }
.c-seg-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
.c-sort { flex: 0 0 auto; }
.c-sort select { inline-size: auto; }
.c-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 0; font-size: 0.88rem; }
.c-unlock { margin-block-start: 10px; }
.c-list { list-style: none; margin: 10px 0 0; padding: 0; }
.c-item { border-block-start: 1px solid var(--v-line); display: flex; align-items: flex-start; gap: 4px; }
.c-card {
  flex: 1 1 auto; min-inline-size: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; padding: 10px 8px; margin-inline-start: -8px;
  border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; min-block-size: 44px;
}
.c-card:hover { background: var(--v-hover); }
.c-card:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 1px; }
.c-item.on .c-card { background: color-mix(in srgb, var(--v-accent) 10%, transparent); box-shadow: inset 3px 0 0 var(--v-accent); }
[dir="rtl"] .c-item.on .c-card { box-shadow: inset -3px 0 0 var(--v-accent); }
.c-num, .c-dot {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 50%; background: var(--c, #555); color: #fff;
  font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
}
.c-num { inline-size: 32px; block-size: 32px; font-size: 0.9rem; grid-row: 1 / span 3; }
.c-item.resolved .c-num { background: #7b8190; }
.c-meta { font-size: 0.82rem; color: var(--v-ink-soft); overflow-wrap: anywhere; }
.c-meta strong { color: var(--v-ink); }
.c-snip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 0.93rem; white-space: pre-line; }
.c-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.78rem; color: var(--v-ink-soft); }
.c-tag { padding: 0 7px; border: 1px solid var(--v-line); border-radius: 9px; }
.c-done { flex: none; inline-size: 44px; min-block-size: 44px; margin-block-start: 4px; font-size: 1.1rem; }
.c-done[aria-pressed="true"] { color: #2e7d32; }
.c-empty { margin: 18px 4px; padding: 18px 14px; border: 1px dashed var(--v-line); border-radius: 12px; color: var(--v-ink-soft); text-align: center; font-size: 0.92rem; line-height: 1.45; }
.c-empty::before { content: ""; display: block; inline-size: 40px; block-size: 40px; margin: 0 auto 10px; border-radius: 50%; border: 2px dashed var(--v-line); }

.stage.commenting canvas, .stage.commenting canvas:active { cursor: crosshair; }
.comment-layer { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; z-index: 3; pointer-events: none; overflow: hidden; direction: ltr; }
body[data-mode="intro"] .comment-layer, body[data-mode="intro"] .c-bubble, body[data-mode="intro"] .c-fab, .comment-layer.photo { display: none; }
.is-embed .comment-layer, .is-embed .c-bubble, .is-embed .c-fab { display: none; }
.c-pin {
  position: absolute; inset: 0 auto auto 0; inline-size: 28px; block-size: 28px; margin: -14px 0 0 -14px; padding: 0; border: 0; background: none; pointer-events: auto;
  cursor: pointer; transition: opacity 0.2s ease; will-change: transform; touch-action: manipulation;
}
.c-pin::before { content: ""; position: absolute; inset: -9px; }                 /* a touch target of 46 px */
.c-pin .c-dot { inline-size: 28px; block-size: 28px; font-size: 0.8rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45); }
.c-pin.faded { opacity: 0.35; }
.c-pin.faded:hover, .c-pin.faded:focus-visible, .c-pin.on { opacity: 1; }
.c-pin.resolved .c-dot { background: #7b8190; }
.c-pin.removed .c-dot { border-style: dashed; }
.c-pin.on .c-dot { box-shadow: 0 0 0 3px var(--v-accent), 0 1px 4px rgba(0, 0, 0, 0.45); }
.c-pin:focus-visible { outline: none; }
.c-pin:focus-visible .c-dot { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--v-accent); }
.c-pin.cluster .c-dot { background: #2f3542; inline-size: 34px; block-size: 34px; margin: -3px 0 0 -3px; font-size: 0.9rem; }
.c-pin.ghost { pointer-events: none; opacity: 0.75; }
.c-pin.ghost .c-dot { background: color-mix(in srgb, var(--v-accent) 55%, transparent); border-style: dashed; box-shadow: none; }
.c-pin.new .c-dot { animation: c-pop 0.34s cubic-bezier(0.3, 1.6, 0.5, 1); }
.c-pin.pulse .c-dot { animation: c-pulse 0.9s ease-out 2; }
@keyframes c-pop { 0% { transform: scale(0.2); } 100% { transform: scale(1); } }
@keyframes c-pulse { 0% { box-shadow: 0 0 0 0 var(--v-accent), 0 1px 4px rgba(0, 0, 0, 0.45); } 100% { box-shadow: 0 0 0 16px rgba(198, 40, 40, 0), 0 1px 4px rgba(0, 0, 0, 0.45); } }
@media (prefers-reduced-motion: reduce) { .c-pin.new .c-dot, .c-pin.pulse .c-dot { animation: none; } .c-pin { transition: none; } }
.c-tip {
  position: absolute; z-index: 1; max-inline-size: 240px; padding: 6px 10px; border-radius: 8px; background: #20242b; color: #fff; font-size: 0.85rem; line-height: 1.35;
  pointer-events: none; overflow-wrap: anywhere; white-space: pre-line; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); direction: initial;
}
.c-hint {
  position: absolute; inset-block-start: 14px; inset-inline: 0; margin-inline: auto; inline-size: max-content; max-inline-size: calc(100% - 24px); padding: 8px 14px; border-radius: 18px;
  background: #20242b; color: #fff; font-size: 0.9rem; pointer-events: none; text-align: center; direction: initial;
}

.c-bubble {
  position: absolute; z-index: 6; inline-size: min(320px, calc(100% - 24px)); max-block-size: min(70%, 460px); overflow: auto; box-sizing: border-box; padding: 12px;
  background: var(--v-dialog, var(--v-paper)); color: var(--v-ink); border: 1px solid var(--v-line); border-radius: 14px; box-shadow: var(--v-shadow);
}
.c-bubble:focus { outline: none; }
.c-b-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-end: 6px; }
.c-b-title { display: flex; align-items: center; gap: 8px; min-inline-size: 0; font-size: 0.88rem; color: var(--v-ink-soft); }
.c-b-title .c-num { inline-size: 26px; block-size: 26px; font-size: 0.8rem; flex: none; grid-row: auto; }
.c-b-close { flex: none; }
.c-msg { padding-block: 8px; border-block-start: 1px solid var(--v-line); }
.c-msg:first-of-type { border-block-start: 0; }
.c-msg-top { display: flex; align-items: baseline; gap: 6px; font-size: 0.82rem; color: var(--v-ink-soft); }
.c-msg-top strong { color: var(--v-ink); }
.c-msg-top .c-more { margin-inline-start: auto; align-self: center; }
.c-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; line-height: 1.4; }
.c-text a { color: var(--v-accent); text-decoration: underline; }
.c-more { min-inline-size: 44px; min-block-size: 44px; font-size: 1.2rem; line-height: 1; }
.c-menu { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 6px; }
.c-menu .vbtn { min-block-size: 44px; }
.c-form textarea { display: block; resize: none; min-block-size: 76px; padding-block: 10px; line-height: 1.4; font-size: 0.95rem; }
.c-form .c-name { margin-block-end: 8px; }
.c-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-start: 8px; }
.c-row .vbtn { min-block-size: 44px; }
.c-count { font-size: 0.8rem; color: var(--v-ink-soft); font-variant-numeric: tabular-nums; }
.c-count.over { color: var(--v-accent); font-weight: 600; }
.c-error { margin: 6px 0 0; font-size: 0.85rem; color: var(--v-accent); }
.c-error:empty { display: none; }
.c-gone { font-size: 0.8rem; color: var(--v-accent); }
.c-fab {
  position: absolute; inset-block-end: 16px; inset-inline-end: 16px; z-index: 3; inline-size: 52px; block-size: 52px; border-radius: 50%; border: 0; padding: 0; display: none;
  background: var(--v-red); box-shadow: var(--v-red-lift), 0 4px 14px rgba(0, 0, 0, 0.3); color: var(--v-accent-ink); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.c-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.is-locked .c-fab, .is-locked #comments-add { display: none; }
@media (max-width: 760px) {
  .tool-panel[data-tool="comments"] { max-block-size: 50dvh; }
  .tool-panel[data-tool="comments"].placing { transform: translateY(100%); visibility: hidden; }
  .c-fab { display: block; inset-block-end: 24px; }
  .comment-on .c-fab { display: none; }
  /* the thread is a sheet from the foot, at most half the screen, above the keyboard (visualViewport sets --c-kb) */
  .c-bubble {
    position: fixed; inset: auto 0 var(--c-kb, 0px) 0 !important; inline-size: auto; max-block-size: 50dvh; border-radius: 16px 16px 0 0; z-index: 8; padding-block-end: 16px;
  }
  .c-form textarea, .c-bubble .tool-input { font-size: 1rem; }                  /* 16 px: iOS does not zoom into the field */
}
.c-bubble.photo { display: none; }
/* a tap on a pin is not for it while another tool is taking the taps of the picture (Measure places points, Edit picks pieces) */
.stage.measuring ~ .comment-layer .c-pin, body.editing .c-pin { pointer-events: none; }

/* the Rooms list of a house of several storeys (rooms-panel.js): a head per storey, the one the overview shows marked */
.rooms-level { list-style: none; margin-block: 10px 2px; }
.rooms-level:first-child { margin-block-start: 0; }
.rooms-level-btn {
  inline-size: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--v-ink-soft);
  font: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-align: start; text-transform: uppercase; cursor: pointer;
}
.rooms-level-btn:hover { background: var(--v-line); color: var(--v-ink); }
.rooms-level[aria-current] .rooms-level-btn { color: var(--v-ink); }
.rooms-level-btn:focus-visible { outline: 3px solid var(--v-accent); outline-offset: 2px; }

/* ---- Pay design v3: Plus / Pro in the viewer (boards A10-A12, B1-B3) ----
   Download: a shut item has a lock and a small "Plus" tag, one block under the list says what to do (view-downloads.js). Share: the switches a
   link made without Plus or Pro cannot give are shut and a note says why (share-panel.js ownerWalk). A view-only link's visitor gets a pill at
   the top, shut tools with a lock badge, and later the way to an own plan (view.js). The password gate is a panel (B1). */
.view-page {
  --v-soft: #f7f8fa;
  --v-tag-bg: #fbeeee;
  --v-tag-ink: #a92020;
  --v-track-off: #e3e6ea;
  --v-badge-bg: #1d1f23;
  --v-badge-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  .view-page {
    --v-soft: #181b1f;
    --v-tag-bg: rgba(255, 107, 107, 0.16);
    --v-tag-ink: #ff9a9a;
    --v-track-off: #3a3f47;
    --v-badge-bg: #eceef1;
    --v-badge-fg: #1d1f23;
  }
}
.dl-list-shut { gap: 12px; }
.dl-list-shut > .dl-item { position: relative; padding-inline-start: 26px; }
.dl-item-shut { color: var(--v-ink-soft); flex-wrap: nowrap; }
.dl-item-shut .dl-text { flex: 1 1 0; }
.dl-item-shut .dl-name { color: var(--v-ink-soft); }
.dl-item-shut .dl-hint { display: none; }
.dl-lock { position: absolute; inset-inline-start: 0; inset-block-start: 50%; translate: 0 -50%; display: inline-flex; color: var(--v-ink-soft); }
.dl-tag {
  flex: none; display: inline-flex; align-items: center; block-size: 24px; padding-inline: 10px; border-radius: 999px;
  background: var(--v-tag-bg); color: var(--v-tag-ink); font-size: 0.75rem; font-weight: 800; white-space: nowrap;
}
.dl-item-shut .dl-btns { flex: none; gap: 2px; }
.dl-item-shut .dl-btn, .dl-item-shut .dl-btn:hover:not(:disabled) {
  min-inline-size: 0; padding-inline: 6px; background: transparent; border-color: transparent; box-shadow: none; color: var(--v-ink-soft); font-weight: 700;
}
.dl-item-shut .dl-btn.walk-locked, .dl-item-shut .dl-btn.walk-locked:hover { opacity: 1; }
.dl-upsell { display: grid; gap: 12px; margin-block-start: 14px; padding: 16px; border-radius: 18px; background: var(--v-soft); border: 1px solid var(--v-line); }
.dl-upsell-text { margin: 0; font-size: 0.92rem; font-weight: 700; line-height: 1.4; }
.dl-upsell-btn {
  display: flex; align-items: center; justify-content: center; min-block-size: 50px; padding-inline: 20px; border-radius: 999px; box-sizing: border-box;
  border: 1px solid var(--v-accent-deep); background: var(--v-red); box-shadow: var(--v-red-lift); color: var(--v-accent-ink);
  font-weight: 700; text-decoration: none; text-align: center;
}
.dl-upsell-btn:hover { background: var(--v-red-hover); }
.dl-upsell-btn:focus-visible { outline: 3px solid var(--v-ink); outline-offset: 2px; }

/* Share panel: the new look (A12) - a pill field and a pill Copy, an eyebrow over the switches, rows under thin rules, ink switches */
.share-pane .share-input { border-radius: 999px; padding-inline: 16px; }
.share-pane textarea.share-input { border-radius: 14px; padding-inline: 12px; }
.share-pane .share-row .vbtn { border-radius: 999px; padding-inline: 20px; font-weight: 700; }
.share-tools > legend.tool-sub { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--v-ink-soft); }
.share-pane .sw-item + .sw-item { border-block-start: 1px solid var(--v-line); }
.share-pane .sw:checked { background: var(--v-ink); }
.share-pane .sw:checked::after { background: var(--v-dialog); }
.share-pane .sw:not(:checked) { background: var(--v-track-off); }
.sw-lock { flex: none; display: inline-flex; color: var(--v-ink-soft); }
.sw-item.is-plan-locked .sw-row { color: var(--v-ink-soft); cursor: default; }
.sw-item.is-plan-locked .sw-text { flex: 1 1 auto; }
.sw-item.is-plan-locked .sw:disabled { opacity: 1; cursor: default; }
.share-walk { display: grid; gap: 8px; margin-block-start: 14px; padding: 14px 16px; border-radius: 16px; background: var(--v-soft); border: 1px solid var(--v-line); }
.share-walk-text { margin: 0; font-size: 0.88rem; line-height: 1.45; }
.share-walk-link { justify-self: start; font-weight: 800; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* a tool the link's author has no subscription for: dimmed, with a small lock badge (the badge itself is not dimmed) */
.tool-btn { position: relative; }
.tool-btn.walk-locked, .tool-btn.walk-locked:hover { opacity: 1; }
.tool-btn.walk-locked > :is(svg, .tool-name) { opacity: 0.45; }
.lock-badge {
  position: absolute; inset-block-start: 3px; inset-inline-end: 9px; display: grid; place-items: center; inline-size: 15px; block-size: 15px;
  border-radius: 50%; background: var(--v-badge-bg); color: var(--v-badge-fg); pointer-events: none;
}
.lock-badge svg { inline-size: 9px; block-size: 9px; }

/* "View-only link: walk and look around" (view.js setupWalkPill): once, at the top of the picture; fades after a while, has a close button */
.walk-pill {
  position: absolute; inset-block-start: 12px; inset-inline-start: var(--strip); z-index: 4; margin: 0; max-inline-size: calc(100% - var(--strip) - 12px);
  display: inline-flex; align-items: center; gap: 8px; padding-block: 2px; padding-inline: 14px 2px; border-radius: 999px; box-sizing: border-box;
  background: rgba(14, 17, 22, 0.86); color: #ffffff; font-size: 0.85rem; font-weight: 700; line-height: 1.25; transition: opacity 0.5s ease;
}
.walk-pill.leaving { opacity: 0; }
.walk-pill-x {
  flex: none; inline-size: 44px; block-size: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.walk-pill-x:hover { background: rgba(255, 255, 255, 0.16); }
.walk-pill-x:focus-visible { outline: 3px solid #ffffff; outline-offset: -3px; }
@media (min-width: 761px) { .walk-pill { inset-block-start: 64px; } }                  /* under the row where a note appears */
@media (max-width: 760px) { .walk-pill { inset-inline-start: 84px; max-inline-size: calc(100% - 96px); } }
.is-embed .walk-pill { display: none; }
@media (prefers-reduced-motion: reduce) { .walk-pill { transition: none; } }
/* Share panel: the master switch Edit with its small arrow, and the details under it */
.sw-master { display: flex; align-items: center; gap: 4px; }
.sw-master .sw-row { flex: 1 1 auto; min-inline-size: 0; }
.sw-more {
  flex: none; display: grid; place-items: center; inline-size: 44px; block-size: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--v-ink-soft); cursor: pointer;
}
.sw-more:hover { background: var(--v-soft); }
.sw-more:focus-visible { outline: 3px solid var(--v-accent); outline-offset: -3px; }
.sw-more svg { transition: transform 0.15s ease; }
.sw-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.sw-details { margin-block-end: 6px; padding-inline-start: 14px; }
.sw-details[hidden] { display: none; }
.sw-edit > .sw-hint { margin-block-start: -4px; }
.share-live .tool-lead { margin-block-start: 0; }
.share-live-signin { display: grid; gap: 8px; justify-items: start; margin-block-start: 6px; }
.share-live-error { margin-block-start: 6px; color: var(--v-red, #b3261e); font-weight: 700; }
.share-live-error[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .sw-more svg { transition: none; } }

/* Live links (live-page.js): the author's strip and the viewer's status, a pill like the walk-only one's, at the top of the picture */
.live-bar {
  position: absolute; inset-block-start: 12px; inset-inline-start: var(--strip); z-index: 4; margin: 0; max-inline-size: calc(100% - var(--strip) - 12px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding-block: 2px; padding-inline: 14px 3px; border-radius: 24px; box-sizing: border-box;
  background: rgba(14, 17, 22, 0.88); color: #ffffff; font-size: 0.85rem; font-weight: 700; line-height: 1.25;
}
.live-bar[hidden] { display: none; }
.live-dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: #e5453a; box-shadow: 0 0 0 3px rgba(229, 69, 58, 0.28); }
.live-bar[data-state="reconnecting"] .live-dot, .live-bar[data-state="connecting"] .live-dot { background: #e0a43a; box-shadow: 0 0 0 3px rgba(224, 164, 58, 0.28); }
.live-bar[data-state="ended"] .live-dot, .live-bar[data-state="denied"] .live-dot { background: #8a93a3; box-shadow: none; }
.live-text { min-inline-size: 0; overflow-wrap: anywhere; padding-block: 12px; }
.live-btn {
  flex: none; min-inline-size: 44px; min-block-size: 44px; padding-inline: 16px; border: 0; border-radius: 999px; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.16); color: inherit; font: inherit; font-weight: 800; cursor: pointer;
}
.live-btn:hover { background: rgba(255, 255, 255, 0.26); }
.live-btn:focus-visible { outline: 3px solid #ffffff; outline-offset: -3px; }
.live-btn[hidden] { display: none; }
.live-btn:disabled { opacity: 0.6; cursor: default; }
.live-note { flex: 1 1 100%; margin: 0; padding-block-end: 8px; font-weight: 600; font-size: 0.8rem; }
.live-note:empty { display: none; }
@media (min-width: 761px) { .live-bar { inset-block-start: 64px; } }                    /* under the row where a note appears */
@media (max-width: 760px) { .live-bar { inset-inline-start: 84px; max-inline-size: calc(100% - 96px); } }
body:has(#walk-pill:not([hidden])) .live-bar { inset-block-start: 66px; }               /* the view-only pill takes the first place */
@media (min-width: 761px) { body:has(#walk-pill:not([hidden])) .live-bar { inset-block-start: 118px; } }
.is-embed #live-host { display: none; }

/* the shared link's own-plan pill can be closed */
.cta-x {
  position: absolute; inset-block-start: 0; inset-inline-end: 0; z-index: 1; display: grid; place-items: center; inline-size: 44px; block-size: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--v-accent-ink); font: inherit; font-size: 0.8rem; cursor: pointer;
}
.cta-x[hidden] { display: none; }
.cta-x::before { content: ""; position: absolute; inset: 7px; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.cta-x:hover::before { background: rgba(255, 255, 255, 0.32); }
.cta-x:focus-visible { outline: 3px solid var(--v-ink); outline-offset: 2px; }

/* the password gate (B1): a panel with a lock, the field and a full-width red Open */
.share-gate-form {
  gap: 10px; inline-size: min(400px, 100%); box-sizing: border-box; padding: 28px 22px 22px; border-radius: 22px;
  background: var(--v-dialog); border: 1px solid var(--v-line); box-shadow: var(--v-shadow);
}
.share-gate-form .gate-lock { color: var(--v-ink); }
.share-gate-form .overlay-title { font-weight: 800; letter-spacing: -0.02em; }
.gate-text { margin: 0; color: var(--v-ink-soft); font-size: 0.95rem; line-height: 1.45; }
.share-gate-form .tool-input { inline-size: 100%; text-align: start; border-radius: 14px; min-block-size: 50px; padding-inline: 16px; }
.share-gate-form .tool-note { inline-size: 100%; text-align: start; }
.share-gate-form .vbtn { inline-size: 100%; min-block-size: 50px; border-radius: 999px; font-size: 1rem; font-weight: 700; }

/* Compact layout for a short or narrow computer window (owner 2026-11-23: a 1920x1080 laptop at 150% is 1280x720 CSS px, and with the browser's bars
   the page gets 1280x569: the top bars took a quarter of the height, the tool strip scrolled and the dock took a third of the width). A browser
   window is compact when it is 700 px tall or less (the strip needs about 600 px in the large layout: 56 + 52 + the 7 tools) or 1366 px wide or
   less (400 px of dock is 30 % there and more below). The text keeps its size; only the boxes around it tighten: bars, dock, strip, rows, gaps.
   A phone (760 px and under) and a large window (a 1920x1080 screen at 100 %: 1900 x 950 or so) are untouched. */
@media (min-width: 761px) and (max-height: 700px), (min-width: 761px) and (max-width: 1366px) {
  .view-page { --bar-h: 46px; --ctl: 34px; --strip: 92px; }
  .view-page:not(.is-embed) { --tbar-h: 44px; }
  .vbar { gap: 8px; padding-inline: 12px; }
  .vbar .vlang { max-inline-size: 130px; }
  /* the dock: 320 px (the handle still sets any width from 300 px) instead of 400 px */
  .stage-wrap { --w-dock: clamp(300px, var(--w-pick, min(320px, 30vw)), min(720px, 45vw)); }
  /* panels: tighter edges and gaps, rows 38-40 px instead of 44 px (still a comfortable target) */
  #dock-end :is(.tool-panel, .rooms-panel) { padding-inline: 12px; padding-block-end: 12px; }
  #dock-end :is(.tool-panel, .rooms-panel) > .rooms-head { margin-inline: -12px; margin-block-end: 8px; padding-inline: 12px 6px; }
  #dock-end :is(.tool-panel, .rooms-panel) > .rooms-head.head-tabs { padding-inline-start: 6px; }
  #dock-end #tool-panel-finishes { padding-inline: 12px; }
  #dock-end #tool-panel-finishes > .rooms-head { margin-inline: -12px; }
  .tool-sec { margin-block-start: 10px; padding-block-start: 10px; }
  .tool-label { margin-block: 8px 2px; }
  .tool-group { margin-block-start: 10px; }
  .tool-lead { margin-block: 6px 2px; }
  .vbtn, .seg-btn, .vlang { min-block-size: 38px; }
  .tool-input, .sun-opt, .sun-range, .tool-range, .gfx-opt span, .north-step .vbtn { min-block-size: 38px; }
  .tool-check { min-block-size: 36px; }
  .gfx-desc { margin-block-start: 6px; padding-block: 6px; }
  .rooms-total { margin-block: 4px 8px; }
  .rooms-list { gap: 4px; }
  .room-line, .room-arrow, .room-btn { min-block-size: 40px; }
  .rooms-note { margin-block-start: 8px; }
  .rooms-list + .rooms-note, .rooms-note + .rooms-note { padding-block-start: 8px; }
  /* the room table in a 320 px dock (a 295 px list): the walls column stays, the arrow and the light take less */
  @container rooms (max-width: 330px) {
    .rooms-cols, .room-line { --rc: 28px minmax(0, 1fr) 2.3rem 2.3rem 3.4rem; column-gap: 3px; }
    .room-walls, .rc-walls { display: revert; }
  }
  /* the tool strip: all nine tools (with Measure and Comments) in about 440 px, no scrolling at 569 px of page */
  .toolbar { inset-block-start: calc(var(--tbar-h) + 8px); inset-inline-start: 8px; gap: 2px; padding: 4px; max-block-size: calc(100% - var(--tbar-h) - 16px); }
  .tool-btn { inline-size: 62px; min-block-size: 44px; padding: 3px 1px; gap: 1px; font-size: 0.7rem; }
  .tool-btn svg { inline-size: 22px; block-size: 22px; }
  .tool-sep { margin-inline: 6px; }
  /* what lies on the picture stays at its edges and out of its middle */
  .stage-help { inset-block-end: 10px; }
  .toast { inset-block-start: 8px; padding-block: 6px; }
  .shot-bar { inset-block-end: 10px; inset-inline-end: 12px; }
  .photo-btn { min-block-size: 40px; }
  .photo-btn[data-state="add"] { inline-size: 52px; block-size: 52px; }
  .photo-btn[data-state="add"] .btn-ico { inline-size: 24px; block-size: 24px; }
  .gfx-note { inset-block-end: 14px; inset-inline-start: auto; inset-inline-end: 76px; margin-inline: 0; max-inline-size: min(440px, calc(100% - var(--strip) - 400px)); padding-block: 4px; }
}
