:root {
  --ink: #12352f;
  --ink-strong: #08251f;
  --paper: #fffaf1;
  --sage: #9fb27e;
  --flame: #ef5333;
  --line: rgba(18, 53, 47, 0.16);
  --shadow: 0 24px 70px rgba(8, 37, 31, 0.22);
}

* { box-sizing: border-box; }

/* THE hidden ATTRIBUTE ALWAYS WINS (audit round 5, A1). The UA rule
   `[hidden] { display: none }` has the lowest possible specificity, so any
   rule of our own that sets `display` beats it and the element stays on
   screen while every script and test believes it is gone. That bit three
   times: capability-gated rows (#cmSizeRow), product chips a work does not
   sell, and — unnoticed until the accessibility round — the catalogue's
   own search and world filters, which set `hidden` on 40 of 41 works while
   `.work-chip { display: grid }` kept painting all of them. One rule for
   every case beats three rules for three cases; a new component can no
   longer forget it. QA asserts the RENDERING, never the attribute. */
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 12% 4%, rgba(239, 83, 51, 0.12), transparent 26rem), linear-gradient(135deg, #fbf6ed 0%, #efe5d4 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: not-allowed; opacity: 0.55; }

/* Text for a screen reader only: it must stay in the layout (a display:none
   or hidden live region is silent), so it is clipped instead. */
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 3px solid #b8d18e; outline-offset: 2px; }
.art-canvas:focus-visible { outline-offset: -3px; }

/* One jump past 26 sidebar tab stops to the preview itself (audit round 5,
   A7). Invisible until it has focus, then it is the first thing on screen. */
.skip-link {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 40;
  padding: 10px 16px;
  color: var(--ink-strong);
  background: #b8d18e;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px;
  overflow: hidden;
  color: var(--paper);
  /* Solid dark base color first: gradient background-images can paint late
     or get dropped during sticky-scroll repaints, and the shorthand left
     background-color transparent — the cream body then showed through. */
  background-color: #0a2b25;
  background-image: radial-gradient(circle at 14% 10%, rgba(239, 83, 51, 0.24), transparent 10rem), linear-gradient(155deg, #08251f 0%, #0b302b 54%, #09241f 100%);
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 16px; padding: 2px 2px 6px; }

/* HET ECHTE LOGO (18 sep 2026). Hier stond een cirkel van CSS: een conisch
   verloop met een wit vlekje ervoor, als tijdelijke merktekening. Het logo
   draagt zijn eigen doorzichtige achtergrond, dus er komt geen vorm, geen
   achtergrond en geen schaduw omheen — de tekening IS de tekening. */
.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand h1, .topbar h2 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: 0; }

.eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 250, 241, 0.68);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel {
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 20px;
  background: rgba(255, 250, 241, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.upload-panel, .controls-panel { padding: 14px; }

.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.panel-heading.compact { margin-bottom: 12px; }
.panel-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
.panel-heading p { margin: 3px 0 0; color: rgba(255, 250, 241, 0.72); font-size: 13px; line-height: 1.4; }

.icon, .feature-icon, .toolbar-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--sage);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.icon-art { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3h18v18H3V3Zm2 2v10.59l4-4 5 5 3-3 4 4V5H5Zm0 14h14v-.59l-4-4-3 3-5-5-2 2V19Zm10-11a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z'/%3E%3C/svg%3E"); }
.icon-room, .home { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m3 11 9-8 9 8-1.35 1.5L18 11.03V21H6v-9.97L4.35 12.5 3 11Zm5 8h8v-9.75l-4-3.56-4 3.56V19Zm2-2v-5h4v5h-4Z'/%3E%3C/svg%3E"); }
.icon-adjust, .move { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 3v4h4l-5 5-5-5h4V3h2Zm-1 9 5 5h-4v4h-2v-4H7l5-5ZM3 11h4v2H3v-2Zm14 0h4v2h-4v-2Z'/%3E%3C/svg%3E"); }
.icon-light { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a7 7 0 0 1 4 12.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26A7 7 0 0 1 12 2Zm-2 14h4v-1.34l.6-.44a5 5 0 1 0-5.2 0l.6.44V16Zm-1 4h6v2H9v-2Z'/%3E%3C/svg%3E"); }
.save, .save-mini { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3h12l2 2v16H5V3Zm2 2v14h10V6.2L15.8 5H15v5H8V5H7Zm3 0v3h3V5h-3Zm-1 9h6v2H9v-2Z'/%3E%3C/svg%3E"); }
.lock { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10V8a5 5 0 0 1 10 0v2h2v11H5V10h2Zm2 0h6V8a3 3 0 0 0-6 0v2Zm-2 2v7h10v-7H7Z'/%3E%3C/svg%3E"); }
/* Undo en redo: de gewone pijl-met-boog, in dezelfde gemaskeerde stijl als de
   andere knoppen in deze balk (12 sep 2026; principe 2.45). Geen nieuwe
   visuele taal, alleen twee iconen erbij. */
.undo-mini { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 6.5 4 11l4.5 4.5V12h5.2a3.8 3.8 0 0 1 0 7.6H9v2h4.7a5.8 5.8 0 0 0 0-11.6H8.5V6.5Z'/%3E%3C/svg%3E"); }
.redo-mini { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.5 6.5 20 11l-4.5 4.5V12h-5.2a3.8 3.8 0 0 0 0 7.6H15v2h-4.7a5.8 5.8 0 0 1 0-11.6h5.2V6.5Z'/%3E%3C/svg%3E"); }

.share-mini { mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 16.1c-.76 0-1.44.3-1.96.77L8.9 12.7a3.27 3.27 0 0 0 0-1.4l7.06-4.13A2.99 2.99 0 1 0 15 5a3.3 3.3 0 0 0 .04.5L7.98 9.63a3 3 0 1 0 0 4.74l7.11 4.18c-.04.2-.06.39-.06.59A3 3 0 1 0 18 16.1Z'/%3E%3C/svg%3E"); }

/* The compact upload is the ROOM photo input — the only upload in ARA
   (artwork always comes from the shop catalog). */
.compact-upload {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(255, 250, 241, 0.32);
  background: rgba(255, 250, 241, 0.08);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.compact-upload:hover { border-color: rgba(255, 250, 241, 0.72); background: rgba(255, 250, 241, 0.13); transform: translateY(-1px); }
/* The input is the control, the label is what you see. It used to be a
   1 x 1 px focus target, so the focus ring landed on nothing (audit round 5,
   A8): now the input is clipped away entirely and its label wears the ring —
   the same ring as every other control. */
.compact-upload input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}
.compact-upload:focus-within { outline: 3px solid #b8d18e; outline-offset: 2px; }

.compact-upload, .button-grid button, .mode-action {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 14px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.12);
}

.mode-action { margin-top: 10px; font-weight: 700; }
.mode-action[aria-pressed="true"] { color: var(--ink-strong); background: #b8d18e; border-color: rgba(184, 209, 142, 0.8); }

.range-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  margin: 9px 0;
  color: rgba(255, 250, 241, 0.82);
  font-size: 13px;
}

input[type="range"] { accent-color: var(--sage); }

/* Physical size: aspect-linked cm inputs + standard-format chips. */
.cm-inputs { display: flex; align-items: center; gap: 6px; }

.cm-inputs input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 10px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.1);
  font-size: 13px;
  text-align: center;
}

.cm-times { color: rgba(255, 250, 241, 0.64); }

/* "Selected: <work>" — the title of the artwork the panels below act on.
   A slim strip rather than a full panel: it names the subject, it is not a
   control group of its own. */
.selection-summary {
  padding: 2px 4px;
  border-left: 3px solid rgba(184, 209, 142, 0.8);
  padding-left: 12px;
}
.selection-summary h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}
.selection-meta {
  margin: 4px 0 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 13px;
  line-height: 1.4;
}

.selection-price {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 250, 241, 0.92);
}

/* DE WEG TERUG NAAR DE WINKEL (18 sep 2026; principe 2.65). De enige knop in
   de zijbalk die GROEN is: hij is de uitgang, niet nog een instelling, en hij
   hoort zonder zoeken te vinden te zijn. Verder draagt hij de maten van elke
   andere knop hier (42 px hoog, dezelfde radius), want hij hoort in dezelfde
   rij thuis.

   UITGESCHAKELD IS EEN LINK ZONDER href, en dat is geen truc: een <a> zonder
   adres is voor elke browser en elke schermlezer geen link, precies wat hier
   bedoeld is. De opmaak zegt hetzelfde als `button[disabled]` hierboven — geen
   groen, geen aanwijzer, 0.55 doorzichtig — zodat de twee toestanden niet
   toevallig verschillend lezen. */
.shop-link { margin-top: 2px; }

.shop-link-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(184, 209, 142, 0.8);
  border-radius: 14px;
  color: var(--ink-strong);
  background: #b8d18e;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.shop-link-button:not([href]) {
  color: var(--paper);
  background: rgba(255, 250, 241, 0.12);
  border-color: rgba(255, 250, 241, 0.16);
  opacity: 0.55;
  cursor: not-allowed;
}

/* De reden staat ONDER de knop en alleen zolang zij geldt. Geen live region:
   de schermlezer hoort de knop zelf al als "dimmed", en twee stemmen zeggen
   alles twee keer (auditronde 5, regel 2). */
/* DE LANDKEUZE (principe 2.86): klein, onder de prijs, dezelfde vorm als de
   filterkeuzes in de catalogus — het is een instelling van de prijsregel, geen
   paneel. */
.country-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 250, 241, 0.72);
}
.country-select {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.08);
  font-size: 13px;
  max-width: 100%;
}
.country-select option { color: var(--ink-strong); background: var(--paper); }
.country-prompt { flex-basis: 100%; margin: 0; }
.selection-price:not(.is-amount) { font-weight: 500; font-size: 14px; color: rgba(255, 250, 241, 0.78); }

.shop-link-hint {
  margin: 6px 0 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 13px;
  line-height: 1.4;
}

.size-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 9px; }
.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
/* Standalone sidebar button; the flex column already provides its gap. */
.add-artwork { margin-top: 0; flex-shrink: 0; }

.side-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  margin: 9px 0;
  color: rgba(255, 250, 241, 0.82);
  font-size: 13px;
}

