/* Nook lab add-ons. Built from work/nook-overnight-2026-11-16/lab/src; edit the sources, not this file. */
/* ---- core.css ---- */
/* Shared pieces for the lab add-ons. Everything is drawn with the Nook's own
   tokens (--bg, --surface, --ink, --muted, --line, --chip, --accent, --focus),
   so the add-ons follow the page, including the second room's palette. */
/* The add-ons' own toast sits where the app's does. Only one shows at a time. */
.lab-toast { z-index: 21; }
body:has(#lab-toast.is-shown) #toast { opacity: 0 !important; }
.lab-hidden { display: none !important; }
.lab-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- 05-guard.css ---- */
/* Guard: the one visible piece is the Cancel button beside a running Vibe request. */
.lab-on-guard .lab-vibe-cancel { flex: none; height: 38px; }
@media (pointer: coarse) { .lab-on-guard .lab-vibe-cancel { height: 44px; } }

/* ---- 10-recover.css ---- */
/* Recover: the failure state. The stage tools do nothing without a room, so
   they step aside and the message gets the room it needs. */
.lab-on-recover .stage[data-render-state="error"] :is(.view-tools, .door-tools, .cutaway-tools, .help) { display: none !important; }
.lab-on-recover .stage[data-render-state="error"] .load-state { gap: 10px; padding: 24px; text-align: center; max-width: 34em; margin: 0 auto; }
.lab-on-recover .lab-fail-title { font: 400 20px/1.25 Georgia, "Times New Roman", serif; color: #f4f0e8; }
.lab-on-recover .lab-fail-body { margin: 0; font-size: 14px; line-height: 1.5; color: #cfc8bc; }
.lab-on-recover .lab-fail-retry { margin-top: 6px; height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: #f6f2ea; color: #1b1b1d; font-size: 14px; font-weight: 600; }
.lab-on-recover .lab-fail-retry:hover { background: #fff; }
.lab-on-recover .lab-fail-retry:focus-visible { outline: 2px solid #e0b872; outline-offset: 3px; }
.lab-on-recover .lab-fail-detail { margin: 4px 0 0; font-size: 11.5px; line-height: 1.4; color: #8d877d; overflow-wrap: anywhere; }
@media (pointer: coarse) { .lab-on-recover .lab-fail-retry { height: 44px; } }

/* ---- 20-polish.css ---- */
/* Polish: layout defects reproduced in the stock page.

   1. Stage tools collide. The door pill (left) and the cutaway pill (right)
      shorten their labels by viewport width (760 px), but what matters is the
      width of the stage. The two pills need 593 px between them; with the
      sheet beside it the stage is narrower than that at every viewport from
      761 to 932 px wide, which covers iPads of 768 to 834 px in portrait and
      most phones held sideways. Measuring the stage itself fixes every case. */
.lab-on-polish .stage { container: nook-stage / inline-size; }
@container nook-stage (max-width: 640px) {
  .lab-on-polish .door-tools span { display: none; }
  .lab-on-polish .door-tools button { width: 36px; padding: 0; justify-content: center; }
  .lab-on-polish .cutaway-tools .long { display: none; }
  .lab-on-polish .cutaway-tools .short { display: inline; }
  .lab-on-polish .cutaway-tools button { padding: 0 10px; }
}
@container nook-stage (max-width: 440px) {
  .lab-on-polish #compare-toggle { width: 36px; padding: 0; justify-content: center; }
  .lab-on-polish #compare-toggle .compare-label { display: none; }
  .lab-on-polish #compare-toggle[aria-busy="true"] { width: auto; padding: 0 10px; }
  .lab-on-polish #compare-toggle[aria-busy="true"] .compare-label { display: inline; }
}

/* 2. An inspected object's name is cut to one letter on phones, because the
      bar reserves 200 px for the zoom tools. On a narrow stage the name takes
      its own line under the Back button. */
@container nook-stage (max-width: 560px) {
  .lab-on-polish .inspection-session:has(.session-tools.corner) .session-bar { right: 12px; flex-wrap: wrap; row-gap: 8px; }
  .lab-on-polish .inspection-session .session-title { flex: 0 0 100%; padding-left: 4px; white-space: normal; }
}

/* 3. Reset, Save and Share drift to the middle of the bar. The room switch
      sits in the middle column only once the second room is unlocked; until
      then the actions fall into its place. They belong at the end. */
@media (min-width: 761px) {
  .lab-on-polish .top-actions { grid-column: 3; }
}

/* 4. The Vibe result reserves an empty band under the idea chips before
      anything has been asked. */
.lab-on-polish .vibe-result:not(.is-shown) { height: 0; margin-top: 0; overflow: hidden; }

/* 5. At 320 px the last tab label is clipped: the six columns cannot shrink
      below their text. */
.lab-on-polish .tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.lab-on-polish .tab { min-width: 0; }
@media (max-width: 350px) {
  .lab-on-polish .tab { font-size: 10.5px; letter-spacing: -0.01em; }
  .lab-on-polish .tabs { padding-left: 2px; padding-right: 2px; }
}

/* 6. Imperial sizes beside the metric ones. */
.lab-on-polish .lab-imperial { color: var(--muted); }

/* 7. The Shop total says how many lines it covers, and goes when most lines
   have no published price. */
.lab-on-polish .lab-priced { margin: 0 0 8px; color: var(--ink); font-weight: 500; }
.lab-on-polish [data-lab-no-total] #shop-total { display: none; }

/* 8. Finger-sized targets. On an upright phone 108 of 188 controls were
   smaller than 44 px in at least one direction. Most keep their look: an
   invisible pseudo-element, centred on the control, makes the tappable area
   44 px. A few grow by a few pixels. Text links inside sentences and field
   labels are left alone. */
@media (pointer: coarse) {
  .lab-on-polish :is(.text-btn, .door-tools button, .cutaway-tools button, .view-btn, .icon-btn, .chip-btn, .variant, .segmented button, #inspect-list button, .trim-match, .lab-paper-filter button, .toast button) { position: relative; }
  /* Taller only: these sit side by side with no room to grow sideways. */
  .lab-on-polish :is(.text-btn, .door-tools button, .cutaway-tools button, .view-btn, .icon-btn, .chip-btn, .variant, .segmented button, #inspect-list button, .trim-match, .lab-paper-filter button, .toast button)::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  /* Round controls grow in both directions; their neighbours are 6 px away. */
  .lab-on-polish .swatch::after, .lab-on-polish .switch::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
  /* 11 light colours in one row leave 32 px each. Two rows give them room. */
  .lab-on-polish .chips { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; justify-items: center; }
  .lab-on-polish .chips .swatch { max-width: 40px; }
  /* Paint colours stay 9 to a row while each is at least 32 px wide. A narrower
     panel (a phone held sideways leaves 26 px) gets fewer columns, so that one
     colour's tappable area never reaches into the next. */
  .lab-on-polish .swatches { grid-template-columns: repeat(auto-fill, minmax(max(32px, (100% - 48.5px) / 9), 1fr)); }
  /* Tabs are 40 px tall on a phone held sideways. Their ::after is the underline. */
  .lab-on-polish .tab::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  /* A few pixels larger. */
  .lab-on-polish :is(.text-btn, .lab-paper-filter button) { min-width: 44px; }
  .lab-on-polish :is(.btn, #import-url, #save-name, #share-url, .slider) { height: 44px; }
  .lab-on-polish :is(.lab-paper-step, .lab-paper-heart) { min-width: 44px; min-height: 44px; }
  .lab-on-polish .link-list { gap: 0; }
  .lab-on-polish .link-list .link { display: block; padding-block: 12px; }
}
/* The round stage buttons widen only where the two pills still fit side by side. */
@container nook-stage (min-width: 360px) {
  @media (pointer: coarse) { .lab-on-polish :is(.door-tools button, #compare-toggle, #reset-view) { min-width: 44px; } }
}

/* ---- 30-speed.css ---- */
/* Speed: the still that stands in for the room while it loads. It sits under
   the canvas, which fades in over it when the room is ready. */
.lab-on-speed .lab-poster { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity 1.4s ease 0.3s; pointer-events: none; user-select: none; }
.lab-on-speed .lab-poster.is-soft { filter: blur(4px) saturate(0.94); transform: scale(1.02); }
.lab-on-speed .lab-poster.is-done { opacity: 0; }
/* The loading line needs to read over a picture. */
.lab-on-speed .stage:has(.lab-poster) .load-state { text-shadow: 0 1px 10px #000c; }
@media (prefers-reduced-motion: reduce) { .lab-on-speed .lab-poster { transition: none; } }

/* ---- 40-undo.css ---- */
/* Undo and Redo: two quiet icon buttons ahead of Reset, Save and Share. */
.lab-on-undo .lab-step { width: 36px; padding: 0; justify-content: center; }
.lab-on-undo .lab-step:disabled { opacity: 0.32; cursor: default; }
.lab-on-undo .lab-step:disabled:hover { background: transparent; }
.lab-on-undo #lab-redo { margin-right: 6px; }
@media (max-width: 760px) { .lab-on-undo .lab-step { width: 38px; } .lab-on-undo #lab-redo { margin-right: 0; } }
@media (max-width: 350px) { .lab-on-undo #lab-redo { display: none; } }

/* ---- 50-sheet.css ---- */
/* Build sheet. On screen it is a sheet of paper over the app; in print it is
   the only thing on the page. Sizes are in points and inches because the
   subject is paper. */
.lab-sheet-hint { margin: 8px 0 0; }
.lab-sheet { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #1f2d2ce0; background: color-mix(in srgb, var(--ink) 88%, transparent); color: #1f2d2c; }
.lab-sheet[hidden] { display: none; }
.lab-sheet-bar { display: flex; align-items: center; gap: 12px; padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left)); background: var(--bg); border-bottom: 1px solid var(--line); }
.lab-sheet-bar .btn { width: auto; margin: 0; padding: 0 16px; height: 38px; white-space: nowrap; }
.lab-sheet-status { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-sheet-scroll { overflow: auto; overscroll-behavior: contain; padding: 22px 14px 40px; }
.lab-page { box-sizing: border-box; width: min(100%, 8.5in); margin: 0 auto; padding: 0.5in; background: #fff; box-shadow: 0 10px 40px #0006; font: 9pt/1.38 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.lab-page-wait { margin: 0; padding: 1.5in 0; text-align: center; color: #5b615a; }
.lab-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 10px; border-bottom: 1.5pt solid #1f2d2c; }
.lab-eyebrow { margin: 0 0 4px; font-size: 7.5pt; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #5b615a; }
.lab-page h1 { margin: 0; font: 400 22pt/1.05 Georgia, "Times New Roman", serif; letter-spacing: -0.01em; text-wrap: balance; }
.lab-page-sub { margin: 5px 0 0; font-size: 8.5pt; color: #5b615a; }

/* Two rows of square tiles set the height; the picture of the whole room
   fills both rows, which makes it 4:3 on a Letter page. */
.lab-photos { display: grid; grid-template-columns: minmax(0, 2.72fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin: 10px 0 0; }
.lab-photo, .lab-qr { position: relative; margin: 0; min-width: 0; min-height: 0; overflow: hidden; background: #ebe8df; aspect-ratio: 1; }
.lab-photo.is-hero { grid-row: 1 / span 2; aspect-ratio: auto; }
/* A long shopping list gets landscape tiles, a quarter shorter. */
.lab-page.is-long :is(.lab-photo:not(.is-hero), .lab-qr) { aspect-ratio: 4 / 3; }
/* Out of flow, so a picture's own shape never sets the height of a row. */
.lab-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-photo figcaption { position: absolute; left: 6px; bottom: 5px; font-size: 7.5pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 6px #000, 0 0 2px #000; }
.lab-qr { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 2px; padding: 7px 7px 6px; background: #fff; box-shadow: inset 0 0 0 0.75pt #cfcabd; }
.lab-qr svg { width: 100%; height: 100%; min-height: 0; }
.lab-qr figcaption { font-size: 7pt; line-height: 1.2; text-align: center; color: #1f2d2c; }

.lab-columns { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 0.3in; margin-top: 14px; }
/* The finishes are the shorter column; the small print sits at its foot. */
.lab-side { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-width: 0; }
.lab-page h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 0.75pt solid #1f2d2c; font-size: 8pt; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.lab-total { font-size: 10pt; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.lab-finishes dl { margin: 0; }
.lab-finishes dt { margin-top: 6px; font-size: 7.5pt; letter-spacing: 0.04em; color: #5b615a; }
.lab-finishes dd { display: flex; align-items: flex-start; gap: 7px; margin: 1px 0 0; }
.lab-finishes dd strong { display: block; font-weight: 600; }
.lab-finishes dd small, .lab-what small { display: block; font-size: 7.75pt; line-height: 1.32; color: #5b615a; }
.lab-swatch { flex: none; display: inline-block; width: 11pt; height: 11pt; margin-top: 1.5pt; border-radius: 50%; box-shadow: inset 0 0 0 0.5pt #0004; }
.lab-what .lab-swatch { width: 8pt; height: 8pt; margin: 0 5px 0 0; vertical-align: -0.5pt; }
.lab-group h3 { margin: 8px 0 2px; font-size: 7.5pt; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #5b615a; }
.lab-group:first-of-type h3 { margin-top: 4px; }
.lab-item { display: grid; grid-template-columns: 9pt minmax(0, 1fr) auto; gap: 0 7px; align-items: start; padding: 3px 0; border-top: 0.5pt solid #dedacd; }
.lab-box { width: 8pt; height: 8pt; margin-top: 2pt; border: 0.75pt solid #1f2d2c; border-radius: 1.5pt; font-size: 7pt; line-height: 7pt; text-align: center; }
/* A short description shares the name's line; a long one drops below whole. */
.lab-what strong { font-weight: 600; margin-right: 6px; }
.lab-what small:not(.lab-note) { display: inline-block; max-width: 100%; vertical-align: baseline; }
.lab-what a { color: inherit; text-decoration: none; }
.lab-item.is-bought .lab-what strong { text-decoration: line-through; color: #5b615a; }
.lab-qty { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lab-qty small { display: block; font-size: 7.75pt; font-weight: 400; color: #5b615a; }
.lab-page-note { margin: 7px 0 0; font-size: 7.5pt; line-height: 1.4; color: #5b615a; }
.lab-page-foot { padding-top: 7px; border-top: 0.75pt solid #1f2d2c; font-size: 7.5pt; line-height: 1.4; color: #5b615a; }
.lab-page-foot p { margin: 0; }
.lab-link { margin-top: 3px !important; overflow-wrap: anywhere; color: #1f2d2c; }

/* Page 2: the mural print. */
.lab-page-plan { margin-top: 22px; }
.lab-page-plan[hidden] { display: none; }
.lab-plan-order-sheet { margin-top: 12px; }
.lab-plan-size-sheet { margin: 0; font: 400 20pt/1.1 Georgia, "Times New Roman", serif; }
.lab-plan-what-sheet { margin: 6px 0 0; max-width: 62ch; }
.lab-plan-hang-sheet { margin-top: 14px; }
.lab-plan-hang-sheet .lab-plan-figure { margin: 6px auto 0; break-inside: avoid; }
.lab-plan-hang-sheet .lab-plan-steps { margin-top: 10px; font-size: 8.5pt; color: #33403e; }

@media (max-width: 640px) {
  .lab-page { padding: 18px 16px; font-size: 10pt; }
  .lab-page h1 { font-size: 20pt; }
  .lab-photos { grid-template-columns: 1fr 1fr; }
  .lab-photo.is-hero { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .lab-columns { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  /* One column: finishes, the list, then the small print. */
  .lab-side { display: contents; }
  .lab-page-foot { order: 3; }
  .lab-sheet-status { display: none; }
  .lab-sheet-bar { justify-content: space-between; }
}

@media print {
  html.lab-sheet-on, html.lab-sheet-on body { height: auto !important; overflow: visible !important; background: #fff !important; }
  html.lab-sheet-on body > :not(.lab-sheet) { display: none !important; }
  html.lab-sheet-on .lab-sheet { position: static; display: block; background: none; }
  html.lab-sheet-on .lab-sheet-bar { display: none; }
  html.lab-sheet-on .lab-sheet-scroll { overflow: visible; padding: 0; }
  html.lab-sheet-on .lab-page { width: auto; margin: 0; padding: 0; box-shadow: none; }
  /* Paper is always the wide layout, whatever the screen it is printed from. */
  html.lab-sheet-on .lab-page { font-size: 9pt; }
  html.lab-sheet-on .lab-page h1 { font-size: 22pt; }
  html.lab-sheet-on .lab-photos { grid-template-columns: minmax(0, 2.72fr) minmax(0, 1fr) minmax(0, 1fr); }
  html.lab-sheet-on .lab-photo.is-hero { grid-column: auto; grid-row: 1 / span 2; aspect-ratio: auto; }
  html.lab-sheet-on .lab-columns { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 0.3in; }
  html.lab-sheet-on .lab-side { display: flex; }
  html.lab-sheet-on .lab-page-foot { order: 0; }
  .lab-item, .lab-group h3, .lab-finishes dd, .lab-page-head, .lab-photos { break-inside: avoid; }
  html.lab-sheet-on .lab-page-plan { margin-top: 0; break-before: page; }
  .lab-group h3 { break-after: avoid; }
  .lab-page, .lab-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 0.5in; }
}

/* ---- 60-papers.css ---- */
/* Wallpaper try-on: a small bar between the heading and the grid. */
.lab-on-papers .lab-paper-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: -2px 0 12px; }
.lab-on-papers .lab-paper-nav { display: flex; align-items: center; gap: 4px; }
.lab-on-papers .lab-paper-step, .lab-on-papers .lab-paper-heart { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); }
.lab-on-papers .lab-paper-step:hover, .lab-on-papers .lab-paper-heart:hover { background: var(--chip); }
.lab-on-papers .lab-paper-step:disabled, .lab-on-papers .lab-paper-heart:disabled { opacity: 0.35; cursor: default; }
.lab-on-papers .lab-paper-step svg, .lab-on-papers .lab-paper-heart svg { width: 17px; height: 17px; }
.lab-on-papers .lab-paper-heart[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lab-on-papers .lab-paper-heart[aria-pressed="true"] svg { fill: currentColor; }
.lab-on-papers .lab-paper-position { margin-left: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lab-on-papers .lab-paper-filter { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--chip); }
.lab-on-papers .lab-paper-filter button { height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.lab-on-papers .lab-paper-filter button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #0000001a; }
.lab-on-papers .lab-count { margin-left: 4px; font-size: 11px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.lab-on-papers .lab-paper-empty { margin: 0 0 4px; }
.lab-on-papers .lab-paper-about { color: var(--muted); }
/* A shortlisted paper carries a small heart on its tile. */
.lab-on-papers .tile.lab-shortlisted .tile-img::before { content: "♥"; position: absolute; z-index: 1; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%; background: #fbfaf6eb; color: #8a2f3b; font-size: 11px; line-height: 18px; text-align: center; }
@media (max-width: 420px) { .lab-on-papers .lab-paper-position { display: none; } }

/* ---- 65-plan.css ---- */
/* Plan: a seventh tab, and the wallpaper plan it opens.

   1. Seven tabs. Under the room (a phone held upright) the tabs are icons
      over short words and seven equal columns fit. Beside the room the sheet
      is 320 to 380 px wide and equal columns are narrower than the longest
      words, so there each column is as wide as its word needs.

      The tab is added by script, a moment after the page first shows. Its
      place is kept from the start (while the root has no data-lab yet, which
      is until the add-ons have started), so the other six tabs do not move
      when it arrives. If the add-on turns out to be off, they close up. */
html:not([data-lab]) .tabs, .lab-on-plan .tabs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
html:not([data-lab]) #tab-shop { grid-column: 6; }
html:not([data-lab]) #tab-details { grid-column: 7; }
@media (min-width: 761px) {
  html:not([data-lab]) .tabs, .lab-on-plan .tabs { grid-template-columns: 54fr 38fr 50fr 36fr 32fr 36fr 46fr; }
  html:not([data-lab]) .tab, .lab-on-plan .tab { padding: 0 2px; font-size: 13px; }
}
@media (max-height: 560px) and (min-width: 561px) and (orientation: landscape) {
  html:not([data-lab]) .tabs, .lab-on-plan .tabs { grid-template-columns: 54fr 38fr 50fr 36fr 32fr 36fr 46fr; }
  html:not([data-lab]) .tab, .lab-on-plan .tab { padding: 0 2px; font-size: 12px; }
}
.lab-on-plan #tab-plan { animation: lab-plan-arrive 0.9s ease both; }
@keyframes lab-plan-arrive { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lab-on-plan #tab-plan { animation: none; }
  .lab-on-plan .lab-plan > *, .lab-on-plan .lab-plan-picture { transition: none; }
}

/* 2. The plan waits for the room to say what is on the walls, then arrives
      as one piece. Until then it holds no words that would have to change. */
.lab-on-plan .lab-plan > * { opacity: 0; transition: opacity 0.9s ease; }
.lab-on-plan .lab-plan.is-ready > * { opacity: 1; }
/* Kept in the layout while it has nothing to say, so nothing moves when it does. */
.lab-on-plan .lab-plan-off { visibility: hidden; pointer-events: none; }

/* 3. What to order. */
.lab-on-plan .lab-plan-size { margin: 0; font: 400 30px/1.15 Georgia, "Times New Roman", serif; letter-spacing: -0.01em; font-variant-numeric: lining-nums; text-wrap: balance; }
.lab-on-plan .lab-plan-also { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.lab-on-plan .lab-plan-what { margin: 10px 0 0; }
/* The line about the room runs to two lines beside its button and to one
   without, so the row is two lines tall either way and nothing under it moves. */
.lab-on-plan .lab-plan-match { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; box-sizing: content-box; min-height: 38px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lab-on-plan .lab-plan-match .fine { margin: 0; }
.lab-on-plan .lab-plan-match .chip-btn { flex: none; align-self: center; }
.lab-on-plan .lab-plan:not([data-kind="picture"]) :is(.lab-plan-match, .lab-plan-hang) { display: none; }

/* 4. The drawing: the print, the picture on it, and the room laid over it.
      Lines keep their weight whatever size the drawing is shown at. */
.lab-on-plan .lab-plan-figure { margin: 0; border-radius: 10px; overflow: hidden; background: #12151b; }
.lab-on-plan .lab-plan-drawing { display: block; width: 100%; height: 100%; }
.lab-on-plan .lab-plan-picture { opacity: 0; transition: opacity 0.9s ease; }
.lab-on-plan .lab-plan-picture.is-in { opacity: 1; }
.lab-on-plan .lab-plan-dim { fill: #0b0d12; fill-opacity: 0.6; }
.lab-on-plan :is(.lab-plan-seams, .lab-plan-cuts, .lab-plan-halo, .lab-plan-line) { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lab-on-plan .lab-plan-seams { stroke: #fff; stroke-opacity: 0.38; stroke-width: 1px; stroke-dasharray: 2 3; }
.lab-on-plan .lab-plan-cuts { stroke: #fff; stroke-width: 1.5px; stroke-dasharray: 6 4; }
.lab-on-plan .lab-plan-halo { stroke: #000; stroke-opacity: 0.5; stroke-width: 4.5px; }
.lab-on-plan .lab-plan-line { stroke-width: 1.75px; }
.lab-on-plan .lab-plan-walls { stroke: #ffd166; }
.lab-on-plan .lab-plan-strip { stroke: #ff9646; }
.lab-on-plan .lab-plan-slope { stroke: #6ee2ff; }
.lab-on-plan .lab-plan-word { fill: #f4f1ea; font-family: inherit; font-weight: 700; letter-spacing: 0.08em; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: #0b0d12; stroke-opacity: 0.75; stroke-width: 0.28em; stroke-linejoin: round; }
.lab-on-plan .lab-plan-word-walls { fill: #ffd166; }
.lab-on-plan .lab-plan-word-strip { fill: #ffb27a; }
.lab-on-plan .lab-plan-word-slope { fill: #8ee9ff; }
.lab-on-plan .lab-plan-number { fill: #f4f1ea; fill-opacity: 0.85; letter-spacing: 0; font-weight: 600; }

/* 5. The steps, keyed to the drawing's colours. */
.lab-on-plan .lab-plan-steps { list-style: none; display: grid; gap: 10px; margin: 14px 0 0; padding: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.lab-on-plan .lab-plan-step { position: relative; padding-left: 22px; }
.lab-on-plan .lab-plan-step strong { font-weight: 600; color: var(--ink); }
.lab-on-plan .lab-plan-step::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 12px; height: 12px; border-radius: 3px; background: var(--mark); box-shadow: inset 0 0 0 1px #0000002b; }
.lab-on-plan .lab-plan-step-walls { --mark: #ffd166; }
.lab-on-plan .lab-plan-step-strip { --mark: #ff9646; }
.lab-on-plan .lab-plan-step-slope { --mark: #6ee2ff; }
.lab-on-plan .lab-plan-step-spare { --mark: #6b7078; }

/* 6. Your own measurements. */
.lab-on-plan .lab-plan-fields { display: grid; gap: 8px; }
.lab-on-plan .lab-plan-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.lab-on-plan .lab-plan-input { flex: none; display: flex; align-items: center; gap: 6px; }
.lab-on-plan .lab-plan-input input { width: 78px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); text-align: right; font-variant-numeric: tabular-nums; }
.lab-on-plan .lab-plan-input i { width: 14px; font-style: normal; font-size: 12.5px; color: var(--muted); }
/* Safari on a phone zooms the page for a field with type under 16 px. */
@media (pointer: coarse) { .lab-on-plan .lab-plan-input input { font-size: 16px; } }

/* 7. The size to order, under the wallpaper sliders, with a way to the plan. */
.lab-on-plan .lab-plan-hint { min-height: 19px; margin-top: 12px; }
.lab-on-plan .lab-plan-open { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }

/* ---- 68-person.css ---- */
/* Person: on the room, under the "See inside" pill and in its style. The top
   row has no room for another group on a phone: its two pills are 59 px apart
   on a stage 390 px wide and 29 px apart at 360 px. At rest there is one
   button. The three that go with the person keep a place to its left. */
.lab-on-person .lab-person-tools { position: absolute; top: 60px; right: 12px; z-index: 4; display: flex; flex-direction: row-reverse; gap: 6px; }
.lab-on-person .lab-person-tools .pill { display: flex; gap: 2px; padding: 4px; }
.lab-on-person .lab-person-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 36px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0.8; }
.lab-on-person #lab-person { padding: 0 12px 0 9px; }
.lab-on-person .lab-person-tools button:hover { opacity: 1; }
.lab-on-person .lab-person-tools button[aria-pressed="true"] { background: #f6f2ea; color: #1b1b1d; opacity: 1; }
.lab-on-person .lab-person-tools svg { width: 17px; height: 17px; flex: none; }
/* The three follow the person in: the script asks for them as the person
   starts to show, and they wait 0.9 s more. They leave at the press, ahead of
   the person. Their place is kept, so nothing moves when they come. */
.lab-on-person .lab-person-more { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
.lab-on-person .stage[data-lab-person-tools="true"] .lab-person-more { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.8s ease 0.9s, visibility 0s linear 0.9s; }
@media (prefers-reduced-motion: reduce) { .lab-on-person .stage .lab-person-more { transition: none; } }
/* They go where the stage's other tools go: an object looked at closely, and the wall screen in use. */
.lab-on-person .stage:is([data-inspecting="true"], [data-screen-interacting="true"]) .lab-person-tools { display: none !important; }
/* A 32 px button answers a finger over 44 px. */
@media (pointer: coarse) {
  .lab-on-person .lab-person-tools button { position: relative; min-width: 44px; }
  .lab-on-person .lab-person-tools button::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
}
/* The still that lies over the canvas while one arrangement gives way to the next. */
.lab-on-person .lab-person-veil { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---- 70-tour.css ---- */
/* Tour: one pill where the gesture hint normally sits, and a still picture
   that covers the room for the moment a look changes. */
.lab-on-tour .lab-tour { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: max-content; max-width: calc(100% - 20px); padding: 7px 7px 7px 16px; border-radius: 22px; font-size: 13px; line-height: 1.35; }
.lab-on-tour .lab-tour-text { min-width: 0; }
.lab-on-tour .lab-tour-go { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: #f6f2ea; color: #1b1b1d; font-size: 13px; font-weight: 600; white-space: nowrap; }
.lab-on-tour .lab-tour-go:hover { background: #fff; }
.lab-on-tour .lab-tour-go[hidden] { display: none; }
.lab-on-tour .lab-tour-veil { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: fill; opacity: 1; transition: opacity 0.8s ease; pointer-events: none; }
.lab-on-tour .lab-tour-veil.is-clear { opacity: 0; }
html.lab-touring .stage .help { display: none !important; }
@media (max-width: 760px) { .lab-on-tour .lab-tour { bottom: 58px; font-size: 12.5px; } }
/* The 32 px button answers a finger over the pill's full 44 px. */
@media (pointer: coarse) {
  .lab-on-tour .lab-tour-go { position: relative; }
  .lab-on-tour .lab-tour-go::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
}
