/* Box Template Maker: structure. Layout, spacing and the parts every skin shares, with no colours or fonts of its own:
   those come from the skin's tokens (web/skins/<name>.css, which the build appends). Mobile first (320 px), designed
   up to 1920 px. Nothing here moves after the first paint: the stage, the strip and the fields keep their size when the
   tool's script takes over. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 16px; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
svg { display: block; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4, p, figure { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 90; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 8px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
:root { --gutter: 16px; }
@media (min-width: 760px) { :root { --gutter: 28px; } }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

/* Header: one compact line */
.site-header .wrap { display: flex; align-items: center; gap: 8px; height: 44px; max-width: none; padding-left: 12px; padding-right: 8px; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-right: auto; text-decoration: none; min-width: 0; }
.brand .logo { flex: none; }
.brand-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 0; }
.nav-link { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: 15px; text-decoration: none; white-space: nowrap; }
.lang-link { min-width: 44px; justify-content: center; }
.lang-name { display: none; }
@media (min-width: 640px) { .lang-short { display: none; } .lang-name { display: inline; } }
/* On a narrow phone the logo alone leads home (its name stays for screen readers), so the links keep their room. */
@media (max-width: 459px) { .brand { min-width: 44px; justify-content: center; } .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .nav-link { padding: 0 7px; } }
@media (min-width: 960px) { .site-header .wrap { height: 56px; padding-left: 24px; padding-right: 16px; } .brand-name { font-size: 16px; } }

.trail ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0 0 12px; font-size: 14px; }
.trail li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.trail a { display: inline-block; padding: 2px 0; }
.intro .trail { padding: 0; }