/* Product picker: type chips + registry-driven facet controls. */
.product-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.product-chip, .size-chip {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 10px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.1);
  font-size: 12px;
}

.product-chip[aria-checked="true"], .size-chip[aria-pressed="true"] {
  color: var(--ink-strong);
  background: #b8d18e;
  border-color: rgba(184, 209, 142, 0.8);
  font-weight: 650;
}

.swatch-row { display: flex; gap: 8px; }

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 250, 241, 0.25);
  padding: 0;
}

/* "No frame" swatch: an empty slot instead of a color. */
.swatch-none {
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--paper);
  font-size: 13px;
  line-height: 1;
}

.swatch[aria-checked="true"] {
  border-color: #b8d18e;
  box-shadow: 0 0 0 2px rgba(184, 209, 142, 0.45);
}

/* Catalog overlay (works-ui.js): opened by "+ Add artwork". The panel
   scrolls internally so the page keeps its own length, also with
   hundreds of works; the grid cells are lazy-loading thumbs + title. */
.work-catalog { position: fixed; inset: 0; z-index: 60; }

.work-catalog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 24, 20, 0.62);
  backdrop-filter: blur(2px);
}

.work-catalog-panel {
  position: absolute;
  inset: 4vh 4vw;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 20px;
  background: var(--ink-strong, #0a2b25);
  color: var(--paper);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.work-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px;
}

.work-catalog-header h2 { margin: 0; font-size: 20px; }

.work-catalog-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  border-radius: 50%;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.1);
  font-size: 22px;
  line-height: 1;
}
.work-catalog-close:hover { background: rgba(255, 250, 241, 0.2); }

