/* Hero lab demo v3. Layers on top of the live site's styles.css. */

.hero--lab { padding-block: 2rem 3rem; }
.hero--lab .wrap { max-width: 1320px; }

.lab-hero {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
  grid-template-areas: "head lab" "rest lab";
  gap: 1.25rem 2.75rem;
  align-items: start;
}
.lab-hero__head { grid-area: head; min-width: 0; }
.lab-hero__rest { grid-area: rest; min-width: 0; }
.lab { grid-area: lab; min-width: 0; }
.hero--lab h1 { font-size: clamp(2rem, 3.3vw, 3rem); margin-bottom: 0; }
.lab-hero__lede { margin-top: 2.5rem; }

/* ---------- Tabs ---------- */
.lab__tabs { display: flex; gap: 0.25rem; margin-bottom: 0.6rem; overflow-x: auto; scrollbar-width: none; }
.lab__tab {
  flex: 0 0 auto;
  font: 600 0.85rem/1 var(--font-sans);
  color: var(--c-cream);
  background: transparent;
  border: 1px solid rgba(245, 241, 232, .18);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.lab__tab:hover { border-color: var(--c-accent-2); }
.lab__tab.is-active { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-bg); }

/* ---------- Stage ---------- */
.lab__stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: #1c2a22;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
  touch-action: none;
  user-select: none;
}
.lab__poster, .lab__canvas, .lab__labels { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab__poster { object-fit: cover; }
/* P107: the poster reads as a game before any script runs: a Play button in the middle, one line on what it is. The whole poster is the button's target. */
.lab__splash { position: absolute; inset: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8rem; padding: 1rem; cursor: pointer; text-align: center;
  background: radial-gradient(ellipse 46% 40% at 50% 50%, rgba(10, 18, 14, .5), rgba(10, 18, 14, 0) 100%); transition: opacity .6s ease; }
.lab__splash.is-gone { opacity: 0; pointer-events: none; }
.lab__splash[hidden] { display: none; }
.lab__splash:not([hidden]) ~ .lab__pad { visibility: hidden; } /* the phone walk pad waits for the game */
.lab:has(.lab__splash:not([hidden])) .lab__pad { visibility: hidden; } /* also once the game has moved the pad into its action row */
.lab:has(.lab__splash:not([hidden]):not(.is-gone)) .lab__start { visibility: hidden; } /* one Play button at a time: the start menu shows once the poster's button steps aside */
.lab__play { display: inline-flex; align-items: center; gap: 0.85rem; min-height: 56px; padding: 0.55rem 1.6rem 0.55rem 0.55rem; border: 0; border-radius: 999px; cursor: pointer;
  background: #e07b39; color: #1a120c; font: 800 clamp(1.05rem, 2.2vw, 1.45rem)/1.1 var(--font-sans, system-ui, sans-serif); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: transform .15s ease, background .15s ease; }
.lab__play-disc { display: grid; place-items: center; width: clamp(48px, 6vw, 64px); aspect-ratio: 1; border-radius: 50%; background: #1a120c; flex: none; }
.lab__play-disc svg { width: 52%; height: 52%; fill: #f3d27a; margin-left: 8%; }
.lab__splash:hover .lab__play, .lab__play:hover { background: #ee8c4a; transform: scale(1.05); }
.lab__play:focus-visible { outline: 3px solid #f3d27a; outline-offset: 4px; transform: scale(1.05); }
.lab__splash-what { margin: 0; max-width: 40rem; padding: 0.4rem 0.9rem; border-radius: 12px; background: rgba(10, 18, 14, .72); color: #f3ecdc; font: 600 clamp(0.85rem, 1.5vw, 1rem)/1.35 var(--font-sans, system-ui, sans-serif); }
.lab__splash-load { display: grid; gap: 0.4rem; justify-items: center; width: min(320px, 80%); color: #f3ecdc; font: 600 0.9rem/1.2 var(--font-sans, system-ui, sans-serif); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.lab__splash-load[hidden] { display: none; }
.lab__splash-keys { width: max-content; max-width: min(92vw, 34rem); justify-self: center; font-weight: 500; font-size: 0.82rem; opacity: .92; text-align: center; } /* P140: the controls, under the loading bar */
.lab__splash-load i { display: block; width: 100%; height: 8px; border-radius: 99px; background: rgba(10, 18, 14, .7); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(243, 236, 220, .35); }
.lab__splash-load b { display: block; height: 100%; width: var(--p, 0%); background: #f3d27a; transition: width .3s ease; }
.lab__splash.is-loading .lab__play { cursor: progress; }
.lab__splash.is-loading .lab__splash-what { display: none; }
@media (max-width: 600px) { .lab__poster { object-position: 70% 50%; } /* a tall phone stage keeps the painted bay, the wet edge and the spray gun */ .lab__splash { gap: 0.6rem; } .lab__play { min-height: 52px; padding-right: 1.2rem; } .lab__splash-what { max-width: 19rem; font-size: 0.82rem; } }
@media (prefers-reduced-motion: reduce) { .lab__play, .lab__splash { transition: none; } .lab__splash:hover .lab__play, .lab__play:hover, .lab__play:focus-visible { transform: none; } }
.lab__canvas { opacity: 0; transition: opacity .7s ease; }
.lab.is-live .lab__canvas { opacity: 1; }
.lab[data-mode="spray"] .lab__canvas { cursor: crosshair; }
/* P103: hands free or Tidy shows the arrow; over a thing you can move an open hand, a closed hand while you hold it (the same drawn hand in every browser, the browser's own if it cannot load) */
.lab .lab__canvas[data-cur="free"] { cursor: default; }
.lab .lab__canvas[data-cur="open"] { cursor: url("icons/hand-open.svg") 16 16, grab; }
.lab .lab__canvas[data-cur="shut"] { cursor: url("icons/hand-shut.svg") 16 17, grabbing; }
.lab__labels { pointer-events: none; }

.lab__badge {
  position: absolute; left: 0.75rem; top: 0.75rem; margin: 0;
  font: 600 0.72rem/1 var(--font-sans); letter-spacing: .04em;
  color: var(--c-cream); background: rgba(15, 29, 22, .7);
  padding: 0.45rem 0.65rem; border-radius: 999px;
  pointer-events: none;
}

.lab__label3d {
  font: 700 0.72rem/1 var(--font-sans);
  color: var(--c-bg); background: var(--c-cream);
  padding: 0.38rem 0.55rem; border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  white-space: nowrap;
  transition: background .2s, color .2s, transform .2s;
}
.lab__label3d.is-hot { background: var(--c-accent); color: var(--c-bg); }

.lab__hud {
  position: absolute; right: 0.75rem; top: 0.75rem;
  display: grid; gap: 0.25rem;
  font: 500 0.75rem/1.2 var(--font-sans); color: var(--c-cream);
  background: rgba(15, 29, 22, .78); border-radius: 6px;
  padding: 0.55rem 0.7rem;
  pointer-events: none;
}
.lab__hud b { color: var(--c-accent-2); font-weight: 700; }
.lab__cup { display: inline-block; vertical-align: middle; width: 54px; height: 7px; border-radius: 4px; background: rgba(245, 241, 232, .2); overflow: hidden; }
.lab__cup-fill { display: block; height: 100%; width: 100%; background: var(--c-accent); transform-origin: left; }

.lab__hint {
  position: absolute; left: 50%; bottom: 0.9rem; transform: translateX(-50%); margin: 0;
  font: 600 0.8rem/1.2 var(--font-sans); color: var(--c-bg); background: var(--c-accent-2);
  padding: 0.5rem 0.85rem; border-radius: 999px; white-space: nowrap;
  pointer-events: none;
}
.lab__refill { position: absolute; left: 50%; bottom: 3.2rem; transform: translateX(-50%); }

.lab__done {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, 92%); max-height: 94%; overflow-y: auto;
  background: rgba(15, 29, 22, .92); color: var(--c-cream);
  border-radius: 8px; border-left: 4px solid var(--c-accent);
  padding: 1rem 1.15rem;
}
.lab__done-title { margin: 0 0 0.6rem; font-weight: 800; font-size: 1.1rem; }
.lab__done-stats { margin: 0 0 0.85rem; display: grid; gap: 0.3rem; }
.lab__done-stats div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; }
.lab__done-stats dt { color: rgba(245, 241, 232, .75); }
.lab__done-stats dd { margin: 0; font-weight: 700; color: var(--c-accent-2); }
.lab__done-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.lab__ghost { color: var(--c-cream); border-color: rgba(245, 241, 232, .4); background: transparent; }
.lab__ghost:hover { background: var(--c-cream); color: var(--c-bg); }

.lab__caption { margin: 0.35rem 0 0.6rem; text-align: right; font-size: 0.72rem; font-style: italic; color: rgba(245, 241, 232, .55); }

/* ---------- Controls ---------- */
.lab__panel[hidden] { display: none; }
.lab__row { display: flex; align-items: center; gap: 0.6rem 1rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.lab__label { font: 700 0.72rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-2); white-space: nowrap; }
.lab__label output { color: var(--c-cream); font-size: 0.95rem; letter-spacing: 0; margin-left: 0.3rem; }
.lab__range { flex: 1 1 180px; accent-color: var(--c-accent); min-width: 140px; }

.lab__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lab__chip, .lab__seg button {
  font: 600 0.8rem/1 var(--font-sans); color: var(--c-cream);
  background: var(--c-bg-alt); border: 1px solid rgba(245, 241, 232, .14);
  border-radius: 999px; padding: 0.5rem 0.8rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.lab__chip i { width: 0.85rem; height: 0.85rem; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.lab__chip.is-active, .lab__seg button.is-active { border-color: var(--c-accent); background: rgba(217, 119, 66, .18); }
.lab__seg { display: inline-flex; gap: 0.25rem; }

.lab__parts { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; counter-reset: part; }
.lab__parts li {
  counter-increment: part;
  font: 600 0.8rem/1 var(--font-sans); color: var(--c-cream);
  background: var(--c-bg-alt); border: 1px solid rgba(245, 241, 232, .14);
  border-radius: 999px; padding: 0.5rem 0.75rem; cursor: pointer;
}
.lab__parts li::before { content: counter(part) ". "; color: var(--c-accent-2); }
.lab__parts li.is-hot { border-color: var(--c-accent); background: rgba(217, 119, 66, .18); }

.lab__sprayers { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); grid-template-rows: repeat(4, auto); column-gap: 0.5rem; row-gap: 0; overflow-x: auto; padding: 0.5rem 0 0.35rem; margin-bottom: 0.4rem; scroll-snap-type: x proximity; }
.lab__sprayer {
  flex: 1 1 0; min-width: 112px; scroll-snap-align: start;
  display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; /* P86: picture, name, price and the owned or locked note line up across the cards */
  position: relative; text-align: left;
  font: 500 0.72rem/1.3 var(--font-sans); color: var(--c-cream);
  background: var(--c-bg-alt); border: 1px solid rgba(245, 241, 232, .14);
  border-radius: 8px; padding: 0.45rem 0.5rem 0.5rem; cursor: pointer;
  transition: transform .2s, border-color .2s;
}
.lab__sprayer:hover { transform: translateY(-3px); }
.lab__sprayer.is-active { border-color: var(--c-accent); background: rgba(217, 119, 66, .14); }
.lab__sprayer img { display: block; width: 100%; height: 60px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .45)); transition: transform .25s; }
.lab__sprayer:hover img { transform: rotate(-4deg) scale(1.04); }
.lab__sprayer b { display: block; font-size: 0.74rem; line-height: 1.2; margin-top: 0.3rem; }
.lab__sprayer span { display: block; font-size: 0.66rem; line-height: 1.3; margin-top: 0.15rem; }
.lab__sprayer span { color: rgba(245, 241, 232, .7); }
.lab__sprayer em {
  position: absolute; top: -0.45rem; left: 0.4rem; font-style: normal; z-index: 1;
  font: 700 0.58rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-bg); background: var(--c-accent-2); padding: 0.22rem 0.35rem; border-radius: 3px;
}

/* ---------- Result strip ---------- */
.lab__result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, auto) auto;
  align-items: center; gap: 0.4rem 1.1rem;
  background: var(--c-bg-alt); border-left: 4px solid var(--c-accent); border-radius: 6px;
  padding: 0.7rem 0.9rem;
}
.lab__result-head { display: grid; gap: 0.15rem; min-width: 0; }
.lab__result-kicker { font: 700 0.62rem/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--c-accent); }
.lab__result-name { font-size: 0.98rem; color: var(--c-cream); }
.lab__result-name span { color: var(--c-accent-2); font-weight: 700; margin-left: 0.25rem; }
.lab__result-reason { font-size: 0.74rem; color: rgba(245, 241, 232, .72); }
.lab__fig { display: grid; gap: 0.15rem; text-align: left; }
.lab__fig small { font: 700 0.6rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(245, 241, 232, .6); }
.lab__fig b { font-size: 1.05rem; color: var(--c-cream); white-space: nowrap; }
.lab__result-btn { white-space: nowrap; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .lab__result { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lab__result-head { grid-column: 1 / -1; }
  .lab__result-btn { grid-column: 1 / -1; text-align: center; }
}
@media (max-width: 980px) {
  .lab-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "lab" "rest"; }
  .lab__stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 540px) {
  .hero--lab { padding-block: 1.25rem 2rem; }
  .lab__hud { font-size: 0.68rem; padding: 0.4rem 0.5rem; }
  .lab__fig b { font-size: 0.95rem; }
  .lab__chip { font-size: 0.74rem; padding: 0.45rem 0.65rem; }
}

.lab [hidden] { display: none !important; }

.lab__note { font-size: 0.72rem; color: rgba(245, 241, 232, .6); }
.lab__veil { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; background: rgba(15, 29, 22, .82); color: var(--c-cream); font: 800 1.4rem/1 var(--font-sans); pointer-events: none; }

.lab__done-name { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.82rem; margin-bottom: 0.7rem; }
.lab__done-name small { color: rgba(245, 241, 232, .65); }
.lab__link { background: none; border: 0; color: var(--c-accent-2); font: 600 0.78rem/1 var(--font-sans); text-decoration: underline; cursor: pointer; padding: 0; }
.lab__board { margin-top: 0.8rem; border-top: 1px solid rgba(245, 241, 232, .15); padding-top: 0.6rem; }
.lab__board-title { margin: 0 0 0.4rem; font: 700 0.7rem/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-2); }
.lab__board ol { margin: 0; padding-left: 1.2rem; font-size: 0.78rem; display: grid; gap: 0.2rem; }
.lab__board li.is-me { color: var(--c-accent-2); font-weight: 700; }
.lab__board li span { color: rgba(245, 241, 232, .6); }

.lab__tag {
  position: absolute; margin: 0; transform: translate(-50%, -100%);
  font: 700 0.68rem/1 var(--font-sans); color: var(--c-bg); background: var(--c-accent-2);
  padding: 0.3rem 0.5rem; border-radius: 999px; pointer-events: none; white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}
.lab__range--short { flex: 0 1 140px; min-width: 100px; }
/* P111: the leaf blower's distance read-out, just under the aim ring; green at a good drying distance, amber close, red too close, grey too far */
.lab__tag--blow { transform: translate(-50%, 70%); background: #9be37a; color: #12210f; text-align: center; line-height: 1.25; border-radius: 10px; }
.lab__tag--blow span { display: block; font-weight: 600; font-size: .62rem; }
.lab__tag--blow[data-zone="close"] { background: #ffb02e; }
.lab__tag--blow[data-zone="push"] { background: #e5483a; color: #fff; }
.lab__tag--blow[data-zone="weak"] { background: #f3ead8; }
.lab__tag--blow[data-zone="far"] { background: #b7b7b0; }

/* ---------- Full screen ---------- */
.lab__full {
  margin-left: auto; flex: 0 0 auto;
  font: 600 0.8rem/1 var(--font-sans); color: var(--c-accent-2);
  background: transparent; border: 1px solid rgba(243, 201, 138, .5); border-radius: 999px;
  padding: 0.55rem 0.9rem; cursor: pointer;
}
.lab__full:hover { background: rgba(243, 201, 138, .12); }
.lab:fullscreen, .lab.is-big {
  background: var(--c-bg); padding: 1rem 1.25rem; overflow-y: auto;
  display: flex; flex-direction: column;
}
.lab.is-big { position: fixed; inset: 0; z-index: 1000; }
.lab:fullscreen .lab__stage, .lab.is-big .lab__stage { aspect-ratio: auto; flex: 1 1 auto; min-height: 58vh; }
.lab:fullscreen .lab__result, .lab.is-big .lab__result { flex: 0 0 auto; }
body.lab-open { overflow: hidden; }

.lab__pop {
  position: absolute; transform: translate(-50%, -50%); pointer-events: none;
  font: 800 0.95rem/1 var(--font-sans); color: var(--c-accent-2);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .8);
  white-space: nowrap;
}
.lab__pop.is-big { font-size: 1.25rem; color: #fff; }

.lab__verdict { font-size: 0.78rem; color: #f3a07a; }
.lab__verdict.is-ok { color: #9be37a; }
.lab__done-challenge { margin: 0 0 0.7rem; font-size: 0.82rem; padding: 0.5rem 0.6rem; border-radius: 4px; background: rgba(243, 160, 122, .14); color: #f6c3a8; }
.lab__done-challenge.is-pass { background: rgba(155, 227, 122, .14); color: #c5f0ad; }
.lab__seg button.has-badge::after { content: " \2605"; color: var(--c-accent-2); }

.lab__done-over { margin: 0 0 0.7rem; padding-left: 1.1rem; font-size: 0.78rem; color: rgba(245, 241, 232, .85); display: grid; gap: 0.15rem; }

.lab__shades { display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1 1 300px; }
.lab__shades button { width: 1.55rem; height: 1.55rem; border-radius: 50%; background: var(--swatch); border: 2px solid rgba(245, 241, 232, .25); cursor: pointer; padding: 0; transition: transform .15s; }
.lab__shades button:hover { transform: scale(1.15); }
.lab__shades button.is-active { border-color: var(--c-accent-2); box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-accent-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lab__shade-note { margin: -0.2rem 0 0.55rem; }
.lab__tag--shade { background: rgba(15, 29, 22, .85); color: var(--c-cream); font-weight: 600; }
.lab__compare-on .lab__tag--shade { display: block; }
.lab__full.is-active { background: var(--c-accent-2); color: var(--c-bg); }
.lab__tag--shade { font-size: 0.62rem; padding: 0.25rem 0.4rem; transform: translate(-50%, -50%); }

.lab__full--tight { margin-left: 0.35rem; }

/* ---------- Tidy layout: stage + side settings panel ---------- */
.lab-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "lab" "rest"; }
.lab-hero__head h1 { max-width: none; }
.lab__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.lab[data-mode="anatomy"] .lab__body { grid-template-columns: minmax(0, 1fr); }
.lab[data-mode="anatomy"] .lab__side { display: none; }
.lab__main { min-width: 0; }
.lab__stage { aspect-ratio: auto; height: clamp(380px, 58vh, 620px); }
.lab__side { background: var(--c-bg-alt); border-radius: 8px; padding: 0.7rem; max-height: clamp(380px, 58vh, 620px); overflow-y: auto; }
.lab__sidetabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; margin-bottom: 0.7rem; position: sticky; top: 0; background: var(--c-bg-alt); padding-bottom: 0.2rem; z-index: 1; }
.lab__sidetabs button { font: 700 0.74rem/1 var(--font-sans); color: var(--c-cream); background: var(--c-bg); border: 0; border-radius: 6px; padding: 0.55rem 0; cursor: pointer; }
.lab__sidetabs button.is-active { background: var(--c-accent); color: var(--c-bg); }
.lab__sidepage.is-off { display: none; }
.lab__side .lab__row { flex-direction: column; align-items: flex-start; gap: 0.4rem; margin-bottom: 0.85rem; }
.lab__side .lab__seg { flex-wrap: wrap; }
.lab__side .lab__range { width: 100%; }
.lab__side .lab__note { font-size: 0.72rem; }
.lab__side #compare { margin-left: 0; }
.lab__chips.is-collapsed [data-paint]:not(.is-recent):not(.is-active) { display: none; }
.lab__more { font: 600 0.78rem/1 var(--font-sans); color: var(--c-accent-2); background: transparent; border: 1px dashed rgba(243, 201, 138, .5); border-radius: 999px; padding: 0.5rem 0.8rem; cursor: pointer; }

/* in-game dock on the stage: nozzle, fan direction, distance */
.lab__dock { position: absolute; left: 50%; bottom: 0.6rem; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 1.2rem); }
.lab__row--dock { margin: 0; gap: 0.35rem 0.5rem; background: rgba(15, 29, 22, .85); border-radius: 999px; padding: 0.35rem 0.7rem; flex-wrap: nowrap; }
.lab__row--dock .lab__label { font-size: 0.62rem; }
.lab__row--dock .lab__seg button { font-size: 0.72rem; padding: 0.38rem 0.6rem; }
.lab__row--dock .lab__range--short { flex: 0 0 90px; min-width: 70px; }
.lab__hint { bottom: 3.7rem; }
.lab__refill { bottom: 6.2rem; }

/* sprayer strip under the stage */
.lab__main .lab__sprayers { margin-top: 0.2rem; grid-auto-columns: minmax(104px, 1fr); }
.lab__main .lab__sprayer { flex: 1 1 0; min-width: 104px; }
.lab__main .lab__sprayer img { height: 46px; }

.lab.is-big .lab__stage { height: calc(100vh - 290px); }
.lab.is-big .lab__side { max-height: calc(100vh - 290px); }

@media (max-width: 980px) {
  .lab__body { grid-template-columns: minmax(0, 1fr); }
  .lab__side { max-height: none; }
  .lab__stage { height: clamp(300px, 52vh, 520px); }
  .lab__row--dock { flex-wrap: wrap; border-radius: 12px; justify-content: center; }
}
.lab__sidepage { padding: 0; margin: 0; }
.lab__row--dock .lab__seg button { white-space: nowrap; }
@media (max-width: 760px) {
  .lab__dock { position: static; transform: none; max-width: none; margin-top: 0.4rem; }
  .lab__stage .lab__dock { position: absolute; left: 0.4rem; right: 0.4rem; bottom: 0.4rem; transform: none; }
  .lab__row--dock { flex-wrap: nowrap; overflow-x: auto; border-radius: 999px; justify-content: flex-start; padding: 0.3rem 0.5rem; scrollbar-width: none; }
  .lab__row--dock .lab__label { display: none; }
  .lab__row--dock .lab__seg button { font-size: 0.66rem; padding: 0.32rem 0.5rem; }
  .lab__row--dock .lab__range--short { flex: 0 0 70px; min-width: 60px; }
  .lab__row--dock #dist-out { display: inline; }
  .lab__hint { bottom: 3rem; font-size: 0.7rem; white-space: normal; max-width: 90%; text-align: center; }
}

/* walk pad: shown on touch screens and narrow windows (same as W A S D) */
.lab__pad { display: none; position: absolute; right: 0.5rem; bottom: 3.6rem; z-index: 3; width: 108px; height: 108px; }
.lab__pad button { position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(245, 241, 232, .25); background: rgba(15, 29, 22, .78); color: var(--c-cream); font-size: 0.8rem; touch-action: none; cursor: pointer; }
.lab__pad [data-walk="f"] { left: 36px; top: 0; }
.lab__pad [data-walk="l"] { left: 0; top: 36px; }
.lab__pad [data-walk="r"] { right: 0; top: 36px; }
.lab__pad [data-walk="b"] { left: 36px; bottom: 0; }
.lab__pad button:active { background: var(--c-accent); color: var(--c-bg); }
.lab:not([data-mode="spray"]):not([data-mode="garden"]) .lab__pad { display: none !important; }
@media (pointer: coarse), (max-width: 760px) { .lab__pad { display: block; } }
@media (max-width: 760px) {
  .lab__badge { display: none; }
  .lab__hud { font-size: 0.58rem; line-height: 1.25; padding: 0.3rem 0.45rem; gap: 0; max-width: 62%; right: 0.35rem; top: 0.35rem; }
  .lab__hud .lab__cup { width: 34px; height: 5px; }
  .lab__tag { font-size: 0.6rem; padding: 0.2rem 0.4rem; }
  .lab__stage { height: clamp(320px, 62vh, 520px); }
  .lab__pad { bottom: 3.1rem; transform: scale(0.9); transform-origin: bottom right; }
}
@media (max-width: 760px) {
  .lab__hint { left: 0.5rem; transform: none; max-width: calc(100% - 135px); text-align: left; }
}

/* ---------- Spray-day forecast ---------- */
.sprayday { margin-top: 1.1rem; background: var(--c-bg-alt); border-radius: 8px; border-left: 4px solid var(--c-accent-2); padding: 0.9rem 1rem; }
.sprayday__title { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--c-cream); }
.sprayday__rules { margin: 0 0 0.7rem; font-size: 0.8rem; color: rgba(245, 241, 232, .7); }
.sprayday__ask { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.sprayday__form { display: flex; gap: 0.35rem; flex: 1 1 220px; }
.sprayday__form input { flex: 1; min-width: 0; font: 500 0.85rem var(--font-sans); padding: 0.5rem 0.65rem; border-radius: 4px; border: 1px solid rgba(245, 241, 232, .25); background: var(--c-bg); color: var(--c-cream); }
.sprayday__out { margin-top: 0.6rem; font-size: 0.85rem; }
.sprayday__out p { margin: 0.2rem 0; }
.sprayday__verdict { font-weight: 800; font-size: 0.95rem; color: #f3a07a; }
.sprayday[data-ok="true"] .sprayday__verdict { color: #9be37a; }
.sprayday__why { color: rgba(245, 241, 232, .75); font-size: 0.8rem; }
.sprayday__play { margin-top: 0.4rem; font: 600 0.8rem var(--font-sans); color: var(--c-accent-2); background: transparent; border: 1px dashed rgba(243, 201, 138, .55); border-radius: 999px; padding: 0.45rem 0.8rem; cursor: pointer; }
#tools button[data-tool="spray"].is-active, #tools button.is-active { border-color: var(--c-accent-2); }
@media (max-width: 760px) { #tools button { font-size: 0.62rem; } }

/* what is in the cup when colours are mixed */
#hud-mix i { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--swatch); margin: 0 .25em 0 .15em; vertical-align: -.05em; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.lab__cup-note { flex-basis: 100%; margin: .35rem 0 0; }
/* the spray-day check sits below the opening paragraphs */
.lede + .wrap > .sprayday { margin: 1.5rem 0 2rem; }

/* the three fence areas: one slim pill, each button showing its own fence edge */
.lab__fences { position: absolute; top: 2.6rem; left: 0.6rem; z-index: 3; display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(15, 29, 22, .85); box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.lab__fences button { display: flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border: 0; border-radius: 999px; background: transparent;
  color: rgba(255, 255, 255, .82); font: 600 11px/1 system-ui, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.lab__fences button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.lab__fences button.is-active { background: #e07b39; color: #1a120c; }
.lab__fences button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 1px; }
.lab__fences svg { width: 14px; height: 14px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lab__fences .e { stroke: currentColor; stroke-width: 1.4; opacity: .35; }
.lab__fences .on { stroke: currentColor; stroke-width: 2.8; }
@media (max-width: 720px) { .lab__fences { top: 2.3rem; } .lab__fences button { padding: 5px 8px 5px 6px; } }
.lab__swatch { display: inline-block; width: .7em; height: .7em; border-radius: 2px; background: var(--swatch); margin-right: .35em; vertical-align: -.05em; }

/* messages and readouts never block a click on the garden underneath */
.lab__hint, .lab__badge, .lab__hud, .lab__tag, .lab__pop, .lab__labels { pointer-events: none; }

/* the dock: tools on the top row, the settings for the tool in hand below; never wider than the stage */
.lab__row--dock { flex-wrap: wrap; justify-content: center; border-radius: 16px; row-gap: 0.3rem; }
.lab__row--dock #tools { flex-basis: 100%; justify-content: center; }
.lab__row--dock .lab__range--short { flex: 0 1 90px; min-width: 60px; }
@media (max-width: 720px) {
  .lab__row--dock { flex-wrap: wrap; overflow-x: visible; justify-content: center; border-radius: 14px; }
  .lab__row--dock #tools { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
}
.lab__stage .lab__dock { width: min(660px, calc(100% - 1.2rem)); }
.lab__stage .lab__dock .lab__row--dock { width: 100%; box-sizing: border-box; }
@media (max-width: 720px) { .lab__stage .lab__dock { width: auto; } }

/* the job bill under the settings, and the toolbar icons */
.lab__bill { margin-top: 0.8rem; padding: 0.8rem 0.9rem; border-radius: 14px; background: rgba(15, 29, 22, .6); }
.lab__bill .bill { background: transparent; border: 0; padding: 0; color: var(--c-cream); } /* sits on the dark side panel */
.lab__bill .bill .bill__title { font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent-2); margin-bottom: .3rem; }
.lab__seg button svg, .lab__full svg { width: 15px; height: 15px; margin-right: 5px; vertical-align: -3px; flex: none; }
.lab__row--dock #tools button { display: inline-flex; align-items: center; }
.lab__col { min-width: 0; display: flex; flex-direction: column; gap: 0.8rem; } /* the settings, then the job bill beneath them */
.lab__col .lab__bill { margin-top: 0; max-height: clamp(260px, 40vh, 520px); overflow-y: auto; }

/* phones: icon-only tools and fence pill, a slimmer readout, the walk pad above the toolbar */
@media (max-width: 720px) {
  .lab__row--dock #tools { overflow-x: visible; justify-content: center; flex-wrap: nowrap; }
  .lab__row--dock #tools .lab__lbl { display: none; }
  .lab__row--dock #tools button { padding: 0.42rem 0.5rem; }
  .lab__row--dock #tools button svg { margin-right: 0; width: 18px; height: 18px; }
  .lab__fences button:not(.is-active) .lab__lbl { display: none; }
  .lab__fences button { padding: 5px 7px; }
  .lab__hud { font-size: 0.6rem; max-width: 54%; padding: 0.35rem 0.5rem; }
  .lab__hud > span:has(#hud-used), .lab__hud > span:has(#hud-over), .lab__hud > span:has(#hud-weather) { display: none; } /* tin use, overspray and weather live in the bill and side panel */
  .lab__pad { bottom: 7.4rem; right: 0.4rem; transform: scale(0.82); transform-origin: bottom right; }
  .lab__row--dock .lab__label { display: none; }
}
@media (max-width: 720px) {
  /* hints sit at the top under the readout, small, never over the toolbar */
  .lab__hint { top: 5.3rem; bottom: auto; left: 50%; transform: translateX(-50%); max-width: 86%; font-size: 0.68rem; line-height: 1.35; padding: 0.4rem 0.7rem; border-radius: 10px; text-align: center; }
  .lab__row--dock { padding: 0.3rem 0.4rem; row-gap: 0.25rem; }
  .lab__row--dock .lab__seg button, .lab__row--dock .lab__full { font-size: 0.68rem; padding: 0.32rem 0.55rem; }
  .lab__row--dock .lab__full svg { width: 13px; height: 13px; }
}

/* phones: a tab to tuck the toolbar away for more view, and bring it back */
.lab__docktab { display: none; }
@media (max-width: 720px) {
  .lab__docktab:not([hidden]) { display: inline-flex; align-items: center; gap: 4px; position: absolute; left: 50%; transform: translateX(-50%); z-index: 4;
    bottom: calc(var(--dock-h, 70px) + 0.75rem); padding: 3px 10px 3px 7px; border: 0; border-radius: 999px 999px 6px 6px;
    background: rgba(15, 29, 22, .88); color: var(--c-cream); font: 600 0.62rem/1 var(--font-sans, system-ui); cursor: pointer; }
  .lab__docktab svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
  .lab.is-dock-hidden .lab__dock { display: none !important; }
  .lab.is-dock-hidden .lab__docktab { bottom: 0.5rem; border-radius: 999px; }
  .lab.is-dock-hidden .lab__docktab svg { transform: rotate(180deg); }
  .lab__pad { bottom: calc(var(--dock-h, 70px) + 2.6rem); }
  .lab.is-dock-hidden .lab__pad { bottom: 2.4rem; }
}

/* the touch aim dot: where the spray, sander or tap lands, moved like a trackpad */
.lab__touchaim { position: absolute; z-index: 3; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none;
  border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(15, 29, 22, .7), inset 0 0 0 4px rgba(240, 138, 60, .9); }
.lab:not([data-mode="spray"]) .lab__touchaim { display: none; }
@media (max-width: 720px) {
  /* compact hints on phones: small, narrow, at most three lines, slightly see-through */
  .lab__hint { top: 4.9rem; max-width: 74%; font-size: 0.58rem; line-height: 1.3; padding: 0.28rem 0.55rem; border-radius: 8px; opacity: 0.92;
    white-space: normal; overflow: visible; } /* the whole tip shows, wrapped small */
  .lab__hint[hidden] { display: none; }
  .lab__pop { font-size: 0.72rem; }
  .lab__pop.is-big { font-size: 0.9rem; }
}

/* money: red purchase pop-ups, the budget bar and the printed receipt */
.lab__pop.is-money { color: #ff9b84; font-size: 0.82rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); white-space: nowrap; }
#hud-money b { color: #ffb39f; }
.lab__budget > i { display: inline-block; width: 56px; height: 5px; margin-left: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); vertical-align: middle; overflow: hidden; }
.lab__budget > i > i { display: block; height: 100%; width: 0; background: #9be37a; transition: width .3s; }
.lab__budget > i > i.is-over { background: #ff7a45; }
.lab__receipt { margin: 0.6rem 0; padding: 0.6rem 0.75rem; border-radius: 6px; background: #f6f1e6; color: #1d2420; font: 500 0.72rem/1.45 ui-monospace, Menlo, monospace;
  background-image: repeating-linear-gradient(transparent 0 22px, rgba(0, 0, 0, .04) 22px 23px); }
.lab__receipt-head { margin: 0 0 0.3rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 0.66rem; }
.lab__receipt ol { list-style: none; margin: 0; padding: 0; }
.lab__receipt li, .lab__receipt-total, .lab__receipt-score { display: flex; justify-content: space-between; gap: 0.6rem; opacity: 0; animation: receipt-line .25s ease-out var(--d, 0s) forwards; }
.lab__receipt-total { margin: 0.3rem 0 0; padding-top: 0.3rem; border-top: 1px dashed rgba(0, 0, 0, .35); font-weight: 700; }
.lab__receipt-score { margin: 0.35rem 0 0; display: block; color: #8a4a1c; font-weight: 700; }
@keyframes receipt-line { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lab__receipt li, .lab__receipt-total, .lab__receipt-score { animation: none; opacity: 1; } }
@media (max-width: 720px) { .lab__pop.is-money { font-size: 0.64rem; } }
@media (max-width: 720px) {
  /* eight tools share the row equally, so they always fit the phone's width */
  .lab__row--dock #tools { width: 100%; gap: 3px; }
  .lab__row--dock #tools button { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0.4rem 0; }
  .lab__row--dock #tools button svg { width: 17px; height: 17px; }
}
@media (max-width: 720px) { .lab__hud { max-width: 50%; } }

/* detail zoom: a magnifier on the left of the stage showing 1x, 2x or 3x */
.lab__zoom:not([hidden]) { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 9px 6px 7px; border: 0; border-radius: 999px; background: rgba(15, 29, 22, .82); color: var(--c-cream); font: 700 0.72rem/1 var(--font-sans, system-ui); cursor: pointer; }
.lab__zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.lab__zoom.is-active { background: #e07b39; color: #1a120c; }

/* phones: "Paint & settings" slides the side panel and the bill up inside the game */
.lab__sheetbtn, .lab__sheetclose { display: none; }
@media (max-width: 720px) {
  .lab__sheetbtn:not([hidden]) { display: inline-flex; align-items: center; gap: 4px; position: absolute; left: 0.6rem; z-index: 4;
    bottom: calc(var(--dock-h, 70px) + 0.75rem); padding: 3px 10px 3px 7px; border: 0; border-radius: 999px;
    background: rgba(15, 29, 22, .88); color: var(--c-cream); font: 600 0.62rem/1 var(--font-sans, system-ui); cursor: pointer; }
  .lab__sheetbtn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .lab.is-dock-hidden .lab__sheetbtn { bottom: 0.5rem; }
  .lab.is-sheet .lab__sheetbtn { display: none; }
  .lab.is-sheet .lab__stage > .lab__col { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; max-height: 64%; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0.4rem 0.5rem 0.8rem; background: var(--c-bg, #0f1d16); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .45); touch-action: pan-y; }
  .lab.is-sheet .lab__stage > .lab__col .lab__side { max-height: none; overflow: visible; }
  .lab.is-sheet .lab__sheetclose { display: block; position: sticky; top: 0; z-index: 2; margin: 0 0 0.4rem auto; padding: 5px 14px; border: 0; border-radius: 999px;
    background: #e07b39; color: #1a120c; font: 700 0.72rem/1 var(--font-sans, system-ui); cursor: pointer; }
  .lab.is-sheet .lab__dock, .lab.is-sheet .lab__docktab, .lab.is-sheet .lab__pad, .lab.is-sheet .lab__zoom { display: none !important; }
}
.lab__tapeopts:not([hidden]) { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; }

/* desktop: a taller game, a settings column that matches it, and a toolbar that never runs off the edges */
@media (min-width: 721px) {
  .lab__stage { height: clamp(460px, min(76vh, 60vw), 900px); container-type: inline-size; }
  .lab__side { max-height: clamp(300px, 46vh, 560px); }
  .lab__col .lab__bill { max-height: clamp(200px, 28vh, 380px); }
  .lab__stage .lab__dock { width: min(1100px, calc(100% - 1.2rem)); }
  .lab__row--dock #tools { flex-wrap: nowrap; justify-content: center; }
  .lab__row--dock #tools button { flex: 0 1 auto; min-width: 0; }
}

@media (min-width: 721px) and (max-height: 820px) { /* short windows: a slimmer readout */
  .lab__hud { font-size: 0.68rem; }
  .lab__hud > span:has(#hud-used), .lab__hud > span:has(#hud-over), .lab__hud > span:has(#hud-weather) { display: none; }
}

/* overlap fixes: the toolbar fits itself, hints sit above it, the readout stays small, the corner label gives way */
.lab__row--dock #tools { overflow: hidden; }
.lab.tools-compact .lab__row--dock #tools button { flex-direction: column; gap: 2px; padding: 0.3rem 0.45rem 0.25rem; border-radius: 12px; }
.lab.tools-compact .lab__row--dock #tools button svg { margin-right: 0; width: 17px; height: 17px; }
.lab.tools-compact .lab__row--dock #tools .lab__lbl { font-size: 0.58rem; line-height: 1; }
.lab.tools-icons .lab__row--dock #tools .lab__lbl { display: none; }
@media (min-width: 721px) {
  .lab__hint { bottom: calc(var(--dock-h, 70px) + 1.1rem); max-width: 70%; white-space: normal; text-align: center; }
  .lab__hud { font-size: clamp(0.62rem, 1.15cqw, 0.78rem); max-width: 40%; }
}
.lab__hud > span:has(#hud-used), .lab__hud > span:has(#hud-over), .lab__hud > span:has(#hud-weather) { display: none; } /* in the bill and the Weather tab */
.lab[data-mode="spray"] .lab__badge { display: none; } /* the walking tip shows once as a hint instead */
.lab[data-mode="spray"] .lab__fences { top: 0.6rem; }
@media (min-width: 721px) { .lab__row--dock #tools button { flex: 0 0 auto; } .lab.tools-icons .lab__row--dock #tools button { flex: 0 1 auto; } } /* full width, so the fit check sees real overflow */

/* the job bill folds to one line with the total; open it for the items */
.lab__billbox > summary { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none; padding: 0.15rem 0; }
.lab__billbox > summary::-webkit-details-marker { display: none; }
.lab__billbox > summary span { font-size: 0.7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent-2); }
.lab__billbox > summary b { margin-left: auto; font-size: 1.05rem; color: var(--c-accent-2); font-variant-numeric: tabular-nums; }
.lab__billbox > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--c-cream); border-bottom: 2px solid var(--c-cream); transform: rotate(45deg) translateY(-2px); transition: transform .2s; opacity: .7; }
.lab__billbox[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.lab__billbox[open] > summary { margin-bottom: 0.5rem; }
.lab__billbox .bill .bill__title { display: none; } /* the summary line already says it */
.lab__col .lab__bill { max-height: none; }
.lab__billbox[open] #job-bill { max-height: clamp(200px, 32vh, 420px); overflow-y: auto; }

/* full screen: the game fills the screen; the sprayer cards, result strip and caption step aside; settings slide in */
.lab.is-big { padding: 0.5rem 0.6rem; overflow: hidden; }
.lab.is-big .lab__body { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1fr); }
.lab.is-big .lab__main { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.lab.is-big .lab__stage { height: auto !important; flex: 1 1 auto; min-height: 0; }
.lab.is-big .lab__body > .lab__col, .lab.is-big .lab__sprayers, .lab.is-big .lab__result, .lab.is-big .lab__caption { display: none; }
.lab.is-big .lab__sheetbtn:not([hidden]) { display: inline-flex; align-items: center; gap: 5px; position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); z-index: 4;
  padding: 6px 12px 6px 9px; border: 0; border-radius: 999px; background: rgba(15, 29, 22, .88); color: var(--c-cream); font: 600 0.72rem/1 var(--font-sans, system-ui); cursor: pointer; }
.lab.is-big .lab__sheetbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.lab.is-big.is-sheet .lab__sheetbtn { display: none; }
.lab.is-big.is-sheet .lab__stage > .lab__col { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88%); z-index: 7; overflow-y: auto; padding: 0.6rem 0.6rem 1rem;
  background: var(--c-bg, #0f1d16); box-shadow: -10px 0 30px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 0.6rem; }
.lab.is-big.is-sheet .lab__stage > .lab__col .lab__side { max-height: none; overflow: visible; }
.lab.is-big .lab__sheetclose { display: none; }
.lab.is-big.is-sheet .lab__sheetclose { display: block; position: sticky; top: 0; z-index: 2; margin: 0 0 0.2rem auto; padding: 5px 14px; border: 0; border-radius: 999px;
  background: #e07b39; color: #1a120c; font: 700 0.72rem/1 var(--font-sans, system-ui); cursor: pointer; }
@media (max-width: 720px) { .lab.is-big .lab__sheetbtn:not([hidden]) { top: auto; transform: none; right: auto; } }

/* rain readout: countdown, rain, drying and the touch test, centred above the fence */
.lab__rainbar { position: absolute; top: 0.6rem; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 6px;
  max-width: calc(100% - 1.2rem); padding: 4px 4px 4px 12px; border-radius: 999px; background: rgba(20, 26, 32, .78); color: #e8eef3;
  font-size: 0.8rem; line-height: 1.3; backdrop-filter: blur(4px); pointer-events: auto; }
.lab__rainbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lab__rainbar.is-lapse { background: rgba(28, 44, 58, .8); }
.lab__rainbar button { flex: none; border: 0; border-radius: 999px; padding: 5px 11px; background: #e07b39; color: #1a120c; font: inherit; font-weight: 600; cursor: pointer; }
.lab__rainbar button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 1px; }
.lab__rainbar span:only-child, .lab__rainbar span:has(+ button[hidden] + button[hidden]) { padding-right: 8px; }
@media (max-width: 640px) { .lab__rainbar { top: 0.4rem; font-size: 0.72rem; } .lab__rainbar span { white-space: normal; } }

/* rain jobs: the readout wraps its buttons on narrow screens */
.lab__rainbar { flex-wrap: wrap; justify-content: center; border-radius: 18px; }
.lab__rainbar button#rain-clean, .lab__rainbar button#rain-tea { background: rgba(255, 255, 255, .14); color: #e8eef3; }
.lab__rainbar button#rain-clean:hover, .lab__rainbar button#rain-tea:hover { background: rgba(255, 255, 255, .24); }
/* the cleaning card: one step at a time, press and hold */
.lab__clean { position: absolute; top: 3.4rem; left: 50%; transform: translateX(-50%); z-index: 5; width: min(400px, calc(100% - 1.2rem));
  max-height: calc(100% - 4.4rem - var(--dock-h, 0px)); overflow-y: auto; padding: 0.75rem 0.9rem; border-radius: 10px;
  background: rgba(15, 29, 22, .93); color: var(--c-cream, #f3ecdc); border-left: 4px solid #e07b39; font-size: 0.85rem; }
.lab__clean-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 0.4rem; font-weight: 800; }
.lab__clean-head button { border: 0; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.lab__clean ol { margin: 0 0 0.6rem; padding-left: 1.3rem; display: grid; gap: 0.25rem; }
.lab__clean li { opacity: 0.55; }
.lab__clean li.is-now { opacity: 1; font-weight: 600; }
.lab__clean li.is-done { opacity: 0.7; text-decoration: line-through; }
.lab__clean-water { display: flex; align-items: center; gap: 8px; margin: 0 0 0.6rem; }
.lab__clean-water i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); flex: none; }
.lab__clean-go { position: relative; overflow: hidden; width: 100%; padding: 0.6rem; border: 0; border-radius: 8px; background: #3a4a40; color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.lab__clean-go::before { content: ''; position: absolute; inset: 0; width: calc(var(--p, 0) * 100%); background: #e07b39; }
.lab__clean-go span { position: relative; }
.lab__clean-go:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }

.lab__clean-head small { font-weight: 500; opacity: 0.7; margin-left: 0.3rem; }
/* desktop: the refill and recoat buttons sit above the hint line, never under it */
@media (min-width: 721px) { .lab__refill { bottom: calc(var(--dock-h, 70px) + 5rem); } }
@media (max-width: 720px) {
  /* phones: the rain readout spans the stage under the readout corner; hints move down below it */
  .lab__rainbar { top: 4.7rem; left: 0.4rem; right: 0.4rem; transform: none; max-width: none; font-size: 0.64rem; gap: 4px; padding: 4px 6px; border-radius: 12px; }
  .lab__rainbar span { flex: 1 1 100%; text-align: center; white-space: normal; }
  .lab__rainbar button { padding: 4px 9px; }
  .lab__stage:has(#rainbar:not([hidden])) .lab__hint { top: 8.4rem; }
  /* the cleaning card shows just the step in hand */
  .lab__clean { top: 0.4rem; max-height: calc(100% - 0.8rem - var(--dock-h, 0px)); font-size: 0.74rem; padding: 0.6rem 0.75rem; }
  .lab__clean li:not(.is-now) { display: none; }
}

/* a worn-through disc or sheet: the change button asks for attention */
.lab__full.is-alert { background: #c0392b; color: #fff; border-color: #c0392b; animation: lab-alert 1s ease-in-out infinite alternate; }
@keyframes lab-alert { to { box-shadow: 0 0 0 4px rgba(192, 57, 43, .35); } }
@media (prefers-reduced-motion: reduce) { .lab__full.is-alert { animation: none; } }

/* Compare 6 colours is a Your garden view: in Try spraying it would end the job, so it is not offered there */
.lab[data-mode="spray"] #compare { display: none; }

/* the workbench close-up: measure, mark and cut */
.lab__cut { position: absolute; inset: 0.6rem 0.6rem calc(var(--dock-h, 0px) + 0.6rem); z-index: 6; display: flex; flex-direction: column; gap: 0.4rem;
  padding: 0.7rem 0.9rem; border-radius: 10px; background: rgba(15, 29, 22, .95); color: var(--c-cream, #f3ecdc); border-left: 4px solid #e07b39; font-size: 0.85rem; }
.lab__cut-head { display: flex; justify-content: space-between; align-items: center; margin: 0; font-size: 0.95rem; }
.lab__cut-head button { border: 0; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.lab__cut-need { margin: 0; opacity: 0.8; font-size: 0.8rem; }
.lab__cut-note { margin: 0; font-size: 0.8rem; color: #ffd27a; } /* P122: a message at the bench card */
.lab__cut-note[hidden] { display: none; }
.lab__cut-canvas { flex: 1 1 auto; min-height: 150px; width: 100%; border-radius: 8px; background: #3a4a40; touch-action: none; cursor: crosshair; }
.lab__cut-step { margin: 0; min-height: 2.6em; }
.lab__cut-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lab__cut-go, .lab__cut-auto { border: 0; border-radius: 999px; padding: 0.45rem 1rem; font: inherit; font-weight: 700; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.lab__cut-go { background: #e07b39; color: #1a120c; }
.lab__cut-auto { background: rgba(255, 255, 255, .14); color: inherit; margin-left: auto; }
.lab__cut-go:focus-visible, .lab__cut-auto:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
@media (max-width: 720px) { .lab__cut { inset: 0.3rem 0.3rem calc(var(--dock-h, 0px) + 0.3rem); font-size: 0.74rem; padding: 0.5rem 0.6rem; } .lab__cut-canvas { min-height: 120px; } }

/* the cutting panel sits low over the garden; the measuring, marking and sawing happen in 3D above it */
.lab__cut { inset: auto auto calc(var(--dock-h, 0px) + 0.6rem) 50%; transform: translateX(-50%); width: min(560px, calc(100% - 1.2rem)); gap: 0.3rem; background: rgba(15, 29, 22, .9); }
.lab__cutread { position: absolute; z-index: 6; transform: translateX(-50%); padding: 3px 9px; border-radius: 999px; background: #f2d23c; color: #1b1b1b; font: 700 0.85rem system-ui, sans-serif; font-style: normal; pointer-events: none; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
@media (max-width: 720px) { .lab__cut { inset: auto auto calc(var(--dock-h, 0px) + 0.3rem) 50%; width: calc(100% - 0.6rem); } }
/* keep the foot of the fence and the bench clear: the cutting panel sits at the top */
.lab__cut { top: 3.1rem; bottom: auto; padding: 0.5rem 0.8rem; font-size: 0.8rem; }
.lab__cut-step { min-height: 0; }
@media (max-width: 720px) { .lab__cut { top: 4.6rem; bottom: auto; } }
/* the head torch at night: a pool of light where you aim, darkness around it */
.lab__torch { position: absolute; inset: 0; z-index: 2; pointer-events: none; font-style: normal; }

/* phone walk pad: the two turn buttons sit under the arrows */
.lab__pad [data-walk="tl"] { left: 0; top: 76px; width: 30px; height: 30px; font-size: 0.95rem; }
.lab__pad [data-walk="tr"] { right: 0; top: 76px; width: 30px; height: 30px; font-size: 0.95rem; }

/* mouse look: a crosshair in the middle does the aiming */
.lab__crosshair { display: none; position: absolute; left: 50%; top: 50%; z-index: 4; width: 18px; height: 18px; margin: -9px 0 0 -9px; pointer-events: none; font-style: normal;
  background: linear-gradient(#fff, #fff) center / 2px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 2px no-repeat; filter: drop-shadow(0 0 1px rgba(0,0,0,.9)); }
.lab.is-mouselook .lab__crosshair { display: block; }
@media (pointer: coarse) { #mouselook { display: none; } }

/* the repair checklist: what to do next with new timber */
.lab__steps { position: absolute; left: 0.6rem; top: 3.2rem; z-index: 3; padding: 0.45rem 0.7rem 0.5rem; border-radius: 10px; background: rgba(15, 29, 22, .86); color: var(--c-cream, #f3ecdc);
  font-size: 0.78rem; line-height: 1.35; border-left: 3px solid #e07b39; max-width: 240px; pointer-events: none; }
.lab__steps p { margin: 0 0 0.2rem; font-weight: 800; font-size: 0.75rem; letter-spacing: .04em; text-transform: uppercase; opacity: 0.8; }
.lab__steps ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.1rem; }
.lab__steps li { opacity: 0.5; }
.lab__steps li.is-now { opacity: 1; font-weight: 700; }
.lab__steps li.is-done { opacity: 0.75; text-decoration: line-through; }
.lab__steps li b { color: #f3d27a; text-decoration: none; }
@media (max-width: 720px) { .lab__steps { top: 4.6rem; font-size: 0.66rem; max-width: 180px; } }

/* what a click will do, under the pointer */
.lab__prompt { position: absolute; z-index: 5; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(15, 29, 22, .9); color: #fff; border: 1px solid #f08a3c;
  font: 600 0.78rem system-ui, sans-serif; font-style: normal; white-space: nowrap; pointer-events: none; }

/* the start screen: our own garden drifting behind a short menu */
.lab__start { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; padding: 2rem; background: linear-gradient(90deg, rgba(10, 18, 14, .82) 0, rgba(10, 18, 14, .55) 34%, rgba(10, 18, 14, 0) 62%); }
.lab__start-menu { width: min(380px, 100%); display: grid; gap: 0.5rem; color: #f3ecdc; max-height: 100%; overflow-y: auto; }
.lab__start-kicker { margin: 0; color: #f3d27a; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 0.75rem; }
.lab__start-title { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; }
.lab__start-lede { margin: 0 0 0.6rem; opacity: 0.85; line-height: 1.45; }
.lab__start-play { border: 0; border-radius: 999px; padding: 0.85rem 1.4rem; background: #e07b39; color: #1a120c; font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer; justify-self: start; }
.lab__start-play:hover { background: #ee8c4a; }
.lab__start-link { border: 0; background: none; color: #f3ecdc; font: inherit; font-weight: 700; text-align: left; padding: 0.35rem 0; cursor: pointer; opacity: 0.9; }
.lab__start-link:hover { opacity: 1; text-decoration: underline; }
.lab__start-play:focus-visible, .lab__start-link:focus-visible, .lab__start-item:focus-visible, .lab__start-seg button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
.lab__start-list { display: grid; gap: 0.35rem; }
.lab__start-item { display: grid; gap: 0.1rem; text-align: left; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: 0.55rem 0.75rem; background: rgba(15, 29, 22, .7); color: inherit; font: inherit; cursor: pointer; }
.lab__start-item:hover { border-color: #e07b39; }
.lab__start-item span { font-size: 0.82rem; opacity: 0.8; }
.lab__start-badge { font-size: 0.7rem; background: #f3d27a; color: #1a120c; border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.lab__start-setup { display: grid; gap: 0.3rem; }
.lab__start-setup p { margin: 0.3rem 0 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; opacity: 0.75; }
.lab__start-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.lab__start-seg button { border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 4px 10px; background: rgba(15, 29, 22, .7); color: inherit; font: inherit; font-size: 0.82rem; cursor: pointer; }
.lab__start-seg button.is-active { background: #e07b39; border-color: #e07b39; color: #1a120c; font-weight: 700; }
.lab__start-keys { margin: 0.6rem 0 0; font-size: 0.75rem; opacity: 0.6; }
.lab.is-start .lab__pad, .lab.is-start .lab__docktab, .lab.is-start .lab__sheetbtn, .lab.is-start .lab__touchaim, .lab.is-start .lab__crosshair, .lab.is-start .lab__prompt, .lab.is-start .lab__hud, .lab.is-start .lab__dock, .lab.is-start .lab__fences, .lab.is-start #zoom-btn, .lab.is-start .lab__steps, .lab.is-start .lab__hint, .lab.is-start .lab__badge, .lab.is-start #tag, .lab.is-start .lab__rainbar { visibility: hidden; }
@media (max-width: 720px) { .lab__start { padding: 1rem; align-items: flex-end; background: linear-gradient(0deg, rgba(10, 18, 14, .9) 0, rgba(10, 18, 14, .6) 55%, rgba(10, 18, 14, 0) 85%); } }

/* the panel shop */
.lab__shop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.lab__shop li button { width: 100%; display: grid; gap: 0.1rem; text-align: left; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 0.5rem 0.7rem; background: rgba(255, 255, 255, .05); color: inherit; font: inherit; cursor: pointer; }
.lab__shop li button:hover:not(:disabled) { border-color: #e07b39; }
.lab__shop li button:disabled { opacity: 0.45; cursor: not-allowed; }
.lab__shop li span { font-size: 0.78rem; opacity: 0.8; }

/* the repair menu that opens where you click */
.lab__repmenu { position: absolute; z-index: 7; width: 230px; display: grid; gap: 4px; padding: 0.5rem; border-radius: 10px; background: rgba(15, 29, 22, .95); color: #f3ecdc; border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); font-size: 0.82rem; }
.lab__repmenu p { margin: 0 0 2px; display: flex; justify-content: space-between; align-items: center; }
.lab__repmenu p button { border: 0; background: none; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.lab__repmenu [data-rep] { display: grid; grid-template-columns: 16px 1fr; column-gap: 8px; align-items: center; text-align: left; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; padding: 6px 8px; background: rgba(255, 255, 255, .04); color: inherit; font: inherit; cursor: pointer; }
.lab__repmenu [data-rep]:hover, .lab__repmenu [data-rep]:focus-visible { border-color: #e07b39; outline: none; }
.lab__repmenu [data-rep] span { grid-column: 2; font-size: 0.72rem; opacity: 0.7; }
.lab__repmenu [data-rep][hidden] { display: none; }

/* panel shop with pictures */
.lab__shop { width: min(460px, calc(100% - 1.2rem)); }
.lab__shop-how { margin: 0 0 0.5rem; font-size: 0.78rem; opacity: 0.85; line-height: 1.4; }
.lab__shop li button { grid-template-columns: 120px 1fr; column-gap: 10px; align-items: center; }
.lab__shop li img { grid-row: span 3; width: 120px; height: 85px; object-fit: cover; border-radius: 6px; background: #cfd8dc; }
.lab__shop li em { font-style: normal; font-size: 0.75rem; color: #f3d27a; }
.lab__shop li button:disabled em { color: inherit; opacity: 0.8; }
/* dust in the eyes without safety glasses */
.lab__eyedust { position: absolute; inset: 0; z-index: 2; pointer-events: none; font-style: normal; background: radial-gradient(ellipse at center, rgba(205, 180, 135, .25) 0, rgba(150, 120, 80, .7) 100%); }

/* dust specks on the goggles: noise that fills from the rim in (goggles.js) */
.lab__gogglesdust { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; filter: blur(0.7px); }

/* kit gauges while sanding: the mask clogs, the glasses dust over */
.lab__kitbar { position: absolute; right: 0.6rem; top: 7.6rem; z-index: 4; display: grid; gap: 5px; width: 210px; }
.lab__kw { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: rgba(15, 29, 22, .85); color: #f3ecdc; font-size: 0.74rem; }
.lab__kw[hidden] { display: none; }
.lab__kw b { grid-column: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.lab__kw b i { display: block; height: 100%; width: 0; background: #b9a07a; }
.lab__kw.is-full b i { background: #c0392b; }
.lab__kw button { grid-column: 2; grid-row: 1 / span 2; border: 0; border-radius: 999px; padding: 4px 9px; background: #e07b39; color: #1a120c; font: inherit; font-weight: 700; cursor: pointer; }
.lab__kw.is-full { outline: 2px solid #c0392b; }
@media (max-width: 720px) { .lab__kitbar { top: 8.4rem; width: 170px; } }
/* Your garden: no tabs, just what it takes to compare the look */
.lab[data-mode="garden"] .lab__sidetabs { display: none; }
.lab[data-mode="garden"] .lab__sidepage[data-sidepage="paint"] { display: block !important; }
.lab[data-mode="garden"] .lab__sidepage:not([data-sidepage="paint"]) { display: none !important; }
.lab[data-mode="garden"] .lab__row:has(#cup-label) { display: none; }
.lab[data-mode="garden"] #compare { order: -1; width: 100%; margin: 0.4rem 0; padding: 0.7rem 1rem; font-size: 1rem; background: #e07b39; color: #1a120c; border-color: #e07b39; }
.lab__side .lab__range { flex: 0 0 auto; height: auto; } /* in the side column the slider must not stretch into a tall box */
.lab[data-mode="garden"] .lab__side { max-height: none; }
/* the controls, said once and quietly at the start */
.lab__keys { position: absolute; left: 50%; bottom: 4.6rem; transform: translateX(-50%); z-index: 4; margin: 0; padding: 0.3rem 0.75rem; border-radius: 999px; background: rgba(10, 18, 14, .55); color: rgba(243, 236, 220, .85); font-size: 0.78rem; white-space: nowrap; pointer-events: none; transition: opacity .8s; }
.lab__keys kbd { font: inherit; font-weight: 700; border: 1px solid rgba(243, 236, 220, .35); border-radius: 4px; padding: 0 4px; margin: 0 1px; }
.lab__keys.is-gone { opacity: 0; }
.lab.is-start .lab__keys { visibility: hidden; }
@media (max-width: 720px) { .lab__keys { display: none; } }
.lab__keys { bottom: auto; top: 3.1rem; font-size: 0.72rem; }
/* missing protection: small pinned icons on the left, pulsing when it costs you */
.lab__kitwarn { position: absolute; left: 0.6rem; top: calc(50% + 1.8rem); z-index: 4; display: grid; gap: 6px; }
.lab__kitwarn button { position: relative; width: 34px; height: 34px; padding: 6px; border-radius: 50%; border: 1.5px solid #e2574c; background: rgba(15, 29, 22, .82); color: #f3ecdc; cursor: pointer; }
.lab__kitwarn button[hidden] { display: none; }
.lab__kitwarn button::after { content: ''; position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: #e2574c; }
.lab__kitwarn svg { width: 100%; height: 100%; display: block; }
.lab__kitwarn button:hover, .lab__kitwarn button:focus-visible { background: #e2574c; outline: none; }
.lab__kitwarn button.is-ping { animation: kitping 1.1s ease-out 1; }
@keyframes kitping { 0% { box-shadow: 0 0 0 0 rgba(226, 87, 76, .85); transform: scale(1.18); } 60% { box-shadow: 0 0 0 12px rgba(226, 87, 76, 0); transform: scale(1); } 100% { box-shadow: 0 0 0 0 rgba(226, 87, 76, 0); } }
@media (prefers-reduced-motion: reduce) { .lab__kitwarn button.is-ping { animation: none; background: #e2574c; } }
.lab.is-start .lab__kitwarn { visibility: hidden; }
/* the four timber steps inside the cut panel, so nothing overlaps */
.lab__cut-steps { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: cs; font-size: 0.72rem; }
.lab__cut-steps li { counter-increment: cs; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); opacity: 0.6; }
.lab__cut-steps li::before { content: counter(cs) '. '; }
.lab__cut-steps li.is-done { opacity: 0.5; text-decoration: line-through; }
.lab__cut-steps li.is-now { opacity: 1; background: #e07b39; color: #1a120c; font-weight: 700; }
.lab__cut-steps[hidden] { display: none; }
.lab__keys.is-under { visibility: hidden; }
/* the mask and glasses as icons: a ring fills as they clog or dust over; click to swap or wipe */
.lab__kitbar { width: auto; display: flex; gap: 6px; justify-content: flex-end; }
.lab__kwi { --p: 0; position: relative; width: 40px; height: 40px; padding: 3px; border: 0; border-radius: 50%; cursor: pointer; background: conic-gradient(#d9b27a calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0); }
.lab__kwi.is-full { background: conic-gradient(#e2574c calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0); }
.lab__kwi[hidden] { display: none; }
.lab__kwi span { display: block; width: 100%; height: 100%; padding: 5px; border-radius: 50%; background: rgba(15, 29, 22, .9); color: #f3ecdc; box-sizing: border-box; }
.lab__kwi svg { width: 100%; height: 100%; display: block; }
.lab__kwi:hover span, .lab__kwi:focus-visible span { background: #e07b39; color: #1a120c; }
.lab__kwi:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
.lab__kwi.is-ping { animation: kitping 1.1s ease-out 1; }
.lab__kwi { padding: 4px; width: 42px; height: 42px; }
.lab__rep-fit { font-weight: inherit; }
.lab__handring { position: absolute; z-index: 6; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none; background: conic-gradient(#f08a3c calc(var(--p, 0) * 1turn), rgba(255, 255, 255, 0.22) 0); -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }
.lab__start-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.lab__start-types.is-busy { opacity: .6; pointer-events: none; }
.lab__start-type { display: flex; flex-direction: column; gap: 3px; padding: 4px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(15, 29, 22, .7); color: inherit; font: inherit; font-size: 0.74rem; line-height: 1.15; cursor: pointer; text-align: left; }
.lab__start-type img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 7px; display: block; }
.lab__start-type.is-active { border-color: #f3d27a; box-shadow: 0 0 0 1px #f3d27a; }
@media (max-width: 520px) { .lab__start-types { grid-template-columns: repeat(2, 1fr); } }
.lab__coach { position: absolute; z-index: 8; left: 50%; top: 14%; transform: translateX(-50%); width: min(380px, calc(100% - 2rem)); padding: 18px 20px 16px; border-radius: 16px; background: rgba(15, 29, 22, .94); color: #f4efe3; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); border: 1px solid rgba(243, 210, 122, .35); }
.lab__coach-step { margin: 0 0 6px; font-size: 0.72rem; letter-spacing: .12em; text-transform: uppercase; color: #f3d27a; }
.lab__coach-art { display: flex; justify-content: center; align-items: center; min-height: 92px; color: #f4efe3; }
.lab__coach-keys { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; justify-content: center; }
.lab__coach-keys kbd { display: grid; place-items: center; height: 42px; border-radius: 9px; border: 2px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .08); font: 700 1.1rem/1 system-ui, sans-serif; color: #fff; box-shadow: 0 3px 0 rgba(255, 255, 255, .25); }
.lab__coach-keys kbd:first-child { grid-column: 2; }
.lab__coach-keys span { display: none; }
.lab__coach-pad { grid-template-columns: repeat(3, 44px); }
.lab__coach-finger, .lab__coach-goal { font-size: 54px; line-height: 1; }
.lab__coach-goal { color: #8fd14f; }
.lab__coach-title { margin: 8px 0 4px; font-size: 1.15rem; font-weight: 700; }
.lab__coach-body { margin: 0; font-size: 0.92rem; line-height: 1.45; color: rgba(244, 239, 227, .88); }
.lab__coach-body b { color: #f3d27a; }
.lab__coach-row { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.lab__coach-skip { background: none; border: 0; color: rgba(244, 239, 227, .65); font: inherit; font-size: 0.85rem; cursor: pointer; text-decoration: underline; }
.lab__coach-next { border: 0; border-radius: 999px; padding: 8px 18px; background: #e07b39; color: #1a120c; font: inherit; font-weight: 700; cursor: pointer; }
.lab__coach.is-done { border-color: #8fd14f; }
.lab__coach.is-done .lab__coach-art::after { content: '✓'; position: absolute; font-size: 64px; color: #8fd14f; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.lab__coach-art { position: relative; }
.lab__coach { pointer-events: none; top: 7%; } /* the mouse goes straight through to the garden: only the buttons take clicks */
.lab__coach button { pointer-events: auto; }
.lab__coach-keys kbd:first-child { grid-column: auto; }
.lab__coach-keys:not(.lab__coach-turn) kbd:nth-of-type(1) { grid-column: 2; grid-row: 1; }
.lab__coach-keys:not(.lab__coach-turn) kbd:nth-of-type(2) { grid-column: 1; grid-row: 2; }
.lab__coach-keys:not(.lab__coach-turn) kbd:nth-of-type(3) { grid-column: 2; grid-row: 2; }
.lab__coach-keys:not(.lab__coach-turn) kbd:nth-of-type(4) { grid-column: 3; grid-row: 2; }
.lab__coach-turn { grid-template-columns: repeat(2, 44px); }
.lab__bucket { position: absolute; z-index: 6; left: 12px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.lab__bucket-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 7px 14px; background: rgba(15, 29, 22, .85); color: #f4efe3; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.lab__bucket-btn.is-active { background: #e07b39; border-color: #e07b39; color: #1a120c; }
.lab__bucket-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: min(420px, calc(100vw - 2rem)); padding: 8px 10px; border-radius: 14px; background: rgba(15, 29, 22, .85); }
.lab__bucket-swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); background: var(--swatch); cursor: pointer; padding: 0; }
.lab__bucket-swatches button.is-active { border-color: #f3d27a; box-shadow: 0 0 0 2px #f3d27a; }
.lab__bucket-name { font-size: 0.78rem; color: rgba(244, 239, 227, .85); margin-left: 4px; }
.lab__bucket-scope { display: inline-flex; gap: 4px; margin-left: 6px; }
.lab__bucket-scope button { width: auto; height: auto; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #f4efe3; font: inherit; font-size: 0.75rem; padding: 4px 9px; cursor: pointer; }
.lab__bucket-scope button[aria-pressed="true"] { background: #f3d27a; border-color: #f3d27a; color: #1a120c; }
.lab__torchbatt { position: absolute; z-index: 6; top: 52px; left: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 999px; background: rgba(15, 29, 22, .7); color: #f4efe3; font-size: 0.72rem; font-weight: 700; pointer-events: none; }
.lab__torchbatt-fill { fill: #6fcf6b; transform-box: fill-box; transform-origin: left center; transform: scaleX(var(--lvl, 1)); transition: transform .4s; }
.lab__torchbatt[data-low="1"] .lab__torchbatt-fill { fill: #f0a03c; }
.lab__torchbatt[data-low="2"] .lab__torchbatt-fill { fill: #e5484d; }
.lab__torchbatt[data-low="2"] { animation: torchbatt-blink 1s steps(2) infinite; }
@keyframes torchbatt-blink { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .lab__torchbatt[data-low="2"] { animation: none; } }

/* status strip (top left, beside the head torch battery): arm icon with a pulsing wrist, refill icon when the cup is low */
.lab__status { position: absolute; z-index: 6; top: 52px; left: 12px; display: flex; align-items: center; gap: 6px; }
.lab__status[hidden], .lab__st[hidden], .lab__st small[hidden] { display: none; }
.lab__stage:has(#torchbatt:not([hidden])) .lab__status { left: 100px; }
.lab__st { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px 0 6px; border: 0; border-radius: 999px; background: rgba(15, 29, 22, .7); color: #f4efe3; font: 600 0.72rem/1 var(--font-sans, system-ui); }
.lab__st svg { width: 22px; height: 22px; display: block; flex: none; overflow: visible; }
.lab__st small { font: inherit; white-space: nowrap; }
.lab__st--arm #wrist { stroke: #e5484d; stroke-width: 2.2; fill: #e5484d; transform-box: fill-box; transform-origin: center; animation: wrist-pulse var(--pulse, 1.2s) ease-in-out infinite; }
@keyframes wrist-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.7); } }
.lab__st--refill { width: 32px; padding: 0; justify-content: center; cursor: pointer; box-shadow: inset 0 0 0 1.5px #f0a03c; }
.lab__st--refill:hover, .lab__st--refill:focus-visible { background: #e07b39; color: #1a120c; }
.lab__st--refill:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
@media (pointer: coarse) { .lab__st { height: 32px; } .lab__st--refill { width: 38px; } }
@media (prefers-reduced-motion: reduce) { .lab__st--arm #wrist { animation: none; } }
/* phones: icons only, and they wrap into a short column rather than run under the readout panel (top right) */
@media (max-width: 720px) { .lab__status { flex-wrap: wrap; gap: 4px; max-width: calc(46% - 20px); } .lab__stage:has(#torchbatt:not([hidden])) .lab__status { max-width: calc(46% - 108px); } .lab__st small { display: none; } .lab__st--arm { padding: 0 5px; } }

/* "?" help on the toolbar: a small button above the toolbar and a compact card for the active tool */
.lab__qm { position: absolute; right: 4px; bottom: calc(100% + 6px); z-index: 2; width: 28px; height: 28px; padding: 4px; border: 0; border-radius: 50%; background: rgba(15, 29, 22, .85); color: #f3ecdc; cursor: pointer; }
.lab__qm[hidden] { display: none; }
.lab__qm svg { width: 100%; height: 100%; display: block; }
.lab__qm:hover, .lab__qm:focus-visible, .lab__qm[aria-expanded="true"] { background: #e07b39; color: #1a120c; }
.lab__qm:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
.lab__help { position: absolute; right: 0; bottom: calc(100% + 40px); z-index: 3; width: min(300px, 100%); box-sizing: border-box; padding: 0.55rem 0.7rem 0.6rem; border-radius: 12px; background: rgba(15, 29, 22, .94); color: #f3ecdc; font-size: 0.78rem; line-height: 1.4; text-align: left; }
.lab__help[hidden] { display: none; }
.lab__help p { margin: 0; }
.lab__help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 0.25rem !important; font-size: 0.85rem; }
.lab__help-head button { flex: none; width: 24px; height: 24px; padding: 3px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.lab__help-head button:hover, .lab__help-head button:focus-visible { background: rgba(255, 255, 255, .18); }
.lab__help-head button svg { width: 100%; height: 100%; display: block; }
.lab__help-keys { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 0.4rem !important; font-size: 0.7rem; color: rgba(243, 236, 220, .8); }
.lab__help-keys[hidden] { display: none; }
.lab__help-keys kbd { font: inherit; font-weight: 700; border: 1px solid rgba(243, 236, 220, .35); border-radius: 4px; padding: 0 4px; margin: 0 1px; }
.lab.has-help .lab__hint { visibility: hidden; }
@media (max-width: 720px) { .lab__help { font-size: 0.72rem; width: calc(100% - 56px); } .lab__qm { width: 30px; height: 30px; } }
.lab__stage:has(#statusbar:not([hidden])) .lab__keys { visibility: hidden; } /* the start-of-game key tip steps aside while a status icon shows */

/* Injury controls sit beside the torch gauge. The HUD worker can align the strip. */
.lab__bloodveil { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(ellipse, transparent 40%, rgba(155, 12, 16, .8) 100%); }
.lab__eyegrit { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.lab__injury { position: absolute; top: 92px; left: 12px; right: 12px; z-index: 7; display: flex; align-items: flex-start; gap: 5px; flex-wrap: wrap; pointer-events: none; }
.lab__injury button { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 7px; color: #fff1e5; background: rgba(45, 20, 18, .9); border: 1px solid #b76554; border-radius: 9px; font: 700 11px/1.2 system-ui, sans-serif; cursor: pointer; pointer-events: auto; }
.lab__injury button[hidden], .lab__injury i[hidden] { display: none; }
.lab__injury i { display: inline-flex; font-style: normal; }
.lab__injury svg { width: 20px; height: 20px; flex: 0 0 20px; }
.lab__injury button:disabled { cursor: default; }
.lab__injury button:focus-visible { outline: 2px solid #fff1e5; outline-offset: 2px; }
#bleed-status[data-bleeding="1"] #drop { fill: #ec6560; animation: injury-pulse 1.2s ease-in-out infinite; }
.lab__bandage-ring { position: absolute; z-index: 7; top: 44%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.lab__bandage-ring > i { display: block; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(#f2bf86 calc(var(--p, 0) * 1turn), #fff3 0); mask: radial-gradient(circle, transparent 18px, #000 19px); -webkit-mask: radial-gradient(circle, transparent 18px, #000 19px); }
.lab__bandage-ring progress { position: absolute; width: 1px; height: 1px; opacity: 0; }
@keyframes injury-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { #bleed-status[data-bleeding="1"] #drop { animation: none; } }
.lab__tagcols button { width: 30px; min-width: 30px; padding: 0; background: var(--tc); border: 2px solid rgba(255, 255, 255, .35); }
.lab__tagcols button.is-active { border-color: #fff; box-shadow: 0 0 0 2px var(--tc); }

/* Every gap keeps a place on the cutting list, including work put off until later. */
[data-cut-plans] { max-width: 100%; min-width: 0; margin-top: .25rem; padding: .35rem; border: 1px solid #697b63; border-radius: 5px; background: #17271d; color: #f3ecdc; font: inherit; pointer-events: auto; }
.lab__steps:has([data-cut-plans]:not([hidden])) { max-width: min(340px, calc(100% - 1.2rem)); }
@media (max-width: 720px) { .lab__steps:has([data-cut-plans]:not([hidden])) { max-width: min(230px, calc(100% - .6rem)); } }
/* The menu is up: tools, icons and the paint bucket wait until a job starts */
.is-start #dock, .is-start #bucket, .is-start .lab__status, .is-start .lab__injury, .is-start #kitwarn, .is-start #tool-help-btn, .is-start #toolhelp, .is-start #torchbatt, .is-start #refill, .is-start #recoat { visibility: hidden !important; pointer-events: none !important; }
#st-arm { pointer-events: auto; cursor: help; }

/* clock readout (top centre): time of day, weather icon and air temperature; amber with a short card when the air is below the chosen paint's minimum */
.lab__clock { position: absolute; z-index: 6; top: 0.6rem; left: 50%; transform: translateX(-50%); pointer-events: none; display: flex; justify-content: center; }
.lab__clock, .lab__clock.is-off, .is-start .lab__clock { display: none; } /* P85: the chip moved into the phone */
.lab__clock-pill { margin: 0; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 7px; border-radius: 999px; background: rgba(15, 29, 22, .78); color: #f4efe3; font: 700 0.72rem/1 var(--font-sans, system-ui); white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.lab__clock-pill svg { width: 18px; height: 18px; flex: none; }
.lab__clock-pill [data-i] { display: none; }
.lab__clock-pill [data-ico="sun"] [data-i="sun"], .lab__clock-pill [data-ico="moon"] [data-i="moon"], .lab__clock-pill [data-ico="cloud"] [data-i="cloud"], .lab__clock-pill [data-ico="rain"] [data-i="rain"] { display: inline; }
.lab__clock-pill [data-ico="sun"] { color: #f3c04a; }
.lab__clock-pill [data-ico="moon"] { color: #c9d6f2; }
.lab__clock-pill [data-ico="rain"] { color: #8fc3ee; }
.lab__clock-pill b { font-weight: 700; }
.lab__clock-pill span { padding-left: 6px; border-left: 1px solid rgba(244, 239, 227, .3); }
.lab__clock[data-cold="1"] .lab__clock-pill { background: #f0a03c; color: #1a120c; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.lab__clock[data-cold="1"] .lab__clock-pill [data-ico] { color: #1a120c; }
.lab__clock[data-cold="1"] .lab__clock-pill span { border-color: rgba(26, 18, 12, .35); }
.lab__clock-cold { position: absolute; top: calc(100% + 0.4rem); left: 50%; transform: translateX(-50%); width: min(400px, 44cqw); box-sizing: border-box; padding: 0.45rem 0.65rem; border-radius: 10px; background: rgba(15, 29, 22, .9); color: #f4efe3; border: 1px solid #f0a03c; font: 500 0.72rem/1.3 var(--font-sans, system-ui); }
.lab__clock-cold[hidden] { display: none; }
.lab__clock-cold p { margin: 0; }
.lab__clock-cold p + p { margin-top: 0.25rem; opacity: .9; }
.lab__clock-cold p:first-child { font-weight: 700; color: #f6c778; }
.lab__stage:has(#clock-cold:not([hidden])) .lab__keys { visibility: hidden; } /* the start-of-game key tip steps aside for the cold card */
@media (max-width: 600px) {
  .lab__clock-pill { height: auto; display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 1px 3px; padding: 3px 8px; border-radius: 12px; font-size: 0.64rem; line-height: 1.15; }
  .lab__clock-pill svg { width: 14px; height: 14px; }
  .lab__clock-pill b { grid-column: 1 / -1; text-align: center; font-size: 0.66rem; }
  .lab__clock-pill span { padding: 0; border: 0; }
  .lab__clock-cold { --cw: min(230px, calc(100cqw - 190px)); top: calc(100% + 2.2rem); width: var(--cw); max-width: none; font-size: 0.66rem; transform: translateX(calc(-50% + 50cqw - 0.35rem - var(--cw) / 2)); } /* right-aligned under the stats panel; the left column keeps its own space */
}
.lab__chip small { font: 600 0.62rem/1 var(--font-sans); opacity: .7; white-space: nowrap; }
/* paint chips: swatch, then the name, then the maker's minimum temperature as a small second line that never wraps or crowds the name */
#paints-row .lab__chip:not([hidden]) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.45rem; row-gap: 3px; align-items: center; text-align: left; border-radius: 14px; line-height: 1.15; }
#paints-row .lab__chip i { grid-row: 1 / span 2; align-self: center; }
#paints-row .lab__chip span { grid-column: 2; }
#paints-row .lab__chip small { grid-column: 2; justify-self: start; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 11%, transparent); opacity: .9; letter-spacing: .02em; }
@media (max-width: 400px) { .lab__clock { left: 49%; } .lab__clock-pill { padding: 3px 5px; font-size: 0.6rem; } .lab__clock-pill b { font-size: 0.62rem; } .lab__clock-pill svg { width: 12px; height: 12px; } }

/* A blocked airless tip explains itself beside the gun. */
.lab__tip-status { position: absolute; z-index: 5; width: max-content; max-width: min(280px, calc(100% - 16px)); box-sizing: border-box; padding: .5rem .65rem; border: 1px solid #f3c98a; border-radius: 8px; background: rgba(30, 29, 22, .94); color: #fff4df; font: 500 .72rem/1.35 var(--font-sans); pointer-events: none; }
.lab__tip-status strong, .lab__tip-status span { display: block; }
.lab__tip-status strong { color: #f3c98a; margin-bottom: .2rem; }
#reverse-tip:disabled { opacity: .5; cursor: default; }

/* No visible scrollbar on the start screen (owner, 19 Oct 2026: "remove the slider on the home screen ... it's ugly"); wheel, drag and touch still scroll. */
.lab__start-menu, .lab__brief-card { scrollbar-width: none; }
.lab__start-menu::-webkit-scrollbar, .lab__brief-card::-webkit-scrollbar { display: none; }
.lab__client-verdict h3 { margin: 0; }
.lab__client-verdict button { padding: 9px 12px; border: 0; border-radius: 6px; background: #e07b39; color: #1a120c; font: inherit; font-weight: 800; cursor: pointer; }
.lab__client-verdict button:focus-visible { outline: 3px solid #f3d27a; outline-offset: 2px; }
.lab__client-task { position: absolute; top: 45px; left: 12px; z-index: 4; max-width: min(420px, 70%); margin: 0; padding: 8px 12px; border-radius: 8px; background: #14231bed; color: #f3ecdc; font-size: .75rem; pointer-events: none; }
.lab__client-verdict { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid #6b7568; } /* fixup27: padding 0 on top, the site's own section padding (up to 80 px) left a blank gap under the title */
.lab__client-verdict p { margin: 6px 0; font-size: .8rem; }
.lab__client-verdict .lab__client-stars { color: #f3d27a; font-size: 1.7rem; letter-spacing: 3px; }
@media (max-width: 720px) { .lab__client-task { top: 40px; max-width: 60%; font-size: .65rem; } }

/* Keep the blade and pencil line clear while the player saws anywhere on the canvas. */
.lab.is-sawing .lab__side, .lab.is-sawing .lab__hud, .lab.is-sawing .lab__dock, .lab.is-sawing .lab__pad, .lab.is-sawing .lab__docktab, .lab.is-sawing .lab__sheetbtn, .lab.is-sawing .lab__fences, .lab.is-sawing #zoom-btn { visibility: hidden; }
.lab__cut.is-sawing { top: .55rem; width: min(500px, calc(100% - 1.2rem)); padding: .4rem .65rem; display: grid; grid-template-columns: 1fr auto auto; align-items: center; }
.lab__cut.is-sawing .lab__cut-head { grid-column: 3; grid-row: 1; }
.lab__cut.is-sawing #cut-title, .lab__cut.is-sawing #cut-need, .lab__cut.is-sawing #cut-steps, .lab__cut.is-sawing [data-cut-plans], .lab__cut.is-sawing #cut-auto, .lab__cut.is-sawing #cut-saws { display: none; }
.lab__cut.is-sawing #cut-step { grid-column: 1; grid-row: 1; }
.lab__cut.is-sawing .lab__cut-row { grid-column: 2; grid-row: 1; }
.lab__cut.is-sawing .lab__saw-lift { margin: 0; padding: .25rem .7rem; min-height: 44px; }
.lab__saw-guide { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.lab__saw-arrow { position: absolute; color: #fff4c6; opacity: .65; font: 70px/1 system-ui, sans-serif; text-shadow: 0 1px 3px #000; }
.lab__saw-gauge { position: absolute; top: 7rem; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .3rem .6rem; border-radius: 5px; color: #ecf8df; background: #1c4836; border-bottom: 4px solid #7fca89; font: 700 12px/1.2 system-ui, sans-serif; }
.lab__saw-gauge[data-level="amber"] { background: #614619; border-color: #f0b752; }
.lab__saw-gauge[data-level="red"] { background: #6c2424; border-color: #f36c64; }
@media (max-width: 720px) { .lab__saw-gauge { top: 6rem; font-size: 11px; } .lab__saw-arrow { font-size: 58px; } }

.lab.is-sawing .lab__hint { top: 9rem; bottom: auto; left: 50%; transform: translateX(-50%); max-width: calc(100% - 2rem); text-align: center; }

.lab__cut.is-sawing .lab__cut-head button { min-width: 44px; min-height: 44px; }


/* sandpaper grit choice: three small buttons beside the sander controls and at the bench */
.lab__seg--grit button { padding: 0.3rem 0.55rem; font-size: 0.72rem; white-space: nowrap; }
.lab__seg--grit { flex: 0 1 auto; }
@media (max-width: 720px) { .lab__seg--grit button { padding: 0.28rem 0.4rem; font-size: 0.64rem; } }


@media (max-width: 400px) { .lab__clock-cold { transform: translateX(calc(-50% + 49cqw - 0.35rem - var(--cw) / 2)); } }
/* top-left stack: Left/Back/Right, then torch battery and status icons, then bleeding and grit, then the client job line and the repair steps.
   One column in the page flow, so none of them can sit on top of another whatever is showing */
.lab__tl { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 6; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: max-content; max-width: min(440px, calc(50% - 5.5rem)); pointer-events: none; }
.lab__tl > .lab__fences, .lab__tl .lab__torchbatt, .lab__tl .lab__status, .lab__tl .lab__injury, .lab__tl .lab__client-task, .lab__tl .lab__paint-ask, .lab__tl .lab__steps { position: static; inset: auto; }
.lab__tl > .lab__fences { pointer-events: auto; }
.lab__tl-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lab__tl > .lab__tl-row:not(:has(> :not([hidden]))), .lab__tl > .lab__injury:not(:has(> :not([hidden]))) { display: none; }
.lab__tl .lab__client-task, .lab__tl .lab__steps { box-sizing: border-box; max-width: 100%; }
.lab__tl .lab__injury { max-width: 100%; }
@media (max-width: 720px) {
  .lab__tl { top: 0.35rem; left: 0.35rem; gap: 4px; max-width: calc(50% - 2.9rem); }
  .lab__tl .lab__status { max-width: none !important; flex-wrap: nowrap; }
  .lab__tl .lab__client-task { font-size: .62rem; padding: 6px 8px; }
  .lab__tl .lab__steps { font-size: 0.64rem; padding: 0.35rem 0.5rem; }
}
#paints-row.is-collapsed .lab__chip[data-paint]:not(.is-recent):not(.is-active) { display: none; }

/* Screen regions reserve real space for every card, including short landscape screens. */
.has-screen-layout { --screen-head: 100px; --screen-foot: 120px; }
.lab__screen-header, .lab__screen-footer, .lab__screen-work { position: absolute; left: 8px; right: 8px; z-index: 6; pointer-events: none; }
.lab__screen-header { top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; max-height: 38%; }
.lab__screen-header #tl-stack { position: static; width: auto; max-width: none; max-height: 100%; min-width: 0; overflow: auto; pointer-events: auto; }
.lab__screen-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; max-height: 100%; overflow: auto; pointer-events: auto; }
.has-screen-layout #clock-ro, .has-screen-layout #hud { position: static; inset: auto; transform: none; max-width: 100%; box-sizing: border-box; flex: none; }
.has-screen-layout #clock-ro { display: none; } /* P85 (owner, 20 Oct 2026): the time and weather chip is gone, the phone shows them; the cold card lives in the work area */
.has-screen-layout #clock-ro[hidden], .is-start .has-screen-layout #clock-ro { display: none; }
.lab__screen-work { top: var(--screen-head); bottom: var(--screen-foot); display: flex; flex-direction: column; align-items: center; gap: 8px; overflow: auto; scrollbar-width: thin; }
.lab__screen-work > :not([hidden]) { position: static !important; inset: auto !important; transform: none !important; flex: none; width: min(560px, 100%); max-width: 100%; max-height: none; box-sizing: border-box; margin: 0; pointer-events: auto; }
.has-screen-layout #clock-cold { --cw: auto; }
.lab__screen-footer { bottom: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lab__screen-messages { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; max-height: 20cqh; overflow: auto; }
.lab__screen-messages > :not([hidden]) { position: static !important; inset: auto !important; transform: none !important; margin: 0; max-width: min(680px, 100%); white-space: normal; box-sizing: border-box; text-align: center; flex: none; }
.has-screen-layout #prompt { border-radius: 8px; width: max-content; }
.lab__screen-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; width: 100%; pointer-events: auto; }
.lab__screen-actions > :not([hidden]) { position: static !important; inset: auto !important; transform: none !important; margin: 0; flex: none; }
.lab__screen-actions:empty, .lab__screen-messages:empty { display: none; }
.has-screen-layout .lab__screen-actions .lab__sheetbtn, .has-screen-layout .lab__screen-actions .lab__docktab { display: inline-flex; }
.has-screen-layout .lab__screen-actions .lab__pad { position: relative !important; width: 108px; height: 108px; }
.has-screen-layout .lab__screen-footer #dock { position: static; inset: auto; transform: none; margin: 0; width: 100%; max-width: 1100px; pointer-events: auto; }
.has-screen-layout #bucket { max-width: 100%; }
.has-screen-layout #bucket-swatches { position: static; max-width: 100%; flex-wrap: wrap; }
.has-screen-layout.has-work-card #hud > span:not(:has(#hud-painted)):not(:has(#hud-spent)):not(#hud-mix), .has-screen-layout.is-short #hud > span:not(:has(#hud-painted)):not(:has(#hud-spent)):not(#hud-mix) { display: none; } /* P77: what the sprayer lays stays in view; the painted line is named, as the pump gauge now comes first */
.has-screen-layout.has-fixed-camera .lab__pad, .has-screen-layout.has-work-card #keyshint { display: none !important; } /* the walk pad stays under information cards; it goes only where the camera must stay still */
.has-screen-layout.has-work-card .lab__screen-header { max-height: 28%; }
.has-screen-layout.is-short .lab__screen-header { max-height: 28%; }
.has-screen-layout.is-short .lab__screen-messages { max-height: 46px; }
.has-screen-layout.is-short #tl-stack { font-size: .62rem; }
.has-screen-layout .lab__tl .lab__client-task { white-space: normal; }
.has-screen-layout #done, .has-screen-layout #start, .has-screen-layout #coach { z-index: 12; box-sizing: border-box; }
.has-screen-layout.has-result > :not(#done):not(canvas):not(.lab__poster), .has-screen-layout.has-coach > :not(#coach):not(canvas):not(.lab__poster) { visibility: hidden; }
.has-screen-layout.has-coach .lab__screen-footer .lab__pad { visibility: visible; } /* the first-play coach asks the player to use the walk pad, so it stays in view */
@media (max-width: 720px), (max-height: 480px) { /* phones: a compact coach card that sits above the walk pad instead of covering it */
  .has-screen-layout #coach { top: 6px; padding: 8px 14px 10px; max-height: calc(100% - var(--screen-foot) - 12px); overflow: auto; }
  .has-screen-layout .lab__coach-art { min-height: 0; }
  .has-screen-layout .lab__coach-keys, .has-screen-layout .lab__coach-pad { grid-template-columns: repeat(3, 34px); gap: 4px; }
  .has-screen-layout .lab__coach-turn { grid-template-columns: repeat(2, 34px); }
  .has-screen-layout .lab__coach-keys kbd { height: 30px; font-size: .9rem; }
  .has-screen-layout .lab__coach-finger, .has-screen-layout .lab__coach-goal { font-size: 36px; }
  .has-screen-layout .lab__coach-title { margin: 4px 0 2px; font-size: 1rem; }
  .has-screen-layout .lab__coach-body { font-size: .85rem; line-height: 1.35; }
  .has-screen-layout .lab__coach-row { margin-top: 6px; }
}
.is-start .lab__screen-header, .is-start .lab__screen-footer, .is-start .lab__screen-work { visibility: hidden; }
@media (max-width: 720px) {
  .lab__screen-header { left: 5px; right: 5px; top: 5px; gap: 6px; }
  .lab__screen-work, .lab__screen-footer { left: 5px; right: 5px; }
  .lab__screen-actions { gap: 4px; }
  .has-screen-layout .lab__screen-actions .lab__pad { width: 108px; height: 108px; }
  .has-screen-layout #clock-pill { display: flex; gap: 4px; }
  .has-screen-layout #clock-pill b { font-size: .62rem; }
  .has-screen-layout #hud { font-size: .58rem; }
  .has-screen-layout #toolhelp, .has-screen-layout #clock-cold { font-size: .7rem; }
  .has-screen-layout .lab__screen-actions .lab__sheetbtn { font-size: .6rem; padding: 5px; }
}
.has-screen-layout .lab__screen-actions > button { background: rgba(15,29,22,.88); color: #f3ecdc; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 9px; font: 600 .7rem/1.2 var(--font-sans,system-ui); }
.has-screen-layout #kitwarn { display: flex; flex-wrap: wrap; gap: 6px; }
.has-screen-layout .lab__screen-work { scrollbar-gutter: stable; }
.lab__side .lab__cup-note { flex-basis: auto; width: 100%; }
.has-screen-layout #kitbar { position: static; inset: auto; max-width: 100%; flex-wrap: wrap; }
.has-screen-layout .lab__screen-header #tl-stack, .has-screen-layout .lab__screen-right { min-height: 0; max-height: var(--screen-cap, 160px); }
.has-screen-layout.is-short #keyshint { display: none !important; }
.has-screen-layout .lab__screen-work > :not([hidden]) { flex: 0 1 auto; min-height: 0; max-height: 100%; overflow: auto; }
.has-screen-layout .lab__screen-header { grid-template-rows: minmax(0, 1fr); }
.has-screen-layout .lab__screen-header #tl-stack > * { flex-shrink: 0; }
.has-screen-layout.has-work-card #hint { display: none !important; }
.has-screen-layout.is-short #cut { font-size: .68rem; line-height: 1.3; padding: .4rem .6rem; gap: .25rem; }
.has-screen-layout.is-short #cut p { margin-top: 0; margin-bottom: .25rem; }
.has-screen-layout.is-short .lab__screen-actions .lab__pad { display: flex; width: auto; height: 32px; gap: 3px; }
.has-screen-layout.is-short .lab__pad [data-walk] { position: static; width: 30px; height: 30px; }
@media (min-width: 900px) and (pointer: fine) { .has-screen-layout.is-short .lab__screen-actions .lab__pad { display: none; } }
.lab__fit-slot { position: absolute; z-index: 5; width: max-content; max-width: calc(100% - 16px); box-sizing: border-box; margin: 0; padding: 5px 9px; border: 1px solid #f08a3c; border-radius: 8px; background: rgba(15,29,22,.94); color: #fff; font: 700 .72rem/1.3 var(--font-sans,system-ui); text-align: center; pointer-events: none; }
.lab__fit-slot[hidden] { display: none; }
.has-screen-layout #cut > * { flex-shrink: 0; }
.has-screen-layout .lab__tl .lab__steps { pointer-events: auto; }
.lab.is-sheet .lab__screen-work > .lab__col { display: flex; background: #0f1d16; padding: .6rem; border-radius: 10px; max-width: 560px; }
.lab.is-sheet .lab__screen-work .lab__side { max-height: none; overflow: visible; }
.lab.is-sheet .lab__screen-work .lab__sheetclose { display: block; position: static; margin: 0 0 .3rem auto; }
.has-screen-layout #kitwarn { position: static; inset: auto; width: auto; max-width: 100%; }
/* Left / Back / Right jump buttons are for touch screens only: on a desktop you walk and look with the mouse (owner, 18 Oct 2026) */
@media (hover: hover) and (pointer: fine) { .lab__fences { display: none !important; } }

/* bottom area: the toolbar and ONE row of round icon buttons share the bottom row; the hint sits alone above them */
.lab__screen-footer { container-type: inline-size; gap: 10px; }
.lab__screen-toolrow { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px; width: 100%; }
.has-screen-layout .lab__screen-toolrow #dock { flex: 1 1 520px; width: auto; min-width: 0; max-width: 1100px; }
.lab__screen-mini { display: flex; flex: none; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(15, 29, 22, .72); pointer-events: auto; }
.lab__screen-mini:not(:has(> :not([hidden]))) { display: none; }
.lab .lab__stage.has-screen-layout .lab__screen-mini > button.lab__mini:not([hidden]) { position: relative !important; inset: auto !important; transform: none !important; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; min-width: 0; padding: 0; margin: 0; gap: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background: rgba(15, 29, 22, .88); color: #f3ecdc; cursor: pointer; font: 700 .6rem/1 var(--font-sans, system-ui); }
.lab .lab__stage.has-screen-layout .lab__screen-mini > button.lab__mini:hover, .lab .lab__stage.has-screen-layout .lab__screen-mini > button.lab__mini:focus-visible, .lab .lab__stage.has-screen-layout .lab__screen-mini > button.lab__mini[aria-expanded="true"]:not(.lab__docktab) { background: #e07b39; color: #1a120c; }
.lab .lab__stage.has-screen-layout .lab__screen-mini > button.lab__mini:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
.lab .lab__stage.has-screen-layout .lab__screen-mini > button.lab__zoom.is-active { background: #e07b39; color: #1a120c; }
.lab__screen-mini > .lab__mini svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lab__screen-mini > .lab__mini > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lab__screen-mini > .lab__zoom > b { position: absolute; right: -3px; bottom: -3px; min-width: 16px; padding: 2px 3px; box-sizing: border-box; border-radius: 8px; background: #f3d27a; color: #1a120c; font: 800 .58rem/1 var(--font-sans, system-ui); text-align: center; }
.lab.is-dock-hidden .lab__docktab svg { transform: rotate(180deg); }
.lab__screen-mini > .lab__docktab svg { transition: transform .2s; }
@container (max-width: 640px) { .lab__screen-mini { order: -1; margin-left: auto; } .has-screen-layout .lab__screen-toolrow #dock { flex-basis: 100%; } }
/* the key help strip is for the first seconds of a game on a mouse and keyboard only */
.lab__keys { transition: opacity 1s; }
@media (pointer: coarse) { .lab__keys { display: none !important; } }
/* Hide tools works at every size, and the icon row stays at the bottom right when the toolbar is tucked away */
.lab.is-dock-hidden .lab__screen-toolrow #dock { display: none !important; }
.lab.is-dock-hidden .lab__screen-mini { margin-left: auto; }
.lab__key { display: inline-block; min-width: 1.2em; margin-left: 4px; padding: 0 4px; border: 1px solid currentColor; border-radius: 4px; font: 600 0.7em/1.35 system-ui, sans-serif; opacity: .75; }
@media (hover: none) { .lab__key { display: none; } }

/* Turn buttons for a carried or dragged garden thing: shown on touch screens only, while something is in hand */
.lab__turn { position: absolute; left: 0.5rem; bottom: 6.2rem; z-index: 4; display: flex; gap: 0.5rem; }
.lab__turn[hidden] { display: none; }
.lab__turn button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(245, 241, 232, .3); background: rgba(15, 29, 22, .85); color: var(--c-cream); font-size: 1.2rem; touch-action: manipulation; cursor: pointer; }
.lab__turn button:active { background: var(--c-accent); color: var(--c-bg); }

/* A small label follows the board being painted. The timing choices stay scrollable on a phone. */
.lab__board-coat { position:absolute; z-index:6; display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; max-width:210px; box-sizing:border-box; padding:4px 8px 5px; background:rgba(12,24,18,.5); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); color:#f4efe3; border-radius:999px; font:500 11px/1.25 system-ui; pointer-events:none; opacity:.95; transition:opacity .25s, left .08s linear, top .08s linear; text-shadow:0 1px 2px rgba(0,0,0,.45); }
.lab__board-coat.is-quiet { opacity:.28; }
.lab__board-coat b { font-weight:700; }
.lab__board-coat span { opacity:.85; }
.lab__board-coat progress { order:3; flex:1 0 100%; height:2px; margin:1px 0 0; border:0; background:rgba(255,255,255,.18); accent-color:#abd880; appearance:none; -webkit-appearance:none; }
.lab__board-coat progress::-webkit-progress-bar { background:rgba(255,255,255,.18); border-radius:2px; }
.lab__board-coat progress::-webkit-progress-value { background:#abd880; border-radius:2px; }
.lab__board-coat progress::-moz-progress-bar { background:#abd880; }
.lab__board-coat button { order:4; pointer-events:auto; margin-top:2px; color:#173525; background:#d5e7b8; border:0; border-radius:999px; padding:2px 8px; font:600 10px/1.3 system-ui; }
.lab__coat-choice { position:absolute; z-index:30; top:var(--screen-head,85px); left:50%; transform:translateX(-50%); width:min(420px,calc(100% - 24px)); max-height:calc(100% - var(--screen-head,85px) - 12px); overflow:auto; box-sizing:border-box; padding:12px; border:1px solid #d8bf8f; border-radius:12px; background:#152b20; color:#f4efe3; font:500 12px/1.4 system-ui; box-shadow:0 8px 24px #0005; }
.lab__coat-choice > b { display:block; font-size:14px; }
.lab__coat-choice button { display:block; width:100%; text-align:left; margin-top:8px; border:1px solid #6d876b; border-radius:7px; padding:9px; background:#243e2e; color:inherit; font:inherit; cursor:pointer; }
.lab__coat-choice button span { display:block; margin-top:3px; color:#e0e8d6; }
.lab__coat-choice #coat-risk { border-color:#d5a155; }
.lab__coat-choice #coat-warning { padding:8px; background:#584020; border-radius:7px; }
.lab__board-coat[hidden],.lab__coat-choice[hidden],.lab__board-coat button[hidden],.lab__coat-choice [hidden] { display:none; }
.is-start #board-coat,.is-start #coat-choice { display:none; }

/* paint-drift choice card: three counter-measures with pros and cons, and one tempting wrong choice */
.lab__oscard { position: absolute; top: 3.4rem; left: 50%; transform: translateX(-50%); z-index: 6; width: min(520px, calc(100% - 1.2rem)); max-height: calc(100% - 4.4rem - var(--dock-h, 0px)); overflow-y: auto;
  padding: 0.6rem 0.8rem; border-radius: 10px; background: rgba(15, 29, 22, .96); color: var(--c-cream, #f3ecdc); border-left: 4px solid #e07b39; font-size: 0.8rem; line-height: 1.3; }
.lab__oscard[hidden] { display: none; }
.lab__oscard-head { margin: 0 0 0.3rem; font-weight: 800; font-size: 1rem; }
.lab__oscard-lead { margin: 0 0 0.6rem; opacity: 0.9; }
.lab__oscard-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.lab__oscard-list button { width: 100%; display: grid; gap: 0.05rem; text-align: left; border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px; padding: 0.35rem 0.6rem; background: rgba(255, 255, 255, .05); color: inherit; font: inherit; cursor: pointer; }
.lab__oscard-list button:hover, .lab__oscard-list button:focus-visible { border-color: #e07b39; outline: none; }
.lab__oscard-pro { color: #b9e3a4; }
.lab__oscard-con { color: #f1c28f; }
.lab__oscard-row { display: flex; gap: 0.5rem; }
.lab__oscard-row button { flex: 1; padding: 0.55rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: #3a4a40; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.lab__oscard-row button:hover, .lab__oscard-row button:focus-visible { border-color: #e07b39; outline: none; }
@media (max-width: 640px) {
  .lab__oscard { top: 0.4rem; max-height: calc(100% - 0.8rem - var(--dock-h, 0px)); font-size: 0.74rem; padding: 0.55rem 0.65rem; }
  .lab__oscard-head { font-size: 0.9rem; }
  .lab__oscard-list { gap: 0.3rem; }
  .lab__oscard-list button { padding: 0.35rem 0.55rem; }
}

/* moisture meter: a small card under the battery gauge, a floating reading at the pointer, and the damp-fence choice card */
.lab__meter { position: absolute; z-index: 6; top: 84px; left: 12px; width: 178px; padding: 7px 9px 8px; border-radius: 10px; background: rgba(15, 29, 22, .82); color: #f4efe3; font-size: 0.72rem; pointer-events: none; }
.lab__meter[hidden], .lab__metertip[hidden], .lab__mchoice[hidden] { display: none; }
.lab__meter-top { display: flex; align-items: center; gap: 6px; }
.lab__meter-name { font-weight: 700; flex: 1; white-space: nowrap; }
.lab__meter-batt { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.lab__meter-fill { fill: #6fcf6b; transform-box: fill-box; transform-origin: left center; transform: scaleX(var(--lvl, 1)); transition: transform .4s; }
.lab__meter[data-low="1"] .lab__meter-fill { fill: #f0a03c; }
.lab__meter[data-low="2"] .lab__meter-fill { fill: #e5484d; }
.lab__meter[data-low="2"] .lab__meter-batt { animation: torchbatt-blink 1s steps(2) infinite; }
.lab__meter-power { pointer-events: auto; flex: none; border: 0; border-radius: 999px; padding: 2px 9px; background: #4a5a50; color: #f4efe3; font: inherit; font-weight: 700; cursor: pointer; }
.lab__meter[data-on="1"] .lab__meter-power { background: #3fa35a; }
.lab__meter-read { display: block; margin-top: 4px; font-size: 1.7rem; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lab__meter[data-on="0"] .lab__meter-read { opacity: .45; }
.lab__meter-verdict { display: block; min-height: 1.2em; font-size: 0.7rem; }
.lab__meter[data-tone="dry"] .lab__meter-read { color: #7fe08a; }
.lab__meter[data-tone="nearly"] .lab__meter-read { color: #f3d27a; }
.lab__meter[data-tone="wet"] .lab__meter-read { color: #ff8a80; }
.lab__metertip { position: absolute; z-index: 6; transform: translate(14px, -130%); padding: 3px 9px; border-radius: 999px; background: rgba(15, 29, 22, .88); color: #f4efe3; font-size: 0.75rem; font-weight: 700; white-space: nowrap; pointer-events: none; border: 1px solid transparent; }
.lab__metertip[data-tone="dry"] { border-color: #7fe08a; }
.lab__metertip[data-tone="nearly"] { border-color: #f3d27a; }
.lab__metertip[data-tone="wet"] { border-color: #ff8a80; }
.lab__mchoice { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; padding: 14px 14px 12px; border-radius: 14px; background: rgba(15, 29, 22, .96); color: #f4efe3; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.lab__mchoice-head { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; }
.lab__mchoice-body { margin: 0 0 10px; font-size: 0.82rem; line-height: 1.35; }
.lab__mopts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab__mopts--two { grid-template-columns: 1fr 1fr; }
.lab__mopt { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 8px 10px; border: 1px solid #3c5446; border-radius: 10px; background: #1b3126; color: inherit; font: inherit; font-size: 0.76rem; line-height: 1.3; cursor: pointer; }
.lab__mopt:hover, .lab__mopt:focus-visible { border-color: #f3d27a; outline: none; }
.lab__mopt b { font-size: 0.82rem; }
.lab__mopt .pro { color: #8fe29a; }
.lab__mopt .con { color: #ffb4a8; }
.lab__mopt.is-decoy { border-style: dashed; }
@media (max-width: 720px) { .lab__meter { width: 150px; top: 80px; } .lab__mopts { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .lab__meter[data-low="2"] .lab__meter-batt { animation: none; } }
.is-start #meter, .is-start #meter-tip { visibility: hidden !important; pointer-events: none !important; }

/* Job briefing (job "briefing", 18 Oct 2026): client faces on the job cards, the briefing and plan screen, one message at a time */
.lab__face { display: inline-block; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #ece7dc no-repeat 50% 22% / cover; box-shadow: 0 0 0 2px #f3d27a; }
.lab__client-task { display: flex; align-items: center; gap: 8px; }
.lab__client-task .lab__face { width: 26px; height: 26px; box-shadow: 0 0 0 1.5px #f3d27a; }
.lab__brief { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 14, 11, .8); }
.lab__brief[hidden] { display: none; }
.lab__brief-card { width: min(880px, 100%); max-height: 100%; overflow-y: auto; display: grid; gap: 12px; padding: 16px 18px 18px; border: 1px solid #6b7568; border-radius: 14px; background: #14231b; color: #f3ecdc; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); scrollbar-width: thin; scrollbar-color: #56685a transparent; }
.lab__brief-card h3:focus { outline: none; }
.lab__brief-dots { display: flex; gap: 5px; margin: 0; padding: 0; list-style: none; }
.lab__brief-dots li { width: 26px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.lab__brief-dots li.is-done { background: #8aa58e; }
.lab__brief-dots li.is-on { background: #e07b39; }
.lab__brief-who { display: flex; align-items: center; gap: 12px; }
.lab__brief-who .lab__face { width: 68px; height: 68px; box-shadow: 0 0 0 3px #f3d27a; }
.lab__brief-who.is-small .lab__face { width: 36px; height: 36px; box-shadow: 0 0 0 2px #f3d27a; }
.lab__brief-kicker { margin: 0; color: #f3d27a; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lab__brief-name { margin: 0; font-size: 1.4rem; line-height: 1.2; }
.lab__brief-who.is-small .lab__brief-name { font-size: .95rem; font-weight: 700; }
.lab__brief-job { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; align-items: start; }
.lab__brief-house { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; display: block; }
.lab__brief-side { display: grid; gap: 10px; min-width: 0; }
.lab__brief-say { margin: 0; padding: 2px 0 2px 12px; border-left: 3px solid #e07b39; font-size: .95rem; line-height: 1.45; font-style: italic; }
.lab__brief-facts { display: grid; gap: 5px; margin: 0; font-size: .82rem; line-height: 1.35; }
.lab__brief-facts div { display: grid; grid-template-columns: 5.6em 1fr; gap: 8px; }
.lab__brief-facts dt { opacity: .7; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding-top: 1px; }
.lab__brief-facts dd { margin: 0; }
.lab__brief-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lab__brief-row button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: #e07b39; color: #1a120c; font: inherit; font-weight: 800; cursor: pointer; }
.lab__brief-row button:hover { background: #ee8c4a; }
.lab__brief-row button.is-quiet { background: transparent; color: #f3ecdc; border: 1px solid rgba(255, 255, 255, .3); font-weight: 700; }
.lab__brief-row button.is-quiet:hover { border-color: #f3d27a; }
.lab__brief-row button:disabled { opacity: .45; cursor: default; }
.lab__brief-row button:focus-visible, .lab__brief-opt:focus-visible { outline: 3px solid #f3d27a; outline-offset: 2px; }
.lab__brief-plan { display: grid; gap: 8px; }
.lab__brief-step { margin: 0; color: #f3d27a; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lab__brief-title { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.lab__brief-lead { margin: 0; font-size: .88rem; line-height: 1.45; opacity: .92; }
.lab__brief-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.lab__brief-opt { display: grid; align-content: start; gap: 4px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; background: rgba(255, 255, 255, .04); color: inherit; font: inherit; font-size: .82rem; line-height: 1.38; text-align: left; cursor: pointer; }
.lab__brief-opt:hover { border-color: rgba(243, 210, 122, .7); }
.lab__brief-opt[aria-pressed="true"] { border-color: #e07b39; background: rgba(224, 123, 57, .16); box-shadow: 0 0 0 1px #e07b39; }
.lab__brief-opt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lab__brief-opt-top strong { font-size: .9rem; }
.lab__brief-opt-top em { flex: none; padding: 1px 7px; border-radius: 999px; background: #344337; font-style: normal; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.lab__brief-pro { color: #bfe3ad; }
.lab__brief-con { color: #f4c793; }
.lab__brief-why { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid #e07b39; border-radius: 10px; background: #251d16; font-size: .88rem; line-height: 1.45; }
.lab__brief-why p { margin: 0; }
.lab__brief-why-head { font-weight: 800; color: #ffb27a; }
.lab__brief-sum { display: grid; gap: 6px; margin: 4px 0; padding: 0; list-style: none; font-size: .9rem; }
.lab__brief-sum li { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.lab__brief-sum b { color: #f3d27a; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.lab__brief-error { margin: 0; color: #ffb9a3; font-weight: 700; }
@media (max-width: 720px) {
  .lab__brief { padding: 6px; align-items: stretch; }
  .lab__brief-card { padding: 12px; gap: 10px; border-radius: 12px; }
  .lab__brief-job { grid-template-columns: 1fr; gap: 10px; }
  .lab__brief-house { aspect-ratio: 2 / 1; }
  .lab__brief-who .lab__face { width: 52px; height: 52px; }
  .lab__brief-name { font-size: 1.15rem; }
  .lab__brief-say { font-size: .85rem; }
  .lab__brief-facts { font-size: .78rem; }
  .lab__brief-opts { grid-template-columns: 1fr; }
  .lab__brief-opt { padding: 9px 10px; font-size: .78rem; }
  .lab__brief-title { font-size: 1.05rem; }
  .lab__brief-lead { font-size: .82rem; }
  .lab__brief-row { position: sticky; bottom: -12px; margin: 0 -12px -12px; padding: 8px 12px 10px; background: #14231b; border-top: 1px solid rgba(255, 255, 255, .12); }
  .lab__brief-row button { flex: 1; padding: 10px 12px; }
  .lab__brief-sum li { grid-template-columns: 6em 1fr; }
}
.has-screen-layout #tl-stack #meter { position: static; inset: auto; } /* the meter card stacks under the job ticker instead of floating over the work cards */
.has-screen-layout .lab__screen-header:has(#meter:not([hidden])) { max-height: 46%; }
.has-screen-layout .lab__screen-header #tl-stack:has(> #meter:not([hidden])) { max-height: 100%; } /* room for the whole meter card, so its power button is never cut off */
.has-screen-layout #tl-stack #meter { max-width: 100%; box-sizing: border-box; }
.has-screen-layout #tl-stack .lab__meter-top { flex-wrap: wrap; row-gap: 3px; } /* a narrow phone column: the power button drops under the name rather than being cut off */
/* The stats column (clock, job HUD, kit icons) must fit without scrolling: a scroll box here drew a white scrollbar track with a grey thumb floating under the HUD (owner, 18 Oct 2026). It may grow to the header's own limit, and if a very short screen still overflows it scrolls without drawing a bar. */
.has-screen-layout .lab__screen-right, .has-screen-layout .lab__screen-header #tl-stack { max-height: 100%; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.has-screen-layout .lab__screen-right::-webkit-scrollbar, .has-screen-layout .lab__screen-header #tl-stack::-webkit-scrollbar { display: none; }
/* the two moisture meters on the Protection tab: price, accuracy and power side by side */
.lab__metercards { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.lab__metercard { flex: 1 1 150px; display: grid; gap: 3px; text-align: left; padding: 8px 10px; border: 1px solid #3c5446; border-radius: 10px; background: #1b3126; color: inherit; font: inherit; font-size: 0.74rem; line-height: 1.3; cursor: pointer; }
.lab__metercard b { font-size: 0.82rem; }
.lab__metercard em { font-style: normal; font-weight: 700; color: var(--c-accent-2, #f0b27a); }
.lab__metercard .pc.pro { color: #8fe29a; }
.lab__metercard .pc.con { color: #ffb4a8; }
.lab__metercard.is-active { border-color: var(--c-accent); background: rgba(217, 119, 66, .18); }
.lab__meter[data-partial="1"] .lab__meter-read { opacity: .6; font-style: italic; }

/* rain cover tool: what to do next, which fixings, battens, taking a cover off. It sits in the sky above the fence, out of the way of the boards. */
.lab__cover { position: absolute; z-index: 8; top: 0.6rem; left: 50%; transform: translateX(-50%); width: min(500px, calc(100% - 3.4rem)); padding: 0.45rem 0.6rem; border-radius: 10px; background: rgba(15, 29, 22, .93); color: var(--c-cream, #f3ecdc); border-left: 4px solid #8fd14f; font-size: 0.74rem; line-height: 1.3; }
.lab__cover[hidden], .lab__cover [hidden] { display: none; }
.lab__cover-head { margin: 0 0 0.2rem; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 0.82rem; }
.lab__cover-step { margin: 0 0 0.3rem; opacity: 0.95; }
.lab__cover-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.lab__cover button { flex: none; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 3px 9px; background: rgba(255, 255, 255, .07); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.lab__cover button:hover, .lab__cover button:focus-visible { border-color: #8fd14f; outline: none; }
.lab__cover button.is-active { background: #8fd14f; color: #14210f; border-color: #8fd14f; }
.lab__cover button:disabled { opacity: .4; cursor: default; }
.lab__cover-head button { background: #e07b39; color: #1a120c; border-color: #e07b39; }
@media (max-width: 640px) { .lab__cover { top: 2.5rem; width: calc(100% - 0.8rem); z-index: 8; font-size: 0.64rem; padding: 0.35rem 0.5rem; } .lab__cover button { padding: 2px 7px; } .lab__cover-step { margin-bottom: 0.2rem; } }

.lab__cvcard { z-index: 8; }
.lab__cover-note { margin: 4px 0 0; font-size: 0.72rem; line-height: 1.35; opacity: 0.9; }
.lab__own { display: block; margin-top: 2px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em; color: #8fd14f; }
.lab__seg button.is-owned, .lab__metercard.is-owned { border-color: rgba(143, 209, 79, .6); }
.lab__seg button.is-owned .lab__own { display: inline; margin: 0 0 0 6px; }

/* P47: the side gate's controls in the action row: Make room, and the carry bar while you hold something; the van list in the card */
.lab__makeroom, .lab__vanbar button { font: 700 0.78rem/1.1 var(--font-sans); padding: 0.42rem 0.8rem; border-radius: 999px; border: 1px solid #e07b39; background: rgba(15, 29, 22, .9); color: var(--c-cream, #f3ecdc); cursor: pointer; }
.lab__makeroom:hover, .lab__makeroom:focus-visible, .lab__vanbar button:hover, .lab__vanbar button:focus-visible { background: #e07b39; color: #10241a; outline: none; }
.lab__vanbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.lab__vanbar[hidden], .lab__makeroom[hidden], .lab__vanbar button[hidden] { display: none; }
.lab__oscard-list button.is-on { border-color: #e07b39; background: rgba(224, 123, 57, .14); }
.lab__van-note { font-size: 0.74rem; opacity: 0.8; margin-top: 0.5rem; }
.lab__van-head { margin-top: 0.4rem; font-size: 0.86rem; }
.lab__van-list { list-style: none; margin: 0 0 0.55rem; padding: 0; display: grid; gap: 0.25rem; }
.lab__van-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.lab__van-list button { flex: none; padding: 0.3rem 0.6rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: #3a4a40; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.lab__van-list button:hover, .lab__van-list button:focus-visible { border-color: #e07b39; outline: none; }
.has-screen-layout .lab__vancard { max-height: calc(100% - 3.8rem - var(--screen-foot, 120px)); } /* the card stops above the action row and the toolbar, and scrolls */
@media (max-width: 640px) { .has-screen-layout .lab__vancard { max-height: calc(100% - 0.8rem - var(--screen-foot, 120px)); } }
/* Three tiers for every tool (tiers.js): Dear, Cheaper and Free, each with its price or "You own this" */
.lab__tiercard { z-index: 9; }
.lab__tier-row { margin: 0.5rem 0 0.25rem; font-weight: 700; font-size: 0.86rem; }
.lab__tier-head { display: flex; align-items: baseline; gap: 0.45rem; }
.lab__tier-badge { flex: none; font-style: normal; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.05rem 0.4rem; border-radius: 999px; background: #3a4a40; color: #fff; }
.lab__tier--dear .lab__tier-badge { background: #8a4b1f; }
.lab__tier--cheaper .lab__tier-badge { background: #2f6a8a; }
.lab__tier--free .lab__tier-badge { background: #3f7a3a; }
.lab__tier-price { font-weight: 800; color: #ffe2b8; }
.lab__tier-price.is-owned { color: #9fe39a; }
.lab__tier-price.is-confirm { color: #ffd36e; }
.lab__tier-meta { font-size: 0.78em; opacity: 0.78; }
.lab__oscard-list button.is-blocked { opacity: 0.55; cursor: not-allowed; }
#tier-go:disabled { opacity: 0.5; cursor: not-allowed; }
.lab__tiercard.is-multi { width: min(900px, calc(100% - 1.2rem)); }
.lab__tiercard.is-multi .lab__tier-list { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .lab__tiercard.is-multi .lab__tier-list { grid-template-columns: 1fr; } }

/* ---------- The player's phone (P53, 19 Oct 2026): phone.js ---------- */
.lab__phonebtn { position: relative; flex: none; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(244, 239, 227, .3); background: rgba(15, 29, 22, .82); color: #f4efe3; cursor: pointer; pointer-events: auto; }
.lab__phonebtn svg { width: 20px; height: 20px; }
.lab__phonebtn:hover, .lab__phonebtn:focus-visible { border-color: #e07b39; outline: none; }
.lab__phonebtn[aria-expanded="true"] { background: #e07b39; border-color: #e07b39; color: #1a120c; }
.lab__phonebtn .ph-dot { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 9px; background: #e5483c; color: #fff; font: 700 0.64rem/17px system-ui, sans-serif; font-style: normal; text-align: center; }
.lab__phonebtn .ph-dot[hidden] { display: none; }
.lab__phonebtn.is-hud { align-self: flex-end; }
.has-phone .lab__screen-right { padding: 6px 6px 0 0; margin: -6px -6px 0 0; } /* room for the red number on the button */
.lab__phonebtn.is-start { position: absolute; top: 12px; right: 12px; z-index: 21; width: 42px; height: 42px; }
.lab__phonebtn.is-start svg { width: 24px; height: 24px; }
.lab__phone { position: absolute; inset: 0; z-index: 45; }
.lab__phone[hidden] { display: none; }
.lab__phone-scrim { position: absolute; inset: 0; background: rgba(8, 14, 11, 0); transition: background .3s; touch-action: none; }
.lab__phone.is-open .lab__phone-scrim { background: rgba(8, 14, 11, .5); }
.lab__phone-dev { position: absolute; right: 14px; bottom: 14px; height: calc(100% - 28px); max-height: 700px; aspect-ratio: 9 / 18.5; max-width: calc(100% - 28px); box-sizing: border-box; padding: 9px; border-radius: 40px; background: #0d100f; box-shadow: inset 0 0 0 2px #2a2f2c, 0 22px 54px rgba(0, 0, 0, .6); transform: translateY(110%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); outline: none; }
.lab__phone.is-open .lab__phone-dev { transform: none; }
.lab__phone-dev::before { content: ""; position: absolute; top: 5px; left: 50%; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: #2c312e; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .lab__phone-dev, .lab__phone-scrim { transition: none; } }
@media (max-width: 600px) { /* on a phone the device is a full height sheet over the whole screen */
  .lab__phone { position: fixed; z-index: 900; }
  .lab__phone-dev { inset: 0; right: 0; bottom: 0; height: 100%; max-height: none; max-width: none; width: 100%; aspect-ratio: auto; padding: 0; border-radius: 0; box-shadow: none; }
  .lab__phone-dev::before { display: none; }
  .ph-screen { border-radius: 0 !important; }
  .ph-status { height: auto; padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 4px; }
}
.ph-screen { --ph-fg: #fff; position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 31px; color: var(--ph-fg); font: 500 0.82rem/1.35 var(--font-sans, system-ui, sans-serif); text-align: left;
  background: radial-gradient(120% 55% at 18% 6%, #9fcab9 0, transparent 62%), radial-gradient(90% 45% at 88% 58%, #aac99b 0, transparent 62%), linear-gradient(172deg, #62a9a3 0%, #86baa9 42%, #74afae 100%); }
.ph-screen:not([data-view="home"]) { --ph-fg: #18221d; background: #f2f5f1; }
.ph-screen button { font: inherit; color: inherit; }
.ph-status { flex: none; height: 32px; padding: 13px 20px 0 24px; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.74rem; }
.ph-bars svg { display: block; }
.ph-bars svg path, .ph-bars svg rect:last-child { fill: currentColor; }
.ph-bars svg rect:first-of-type { stroke: currentColor; }
.ph-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 2px 10px 8px 6px; }
.ph-head[hidden] { display: none; }
.ph-back { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ph-back svg { width: 22px; height: 22px; }
.ph-back:hover, .ph-back:focus-visible { background: rgba(24, 34, 29, .1); outline: none; }
.ph-title { margin: 0; font-size: 1.2rem; font-weight: 800; }
.ph-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 14px; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; }
.ph-screen[data-view="home"] .ph-body { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ph-homebar { flex: none; height: 24px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; }
.ph-homebar i { width: 96px; height: 4px; border-radius: 2px; background: currentColor; opacity: .55; }
.ph-home { flex: 1; display: flex; flex-direction: column; padding: 14px 20px 6px; min-height: 0; }
.ph-bigtime { margin: 6px 0 0; font-size: 3.2rem; line-height: 1; font-weight: 700; letter-spacing: -.02em; text-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 6px; margin-top: 30px; }
.ph-app { display: block; min-height: 72px; padding: 2px 0; border: 0; background: none; text-align: center; cursor: pointer; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
.ph-app:hover .ph-ico, .ph-app:focus-visible .ph-ico { transform: translateY(-2px) scale(1.04); }
.ph-app:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ph-ico { position: relative; display: block; width: 58px; height: 58px; margin: 0 auto; transition: transform .15s; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .22)); }
.ph-ico svg { display: block; width: 100%; height: 100%; }
.ph-badge { position: absolute; top: -7px; right: -9px; min-width: 22px; height: 22px; padding: 0 5px; box-sizing: border-box; border-radius: 11px; background: #e5483c; color: #fff; font: 700 0.78rem/22px var(--font-sans, system-ui, sans-serif); text-align: center; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.ph-lbl { display: block; margin-top: 6px; font-size: 0.76rem; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .28); }
.ph-note { margin: 4px 2px 10px; color: #4a5a50; font-size: 0.8rem; }
.ph-note.is-warn { padding: 8px 10px; border-radius: 10px; background: #fdecc8; color: #5c3b06; }
.ph-sub { display: block; color: #5a6a60; font-size: 0.76rem; font-weight: 500; }
.ph-h3 { margin: 14px 2px 6px; font-size: 0.74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5a6a60; }
.ph-list { display: flex; flex-direction: column; }
.ph-mail { position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; margin: 0 0 8px; padding: 10px 10px 10px 12px; text-align: left; background: #fff; border: 1px solid #dfe5df; border-radius: 14px; cursor: pointer; }
.ph-mail:hover, .ph-mail:focus-visible { border-color: #86bde6; outline: none; box-shadow: 0 0 0 2px rgba(134, 189, 230, .35); }
.ph-mail.is-new { background: #eaf3fc; border-color: #b8d5ee; } /* P85: unread: a tinted row, a blue dot, the sender and subject in bold */
.ph-mail.is-new::before { content: ""; position: absolute; left: 3px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #1f78c8; }
.ph-mail.is-new .ph-from { font-weight: 800; }
.ph-mail .ph-face { margin-left: 4px; }
.ph-face { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d5ddd5; }
.ph-mail-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ph-mail-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.ph-from { font-weight: 700; }
.ph-subject { font-weight: 600; font-size: 0.8rem; }
.ph-preview { color: #5a6a60; font-size: 0.76rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
/* P84: everyday mail round the job offers: letter avatars and the "when". P85: no Job tag; read rows are plain white with no dot */
.ph-mail .ph-from { min-width: 0; overflow-wrap: break-word; }
.ph-when { margin-left: auto; flex: none; padding-left: 4px; color: #6a7a70; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.ph-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ph-mail .ph-subject { font-weight: 700; color: #2c3a32; }
.ph-mail.is-new .ph-subject { font-weight: 800; color: #18221d; }
.ph-mail:not(.is-new) { background: #fff; }
.ph-mail:not(.is-new) .ph-from { font-weight: 500; color: #3c4a42; }
.ph-mail:not(.is-new) .ph-subject { font-weight: 500; color: #3c4a42; }
.ph-mail:not(.is-new) .ph-preview { color: #76847b; }
.ph-letter { display: inline-grid; place-items: center; color: #fff; font-size: 1.05rem; font-weight: 800; background-image: none; }
.ph-msgtext { margin: 0; padding: 10px 12px; background: #fff; border: 1px solid #dfe5df; border-radius: 12px; font-size: 0.86rem; line-height: 1.45; }
.ph-delete { align-self: flex-start; min-height: 44px; min-width: 96px; padding: 10px 18px; border: 1px solid #c9a39a; border-radius: 12px; background: #fff; color: #8c2f1f; font-weight: 800; font-size: 0.88rem; cursor: pointer; }
.ph-delete:hover, .ph-delete:focus-visible { background: #fbe9e4; outline: none; box-shadow: 0 0 0 2px rgba(214, 73, 47, .3); }
.ph-mailacts { display: flex; flex-wrap: wrap; gap: 8px; } /* P85: Mark as unread, and Delete on everyday mail */
.ph-mailacts .ph-delete { align-self: auto; }
.ph-unread { min-height: 44px; padding: 10px 16px; border: 1px solid #9fc3e4; border-radius: 12px; background: #fff; color: #1d5f9c; font-weight: 800; font-size: 0.88rem; cursor: pointer; }
.ph-unread:hover, .ph-unread:focus-visible { background: #eaf3fc; outline: none; box-shadow: 0 0 0 2px rgba(31, 120, 200, .3); }
.ph-empty { display: grid; justify-items: center; gap: 10px; margin: 40px 10px; text-align: center; color: #4a5a50; }
.ph-empty .ph-ico { width: 64px; height: 64px; opacity: .75; }
.ph-empty p { margin: 0; font-size: 0.95rem; font-weight: 600; }
.ph-mailopen { display: flex; flex-direction: column; gap: 10px; }
.ph-subjectline { margin: 2px 2px 0; font-size: 1rem; font-weight: 800; }
.ph-mail-head { display: flex; align-items: center; gap: 10px; }
.ph-house { width: 100%; aspect-ratio: 3 / 1.5; object-fit: cover; border-radius: 12px; display: block; }
.ph-say { margin: 0; padding: 8px 10px; border-left: 3px solid #86bde6; background: #e9f1f6; border-radius: 0 10px 10px 0; font-size: 0.8rem; }
.ph-facts { margin: 0; display: grid; gap: 1px; background: #dfe5df; border: 1px solid #dfe5df; border-radius: 12px; overflow: hidden; }
.ph-facts > div { display: grid; grid-template-columns: 7.2em 1fr; gap: 8px; padding: 7px 10px; background: #fff; }
.ph-facts dt { color: #5a6a60; font-size: 0.74rem; font-weight: 700; }
.ph-facts dd { margin: 0; font-size: 0.78rem; }
.ph-primary { min-height: 44px; padding: 12px 16px; border: 0; border-radius: 12px; background: #e07b39; color: #1a120c; font-weight: 800; font-size: 0.92rem; cursor: pointer; }
.ph-primary:hover:not(:disabled), .ph-primary:focus-visible { background: #ee8c4b; outline: none; box-shadow: 0 0 0 3px rgba(224, 123, 57, .35); }
.ph-primary:disabled { background: #cfd6cf; color: #6d7a72; cursor: not-allowed; }
.ph-balance { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: linear-gradient(150deg, #20362b, #2f5a3d); color: #fff; margin-bottom: 10px; }
.ph-balance .ph-sub { color: #cfe3d4; }
.ph-money { font-size: 2rem; line-height: 1.1; font-weight: 800; }
.ph-money.is-neg { color: #ffb4a8; }
.ph-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ph-jobs li { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 8px 10px; background: #fff; border: 1px solid #dfe5df; border-radius: 12px; }
.ph-stars { color: #c98a10; font-size: 0.78rem; letter-spacing: 1px; }
.ph-result { grid-column: 1 / -1; color: #2f5a3d; font-size: 0.78rem; font-weight: 600; }
.ph-result.is-neg { color: #a8321f; }
.ph-wxnow { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: linear-gradient(150deg, #cfe5ee, #e6f0d9); }
.ph-wxico svg { width: 54px; height: 54px; display: block; }
.ph-wxtemp { display: block; font-size: 2.1rem; line-height: 1; font-weight: 800; }
.ph-shower { margin: 10px 2px 0; padding: 8px 10px; border-radius: 10px; background: #e3eef6; font-weight: 600; font-size: 0.8rem; }
.ph-hours { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ph-hours li { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; background: #fff; border: 1px solid #dfe5df; border-radius: 10px; }
.ph-hours li.is-now { border-color: #e07b39; box-shadow: 0 0 0 2px rgba(224, 123, 57, .3); }
.ph-hlbl { font-size: 0.68rem; color: #5a6a60; font-weight: 600; }
.ph-hico svg { width: 26px; height: 26px; display: block; }
.ph-wxsky { margin-top: 2px; font-weight: 700; color: #2c3a32; }
.ph-hourly { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } /* P85: hour by hour to the end of the working day */
.ph-hourly li { display: grid; grid-template-columns: 3.4em 26px 2.6em 1fr auto; align-items: center; gap: 8px; padding: 5px 10px; background: #fff; border: 1px solid #dfe5df; border-radius: 10px; font-size: 0.8rem; }
.ph-hourly li.is-rain { background: #e3eef6; border-color: #b8d5ee; }
.ph-hwind { color: #5a6a60; }
.ph-hrain { color: #1d5f9c; font-weight: 700; }
.ph-boardwx { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.ph-boardwx li { display: grid; gap: 0; padding: 7px 10px; background: #fff; border: 1px solid #dfe5df; border-radius: 10px; font-size: 0.78rem; }
.ph-boardwx li span { color: #5a6a60; }
.ph-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; margin-bottom: 8px; border-radius: 12px; background: #dde4de; }
.ph-tabs button { padding: 7px 4px; border: 0; border-radius: 9px; background: none; font-weight: 700; font-size: 0.76rem; cursor: pointer; }
.ph-tabs button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.ph-tabs button:focus-visible { outline: 2px solid #2f86d1; }
.ph-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: #dfe5df; border: 1px solid #dfe5df; border-radius: 12px; overflow: hidden; }
.ph-rows li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 10px; background: #fff; font-size: 0.8rem; }
.ph-rows li b { font-weight: 700; text-align: right; }
.ph-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #e3e9e3; overflow: hidden; }
.ph-bar i { display: block; height: 100%; border-radius: 3px; background: #3f9b5e; }
.ph-bar.is-low i { background: #d6492f; }
.ph-soon { display: grid; justify-items: center; gap: 6px; padding: 30px 16px; text-align: center; }
.ph-soon .ph-ico { width: 84px; height: 84px; margin-bottom: 6px; }
.ph-soon h3 { margin: 0; font-size: 1.1rem; }
.ph-soon p { margin: 0; color: #4a5a50; }
.ph-tray { display: flex; align-items: center; gap: 8px; }
.ph-x { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(24, 34, 29, .12); color: inherit; cursor: pointer; }
.ph-screen[data-view="home"] .ph-x { background: rgba(255, 255, 255, .25); }
.ph-x svg { width: 14px; height: 14px; }
.ph-x:hover, .ph-x:focus-visible { background: rgba(224, 123, 57, .9); color: #1a120c; outline: none; }
.ph-mailopen .ph-primary { position: sticky; bottom: 0; box-shadow: 0 -8px 10px 4px #f2f5f1; }
.ph-mailopen .ph-primary:disabled { box-shadow: 0 -8px 10px 4px #f2f5f1; }
/* P124: Report a bug on the phone: plain boxes, a helper line under each, the facts we also send, and the email fallback */
.bug-form { display: flex; flex-direction: column; gap: 12px; }
.bug-field { display: flex; flex-direction: column; gap: 4px; }
.bug-field label, .bug-often legend { font-weight: 800; font-size: 0.86rem; color: #18221d; }
.bug-field textarea, .bug-field input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 9px 11px; border: 1px solid #b9c7bd; border-radius: 12px; background: #fff; color: #18221d; font: inherit; font-size: 16px; resize: vertical; } /* 16 px: a phone does not zoom in */
.bug-field textarea:focus, .bug-field input:focus { outline: 0; border-color: #2f86d1; box-shadow: 0 0 0 2px rgba(47, 134, 209, .25); }
.bug-help { margin: 0 2px; color: #4a5a50; font-size: 0.76rem; }
.bug-often { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; border: 0; }
.bug-often legend { padding: 0; margin-bottom: 6px; }
.bug-often label, .bug-tick { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; cursor: pointer; }
.bug-often input, .bug-tick input { width: 20px; height: 20px; margin: 0; accent-color: #e07b39; }
.bug-tick { font-weight: 800; }
.bug-tick + .bug-help { margin-top: -10px; }
.bug-also { padding: 2px 10px 8px; border-radius: 12px; background: #e6ece6; }
.bug-also .ph-h3 { margin-top: 8px; }
.bug-also ul { margin: 0 0 6px; padding: 0; list-style: none; font-size: 0.76rem; color: #2f3d35; overflow-wrap: anywhere; }
.bug-also li { padding: 2px 0; }
.bug-also ol { margin: 4px 0 0; padding-left: 18px; }
.bug-also summary { cursor: pointer; }
.bug-status { margin: 0; font-size: 0.84rem; }
.bug-status:empty { display: none; }
.bug-status.is-warn { padding: 8px 10px; border-radius: 10px; background: #fdecc8; color: #5c3b06; }
.bug-mailto { display: inline-block; margin-top: 6px; font-weight: 800; color: #1d5f99; }
.bug-form .ph-primary { position: sticky; bottom: 0; box-shadow: 0 -8px 10px 4px #f2f5f1; }
.bug-done { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.bug-thanks { margin: 0; padding: 14px; border-radius: 12px; background: #dff1e3; color: #17452a; font-weight: 800; font-size: 0.95rem; }
@media (max-width: 600px) { .ph-status { font-size: 0.8rem; } .ph-app { min-height: 80px; } .ph-body { padding-bottom: 18px; } }
/* P84: on a phone the phone's own Close, Back and Home bar are 44 px to tap; Close and Back look the same size as before */
@media (max-width: 600px) { .ph-x { width: 44px; height: 44px; margin: -8px; padding: 8px; background-clip: content-box; } .ph-back { width: 44px; height: 44px; margin: -3px; } .ph-homebar { height: 44px; } .ph-screen[data-view="home"] .ph-x, .ph-x:hover, .ph-x:focus-visible { background-clip: content-box; } }
.ph-title { display: flex; align-items: center; gap: 8px; }
.ph-title-ico { width: 26px; height: 26px; filter: none; transition: none; }
.ph-tabs.is-small { margin: 10px 0 8px; background: none; padding: 0; gap: 6px; }
.ph-tabs.is-small button { border: 1px solid #cfd8d0; background: #fff; }
.ph-tabs.is-small button.is-on { background: #18221d; color: #fff; border-color: #18221d; box-shadow: none; }
.ph-soon.is-inline { padding: 14px 10px 6px; }
.ph-soon.is-inline .ph-ico { width: 64px; height: 64px; }
.ph-tiers { display: grid; gap: 8px; }
.ph-tier { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px dashed #b9c6bb; }
.ph-tier b { font-size: 0.92rem; }
.ph-tier span { grid-column: 1; color: #5a6a60; font-size: 0.76rem; }
.ph-tier em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-size: 0.7rem; font-weight: 700; color: #7a5a1a; background: #f8efc8; padding: 2px 8px; border-radius: 8px; }
.ph-tier.is-dear { border-left: 4px solid #c98a10; } .ph-tier.is-cheaper { border-left: 4px solid #86bde6; } .ph-tier.is-free { border-left: 4px solid #48b95e; }
.ph-title .ph-title-ico { margin: 0; flex: none; }
/* While you wait (P58): a small list of real things to do during a wait, with the countdown and the skip */
.lab__waitbox { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); z-index: 4; width: min(17rem, 44%); display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; border-radius: 14px; background: rgba(20, 30, 38, .86); color: #e8eef3; font-size: 0.8rem; line-height: 1.35; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.lab__waitbox[hidden] { display: none; }
.lab__waitbox p { margin: 0; }
.lab__waitbox-head { color: #f3d27a; text-transform: uppercase; letter-spacing: .06em; font-size: 0.7rem; }
.lab__waitbox-go { border: 0; border-radius: 999px; padding: 6px 12px; background: #e07b39; color: #1a120c; font: inherit; font-weight: 700; cursor: pointer; }
.lab__waitbox-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.lab__waitbox-list button { border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(255, 255, 255, .14); color: #e8eef3; font: inherit; cursor: pointer; }
.lab__waitbox-list button:hover, .lab__waitbox-go:hover { filter: brightness(1.15); }
.lab__waitbox button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 1px; }
@media (max-width: 640px) { .lab__waitbox { top: 7.5rem; transform: none; width: min(15rem, 52%); font-size: 0.72rem; } }
/* fixup27: phones with the screen layout: the panel sits between the top readouts and the footer (rain strip, walk arrows, tools)
   and scrolls inside itself when the gap is short, so it never lies over them. On short phones the message row grows to hold
   the hint and the rain strip together, so the strip never runs into the walk arrows. */
@media (max-width: 640px) { .has-screen-layout .lab__waitbox { top: var(--screen-head); max-height: calc(100% - var(--screen-head) - var(--screen-foot)); box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; } }
.has-screen-layout.is-short .lab__screen-messages:has(#rainbar:not([hidden])) { max-height: 64px; }
.lab__waitbox-more summary { cursor: pointer; color: #cfd8df; font-size: 0.75rem; margin-bottom: 5px; }
.lab__waitbox-more[open] summary { margin-bottom: 6px; }

/* P55: arriving at a job. One big prompt by the van doors or the gate, the van's list in a panel by the van, and the dock
   showing which tools are still packed in the van */
.lab__bigprompt { position: absolute; z-index: 5; left: 0; top: 0; padding: 0.55rem 1.1rem; border-radius: 999px; border: 2px solid #ff9a4a; background: rgba(15, 29, 22, .92); color: #fff; font: 800 1.02rem/1.1 var(--font-sans); letter-spacing: 0.01em; box-shadow: 0 0 0 4px rgba(255, 154, 74, .25), 0 6px 18px rgba(0, 0, 0, .35); cursor: pointer; white-space: nowrap; animation: lab-bigprompt 1.6s ease-in-out infinite; }
.lab__bigprompt:hover, .lab__bigprompt:focus-visible { background: #ff9a4a; color: #10241a; outline: none; }
.lab__bigprompt[hidden] { display: none; }
.lab__bigprompt.is-touch { left: 50% !important; top: auto !important; bottom: calc(var(--screen-foot, 120px) + 0.6rem); transform: translateX(-50%); min-width: min(78vw, 320px); padding: 0.95rem 1.4rem; font-size: 1.15rem; text-align: center; }
@keyframes lab-bigprompt { 50% { box-shadow: 0 0 0 9px rgba(255, 154, 74, .12), 0 6px 18px rgba(0, 0, 0, .35); } }
@media (prefers-reduced-motion: reduce) { .lab__bigprompt { animation: none; } }
.lab__vanpanel { position: absolute; z-index: 5; left: 12px; top: 64px; width: min(270px, calc(100% - 1.2rem)); padding: 0.55rem 0.7rem; border-radius: 10px; background: rgba(15, 29, 22, .94); color: var(--c-cream, #f3ecdc); border-left: 4px solid #ff9a4a; font-size: 0.78rem; line-height: 1.3; }
.lab__vanpanel[hidden] { display: none; }
.lab__vanpanel-head { margin: 0 0 0.3rem; font-weight: 800; font-size: 0.95rem; }
.lab__vanpanel-note { margin: 0 0 0.4rem; opacity: 0.85; }
.lab__vanpanel .lab__van-list span { display: grid; }
.lab__vanpanel .lab__van-list small { opacity: 0.75; font-size: 0.68rem; }
.lab__vanpanel .lab__van-list button:disabled { opacity: 0.45; cursor: default; }
.lab__vanpanel-for { display: block; width: 100%; margin: 0.15rem 0 0.35rem; padding: 0.4rem 0.6rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: #3a4a40; color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.lab__vanpanel-for:hover, .lab__vanpanel-for:focus-visible { border-color: #ff9a4a; outline: none; }
/* P90: the box picker. Click a kit box in the garden: its lid opens and this panel lists what is inside; click a tool to take it out */
.lab__boxpick { position: absolute; z-index: 25; left: 12px; top: 64px; width: min(300px, calc(100% - 1.2rem)); max-height: calc(100% - 1.5rem); overflow-y: auto; padding: 0.5rem 0.6rem 0.6rem; border-radius: 10px; background: rgba(15, 29, 22, .95); color: var(--c-cream, #f3ecdc); border-left: 4px solid #ff9a4a; font-size: 0.78rem; line-height: 1.25; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.lab__boxpick[hidden] { display: none; }
.lab__boxpick-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.4rem; font-size: 0.95rem; }
.lab__boxpick-head strong { flex: 1; min-width: 0; } /* P138: the name, then Move and the close button on the right */
.lab__boxpick-x { flex: none; width: 32px; height: 32px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: #3a4a40; color: #fff; font: 700 1.1rem/1 var(--font-sans); cursor: pointer; }
.lab__boxpick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.lab__boxpick-tile { display: flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0.3rem 0.45rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; background: rgba(58, 74, 64, .55); }
.lab__boxpick-tile > svg, .lab__boxpick-noicon { flex: none; width: 26px; height: 26px; color: #f3ecdc; }
.lab__boxpick-txt { display: grid; flex: 1; min-width: 0; }
.lab__boxpick-name { font-weight: 800; }
.lab__boxpick-left, .lab__boxpick-state { font-size: 0.68rem; opacity: 0.8; }
.lab__boxpick-tile.is-take { cursor: pointer; }
.lab__boxpick-tile.is-take:hover, .lab__boxpick-tile.is-take:focus-visible { border-color: #ff9a4a; outline: none; background: rgba(58, 74, 64, .9); }
.lab__boxpick-tile.is-hand { border-color: #ff9a4a; background: rgba(255, 154, 74, .16); }
.lab__boxpick-tile.is-hand .lab__boxpick-state { opacity: 1; color: #ffc08a; font-weight: 700; }
.lab__boxpick-tile.is-off { opacity: 0.45; }
.lab__boxpick-need { font-size: 0.68rem; font-weight: 700; color: #ffc08a; } /* P110: advice, never a lock: why this job wants it */
.lab__boxpick-tile.is-buy > svg, .lab__boxpick-tile.is-buy .lab__boxpick-txt { opacity: 0.6; } /* not owned: dimmed, its Shop button stays bright */
.lab__boxpick-act { flex: none; min-height: 36px; padding: 0.3rem 0.6rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: #3a4a40; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.lab__boxpick-act:hover, .lab__boxpick-act:focus-visible { border-color: #ff9a4a; outline: none; }
.lab__boxpick.is-touch { left: 0.5rem !important; right: 0.5rem; top: auto !important; bottom: 0.5rem; width: auto; max-height: 46%; z-index: 26; background: #0f1d16; }
.lab__boxpick.is-touch .lab__boxpick-x { width: 44px; height: 44px; }
.lab__boxpick.is-touch .lab__boxpick-act { min-height: 44px; }
[data-tool].is-packed > *, [data-worklight].is-packed > * { opacity: 0.4; } /* the icon and name fade, the badge stays bold (owner: more contrast) */
[data-tool].is-wet > * { opacity: 0.4; } [data-tool].is-wet::after { content: 'wet'; display: block; margin: 2px auto 0; padding: 1px 5px; width: max-content; border-radius: 6px; background: #8ec5e8; color: #0c1a24; font-size: 0.58rem; font-weight: 800; line-height: 1.2; } /* P67: a power tool rained on */
[data-tool].is-packed::after, [data-worklight].is-packed::after { content: 'in van'; display: block; margin: 2px auto 0; padding: 1px 5px; width: max-content; border-radius: 6px; background: #f1c28f; color: #1a120c; font-size: 0.58rem; font-weight: 800; line-height: 1.2; }
@media (max-width: 640px), (pointer: coarse) { .lab__vanpanel { left: 0.5rem !important; right: 0.5rem; top: 3rem !important; width: auto; max-height: 30%; overflow-y: auto; font-size: 0.74rem; z-index: 7; } [data-worklight].is-packed::after { content: none; } [data-worklight].is-packed { opacity: 0.4; } } /* P137: a packed tool keeps its van mark bold (its icon and name fade) */

/* P69: the plan drawer, kit picture cards, the job bill button and slim scrollbars (19 Oct 2026) */
/* One slim scrollbar for every scrolling panel inside the game section, never the page itself */
.lab ::-webkit-scrollbar { width: 10px; height: 10px; }
.lab ::-webkit-scrollbar-track { background: transparent; margin: 10px 0; } /* inset: the thumb never runs into a rounded corner */
.lab ::-webkit-scrollbar-thumb { min-height: 36px; border: 2px solid transparent; border-radius: 999px; background: #4b6b57 padding-box; }
.lab ::-webkit-scrollbar-thumb:hover, .lab ::-webkit-scrollbar-thumb:active { background-color: #e07b39; }
.lab ::-webkit-scrollbar-corner, .lab ::-webkit-scrollbar-button { display: none; background: transparent; }
@supports not selector(::-webkit-scrollbar) { .lab, .lab * { scrollbar-width: thin; scrollbar-color: #4b6b57 transparent; } }

/* the tab row is its own row above the scrolling page, so nothing scrolls under it or shows through */
.lab__side { display: flex; flex-direction: column; overflow: hidden; }
.lab__side > .lab__sidetabs { position: static; flex: none; margin-bottom: 0.6rem; padding-bottom: 0; }
.lab__side > .lab__sidepage { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }

/* the drawer: docked to the right edge inside the game, full height; the game stays playable beside it */
.lab.is-sheet .lab__stage.has-screen-layout > .lab__col { position: absolute; top: 0; right: 0; bottom: 0; left: auto; z-index: 8; width: min(360px, 88%); height: auto; max-height: none; max-width: none;
  display: flex; flex-direction: column; gap: 0.4rem; box-sizing: border-box; padding: 0.55rem 0.5rem 0.6rem; overflow: hidden; background: #0f1d16; border-radius: 0;
  border-left: 1px solid rgba(255, 255, 255, .09); box-shadow: -10px 0 30px rgba(0, 0, 0, .45); }
.lab.is-sheet .lab__stage.has-screen-layout > .lab__col > .lab__sheetclose { display: block; position: static; flex: none; margin: 0 0 0 auto; min-height: 34px; padding: 6px 18px; border: 0; border-radius: 999px;
  background: #e07b39; color: #1a120c; font: 700 0.76rem/1 var(--font-sans, system-ui); cursor: pointer; }
.lab.is-sheet .lab__stage.has-screen-layout > .lab__col .lab__side { flex: 1 1 auto; min-height: 0; max-height: none; overflow: hidden; padding: 0.55rem 0.35rem 0.4rem 0.55rem; }
.lab.is-sheet .lab__stage.has-screen-layout > .lab__col .lab__sidetabs { background: var(--c-bg-alt); }
.lab.is-sheet .lab__stage.has-screen-layout > .lab__col .lab__sidepage { flex: 1 1 auto; padding-right: 0.3rem; }
@media (min-width: 721px) { /* the game's own cards and messages move left of the drawer, so the drawer never covers them */
  .lab.is-sheet .lab__stage.has-screen-layout > :is(.lab__screen-header, .lab__screen-work, .lab__screen-footer) { right: calc(min(360px, 88%) + 8px); }
  .lab.is-sheet .lab__stage > .lab__oscard { left: calc((100% - min(360px, 88%)) / 2); width: min(520px, calc(100% - min(360px, 88%) - 1.2rem)); }
}
@media (max-width: 720px) { /* phones: a bottom sheet, with the message strip kept above it */
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col { top: var(--sheet-top, 34%); left: 0; right: 0; bottom: var(--screen-foot, 64px); width: auto; border-left: 0; border-radius: 16px; box-shadow: 0 -10px 30px rgba(0, 0, 0, .45); } /* the sheet stops above the round buttons, so the sliders and bill buttons stay in reach */
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__screen-work { bottom: calc(100% - var(--sheet-top, 34%) + 4px); }
  .lab__kitcard .lab__kitpic { width: 64px; }
  /* the Done button shares the tab row, so the sheet keeps its height for the cards */
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col { padding-top: 0.5rem; }
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col > .lab__sheetclose { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; width: 60px; padding: 0; }
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col .lab__side { padding-top: 0; background: transparent; }
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col .lab__sidetabs { margin-right: 64px; background: transparent; }
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col .lab__sidetabs button { font-size: clamp(0.62rem, 2.9vw, 0.72rem); }
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col > .lab__sheetclose, .lab__sidetabs button, .lab__kitcompare > summary, .lab__billpop-close { min-height: 44px; }
  .lab .lab__stage.has-screen-layout .lab__screen-mini > button.lab__mini:not([hidden]) { width: 44px; height: 44px; }
}

/* kit cards: a square product picture, the name, the price where the kit has one, and an orange ring with a tick when chosen */
.lab__kitgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.lab__kitcard { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; min-height: 44px; margin: 0; padding: 6px 6px 8px; box-sizing: border-box;
  text-align: left; border: 1px solid #3c5446; border-radius: 10px; background: #1b3126; color: var(--c-cream, #f5f1e8); font: 600 0.74rem/1.25 var(--font-sans, system-ui); cursor: pointer; }
.lab__kitcard[hidden] { display: none; } /* P121: the beam switch shows only while a head torch is on */
.lab__kitcard:hover { border-color: var(--c-accent-2, #f0b27a); }
.lab__kitcard:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
.lab__kitpic { display: grid; place-items: center; width: 76px; margin: 0 auto; aspect-ratio: 1; flex: none; border-radius: 7px; overflow: hidden; background: #f4f1ea; }
.lab__kitpic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lab__kitpic.is-empty { background: #24392d; color: #b9c8bb; font: 700 1.3rem/1 var(--font-sans, system-ui); }
.lab__kitpic.is-empty svg { width: 44%; height: 44%; }
.lab__kitname { display: block; overflow-wrap: anywhere; text-align: center; }
.lab__kitcard > .lab__kitprice, .lab__kitcard > .lab__own { text-align: center; }
.lab__kitprice { font-style: normal; font-weight: 700; color: var(--c-accent-2, #f0b27a); }
.lab__kitcard .lab__own { display: block; margin: 0; font-size: 0.64rem; }
.lab__kitcard.is-owned { border-color: rgba(143, 209, 79, .6); }
.lab__kitcard.is-active, .lab__kitcard[aria-pressed="true"] { border-color: var(--c-accent, #d97742); box-shadow: 0 0 0 2px var(--c-accent, #d97742); background: rgba(217, 119, 66, .16); }
.lab__kittick { display: none; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-accent, #d97742); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.lab__kittick::before { content: ''; position: absolute; left: 7.5px; top: 4px; width: 5px; height: 10px; border: solid #1a120c; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.lab__kitcard.is-active .lab__kittick, .lab__kitcard[aria-pressed="true"] .lab__kittick { display: block; }
.lab__kitcard.is-packed .lab__kittick { opacity: 1; }
/* the meters' upsides and downsides sit in one fold under the two cards, so the cards stay the same size */
.lab__kitcompare { width: 100%; box-sizing: border-box; border: 1px solid #3c5446; border-radius: 10px; background: #16291f; font-size: 0.72rem; line-height: 1.3; }
.lab__kitcompare > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; box-sizing: border-box; font-weight: 700; color: var(--c-cream, #f5f1e8); cursor: pointer; list-style: none; }
.lab__kitcompare > summary::-webkit-details-marker { display: none; }
.lab__kitcompare > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .7; }
.lab__kitcompare[open] > summary::after { transform: rotate(-135deg); }
.lab__kitcompare-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 10px 10px; }
.lab__kitcompare-cols > div { display: grid; gap: 3px; align-content: start; min-width: 0; }
.lab__kitcompare .pc.pro { color: #8fe29a; }
.lab__kitcompare .pc.con { color: #ffb4a8; }

/* the job bill button: a receipt with the running total, beside the sliders button */
.lab .lab__stage.has-screen-layout .lab__screen-mini > button#bill-btn.lab__mini:not([hidden]) { width: auto; padding: 0 11px 0 8px; gap: 5px; border-radius: 999px; font: 700 0.74rem/1 var(--font-sans, system-ui); }
.lab__screen-mini > #bill-btn b { font-variant-numeric: tabular-nums; }
.lab .lab__stage.has-screen-layout .lab__screen-mini > button#bill-btn.is-open { background: #e07b39; color: #1a120c; }
/* its bill opens above it, in the same look as the bill under the game */
.lab__billpop { position: absolute; z-index: 8; display: flex; flex-direction: column; width: min(380px, calc(100% - 16px)); box-sizing: border-box; padding: 0.7rem 0.35rem 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(15, 29, 22, .97); color: var(--c-cream, #f5f1e8); box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
.lab__billpop[hidden] { display: none; }
.lab__billpop-head { display: flex; align-items: center; gap: 0.6rem; margin: 0 0.55rem 0.55rem 0; }
.lab__billpop-head span { font: 700 0.7rem/1.2 var(--font-sans, system-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent-2, #f0b27a); }
.lab__billpop-head b { margin-left: auto; font-size: 1.05rem; color: var(--c-accent-2, #f0b27a); font-variant-numeric: tabular-nums; }
.lab__billpop-close { min-height: 32px; padding: 6px 14px; border: 0; border-radius: 999px; background: #e07b39; color: #1a120c; font: 700 0.74rem/1 var(--font-sans, system-ui); cursor: pointer; }
.lab__billpop-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 0.45rem; }
.lab__billpop .bill { background: transparent; border: 0; padding: 0; color: var(--c-cream, #f5f1e8); }
.lab__billpop .bill .bill__title { display: none; }
.lab.is-big .lab__body > .lab__bill { display: none; } /* in full screen the receipt button is the bill */

/* messages such as "Too cold for ..." are a toast at the top of the game: whole, never with a scrollbar of their own */
.has-screen-layout .lab__screen-work > #clock-cold:not([hidden]) { flex: none; overflow: visible; max-height: none; width: min(460px, 100%); border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }

/* P69 items 9 and 10: on wide screens the plan column beside the game is gone in Try spraying (start screen and play alike), so
   the game takes the full width. The plan opens in the drawer (sliders button) and stays in the page HTML; the job bill sits below
   the game, as on phones. Phones (980 px and narrower) keep the column below the game. Your garden keeps its column. */
@media (min-width: 981px) {
  .lab[data-mode="spray"] .lab__body { grid-template-columns: minmax(0, 1fr); }
  .lab[data-mode="spray"] .lab__body > .lab__col { display: none; }
  .lab[data-mode="spray"] .lab__body > .lab__bill { max-width: 640px; }
}
.lab__body > .lab__bill { margin-top: 0; }
.lab.is-start .lab__stage > .lab__col, .lab.is-start #bill-pop { display: none; } /* the drawer and the bill never sit over the start screen */
/* P68: the old junk deal (the client's answer in the briefing and on the on-site card) and free play's locked dear kit */
.lab__brief-opt.is-refused, .lab__oscard-list button.is-refused { opacity: .5; cursor: not-allowed; }
.lab__brief-opt.is-refused .lab__brief-opt-top em { background: #5a2f24; }
.lab__brief-reply, .lab__deal-reply { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); font-size: .86rem; line-height: 1.4; }
.lab__brief-reply.is-yes, .lab__deal-reply.is-yes { border-color: #7fbf5a; }
.lab__brief-reply.is-no, .lab__deal-reply.is-no { border-color: #e0b04a; }
.lab__brief-reply.is-cross, .lab__deal-reply.is-cross { border-color: #e0573a; background: rgba(224, 87, 58, .12); }
.lab__brief-reply p, .lab__deal-reply p { margin: 0; }
.lab__brief-reply .lab__face, .lab__deal-reply .lab__face { width: 34px; height: 34px; }
.lab__brief-reply-you { opacity: .7; font-size: .78rem; }
.lab__brief-reply-say { font-style: italic; }
.lab__brief-reply-mood, .lab__deal-reply em { color: #ff9c84; font-weight: 700; font-style: normal; font-size: .8rem; }
.lab__brief-reply-note { opacity: .75; font-size: .78rem; margin-top: 4px !important; }
.lab__brief-reply .is-quiet { margin-top: 6px; }
.lab__deal-reply { flex-wrap: wrap; } .lab__deal-reply em { flex-basis: 100%; }
.lab__deal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lab__deal-top em { flex: none; padding: 1px 7px; border-radius: 999px; background: #344337; font-style: normal; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.lab__oscard-list button.is-decoy .lab__deal-top em { background: #5a2f24; }
.lab__oscard-list button.is-on { border-color: #e07b39; background: rgba(224, 123, 57, .16); }
.lab__deal-push { margin-top: 6px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; padding: 4px 12px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.lab__lock { display: block; margin-top: 2px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em; color: #ffb27a; }
.lab__seg button.is-locked .lab__lock { display: inline; margin: 0 0 0 6px; }
.lab__tier.is-locked { opacity: .55; cursor: not-allowed; }
.lab__tier.is-locked .lab__tier-meta { color: #ffb27a; font-weight: 700; }
[data-tool] .lab__lock { margin: 2px auto 0; padding: 1px 5px; width: max-content; border-radius: 6px; background: #ffb27a; color: #1a120c; font-size: 0.58rem; font-weight: 800; line-height: 1.2; letter-spacing: 0; }
[data-tool].is-locked > :not(.lab__lock) { opacity: 0.45; }
.lab__brief-reply button { margin-top: 6px; padding: 4px 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: .82rem; cursor: pointer; }
.lab__brief-reply button:hover, .lab__brief-reply button:focus-visible { border-color: #f3d27a; outline: none; }
.lab__oscard-list button:disabled { opacity: 0.5; cursor: not-allowed; }
.lab__hire-row { margin-bottom: 0.4rem; }

/* P65: the hand pump's pressure dial in the HUD (green, amber, red bands), its red "Pump it up" hint and the Pump button */
.lab__pump { display: flex; align-items: center; gap: .45rem; }
.lab__pump[hidden] { display: none; }
.lab__pump svg { flex: none; }
.lab__pump-txt { display: grid; gap: .15rem; }
.lab__pump-state { font-style: normal; }
.lab__pump[data-band="amber"] .lab__pump-state { color: #f2a83a; }
.lab__pump[data-band="red"] .lab__pump-state { color: #ff7a6e; }
.lab__pump-hint { font-style: normal; font-weight: 700; color: #fff; background: #b3261e; border-radius: 4px; padding: .1rem .4rem; }
.lab__pump-hint[hidden] { display: none; }
.lab__pump-btn { left: auto; right: .75rem; transform: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.lab__pump-btn.is-low, .has-screen-layout .lab__screen-actions > button.lab__pump-btn.is-low { background: #b3261e; border-color: #b3261e; color: #fff; }
.lab__pump-btn.is-on, .has-screen-layout .lab__screen-actions > button.lab__pump-btn.is-on { background: #1f8a3a; border-color: #1f8a3a; color: #fff; }

/* merge27: on phones the tool buttons show only their icons, so the free play price lock and the "wet" badge sit on the button's
   lower edge as small chips instead of pushing the icon onto the next button */
@media (max-width: 640px), (pointer: coarse) {
  [data-tool] { position: relative; }
  [data-tool] .lab__lock, [data-tool].is-wet::after { position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); margin: 0; padding: 0 4px; font-size: 0.52rem; line-height: 1.25; pointer-events: none; }
}

/* ---- P63: the paint guide (in the phone), the client's paint request and its checks ---- */
.lab__tl .lab__paint-ask { position: static; box-sizing: border-box; max-width: min(20rem, 100%); margin: 0; padding: 7px 10px; border-radius: 8px; background: #14231bed; color: #f3ecdc; font-size: .72rem; line-height: 1.3; pointer-events: none; }
.lab__paint-ask b { display: block; margin-bottom: 2px; color: #f3d27a; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.lab__paint-ask ul { margin: 0; padding-left: 1.1em; }
.lab__paint-ask p { margin: 5px 0 0; padding: 5px 7px; border-radius: 6px; background: #f3d27a; color: #3b2a05; font-weight: 600; }
.lab__paint-ask p.is-soft { background: #cfe3ee; color: #12303f; font-weight: 500; }
@media (max-width: 720px) { .lab__tl .lab__paint-ask { font-size: .6rem; padding: 5px 7px; } }
/* P80: the job card (the Paint request box grew into it): every line the client judges, ticking as you go */
.lab__tl .lab__paint-ask.lab__jobcard { pointer-events: auto; width: max-content; max-width: min(21rem, 100%); min-width: min(14rem, 100%); max-height: min(58vh, 32rem); overflow-y: auto; overscroll-behavior: contain; transition: opacity .2s; }
.lab__jobcard.is-quiet { opacity: .45; }
.has-screen-layout:not(.is-short) .lab__screen-header #tl-stack:has(.lab__jobcard:not(.is-collapsed)) { max-height: calc(var(--screen-cap, 160px) * 1.3); } /* an open job card gets a little more room, still well above the fence */
.lab__jobcard.is-ready { box-shadow: 0 0 0 2px #7fdc6a; }
.lab__card-head { all: unset; box-sizing: border-box; display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 24px; cursor: pointer; }
.lab__card-head b { margin: 0; color: #f3d27a; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.lab__card-sum { font-weight: 700; }
.lab__card-caret { margin-left: auto; font-style: normal; color: #f3d27a; }
.lab__card-caret::before { content: '\25BE'; }
.lab__jobcard.is-collapsed .lab__card-caret::before { content: '\25B8'; }
.lab__jobcard.is-collapsed .lab__card-lines, .lab__jobcard.is-collapsed .lab__card-sub, .lab__jobcard.is-collapsed .lab__card-warns { display: none; }
.lab__paint-ask .lab__card-lines { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.lab__card-lines li { flex: 1 1 100%; display: grid; grid-template-columns: 1.15em 1fr; column-gap: 5px; align-items: baseline; }
.lab__card-lines li.is-chip { flex: 0 0 auto; display: inline-flex; gap: 3px; padding: 1px 7px 1px 4px; border-radius: 999px; background: #ffffff14; font-size: .92em; }
.lab__card-mark { font-weight: 800; text-align: center; line-height: 1.15; }
.lab__card-lines li.is-done .lab__card-mark { color: #7fdc6a; }
.lab__card-lines li.is-done .lab__card-text { color: #cfe8c6; }
.lab__card-lines li.is-todo .lab__card-mark { color: #b9c3bc; }
.lab__card-lines li.is-warn .lab__card-mark { color: #241600; background: #f5a524; border-radius: 50%; width: 1.15em; height: 1.15em; line-height: 1.15em; font-size: .9em; }
.lab__card-lines li.is-fail .lab__card-mark, .lab__card-lines li.is-fail .lab__card-text { color: #ff8a7a; }
.lab__card-lines li.is-unknown .lab__card-mark { color: #9fd0ee; }
.lab__card-swatch { display: inline-block; width: .85em; height: .85em; margin-right: 4px; border-radius: 2px; background: var(--swatch); box-shadow: 0 0 0 1px #ffffff70; vertical-align: -1px; }
.lab__card-bar { grid-column: 2; position: relative; height: 5px; margin-top: 2px; border-radius: 3px; background: #ffffff24; overflow: hidden; }
.lab__card-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: #8fd36a; box-shadow: inset 0 0 0 1px #ffffff40; }
.lab__card-bar::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--full, 97%); width: 2px; background: #f3ecdc; opacity: .8; } /* the finish line on the bar */
.lab__card-sub { grid-column: 2; display: block; font-size: .64rem; line-height: 1.25; opacity: .8; }
.lab__paint-ask .lab__card-note { background: #f3d27a; color: #3b2a05; }
.lab__card-foot { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.lab__jobcard [hidden] { display: none !important; }
.lab__card-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; background: #f3d27a; color: #2a1f05; font-weight: 700; font-size: .68rem; cursor: pointer; }
.lab__card-btn.is-quiet { background: transparent; color: #f3ecdc; box-shadow: inset 0 0 0 1px #f3ecdc90; }
.lab__card-head:focus-visible, .lab__card-btn:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
@media (max-width: 720px) { /* phones: the open card drops below the top row as a full-width panel (the narrow left column can't hold it); while you spray it shrinks back to its one-line summary */
  .lab__tl .lab__paint-ask.lab__jobcard:not(.is-collapsed) { position: absolute; left: 0; right: 0; top: 0; width: auto; max-width: none; min-width: 0; max-height: 30vh; z-index: 30; background: #14231b; box-shadow: 0 6px 18px #0008; } /* over the top row while open, and ending above the middle of the screen where you aim */
  .has-screen-layout .lab__screen-header:has(.lab__jobcard:not(.is-collapsed)) { z-index: 12; }
  .lab__jobcard.is-quiet .lab__card-lines, .lab__jobcard.is-quiet .lab__card-sub, .lab__jobcard.is-quiet .lab__card-warns, .lab__jobcard.is-quiet .lab__card-foot, .lab__jobcard.is-collapsed .lab__card-foot { display: none; }
  .lab__tl .lab__paint-ask.lab__jobcard.is-quiet:not(.is-collapsed) { opacity: 0; pointer-events: none; } /* the open card steps out of the way while you spray */
  .lab__card-btn { min-height: 36px; font-size: .64rem; } .lab__card-sub { font-size: .58rem; } }
.lab__handover.lab__refill { bottom: calc(var(--screen-foot, 7rem) + 8px); padding: .6rem 1.3rem; font-size: 1rem; white-space: nowrap; background: #2f8f46; border-color: #2f8f46; box-shadow: 0 6px 22px #0007, 0 0 0 3px #7fdc6a80; z-index: 7; } /* just above the hint and tool rows, under the fence */
.lab__stage:has(#handover:not([hidden])) #refill { display: none; }
.is-start #handover { visibility: hidden !important; pointer-events: none !important; }
.lab__client-early { color: #ffb07a; font-weight: 600; }
.lab__client-card summary { cursor: pointer; font-weight: 700; }
.lab__client-card ul { list-style: none; margin: 4px 0 8px; padding: 0; font-size: .86em; line-height: 1.35; }
.lab__client-card li.is-done { color: #9fdc85; } .lab__client-card li.is-fail { color: #ff8a7a; } .lab__client-card li.is-warn { color: #f5b54a; } .lab__client-card li.is-todo { color: #c9d1cb; }
.lab__tag.lab__tag--feature { background: #23395b; }
.lab__tag--pond { background: #1d4c63; color: #fff; font-weight: 700; font-size: .62rem; padding: .25rem .45rem; transform: translate(-50%, -50%); display: block; }
.lab__swatch { display: inline-block; width: 1.6em; height: 1.1em; vertical-align: -0.2em; border-radius: 4px; border: 1.5px solid rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.ph-facts .lab__swatch { border-color: #fff; }
.lab__brief-check { margin: 0; padding-left: 1.1em; }
.lab__brief-check li { margin: 1px 0; }
.lab__paint-line { margin: 2px 0; }
.lab__paint-line.is-ok { color: #8fdca6; } .lab__paint-line.is-bad { color: #ff9b8a; font-weight: 600; } .lab__paint-line.is-unknown { color: #c3ccd3; } /* on the dark verdict card */
.pg { color: #1c2a22; font-size: .8rem; }
.pg-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; margin: 0 0 8px; border-radius: 12px; background: #dde4de; }
.pg-tabs button { padding: 7px 4px; border: 0; border-radius: 9px; background: none; color: inherit; font-weight: 700; font-size: .74rem; line-height: 1.15; cursor: pointer; }
.pg-tabs button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.pg-sw { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--sw, #999); box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); vertical-align: -1px; }
.pg-card { padding: 10px 11px; border-radius: 12px; background: #fff; border: 1px solid #dfe5df; }
.pg-card h3, .pg-body > h3 { margin: 0 0 2px; font-size: .95rem; }
.pg-body > h3 + * { margin-top: 4px; }
.pg-sub { margin: 0 0 8px; color: #55655b; font-size: .74rem; }
.pg-rows { margin: 0; display: grid; gap: 0; }
.pg-rows > div { display: grid; grid-template-columns: 7.4em 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid #edf1ed; }
.pg-rows dt { color: #55655b; font-size: .7rem; font-weight: 700; }
.pg-rows dd { margin: 0; font-size: .76rem; line-height: 1.32; overflow-wrap: anywhere; }
.pg-rows .is-tin dd { color: #7a5a1a; font-weight: 600; }
.pg-rows .is-pump { margin: 2px -6px; padding: 6px; border-radius: 8px; border-top-color: transparent; }
.pg-rows .is-pump-ok { background: #e3f2ea; } .pg-rows .is-pump-no { background: #fbe9e5; }
.pg-ref { font-size: .66rem; font-weight: 700; color: #1f5d8f; text-decoration: none; white-space: nowrap; }
.pg-small { display: block; margin-top: 3px; color: #55655b; font-size: .68rem; }
.pg-note { margin: 8px 0 0; padding: 7px 9px; border-radius: 9px; background: #fdecc8; color: #5c3b06; font-size: .72rem; }
.pg-srch { margin: 10px 0 2px; font-size: .74rem; }
.pg-src { margin: 0; padding-left: 1.4em; font-size: .68rem; color: #55655b; overflow-wrap: anywhere; }
.pg-src a { color: #1f5d8f; }
.pg-lead { margin: 2px 0 8px; font-size: .78rem; }
.pg-grid { width: 100%; border-collapse: collapse; margin: 0 0 4px; background: #fff; border-radius: 10px; overflow: hidden; font-size: .7rem; }
.pg-grid th, .pg-grid td { padding: 4px 3px; border-bottom: 1px solid #edf1ed; text-align: center; }
.pg-grid thead th { font-size: .62rem; color: #55655b; line-height: 1.1; }
.pg-grid tbody th { text-align: left; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 8.5em; }
.pg-grid td { font-weight: 800; font-size: .8rem; }
.pg-grid td.is-yes { color: #14593a; background: #e3f4e9; } .pg-grid td.is-prep { color: #6a4a05; background: #fcf1d2; } .pg-grid td.is-no { color: #8a2217; background: #f9e0dc; } .pg-grid td.is-check { color: #56636c; }
.pg-key { margin: 0 0 10px; font-size: .66rem; color: #55655b; }
.pg-over { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pg-over li { padding: 8px 10px; border-radius: 10px; background: #fff; border-left: 5px solid #c9d3cb; }
.pg-over li p { margin: 3px 0 0; font-size: .72rem; line-height: 1.3; }
.pg-over li.is-yes { border-left-color: #2f9e5b; } .pg-over li.is-prep { border-left-color: #e0a31c; } .pg-over li.is-no { border-left-color: #cc3b2b; } .pg-over li.is-check { border-left-color: #8a96a0; }
.pg-over-top { display: flex; align-items: center; gap: 6px; }
.pg-over-top b { flex: 1; font-size: .78rem; }
.pg-pill { font-style: normal; font-size: .64rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #eef1ee; white-space: nowrap; }
.is-yes .pg-pill { background: #d6f0df; color: #14593a; } .is-prep .pg-pill { background: #fbecc0; color: #6a4a05; } .is-no .pg-pill { background: #f8d6d1; color: #8a2217; } .is-check .pg-pill { background: #e2e7eb; color: #3d4a54; }
.pg-steps { margin: 6px 0 10px; padding-left: 1.2em; font-size: .76rem; line-height: 1.35; }
.pg-steps li { margin: 3px 0; }
.pg-mixnotes { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; font-size: .74rem; }
.pg-mixnotes li { padding: 6px 9px; border-radius: 9px; background: #fff; display: grid; gap: 1px; }
.ph-guide { padding-bottom: 8px; }
.pg-selwrap { display: grid; gap: 3px; margin: 0 0 9px; font-size: .7rem; font-weight: 700; color: #55655b; }
.pg-select { width: 100%; padding: 9px 10px; border: 1.5px solid #c9d3cb; border-radius: 10px; background: #fff; color: #1c2a22; font: 600 .8rem/1.2 inherit; }
.pg-card h3 .pg-sw { width: 14px; height: 14px; }
/* P62: the sprayer page of the job plan as picture cards (the kit drawer's style), the hire card above the plan, the phone Shop's sprayers */
.lab__brief-opt.has-pic { grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; }
.lab__brief-opt.has-pic > .lab__brief-pic { grid-row: 1 / span 5; align-self: start; }
.lab__brief-pic { display: grid; grid-template: 100% / 100%; place-items: center; width: 64px; aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: #f4f1ea; }
.lab__brief-pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lab__brief-pic.is-empty { background: #24392d; }
.lab__brief-pic.is-empty svg { width: 78%; height: 78%; }
.lab__hirecard.is-over-brief { z-index: 31; background: #14231b; box-shadow: 0 0 0 100vmax rgba(8, 14, 11, .6), 0 10px 40px rgba(0, 0, 0, .6); }
.ph-sprs { display: grid; gap: 8px; }
.ph-spr { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 10px; width: 100%; padding: 9px 10px; border: 1px solid #cbd6cd; border-radius: 12px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ph-spr:hover:not(:disabled) { border-color: #7fa889; }
.ph-spr.is-picked { background: #eef7ee; box-shadow: 0 0 0 2px #48b95e; }
.ph-spr:disabled { opacity: .55; cursor: not-allowed; }
.ph-spr-pic { grid-row: 1 / span 5; display: grid; grid-template: 100% / 100%; place-items: center; width: 56px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f4f1ea; }
.ph-spr-pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ph-spr-pic.is-empty { background: #24392d; } .ph-spr-pic.is-empty svg { width: 78%; height: 78%; }
.ph-spr b { font-size: .86rem; } .ph-spr span { color: #4a5a50; font-size: .74rem; line-height: 1.35; }
.ph-spr .ph-spr-tag { color: #7a5a1a; font-weight: 700; }
.ph-spr em { justify-self: start; font-style: normal; font-size: .7rem; font-weight: 700; color: #1f6b33; background: #d9f0dc; padding: 1px 8px; border-radius: 8px; }

/* ---- P78 (tallphone, 20 Oct 2026): on phones the game fills the screen while you play ---- */
/* The button row (Menu, How to play, sound) and the frame take the screen's full height, less the browser bars and any notch, and
   the frame its full width, so every card over it has room. The start menu keeps its place in the page; the Page button (or
   leaving play) brings the page back. */
.lab:not(.is-tall) #page-btn { display: none !important; }
.lab.is-tall { --tall-bar: 48px; }
.lab.is-tall .lab__tabs { box-sizing: border-box; height: calc(var(--tall-bar) - 4px); margin-bottom: 4px; align-items: stretch; scroll-margin-top: env(safe-area-inset-top, 0px); }
.lab.is-tall .lab__tabs > button { min-height: 44px; }
.lab.is-tall .lab__stage { height: calc(100vh - var(--tall-bar) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); height: calc(100dvh - var(--tall-bar) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin-inline: calc(50% - 50vw); border-radius: 0; box-shadow: none; }
.lab.is-tall .lab__stage, .lab.is-tall .lab__stage * { overscroll-behavior: contain; } /* a card scrolled to its end never scrolls the page under the game */
/* the Page button: at the end of the button row, always in view while the row scrolls sideways */
.lab.is-tall #page-btn { position: sticky; right: 0; z-index: 1; display: inline-flex; align-items: center; gap: 5px; flex: none; margin-left: auto; padding: 0 14px 0 11px; border: 1px solid var(--c-accent-2, #f3c98a);
  border-radius: 999px; background: var(--c-bg, #0f1d16); box-shadow: -14px 0 12px 2px var(--c-bg, #0f1d16); color: var(--c-accent-2, #f3c98a); font: 700 .85rem/1 var(--font-sans, system-ui); cursor: pointer; }
.lab.is-tall #page-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* the plan drawer (a bottom sheet on phones) starts under the whole top row, the job line and the paint request included */
@media (max-width: 720px) {
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__col { top: max(var(--sheet-top, 34%), var(--screen-head, 34%)); }
  .lab.is-sheet .lab__stage.has-screen-layout > .lab__screen-work { bottom: calc(100% - max(var(--sheet-top, 34%), var(--screen-head, 34%)) + 4px); }
}
/* every button in the game, the phone's apps included, is a 44 px touch target while the game fills the phone */
.lab.is-tall .lab__stage :is(button, summary) { min-height: 44px !important; min-width: 44px !important; box-sizing: border-box; } /* a floor over the many older size rules */
.lab.is-tall .lab__stage summary { display: flex; align-items: center; }
.lab.is-tall .lab__phonebtn.is-hud { width: 44px; height: 44px; }
/* the walk pad: the same cross, with 44 px buttons */
.lab.is-tall .has-screen-layout:not(.is-short) .lab__screen-actions .lab__pad { width: 132px; height: 132px; }
.lab.is-tall .has-screen-layout .lab__pad button { width: 44px; height: 44px; font-size: .95rem; }
.lab.is-tall .lab__pad [data-walk="f"], .lab.is-tall .lab__pad [data-walk="b"] { left: 44px; }
.lab.is-tall .lab__pad [data-walk="l"], .lab.is-tall .lab__pad [data-walk="r"] { top: 44px; }
.lab.is-tall .lab__pad [data-walk="tl"], .lab.is-tall .lab__pad [data-walk="tr"] { top: 88px; }
.lab.is-tall .has-screen-layout.is-short .lab__screen-actions .lab__pad { height: 44px; gap: 4px; }
/* phones upright: the tools in two rows of 44 px buttons, the nozzle buttons as tall */
@media (max-width: 720px) {
  .lab.is-tall .lab__row--dock #tools { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 3px; }
  .lab.is-tall .lab__row--dock #tools button { padding: 0; }
  .lab.is-tall .lab__row--dock .lab__seg button { padding-block: 0; }
}
/* a phone on its side: the round buttons share the walk pad's row, so the tools get the full width for their 44 px buttons */
.lab.is-tall .has-screen-layout.is-short .lab__screen-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "msg msg" "act mini" "dock dock"; align-items: end; row-gap: 6px; column-gap: 8px; }
.lab.is-tall .has-screen-layout.is-short .lab__screen-toolrow { display: contents; }
.lab.is-tall .has-screen-layout.is-short .lab__screen-messages { grid-area: msg; justify-self: center; }
.lab.is-tall .has-screen-layout.is-short .lab__screen-actions { grid-area: act; justify-content: flex-start; width: auto; }
.lab.is-tall .has-screen-layout.is-short .lab__screen-mini { grid-area: mini; }
.lab.is-tall .has-screen-layout.is-short .lab__screen-footer #dock { grid-area: dock; max-width: none; }
.lab.is-tall .has-screen-layout.is-short .lab__screen-header { max-height: 46%; grid-template-columns: minmax(0, 1fr) auto; } /* the job line gets the width, so it takes one line */
.lab.is-tall .has-screen-layout.is-short .lab__tl .lab__paint-ask { max-width: 100%; }
.lab.is-tall .has-screen-layout.is-short .lab__paint-ask li:nth-child(n+2) { display: none; } /* as on an upright phone: the first line and any warning */
/* the phone on a phone on its side: a wider sheet the game's height, not a narrow phone shape */
.lab.is-tall .has-screen-layout.is-short .lab__phone-dev { right: 8px; bottom: 8px; height: calc(100% - 16px); width: min(400px, calc(100% - 16px)); max-width: none; max-height: none; aspect-ratio: auto; padding: 6px; border-radius: 22px; }
/* choice cards open between the top row and the bottom row, never over the clock or the job line; the walk pad steps aside while
   one is open, so the card has the room */
.lab.is-tall .lab__stage.has-screen-layout > .lab__oscard { top: var(--screen-head); max-height: calc(100% - var(--screen-head) - var(--screen-foot)); font-size: .8rem; padding: .6rem .8rem; }
.lab.is-tall .lab__stage.has-screen-layout:has(> .lab__oscard:not([hidden])) .lab__screen-actions .lab__pad { display: none !important; }
/* a phone on its side has little height, so a panel that is up takes the room beside the clock column. A choice card: the top-left
   stack steps aside while you decide and the card runs from the top to the bottom row. The While you wait panel: the job line and
   the paint request step aside (the fence buttons stay), the panel sits under them, and the cold message moves to the right */
.lab.is-tall .lab__stage.has-screen-layout.is-short:has(> .lab__oscard:not([hidden])) #tl-stack { visibility: hidden; }
.lab.is-tall .lab__stage.has-screen-layout.is-short > .lab__oscard { top: 8px; left: 8px; right: calc(var(--screen-right-w, 180px) + 16px); width: auto; max-width: 640px; transform: none; max-height: calc(100% - 16px - var(--screen-foot)); }
.lab.is-tall .lab__stage.has-screen-layout.is-short:has(> #waitbox:not([hidden])) #tl-stack > :not(.lab__fences):not(.lab__tl-row) { display: none !important; }
.lab.is-tall .lab__stage.has-screen-layout.is-short .lab__waitbox { top: var(--screen-left); transform: none; max-height: calc(100% - var(--screen-left) - var(--screen-foot)); box-sizing: border-box; overflow-y: auto; }
.lab.is-tall .lab__stage.has-screen-layout.is-short:has(> #waitbox:not([hidden])) #clock-cold { align-self: flex-end; width: min(460px, calc(100% - 20rem)); }
/* room to breathe: squeezes made for the short phone frame, undone while the game fills an upright phone */
.lab.is-tall .has-screen-layout:not(.is-short) .lab__tl .lab__paint-ask { font-size: .66rem; }
.lab.is-tall .has-screen-layout:not(.is-short) .lab__paint-ask:not(.is-compact) li:nth-child(n+2) { display: list-item; } /* the whole request, not just its first line */
.lab.is-tall .has-screen-layout:not(.is-short) .lab__hint { font-size: .7rem; max-width: 92%; }
.lab.is-tall .has-screen-layout:not(.is-short) .lab__screen-header { max-height: 40%; } /* with or without a work card: the job line and the request keep their room */

/* P79: the hire card's shops as picture cards (the game's own photo, or a drawn one), and each quirk in numbers */
.lab__hire-list.is-pics button { grid-template-columns: 64px 1fr; align-items: start; column-gap: .6rem; }
.lab__hire-pic { width: 64px; height: 56px; border-radius: 6px; background: #f4f1ea; display: grid; grid-template: 100% / 100%; place-items: center; overflow: hidden; } /* P86: a fixed cell, so a tall picture shrinks to fit instead of being cut */
.lab__hire-pic img { width: 100%; height: 100%; object-fit: contain; }
.lab__hire-pic svg { width: 58px; height: 44px; }
.lab__hire-txt { display: grid; gap: .05rem; min-width: 0; }
.lab__hire-quirk { font-size: .8rem; color: #ffd28a; }
.lab__hire-quirk b { font-weight: 800; }
.lab__hirecard .lab__brief-why .lab__oscard-row { margin-top: .5rem; }
.lab__hirecard .lab__oscard-row button { min-height: 44px; } /* P86: Back and Hire it big enough for a thumb */
/* P81 (owner, 20 Oct 2026): the start menu is clean. A card left open in a job (the Menu button keeps the job running behind the
   menu) waits out of sight and is there again on Back to my job; the job board's own briefing and its hire card still show */
.lab.is-start .lab__stage > .lab__oscard:not(.is-over-brief), .lab.is-start #coat-choice, .lab.is-start #damp-card, .lab.is-start #pump-card,
.lab.is-start #unpack-card, .lab.is-start #van-card, .lab.is-start #cover-panel { display: none !important; }
/* P81 (merge of P80 with the choice cards): on a laptop screen the open job card (up to 21rem) reached under the left edge of a
   centred choice card by a few pixels; while a choice card is up the job card stops 8 px short of it */
@media (min-width: 721px) {
  .lab__stage.has-screen-layout:has(> .lab__oscard:not([hidden])) .lab__tl .lab__paint-ask.lab__jobcard { max-width: min(21rem, calc(50vw - 316px)); min-width: 0; }
}
/* P81 (merge of P80's job card with P78's taller phone game): on an upright phone the open job card hung from the top of the screen
   over the clock and the readouts, and the While you wait panel was pushed under it. Now the open card sits just under the top row,
   full width, and ends above the walk pad; while it is open the While you wait panel steps aside (fold the card to see it again), and
   while a choice card is up the open card waits out of sight (the game folds it a moment later). The bill, like a choice card, has
   the walk pad step aside while it is open */
@media (max-width: 720px) {
  .lab.is-tall .lab__stage.has-screen-layout:not(.is-short) .lab__tl .lab__paint-ask.lab__jobcard:not(.is-collapsed) { top: calc(100% + 6px + var(--card-drop, 0px));
    max-height: max(140px, min(42vh, calc(100dvh - var(--tall-bar, 48px) - var(--screen-head, 160px) - var(--screen-foot, 200px) - 16px - var(--card-drop, 0px)))); } /* --card-drop: the cold message under the clock, when it shows (v3.js) */
  .lab.is-tall .lab__stage.has-screen-layout:not(.is-short):has(.lab__jobcard:not(.is-collapsed)) > #waitbox { display: none !important; }
  .lab.is-tall .lab__stage.has-screen-layout:not(.is-short):has(#handover:not([hidden])) .lab__tl .lab__paint-ask.lab__jobcard:not(.is-collapsed) { /* and above the Hand over button when it shows */
    max-height: max(120px, min(42vh, calc(100dvh - var(--tall-bar, 48px) - var(--screen-head, 160px) - var(--screen-foot, 200px) - 86px - var(--card-drop, 0px)))); }
  .lab__stage.has-screen-layout:has(> .lab__oscard:not([hidden])) .lab__tl .lab__paint-ask.lab__jobcard:not(.is-collapsed) { visibility: hidden; }
}
.lab.is-tall .lab__stage.has-screen-layout:has(> #bill-pop:not([hidden])) .lab__screen-actions .lab__pad { display: none !important; }
/* P81: the Hand over button waits while a choice card is up (the hire return card opened over it on phones); it is back when the card closes */
.lab__stage:has(> .lab__oscard:not([hidden])) #handover { visibility: hidden !important; pointer-events: none !important; }
/* P82: news on the phone. The button shakes once, and a small toast names what came (a tap on it opens that app) */
.lab__phonebtn.is-buzz { animation: ph-buzz .5s ease-in-out 1; }
@keyframes ph-buzz { 0%, 100% { transform: none; } 15% { transform: rotate(-12deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }
.ph-toast { position: absolute; z-index: 950; top: 12px; left: 50%; transform: translate(-50%, -16px); opacity: 0; display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(380px, calc(100% - 120px)); min-height: 44px; box-sizing: border-box; padding: 8px 14px 8px 8px; border: 1px solid rgba(244, 239, 227, .28); border-radius: 16px; background: rgba(15, 29, 22, .94); color: #f4efe3; font: 500 0.8rem/1.3 var(--font-sans, system-ui, sans-serif); text-align: left; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); cursor: pointer; transition: transform .25s ease, opacity .25s ease; pointer-events: auto; }
.ph-toast[hidden] { display: none; }
.ph-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.ph-toast .lab__face { width: 34px; height: 34px; }
.ph-toast-ico { flex: none; width: 34px; height: 34px; }
.ph-toast-ico svg { width: 100%; height: 100%; display: block; }
.ph-toast-col { display: flex; flex-direction: column; min-width: 0; }
.ph-toast-title { font-size: 0.66rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.ph-toast-text { overflow-wrap: anywhere; }
.lab.is-start .ph-toast { top: 14px; }
@media (max-width: 600px) { .ph-toast { max-width: calc(100% - 24px); } .lab.is-start .ph-toast { top: 64px; } }
@media (prefers-reduced-motion: reduce) { .ph-toast { transition: none; } .lab__phonebtn.is-buzz { animation: none; } }
/* P83: the bank's texts in the phone Bank, newest first */
.ph-texts { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 6px; }
.ph-text { padding: 8px 10px; border-radius: 12px 12px 12px 4px; background: rgba(255, 255, 255, .1); font-size: 0.78rem; line-height: 1.35; }
.ph-text.is-rate { background: rgba(232, 165, 33, .2); }
.ph-text.is-new { box-shadow: inset 3px 0 0 #e5483c; }
.ph-rateline { margin-top: 2px; }
/* P83: the handover walk-round: the client's face card travels with the camera, each line lands as a tick or a cross, then the stamp */
.lab__walk { position: absolute; inset: 0; z-index: 40; cursor: pointer; }
.lab__walk[hidden] { display: none; }
.lab__walk-card { position: absolute; left: 16px; bottom: 16px; width: min(340px, calc(100% - 32px)); max-height: calc(100% - 32px); box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid rgba(244, 239, 227, .25); border-radius: 14px; background: rgba(15, 29, 22, .92); color: #f4efe3; font: 500 0.82rem/1.35 var(--font-sans, system-ui, sans-serif); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .3s ease; }
.lab__walk.is-on .lab__walk-card { opacity: 1; transform: none; }
.lab__walk.is-leaving .lab__walk-card, .lab__walk.is-leaving .lab__walk-stamp { opacity: 0; }
.lab__walk-head { display: flex; align-items: center; gap: 10px; }
.lab__walk-who { display: flex; flex-direction: column; }
.lab__walk-who b { font-size: 0.95rem; }
.lab__walk-role { font-size: 0.7rem; opacity: .7; }
.lab__walk-say { margin: 0; min-height: 2.7em; font-size: 0.9rem; font-style: italic; transition: opacity .2s; }
.lab__walk-card.is-moving .lab__walk-say { opacity: .35; }
.lab__walk-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 11.5rem; overflow: auto; }
.lab__walk-lines li { display: flex; gap: 8px; align-items: baseline; font-size: 0.78rem; transition: opacity .2s; }
.lab__walk-lines li.is-wait { opacity: .45; }
.lab__walk-mark { flex: none; width: 1.1em; font-weight: 800; text-align: center; }
.lab__walk-lines li.is-tick .lab__walk-mark { color: #7ed37a; }
.lab__walk-lines li.is-cross .lab__walk-mark { color: #ff7a6a; }
.lab__walk-lines li.is-unknown .lab__walk-mark { color: #f3d27a; }
.lab__walk-lines li.is-tick, .lab__walk-lines li.is-cross, .lab__walk-lines li.is-unknown { animation: walk-land .3s ease-out 1; }
@keyframes walk-land { from { transform: translateX(-6px); opacity: .4; } to { transform: none; opacity: 1; } }
.lab__walk-skip { margin: 0; font-size: 0.68rem; opacity: .6; }
.lab__walk-stamp { position: absolute; left: 50%; top: 36%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 26px 8px; border: 5px solid #3c9b52; border-radius: 12px; background: rgba(244, 239, 227, .94); color: #2f7d42; transform: translate(-50%, -50%) rotate(-7deg) scale(2.2); opacity: 0; transition: transform .28s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; pointer-events: none; }
.lab__walk-stamp[hidden] { display: none; }
.lab__walk-stamp.is-in { transform: translate(-50%, -50%) rotate(-7deg) scale(1); opacity: 1; }
.lab__walk-stamp.is-bad { border-color: #c4473a; color: #b23a2e; }
.lab__walk-stamp b { font: 900 2.3rem/1 var(--font-sans, system-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; }
.lab__walk-stars { font-size: 1.5rem; letter-spacing: .1em; color: #e3a21a; }
.lab__stage.is-walk #dock, .lab__stage.is-walk .lab__pad, .lab__stage.is-walk #hint, .lab__stage.is-walk .lab__screen-actions, .lab__stage.is-walk #paint-ask, .lab__stage.is-walk #handover, .lab__stage.is-walk .lab__sheetbtn, .lab__stage.is-walk #bill-pop, .lab__stage.is-walk #waitbox, .lab__stage.is-walk #clock-cold, .lab__stage.is-walk #rainbar { visibility: hidden !important; }
@media (max-width: 600px) { .lab__walk-card { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 48%; padding: 10px 12px; } .lab__walk-stamp { top: 30%; } .lab__walk-stamp b { font-size: 1.9rem; } .lab__walk-lines { max-height: 9rem; } }
@media (max-height: 460px) { .lab__walk-card { max-height: calc(100% - 20px); bottom: 10px; } .lab__walk-lines { max-height: 6rem; } .lab__walk-stamp { top: 40%; } }
@media (prefers-reduced-motion: reduce) { .lab__walk-card, .lab__walk-stamp { transition: none; } .lab__walk-lines li { animation: none !important; } }
/* P83: the bank's text and a new offer show over the verdict too, and a tap on the toast opens the phone there */
.lab__stage.has-screen-layout.has-result > .ph-toast:not(#done), .lab__stage.has-screen-layout.has-result > .lab__phone:not(#done) { visibility: visible; }
/* P85 (owner, 20 Oct 2026): in the right column the kit warnings, the kit bar, the clock and the phone button never shrink or clip;
   a long HUD takes the squeeze and scrolls inside itself, so the warning circles, their red dots and focus rings stay whole */
.has-screen-layout .lab__screen-right > #kitwarn, .has-screen-layout .lab__screen-right > #kitbar, .has-screen-layout .lab__screen-right > #clock-ro, .has-screen-layout .lab__screen-right > .lab__phonebtn { flex: none; }
.has-screen-layout .lab__screen-right > #hud { flex: 0 1 auto; min-height: 0; overflow: auto; scrollbar-width: none; }
.has-screen-layout .lab__screen-right > #hud::-webkit-scrollbar { display: none; }
.has-screen-layout #kitwarn { padding: 3px 3px 3px 0; } /* room for the red dot and the focus ring inside the column's own scroll box */
/* P97 (owner, 21 Oct 2026): a task card (new timber, old board) shows in full, its cutting-list button too. The top-left column grows to fit it; if a short screen still cannot, the column scrolls inside itself and a fade marks the hidden part. */
.has-screen-layout .lab__screen-header:has(#job-steps:not([hidden])) { max-height: 62%; }
.has-screen-layout .lab__screen-header #tl-stack:has(> #job-steps:not([hidden])) { max-height: 100%; } /* over the open job card's own limit */
.has-screen-layout.has-work-card .lab__screen-header:has(#job-steps:not([hidden])), .has-screen-layout.is-short .lab__screen-header:has(#job-steps:not([hidden])) { max-height: 44%; }
.has-screen-layout .lab__screen-header #tl-stack.is-more-below { -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), #0000); mask-image: linear-gradient(#000 calc(100% - 28px), #0000); }
.has-screen-layout .lab__screen-header #tl-stack.is-more-above { -webkit-mask-image: linear-gradient(#0000, #000 28px); mask-image: linear-gradient(#0000, #000 28px); }
.has-screen-layout .lab__screen-header #tl-stack.is-more-above.is-more-below { -webkit-mask-image: linear-gradient(#0000, #000 28px, #000 calc(100% - 28px), #0000); mask-image: linear-gradient(#0000, #000 28px, #000 calc(100% - 28px), #0000); }
/* P97 addition: the missing-kit speech bubble (what is wrong, what you can do) and 44 px tap targets on the icons, the red ring drawn inside them */
.lab__kittip { position: absolute; z-index: 9; box-sizing: border-box; padding: 9px 11px 10px; border: 1.5px solid #e2574c; border-radius: 12px; background: rgba(15, 29, 22, .96); color: #f3ecdc; font: 500 .76rem/1.35 var(--font-sans, system-ui); box-shadow: 0 6px 22px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(-4px); transition: opacity .35s, transform .35s; pointer-events: auto; }
.lab__kittip.is-in { opacity: 1; transform: none; }
.lab__kittip[hidden] { display: none; }
.lab__kittip::before { content: ''; position: absolute; top: -7px; left: calc(var(--ax, 30px) - 6px); width: 11px; height: 11px; background: inherit; border: inherit; border-width: 1.5px 0 0 1.5px; border-radius: 2px 0 0 0; transform: rotate(45deg); }
.lab__kittip.is-side::before { top: 16px; left: auto; right: -7px; border-width: 1.5px 1.5px 0 0; border-radius: 0 2px 0 0; }
.lab__kittip b { color: #ffb4a8; }
.lab__kittip span { display: block; margin-top: 2px; opacity: .85; }
.lab__kittip-btns { display: flex; gap: 6px; margin-top: 7px; }
.lab__kittip-btns button { flex: 1 1 0; min-height: 44px; padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: #1f3a2c; color: inherit; font: 700 .74rem/1.2 var(--font-sans, system-ui); cursor: pointer; }
.lab__kittip-btns button:first-child { background: #e07b39; border-color: #e07b39; color: #1a120c; }
.lab__kittip-btns button:hover, .lab__kittip-btns button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 1px; }
.has-screen-layout #kitwarn button { width: 44px; height: 44px; padding: 10px; border: 0; background: none; isolation: isolate; }
.has-screen-layout #kitwarn button::before { content: ''; position: absolute; inset: 5px; z-index: -1; border-radius: 50%; border: 1.5px solid #e2574c; background: rgba(15, 29, 22, .82); }
.has-screen-layout #kitwarn button::after { right: 3px; top: 3px; }
.has-screen-layout #kitwarn button:hover, .has-screen-layout #kitwarn button:focus-visible { background: none; }
.has-screen-layout #kitwarn button:hover::before, .has-screen-layout #kitwarn button:focus-visible::before { background: #e2574c; }
.has-screen-layout #kitwarn button.is-ping { animation: none; }
.has-screen-layout #kitwarn button.is-ping::before { animation: kitping 1.1s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .lab__kittip { transition: none; } .has-screen-layout #kitwarn button.is-ping::before { animation: none; background: #e2574c; } }
@media (max-width: 720px) { .lab__kittip { font-size: .7rem; } }
/* P95: what the tool in hand still needs, by its dock button (ready.js) */
.lab__ready { position: absolute; z-index: 4; box-sizing: border-box; max-height: 42%; overflow: auto; padding: 0.35rem 0.4rem 0.45rem 0.7rem; border-radius: 12px; background: rgba(15, 29, 22, .9); color: #f3ecdc; font-size: 0.78rem; line-height: 1.3; text-align: left; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }
.lab__ready[hidden] { display: none; }
.lab__ready-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-size: 0.82rem; }
.lab__ready-x { flex: none; width: 44px; height: 44px; margin: -0.2rem -0.15rem -0.2rem 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.lab__ready-x:hover, .lab__ready-x:focus-visible { background: rgba(255, 255, 255, .16); }
.lab__ready-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lab__ready-list li { display: flex; align-items: center; gap: 0.45rem; min-height: 28px; }
.lab__ready-list li > i { flex: none; width: 1.3em; height: 1.3em; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 0.78rem; }
.lab__ready-list li.is-ok > i { background: #5fae4a; color: #0f1d16; }
.lab__ready-list li.is-no > i { background: #e0563b; color: #fff; }
.lab__ready-list li.is-tip > i { background: #e0a31c; color: #0f1d16; } /* P119: advice, the player's choice */
.lab__ready-list li.is-ok span { color: rgba(243, 236, 220, .78); }
.lab__ready-list li span { flex: 1; }
.lab__ready-list li button { flex: none; min-height: 44px; min-width: 44px; padding: 0 0.75rem; border: 0; border-radius: 999px; background: var(--c-accent-2, #f1c45c); color: #1a1408; font: 700 0.76rem/1 var(--font-sans, inherit); cursor: pointer; }
@media (max-width: 720px) { .lab__ready { font-size: 0.74rem; max-height: 46%; } }
/* P95: the tape ghost's size and running total, or why tape cannot go there */
.lab__tapelen { position: absolute; z-index: 3; margin: 0; padding: 0.3rem 0.6rem; border-radius: 999px; background: rgba(15, 29, 22, .86); color: #e9f7c8; font: 700 0.74rem/1.2 var(--font-sans, inherit); white-space: nowrap; pointer-events: none; }
.lab__tapelen[hidden] { display: none; }
.lab__tapelen.is-bad { background: rgba(120, 28, 18, .9); color: #fff; }
@media (max-width: 720px) { .lab__tapelen { font-size: 0.68rem; } }

/* ---------- P89: the phone Shop, Shop badges on tools you have nothing for, a close button on every card ---------- */
.lab__shopb { display: block; margin: 2px auto 0; padding: 1px 6px; width: max-content; border-radius: 6px; background: #ee8068; color: #23110c; font-size: 0.58rem; font-weight: 800; line-height: 1.2; letter-spacing: 0.02em; pointer-events: none; }
[data-tool].is-shop > :not(.lab__shopb), [data-brushw].is-shop > :not(.lab__shopb) { opacity: 0.55; }
.lab__seg button.is-shop .lab__shopb { display: inline-block; margin: 0 0 0 6px; }
.lab__kitcard .lab__shopb { position: absolute; top: 4px; right: 4px; margin: 0; }
.lab__kitcard.is-shop > .lab__kitpic { opacity: 0.6; }
@media (max-width: 640px), (pointer: coarse) {
  [data-tool] .lab__shopb { position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); margin: 0; padding: 0 4px; font-size: 0.52rem; line-height: 1.25; }
}
.lab__card-x { position: sticky; top: 0; float: right; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin: -0.35rem -0.45rem 0 0.4rem; padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(15, 29, 22, .9); color: inherit; cursor: pointer; }
.lab__card-x svg { width: 18px; height: 18px; }
.lab__card-x:hover { border-color: rgba(255, 255, 255, .6); }
.lab__card-x:focus-visible { outline: 2px solid #8fd1ff; outline-offset: 2px; }
.lab__mchoice > .lab__card-x { margin: 0 0 0 0.4rem; }
.lab__tape-left { align-self: center; padding: 0 6px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.lab__tape-left.is-low { color: #ffb27a; }
.ph-shop .sh-purse { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 2px 8px; padding: 9px 12px; border-radius: 12px; background: #fff; border: 1px solid #dfe5df; font-size: 0.8rem; color: #4a5a50; }
.ph-shop .sh-purse b { font-size: 1.05rem; color: #18221d; }
.ph-shop .sh-hint { margin: 0 2px 10px; padding: 9px 12px; border-radius: 12px; background: #fff4e6; border: 1px solid #f0c48f; color: #5a3a10; font-weight: 700; font-size: 0.82rem; }
.sh-shelves { display: grid; grid-template-columns: 1fr; gap: 8px; } /* P101: one shelf a line, its picture, its name and what is on it */
.sh-shelf { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 6px 10px 6px 6px; border: 1px solid #cbd6cd; border-radius: 12px; background: #fff; color: inherit; font: inherit; font-size: 0.8rem; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; }
.sh-shelfpic { flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 9px; background: #f4f1ea; overflow: hidden; }
.sh-shelfpic img { width: 90%; height: 90%; object-fit: contain; }
.sh-shelfpic.is-icon img, .sh-pic.is-icon img { width: 58%; height: 58%; opacity: .8; }
.sh-shelftxt { display: grid; gap: 2px; min-width: 0; }
.sh-shelftxt b { color: #18221d; font-size: 0.86rem; }
.sh-say { color: #5a6a60; font-size: 0.72rem; font-weight: 500; line-height: 1.3; }
.sh-shelfsay { margin: 0 2px 8px; }
/* P101: the search box and the filter chips over the shelves */
.sh-find { display: grid; gap: 8px; margin: 0 0 10px; }
.sh-search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid #b9c7bd; border-radius: 12px; background: #fff; color: #4a5a50; }
.sh-search:focus-within { border-color: #2f86d1; box-shadow: 0 0 0 2px rgba(47, 134, 209, .25); }
.sh-search svg { flex: 0 0 auto; width: 18px; height: 18px; }
.sh-search input { flex: 1 1 auto; min-width: 0; min-height: 42px; border: 0; outline: 0; background: transparent; color: #18221d; font: inherit; font-size: 16px; } /* 16 px: a phone does not zoom in on it */
.sh-chips { position: relative; display: flex; gap: 6px; margin: 0 -2px; padding: 0 2px 2px; overflow-x: auto; scrollbar-width: none; }
.sh-chips::-webkit-scrollbar { display: none; }
.sh-chip { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border: 1px solid #cbd6cd; border-radius: 22px; background: #fff; color: #24392d; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.ph-screen .sh-chip.is-on { border-color: #24392d; background: #24392d; color: #fff; }
.sh-count { margin: 0 2px 8px; font-size: 0.78rem; font-weight: 700; color: #4a5a50; }
.sh-count.is-none { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px dashed #cbd6cd; }
.ph-screen .sh-shelfname { justify-self: start; min-height: 44px; margin: -10px 0 -8px -8px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #2f6e46; font-size: 0.72rem; font-weight: 800; letter-spacing: .02em; cursor: pointer; }
.ph-screen .sh-shelfname:hover { background: #eef5ef; }
.ph-shop > .sh-shelfname { display: block; margin: 8px 0 2px -6px; }
.sh-shelf:hover { border-color: #7fa889; }
.sh-top { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.sh-top .ph-h3 { margin: 0; }
.sh-back { min-height: 44px; padding: 0 12px; border: 1px solid #cbd6cd; border-radius: 10px; background: #fff; color: inherit; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.sh-sub { margin: 12px 2px 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6a7a70; }
.sh-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 10px; margin: 0 0 8px; padding: 9px 10px; border: 1px solid #dfe5df; border-radius: 12px; background: #fff; }
.sh-item.is-have { box-shadow: inset 3px 0 0 #48b95e; }
.sh-pic { display: grid; place-items: center; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 10px; background: #f4f1ea; overflow: hidden; } /* P101: big enough to see, and a tap on it does what its button does */
button.sh-pic { cursor: pointer; }
.sh-pic.is-none span { padding: 0 6px; color: #8a968e; font-size: 0.62rem; font-weight: 700; line-height: 1.2; text-align: center; }
button.sh-pic:hover { box-shadow: inset 0 0 0 2px #7fa889; }
button.sh-pic:focus-visible { outline: 2px solid #2f86d1; outline-offset: 2px; }
.sh-pic img { width: 92%; height: 92%; object-fit: contain; }
.sh-pic.is-tin { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .6); }
.sh-txt { display: grid; gap: 2px; min-width: 0; font-size: 0.74rem; line-height: 1.35; color: #4a5a50; }
.sh-name { color: #18221d; font-size: 0.84rem; line-height: 1.25; }
.sh-price { color: #18221d; font-weight: 700; }
.sh-price.is-confirm { color: #8a5a10; }
.sh-fx { color: #2f5e3e; font-weight: 600; }
.sh-src { color: #7a8a80; font-size: 0.68rem; }
.sh-have { color: #237a39; font-weight: 700; }
.sh-off { color: #8a5a10; }
.sh-act { grid-column: 1 / -1; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: #24392d; color: #fff; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.sh-act:hover:not(:disabled) { background: #31503e; }
.sh-act:disabled { background: #c9d1cb; color: #4a5a50; cursor: not-allowed; }
.sh-act:focus-visible, .sh-shelf:focus-visible, .sh-back:focus-visible, .sh-chip:focus-visible, .sh-shelfname:focus-visible { outline: 2px solid #2f86d1; outline-offset: 2px; }
.sh-act.sh-wear { background: #2f7a45; } /* P101: Put on, for kit you have */
.sh-act.sh-wear:hover:not(:disabled) { background: #39904f; }
.ph-screen .sh-act.sh-wear.is-worn, .ph-screen .sh-act.is-2 { border: 1px solid #24392d; background: #fff; color: #24392d; }
/* P89: paint tins on the tool row (one per paint and colour you have), a "+" to the Shop, and the cup choice */
.lab__tins { position: relative; display: flex; align-items: center; gap: 4px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .2); }
.lab__tins[hidden] { display: none; }
.lab__tin { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; flex: 0 0 auto; min-width: 48px; min-height: 46px; padding: 3px 4px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(255, 255, 255, .06); color: inherit; font: inherit; cursor: pointer; }
.lab__tin:hover { border-color: rgba(255, 255, 255, .5); }
.lab__tin.is-active { border-color: #e9b949; box-shadow: inset 0 0 0 1px #e9b949; background: rgba(233, 185, 73, .14); }
.lab__tin:focus-visible, .lab__tincup:focus-visible, .lab__tinask button:focus-visible { outline: 2px solid #8fd1ff; outline-offset: 2px; }
.lab__tinpic svg { display: block; width: 18px; height: 21px; }
.lab__tin .lab__lbl { max-width: 62px; font-size: 0.55rem; font-weight: 700; line-height: 1.05; text-align: center; }
.lab__tinl { position: absolute; right: -3px; top: -5px; padding: 0 3px; border-radius: 5px; background: rgba(10, 20, 15, .85); font-size: 0.55rem; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.lab__tinplus { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.lab__tin--tray { width: auto; padding: 0 10px; font-size: 0.72rem; font-weight: 700; }
.lab__tincup { flex: 0 0 auto; min-height: 44px; padding: 0 9px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 0.66rem; font-weight: 700; line-height: 1.15; cursor: pointer; }
.lab__tintray { position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 9; display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: min(320px, 92vw); padding: 8px; border-radius: 12px; background: rgba(15, 29, 22, .97); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.lab__tinask { position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 9; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: max-content; max-width: min(340px, 92vw); padding: 8px 10px; border-radius: 12px; background: rgba(15, 29, 22, .97); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.lab__tintray .lab__tinask { position: static; flex-basis: 100%; padding: 4px 0 0; box-shadow: none; background: none; }
.lab__tinask p { flex-basis: 100%; margin: 0; font-size: 0.74rem; font-weight: 700; }
.lab__tinask button { min-height: 44px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; background: rgba(255, 255, 255, .08); color: inherit; font: inherit; font-size: 0.74rem; font-weight: 700; cursor: pointer; }
.lab__tinask button:hover { border-color: #e9b949; }
.ph-shop .sh-paint { grid-template-columns: 76px minmax(0, 1fr); }
.ph-shop .sh-paint .sh-tins { grid-column: 1 / -1; }
.sh-tins { display: grid; gap: 6px; }
.sh-tin { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid #eef1ee; }
.sh-tin.is-have .sh-sw { box-shadow: 0 0 0 2px #48b95e; }
.sh-sw { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); }
.sh-tin:has(.sh-sw.is-tin) { grid-template-columns: 40px minmax(0, 1fr) auto; }
.sh-sw.is-tin { position: relative; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; } /* P101: the tin's own photo, its colour round the edge */
.sh-sw.is-tin img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; background: #fff; border-radius: 6px; }
.sh-tintxt { display: grid; font-size: 0.74rem; line-height: 1.3; color: #4a5a50; }
.sh-tintxt b { color: #18221d; }
.sh-tin .sh-act { grid-column: auto; padding: 0 10px; font-size: 0.74rem; }
/* P89 (owner: "make the names there too somehow, some users may not be able to identify"): every tool keeps its name under its icon at every
   width; a toolbar too tight for one row wraps into two rows instead of hiding the names */
.lab.tools-wrap .lab__row--dock #tools { flex-wrap: wrap; justify-content: center; overflow: visible; }
.lab.tools-wrap .lab__row--dock #tools button { flex: 0 0 auto; min-width: 48px; min-height: 46px; flex-direction: column; gap: 2px; padding: 0.3rem 0.4rem 0.25rem; }
@media (max-width: 720px) {
  .lab__row--dock #tools { flex-wrap: wrap; justify-content: center; gap: 3px; overflow: visible; }
  .lab__row--dock #tools button { flex: 0 0 calc((100% - 18px) / 7); min-height: 46px; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 0 3px; }
  .lab__row--dock #tools .lab__lbl { display: block; font-size: 0.55rem; line-height: 1.05; }
  .lab__row--dock #tools button svg { margin-right: 0; }
  [data-tool] .lab__shopb { top: 1px; right: 1px; left: auto; bottom: auto; transform: none; }
  .lab__tins { flex-wrap: wrap; justify-content: center; border-left: 0; padding-left: 0; }
}
.ph-screen .sh-act { color: #fff; font-weight: 700; } /* P89: the phone's own button rule would make the label dark on dark */
.ph-screen .sh-act:disabled { color: #4a5a50; }
.lab__tins.is-narrow .lab__tintray { position: static; flex-basis: 100%; width: auto; max-width: none; box-shadow: none; background: rgba(255, 255, 255, .05); } /* P89: on a phone the tray opens as a row inside the toolbar, so nothing covers it */
/* P88: the brush angle, any degree from 0 (level) to 180, with ticks at 0, 45, 90 and 135 */
.lab__brushang { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0 0.3rem; color: var(--c-cream); font: 600 0.72rem/1 var(--font-sans, system-ui); }
.lab__brushang-lbl { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.lab__brushang-lbl output { display: inline-block; min-width: 2.4em; text-align: right; font-variant-numeric: tabular-nums; color: var(--c-accent-2, #f2b36b); }
#brush-ang-ico { display: inline-block; width: 16px; height: 4px; border-radius: 2px; background: currentColor; transition: transform .08s linear; }
.lab__brushang-track { position: relative; display: inline-block; width: 168px; height: 30px; }
.lab__brushang input[type="range"] { position: absolute; inset: 0 0 10px 0; width: 100%; height: 20px; margin: 0; accent-color: var(--c-accent, #d97742); cursor: pointer; background: transparent; }
.lab__brushang-ticks { position: absolute; left: 8px; right: 8px; bottom: 0; height: 10px; pointer-events: none; }
.lab__brushang-ticks b { position: absolute; top: 0; transform: translateX(-50%); font: 600 0.56rem/1 var(--font-sans, system-ui); opacity: 0.75; }
.lab__brushang-ticks b::before { content: ""; position: absolute; left: 50%; top: -4px; width: 1px; height: 3px; background: currentColor; }
@media (pointer: coarse), (max-width: 720px) {
  .lab__brushang-track { width: 150px; height: 44px; }
  .lab__brushang input[type="range"] { height: 44px; inset: 0; } /* the whole 44 px is the touch target; the tick labels sit over its lower edge and let touches through */
}
/* P99: owner mode's switch on the start menu (shown only while it is on), the firm's reset under Set up the job, and the phone's lesson list */
.lab__start-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: .75rem; opacity: .9; }
.lab__start-owner button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 1px solid #f3d27a; border-radius: 999px; padding: 3px 4px 3px 11px; background: rgba(15, 29, 22, .8); color: #f3ecdc; font: inherit; font-weight: 700; cursor: pointer; }
.lab__start-owner button b { padding: 2px 8px; border-radius: 999px; background: #f3d27a; color: #1a120c; }
.lab__start-owner button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
.lab__start-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #e07b39; border-radius: 8px; background: #1d2a21; }
.lab__start-setup .lab__start-confirm p { flex: 1 1 100%; margin: 0 0 2px; font-size: .8rem; text-transform: none; letter-spacing: 0; opacity: 1; }
.lab__start-confirm button { border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 4px 11px; background: transparent; color: #f3ecdc; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.lab__start-confirm button:first-of-type { background: #e07b39; border-color: #e07b39; color: #1a120c; }
.lab__start-confirm button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; }
.ph-lessons { margin: 6px 2px 12px; padding: 12px 12px 6px; border-radius: 14px; background: #eef3ee; color: #22322a; }
.ph-lessons > b { display: block; font-size: .95rem; }
.ph-lessons > p { margin: 4px 0 6px; font-size: .82rem; color: #4a5a50; }
.ph-lessons ul { margin: 0; padding: 0; list-style: none; }
.ph-lessons li { position: relative; padding: 7px 0 7px 26px; border-top: 1px solid rgba(0, 0, 0, .07); font-size: .84rem; line-height: 1.35; }
.ph-lessons li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 14px; height: 14px; border: 2px solid #8a9a90; border-radius: 50%; }
.ph-lessons li.is-done { color: #5a6a60; }
.ph-lessons li.is-done::before { border-color: #3f8a5a; background: #3f8a5a; box-shadow: inset 0 0 0 2px #eef3ee; }
/* P100: standing at the van, the job card folds to its title line so the van panel never covers it (unpack.js keepClear) */
.lab__stage.is-at-van .lab__jobcard .lab__card-lines, .lab__stage.is-at-van .lab__jobcard .lab__card-warns, .lab__stage.is-at-van .lab__jobcard .lab__card-foot, .lab__stage.is-at-van .lab__jobcard .lab__card-note, .lab__stage.is-at-van .lab__jobcard .lab__card-sub { display: none !important; }

/* ---- P108 (onemenu, 22 Oct 2026, owner: "add these into 1 place menu"): one Menu button on the row above the game ---- */
/* Main menu, How to play, Sound, Music, Mouse look, Shadows and Full screen live in one panel: a dropdown under the button, a sheet
   from the bottom on phones. It sits above the game, full screen included. */
.lab__menu { margin-left: auto; flex: 0 0 auto; display: flex; }
.lab__menubtn { display: inline-flex; align-items: center; gap: 6px; font: 600 0.85rem/1 var(--font-sans); color: var(--c-accent-2); background: transparent;
  border: 1px solid rgba(243, 201, 138, .5); border-radius: 999px; padding: 0.5rem 1rem 0.5rem 0.8rem; cursor: pointer; transition: background .2s; }
.lab__menubtn:hover, .lab__menu.is-open .lab__menubtn { background: rgba(243, 201, 138, .14); }
.lab__menubtn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lab__menubtn:focus-visible, .lab__menuitem:focus-visible, .lab__menuseg button:focus-visible { outline: 2px solid var(--c-accent-2); outline-offset: 1px; }
.lab__menupanel { position: fixed; z-index: 2000; width: 280px; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 12px;
  background: var(--c-bg, #0f1d16); border: 1px solid rgba(243, 201, 138, .35); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); color: var(--c-cream, #f5f1e8); font: 500 0.88rem/1.2 var(--font-sans); }
.lab__menupanel[hidden] { display: none; }
.lab__menugroup + .lab__menugroup { border-top: 1px solid rgba(245, 241, 232, .12); margin-top: 4px; padding-top: 4px; }
.lab__menuhead { margin: 0; padding: 7px 10px 4px; font: 700 0.68rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(245, 241, 232, .55); }
.lab__menuitem { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 38px; padding: 0 10px; margin: 0; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lab__menuitem:hover, .lab__menuitem:focus-visible { background: rgba(243, 201, 138, .12); }
.lab__menuitem > span:first-child { flex: 1 1 auto; }
.lab__menuitem kbd { flex: none; font: 700 0.7rem/1 var(--font-sans); padding: 3px 6px; border-radius: 4px; border: 1px solid rgba(245, 241, 232, .3); color: rgba(245, 241, 232, .75); }
.lab__switch { flex: none; position: relative; width: 34px; height: 20px; border-radius: 999px; background: rgba(245, 241, 232, .22); transition: background .2s; }
.lab__switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #f5f1e8; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: transform .2s; }
[aria-checked="true"] > .lab__switch { background: var(--c-accent, #e07a3f); }
[aria-checked="true"] > .lab__switch::after { transform: translateX(14px); }
.lab__menuitem--seg { cursor: default; }
.lab__menuitem--seg:hover { background: transparent; }
.lab__menuseg { flex: none; display: inline-flex; padding: 2px; border-radius: 999px; background: rgba(245, 241, 232, .1); }
.lab__menuseg button { min-width: 44px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: inherit; font: 600 0.78rem/1 var(--font-sans); cursor: pointer; }
.lab__menuseg button:hover { background: rgba(243, 201, 138, .16); }
.lab__menuseg button[aria-checked="true"] { background: var(--c-accent-2, #f3c98a); color: var(--c-bg, #0f1d16); }
@media (prefers-reduced-motion: reduce) { .lab__switch, .lab__switch::after { transition: none; } }
@media (max-width: 720px) { /* phones: the Menu stays in view at the right end of the row (left of the Page button while you play) while the tabs scroll under it */
  .lab__menu { position: sticky; right: var(--page-w, 0px); z-index: 2; padding-left: 4px; background: var(--c-bg, #0f1d16); box-shadow: -8px 0 8px 0 var(--c-bg, #0f1d16); }
  .lab.is-tall .lab__menu { padding-right: 4px; }
  .lab__menubtn { position: relative; justify-content: center; width: 44px; min-height: 44px; padding: 0; } /* the icon alone, so Your garden stays in view; the word stays for screen readers */
  .lab__menubtn svg { width: 20px; height: 20px; }
  .lab__menubtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lab__tabs .lab__tab { padding-inline: 0.65rem; }
}
@media (max-width: 720px) { /* phones: a sheet from the bottom of the screen */
  .lab__menupanel { top: auto; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); border-radius: 16px; padding: 8px; font-size: 0.95rem; }
}
@media (pointer: coarse) { /* fingers: every target at least 44 px */
  .lab__menubtn { min-height: 44px; }
  .lab__menuitem { min-height: 48px; }
  .lab__menuseg button { min-height: 44px; min-width: 60px; }
}
/* P112: sitting at the patio table: the pass time card (bottom right, above the tool dock) */
.lab__sit { position: absolute; right: 0.6rem; bottom: 6.2rem; z-index: 5; width: min(16.5rem, 46%); box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(20, 30, 38, .88); color: #e8eef3; font-size: 0.8rem; line-height: 1.3; box-shadow: 0 6px 18px rgba(0, 0, 0, .28); }
.lab__sit[hidden] { display: none; }
.lab__sit p { margin: 0; }
.lab__sit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: #f3d27a; text-transform: uppercase; letter-spacing: .06em; font-size: 0.7rem; }
.lab__sit-clock { color: #fff; font-size: 1.15rem; font-weight: 700; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.lab__sit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.lab__sit-list li:nth-child(n + 4) { grid-column: 1 / -1; }
.lab__sit-list button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; border-radius: 10px; padding: 6px 9px; background: rgba(255, 255, 255, .14); color: #e8eef3; font: inherit; text-align: left; cursor: pointer; }
.lab__sit-list button span { font-size: 0.7rem; color: #c3ced6; }
.lab__sit-note { font-size: 0.7rem; color: #c3ced6; }
.lab__sit-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.lab__sit-bar i { display: block; height: 100%; width: 0; background: #f3d27a; }
.lab__sit-go, .lab__sit-stand { border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.lab__sit-go { background: #e07b39; color: #1a120c; }
.lab__sit-stand { background: #e8eef3; color: #1a2026; }
.lab__sit button:hover { filter: brightness(1.15); }
.lab__sit button:focus-visible { outline: 2px solid #f3d27a; outline-offset: 1px; }
@media (max-width: 640px) { .lab__sit { right: 0.4rem; bottom: auto; top: 7.5rem; width: min(15rem, 62%); font-size: 0.74rem; } }
/* P112: the phone's YouTube app */
.ph-yt { display: flex; flex-direction: column; gap: 10px; }
.ph-yt-player { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0f0f0f; }
.ph-yt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ph-yt-off { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 12px; color: #fff; text-align: center; }
.ph-yt-now { display: flex; flex-direction: column; gap: 3px; }
.ph-yt-now span { font-size: 0.74rem; color: #4a5a50; }
.ph-yt-close { align-self: flex-start; margin-top: 3px; border: 0; border-radius: 999px; padding: 5px 12px; background: #e3e8e4; cursor: pointer; }
.ph-yt-h { margin: 4px 0 0; font-size: 0.9rem; }
.ph-yt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ph-yt-row { width: 100%; display: flex; gap: 9px; align-items: flex-start; padding: 4px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.ph-yt-row:hover, .ph-yt-row:focus-visible, .ph-yt-row.is-on { background: #e3e8e4; outline: none; }
.ph-yt-thumb { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #22282a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 22'%3E%3Crect width='32' height='22' rx='6' fill='%23f03'/%3E%3Cpath d='M13 6v10l8-5z' fill='%23fff'/%3E%3C/svg%3E") center / 34px no-repeat; }
.ph-yt-tag { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font: 700 0.64rem/1.4 var(--font-sans, system-ui, sans-serif); font-style: normal; }
.ph-yt-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-yt-col b { font-size: 0.8rem; line-height: 1.25; }
.ph-yt-col span { font-size: 0.72rem; color: #4a5a50; }
.ph-yt-paste { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 4px; }
.ph-yt-paste label { grid-column: 1 / -1; font-weight: 700; font-size: 0.78rem; }
.ph-yt-paste input { min-width: 0; padding: 8px 10px; border: 1px solid #b9c4bd; border-radius: 10px; background: #fff; color: #18221d; font: inherit; }
.ph-yt-go { border: 0; border-radius: 10px; padding: 8px 14px; background: #f03; color: #fff !important; font-weight: 700 !important; cursor: pointer; }
.ph-yt-err { margin: 0; color: #b3261e; font-size: 0.75rem; }
.ph-yt-err[hidden] { display: none; }
.ph-yt-open, .ph-yt-ours { display: block; padding: 9px 12px; border-radius: 10px; background: #18221d; color: #fff; text-align: center; font-weight: 700; text-decoration: none; }
.ph-yt-note { margin: 0; font-size: 0.72rem; color: #4a5a50; }
/* P106: kit wears out. A thin wear bar along the foot of each tool, brush and kit button of yours that wears, and My kit's rows */
[data-tool], [data-brushw], [data-kit], [data-worklight] { position: relative; }
.lab__life { position: absolute; left: 6px; right: 6px; bottom: 2px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .38); overflow: hidden; pointer-events: none; }
.lab__life b { display: block; height: 100%; border-radius: 2px; background: #5cc27a; }
.lab__life[data-tone="mid"] b { background: #e2b33c; }
.lab__life[data-tone="low"] b { background: #f07a35; }
.lab__life[data-tone="out"] { background: #b8332a; }
.ph-bar.is-mid i { background: #d6a12f; }
.ph-rows li.ph-life { grid-template-columns: 1fr auto; }
.ph-rows li.ph-life.is-focus { box-shadow: inset 4px 0 0 #e9822c; }
.ph-lifeunit { grid-column: 1 / -1; display: grid; gap: 4px; padding: 6px 0 2px; border-top: 1px solid #eef1ee; }
.ph-lifeunit.is-low .ph-lifeword { color: #a8401f; font-weight: 700; }
.ph-lifeunit.is-out .ph-lifeword { color: #b8332a; font-weight: 800; }
.ph-lifeword { font-size: 0.78rem; }
.ph-lifeacts { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-lifeacts .sh-act, .ph-life > .sh-act { flex: 1 1 8rem; min-height: 44px; padding: 0 10px; font-size: 0.78rem; }
.ph-life > .sh-act { grid-column: 1 / -1; background: #2f5a7a; }
.ph-lifesrc { grid-column: 1 / -1; color: #5a6a60; font-size: 0.72rem; line-height: 1.35; }
.ph-lifereset { margin-top: 10px; }

/* P117 (owner, 22 Oct 2026: "in this region doesn't show anything?", "tape is there but invisible and I haven't placed it yet but it's not allowing me"). The top band's two columns and the action strip stretch across the picture but are see-through: they took the mouse, so over the top of the fence the aim stood still and a press never reached the game. Only their own panels and buttons take the mouse now (a panel that never did, such as the HUD, still lets it through); scrolling a column still works from its panels. */
.lab__screen-header #tl-stack, .lab__screen-right, .lab__screen-actions { pointer-events: none; }
:where(.lab__screen-header #tl-stack, .lab__screen-right, .lab__screen-actions) > * { pointer-events: auto; }
/* P116: the toolbar's Tape measure and the Masking tape name: full names on wide screens, one word on phones (the full name stays in
   the title and the spoken label); while measuring the card is one line, a small "for me" choice and the close cross */
.lab__lbl-short { display: none; }
@media (max-width: 720px) { .lab__lbl-long { display: none; } .lab__lbl-short { display: inline; } }
#tools [data-measure] { position: relative; }
#tools [data-measure].is-shop > :not(.lab__shopb) { opacity: 0.55; }
@media (max-width: 640px), (pointer: coarse) { #tools [data-measure] .lab__shopb { position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); margin: 0; padding: 0 4px; font-size: 0.52rem; line-height: 1.25; } }
@media (max-width: 720px) { #tools [data-measure] .lab__shopb { top: 1px; right: 1px; left: auto; bottom: auto; transform: none; } }
.lab__cut.is-measuring { padding: .45rem .7rem; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .5rem; }
.lab__screen-work > .lab__cut.is-measuring { margin-top: auto; } /* low, just over the toolbar and the live reading: the fence above stays clear */
.lab__cut.is-measuring .lab__cut-row { flex-wrap: nowrap; justify-content: flex-end; }
.lab__cut.is-measuring .lab__cut-auto { margin-left: 0; padding: .35rem .8rem; white-space: nowrap; } /* both choices on one row: the card keeps its height, so the gap above stays in view */
.lab__cut.is-measuring #cut-title, .lab__cut.is-measuring #cut-need, .lab__cut.is-measuring #cut-steps { display: none; }
.lab__cut.is-measuring .lab__cut-head { grid-column: 2; grid-row: 1; }
.lab__cut.is-measuring #cut-step { grid-column: 1; grid-row: 1; font-weight: 600; }
.lab__cut.is-measuring [data-cut-plans], .lab__cut.is-measuring .lab__cut-row { grid-column: 1 / -1; }
/* P118 (release): the download size on the Play button, the way back to the buying guide, and the done card's shop links */
.lab__play-text { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; }
.lab__play-size { font: 600 clamp(0.75rem, 1.3vw, 0.9rem)/1.1 var(--font-sans, system-ui, sans-serif); opacity: 0.8; }
.lab__start-back { display: inline-block; margin-top: 0.4rem; text-decoration: underline; text-underline-offset: 3px; }
.game-back { grid-area: rest; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-top: 1rem; font-weight: 700; }
.game-back a { color: var(--c-accent-2, #f3c98a); text-underline-offset: 3px; }
.lab__done-links { display: grid; gap: 0.35rem; margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px solid rgba(243, 236, 220, .18); font-size: 0.9rem; }
.lab__done-links p { margin: 0; }
.lab__done-links a { color: var(--c-accent-2, #f3c98a); font-weight: 700; text-underline-offset: 3px; }
.lab__done-links small { opacity: 0.75; }
/* P120: the first-play lesson: W A S D and the arrow keys side by side, a strip while you fetch the kit, and a glow and arrow on the button a step asks for */
.lab__coach-pair { display: flex; align-items: center; justify-content: center; gap: 10px; }
.lab__coach-pair > span { font-size: 0.85rem; color: rgba(244, 239, 227, .7); }
.lab__coach-pair .lab__coach-keys { grid-template-columns: repeat(3, 36px); gap: 5px; }
.lab__coach-pair .lab__coach-keys kbd { height: 34px; font-size: 0.95rem; }
.lab__coach.is-mini { top: 6px; width: min(520px, calc(100% - 1.2rem)); padding: 8px 14px 10px; text-align: left; }
.lab__coach.is-mini .lab__coach-art { display: none; }
.lab__coach.is-mini .lab__coach-title { margin: 2px 0; font-size: 0.98rem; }
.lab__coach.is-mini .lab__coach-body { font-size: 0.84rem; }
.lab__coach.is-mini .lab__coach-row { justify-content: flex-start; margin-top: 4px; }
/* P140: the short lesson sits at the top, art on the left and one line on the right, clear of the panel being painted */
.lab__coach.is-short { top: 8px; width: min(460px, calc(100% - 1.2rem)); padding: 10px 16px 10px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; text-align: left; }
.lab__coach.is-short > * { grid-column: 2; }
.lab__coach.is-short .lab__coach-art { grid-column: 1; grid-row: 1 / span 4; min-height: 0; }
.lab__coach.is-short .lab__coach-art svg { width: 40px; height: auto; }
.lab__coach.is-short .lab__coach-keys { grid-template-columns: repeat(3, 28px); gap: 4px; }
.lab__coach.is-short .lab__coach-turn { grid-template-columns: repeat(2, 28px); }
.lab__coach.is-short .lab__coach-keys kbd { height: 26px; font-size: .8rem; border-radius: 7px; }
.lab__coach.is-short .lab__coach-finger, .lab__coach.is-short .lab__coach-goal { font-size: 36px; }
.lab__coach.is-short .lab__coach-step { margin: 0; }
.lab__coach.is-short .lab__coach-title { margin: 2px 0 0; font-size: 1.02rem; }
.lab__coach.is-short .lab__coach-body:empty, .lab__coach.is-mini .lab__coach-step:empty { display: none; }
.lab__coach.is-short .lab__coach-row { justify-content: flex-start; margin-top: 4px; }
.lab__coach.is-short.is-done .lab__coach-art::after { font-size: 40px; }
.lab__stage.has-screen-layout.has-coach .is-coach-target { visibility: visible; }
.is-coach-target { box-shadow: inset 0 0 0 3px #f3d27a, 0 0 14px 4px rgba(243, 210, 122, .7) !important; animation: lab-coach-glow 1.1s ease-in-out infinite alternate; }
@keyframes lab-coach-glow { from { filter: brightness(1); } to { filter: brightness(1.35); } }
.lab__coach-arrow { position: absolute; z-index: 13; width: 0; height: 0; pointer-events: none; }
.lab__coach-arrow[hidden] { display: none; }
.lab__coach-arrow::before { content: ''; position: absolute; left: -14px; bottom: 4px; border: 14px solid transparent; border-top: 22px solid #f3d27a; border-bottom: 0; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); animation: lab-coach-bob .7s ease-in-out infinite alternate; }
@keyframes lab-coach-bob { from { transform: translateY(-10px); } to { transform: translateY(0); } }
.lab__stage.has-screen-layout.has-coach > #coach-arrow.lab__coach-arrow { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .is-coach-target, .lab__coach-arrow::before { animation: none; } }
/* P120: the controls card: the mouse, the keys and the phone pad on one small card (Menu, Controls; or the mouse button by the tools) */
.lab__controls { position: absolute; z-index: 13; left: 50%; top: 7%; transform: translateX(-50%); box-sizing: border-box; width: min(460px, calc(100% - 1.2rem)); max-height: calc(100% - 1rem); overflow: auto; padding: 14px 18px 14px; border-radius: 16px; background: rgba(15, 29, 22, .94); color: #f4efe3; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); border: 1px solid rgba(243, 210, 122, .35); text-align: center; transition: opacity .8s; }
.lab__controls[hidden] { display: none; }
.lab__controls.is-gone { opacity: 0; }
.lab__controls.is-brief { pointer-events: none; }
.lab__controls.is-brief button { pointer-events: auto; }
.lab__controls-title { margin: 0 0 8px; font-size: 0.72rem; letter-spacing: .12em; text-transform: uppercase; color: #f3d27a; }
.lab__controls-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; text-align: left; }
.lab__controls-list li { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 12px; font-size: 0.9rem; line-height: 1.35; }
.lab__controls-list b { color: #f3d27a; }
.lab__controls-art { display: flex; justify-content: center; }
.lab__controls-art svg { width: 30px; height: 45px; }
.lab__controls-art .lab__coach-keys { grid-template-columns: repeat(3, 24px); gap: 3px; }
.lab__controls-art .lab__coach-turn { grid-template-columns: repeat(2, 30px); }
.lab__controls-art .lab__coach-keys kbd { height: 24px; border-radius: 6px; font-size: 0.75rem; box-shadow: 0 2px 0 rgba(255, 255, 255, .25); }
.lab__controls-art .lab__coach-finger { font-size: 32px; }
.has-screen-layout #controls { z-index: 13; }
.lab__stage.has-screen-layout.has-coach > #controls.lab__controls { visibility: visible; } /* opened from the Menu during the lesson */
.lab__coach-arrow.is-right { transform: rotate(-90deg); } .lab__coach-arrow.is-left { transform: rotate(90deg); } /* the place is off screen: the arrow points the way to turn */

/* P125: sanding at the bench, the card folds to a strip at the top edge so the board under the pointer stays clear; Show card opens it again */
.lab__cut.is-strip, .lab__screen-work > .lab__cut.is-strip { top: .45rem; width: auto; max-width: calc(100% - 1.2rem); padding: .3rem .5rem; gap: .3rem; display: flex; flex-flow: row wrap; align-items: center; font-size: .72rem; }
.lab__cut.is-strip #cut-title, .lab__cut.is-strip #cut-need, .lab__cut.is-strip #cut-step, .lab__cut.is-strip #cut-steps, .lab__cut.is-strip [data-cut-plans], .lab__cut.is-strip #cut-close { display: none; }
.lab__cut.is-strip .lab__cut-head { order: 2; }
.lab__cut.is-strip .lab__cut-row { gap: .25rem; flex-wrap: wrap; }
.lab__cut.is-strip .lab__seg button, .lab__cut.is-strip .lab__cut-auto { padding: .2rem .55rem; font-size: .72rem; margin-left: 0; }
.lab__cut.is-strip #cut-note { order: 3; flex-basis: 100%; }
.lab__cut-more { border: 1px solid rgba(255, 255, 255, .35) !important; border-radius: 999px; padding: .2rem .6rem !important; font: inherit !important; font-size: .72rem !important; font-weight: 700 !important; }
.lab__cut-more[hidden] { display: none; }
.lab__cut-auto.is-ready { background: #e07b39; color: #1a120c; }

/* ---------- P128 (owner, 23 Oct 2026: "in some desktop screens this look mega disorganized"): the computer dock is one grid of equal tiles.
   Every tile is the same width (the widest name sets it) and the same height, with a fixed place for one badge and one wear bar, so empty
   tiles line up with full ones. v3.js picks the number of columns: one row when it fits, else evenly filled rows. Buy paint sits at the
   end of the last row; a tool's own settings (grit, tape shape, brush size) still get their own line under the tools. ---------- */
[data-tool].is-shop::after { content: none; } /* one badge per tile: Shop, else in van, else wet (the tooltip says the rest) */
[data-tool].is-packed.is-wet::after { content: 'in van'; }
[data-tool].is-packed > .lab__shopb, [data-tool].is-wet > .lab__shopb { opacity: 1; } /* the one badge stays bold while the icon and name fade */
@media (min-width: 721px) {
  .lab.tools-grid .lab__row--dock { flex-wrap: wrap; align-items: flex-start; justify-content: center; column-gap: 0.5rem; margin-inline: auto; max-width: 100%; } /* P130: v3.js sets its width to the tiles, so it sits centred with no empty band */
  .lab.tools-grid .lab__row--dock > * { order: 2; }
  .lab.tools-grid .lab__row--dock > #tools, .lab.tools-grid .lab__row--dock > #dock-tins, .lab.tools-grid .lab__row--dock > #make-room { order: 0; }
  .lab.tools-grid .lab__row--dock:has(> :not(#tools, #dock-tins, #make-room, [hidden], .lab__label))::before { content: ''; order: 1; flex-basis: 100%; height: 0; } /* the tool's settings start a new line */
  .lab.tools-grid .lab__row--dock #tools { display: grid; grid-template-columns: repeat(var(--tool-cols, 15), minmax(max-content, 1fr)); grid-auto-rows: 70px; gap: 3px; flex: none; width: max-content; max-width: none; overflow: visible; }
  .lab.tools-grid .lab__row--dock #tools > button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; box-sizing: border-box; min-width: 50px; height: 70px; margin: 0; padding: 6px 4px 0; border-radius: 12px; }
  .lab.tools-grid .lab__row--dock #tools > button[hidden] { display: none; }
  .lab.tools-grid .lab__row--dock #tools > button svg { margin: 0; width: 20px; height: 20px; } /* P136: the icons drawn for 20 px */
  .lab.tools-grid .lab__row--dock #tools .lab__lbl { display: block; width: min-content; font-size: 0.6rem; line-height: 1.1; white-space: normal; text-align: center; } /* a two word name may take two lines */
  .lab.tools-grid .lab__row--dock #tools .lab__lbl-long { display: inline; }
  .lab.tools-grid .lab__row--dock #tools .lab__lbl-short { display: none; }
  .lab.tools-grid #tools > button .lab__shopb, .lab.tools-grid #tools > button .lab__lock, .lab.tools-grid #tools > button[data-tool]::after { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); margin: 0; padding: 0 5px; font-size: 0.56rem; line-height: 1.3; white-space: nowrap; pointer-events: none; }
  .lab.tools-grid #tools > button .lab__life { left: 8px; right: 8px; bottom: 3px; height: 3px; }
  .lab.tools-grid .lab__row--dock > #dock-tins { align-self: stretch; align-items: flex-end; } /* P130: Buy paint ends the last row of tiles */
  .lab.tools-grid #dock-tins .lab__tin { min-height: 70px; box-sizing: border-box; }
}

/* ---------- P128 (owner, 23 Oct 2026: "in some screensizes this is mega truncated"): the height budget on a computer. A centre card
   (the van card, a weather or overspray choice) sits between the top row and the toolbar, never behind either: it starts under the job
   list and the readout, or at the very top when there is room beside them, and stops above the hint, the action row and the toolbar.
   On short windows the card tightens its spacing first, so every option shows before anything has to scroll. ---------- */
@media (min-width: 721px) {
  .lab__stage.has-screen-layout > .lab__oscard { top: var(--screen-head, 3.4rem); max-height: calc(100% - var(--screen-head, 3.4rem) - var(--screen-foot, 120px)); }
  .lab__stage.has-screen-layout.has-mid-room > .lab__oscard { top: 8px; max-height: calc(100% - 8px - var(--screen-foot, 120px)); }
}
@media (min-width: 721px) and (max-height: 820px) {
  .lab__oscard { padding: 0.5rem 0.7rem; line-height: 1.22; }
  .lab__oscard-head { margin-bottom: 0.2rem; font-size: 0.92rem; }
  .lab__oscard-lead { margin-bottom: 0.4rem; }
  .lab__oscard-list { gap: 0.25rem; }
  .lab__oscard-list button { padding: 0.28rem 0.55rem; gap: 0; }
}
/* the in-game phone keeps a phone's shape on a short or narrow computer screen: never thinner than about 360 px, so the Shop shows its
   products side by side with the words at their normal size (owner: "phone is totally squeezed on some screen sizes") */
/* owner (23 Oct 2026): "make all responsive as per screen size": the phone keeps a phone's shape and always fits the game area and the window; on a short screen it is a little stubbier (9:16) rather than a thin strip or a wide slab */
@media (min-width: 721px) { .lab__phone-dev { height: min(calc(100% - 28px), calc(100dvh - 28px)); width: auto; min-width: 0; max-width: calc(100% - 28px); } }
@media (min-width: 721px) and (max-height: 900px) { .lab__phone-dev { aspect-ratio: 9 / 16; } }

/* ---------- P131 (owner, 23 Oct 2026: "It's seriously cognitive overload ... there's too many surfaces and the user can see too little"):
   less on screen. The computer dock is ONE row of small tiles: when they do not all fit, v3.js steps them down (dock-tight: tighter tiles,
   dock-small: a smaller name, dock-icons: icons only, the name shows on hover and on the tool in hand). A tile's state is a small coloured
   dot in its corner (red dot: buy it in the Shop, sand ring: packed in the van, blue dot: wet), told in full by its tooltip. A tool's own settings
   (grit, tape shape, brush size) sit in a slim strip above the tiles. ---------- */
@media (min-width: 721px) {
  .lab.tools-grid .lab__row--dock { row-gap: 4px; padding: 5px 6px; border-radius: 14px; }
  .lab.tools-grid .lab__row--dock > * { order: 0; }
  .lab.tools-grid .lab__row--dock > #tools, .lab.tools-grid .lab__row--dock > #dock-tins { order: 2; }
  .lab.tools-grid .lab__row--dock > :not(#tools, #dock-tins, #make-room) { font-size: 0.68rem; }
  .lab.tools-grid .lab__row--dock > :not(#tools, #dock-tins, #make-room) .lab__seg button, .lab.tools-grid .lab__row--dock > .lab__seg:not(#tools) button, .lab.tools-grid .lab__row--dock > .lab__full, .lab.tools-grid .lab__row--dock > button:not(.lab__full) { padding: 0.16rem 0.5rem; font-size: 0.66rem; }
  .lab.tools-grid .lab__row--dock > .lab__tapeopts:not([hidden]) { gap: 4px; }
  .lab.tools-grid .lab__row--dock .lab__seg:not(#tools) .lab__shopb { padding: 0 4px; font-size: 0.52rem; }
  .lab.tools-grid .lab__row--dock .lab__brushang { font-size: 0.66rem; gap: 0.35rem; }
  .lab.tools-grid .lab__row--dock .lab__brushang-track { width: 132px; height: 26px; }
  .lab.tools-grid .lab__row--dock .lab__brushang input[type="range"] { height: 16px; bottom: 9px; }
  .lab.tools-grid .lab__row--dock #tools { grid-auto-rows: 50px; gap: 3px; }
  .lab.tools-grid .lab__row--dock #tools > button { height: 50px; min-width: 50px; padding: 7px 6px 0; gap: 3px; border-radius: 10px; }
  .lab.tools-grid .lab__row--dock #tools .lab__lbl { width: auto; font-size: 0.66rem; line-height: 1.1; white-space: nowrap; }
  .lab.tools-grid .lab__row--dock #tools .lab__lbl-long { display: none; }
  .lab.tools-grid .lab__row--dock #tools .lab__lbl-short { display: inline; }
  .lab.tools-grid #tools > button .lab__lock {
    left: auto; right: 4px; top: 4px; bottom: auto; transform: none; width: 7px; height: 7px; padding: 0; box-sizing: border-box; border-radius: 50%; overflow: hidden; color: transparent; font-size: 0; line-height: 0; box-shadow: 0 0 0 1.5px rgba(15, 29, 22, .9); }
  /* P137: the Shop, van and wet marks are little pictures over the tile's top corner (see the P137 block at the end) */
  .lab.tools-grid #tools > button .lab__shopb, .lab.tools-grid #tools > button[data-tool]::after { left: auto; right: -3px; top: -5px; bottom: auto; transform: none; width: 16px; height: 16px; padding: 0; border: 0; box-sizing: border-box; border-radius: 50%; overflow: hidden; color: transparent; font-size: 0; line-height: 0; letter-spacing: 0; background: #ee8068 var(--mk-coin) center / 12px 12px no-repeat; box-shadow: 0 0 0 1.5px rgba(15, 29, 22, .9); z-index: 2; }
  .lab.tools-grid #tools > button.is-packed[data-tool]::after { background-color: #f1c28f; background-image: var(--mk-van); }
  .lab.tools-grid #tools > button.is-wet:not(.is-packed)[data-tool]::after { background-color: #8ec5e8; background-image: var(--mk-drop); }
  .lab.tools-grid:is(.dock-small, .dock-short) #tools > button .lab__shopb, .lab.tools-grid:is(.dock-small, .dock-short) #tools > button[data-tool]::after { top: -6px; right: -4px; } /* a tile as narrow as its name: the mark a little further out */
  .lab.tools-grid:is(.dock-small, .dock-short) #tools > button:is(.is-shop, .is-packed, .is-wet) svg { translate: -2px 1px; } /* and the icon a nudge away from it */
  .lab.tools-grid.dock-scroll #tools > button .lab__shopb, .lab.tools-grid.dock-scroll #tools > button[data-tool]::after { top: 1px; right: 1px; } /* a row that scrolls clips anything over its edge */
  .lab.tools-grid #tools > button .lab__life { left: 9px; right: 9px; bottom: 3px; height: 2px; }
  .lab.tools-grid .lab__row--dock > #dock-tins { align-self: flex-end; padding-left: 6px; gap: 3px; }
  .lab.tools-grid #dock-tins .lab__tin { min-height: 50px; min-width: 44px; padding: 2px 5px; }
  .lab.tools-grid #dock-tins .lab__lbl { font-size: 0.55rem; }
  .lab.tools-grid #dock-tins .lab__tinplus { font-size: 0.9rem; line-height: 1; }
  /* the steps down, when 14 tiles do not fit */
  .lab.tools-grid.dock-tight .lab__row--dock #tools { gap: 2px; }
  .lab.tools-grid.dock-tight .lab__row--dock #tools > button { min-width: 38px; padding-inline: 3px; }
  .lab.tools-grid.dock-small .lab__row--dock #tools .lab__lbl { font-size: 0.625rem; } /* P136: 10 px, the smallest a name goes */
  .lab.tools-grid.dock-small .lab__row--dock #tools { grid-template-columns: repeat(var(--tool-cols, 15), auto); } /* P136: and each tile only as wide as its own name */
  .lab.tools-grid.dock-icons .lab__row--dock #tools { grid-template-columns: repeat(var(--tool-cols, 15), auto); }
  .lab.tools-grid.dock-icons .lab__row--dock #tools > button { min-width: 34px; padding: 0 4px; justify-content: center; }
  .lab.tools-grid.dock-icons #dock-tins .lab__tin--add .lab__lbl { display: none; } /* Buy paint: the + alone; its tooltip names it */
  .lab.tools-grid.dock-icons #dock-tins .lab__tin--add { min-width: 36px; }
  .lab.tools-grid.dock-icons .lab__row--dock #tools > button:not(.is-active) .lab__lbl { position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); z-index: 4; padding: 3px 7px; border-radius: 6px; background: #10201a; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); font-size: 0.66rem; opacity: 0; pointer-events: none; transition: opacity .12s; }
  .lab.tools-grid.dock-icons .lab__row--dock #tools > button:is(:hover, :focus-visible) .lab__lbl { opacity: 1; }
  .lab.tools-grid.dock-icons .lab__row--dock #tools .lab__lbl-long { display: inline; } /* the name on hover is the full one */
  .lab.tools-grid.dock-icons .lab__row--dock #tools .lab__lbl-short { display: none; }
  .lab.tools-grid.dock-icons .lab__row--dock #tools > button.is-active .lab__lbl-long { display: none; }
  .lab.tools-grid.dock-icons .lab__row--dock #tools > button.is-active .lab__lbl-short { display: inline; }
  .lab.tools-grid.dock-scroll .lab__row--dock #tools { overflow-x: auto; scrollbar-width: none; }
  /* P136: the last step before the row scrolls: one short everyday word on a tile (Tape, Buy, Van, Fresh or Mix), a paint's colour on two lines */
  .lab.tools-grid.dock-short .lab__row--dock [data-short] { font-size: 0 !important; }
  .lab.tools-grid.dock-short .lab__row--dock [data-short] > * { display: none !important; }
  .lab.tools-grid.dock-short .lab__row--dock [data-short]::before { content: attr(data-short); font-size: 0.625rem; }
  .lab.tools-grid.dock-short .lab__row--dock #tools > button { min-width: 36px; }
  .lab.tools-grid.dock-short #dock-tins .lab__tin:not(.lab__tin--add) .lab__lbl { max-width: 40px; }
  .lab.tools-grid.dock-short #dock-tins .lab__tincup { padding-inline: 7px; }
  /* P136: Buy paint is named like the tools (10 px or more) under its tin with a plus */
  .lab.tools-grid #dock-tins .lab__tin--add .lab__lbl { font-size: 0.66rem; white-space: nowrap; max-width: none; }
  .lab.tools-grid.dock-small #dock-tins .lab__tin--add .lab__lbl { font-size: 0.625rem; }
}
.lab__tinplus svg { display: block; width: 20px; height: 20px; } /* P136: Buy paint's tin with a plus, drawn like the tool icons */
@media (min-width: 721px) and (pointer: coarse) { .lab.tools-grid.dock-icons .lab__row--dock #tools > button { min-width: 44px; } }

/* P131: the side gate's Make room is a round button with the others at the bottom right; the number is what is in the van */
.lab__screen-mini > .lab__makeroom > b { position: absolute; right: -3px; top: -3px; min-width: 15px; padding: 2px 3px; box-sizing: border-box; border-radius: 8px; background: #f1c28f; color: #1a120c; font: 800 .56rem/1 var(--font-sans, system-ui); text-align: center; }
.lab__screen-mini > .lab__makeroom > b[hidden] { display: none; }

/* P131: the readout (top right) starts as one slim line: painted, coat, the time of day and the cup gauge. A click opens it (and it stays
   as the player left it); a mouse over it peeks. The first full line is the slim line's own, so it never shows twice. */
.lab__hud-sum { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 7px; min-height: 18px; cursor: pointer; pointer-events: auto; white-space: nowrap; font-weight: 700; }
.lab__hud-sum .lab__cup { width: 28px; height: 5px; }
.lab__hud-sum:focus-visible { outline: 2px solid #f3d27a; outline-offset: 2px; border-radius: 4px; }
.lab__hud .lab__pro { padding: 1px 6px; border-radius: 9px; background: #f3d27a; color: #2a2112; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.lab__hud .lab__pro.is-off { background: transparent; color: #f3d27a; box-shadow: inset 0 0 0 1px rgba(243, 210, 122, .6); }
.lab__hud-caret { margin-left: auto; font-style: normal; color: #f3d27a; }
.lab__hud-caret::before { content: '\25BE'; }
.lab__hud.is-collapsed .lab__hud-caret::before { content: '\25B8'; }
.lab__hud.is-collapsed { padding: 0.3rem 0.6rem; }
.lab__hud > span:has(#hud-painted) { display: none; }
@media not ((hover: hover) and (pointer: fine)) { .lab__hud.is-collapsed > span:not(#pump-gauge) { display: none !important; } }
@media (hover: hover) and (pointer: fine) {
  .lab__hud { pointer-events: auto; }
  .lab__hud.is-collapsed:not(:hover, :has(:focus-visible)) > span:not(#pump-gauge) { display: none !important; }
}

/* P131: the job list (top left) starts as its one-line summary on every screen; a click opens it, a mouse over it peeks */
@media (min-width: 721px) {
  .lab__tl .lab__paint-ask.lab__jobcard.is-collapsed { min-width: 0; }
  .lab__jobcard.is-collapsed .lab__card-head b { white-space: nowrap; }
  .lab__jobcard.is-collapsed .lab__card-sum { max-width: 17rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lab__jobcard.is-collapsed:not(:hover, :has(:focus-visible)) .lab__card-next { display: none; }
  .lab__jobcard.is-collapsed:not(:hover, :has(:focus-visible)) .lab__card-foot { display: none; }
}
@media (min-width: 721px) and (hover: hover) and (pointer: fine) {
  .lab__jobcard.is-collapsed:hover .lab__card-lines { display: flex; }
  .lab__jobcard.is-collapsed:hover .lab__card-warns, .lab__jobcard.is-collapsed:hover .lab__card-sub { display: block; }
  .lab__jobcard.is-collapsed:hover .lab__card-sum { max-width: none; white-space: normal; }
}

/* ---------- P131 (owner, 23 Oct 2026, of the van card: "this is ugly as fuck"): every choice card is a short title, one plain question,
   then the options side by side as equal cards (stacked when narrow). An option shows its name, one quiet "+" line and one quiet "-" line,
   and a small tag where it has one (the cost or time). On a computer a long line folds to two and opens in full under the mouse or the
   keyboard. The card sits in the middle of the garden, between the top lines and the toolbar, and never scrolls inside on a computer. ---------- */
.lab__oscard { border-left: 0; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(15, 29, 22, .94); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); padding: 0.75rem 0.85rem 0.7rem; }
.lab__oscard-head { margin: 0 0 0.15rem; font-size: 0.95rem; line-height: 1.25; }
.lab__oscard-lead { margin: 0 0 0.6rem; font-size: 0.76rem; line-height: 1.35; opacity: 0.78; }
.lab__oscard-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0.45rem; }
.lab__oscard-list:has(> li:nth-child(6)) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); } /* six options: three a row, not five and one */
.lab__oscard-list > li { display: flex; min-width: 0; }
.lab__oscard-list > li > button { flex: 1; align-content: start; gap: 0.22rem; padding: 0.55rem 0.65rem 0.6rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(255, 255, 255, .035); }
.lab__oscard-list > li > button:hover, .lab__oscard-list > li > button:focus-visible { background: rgba(224, 123, 57, .1); }
.lab__oscard-list button > strong, .lab__oscard-list .lab__deal-top strong, .lab__oscard-list .lab__tier-head strong { font-size: 0.8rem; line-height: 1.25; }
.lab__oscard-list .lab__deal-top { justify-content: flex-start; flex-wrap: wrap; gap: 3px 6px; }
.lab__oscard-list .lab__deal-top em { padding: 0 6px; font-size: 0.62rem; line-height: 1.5; font-weight: 700; color: #f3ecdc; background: rgba(255, 255, 255, .1); }
.lab__oscard-pro, .lab__oscard-con { position: relative; display: block; padding-left: 0.95em; font-size: 0.7rem; line-height: 1.3; color: rgba(243, 236, 220, .74); }
.lab__oscard-pro::before, .lab__oscard-con::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.lab__oscard-pro::before { content: '+'; color: #9ccf86; }
.lab__oscard-con::before { content: '\2212'; color: #e9a27a; }
.lab__oscard .lab__van-note { margin: 0.5rem 0 0; font-size: 0.68rem; opacity: 0.68; }
.lab__oscard-row { margin-top: 0.55rem; }
.lab__oscard-row button { padding: 0.4rem 0.9rem; font-size: 0.76rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.lab__oscard-row:has(> button:only-child) { justify-content: flex-end; }
.lab__oscard-row > button:only-child { flex: none; }
@media (max-width: 720px) { .lab__oscard-list, .lab__oscard-list:has(> li:nth-child(6)) { grid-template-columns: 1fr; gap: 0.35rem; } } /* a phone: the options stack */
@media (hover: hover) and (pointer: fine) {
  .lab__oscard-list > li > button:not(:hover, :focus-visible) :is(.lab__oscard-pro, .lab__oscard-con, .lab__tier-meta) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
@media (min-width: 721px) {
  .lab__oscard { width: min(46rem, calc(100% - 1.2rem)); }
  .lab__oscard:has(.lab__oscard-list > li:nth-child(4)) { width: min(60rem, calc(100% - 1.2rem)); } /* four or five options still sit in one row */
  .lab:not(.is-tall) .lab__stage.has-screen-layout > .lab__oscard, .lab:not(.is-tall) .lab__stage.has-screen-layout.has-mid-room > .lab__oscard {
    top: calc((var(--screen-head, 3.4rem) + 100% - var(--screen-foot, 120px)) / 2); transform: translate(-50%, -50%); max-height: calc(100% - var(--screen-head, 3.4rem) - var(--screen-foot, 120px) - 8px); }
}
@media (min-width: 721px) and (max-height: 820px) {
  .lab__oscard { padding: 0.6rem 0.75rem; }
  .lab__oscard-lead { margin-bottom: 0.45rem; }
  .lab__oscard-list > li > button { padding: 0.45rem 0.55rem 0.5rem; gap: 0.15rem; }
}

/* ---- P132 (owner, 23 Oct 2026): on a computer too, the game fills the window while you play ---- */
/* Play starts: the button row (Menu, Page) sits at the top of the window and the frame takes the rest of its height. The page text stays
   above and below, a scroll away; the Page button, the start menu or another view gives the page back at its normal size. */
.lab.is-fill { --fill-bar: 48px; }
.lab.is-fill .lab__tabs { box-sizing: border-box; height: calc(var(--fill-bar) - 6px); margin-bottom: 6px; align-items: center; scroll-margin-top: 6px; }
.lab.is-fill .lab__stage { height: calc(100vh - var(--fill-bar) - 12px); height: calc(100dvh - var(--fill-bar) - 12px); min-height: 360px; }
.lab.is-fill #page-btn { display: inline-flex !important; align-items: center; gap: 5px; flex: none; box-sizing: border-box; height: 36px; margin-left: 6px; padding: 0 14px 0 11px; border: 1px solid var(--c-accent-2, #f3c98a);
  border-radius: 999px; background: var(--c-bg, #0f1d16); color: var(--c-accent-2, #f3c98a); font: 700 .85rem/1 var(--font-sans, system-ui); cursor: pointer; }
.lab.is-fill #page-btn:hover, .lab.is-fill #page-btn:focus-visible { border-color: #e07b39; outline: none; }
.lab.is-fill #page-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* the right-hand column (P132, owner's bench shot: the readout and the gloves and goggles cut in half): the phone button, the readout, then
   one row of kit icons, the worn mask and goggles and the missing gloves or goggles alike, all one size in the same order. The one-line
   readout never shrinks; an opened readout scrolls inside itself, so the icons below it always show whole. */
.has-screen-layout .lab__screen-right > .lab__screen-ppe { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px; max-width: 100%; }
.has-screen-layout .lab__screen-ppe:has(> #kitbar[hidden]):has(> #kitwarn[hidden]) { display: none; }
.has-screen-layout .lab__screen-ppe > :is(#kitbar, #kitwarn):not([hidden]) { display: contents; }
.has-screen-layout .lab__screen-ppe .lab__kwi { width: 38px; height: 38px; margin: 3px; padding: 3px; }
.has-screen-layout .lab__screen-ppe #kitwarn button::before { inset: 3px; }
.lab__screen-ppe :is([data-kw="mask"], [data-kitwarn="mask"]) { order: 1; }
.lab__screen-ppe [data-kitwarn="gloves"] { order: 2; }
.lab__screen-ppe :is([data-kw="glasses"], [data-kitwarn="glasses"]) { order: 3; }
.lab.is-tall .has-screen-layout .lab__screen-ppe .lab__kwi { margin: 0; }
.lab.is-tall .has-screen-layout .lab__screen-ppe #kitwarn button::before { inset: 0; }
.has-screen-layout .lab__screen-right > #hud.is-collapsed { flex: none; }
.has-screen-layout .lab__screen-right > #hud:not(.is-collapsed) { min-height: 2.6em; }
.has-screen-layout.has-phone .lab__screen-right { margin-bottom: 6px; } /* P132: the column's room for the phone button's red number (6 px up) is given back below, so its last row is never cut */

/* ---------- P135 (owner, 23 Oct 2026: "We don't have to have an entire row taking space just to have one button ... move some of the text
   areas there"; of the bench strip: "super long"): ONE work bar on a computer. Line 1: the tools and Buy paint. Line 2, only while it has
   something (v3.js counts what really shows: has-line2): the tool's settings and the buttons that apply now (Order a skip, the carry bar)
   on the left, the one message on the right. At the bench the card's choices are chips in line 2, and the strip across the top of the
   garden is not drawn. Height budget (owner: about 100 px on a laptop): 46 px tiles, a 22 px line 2, and an 18 px line for a message too
   long to sit beside the settings, so even three lines stay near 100 px. ---------- */
@media (min-width: 721px) {
  .lab.tools-grid .lab__row--dock { align-items: center; row-gap: 3px; padding-block: 4px; }
  .lab.tools-grid .lab__row--dock > * { order: 2; }
  .lab.tools-grid .lab__row--dock > #tools, .lab.tools-grid .lab__row--dock > #dock-tins, .lab.tools-grid .lab__row--dock > #make-room { order: 0; }
  .lab.tools-grid #dock .lab__row--dock.has-line2::before { content: ''; order: 1; flex-basis: 100%; height: 1px; margin: 0 4px; background: rgba(243, 236, 220, .1); } /* a hairline between the tools and line 2 */
  .lab.tools-grid #dock .lab__row--dock:not(.has-line2)::before { content: none; }
  .lab.tools-grid .lab__row--dock #tools { grid-auto-rows: 46px; }
  .lab.tools-grid .lab__row--dock #tools > button { height: 46px; padding-top: 7px; }
  .lab.tools-grid #dock-tins .lab__tin { min-height: 46px; }
  .lab.dock-fitting #tools .lab__lbl { transition: none !important; } /* the tiles are measured without their hover names flashing */
  /* the message: one line, in the slot's place; a safety message reads apart with a red dot */
  .lab.tools-grid .lab__row--dock > #hint.is-bar { order: 3; position: static !important; inset: auto !important; transform: none !important; box-sizing: border-box; flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; padding: 0 4px; border-radius: 0; background: none; box-shadow: none; color: #f3d27a; font: 600 .7rem/22px var(--font-sans, system-ui); white-space: nowrap; overflow: hidden; text-align: center; pointer-events: none; }
  .lab.tools-grid .lab__row--dock.has-settings > #hint.is-bar { padding-left: 10px; border-left: 1px solid rgba(243, 236, 220, .16); text-align: left; } /* after the settings, past a divider */
  .lab.tools-grid .lab__row--dock.has-settings > #hint.is-bar.is-own { padding-left: 4px; border-left: 0; line-height: 18px; text-align: center; } /* too long to sit beside the settings: a line of its own under them */
  .lab.tools-grid .lab__row--dock > #hint.is-bar.is-long { white-space: normal; line-height: 1.25; padding-block: 2px; } /* last resort: two lines rather than lose words */
  .lab.tools-grid .lab__row--dock > #hint.is-bar.is-safe { color: #ffb4a8; }
  .lab.tools-grid .lab__row--dock > #hint.is-bar.is-safe::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #e2574c; }
  .has-screen-layout.has-work-card .lab__row--dock > #hint.is-bar:not([hidden]) { display: block !important; } /* a work card no longer hides the message: it sits in the bar, clear of the card */
  /* the spray settings in fewer words: the nozzle chips and the distance read without their labels (tooltips say it) */
  .lab.tools-grid .lab__row--dock > #nozzle-label { display: none; }
  .lab.tools-grid #dock .lab__row--dock > label[for="dist"] { font-size: 0; }
  .lab.tools-grid #dock .lab__row--dock > label[for="dist"] > output { font-size: .66rem; text-transform: none; }
  /* the carry bar's two buttons and the bench chips, as small chips */
  .lab.tools-grid .lab__row--dock > #van-bar { flex-wrap: nowrap; gap: 3px; }
  .lab.tools-grid .lab__row--dock > #van-bar button { height: 22px; padding: 0 .6rem; font-size: .66rem; }
  .lab__workchips { display: flex; align-items: center; }
  .lab__workchips[hidden] { display: none; }
  .lab__chipgrp { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; }
  .lab__chipgrp:first-child { padding-left: 0; }
  .lab__chipgrp:last-child { padding-right: 0; }
  .lab__chipgrp + .lab__chipgrp { border-left: 1px solid rgba(243, 236, 220, .16); }
  .lab__workchips button { box-sizing: border-box; height: 22px; min-width: 30px; margin: 0; padding: 0 .55rem; border: 1px solid rgba(243, 236, 220, .22); border-radius: 999px; background: transparent; color: #f3ecdc; font: 600 .66rem/1 var(--font-sans, system-ui); white-space: nowrap; cursor: pointer; }
  .lab__workchips button:hover, .lab__workchips button:focus-visible { border-color: #e07b39; outline: none; }
  .lab__workchips button:focus-visible { box-shadow: 0 0 0 2px #f3d27a; }
  .lab__workchips button.is-active { border-color: #e07b39; background: rgba(224, 123, 57, .24); }
  .lab__workchips button.is-ready { border-color: #e07b39; background: #e07b39; color: #1a120c; }
  .lab__workchips button.is-out { color: rgba(243, 236, 220, .55); }
  .lab__workchips button.is-out::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: #e2574c; vertical-align: 1px; } /* none of that paper left: the Shop's red dot */
  .lab__workchips button:disabled { opacity: .45; cursor: default; }
  /* at the bench the chips are the strip: the card's own strip is kept (its buttons do the work) but not drawn, and the tool's own fence
     settings step aside until the bench is done */
  .lab.has-bench-bar #cut.is-strip { visibility: hidden !important; pointer-events: none !important; }
  .lab.has-bench-bar .lab__row--dock > :not(#tools, #dock-tins, #make-room, #hint, #work-chips) { display: none !important; }
}
@media (min-width: 721px) and (pointer: fine) { /* the brush angle slider a little shorter, so line 2 keeps room for the message (touch keeps its 44 px) */
  .lab.tools-grid .lab__row--dock .lab__brushang-track { width: 104px; height: 22px; }
  .lab.tools-grid .lab__row--dock .lab__brushang input[type="range"] { bottom: 7px; }
}

/* owner, 24 Oct 2026: Make room is a tile in the work bar, after Buy paint (line 1), not a round button at the bottom right; the number is what is in the van */
@media (min-width: 721px) {
  .lab.tools-grid .lab__row--dock > #make-room.is-tile:not([hidden]) { position: relative; align-self: flex-end; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 46px; min-width: 50px; padding: 4px 6px; box-sizing: border-box; border-radius: 10px; border: 1px solid rgba(224, 123, 57, .55); background: rgba(15, 29, 22, .6); color: var(--c-cream, #f3ecdc); font: 700 0.66rem/1 var(--font-sans, system-ui); } /* P136: named like the tools */
  .lab.tools-grid .lab__row--dock > #make-room.is-tile:hover, .lab.tools-grid .lab__row--dock > #make-room.is-tile:focus-visible { background: #e07b39; color: #10241a; }
  .lab.tools-grid .lab__row--dock > #make-room.is-tile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .lab.tools-grid .lab__row--dock > #make-room.is-tile > span { white-space: nowrap; }
  .lab.tools-grid .lab__row--dock > #make-room.is-tile > b { position: absolute; right: -4px; top: -4px; min-width: 15px; padding: 2px 3px; box-sizing: border-box; border-radius: 8px; background: #f1c28f; color: #1a120c; font: 800 .56rem/1 var(--font-sans, system-ui); }
  .lab.tools-grid .lab__row--dock > #make-room.is-tile > b[hidden] { display: none; }
  .lab.tools-grid.dock-icons .lab__row--dock > #make-room.is-tile > span { display: none; }
  .lab.tools-grid.dock-icons .lab__row--dock > #make-room.is-tile { min-width: 36px; }
}

/* ---------- P137 (owner, 25 Oct 2026, of the tile dots: "Nobody knows what other red and yellow dots in this way may invent"; of the options:
   "I really like the mini [dots] too in B as little pictures"): a tool tile's state is a little round picture in its top corner, the same on
   every screen: a coin with a pound sign (you have none: buy one in the Shop), a van (still packed in the van) or a raindrop (wet). No words
   on the tile: its tooltip says what the picture means, and a click says it in line 2. ---------- */
.lab {
  --mk-coin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a120c' stroke-width='2.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.6 7.4c-.5-1.8-1.9-2.9-3.8-2.9-2.3 0-3.9 1.7-3.9 4.1V18.6M5.8 12.4h7.6M5.4 19h12.4'/%3E%3C/svg%3E");
  --mk-van: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 1.5 24 24' fill='none' stroke='%231a120c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 7h12v9H2zM14 10h4l3 3v3h-7'/%3E%3Ccircle cx='6' cy='18' r='1.6' fill='%231a120c'/%3E%3Ccircle cx='17' cy='18' r='1.6' fill='%231a120c'/%3E%3C/svg%3E");
  --mk-drop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231a120c' d='M12 3.5c3.4 4.6 5.4 7.6 5.4 10.4a5.4 5.4 0 0 1-10.8 0c0-2.8 2-5.8 5.4-10.4z'/%3E%3C/svg%3E");
}
/* the phone's tiles (the computer's are in the P128/P131 dock rules): the same pictures, a little smaller, inside the tile's corner */
.lab:not(.tools-grid) #tools > button .lab__shopb, .lab:not(.tools-grid) #tools > button[data-tool]:is(.is-packed, .is-wet):not(.is-shop)::after {
  content: ''; position: absolute; left: auto; right: 1px; top: 1px; bottom: auto; transform: none; display: block; width: 14px; height: 14px; margin: 0; padding: 0; border: 0; box-sizing: border-box; border-radius: 50%; overflow: hidden;
  color: transparent; font-size: 0; line-height: 0; background: #ee8068 var(--mk-coin) center / 10px 10px no-repeat; box-shadow: 0 0 0 1.5px rgba(15, 29, 22, .9); pointer-events: none; z-index: 2; }
.lab:not(.tools-grid) #tools > button[data-tool].is-packed:not(.is-shop)::after { background-color: #f1c28f; background-image: var(--mk-van); }
.lab:not(.tools-grid) #tools > button[data-tool].is-wet:not(.is-shop, .is-packed)::after { background-color: #8ec5e8; background-image: var(--mk-drop); }
#tools > button { position: relative; }
.lab__missed-head { margin: 14px 0 6px; font-size: 15px; font-weight: 800; color: #f3d27a; } /* P163: What you missed, on Amateur */
