:root {
  --ink: #0f2a1c; --paper: #f6f7ee; --dim: rgb(246 247 238 / .72); --acid: #c6ff3d; --clay: #e0683a;
  --glass: rgb(13 48 31 / .78); --edge: rgb(255 255 255 / .1);
  --sans: "Rubik", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Fredoka", var(--sans);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; color: var(--paper); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

#stage { pointer-events: auto; position: fixed; inset: 0; width: 100vw; height: 100dvh; display: block; touch-action: pan-y; }
body.is-interactive #stage { touch-action: none; }
.story { height: 1100vh; }
.planner-anchor { height: 100dvh; }
main { position: relative; pointer-events: none; }

/* ---------- loader: leaves drop in and cover the screen, then part to show the wall */
.loader { position: fixed; inset: 0; z-index: 30; overflow: hidden; pointer-events: none; }
.leafwall { position: absolute; inset: 0; }
.leafwall .lf { position: absolute; height: auto; transform: translate(-50%, -50%) rotate(var(--r)); will-change: transform, opacity; user-select: none; animation: leafdrop 1.05s cubic-bezier(.2, .85, .3, 1.08) var(--dl) both; }
@keyframes leafdrop { from { transform: translate(-50%, -140vh) rotate(calc(var(--r) - 140deg)) scale(.7); } }
.load-t { position: absolute; left: 0; right: 0; bottom: 6vh; margin: 0 auto; width: fit-content; padding: .45rem 1rem; border-radius: 999px; background: rgb(8 30 18 / .7); color: var(--paper); font-size: .85rem; transition: opacity .5s; }
body:not(.is-loading) .load-t { opacity: 0; }

/* ---------- top chrome */
.chrome { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; justify-content: flex-end; align-items: center; padding: 18px clamp(16px, 3vw, 36px); min-height: 66px; pointer-events: none; mix-blend-mode: difference; }
.chrome a { pointer-events: auto; color: #fff; text-decoration: none; }
.brand { position: fixed; z-index: 11; top: 12px; inset-inline-start: clamp(16px, 3vw, 36px); display: block; padding: 9px 14px 8px; border-radius: 14px; background: var(--ink); box-shadow: 0 6px 18px rgb(0 0 0 / .18); }
.brand svg { display: block; height: 30px; width: auto; }
.jump { font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: opacity .3s; }
body.is-interactive .to-build { display: none; }

/* ---------- captions */
.captions { position: fixed; z-index: 5; inset-inline-start: clamp(16px, 4vw, 56px); bottom: clamp(20px, 6vh, 64px); width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.cap { position: absolute; bottom: 0; inset-inline-start: 0; padding: 1.25rem 1.4rem 1.35rem; border-radius: 16px; background: var(--glass); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--edge); opacity: 0; transform: translateY(14px); will-change: opacity, transform; }
.cap h2 { margin: 0 0 .45rem; font: 700 2.3rem/1.05 var(--display); color: var(--acid); }
.cap h2 .w { display: inline-block; transform: translateY(.6em) scale(.6) rotate(-6deg); opacity: 0; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1), opacity .4s; transition-delay: calc(var(--i) * 90ms); }
.cap.in h2 .w { transform: none; opacity: 1; }
.cap { border-color: rgb(198 255 61 / .25); }
.cap p { margin: 0; color: var(--dim); }

/* ---------- 3D labels */
#labels { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font: 500 .8rem/1 var(--mono); color: var(--ink); background: var(--acid); padding: .35rem .5rem; border-radius: 6px;
  transform: translate(-50%, -50%); transition: opacity .25s; box-shadow: 0 6px 18px -8px rgb(0 0 0 / .6); }
.lbl::before { content: attr(data-k); font-family: var(--sans); font-weight: 400; margin-inline-end: .4em; opacity: .7; }
.lbl.side-r { transform: translate(8px, -50%); }
.lbl.side-l { transform: translate(calc(-100% - 8px), -50%); }
.lbl.dark { background: var(--ink); color: var(--paper); }
.lbl.big { font-size: 1.05rem; padding: .45rem .65rem; }