.work-catalog-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 0 20px 12px;
}

.work-catalog-tools input[type="search"] {
  flex: 1 1 220px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  border-radius: 12px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.08);
  font-size: 14px;
}
.work-catalog-tools input[type="search"]::placeholder { color: rgba(255, 250, 241, 0.5); }

/* One row per filter group (subject, animal, campaign — whatever the payload
   carries). The groups wrap beside the search box on a wide panel and stack
   on a narrow one. */
.work-catalog-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.work-filter-group { display: flex; flex-wrap: wrap; gap: 8px; }

.work-filter-select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.08);
  font-size: 13px;
}
.work-filter-select option { color: var(--ink-strong); background: var(--paper); }

.work-filter {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.08);
  font-size: 13px;
}
.work-filter[aria-pressed="true"] {
  color: var(--ink-strong);
  background: #b8d18e;
  border-color: rgba(184, 209, 142, 0.8);
}

/* DE COMPACTE FILTERBALK (19 sep 2026). Op een telefoon nemen de filterrijen
   het halve eerste scherm; zodra de bezoeker gaat browsen klappen ze hiernaar
   in. De balk zegt zelf hoeveel er aanstaat, zodat inklappen niets verbergt
   wat je moet weten. Alleen zichtbaar op een smal scherm: works-ui.js haalt
   het `hidden`-attribuut eraf, want dat attribuut wint altijd (auditronde 5). */
.work-catalog-filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.08);
  font-size: 13px;
}
.work-catalog-filter-toggle[aria-expanded="false"] {
  background: rgba(255, 250, 241, 0.14);
}
.work-catalog-filter-toggle-chevron {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform 120ms ease;
}
.work-catalog-filter-toggle[aria-expanded="false"] .work-catalog-filter-toggle-chevron {
  transform: rotate(-90deg);
}
@media (prefers-reduced-motion: reduce) {
  .work-catalog-filter-toggle-chevron { transition: none; }
}

.work-catalog-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  align-content: start;
  padding: 4px 20px 20px;
}

.work-chip {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 12px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.08);
  font-size: 12px;
  text-align: left;
  align-self: start;
}
.work-chip:hover {
  border-color: rgba(184, 209, 142, 0.8);
  background: rgba(255, 250, 241, 0.16);
}

.work-chip img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.06);
}

.work-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-catalog-empty { margin: 0; padding: 0 20px 20px; color: rgba(255, 250, 241, 0.72); }

/* DE KAMERGALERIJ leent de hele overlay van de werkencatalogus en verschilt op
   twee dingen: een kamerfoto is LIGGEND (3:2, en de meegeleverde 1,6:1) en
   verdient dus bredere tegels dan een vierkant werk, en er staat één regel
   uitleg boven het raster omdat een voorgemeten kamer iets belooft. */
.room-gallery-hint {
  margin: 0;
  padding: 0 20px 12px;
  color: rgba(255, 250, 241, 0.72);
  font-size: 12px;
  max-width: 64ch;
}

#roomGalleryGrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.room-chip img { aspect-ratio: 3 / 2; }
.room-chip[aria-pressed="true"] {
  border-color: rgba(184, 209, 142, 0.9);
  background: rgba(184, 209, 142, 0.18);
}

/* De knop die de galerij opent staat boven de uploadregel en mag niet als
   tweede uploadknop lezen: vol breed, rustig, met ruimte eronder. */
.room-gallery-open { width: 100%; margin-bottom: 8px; }

/* Stacked/mobile layouts: the overlay uses the whole screen. */
@media (max-width: 900px) {
  .work-catalog-panel { inset: 0; border-radius: 0; border: none; }
  .work-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  #roomGalleryGrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 13px 4px;
  border-block: 1px solid rgba(255, 250, 241, 0.18);
}

