/* Copyright (c) 2026 The Workspace Hero LLC. All rights reserved.
   The DeskShelf designs, the 3D display models and measurements in this planner, and the planner's code belong to
   The Workspace Hero LLC. They may not be copied, republished, or used to recreate the printable parts or this planner.
   The 3D models here are simplified display copies and are not printable.
   AI assisted generation of models or code from this planner is strictly prohibited and protected by copyright.
   The real print files are sold at https://shop.theworkspacehero.com/products/deskshelf-stl-pack. Full terms: LICENSE.txt */

:root {
  --navy: #14213d; --teal: #107a8e; --teal-d: #0c6272; --teal-l: #e3f1f4; --ink: #1b2437; --mute: #5d6678; --line: #e2dfd8;
  --bg: #f4f2ed; --card: #fff; --err: #c0271a; --err-l: #fdecea; --warn: #9a6400; --warn-l: #fff4d6; --r: 12px;
  --shadow: 0 8px 28px rgba(20, 33, 61, .12);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { font: 400 15px/1.45 'Nunito Sans', system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h2 { font-size: 22px; font-weight: 800; margin: 0 0 4px; color: var(--navy); letter-spacing: -.01em; }
h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 0 0 10px; }
h4 { font-size: 13px; font-weight: 800; color: var(--navy); margin: 18px 0 6px; }
.lists h4 { font-size: 16px; margin: 26px 0 8px; padding: 0 0 6px 10px; border-left: 4px solid var(--teal); border-bottom: 1px solid var(--line); line-height: 1.2; }   /* list group headings: a size up, a teal bar and a rule, so each group reads as its own block (Dasun 2026-11-18) */
.lists .lead + h4 { margin-top: 14px; }
.lead { color: var(--mute); margin: 0 0 16px; }
.ic { width: 18px; height: 18px; flex: none; }

.app { display: grid; grid-template: 60px 1fr / 372px 1fr; grid-template-areas: 'top top' 'panel stage'; height: 100dvh; transition: grid-template-columns .25s ease; }
.app[data-step='lists'] { grid-template-columns: min(560px, 46vw) 1fr; }

/* top bar */
.top { grid-area: top; display: flex; align-items: center; gap: 18px; padding: 0 16px; background: var(--navy); color: #fff; position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { display: block; flex: none; }   /* logo-mark.png: the mark cropped to its edges at twice the shown size, so it stays sharp */
.brand span { display: grid; line-height: 1.15; }
.brand h1 { margin: 0; font-size: 16px; font-weight: 800; line-height: inherit; white-space: nowrap; }
.brand small { font-size: 11px; opacity: .7; white-space: nowrap; }
.brand .beta { flex: none; font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: #12899f; padding: 5px 13px; border-radius: 999px; }   /* still in testing (Dasun 2026-11-18) */
.steps { display: flex; gap: 4px; background: rgba(255, 255, 255, .08); padding: 4px; border-radius: 999px; margin: 0 auto; }
.steps button { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: rgba(255, 255, 255, .78); padding: 7px 16px 7px 8px; border-radius: 999px; font-weight: 700; }
.steps i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255, 255, 255, .16); }
.steps button.on { background: #fff; color: var(--navy); }
.steps button.on i { background: var(--teal); color: #fff; }
.top-r { display: flex; align-items: center; gap: 8px; }
.readout { display: grid; text-align: right; line-height: 1.2; margin-right: 6px; }
.readout b { font-size: 14px; }
.readout span { font-size: 11px; opacity: .7; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn:not(:disabled):hover { background: rgba(255, 255, 255, .2); }
.confirm { position: absolute; right: 16px; top: 66px; background: #fff; color: var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; width: 300px; display: flex; flex-wrap: wrap; gap: 8px; }
.confirm p { margin: 0 0 4px; flex: 1 0 100%; }
.savebox { display: block; width: 320px; }
.savebox[hidden] { display: none; }
.savebox .sb-x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--mute); cursor: pointer; padding: 4px 8px; }
.savebox .sb-h { display: block; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.savebox .sb-code { font-size: 34px; font-weight: 800; letter-spacing: .18em; color: var(--navy, #14213d); margin: 2px 0 6px; font-variant-numeric: tabular-nums; user-select: all; }
.savebox p { margin: 0 0 10px; color: var(--mute); font-size: 13.5px; }
.savebox .sb-link { width: 100%; margin-top: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12.5px; }
.savebox .sb-open { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.savebox .sb-open label { display: block; font-weight: 700; margin-bottom: 6px; }
.savebox .sb-open span { display: flex; gap: 8px; }
.savebox .sb-open input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.savebox .sb-open small { display: block; min-height: 18px; margin-top: 6px; color: var(--mute); font-size: 12.5px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 13px; border-radius: 10px; font-weight: 700; font-size: 14px; text-decoration: none; }
.btn:hover { border-color: #c9c5bb; background: #faf9f6; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); }
.btn.ghost { background: none; border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.line { background: none; border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn.line:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); }
.top .cta { white-space: nowrap; }
.top .cta b { display: none; }
.btn.wide.pack { margin: 0 0 14px; }
.btn.danger { color: var(--err); }
.btn.wide { width: 100%; padding: 12px; margin-top: 18px; font-size: 15px; }

/* panel */
.panel { grid-area: panel; background: var(--card); border-right: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; z-index: 3; }
.panel-body { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.pad { padding: 20px 18px 28px; }
.sheet-handle { display: none; }
section { padding: 16px 0; border-top: 1px solid var(--line); }
/* Desk step: the desk and monitors part sits on a tinted band, edge to edge; a full width navy bar starts the shelf part,
   which stays white like the Build panel */
.zone { margin: -20px -18px 0; padding: 20px 18px 6px; background: #eaf0f5; }
.part-h { margin: 0 -18px; padding: 13px 18px; background: var(--navy); color: #fff; }
.zone section { border-top-color: #d5dee8; }
h3 em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .75; }
.part-h b { display: block; font-size: 17px; font-weight: 800; }
.part-h span { display: block; font-size: 13px; opacity: .8; margin-top: 2px; }
.part-h + section { border-top: 0; }
.row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; margin: 0 0 12px; }
.row-l { font-weight: 600; }
.row small, .item small, .tbl small, .card span { color: var(--mute); font-size: 12.5px; }
.row small { grid-column: 1 / -1; margin-top: -2px; }
.row-c { justify-self: end; max-width: 100%; }
select, .num input { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 7px 9px; min-height: 36px; max-width: 220px; }
select:focus, input:focus, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.num { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding-right: 9px; background: #fff; }
.num input { border: 0; width: 76px; text-align: right; background: none; }
.num i { font-style: normal; color: var(--mute); font-size: 13px; }
.seg { display: inline-flex; background: #efede7; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color: var(--mute); }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.card { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: var(--r); padding: 11px; display: grid; gap: 3px; }
.card b { font-size: 15px; }
.card.on { border-color: var(--teal); background: var(--teal-l); }
.swatches { display: inline-flex; gap: 6px; align-items: center; }
.swatches button, .swatches .any { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--c); padding: 0; }
.swatches button.on { box-shadow: 0 0 0 2px var(--teal); }
.swatches .any { background: conic-gradient(#f66, #fc6, #6c6, #6cf, #96f, #f66); overflow: hidden; cursor: pointer; }
.swatches .any input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.link { color: var(--teal); font-weight: 700; font-size: 14px; }
.note { color: var(--mute); font-size: 13px; margin: 2px 0 10px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 13px; }
.stepper b { min-width: 62px; text-align: center; }

/* inspector */
.inspector { background: var(--teal-l); border: 1.5px solid var(--teal); border-radius: var(--r); padding: 14px; margin-bottom: 16px; }
.ins-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.ins-h b { font-size: 17px; color: var(--navy); }
.ins-h span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-d); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.acts.mons { margin-bottom: 10px; }
.acts.mons .btn small { margin-left: 7px; padding: 1px 6px; border-radius: 9px; background: rgba(20, 33, 61, .08); font-size: 11px; font-weight: 700; }   /* how the screen is held: Stand / Arm / Arm 2 */
.acts.mons .btn.on { border-color: var(--teal); background: var(--teal-l); color: var(--teal-d); }
.inspector.mon { margin: 4px 0 0; }
.btn.nav { width: 100%; justify-content: space-between; margin-top: 8px; padding: 10px 13px; background: var(--bg); border-color: transparent; color: var(--navy); }
.btn.nav:hover { background: var(--teal-l); color: var(--teal-d); }
.btn.nav i { font-style: normal; font-size: 20px; line-height: 1; }
.acts.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 30%); padding: 22px 0 4px; margin-top: 8px; }

/* palette */
.cat { border-top: 1px solid var(--line); }
.cat-h { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 13px 2px; font-weight: 800; font-size: 15px; color: var(--navy); text-align: left; }
.cat-h span { flex: 1; }
.cat-h em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--mute); background: #efede7; border-radius: 999px; padding: 1px 8px; }
.cat-h .ic { transition: transform .2s; color: var(--mute); }
.cat.open .cat-h .ic { transform: rotate(180deg); }
.cat-b { display: none; padding-bottom: 10px; gap: 6px; }
.cat.open .cat-b { display: grid; }
.item { display: flex; gap: 11px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 9px 11px; }
.item:hover { border-color: var(--teal); background: var(--teal-l); }
.item b { display: block; font-size: 14.5px; }
.item small { display: block; line-height: 1.3; }
.plus { width: 30px; height: 30px; border-radius: 9px; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; flex: none; }
.item:hover .plus { background: var(--teal); color: #fff; }

/* lists */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 12px 0 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 12px; font-weight: 700; color: var(--mute); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--navy); border-color: var(--teal); }
.psearch { position: relative; display: flex; align-items: center; margin: 0 0 12px; }
.psearch .ic { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--mute); pointer-events: none; }
.psearch input { flex: 1; min-width: 0; padding: 9px 34px 9px 35px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); -webkit-appearance: none; appearance: none; }
.psearch input::-webkit-search-cancel-button { display: none; }
.psearch input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: transparent; }
.psearch button { position: absolute; right: 4px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--mute); padding: 4px 9px; cursor: pointer; }
.found { display: grid; gap: 8px; margin: 0 0 12px; }
.nohit { margin: 4px 0 14px; }
.fold { margin: 0 0 10px; }
.fold .path { display: block; color: var(--mute); font-size: 12.5px; margin: 0 0 4px; }
details.mf { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 6px; background: #fff; }
details.mf summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 9px 10px; cursor: pointer; list-style: none; }
details.mf summary::-webkit-details-marker { display: none; }
details.mf summary::before { content: '▸'; color: var(--teal-d); font-size: 13px; }
details.mf[open] summary::before { content: '▾'; }
details.mf summary b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
details.mf summary small { order: 3; flex-basis: 100%; padding-left: 19px; color: var(--mute); font-size: 12.5px; }
details.mf summary i { margin-left: auto; font-style: normal; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
details.mf .tbl td:first-child { padding-left: 12px; }
details.mf .tbl td:last-child { padding-right: 10px; }
.note-b { margin-top: 14px; font-size: 13.5px; }
.tbl .nocut { margin-left: 10px; color: var(--mute); font-size: 13px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl small { display: block; }
.tbl .q { width: 44px; font-weight: 800; color: var(--teal-d); white-space: nowrap; }
.tbl .g { text-align: right; white-space: nowrap; color: var(--mute); font-variant-numeric: tabular-nums; }
.big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.big b { font-size: 34px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.big span { color: var(--mute); }
.bar { height: 6px; background: #efede7; border-radius: 3px; margin-top: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 3px; }
.alert { background: var(--err-l); color: var(--err); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.good { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #e8f4f1; color: #14213d; line-height: 1.45; }
.sticks { display: grid; gap: 6px; }
.stick { display: flex; align-items: center; gap: 8px; }
.stick > span { width: 22px; font-size: 12px; font-weight: 800; color: var(--mute); text-align: right; }
.stick > div { flex: 1; display: flex; height: 26px; border-radius: 13px; overflow: hidden; background: #efede7; }
.stick i, .stick em { font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.stick i { background: #d2a56d; color: #3d2a12; border-right: 2px solid #fff; }
.stick i:last-child { border-right: 0; }   /* nothing after it: the dowel runs to the very end of the bar */
.stick em { color: var(--mute); font-weight: 600; }
.pitch { margin-top: 18px; background: var(--navy); color: #fff; border-radius: var(--r); padding: 16px; }
.pitch p { margin: 4px 0 12px; opacity: .85; font-size: 14px; }

/* stage */
.stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; background: radial-gradient(120% 90% at 50% 20%, #fbfaf7 0%, #ebe8e0 70%, #dedad0 100%); overflow: hidden; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.views { position: absolute; top: 14px; right: 14px; display: flex; background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 3px; gap: 2px; }
.views button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--mute); }
.views.clear { right: auto; left: 14px; align-items: center; }
.views.clear button { display: inline-flex; align-items: center; gap: 6px; color: var(--navy); }
.views.clear button .ic { width: 17px; height: 17px; color: var(--teal); }
.views.clear button.off { color: #9aa1ad; }
.views.clear button.off .ic { color: #9aa1ad; }
.views button:hover { background: #efede7; color: var(--navy); }
.hint { position: absolute; left: 14px; top: 14px; margin: 0; font-size: 12px; color: var(--mute); pointer-events: none; }
.warnings { position: absolute; left: 14px; bottom: 14px; max-width: min(430px, calc(100% - 28px)); display: flex; flex-direction: column-reverse; gap: 8px; align-items: flex-start; }
.warn-pill { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; background: var(--warn-l); color: var(--warn); box-shadow: var(--shadow); }
.warn-pill.err { background: var(--err); color: #fff; }
.warnings ul { list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); display: grid; gap: 4px; max-height: 44vh; overflow: auto; }
.warnings li { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; display: grid; gap: 6px; border-left: 4px solid var(--warn); background: var(--warn-l); }
.warnings li.error { border-color: var(--err); background: var(--err-l); }
.warnings li button { justify-self: start; border: 0; background: var(--navy); color: #fff; border-radius: 8px; padding: 5px 10px; font-weight: 700; font-size: 13px; }
.toolbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; background: var(--navy); color: #fff; border-radius: 999px; padding: 5px 6px 5px 16px; box-shadow: var(--shadow); white-space: nowrap; }
.toolbar b { margin-right: 8px; font-size: 14px; }
.toolbar button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; }
.toolbar button:hover { background: var(--teal); }
.toast { position: absolute; left: 50%; top: 16px; transform: translate(-50%, -20px); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transition: .25s; pointer-events: none; max-width: 80%; text-align: center; font-weight: 600; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* phones and small tablets: the panel becomes a bottom sheet under a shorter 3D view */
@media (max-width: 900px) {
  .app, .app[data-step='lists'] { grid-template: 54px 1fr / 100%; grid-template-areas: 'top' 'stage'; }
  .brand span, .brand .beta, .readout, .btn.ghost, .hint, .steps i, .top .btn span { display: none; }
  .top { gap: 8px; padding: 0 10px; }
  .top .btn.primary, .top .btn.line { padding: 8px 10px; }
  .top .cta b { display: inline; }
  @media (max-width: 560px) { .top .cta { display: none; } }   /* no room on a phone: the Lists step has the big button */
  .steps { margin: 0 auto 0 0; }
  .steps button { padding: 6px 11px; font-size: 13.5px; }
  .icon-btn { width: 34px; height: 34px; }
  .app { --sheet: 46dvh; }
  .stage { height: calc(100dvh - 54px - min(var(--sheet), 46dvh)); align-self: start; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; height: var(--sheet); border-radius: 18px 18px 0 0; border: 0; box-shadow: 0 -8px 30px rgba(20, 33, 61, .18); transition: height .25s ease; }
  .panel.drag { transition: none; }
  .app[data-step='lists'] .panel { height: 84dvh; }
  .app[data-step='lists'] .sheet-handle { display: none; }   /* the lists are always tall: no handle that does nothing */
  .sheet-handle { display: grid; place-items: center; border: 0; background: none; height: 30px; flex: none; touch-action: none; cursor: grab; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: #d5d1c8; }
  .views { top: 10px; right: 10px; }
  .views:not(.clear) { display: none; }   /* small screens: no 3D / Front / Top buttons (Dasun 2026-11-20) */
  .views.clear { left: auto; right: 10px; top: 10px; }
  .stage:has(.toolbar:not([hidden])) .warnings { bottom: 62px; }   /* the selection bar no longer covers the heads-up pill */
  .tabs button { padding: 9px 8px; font-size: 14px; }
  .app[data-step='lists'] .views { display: none; }   /* nothing to look at behind the lists on a phone */   /* all four Lists tabs fit */
  .warnings { left: 10px; bottom: 10px; }
  .toolbar { bottom: 10px; }
  .confirm { right: 10px; left: 10px; width: auto; }
}

@media print {
  html, body { overflow: visible; height: auto; background: #fff; }
  .top, .stage, .acts, .tabs, .sheet-handle { display: none !important; }
  .app { display: block; height: auto; }
  .panel { border: 0; position: static; height: auto; }
  .panel-body { overflow: visible; }
}

.btn.quiet { border: 0; background: none; color: var(--mute); margin-top: 6px; font-weight: 600; }

/* turntable add-ons: the turn slider */
.turn { display: flex; align-items: center; gap: 10px; width: 100%; }
.turn input { flex: 1; accent-color: #107a8e; }
.turn b { min-width: 44px; text-align: right; }

/* dowel sets and shopping links in the inspector */
.sets { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.sets span { flex: 1; min-width: 120px; background: #f1f4f6; border-radius: 10px; padding: 8px 10px; font-size: 12px; color: #4a5568; }
.sets b { display: block; font-size: 16px; color: #14213d; }
.buy { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.buy a { color: #107a8e; font-weight: 700; text-decoration: none; padding: 7px 10px; border: 1px solid #cfd8dc; border-radius: 9px; }
.buy a:hover { background: #eef6f8; }
.buy small { color: #6b7280; }

/* "Add another shelf" sits on its own under the part groups */
.lone { margin: 10px 0 14px; }
.lone .item { width: 100%; }

/* ---- quick tour (js/tour.js): a small card that moves beside what it explains, a ring on that part, looping drawings ---- */
.tr-ring { position: fixed; z-index: 60; border: 2px solid var(--teal); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(20, 33, 61, .22); pointer-events: none; transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease; }
.tr-card { position: fixed; z-index: 61; width: 300px; max-width: calc(100vw - 20px); background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 14px 40px rgba(20, 33, 61, .28); padding: 12px 14px 12px; transition: left .35s ease, top .35s ease; }
.tr-x { position: absolute; right: 6px; top: 4px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--mute); cursor: pointer; padding: 4px 8px; z-index: 1; }
.tr-art { background: var(--bg); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.tr-art svg { display: block; width: 100%; height: auto; }
.tr-t { display: block; font-size: 16px; font-weight: 800; color: var(--navy); }
.tr-card p { margin: 3px 0 12px; font-size: 14px; color: var(--mute); }
.tr-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-f span { display: flex; gap: 6px; }
.tr-f .btn { padding: 6px 12px; }
.tr-dots { display: flex; gap: 6px; }
.tr-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #cfd3da; cursor: pointer; }
.tr-dots button.on { background: var(--teal); width: 18px; border-radius: 4px; }
.tr-desk { transform-origin: 30px 73px; animation: tr-desk 4s ease-in-out infinite; }
.tr-deskdim { transform-origin: 30px 46px; animation: tr-desk 4s ease-in-out infinite; }
@keyframes tr-desk { 0%, 15% { transform: scaleX(1); } 45%, 70% { transform: scaleX(1.5); } 100% { transform: scaleX(1); } }
.tr-mon { animation: tr-mon 4s ease-in-out infinite; }
@keyframes tr-mon { 0%, 48% { opacity: 0; transform: translateY(-8px); } 60%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.tr-c-add { animation: tr-c-add 4s ease-in-out infinite; }
@keyframes tr-c-add { 0% { transform: translate(120px, 92px); } 30%, 62% { transform: translate(26px, 56px); } 100% { transform: translate(120px, 92px); } }
.tr-tap { transform-origin: 28px 55px; animation: tr-tap 4s ease-out infinite; }
@keyframes tr-tap { 0%, 32% { opacity: 0; transform: scale(.6); } 36% { opacity: 1; transform: scale(1); } 52%, 100% { opacity: 0; transform: scale(2.2); } }
.tr-drop { animation: tr-drop 4s ease-out infinite; }
@keyframes tr-drop { 0%, 40% { opacity: 0; transform: translateY(-22px); } 52%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.tr-slide { animation: tr-slide 4s ease-in-out infinite; }
@keyframes tr-slide { 0%, 12% { transform: translateX(0); } 50%, 62% { transform: translateX(104px); } 100% { transform: translateX(0); } }
.tr-orbit { transform-origin: 120px 70px; animation: tr-orbit 4s ease-in-out infinite; }
@keyframes tr-orbit { 0%, 100% { transform: skewX(-14deg) scaleX(.86); } 50% { transform: skewX(14deg) scaleX(.86); } }
.tr-c-orbit { animation: tr-c-orbit 4s ease-in-out infinite; }
@keyframes tr-c-orbit { 0%, 100% { transform: translate(78px, 20px); } 50% { transform: translate(150px, 20px); } }
.tr-row, .tr-code { opacity: 0; animation: tr-in 4s ease-out infinite; }
.tr-tap2 { transform-origin: 120px 33px; animation: tr-tap 4s ease-out infinite; }
.tr-c-save { animation: tr-c-save 4s ease-in-out infinite; }
@keyframes tr-c-save { 0% { transform: translate(190px, 92px); } 30%, 62% { transform: translate(118px, 34px); } 100% { transform: translate(190px, 92px); } }
.tr-save + .tr-tap2 + .tr-code { animation-delay: 1.6s; }
.tr-row1 { animation-delay: .5s; } .tr-row2 { animation-delay: 1s; } .tr-code { animation-delay: 1.6s; }
@keyframes tr-in { 0% { opacity: 0; transform: translateX(-8px); } 12%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tr-card *, .tr-ring { animation: none !important; transition: none !important; } .tr-row, .tr-code, .tr-mon, .tr-drop { opacity: 1; } }

/* the "could not start" message (index.html): shown instead of a blank page */
.nogo { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.nogo[hidden] { display: none; }
.nogo > div { max-width: 420px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 22px 24px; text-align: center; }
.nogo b { display: block; font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.nogo p { margin: 0 0 16px; color: var(--mute); }
.nogo button { border: 0; background: var(--teal); color: #fff; font: inherit; font-weight: 700; padding: 9px 16px; border-radius: 10px; cursor: pointer; }

/* About and FAQ (index.html #about): opened from the small link at the bottom of the panel */
.about-link { display: block; margin: 16px auto 0; padding: 4px 8px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.about-link:hover { color: var(--teal); }
.about { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.about[hidden] { display: none; }
.about-scrim { position: absolute; inset: 0; background: rgba(20, 33, 61, .45); }
.about article { position: relative; width: 100%; max-width: 620px; max-height: min(86dvh, 760px); overflow-y: auto; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 14px 40px rgba(20, 33, 61, .28); padding: 24px 28px 28px; }
.about h2 { margin: 0 34px 8px 0; font-size: 20px; color: var(--navy); }
.about h3 { margin: 18px 0 3px; font-size: 15.5px; color: var(--navy); text-transform: none; letter-spacing: 0; }
.about p { margin: 0; }
.about a { color: var(--teal); font-weight: 700; }
.about-x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--mute); cursor: pointer; padding: 4px 10px; }
.about .about-c { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mute); text-align: center; }
@media (max-width: 1260px) { .brand .beta { display: none; } }   /* the top bar has no room for the pill below this width */
/* PHONE TOP BAR (Dasun 2026-11-18): logo, three steps, undo, redo, tour and save must all fit side by side with no overlap */
@media (max-width: 560px) {
  .top { gap: 6px; padding: 0 8px; }
  .brand { flex: none; }
  .brand img { width: 36px; height: auto; }
  .steps { padding: 3px; gap: 2px; }
  .steps button { padding: 6px 8px; font-size: 13px; }
  .top-r { gap: 4px; }
  .icon-btn { width: 32px; height: 32px; }
  .top .btn.line { padding: 7px; }
}
@media (max-width: 345px) { .top [data-do="tour"] { display: none; } }   /* the smallest phones: the tour button gives way */
/* SMALL LAPTOP / TABLET ON ITS SIDE (901 to 1260 px): the title ran under the step buttons and the buttons wrapped onto two lines */
@media (min-width: 901px) and (max-width: 1260px) {
  .top { gap: 10px; padding: 0 12px; }
  .brand { flex: none; }
  .top .btn { white-space: nowrap; }
  .top .btn.ghost { display: none; }   /* Start over is also at the bottom of the Desk panel */
  .top .cta span { display: none; }
  .top .cta b { display: inline; }
  .steps button { padding-right: 12px; }
}
@media (min-width: 901px) { .brand { flex: none; } .top .btn { white-space: nowrap; } }   /* the title is never squeezed and top bar buttons never wrap */

/* the "planning reference" line under the Lists title */
.lists .ref-note { margin: -4px 0 12px; }

/* Dowel cuts: every length can be tapped to find those dowels on the shelf */
.stick i[data-do], .tbl tr.find { cursor: pointer; }
.stick i[data-do]:hover { background: #c08f52; }
.tbl tr.find:hover td { background: rgba(18, 137, 159, 0.08); }

/* a warning can be tapped to show its parts */
#warnings li[data-do] { cursor: pointer; }

/* Build panel: the short note that the pack has more add-ons than the builder shows */
.more-note { margin: 18px 0 0; font-size: 13px; line-height: 1.45; color: var(--mute); text-align: center; }
.more-note a { color: var(--teal); }
.more-note + .about-link { margin-top: 8px; }

/* Print list: one flat list (one row per 3mf project or loose file) */
.plist { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 12px; }
.plist .pl { border-top: 1px solid var(--line); }
.plist .pl:first-child { border-top: 0; }
.plist summary, .plist .pl.one { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.plist summary { cursor: pointer; list-style: none; }
.plist summary::-webkit-details-marker { display: none; }
.plist summary::before, .plist .pl.one::before { content: '▸'; color: var(--teal-d); font-size: 13px; width: 10px; flex: none; }
.plist details[open] > summary::before { content: '▾'; }
.plist .pl.one::before { visibility: hidden; }
.plist .n { flex: 1; min-width: 0; }
.plist .n b { display: block; overflow-wrap: anywhere; }
.plist .n small { display: block; color: var(--mute); font-size: 12.5px; overflow-wrap: anywhere; }
.plist summary .q, .plist .pl.one .q { color: var(--mute); font-size: 13px; white-space: nowrap; }
.plist summary .g, .plist .pl.one .g { min-width: 50px; text-align: right; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plist details .tbl { margin: 0 0 6px; }
.plist details .tbl td:first-child { padding-left: 20px; }

/* Print list: a slim heading band per category (Legs, Top covers...) inside the one box */
.plist { overflow: hidden; }
.plist .ph { margin: 0 -12px; padding: 5px 12px; background: #eef1f4; color: var(--navy, #14213d); font-size: 11.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; border-top: 1px solid var(--line); }
.plist .ph:first-child { border-top: 0; }
.plist .ph + .pl { border-top: 0; }

/* print list: a cosmetic part (screw cap) */
.opt { color: var(--mute); font-weight: 600; font-size: 12.5px; white-space: nowrap; }

/* Filament tab: a small row of spools, one per 1 kg, the last one part full */
.spools { display: flex; align-items: center; gap: 6px; margin: 2px 0 12px; }
.spools svg { width: 34px; height: 34px; }
.spools .fl { fill: #f4f2ec; stroke: #d9d5cb; stroke-width: 1; }
.spools .hub { fill: #fff; stroke: #d9d5cb; stroke-width: 1; }
.spools .hole { fill: #d9d5cb; }
.spools span { color: var(--mute); font-size: 13px; font-weight: 700; }

/* the eye buttons' own pictures: only shown on small screens, where the words are hidden */
.views.clear .alt { display: none; }
@media (max-width: 900px) {
  .views.clear button { position: relative; padding: 7px; }
  .views.clear button span, .views.clear button .ic:not(.alt) { display: none; }
  .views.clear button .alt { display: block; width: 20px; height: 20px; }
  .views.clear button.off::after { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; margin-top: -1px; background: #9aa1ad; border-radius: 1px; transform: rotate(45deg); box-shadow: 0 0 0 1.5px #fff; }
}
/* PHONE ON ITS SIDE (Dasun 2026-11-20): the panel sits beside the 3D view again, like on a computer, and is not a bottom
   sheet. Not under 560 px wide: an upright phone with its keyboard open also counts as "landscape". */
@media (min-width: 560px) and (max-width: 900px) and (orientation: landscape) {
  .app, .app[data-step='lists'] { grid-template: 54px 1fr / min(320px, 44vw) 1fr; grid-template-areas: 'top top' 'panel stage'; }
  .app[data-step='lists'] { grid-template-columns: min(440px, 60vw) 1fr; }
  .stage { height: auto; align-self: stretch; }
  .panel, .app[data-step='lists'] .panel { position: static; height: auto; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); }
  .sheet-handle { display: none; }
  .pad { padding: 14px 14px 22px; }
  .zone { margin: -14px -14px 0; padding: 14px 14px 6px; }
  .part-h { margin: 0 -14px; padding: 11px 14px; }
}

/* TOUCH SCREENS (Dasun 2026-11-20): no double tap zoom anywhere, no page zoom or scroll from the 3D view or the buttons floating
   on it, no pull to refresh, no text selection or long press menu on the view and the top bar */
html, body { overscroll-behavior: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.stage, .top { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.warnings ul { touch-action: pan-y; }

/* PHONE LISTS (Dasun 2026-11-20): the lists fill the screen under the top bar (no strip of the 3D view above them, no rounded sheet) */
@media (max-width: 900px) {
  .app[data-step='lists'] .panel { height: calc(100dvh - 54px); border-radius: 0; box-shadow: none; }
}
@media (min-width: 560px) and (max-width: 900px) and (orientation: landscape) { .app[data-step='lists'] .panel { height: auto; } }

/* THE SELECTION BAR ALWAYS FITS (Dasun 2026-11-20: on a phone a dowel's bar ran off both sides). It is never wider than the 3D
   view; the part's name is cut short with dots first; in a narrow view a bar with three buttons shows icons only, and in a very
   narrow one every bar does. Sized by the 3D view's own width (container query), so it also holds beside the panel. */
.stage { container-type: inline-size; }
.toolbar { max-width: calc(100% - 16px); }
.toolbar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.toolbar button { flex: none; }
@container (max-width: 520px) { .toolbar:has(button:nth-of-type(3)) button span { display: none; } .toolbar:has(button:nth-of-type(3)) button { padding: 8px 12px; } }
@container (max-width: 340px) { .toolbar button span { display: none; } .toolbar button { padding: 8px 12px; } }

/* NOTHING IN THE PANEL RUNS OFF ITS SIDE (scan at 320 px and with a phone on its side, 2026-11-20): a row's control gives way
   before its label is pushed out (long dropdown choices), the panel never scrolls sideways, and the four Lists tabs fit at 320 px */
.panel-body { overflow-x: hidden; }
.row { grid-template-columns: minmax(min-content, 1fr) minmax(0, auto); }   /* the label keeps at least its longest word; the control gives way */
.row-c { min-width: 0; }
.row-c select { max-width: min(220px, 100%); }
@media (max-width: 360px) { .tabs button { padding: 9px 5px; font-size: 13px; } }

/* the device took the 3D view away and did not give it back (scene.js viewLost) */
.view-lost { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(300px, calc(100% - 32px)); padding: 14px 18px; border: 0; border-radius: 12px; background: #14213d; color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; box-shadow: 0 8px 30px rgba(20, 33, 61, .28); }

/* SAVE AGAIN (Dasun 2026-11-23): the one-click Save button beside the design's code */
.top .btn[hidden] { display: none; }
.top .save-q { position: relative; opacity: .7; }
.top .save-q.on { opacity: 1; background: #12899f; border-color: #12899f; color: #fff; }
.top .save-q .dot { display: none; }
.top #save-open.chip span { font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.top .save-q.on .dot { position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #ffb020; border: 2px solid var(--navy); }
@media (max-width: 900px) { .top .save-q.on .dot { display: block; } }
/* the bar with a code open has one more button: where it is tight, something gives way (measured 320 to 1400 px) */
@media (min-width: 901px) and (max-width: 1010px) { .top.has-code { gap: 7px; } .top.has-code .save-q span { display: none; } .top.has-code .save-q.on .dot { display: block; } }   /* Save shows as its icon */
@media (min-width: 1261px) and (max-width: 1345px) { .top.has-code .btn.ghost { display: none; } }   /* Start over is also at the bottom of the Desk panel */
@media (max-width: 400px) { .top.has-code { gap: 5px; } .top.has-code [data-do="tour"] { display: none; } }
@media (max-width: 345px) { .top.has-code { gap: 3px; padding: 0 5px; } .top.has-code .steps { gap: 0; } .top.has-code .steps button { padding-left: 5px; padding-right: 5px; } }