/* ---------- planner chrome */
.status, .hint, .bar { opacity: 0; pointer-events: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
body.is-interactive .status, body.is-interactive .hint, body.is-interactive .bar { opacity: 1; pointer-events: auto; transform: none; }
.status { position: fixed; z-index: 8; top: 74px; left: 0; right: 0; margin-inline: auto; width: fit-content; display: flex; gap: .7rem; align-items: center; padding: .55rem .6rem .55rem 1rem; border-radius: 999px; background: var(--glass);
  border: 1px solid var(--edge); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: .92rem; transform: translateY(-10px); max-width: calc(100vw - 24px); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acid); flex: none; }
.status[data-tone="warn"]::before { background: #ffc23d; }
.status[data-tone="bad"]::before { background: var(--clay); }
.status button { border: 0; border-radius: 999px; padding: .35rem .8rem; background: var(--paper); color: var(--ink); font-weight: 500; white-space: nowrap; }
.len-tag { position: fixed; z-index: 5; left: 0; top: 0; margin: 0; pointer-events: none; white-space: nowrap; font-weight: 600; font-size: .9rem; color: var(--acid); padding: .25rem .6rem; border-radius: 999px; background: rgb(8 30 18 / .82); }
.len-tag[hidden] { display: none; }
.hint { position: fixed; z-index: 8; bottom: 96px; left: 0; right: 0; margin: 0 auto; max-width: min(560px, 90vw); width: fit-content; font-size: .88rem; color: var(--paper); text-align: center; padding: .35rem .9rem; border-radius: 999px; background: rgb(8 30 18 / .78); }
.hint b { color: var(--acid); font-weight: 500; }

.bar { position: fixed; z-index: 9; bottom: clamp(12px, 3vh, 28px); left: 0; right: 0; margin-inline: auto; width: fit-content; transform: translateY(20px); display: flex; align-items: center; gap: .4rem; padding: .45rem; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center; }
.bar > * { flex: none; }
.seg { display: flex; padding: 3px; border-radius: 16px; background: rgb(255 255 255 / .06); }
.seg button { border: 0; background: none; padding: .55rem .95rem; border-radius: 13px; color: var(--dim); font-weight: 500; transition: background .3s, color .3s; }
.seg button[aria-checked="true"] { background: var(--paper); color: var(--ink); }
.len { display: flex; align-items: baseline; gap: .35rem; padding: 0 .9rem; }
.len output { font: 700 2.1rem/1 var(--display); color: var(--acid); min-width: 2.2ch; text-align: center; font-variant-numeric: tabular-nums; }
.len span { color: var(--dim); font-size: .82rem; }
.step { display: flex; align-items: center; gap: .35rem; padding: 0 .3rem; }
.step button { width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--edge); background: rgb(255 255 255 / .05); font-size: 1.1rem; line-height: 1; transition: transform .15s; }
.step button:active { transform: scale(.9); }
.step button:disabled { opacity: .3; cursor: not-allowed; }
.step output { font: 500 1.1rem var(--mono); min-width: 1.5ch; text-align: center; }
.step span { color: var(--dim); font-size: .82rem; }
.floor { display: flex; align-items: center; gap: .4rem; padding: .3rem .5rem .3rem .8rem; border-radius: 14px; background: rgb(255 255 255 / .05); font-size: .8rem; color: var(--dim); }
.floor input { width: 3.6rem; border: 0; background: none; font: 500 1rem var(--mono); color: var(--paper); text-align: center; -moz-appearance: textfield; }
.floor input::-webkit-inner-spin-button { -webkit-appearance: none; }
.floor em { font-style: normal; }
.floor:focus-within { outline: 1px solid var(--acid); }
.tog { border: 1px solid var(--edge); background: none; border-radius: 14px; padding: .55rem .85rem; color: var(--dim); transition: all .25s; }
.tog[aria-pressed="true"] { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.tog[hidden] { display: none; }
.go { border: 0; border-radius: 14px; padding: .6rem 1.1rem; background: var(--paper); color: var(--ink); font-weight: 600; transition: transform .2s var(--ease); }
.go:hover { transform: translateY(-1px); }
.go:active { transform: scale(.97); }
@media (max-width: 820px) {
  .bar { border-radius: 18px; gap: .3rem; }
  .len output { font-size: 2rem; }
  .floor span { display: none; }
  .hint { display: none; }
  .status { top: 64px; font-size: .82rem; }
}

/* ---------- drawer */
.drawer { position: fixed; z-index: 20; top: 0; bottom: 0; inset-inline-end: 0; width: min(460px, 100vw); overflow-y: auto; padding: 1.6rem clamp(1.2rem, 3vw, 2rem) 3rem; background: #0f2a1c; border-inline-start: 1px solid var(--edge);
  box-shadow: -40px 0 80px -30px rgb(0 0 0 / .8); transform: translateX(-100%); transition: transform .6s var(--ease); }
.drawer.open { transform: none; }
.drawer h2 { font: 700 2.6rem/1 var(--display); color: var(--acid); margin: .4rem 0 1.4rem; }
.drawer h3 { font: 600 1.5rem/1 var(--display); margin: 2.2rem 0 .9rem; }
.close { position: absolute; top: 1rem; inset-inline-end: 1rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--edge); background: none; font-size: 1.4rem; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 1.2rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; gap: .8rem; }
.steps li::before { content: counter(s); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .07); font: 500 .85rem var(--mono); }
.steps strong { display: block; font-weight: 600; margin-bottom: .15rem; }
.steps p { margin: 0; color: var(--dim); font-size: .94rem; }
.val { font: 500 .92em var(--mono); color: var(--ink); background: var(--acid); padding: 0 .35em; border-radius: 4px; white-space: nowrap; }
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.parts li { padding: .8rem .9rem; border-radius: 12px; background: rgb(255 255 255 / .05); }
.parts b { display: block; font: 700 2rem/1 var(--display); color: var(--acid); }
.parts span { font-size: .85rem; color: var(--dim); }
.fine { margin-top: 2rem; color: var(--dim); font-size: .82rem; }