.features article { display: grid; justify-items: center; gap: 9px; min-width: 0; text-align: center; }
.features p { margin: 0; color: rgba(255, 250, 241, 0.9); font-size: 12px; line-height: 1.28; }
.feature-icon { width: 32px; height: 32px; }

.privacy-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: auto;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 250, 241, 0.1);
  border: 1px solid rgba(255, 250, 241, 0.15);
}

.privacy-lock {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 2px solid var(--sage);
  border-radius: 10px;
  position: relative;
}

.privacy-lock::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -13px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--sage);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.privacy-card p {
  margin: 0;
  color: rgba(255, 250, 241, 0.86);
  font-size: 14px;
  line-height: 1.35;
}

.privacy-card strong {
  display: block;
  color: #b8d18e;
  font-weight: 650;
}

/* Auto rows + align-content: start — the stage now states its own height
   (see .room-stage), so the card hugs it instead of stretching to the
   full column and leaving the photo to fill whatever was left. */
.workspace { display: grid; grid-template-rows: auto auto; align-content: start; gap: 18px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 4px 2px; }
.topbar .eyebrow { color: rgba(18, 53, 47, 0.58); }
.topbar h2 { color: var(--ink-strong); font-size: 30px; }
.topbar-actions { display: flex; gap: 10px; }
.topbar-actions button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 250, 241, 0.74); box-shadow: 0 10px 30px rgba(18, 53, 47, 0.1); }
.toolbar-icon { width: 18px; height: 18px; background: var(--ink); }

/* Een stapel die leeg is, is een knop die uit staat — te zien en te horen
   (het disabled-attribuut haalt hem uit de tabvolgorde). */
.topbar-actions button[disabled] { opacity: 0.35; cursor: default; }

.preview-card {
  min-height: 0;
  padding: clamp(10px, 1.5vw, 20px);
  border-radius: 30px;
  background: rgba(255, 250, 241, 0.62);
  border: 1px solid rgba(18, 53, 47, 0.09);
  box-shadow: 0 26px 80px rgba(18, 53, 47, 0.18);
}

/* THE BOX COMES FROM THE LAYOUT, THE PHOTO COMES INTO THE BOX (23 aug 2026).
   The stage used to be `height: 100%` inside a full-height grid row, so its
   SHAPE was whatever the window had left over: 535 x 1203 (0.44:1 — a
   letterbox standing on its end) on an iPad Pro in portrait, 2062 x 1290 on
   an ultrawide, and on the tall tablets it ran past the bottom of the
   window. Every layer reads stageRect, so that also made the visible piece
   of WALL a function of the browser window: the same 250 cm of wall height
   spanned 110 cm of width on one device and 400 cm on another.

   So the box is dictated here and the photo is cropped into it (which it
   always was — roomCoverDest uses coverRect and no whole photo has ever
   been visible). Three constants, and they are all in the four lines below:
   target 3:2, never flatter than 2:1, never taller than 72% of the window
   (with the topbar above it the preview then always fits).

   `max-width` is exactly twice `max-height`, and that is what caps the
   ratio at 2:1: the width is only released once the height ceiling bites,
   so a wide screen keeps a wide stage instead of shrinking back to 3:2.
   Stacked layouts set their own height below; qa/run.js walks the device
   ladder and asserts both the band and that the stage fits the window. */
.room-stage {
  position: relative;
  width: 100%;
  margin-inline: auto;
  aspect-ratio: 3 / 2;
  min-height: 360px;
  max-height: 72vh;
  max-width: 144vh;
  overflow: hidden;
  border-radius: 24px;
  background: #dfd0bb;
  touch-action: none;
}

/* GEEN WACHTTIJD OP EEN TIK (15 sep 2026; principe 2.56). iOS Safari houdt
   een aanraking op een element dat GEEN `touch-action` verklaart ongeveer 300
   ms vast om te zien of er een tweede tik komt (dubbeltik = inzoomen). Op het
   toneel bestond dat probleem al niet — daar staat `touch-action: none` — maar
   alles ERONDER verklaarde niets, en dat is precies waar de eigenaar de
   vertraging voelde: knoppen, chips, stalen en de schuiven. `manipulation`
   zegt "hier wordt niet dubbelgetikt om te zoomen": de tik komt meteen door,
   en scrollen en knijpen op de PAGINA blijven gewoon werken (dat is het
   verschil met `none`, dat hier verkeerd zou zijn).
   Gemeten in de suite als een echte tik, niet als een aanname. */
button,
input,
select,
textarea,
label,
summary,
a {
  touch-action: manipulation;
}

/* DE ZOOMLAAG VOOR DE OVERLAYS (principe 2.54/2.55). De canvassen liggen
   hierbuiten en TEKENEN de zoom zelf — een uitvergroot doek is een zacht doek.
   Wat hier wel in zit is DOM (de meetlijn, de controls, de uitnodiging), en
   die verplaatst deze transform mee zonder één pixel kwaliteitsverlies.
   Zonder zoom staat er `none`, dus dan verandert er niets. Hij vangt zelf geen
   aanwijzer: dat regelen de lagen erin, precies zoals hiervoor. */