/* ---- The tool. A phone: the strip, the box and its size, the pills and rows, the bar stuck to the foot. ---- */
.tool { --chrome: calc(300px + 48px * var(--rows, 1)); --k: 0.9; position: relative; }
.tool[data-rows="2"] { --rows: 2; }
.tool[data-fit="wide"] { --k: 0.7; }
.tool[data-fit="tall"] { --k: 1.15; }
.tl { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px 0; }
.tl-pick { margin: 0 -8px; min-width: 0; }
.pick-h { display: none; }
.strip { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 2px 8px 4px; scroll-snap-type: x proximity; scroll-padding: 0 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
.strip::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.grp { display: flex; gap: 6px; flex: none; }
.grp + .grp { padding-left: 4px; }
.grp-h { flex: none; display: flex; align-items: center; justify-content: center; width: 18px; margin-right: 2px; height: 68px; writing-mode: vertical-rl; font-size: 11px; line-height: 1; white-space: nowrap; }
.strip .tile { flex: none; display: grid; grid-template-rows: 50px 16px; justify-items: center; gap: 2px; min-width: 64px; padding: 0; border: 0; text-align: center; scroll-snap-align: start; }
.strip .tile-art { width: 64px; }
.tile-all .tile-art { display: grid; place-items: center; }
.all-icon { width: 26px; height: 26px; }
.every-box { gap: 14px; }
.all-grp { padding: 0 4px; }
.all-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px 6px; }
.all-tiles .tile { display: grid; grid-template-rows: 58px auto; gap: 4px; padding: 0; border: 0; text-align: center; }
.all-tiles .tile-art { position: relative; height: 58px; }
.all-tiles .tile-name { font-size: 13px; line-height: 15px; }
.strip .tile-art { display: grid; place-items: center; height: 50px; padding: 5px; }
.strip .tile-art, .catalog .tile-art { position: relative; }
.tile-img { position: absolute; left: 8%; top: 8%; width: 84%; height: 84%; object-fit: contain; }
.strip .tile-name { padding: 0 2px; font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tl-view { position: relative; min-width: 0; }
.stage { position: relative; height: 280px; height: clamp(260px, min(calc(100svh - var(--chrome)), calc((100vw - 16px) * var(--k))), 440px); overflow: hidden; cursor: pointer; touch-action: manipulation; }
.stage-still { position: absolute; left: 50%; top: 50%; width: 62%; height: 78%; object-fit: contain; transform: translate(-50%, -50%); }
.view-seg { position: absolute; left: 8px; top: 8px; z-index: 3; }
.seg { display: inline-flex; gap: 2px; padding: 2px; }
.seg button { min-width: 48px; min-height: 40px; padding: 0 12px; border: 0; font-size: 15px; }
.size { display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 2px 4px; }
.st { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; }
.st-sign { width: 12px; height: 12px; fill: currentColor; }
.nums { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 0; }
.num { position: relative; flex: 1 1 0; min-width: 0; max-width: 120px; }
.num input { display: block; width: 100%; height: 44px; padding: 0 2px 14px; border: 0; text-align: center; font-size: 24px; font-weight: 600; line-height: 30px; font-variant-numeric: tabular-nums; }
.num-l { position: absolute; left: 0; right: 0; bottom: 3px; font-size: 11px; line-height: 13px; text-align: center; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.times { flex: none; padding: 0 1px 12px; font-size: 16px; }
.num-u { flex: none; padding: 0 2px 12px 4px; font-size: 15px; }
.nums[data-count="1"] .num { max-width: 160px; }

.tl-ctl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
@media (max-width: 359px) { .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pill { display: grid; align-content: center; min-width: 0; min-height: 44px; padding: 2px 8px; border: 0; text-align: left; }
.pill-k { font-size: 11px; line-height: 14px; }
.pill-v { font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-wrap:empty { display: none; }
.row { display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 44px; }
.row-l { flex: none; min-width: 44px; padding: 0 4px; font-size: 13px; font-weight: 600; }
@media (max-width: 379px) { .row .sw-dot { display: none; } .row .chip.sw > span { padding-left: 11px; } }
.chips { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.row .chips { flex: 1; flex-wrap: wrap; gap: 4px; overflow: visible; }
.chip { position: relative; flex: none; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip > span, button.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; font-size: 15px; white-space: nowrap; cursor: pointer; }
.row .chip > span { gap: 5px; padding: 0 11px; font-size: 14px; }
.row .chip.sw > span { padding-left: 9px; }
.row .sw-dot { width: 14px; height: 14px; }
.chip.sw > span { padding-left: 10px; }
.sw-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; }
.more-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; text-align: left; font-size: 15px; font-weight: 600; }
.more-row small { min-width: 0; font-size: 13px; line-height: 16px; font-weight: 400; text-align: right; }

.bar { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; margin: 4px -8px 0; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); }
.bar-notes { grid-column: 1 / -1; display: grid; gap: 4px; padding-bottom: 4px; }
.bar-notes:not(:has(.feedback)):has(.status:empty) { display: none; }
.tl-view > .note { margin: 0 10px 10px; }
.note, .status { font-size: 14px; line-height: 1.35; }
.note:empty, .status:empty { display: none; }
.btn2, .btn-primary { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 16px; border: 0; font-size: 16px; }
.btn-primary { font-weight: 600; }
.print-tip { grid-column: 1 / -1; font-size: 12px; line-height: 14px; text-align: center; text-wrap: balance; }

/* The lists: a sheet from the foot of a phone's screen that stops under the box */
.scrim { position: fixed; left: 0; right: 0; top: var(--sheet-top, 50%); bottom: 0; z-index: 40; }
.sheetbox { position: fixed; left: 0; right: 0; bottom: 0; top: var(--sheet-top, 50%); z-index: 50; display: flex; flex-direction: column; transform: translateY(102%); transition: transform 0.22s ease; padding-bottom: env(safe-area-inset-bottom); }
.sheetbox[data-shown] { transform: none; }
.sb-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 4px 16px; }
.sb-title { font-size: 17px; font-weight: 600; }
.sb-title:focus { outline: none; }
.btn-done { min-height: 44px; padding: 0 18px; border: 0; font-size: 16px; font-weight: 600; }
.sb-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 20px; }
.panel { display: grid; gap: 12px; align-content: start; }
.opts { display: grid; gap: 2px; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; text-align: left; font-size: 16px; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt-l { flex: none; }
.opt-d { flex: 1; min-width: 0; text-align: right; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-c { flex: none; width: 20px; height: 20px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.opt[aria-pressed="true"] .opt-c, .opt:has(input:checked) .opt-c { opacity: 1; }
.max-line { padding: 0 4px; font-size: 14px; }
.presets { display: grid; gap: 8px; padding: 0 4px; }
.presets .chips { flex-wrap: wrap; overflow: visible; }
.lbl { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.lbl small { font-weight: 400; }
.reset, .link { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; padding: 0 4px; border: 0; background: none; text-align: left; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.reset:disabled { opacity: 0.45; cursor: default; }
@media (prefers-reduced-motion: reduce) { .sheetbox { transition: none; } }

/* More options */
.more { gap: 8px; }
.more-item { display: grid; gap: 10px; padding: 4px 12px 12px; }
details.more-item { padding: 0 12px; }
details.more-item[open] { padding-bottom: 14px; }
.more-item summary, .need summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 600; }
.more-item summary::-webkit-details-marker, .need summary::-webkit-details-marker { display: none; }
.more-item summary small { min-width: 0; font-size: 13px; font-weight: 400; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.your-sheet .lbl { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; }
.paper-view { position: relative; width: 100%; max-width: 360px; aspect-ratio: 0.72; margin: 0 auto; cursor: zoom-in; }
.sheet-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.more-links { display: grid; gap: 0; justify-items: start; padding-top: 6px; padding-bottom: 6px; }
.more-links .need { width: 100%; padding: 0 4px; }
.faces-body { display: grid; gap: 10px; }
.faces-body .chips { flex-wrap: wrap; overflow: visible; }
.hint { font-size: 14px; line-height: 1.4; }
.ink-row { display: flex; flex-wrap: wrap; gap: 4px; }
.ink { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.ink input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch { display: block; width: 30px; height: 30px; border-radius: 50%; }
.label-field { display: grid; gap: 6px; }
.label-field input { width: 100%; min-height: 44px; padding: 0 12px; border: 0; font-size: 16px; }
.inside-note { display: none; font-size: 13px; }
[data-more][data-inside] .inside-note { display: block; }

/* Lines */
.lines-panel { display: grid; gap: 10px; }
.line-row { display: grid; gap: 8px; }
.tick { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 15px; }
.tick input { width: 20px; height: 20px; margin: 0; flex: none; }
.line-sample { flex: none; width: 34px; height: 0; margin-left: auto; border-top: 2px solid; }
.line-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.pick select { min-height: 44px; padding: 0 8px; border: 0; font-size: 16px; }
.line-row[data-off] .line-opts { opacity: 0.4; }
.stepper { display: grid; gap: 2px; }
.st-label { font-size: 13px; white-space: nowrap; }
.st-keys { display: flex; align-items: stretch; }
.st-key { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 0; }
.stepper input { width: 52px; min-width: 0; min-height: 44px; padding: 0 2px; border: 0; text-align: center; font-size: 16px; }
.toggles { display: grid; gap: 2px; }
.toggles .lbl { margin: 6px 0 0; }

/* Settings, the custom sheet, what sheet do I need */
.settings-body { display: grid; gap: 12px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 4px 10px; }
.set-row label { font-size: 15px; line-height: 1.25; }
.set-row input, .set-row select { width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; border: 0; font-size: 16px; }
.set-row select { grid-column: 1 / -1; }
.set-row small { grid-column: 1 / -1; font-size: 13px; line-height: 1.35; }
.custom-wrap { padding: 0 4px; }
.custom-sheet { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 6px 10px; }
.cs-field, .need-field { display: grid; gap: 4px; min-width: 0; font-size: 14px; }
.cs-field input, .need-field input { width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; border: 0; font-size: 16px; }
.cs-x { padding-bottom: 12px; }
.cs-hint { grid-column: 1 / -1; font-size: 13px; line-height: 1.35; }
.need-body { display: grid; gap: 12px; padding: 4px 0 12px; }
.need-lede { font-size: 14px; line-height: 1.4; }
.need-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.need-fields[data-count="1"] { grid-template-columns: minmax(0, 160px); }
.need-fields[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.need-out { display: grid; justify-items: start; gap: 8px; }
.need-out .lbl { margin: 0; }
.need-size { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.need-size .lbl { flex-basis: 100%; }
.need-sheets { display: flex; flex-wrap: wrap; gap: 6px; }
.need-use { min-height: 44px; padding: 0 14px; border: 0; }
.need-none { font-size: 14px; }

/* "Did it work?" (src/app/feedback.ts) */
.feedback { position: relative; display: grid; gap: 8px; padding: 10px 48px 10px 12px; }
.feedback-question:focus { outline: none; }
.feedback-question:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.feedback-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.feedback-choices:empty { display: none; }
.feedback-choice { min-height: 44px; padding: 0 16px; border: 0; }
.feedback-close { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; padding: 0; border: 0; background: none; font-size: 24px; line-height: 1; }

/* How to fold and the measurements: over the page */
.layer { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; overflow: hidden; }
.layer[open] { display: flex; flex-direction: column; }
.layer-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 8px 16px; }
.layer-title { font-size: 18px; font-weight: 600; }
.btn-close { min-height: 44px; padding: 0 18px; border: 0; font-size: 15px; }
.howto-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 0 12px max(16px, env(safe-area-inset-bottom)); }
.film { display: grid; gap: 8px; }
.film-screen { overflow: hidden; }
.film-canvas { display: block; width: 100%; height: auto; aspect-ratio: 960 / 600; }
.film-cap { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; font-size: 16px; line-height: 1.35; }
.film-cap .n, .film-stills .n, .howto-steps .n { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; font-weight: 600; }
.film-bar { display: flex; align-items: center; gap: 12px; }
.film-play { min-height: 44px; padding: 0 20px; border: 0; font-size: 15px; font-weight: 600; }
.film-note { font-size: 14px; }
.film-rec { position: fixed; left: -10000px; top: 0; pointer-events: none; }
.film-stills { display: none; gap: 12px; list-style: none; margin: 0; padding: 0; }
.film-still { display: block; width: 100%; height: auto; }
.film-stills figcaption { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; font-size: 16px; line-height: 1.4; }
.howto[data-film="stills"] .film-stills { display: grid; }
.howto[data-film="stills"] :is(.film-screen, .film-bar, .howto-steps) { display: none; }
.howto-steps { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.howto-steps button { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; text-align: left; font-size: 15px; line-height: 1.4; }
.measure { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.measure-head { position: relative; padding-right: 52px; }
.measure-head h4 { font-size: 18px; font-weight: 600; }
.measure-head h4:focus { outline: none; }
.measure-sub { margin-top: 6px; font-size: 15px; line-height: 1.45; }
.measure-close { position: absolute; top: -4px; right: -8px; width: 44px; height: 44px; padding: 0; border: 0; font-size: 26px; line-height: 1; }
.measure-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.measure-actions .status { flex-basis: 100%; }
.measure-pdf, .measure-print { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 11px 18px; border: 0; }
.measure-grid { display: grid; gap: 18px; }
.measure-view { overflow: auto; max-height: 70vh; }
.measure-svg { display: block; height: auto; max-width: none; }
.measure-steps { display: grid; gap: 6px; margin: 0; padding-left: 30px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
@media print {
  html[data-printing="measure"] body *:not(:has(.measure)):not(.measure):not(.measure *) { display: none !important; }
  html[data-printing="measure"] .measure-close, html[data-printing="measure"] .measure-actions { display: none !important; }
  html[data-printing="measure"] .layer { position: static; height: auto; max-height: none; overflow: visible; }
  html[data-printing="measure"] .measure { overflow: visible; }
  html[data-printing="measure"] .measure-grid { display: block; }
  html[data-printing="measure"] .measure-view { overflow: visible; max-height: none; }
  html[data-printing="measure"] .measure-svg { width: 100% !important; }
  html[data-printing="measure"] .measure-steps { margin-top: 16px; font-size: 11pt; }
}

/* The sheet full screen (src/app/zoom.ts) */
.zoom { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; display: none; }
.zoom[open] { display: grid; grid-template-rows: auto 1fr; }
.zoom-bar { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) var(--gutter) 8px; }
.zoom-title { margin: 0 auto 0 0; font-size: 18px; font-weight: 600; white-space: nowrap; }
.zoom-level { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.zoom-bar .change { min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; }
.zoom-pane { overflow: auto; overscroll-behavior: contain; cursor: grab; touch-action: pan-x pan-y pinch-zoom; }
.zoom-pane.dragging { cursor: grabbing; user-select: none; }
.zoom-svg { display: block; margin: 16px; max-width: none; background: #fff; }

/* The fold preview (src/app/preview.ts) */
.pv { perspective: 1700px; perspective-origin: 50% 45%; overflow: hidden; }
.pv-defs { position: absolute; }
.pv-world { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.pv-face { position: absolute; left: 0; top: 0; transform-origin: 0 0; backface-visibility: visible; pointer-events: none; }
.pv-face svg { overflow: visible; }
.pv-face path { pointer-events: visiblePainted; }
.pv-shadow { position: absolute; left: 0; top: 0; width: 100px; height: 22px; border-radius: 50%; pointer-events: none; opacity: 0; }
.pv-box { position: absolute; inset: 0; }
.pv-sheet { position: absolute; left: 0; top: 0; pointer-events: none; }
[data-no-cut] .pv-cut, [data-no-fold] .pv-fold { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---- Below the tool: the page ---- */
.intro { padding-top: 40px; }
h1.display, .display { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.lede { margin-top: 10px; max-width: 52ch; font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.band { padding-top: 56px; }
@media (min-width: 900px) { .band { padding-top: 72px; } }
.sh { margin-bottom: 20px; }
.sh h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.12; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.sh p { margin-top: 8px; max-width: 56ch; text-wrap: pretty; }
.sh h2 small { margin-left: 4px; font-size: 0.6em; font-weight: 600; letter-spacing: 0; vertical-align: 0.2em; }
.catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 700px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.catalog > li { display: flex; min-width: 0; }
.catalog .tile { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 6px; width: 100%; min-width: 0; padding: 10px 12px 14px; text-decoration: none; }
.catalog .tile-art { display: grid; place-items: center; min-width: 0; height: 120px; padding: 10px; overflow: hidden; }
.tile-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; min-width: 0; padding-top: 4px; }
.catalog .tile-name { flex: 1 1 6em; min-width: 0; overflow-wrap: break-word; font-size: 16px; font-weight: 600; line-height: 1.2; }
.tile-size { display: none; max-width: 100%; overflow-wrap: anywhere; font-size: 14px; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .catalog .tile-art { height: 150px; } .tile-size { display: block; } }
/* A phone: three small tiles a row, so the whole catalog is a short scroll. */
@media (min-width: 360px) and (max-width: 639px) {
  .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .catalog .tile { padding: 6px 6px 10px; }
  .catalog .tile-art { height: 84px; padding: 6px; }
  .catalog .tile-name { font-size: 13px; }
}
/* How it is made: three drawings, a line under each; on a narrow phone each drawing beside its line. */
.how { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.how li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 16px; }
.how-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.how-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.how p { min-width: 0; text-wrap: pretty; }
@media (min-width: 560px) {
  .how { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .how li { grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: center; gap: 10px; padding: 20px 16px; text-align: center; }
}
.good { margin-top: 20px; font-size: 15px; }
.good h3 { font-size: 15px; font-weight: 600; }
.good ul { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 20px; max-width: 70ch; }
.season-links { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.season-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 600; text-decoration: none; }
.prose { max-width: 62ch; }
.prose p + p, .prose h2 + p, .prose p + h2, .prose ul + h2, .prose p + ul { margin-top: 14px; }
.prose h2 { font-size: 22px; font-weight: 600; line-height: 1.2; margin-top: 28px; }
.prose ul { padding-left: 20px; }
.prose-page { padding-top: 28px; padding-bottom: 20px; }
.prose-page h1 { margin-bottom: 18px; }
.lead-text { font-size: 19px; line-height: 1.45; }
.updated { font-size: 14px; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; text-decoration: none; font-weight: 600; }
.lost { max-width: 240px; margin: 20px 0; }
/* The sources of the ready-made sizes: one small line that opens. */
.sources { padding-top: 40px; font-size: 14px; }
.sources summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.sources ol { max-width: 64ch; padding-left: 20px; margin: 4px 0 0; display: grid; gap: 8px; }

/* Footer */
.site-footer { margin-top: 80px; }
.foot { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 20px; }
@media (min-width: 900px) { .foot { grid-template-columns: 1.2fr 1.4fr 0.7fr; } }
.foot-brand p { margin-top: 10px; max-width: 34ch; }
.foot ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.foot-legal ul { columns: 1; }
@media (max-width: 899px) { .foot-legal ul { display: flex; flex-wrap: wrap; column-gap: 20px; } }
.foot-all { font-weight: 600; }
.foot li { break-inside: avoid; }
.foot a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.foot a:hover, .foot a[aria-current] { text-decoration: underline; }
.legal-line { padding-bottom: 28px; font-size: 14px; }

/* Where the pointer is a finger, everything pressed is at least 44 x 44 px (elsewhere at least 24 px, WCAG 2.5.8). */
@media (pointer: coarse) {
  .foot a, .trail a { min-height: 44px; min-width: 44px; }
  .seg button { min-height: 44px; }
}

/* ---- A wide screen: the box big on the left, everything else on the right, all in view ---- */
@media (min-width: 960px) {
  .tl { display: grid; position: relative; grid-template-columns: minmax(0, 1fr) clamp(460px, 40vw, 580px); grid-template-rows: minmax(0, 1fr) auto auto; grid-template-areas: "view pick" "view ctl" "view bar"; gap: 10px 16px; height: calc(100vh - 56px); min-height: 640px; max-height: 1080px; max-width: 1760px; margin: 0 auto; padding: 4px 16px 16px; }
  .tl-view { grid-area: view; display: flex; flex-direction: column; min-height: 0; }
  .stage { flex: 1; height: auto; min-height: 0; }
  .stage-still { width: 50%; height: 70%; }
  .view-seg { left: auto; right: 16px; top: 16px; }
  /* The box's column is narrowest just past 960 px: the numbers shrink with it so the row never leaves its card. */
  .size { height: auto; justify-content: center; gap: clamp(2px, 0.8vw - 4px, 8px); padding: 4px clamp(6px, 3vw - 20px, 24px) 20px; }
  .nums { flex: 0 1 auto; min-width: 0; gap: clamp(0px, 0.6vw - 4px, 4px); }
  .num { flex: 0 1 130px; width: auto; min-width: 0; max-width: none; }
  .nums[data-count="1"] .num { flex-basis: 160px; }
  .num input { height: 64px; padding-bottom: 20px; font-size: clamp(24px, 3.4vw - 8px, 40px); line-height: 44px; }
  .num-l { bottom: 4px; font-size: 14px; line-height: 16px; }
  .times { padding-bottom: 18px; font-size: 22px; }
  .num-u { padding-bottom: 18px; font-size: 20px; }
  .st { width: 48px; height: 48px; }
  .tl-pick { grid-area: pick; display: flex; flex-direction: column; min-height: 0; margin: 0; padding-top: 10px; }
  .pick-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 6px; }
  .pick-t { font-size: 15px; font-weight: 600; }
  .pick-n { font-size: 14px; }
  .strip { display: block; flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 0 12px 12px; scroll-snap-type: none; scrollbar-width: thin; }
  .grp { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px 6px; }
  .grp + .grp { padding-left: 0; padding-top: 6px; }
  .grp-h { grid-column: 1 / -1; justify-content: flex-start; width: auto; height: auto; padding: 8px 4px 0; writing-mode: horizontal-tb; transform: none; font-size: 13px; font-weight: 600; }
  .strip .tile { min-width: 0; grid-template-rows: 62px auto; gap: 4px; }
  .strip .tile-art { width: 100%; height: 62px; padding: 6px; }
  .strip .tile-name { max-width: 100%; font-size: 13px; line-height: 15px; white-space: normal; }
  .tile-all { display: none !important; }
  .tl-ctl { grid-area: ctl; gap: 8px; }
  .pills { gap: 8px; }
  .pill { min-height: 52px; padding: 4px 12px; }
  .pill-k { font-size: 13px; line-height: 16px; }
  .pill-v { font-size: 15px; line-height: 20px; }
  .row { height: 52px; padding: 0 4px 0 12px; }
  .row-l { width: 60px; padding-left: 0; font-size: 14px; }
  .chips { flex-wrap: wrap; overflow: visible; }
  .row .chip > span { padding: 0 13px; }
  .chip > span, button.chip { min-height: 40px; padding: 0 13px; font-size: 14px; }
  .more-row { min-height: 52px; padding: 0 16px; }
  .bar { grid-area: bar; position: relative; bottom: auto; margin: 0; padding: 10px; }
  .btn2, .btn-primary { min-height: 54px; }
  .bar { gap: 6px 10px; }
  .print-tip { order: -1; font-size: 13px; line-height: 18px; padding-top: 2px; }
  .scrim { display: none; }
  .sheetbox { position: absolute; grid-column: 2 / 3; grid-row: 1 / 2; inset: 0; transform: translateX(12px); opacity: 0; transition: transform 0.18s ease, opacity 0.18s ease; }
  .sheetbox[data-shown] { transform: none; opacity: 1; }
  .sb-h { padding: 12px 12px 6px 20px; }
  .sb-b { padding: 4px 12px 16px; }
  .layer { width: min(960px, calc(100vw - 48px)); height: auto; max-height: min(860px, calc(100vh - 48px)); margin: auto; }
  .howto-grid { padding-bottom: 20px; }
  .howto-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; padding: 0 16px 16px; }
  .measure-layer { width: min(1180px, calc(100vw - 48px)); }
  .measure-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 960px) and (max-height: 700px) { .tl { height: auto; min-height: 640px; } }

/* Skin "calm" (Soft paper): a warm, very light page, white rounded cards with a gentle shadow, one muted peach tint for
   what is chosen, the boxes in that one tint. The system's rounded sans (SF Rounded on Apple devices) in 400 and 600,
   no web fonts. No outlines, hard shadows or patterns: depth is a soft shadow, a choice is a tint. Everything visual
   lives here; web/base.css holds the structure. */
:root {
  color-scheme: light;
  --bg: #F2F1EE;
  --card: #FFFFFF;
  --well: #F5F3F0;
  --well-2: #ECE8E3;
  --ink: #2A2623;
  --mut: #665E57;
  --line: #EAE6E1;
  --accent: #EDB896;
  --accent-2: #D9956D;
  --accent-ink: #6A3719;
  --tint: #FBE9DD;
  --kraft: #D3B28A;
  --deco: #F7D8C4;
  --hover: #EFEBE6;
  --hover-card: #FBF7F3;
  --accent-hover: #E8AD88;
  --focus: #B0643A;
  --shadow: 0 1px 2px rgba(60, 40, 25, 0.05), 0 2px 10px rgba(60, 40, 25, 0.05);
  --shadow-up: 0 -1px 0 var(--line), 0 -4px 16px rgba(60, 40, 25, 0.05);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* The fold preview */
  --pv-in: #F4EFEA;
  --pv-edge: #A8968A;
  --pv-glue: #EADFD5;
  --pv-cut: #D2463A;
  --pv-fold: #3A332E;
}

/* Page */
.skip-link { background: var(--ink); color: #fff; }
.site-header { background: var(--bg); }
.brand { color: var(--ink); }
.logo-box { fill: #F3CDB4; stroke: #B5734D; stroke-width: 1.3; stroke-linejoin: round; }
.logo-line { fill: none; stroke: #B5734D; stroke-width: 1.3; stroke-linejoin: round; }
.nav-link { color: var(--ink); }
.nav-link:hover { background: var(--well-2); }
.trail { color: var(--mut); }
.trail a { color: var(--ink); }
.lede, .sh p, .sh h2 small, .hint, .good, .updated, .need-lede, .cs-hint, .set-row small, .film-note, .measure-sub { color: var(--mut); }
a { text-decoration-color: rgba(42, 38, 35, 0.35); }
a:hover { text-decoration-color: currentColor; }
.display em { font-style: normal; color: var(--accent-ink); }

/* The tool */
.strip .tile { background: none; color: var(--ink); }
.strip .tile-art { border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.strip .tile[aria-pressed="true"] .tile-art { background: var(--tint); box-shadow: inset 0 0 0 2px var(--accent-2); }
.strip .tile[aria-pressed="true"] .tile-name { color: var(--accent-ink); font-weight: 600; }
.grp-h { color: var(--mut); }
.grp + .grp { border-left: 1px solid var(--line-2, #DAD3CB); }
.tl-view { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.stage { border-radius: 20px 20px 0 0; }
.seg { border-radius: 12px; background: var(--well); }
.view-seg { background: rgba(245, 243, 240, 0.9); }
.seg button { border-radius: 10px; background: transparent; color: var(--mut); }
.seg button[aria-pressed="true"] { background: var(--tint); color: var(--accent-ink); font-weight: 600; }
.st { border-radius: 50%; background: var(--well); color: var(--ink); }
.st:active, .st:hover { background: var(--tint); }
.st.at-end { color: #A49B93; background: transparent; }
.num input { border-radius: 12px; background: transparent; color: var(--ink); }
.num[data-on] input { background: var(--tint); color: var(--accent-ink); }
.num input:focus { outline: none; background: var(--card); box-shadow: inset 0 0 0 2px var(--accent-2); }
.num input[aria-invalid] { box-shadow: inset 0 0 0 2px var(--pv-cut); }
.num-l, .times, .num-u { color: var(--mut); }
.num[data-on] .num-l { color: var(--accent-ink); font-weight: 600; }
.pill { border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.pill-k { color: var(--mut); }
.pill[aria-expanded="true"], .pill:active { background: var(--tint); }
.pill[aria-expanded="true"] .pill-k { color: var(--accent-ink); }
.row { border-radius: 14px; }
.row-l { color: var(--ink); }
.chip > span, button.chip { border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.panel .chip > span, .panel button.chip { background: var(--well); box-shadow: none; }
.more-item .chip > span { background: var(--card); }
.chip input:checked + span { background: var(--tint); color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--accent-2); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.sw-dot { box-shadow: inset 0 0 0 1px rgba(60, 40, 25, 0.18); }
.sw-white { background: #fff; }
.sw-kraft { background: var(--kraft); }
.sw-dots { background: radial-gradient(circle, #CFA58B 1.6px, transparent 1.8px) 0 0 / 5px 5px, var(--deco); }
.sw-stripes { background: repeating-linear-gradient(45deg, #CFA58B 0 2px, var(--deco) 2px 5px); }
.dot { background: var(--accent-2); }
.more-row { border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.more-row small { color: var(--mut); }
.more-row[aria-expanded="true"] { background: var(--tint); }
.bar { background: var(--card); box-shadow: var(--shadow-up); }
.btn-primary { border-radius: 14px; background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-2); }
.print-tip { color: var(--mut); }
.tile-all .tile-art { color: var(--mut); }
.all-icon { fill: none; stroke: currentColor; stroke-width: 1.6; }
.all-tiles .tile { background: none; color: var(--ink); }
.all-tiles .tile-art { border-radius: 14px; background: var(--well); }
.all-tiles .tile[aria-pressed="true"] .tile-art { background: var(--tint); box-shadow: inset 0 0 0 2px var(--accent-2); }
.all-tiles .tile[aria-pressed="true"] .tile-name { color: var(--accent-ink); font-weight: 600; }
.all-grp .lbl small { color: var(--mut); }
.btn2 { border-radius: 14px; background: var(--well); color: var(--ink); }
.btn2:hover, .btn2:active { background: var(--tint); }
.status, .note { color: var(--ink); }
.note:not(:empty) { padding: 8px 12px; border-radius: 12px; background: var(--tint); color: var(--accent-ink); }

/* The lists */
.scrim { background: rgba(60, 40, 25, 0.08); }
.sheetbox { background: var(--card); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 28px rgba(60, 40, 25, 0.12); }
.btn-done { border-radius: 999px; background: var(--tint); color: var(--accent-ink); }
.opt { border-radius: 12px; background: transparent; color: var(--ink); }
.opt-d { color: var(--mut); }
.opt-c { stroke: var(--accent-ink); }
.opt[aria-pressed="true"], .opt:has(input:checked) { background: var(--tint); color: var(--accent-ink); font-weight: 600; }
.opt[aria-pressed="true"] .opt-d, .opt:has(input:checked) .opt-d { color: var(--accent-ink); font-weight: 400; }
.opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.opt:hover:not([aria-pressed="true"]) { background: var(--well); }
.reset, .link { color: var(--ink); }
.lbl { color: var(--ink); }
.lbl small { color: var(--mut); }
.more-item { border-radius: 16px; background: var(--well); }
.more-item summary small { color: var(--mut); }
.more-item summary::after, .need summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 1.8px solid var(--mut); border-bottom: 1.8px solid var(--mut); transform: rotate(45deg) translate(-2px, -2px); }
.more-item[open] > summary::after, .need[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.paper-view { border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.swatch { box-shadow: inset 0 0 0 1px rgba(60, 40, 25, 0.2); }
.ink input:checked + .swatch { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent-2); }
.ink input:focus-visible + .swatch { outline: 2px solid var(--focus); outline-offset: 4px; }
.sw-line-red { background: #E5202E; }
.sw-line-black { background: #000000; }
.sw-line-grey { background: #808080; }
.sw-line-blue { background: #0057FF; }
.sw-line-green { background: #00A95C; }
.sw-line-pink { background: #FF48B0; }
.swatch.sw-white { background: #ffffff; }
.sw-peach { background: #f7d8c4; }
.sw-rose { background: #f3c6cc; }
.sw-butter { background: #f6e3a6; }
.sw-sage { background: #cfe1c6; }
.sw-sky { background: #c9dcef; }
.sw-lilac { background: #ddd1ee; }
.swatch.sw-kraft { background: #d3b28a; }
.sw-charcoal { background: #4a4541; }
.label-field input, .set-row input, .set-row select, .cs-field input, .need-field input, .pick select, .stepper input { border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px #D8D0C7; }
.label-field input:focus, .set-row input:focus, .set-row select:focus, .cs-field input:focus, .need-field input:focus, .stepper input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-2); }
.st-key { background: var(--card); color: var(--ink); }
.st-key:first-child { border-radius: 10px 0 0 10px; }
.st-key:last-child { border-radius: 0 10px 10px 0; }
.st-key:disabled { color: #B3AAA2; }
.tick input { accent-color: var(--accent-2); }
.ls-cut { border-top-color: var(--ln-cut, var(--pv-cut)); border-top-style: var(--ln-cut-border, solid); border-top-width: 2.5px; }
.ls-fold { border-top-color: var(--ln-fold, var(--pv-fold)); border-top-style: var(--ln-fold-border, dashed); border-top-width: 2.5px; }
[data-no-cut] .ls-cut, [data-no-fold] .ls-fold { opacity: 0.25; }
.need-use { border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.need-size b { font-size: 20px; font-weight: 600; }
.feedback { border-radius: 14px; background: var(--tint); color: var(--accent-ink); }
.feedback-question { font-weight: 600; }
.feedback-choice { border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.feedback-close { border-radius: 12px; color: var(--accent-ink); }

/* Over the page */
.layer { background: var(--bg); color: var(--ink); }
.layer::backdrop { background: rgba(60, 40, 25, 0.28); }
.btn-close { border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.film-screen { border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.film-cap .n, .film-stills .n, .howto-steps .n { background: var(--accent); color: var(--ink); }
.film-play { border-radius: 999px; background: var(--accent); color: var(--ink); }
.film-stills figure { border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.howto-steps button { border-radius: 12px; background: var(--card); color: var(--ink); }
.howto-steps button[aria-current] { background: var(--tint); color: var(--accent-ink); }
.measure-close { border-radius: 12px; background: none; color: var(--ink); }
.measure-pdf { border-radius: 14px; background: var(--accent); color: var(--ink); font-weight: 600; }
.measure-print { border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.measure-view { border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.zoom { background: var(--bg); color: var(--ink); }
.zoom::backdrop { background: var(--bg); }
.zoom-bar .change { border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.zoom-svg { box-shadow: var(--shadow); }

/* The fold preview: the sheet behind the flat net, faces in white (or their own colour), insides warm. */
.pv-fill { fill: var(--pv-out, #fff); stroke: var(--pv-edge); stroke-width: 1.4; stroke-linejoin: round; stroke-opacity: calc(var(--pv-p, 0) * 0.5); }
.pv-smooth .pv-fill { stroke: none; }
.pv-face.pv-in .pv-fill { fill: var(--pv-in); }
.pv-face.pv-in .pv-pattern, .pv-face.pv-in .pv-label { display: none; }
.pv-glue .pv-fill { fill: var(--pv-glue); }
[data-no-glue] .pv-glue .pv-fill { fill: var(--pv-out, #fff); }
.pv-wrap { display: none; }
.pv-label { fill: var(--pv-label); font-family: Helvetica, Arial, sans-serif; font-weight: 700; }
.pv-shade { fill: #4A2C18; fill-opacity: calc(var(--sh, 0) * 0.45); }
.pv-cut, .pv-fold { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: calc(1 - var(--pv-p, 0) * 0.85); }
.pv-cut { stroke: var(--ln-cut, var(--pv-cut)); stroke-width: var(--ln-cut-w, 1.6px); stroke-dasharray: var(--ln-cut-dash, none); stroke-linecap: var(--ln-cut-cap, round); }
.pv-fold { stroke: var(--ln-fold, var(--pv-fold)); stroke-width: var(--ln-fold-w, 1.3px); stroke-dasharray: var(--ln-fold-dash, 6 4); stroke-linecap: var(--ln-fold-cap, butt); }
.pv-picked:not(.pv-smooth) .pv-fill { stroke: var(--accent-2); stroke-width: 3; stroke-opacity: 1; }
.pv-shadow { background: radial-gradient(closest-side, rgba(70, 45, 25, 0.2), transparent); }
.pv-sheet { background: #fff; border-radius: 3px; box-shadow: 0 2px 12px rgba(60, 40, 25, 0.08); opacity: calc(1 - var(--fold, 0) * 1.6); }
[data-look="kraft"] .pv-face:not(.pv-in):not([data-painted]) .pv-fill { fill: var(--kraft); }
[data-look="kraft"] .pv-glue:not(.pv-in) .pv-fill { fill: #C7A47B; }
[data-look="kraft"] .film-canvas, [data-look="kraft"] .film-stills { --wrap: #d3b28a; }

/* Below the tool */
.catalog .tile { border-radius: 18px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.catalog .tile:hover { box-shadow: 0 2px 4px rgba(60, 40, 25, 0.06), 0 8px 22px rgba(60, 40, 25, 0.09); }
.catalog .tile-art { border-radius: 14px; background: var(--well); }
.tile-size { color: var(--mut); }
.how li { border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.how-ic { background: var(--tint); color: var(--accent-ink); }
.good h3 { color: var(--ink); }
.season-links a { border-radius: 999px; background: var(--tint); color: var(--accent-ink); }
.n-panel { fill: #fff; }
.n-glue { fill: #E8E2DC; }
.n-flap { fill: #FBF7F3; }
.n-fold { fill: none; stroke: #3A332E; stroke-width: 0.9; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.n-cut { fill: none; stroke: #C2453A; stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.button { border-radius: 14px; background: var(--accent); color: var(--ink); }
.sources { color: var(--mut); }
.site-footer { background: #EAE7E2; color: var(--ink); }
.foot-brand p, .legal-line, .foot .lbl { color: var(--mut); }
.foot .lbl { font-size: 13px; font-weight: 600; }

/* The closed boxes drawn inline (Open Graph cards, the Christmas pages' figures) in the one tint, whatever the svg's class */
.b-out { fill: #F3CDB4; }
.b-in { fill: #FAE6D9; }
.b-glue { fill: #EDC2A6; }
.b-shade { fill: #7A3F1D; }
.b-edge { fill: none; stroke: #B5734D; stroke-width: 0.9px; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.b-floor { fill: rgba(110, 65, 35, 0.12); }

@media (min-width: 960px) {
  .tl-pick { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
  .strip .tile-art { background: var(--well); box-shadow: none; }
  .strip .tile:hover:not([aria-pressed="true"]) .tile-art { background: var(--hover); }
  .grp + .grp { border-left: 0; }
  .row { background: var(--card); box-shadow: var(--shadow); }
  .row .chip > span { background: var(--well); box-shadow: none; }
  .bar { border-radius: 16px; box-shadow: var(--shadow); }
  .sheetbox { border-radius: 20px; box-shadow: 0 2px 4px rgba(60, 40, 25, 0.06), 0 12px 40px rgba(60, 40, 25, 0.14); }
  .pill:hover, .more-row:hover { background: var(--hover-card); }
  .chip > span:hover { background: var(--hover); }
}