@media (prefers-reduced-motion: reduce) {
  .cap, .bar, .status, .hint, .drawer, .loader { transition: none !important; }
}

.fin b { font-weight: 500; color: var(--paper); }
.tog.fin { color: var(--dim); }

/* ---------- collage */
.collage { position: fixed; inset: 0; z-index: 6; pointer-events: none; visibility: hidden; background: radial-gradient(120% 100% at 30% 40%, rgb(31 107 63 / var(--scrim, 0)), rgb(9 36 22 / var(--scrim, 0))); }
.collage-title { position: absolute; top: 11vh; inset-inline-start: clamp(20px, 5vw, 72px); margin: 0; font: 700 clamp(3rem, 6.4vw, 5.8rem)/1 var(--display); color: var(--acid); }
.print { position: absolute; margin: 0; padding: 10px 10px 0; background: #f4f3ef; border-radius: 6px; box-shadow: 0 30px 70px -20px rgb(0 0 0 / .7), 0 2px 6px rgb(0 0 0 / .25); will-change: transform, opacity; }
.print img { display: block; height: 100%; width: auto; border-radius: 3px; }
.print figcaption { font-size: .82rem; color: #3b3f3c; padding: .5rem .2rem .6rem; white-space: nowrap; }
.collage { --lh: 74vh; --hh: 54vh; --zh: 50vh; }
.p-living { height: var(--lh); inset-inline-end: 9vw; top: 10vh; }
.p-living img { height: calc(100% - 2.4rem); }
.p-living { z-index: 2; }
.p-hall { height: var(--hh); inset-inline-end: calc(9vw + (var(--lh) - 2.4rem) * .563 + 20px + 2.5vw); top: 30vh; z-index: 1; }
.p-hall img { height: calc(100% - 2.4rem); }
.p-horiz { height: var(--zh); inset-inline-start: 7vw; bottom: 7vh; }
.p-horiz img { height: calc(100% - 2.4rem); }
/* squarer screens: smaller prints so the three still sit side by side */
@media (min-width: 821px) and (max-aspect-ratio: 13/10) { .collage { --lh: 58vh; --hh: 42vh; --zh: 38vh; } }
@media (max-width: 820px) {
  .collage-title { top: 9vh; }
  .p-living { height: 40vh; inset-inline-end: 5vw; top: 19vh; }
  .p-hall { height: 30vh; inset-inline-end: auto; inset-inline-start: 5vw; top: 33vh; }
  .p-horiz { height: 26vh; inset-inline-end: 30vw; inset-inline-start: auto; bottom: 9vh; }
  .print figcaption { font-size: .7rem; }
}

/* ---------- kit, toast, modals */
.drawer h2.mt { margin-top: 2.4rem; }
.kit { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.kit li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .8rem; border-radius: 10px; background: rgb(255 255 255 / .05); font-size: .92rem; }
.kit li b { font-family: var(--mono); font-weight: 500; color: var(--acid); }
.kit li.note-row { background: none; padding: .2rem 0; color: var(--dim); font-size: .82rem; }
.drawer-cta { display: flex; gap: .5rem; flex-wrap: wrap; }
.toast { position: fixed; z-index: 40; bottom: 110px; left: 0; right: 0; margin: 0 auto; width: fit-content; padding: .6rem 1rem; border-radius: 999px; background: var(--acid); color: var(--ink); font-weight: 500;
  opacity: 0; transform: translateY(10px); transition: all .4s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
.modal { width: min(820px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--edge); border-radius: 20px; padding: 1.4rem; background: #0f2a1c; color: var(--paper); overflow: auto; }
.modal::backdrop { background: rgb(6 20 12 / .7); backdrop-filter: blur(6px); }
.modal h2 { font: 700 2.2rem/1 var(--display); color: var(--acid); margin: .2rem 0 1.2rem; }
.home-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.pick { text-align: start; padding: 1.2rem; border-radius: 16px; border: 1px solid var(--edge); background: rgb(255 255 255 / .05); display: grid; gap: .4rem; transition: background .25s, transform .25s var(--ease); }
.pick:hover { background: rgb(198 255 61 / .12); transform: translateY(-2px); }
.pick b { font: 600 1.35rem/1.1 var(--display); color: var(--paper); }
.pick span { color: var(--dim); font-size: .92rem; }
model-viewer { width: 100%; height: min(60dvh, 520px); border-radius: 14px; background: radial-gradient(circle at 50% 40%, #dff0d8, #9fcfa4); --poster-color: transparent; }
.ar-go { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0 auto; width: fit-content; }
.note { color: var(--dim); font-size: .88rem; margin: .8rem 0 0; }
.upload { display: grid; place-items: center; gap: .3rem; padding: 2.4rem 1rem; border: 2px dashed rgb(198 255 61 / .45); border-radius: 16px; cursor: pointer; text-align: center; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload b { font: 600 1.3rem var(--display); }
.upload span { color: var(--dim); font-size: .88rem; }
.photo-stage { position: relative; width: 100%; user-select: none; touch-action: none; }
.photo-stage #wall-img { display: block; width: 100%; height: auto; border-radius: 12px; }
.ruler { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ruler line { stroke: var(--acid); stroke-width: 3; stroke-dasharray: 8 6; }
.dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--acid); border: 3px solid var(--ink); cursor: grab; z-index: 3; box-shadow: 0 2px 10px rgb(0 0 0 / .5); }
.overlay { position: absolute; cursor: grab; z-index: 2; filter: drop-shadow(8px 10px 10px rgb(0 0 0 / .35)); }
.photo-ctl { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }
.photo-ctl .note { flex-basis: 100%; margin: 0; }
.modal .close { position: absolute; top: .9rem; inset-inline-end: .9rem; }
@media (max-width: 640px) { .home-pick { grid-template-columns: 1fr; } .modal { padding: 1rem; } }

[hidden] { display: none !important; }
.modal h2 { padding-inline-end: 3rem; }
.photo-ctl .floor span { display: inline; }
@media (max-width: 640px) { .modal h2 { font-size: 1.7rem; } }

/* intro: title + text on the wall, and one small widget for sizes and directions; the stick stays clear in the middle */
.cap.intro { position: fixed; inset: 0; width: auto; padding: 0; background: none; border: 0; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
.intro-text { position: absolute; top: 17vh; inset-inline-start: clamp(20px, 6vw, 96px); width: min(430px, 36vw); text-shadow: 0 2px 18px rgb(0 0 0 / .45); }
.intro-text h2 { font-size: clamp(2.4rem, 4.2vw, 3.6rem); margin-bottom: .7rem; }
.intro-text p { color: rgb(246 247 238 / .86); font-size: 1.05rem; line-height: 1.65; }
.cap.intro .scroll-cue { position: absolute; left: 0; right: 0; bottom: clamp(10px, 2.5vh, 26px); margin: 0 auto; width: fit-content; display: grid; justify-items: center; gap: .35rem; font-size: .9rem; color: var(--acid); text-shadow: 0 1px 10px rgb(0 0 0 / .6); animation: cue 1.8s ease-in-out infinite; }
.scroll-cue i { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
@keyframes cue { 50% { transform: translateY(4px); opacity: .6; } }
@media (max-width: 820px) {
  .intro-text { top: 64px; inset-inline: 16px; width: auto; }
  .intro-text h2 { font-size: 1.85rem; margin-bottom: .35rem; }
  .intro-text p { font-size: .86rem; line-height: 1.5; }
  .cap.intro .scroll-cue { font-size: .82rem; }
}

/* colour swatches in the bar (the stock list comes from colors.json) */
.swatches { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .6rem; }
.swatches > div { display: flex; gap: .3rem; }
.swatches button { width: 24px; height: 24px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid rgb(255 255 255 / .25); transition: transform .2s var(--ease), box-shadow .2s; }
.swatches button:hover { transform: scale(1.12); }
.swatches button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--acid); border-color: transparent; }

/* kit rows: a small render of each part */
.kit li { align-items: center; }
.kit li .thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; background: radial-gradient(circle at 50% 40%, #e9efe3, #b9cbb5); object-fit: contain; }
.kit li span.t { flex: 1; }

/* install walkthrough */
.play { margin: 0 0 1rem; }
.install-cap { position: fixed; z-index: 12; top: 74px; left: 0; right: 0; margin-inline: auto; width: min(580px, calc(100vw - 24px)); display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem 1.05rem 1.25rem;
  border-radius: 18px; background: var(--acid); color: var(--ink); box-shadow: 0 14px 34px -12px rgb(0 0 0 / .65); overflow: hidden; }
.ic-txt { flex: 1; display: grid; gap: .2rem; }
.install-cap span { font-size: .8rem; font-weight: 600; opacity: .7; }
.install-cap b { font-weight: 700; font-size: clamp(1.05rem, 2.4vw, 1.35rem); line-height: 1.3; }
.install-cap.pop .ic-txt { animation: cap-in .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes cap-in { from { opacity: 0; transform: translateY(10px); } }
.ic-prog { position: absolute; inset-inline-start: 0; bottom: 0; height: 5px; width: calc(var(--p, 0) * 100%); background: var(--ink); opacity: .8; }
.install-cap button { flex: none; border: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 1.1rem; }
@media (prefers-reduced-motion: reduce) { .install-cap.pop .ic-txt { animation: none; } }
body.is-installing .status, body.is-installing .hint, body.is-installing .bar { opacity: 0; pointer-events: none; }
.chip { display: inline-block; width: .9em; height: .9em; border-radius: 50%; vertical-align: -.1em; margin-inline: .35em .25em; border: 1px solid var(--edge); }
.viz.dirs span, .viz.rod span { isolation: isolate; }

/* notes: a short hand-lettered line with a drawn arrow to the part */
#notes { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.note-wrap { position: absolute; inset: 0; opacity: 0; }
.note-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.note-wrap path { fill: none; stroke: var(--acid); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .45)); }
.note-t { position: absolute; left: 0; top: 0; margin: 0; white-space: pre; text-align: center; font: 600 clamp(1.15rem, 2vw, 1.75rem)/1.15 var(--display); color: var(--acid); padding: .35em .6em .3em; border-radius: 14px; background: rgb(8 30 18 / .8); }
.cap.intro .scroll-cue { padding: .35rem .9rem .3rem; border-radius: 999px; background: rgb(8 30 18 / .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (max-width: 820px) { .note-t { font-size: 1rem; } .note-wrap path { stroke-width: 2.4; } }


/* pots in the bar: one chip per pot, drawn to its diameter; tap one to pick its size */
.pots { display: flex; align-items: center; gap: .4rem; padding: .25rem .5rem; border-radius: 16px; background: rgb(255 255 255 / .05); }
.pots-l { font-size: .82rem; color: var(--dim); margin-inline-end: .15rem; }
#pot-chips { display: flex; align-items: flex-end; gap: .3rem; }
.chip-pot { display: grid; justify-items: center; gap: 2px; padding: .3rem .35rem .2rem; border: 1px solid transparent; border-radius: 12px; background: none; transition: background .2s, border-color .2s; }
.chip-pot:hover, .chip-pot[aria-expanded="true"] { background: rgb(198 255 61 / .12); border-color: var(--acid); }
.chip-pot i, .size-opts i { display: block; width: calc(var(--d) * 1.9px); height: calc(var(--d) * 1.7px); border-radius: 2px 2px 30% 30% / 2px 2px 24% 24%; background: repeating-linear-gradient(90deg, #d9b585 0 2px, #c9a473 2px 3px); }
.chip-pot span { font: 500 .72rem var(--mono); color: var(--paper); }
.chip-pot small { font: 400 .62rem var(--mono); color: rgb(255 255 255 / .6); }
.size-opts small { font-size: .72rem; color: rgb(255 255 255 / .65); white-space: nowrap; }
.add-pot { width: 34px; height: 34px; border-radius: 12px; border: 1px dashed rgb(255 255 255 / .35); background: none; font-size: 1.2rem; line-height: 1; color: var(--paper); }
.add-pot:disabled { opacity: .3; cursor: not-allowed; }
.size-pop { position: fixed; z-index: 14; padding: .8rem; border-radius: 18px; background: #12321f; border: 1px solid var(--edge); box-shadow: 0 20px 50px -15px rgb(0 0 0 / .7); }
.size-h { margin: 0 0 .5rem; font: 600 1rem var(--display); color: var(--paper); }
.size-opts { display: grid; grid-template-columns: repeat(4, auto); gap: .4rem; align-items: end; }
.size-opts button { display: grid; justify-items: center; gap: .25rem; padding: .55rem .6rem; border-radius: 12px; border: 1px solid var(--edge); background: rgb(255 255 255 / .04); color: var(--paper); }
.size-opts button[aria-checked="true"] { border-color: var(--acid); background: rgb(198 255 61 / .14); }
.size-opts i { width: calc(var(--d) * 2.6px); height: calc(var(--d) * 2.3px); }
.size-opts b { font-size: .8rem; font-weight: 500; white-space: nowrap; }
.size-opts span { font: 500 .72rem var(--mono); color: var(--dim); }
.size-rm { margin-top: .6rem; border: 0; background: none; color: var(--dim); font-size: .8rem; text-decoration: underline; }
.chrome .links { display: flex; gap: 1.2rem; pointer-events: auto; }

/* installation: a screen of its own */
.install-screen { position: fixed; inset: 0; z-index: 25; overflow-y: auto; background: #0f2a1c; padding: 4.5rem clamp(1rem, 5vw, 4rem) 3rem; }
.install-in { max-width: 640px; margin: 0 auto; }
.install-screen h2 { font: 700 clamp(2.4rem, 5vw, 3.4rem)/1 var(--display); color: var(--acid); margin: 0 0 .6rem; }
.install-sub { color: var(--dim); margin: 0 0 1.4rem; }
.install-screen .close { position: fixed; top: 1rem; inset-inline-end: 1rem; }
@media (max-width: 820px) { .size-opts { grid-template-columns: repeat(2, auto); } .pots-l { display: none; } }

/* opening call to action */
.intro-text .cta { display: inline-block; margin-top: 1.2rem; padding: .8rem 1.5rem; border-radius: 14px; font-size: 1.05rem; text-decoration: none; pointer-events: auto; background: var(--acid); color: var(--ink); box-shadow: 0 10px 30px -10px rgb(0 0 0 / .6); text-shadow: none; }
.intro-text .cta:hover { transform: translateY(-2px); }
@media (max-width: 820px) { .intro-text .cta { margin-top: .7rem; padding: .6rem 1.1rem; font-size: .95rem; } }

/* ---------- toolbar v3: labelled groups on one calm surface */
.bar { gap: 0; padding: .55rem .7rem; border-radius: 22px; align-items: stretch; flex-wrap: nowrap; }
.bar .grp { display: grid; align-content: start; gap: .4rem; padding: 0 .9rem; }
.bar .grp + .grp { border-inline-start: 1px solid var(--edge); }
.bar .gl { font-size: .72rem; color: var(--dim); white-space: nowrap; }
.bar .gl em { font-style: normal; color: var(--acid); margin-inline-start: .35rem; opacity: .85; }
.bar .seg { align-self: center; }
.bar .pots { background: none; padding: 0; gap: .3rem; }
.bar .cols { display: grid; gap: .3rem; }
.bar .swatches { padding: 0; border: 0; gap: .45rem; justify-content: space-between; }
.bar .swatches > span { font-size: .78rem; color: var(--paper); min-width: 3.4em; }
.bar .swatches button { width: 20px; height: 20px; }
.bar .g-act { align-content: center; gap: .35rem; }
.bar .order { background: var(--acid); color: var(--ink); padding: .6rem 1.4rem; font-size: 1rem; }
.bar .ghost { border: 0; background: none; color: var(--paper); font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; opacity: .85; }
.bar .ghost:hover { opacity: 1; }
@media (max-width: 820px) {
  .bar { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "pots pots" "dir col" "act act"; row-gap: .55rem; padding: .6rem .5rem; width: calc(100vw - 16px); }
  .bar .grp { padding: 0 .5rem; }
  .bar .grp + .grp { border-inline-start: 0; }
  .bar .g-pots { grid-area: pots; border-bottom: 1px solid var(--edge); padding-bottom: .5rem; }
  .bar .g-dir { grid-area: dir; }
  .bar .g-col { grid-area: col; border-inline-start: 1px solid var(--edge) !important; }
  .bar .g-act { grid-area: act; grid-auto-flow: column; justify-content: space-between; align-items: center; border-top: 1px solid var(--edge); padding-top: .5rem; }
  .bar .gl em { display: inline; }
  .bar .seg button { padding: .45rem .75rem; }
}
.hint { bottom: 156px; }

/* accessibility & privacy statement */
.legal { max-width: 680px; line-height: 1.6; }
.legal h3 { font: 600 1.25rem/1.2 var(--display); color: var(--paper); margin: 1.4rem 0 .5rem; }
.legal p, .legal li { color: var(--dim); margin: .4rem 0; }
.legal ul { padding-inline-start: 1.2rem; margin: .4rem 0; }
.legal a { color: var(--acid); }
@media (max-width: 560px) { .chrome .links .to-build { display: none; } .chrome .links { gap: .9rem; } }
@media (max-width: 380px) { .brand { padding: 7px 10px 6px; } .brand svg { height: 24px; } .chrome .links { font-size: .85rem; gap: .7rem; } }
.drawer .fine a { color: var(--acid); }
/* portrait tablets: stack the prints like on phones */
@media (min-width: 821px) and (max-aspect-ratio: 9/10) { .p-living { height: 40vh; inset-inline-end: 5vw; top: 19vh; } .p-hall { height: 30vh; inset-inline-end: auto; inset-inline-start: 5vw; top: 33vh; } .p-horiz { height: 26vh; inset-inline-end: 30vw; inset-inline-start: auto; bottom: 9vh; } }
/* text for agents and screen readers (h1, footer); the footer shows itself while a link in it has keyboard focus */
.vh:not(:focus-within) { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
footer.vh:focus-within { position: fixed; inset: auto 0 0 0; z-index: 200; margin: 0; padding: 12px 16px; background: var(--ink); color: var(--paper); }
footer.vh a { color: var(--acid); }
@media (max-width: 379px) { .note-wrap.side .note-t { font-size: .8rem; padding: .3rem .55rem; } }