.stage-view {
  position: absolute;
  inset: 0;
  z-index: 3;
  transform-origin: 0 0;
  pointer-events: none;
}

/* DE HELE FOTO, NIET EEN UITSNEDE (eigenaarsbesluit, 22 sep 2026). Stond hier
   op `cover`, in de pas met de mapping in js/geometry.js. Die is nu `contain`
   (`roomFitRect`) omdat een eigen kamerfoto volledig te zien moet zijn; deze
   regel loopt mee, anders zou de <img> eronder een ANDERE uitsnede tonen dan
   de kamerlaag erboven. De ruimte die overblijft is de achtergrondkleur van
   .room-stage. */
.room-stage img { width: 100%; height: 100%; display: block; object-fit: contain; }

/* The room photo layer, drawn by js/room.js on top of the <img>. NOTHING
   may sit between this canvas and the layers above it: a tint here and
   not there is exactly what made every masked area show up as a lighter
   rectangle around the artwork (the old .room-stage::after wash — removed
   15 aug 2026, see js/room.js). Effects belong in the renderers, where
   the export sees them too. */
.room-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.shadow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.art-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
  cursor: grab;
}

.art-canvas:active { cursor: grabbing; }

.foreground-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* DE UITNODIGING OP DE LEGE MUUR (15 sep 2026; principe 2.51). Subtiel en
   niet dominant: één pil midden op de muur, in dezelfde taal als de app zelf,
   met een lichte waas eronder zodat hij op elke kamerfoto leesbaar blijft —
   zonder het beeld te dekken. De CONTAINER vangt geen aanwijzer, alleen de
   knop: de rest van de muur blijft klikbaar als muur. De meetmarkers
   (.scale-overlay, z-index 5) liggen erboven, dus meten blijft meten. Hij
   bestaat alleen zolang er niets hangt; het verdwijnen doet js/ui.js met het
   `hidden`-attribuut, dat hier altijd wint (regel bovenaan dit bestand). */
/* DE WACHTMELDING IN HET FOTOVELD (principe 2.63). Gecentreerd over de foto,
   met de foto zichtbaar erachter: een pil met een doorschijnende achtergrond,
   niet een deken over de preview. Vangt geen aanwijzer — er valt niets aan te
   klikken en de muur eronder moet gewoon de muur blijven. */
.stage-status {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding: 16px;
}

.stage-status-text {
  max-width: min(86%, 420px);
  padding: 12px 20px;
  border: 1px solid rgba(255, 250, 241, 0.34);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(8, 37, 31, 0.62);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 34px rgba(8, 37, 31, 0.3);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

/* Op een smal scherm mag hij kleiner, maar nooit zo klein dat hij niet meer
   te lezen is. */
@media (max-width: 640px) {
  .stage-status-text {
    max-width: 90%;
    padding: 10px 16px;
    font-size: 14px;
  }
}

.empty-invite {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.empty-invite-button {
  padding: 11px 20px;
  border: 1px solid rgba(255, 250, 241, 0.5);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(8, 37, 31, 0.5);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(8, 37, 31, 0.22);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background 150ms ease, transform 150ms ease;
}

.empty-invite-button:hover { background: rgba(8, 37, 31, 0.68); transform: scale(1.03); }

@media (max-width: 640px) { .empty-invite-button { padding: 10px 16px; font-size: 13px; } }

@media (prefers-reduced-motion: reduce) { .empty-invite-button { transition: none; } }

/* A session-long failure, stated in the panel it belongs to (audit round 7,
   F3). Not a toast: a toast is for what just happened, this is for what stays
   broken until the room changes. */
.panel-alert {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(239, 83, 51, 0.45);
  background: rgba(239, 83, 51, 0.14);
  color: rgba(255, 250, 241, 0.92);
  font-size: 13px;
  line-height: 1.4;
}

.panel-hint { margin: 8px 0 0; color: rgba(255, 250, 241, 0.72); font-size: 13px; line-height: 1.4; }

.button-grid button[aria-pressed="true"] {
  color: var(--ink-strong);
  background: #b8d18e;
  border-color: rgba(184, 209, 142, 0.8);
}

.artwork-controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

/* DE DRIE CONTROLS: ZICHTBAAR MEE MET HET WERK, RAAKVLAK MEE MET DE VINGER
   (12 sep 2026; principe 2.42). De twee maten worden per werk door ui.js
   gezet (placeHandles) en staan met opzet los van elkaar: de cirkel hoeft een
   tekening van 10 cm niet te overschreeuwen, maar een vinger heeft 44 px
   nodig. De standaardwaarden hieronder zijn precies wat er altijd stond
   (28 px cirkel, 46 px raakvlak), zodat een control zonder variabelen er
   hetzelfde uitziet als voorheen. */
.corner {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--handle-size, 28px);
  height: var(--handle-size, 28px);
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 250, 241, 0.95);
  box-shadow: 0 8px 18px rgba(8, 37, 31, 0.18);
  font-size: calc(var(--handle-size, 28px) * 0.58);
  line-height: 1;
  z-index: 3;
  transition: background 150ms ease, transform 150ms ease;
  pointer-events: auto;
}

/* Invisible padding that enlarges the touch target to ~44px. De inset is
   negatief: (zichtbaar - raakvlak) / 2, dus met de standaardwaarden -9px,
   precies de waarde die hier stond. */
.corner::before {
  content: "";
  position: absolute;
  inset: calc((var(--handle-size, 28px) - var(--handle-touch, 46px)) / 2);
  border-radius: 50%;
}

.corner:hover { background: #fffaf1; transform: scale(1.08); }
.remove { cursor: pointer; }
.rotate { cursor: grab; }
.resize { cursor: nwse-resize; }

/* De hoek tijdens het draaien: compact, buiten het werk, en hij vangt geen
   aanwijzer — de hendel eronder moet gewoon door blijven werken. Alleen
   zichtbaar zolang er gedraaid wordt (js/ui.js showRotation). */
.rotate-readout {
  position: absolute;
  margin: 0;
  padding: 3px 7px;
  border-radius: 8px;
  color: var(--paper);
  background: rgba(8, 37, 31, 0.88);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}

/* DE PERSPECTIEFPIN IS EEN GREEP, EN LIGT BUITEN HET WERK (15 sep 2026;
   principe 2.53). Tot vandaag stond hij met zijn MIDDEN op de hoek: 25 px
   van zijn raakvlak lag over het werk, hij dekte precies de coördinaat af
   waar het om gaat, en op een klein werk overlapten de vier raakvlakken
   elkaar volledig. Nu volgt hij dezelfde twee maten als de andere controls
   (principe 2.42): de zichtbare cirkel krimpt mee met het werk, het raakvlak
   van een vinger krimpt NOOIT, en de afstand naar buiten volgt uit die twee.
   ui.js zet beide maten per werk. De standaardwaarden zijn precies wat er
   stond, zodat een pin zonder variabelen er hetzelfde uitziet. */
.pin-corner {
  position: absolute;
  width: var(--pin-size, 24px);
  height: var(--pin-size, 24px);
  border: 3px solid #fffaf1;
  border-radius: 50%;
  background: #b8d18e;
  box-shadow: 0 8px 18px rgba(8, 37, 31, 0.28);
  cursor: move;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  z-index: 4;
}

/* Invisible padding that enlarges the touch target to a finger's 44px. */
.pin-corner::before {
  content: "";
  position: absolute;
  inset: calc((var(--pin-size, 24px) - var(--pin-touch, 50px)) / 2);
  border-radius: 50%;
}

.pin-corner::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: var(--ink);
}

/* HET KRUISJE OP DE HOEK ZELF: open midden, dus de pixel die je zet blijft
   vrij (principe 2.36, hier opnieuw). Wit met een donkere rand eromheen, want
   hij moet op elke kamerfoto te zien zijn. Vangt geen aanwijzer. */
.pin-mark {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
  /* De donkere rand volgt de GETEKENDE pixels, niet het vierkant eromheen —
     anders loopt er een streep dwars door het open midden. */
  filter: drop-shadow(0 0 1.5px rgba(8, 37, 31, 0.9));
}

.pin-mark::before,
.pin-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
}

/* Twee armen met een gat van 6 px in het midden: de coördinaat blijft vrij. */
.pin-mark::before {
  width: 18px;
  height: 1.5px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, #fffaf1 0 6px, transparent 6px 12px, #fffaf1 12px 18px);
}

.pin-mark::after {
  width: 1.5px;
  height: 18px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #fffaf1 0 6px, transparent 6px 12px, #fffaf1 12px 18px);
}

body:not(.perspective-mode) .pin-corner,
body:not(.perspective-mode) .pin-mark { display: none; }
body.perspective-mode .normal-corner { display: none; }

/* --- your rooms (10 sep 2026) --------------------------------------------- */

.room-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.room-item { position: relative; }

.room-choice {
  display: block;
  width: 74px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: rgba(255, 250, 241, 0.08);
  color: rgba(255, 250, 241, 0.7);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
}

.room-choice img,
.room-thumb-blank {
  display: block;
  width: 100%;
  height: 48px;
  object-fit: cover;
  background: rgba(255, 250, 241, 0.14);
}

.room-caption {
  display: block;
  padding: 3px 4px 4px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-choice:hover { border-color: rgba(255, 250, 241, 0.4); }

/* Welke kamer aan de muur hangt, is te zien en niet te raden. */
.room-choice[aria-pressed="true"] {
  border-color: #b8d18e;
  color: rgba(255, 250, 241, 0.95);
  background: rgba(184, 209, 142, 0.18);
}

.room-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 250, 241, 0.28);
  border-radius: 50%;
  background: var(--ink-strong);
  color: var(--paper);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.room-remove:hover { background: #7d3b32; }

/* --- de schaal van de kamer (10 sep 2026) --------------------------------- */

.room-scale { margin-top: 12px; }

.room-scale-state {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 250, 241, 0.68);
}

/* Een meting is iets anders dan een schatting, en dat mag je zien. */
.room-scale-state[data-state="measured"] { color: rgba(184, 209, 142, 0.95); }

.ghost-button {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 14px;
  color: var(--paper);
  background: rgba(255, 250, 241, 0.08);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ghost-button:hover { background: rgba(255, 250, 241, 0.14); }
.ghost-button[aria-pressed="true"] { color: var(--ink-strong); background: #b8d18e; }

.room-scale-form { margin-top: 10px; }

.room-scale-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 250, 241, 0.6);
}

.room-scale-field {
  display: block;
  font-size: 12px;
  color: rgba(255, 250, 241, 0.72);
}

/* De eenheid staat IN het veld (principe 2.88): "250" alleen is te ambigu. */
.room-scale-field .unit-field {
  position: relative;
  display: block;
  margin-top: 4px;
}

.room-scale-field .unit-suffix {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--paper);
  pointer-events: none;
}

.room-scale-field input {
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
  padding: 0 40px 0 10px;
  border: 1px solid rgba(255, 250, 241, 0.18);
  border-radius: 12px;
  color: var(--paper);
  background: rgba(8, 37, 31, 0.5);
  font: inherit;
}

.room-scale-field .unit-field input { margin-top: 0; }

/* De meetlijn ligt over de kamer, onder de werkhandvatten: hij wijst naar de
   MUUR en niet naar iets wat eraan hangt. */
.scale-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* DE MEETLIJN IS HET MEETINSTRUMENT (12 sep 2026, tweede ronde). Hij loopt
   van het EXACTE MIDDEN van kruisje 1 naar het exacte midden van kruisje 2 en
   stelt daarmee precies de afstand voor waarmee ARA rekent — niets meer.
   Daarom is hij dun en gestippeld (een balk leest als decoratie, een stippel-
   lijn als een maat), en draagt hij de kleur van de KRUISJES en niet die van
   de genummerde cirkels: het instrument is wit, de labels zijn groen. De
   `translateY(-50%)` zet het hart van de lijn op de coördinaat; zonder die
   halve pixelcorrectie lag de lijn er één pixel onder, en dat is nu juist het
   pixelgetal waar deze tool over gaat. De rotatie draait om datzelfde punt
   (transform-origin 0 50%), dus het andere uiteinde landt op de tweede
   coördinaat en niet ernaast. */
.scale-line {
  position: absolute;
  height: 1px;
  transform-origin: 0 50%;
  background: repeating-linear-gradient(90deg, #fffaf1 0 3px, transparent 3px 7px);
  filter: drop-shadow(0 0 1.5px rgba(8, 37, 31, 0.9));
}

/* DE MARKER: EEN KRUISJE OP HET PUNT, HET NUMMER ERNAAST (12 sep 2026).
   Hiervoor was de marker een gevulde cirkel van 26 px ÓP het meetpunt, en die
   dekte precies af wat je wilde meten — bij een plint van 7 cm liggen de twee
   punten een kleine twintig pixels van elkaar, dus de referentie zat volledig
   onder de twee cirkels. Nu is de knop een ONZICHTBAAR raakdoel van 44 px
   rond het punt (ruim genoeg voor een vinger), ligt er een kruisje met een
   open midden op het punt zelf, en staat de genummerde cirkel schuin ernaast.
   Het punt dat je ziet is precies de coördinaat waarmee ARA rekent: de knop
   staat met zijn MIDDEN op die coördinaat (translate -50%/-50%). */
.scale-marker {
  position: absolute;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-strong);
  font: inherit;
  cursor: move;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.scale-marker:focus-visible {
  outline: 2px solid #b8d18e;
  outline-offset: -3px;
}

/* Het kruisje. Twee lijnen met een GAT in het midden, zodat de pixel waar het
   om gaat vrij blijft; de slagschaduw houdt hem leesbaar op een lichte én een
   donkere wand. */
.scale-cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 1.5px rgba(8, 37, 31, 0.9));
}

.scale-cross::before,
.scale-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
}

.scale-cross::before {
  width: 20px;
  height: 1.5px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, #fffaf1 0 7px, transparent 7px 13px, #fffaf1 13px 20px);
}

.scale-cross::after {
  width: 1.5px;
  height: 20px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #fffaf1 0 7px, transparent 7px 13px, #fffaf1 13px 20px);
}

/* HET NUMMER IS EEN LABEL EN GEEN MEETSTUK (12 sep 2026, tweede ronde, na de
   handmatige test van de eigenaar). Het stond schuin naast het punt MET een
   streepje ernaartoe, en die twee samen lazen als een knik in de meetlijn: de
   eerste vraag van de eigenaar was of ARA van cirkel 1 naar cirkel 2 meet of
   langs die getekende stukjes. Het streepje is daarom weg, en de cirkel zweeft
   los naast zijn eigen kruisje — BUITEN het gemeten stuk, in het verlengde van
   de meetas weg van de andere marker (ui.js placeBadge). De gestippelde lijn
   bestaat dan alleen nog tussen de twee kruisjes, en dat is precies wat ARA
   meet. Hij vangt geen aanwijzer — het raakdoel is de knop rond het punt. */
.scale-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid #fffaf1;
  border-radius: 50%;
  background: #b8d18e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(8, 37, 31, 0.3);
  pointer-events: none;
}

/* WAAR de cirkel staat wordt per marker gezet (ui.js placeBadge): in het
   verlengde van de meetas, weg van de andere marker, en uitwijkend zodra hij
   tegen de rand van het toneel of tegen de andere cirkel aan zou komen. */
.scale-badge {
  transform: translate(-50%, -50%) translate(var(--badge-x, -22px), var(--badge-y, -22px));
}

.notice {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(90vw, 540px);
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 250, 241, 0.18);
  background: var(--ink-strong);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow);
}


.boot-error {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(92vw, 620px);
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid rgba(239, 83, 51, 0.5);
  background: #fff4ef;
  color: #7c2413;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: var(--shadow);
}

.boot-error code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(239, 83, 51, 0.12);
  font-size: 13px;
}

/* On wide screens the sidebar can outgrow the viewport (light & shadow
   controls); let it scroll internally while the preview stays put. */
@media (min-width: 1101px) {
  .sidebar {
    position: sticky;
    top: 22px;
    max-height: calc(100vh - 44px);
    overflow-y: auto;
  }
}

@media (max-width: 1100px) {
  /* The preview is ARA's core. On stacked layouts it comes first AND stays
     pinned while the controls scroll underneath, so every slider change is
     visible live. Flex (not grid) so the sticky preview can travel along the
     full page height. */
  /* Keep scroll targets (keyboard focus, scrollIntoView) below the sticky
     preview instead of hidden underneath it. */
  html { scroll-padding-top: calc(min(46vh, 560px) + 84px); }
  .app-shell { display: flex; flex-direction: column; gap: 14px; padding: 14px; }
  .sidebar { border-radius: 22px; }
  .workspace {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 6px;
    padding: 10px 0 12px;
    background: linear-gradient(180deg, #faf5ec 0%, #f6eedf 88%, rgba(246, 238, 223, 0) 100%);
  }
  .topbar { padding: 0 4px; }
  .topbar h2 { font-size: 20px; }
  .topbar .eyebrow { margin-bottom: 2px; }
  .topbar-actions button { width: 38px; height: 38px; }
  /* Stacked keeps its own height (phones were already right); the
     desktop box constants are explicitly released so they cannot
     clamp it on a short, wide tablet. */
  .room-stage { height: min(46vh, 560px); min-height: 300px; max-height: none; max-width: none; aspect-ratio: auto; }
  /* Keep the marketing tiles, but out of the control flow: they move to the
     very end of the sidebar (after the privacy card) on stacked layouts. */
  .features { order: 10; border-block: 0; border-top: 1px solid rgba(255, 250, 241, 0.18); padding-top: 16px; }
}

/* EEN LAAG SCHERM HOUDT ZIJN BEDIENING (9 okt 2026; principe 2.89).
   Het vastgezette voorbeeld hierboven is minstens 300 px toneel plus kop en
   marges, ruim 390 px. Op een scherm dat lager is — een telefoon dwars, een
   laag venster — bedekte het daarmee HET HELE SCHERM: elke bediening schoof
   eronder, een tik op een maatknop landde op het werk, en omdat het toneel
   `touch-action: none` heeft, scrolde vegen over het voorbeeld ook niet.
   Gemeten op 844 x 390: voorbeeld 395 px hoog, geen enkele maatknop te raken.
   Onder 600 px hoogte staat het voorbeeld daarom gewoon in de pagina: eerst
   de kamer, dan de bediening, en alles is te bereiken. Daarboven blijft
   minstens ruim een derde van het scherm voor de bediening (QA meet het). */
@media (max-width: 1100px) and (max-height: 600px) {
  html { scroll-padding-top: 0; }
  .workspace { position: relative; z-index: auto; }
  .room-stage { height: min(78vh, 560px); min-height: 200px; }
}

@media (max-width: 620px) {
  .sidebar { padding: 16px; }
  .brand h1 { font-size: 22px; }
  .features { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .preview-card { padding: 8px; border-radius: 22px; }
  .room-stage { border-radius: 18px; }
}

/* ---------------------------------------------------------------------------
   USER PREFERENCES (audit round 5, A6). None of these existed. The app has no
   animations and two transitions, so the motion query is small — the one that
   really matters is forced-colors, because the frame swatches carry their
   meaning in colour and Windows' high-contrast mode replaces every colour.
   --------------------------------------------------------------------------- */

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

@media (prefers-contrast: more) {
  .panel, .compact-upload, .button-grid button, .mode-action, .product-chip,
  .size-chip, .swatch, .work-chip, .empty-invite-button {
    border-color: var(--paper);
  }
  /* Op een kamerfoto is een halftransparante pil precies wat hier niet mag:
     in hoog contrast staat hij dicht. */
  .empty-invite-button { background: var(--ink-strong); backdrop-filter: none; }
  .panel-hint, .privacy-card p, .side-row-label { color: var(--paper); }
  :focus-visible { outline-width: 4px; }
}

@media (forced-colors: active) {
  /* A swatch IS its colour: without this the row becomes identical boxes and
     the choice can only be made by reading the labels. */
  .swatch { forced-color-adjust: none; border: 1px solid ButtonText; }
  .swatch[aria-checked="true"] { outline: 3px solid Highlight; outline-offset: 2px; }
  /* State without relying on a background colour the mode overrides. */
  .size-chip[aria-pressed="true"], .product-chip[aria-checked="true"],
  .work-filter[aria-pressed="true"], .mode-action[aria-pressed="true"] {
    outline: 3px solid Highlight;
    outline-offset: -3px;
  }
}
