/* 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: 500 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: 2.5px 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; }
:root { --gutter: 16px; }
@media (min-width: 720px) { :root { --gutter: 32px; } }
.wrap { width: 100%; max-width: 1380px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

/* Header: one line, the mark and the name, the groups and the other language */
.site-header .wrap { display: flex; align-items: center; gap: 8px; height: 44px; max-width: 1380px; padding-left: 12px; padding-right: 8px; }
.brand { display: flex; align-items: center; gap: 9px; min-height: 44px; margin-right: auto; text-decoration: none; min-width: 0; }
.brand .logo { flex: none; }
.brand-name { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 2px; }
.nav-link { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 999px; font-size: 15px; text-decoration: none; white-space: nowrap; }
/* The language menu: the page's language opens the list of every language (a <details>, no script). */
.lang-menu { position: relative; }
.lang-link { min-width: 44px; justify-content: center; gap: 5px; list-style: none; cursor: pointer; user-select: none; }
.lang-link::-webkit-details-marker { display: none; }
.lang-name { display: none; }
.lang-chev { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang-menu[open] .lang-chev { transform: rotate(180deg); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 168px; margin: 0; padding: 6px; list-style: none; border-radius: 16px; }
.lang-opt { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: 15px; text-decoration: none; white-space: nowrap; }
@media (min-width: 720px) { .lang-short { display: none; } .lang-name { display: inline; } }
/* A phone keeps the language menu in the header; the groups are a scroll away on the home page. */
@media (max-width: 559px) { .nav-link:not(.lang-link) { display: none; } }
/* Six languages: two columns of 44 px rows on a phone, so the list stays short under the header. */
@media (max-width: 559px) { .lang-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; min-width: 252px; } }
/* On a narrow phone the logo alone leads home (its name stays for screen readers), so the links keep their room. */
@media (min-width: 720px) { .site-header .wrap { height: 64px; padding-left: 28px; padding-right: 20px; } .nav-link { padding: 0 12px; } }

.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.6; }
.trail a { display: inline-block; padding: 2px 0; }
.foot-trail { padding-top: 40px; }
.foot-trail .trail { padding: 0; }

/* ---- The tool. A phone: the heading and Change box (or the strip), the box and its size, the pills and what prints,
   the bar stuck to the foot; everything else under the first screen. ---- */
.tool { --chrome: 384px; --k: 0.95; position: relative; }
.tool:has(.tl-pick) { --chrome: 420px; }
.tool[data-fit="wide"] { --k: 0.75; }
.tool[data-fit="tall"] { --k: 1.15; }
.tl-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 0; padding-bottom: 6px; }
.tl-title .intro { min-width: 0; }
.tl-title h1 { font-size: 21px; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.tl-title .lede { display: none; }
.change-box { flex: none; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 14px 4px 5px; border: 0; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.change-art { position: relative; display: block; width: 34px; height: 34px; border-radius: 50%; }
.change-img { position: absolute; left: 18%; top: 14%; width: 64%; height: 72%; object-fit: contain; }

.tl { display: flex; flex-direction: column; gap: 6px; }
/* The strip of boxes (the home page): one row that scrolls sideways on a phone, every name on one line. */
.tl-pick { min-width: 0; padding-left: 0; padding-right: 0; }
.strip { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 3px var(--gutter) 1px; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.strip::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.grp { display: flex; gap: 8px; flex: none; }
.strip .tile, .all-tiles .tile { flex: none; display: grid; grid-template-rows: 42px auto; justify-items: center; gap: 2px; min-width: 66px; padding: 0; border: 0; background: none; text-align: center; scroll-snap-align: start; }
.strip .tile-art, .all-tiles .tile-art { position: relative; display: grid; place-items: center; width: 60px; height: 42px; border-radius: 14px; }
.strip .tile-name { padding: 0 2px; font-size: 12px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-img { position: absolute; left: 16%; top: 11%; width: 68%; height: 78%; object-fit: contain; }
.tile-all .tile-art b { font-size: 19px; }
.every-box { gap: 14px; }
.all-grp { padding: 0 4px; }
.all-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 6px; }
.all-tiles .tile { grid-template-rows: 60px auto; width: 100%; min-width: 0; }
.all-tiles .tile-art { width: 100%; height: 60px; }
.all-tiles .tile-name { font-size: 13px; line-height: 15px; }

.tl-view { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stagewrap { position: relative; }
.stage { position: relative; height: 280px; height: clamp(260px, min(calc(100svh - var(--chrome)), calc((100vw - 32px) * var(--k))), 460px); overflow: hidden; cursor: pointer; touch-action: manipulation; border-radius: 28px; }
.stage-still { position: absolute; left: 50%; top: 54%; width: 52%; height: 64%; object-fit: contain; transform: translate(-50%, -50%); }
.viewbar { position: absolute; z-index: 3; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; pointer-events: none; }
.viewbar > * { pointer-events: auto; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; }
.seg button { min-width: 48px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; font-size: 14px; }
.oc { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; }
.oc input { width: 56px; height: 30px; margin: 0; }
@media (max-width: 359px) { .oc > span { display: none; } .oc { padding: 0 8px; } }
@media (max-width: 379px) { html:not(:lang(en)) .oc > span { display: none; } html:not(:lang(en)) .oc { padding: 0 8px; } }
@media (min-width: 960px) { .oc input { width: 64px; } }
[data-shut] .oc, [data-flat] .oc { visibility: hidden; }
/* An advent set: one box shown, the set named over it under Closed ↔ Open, arrows to another day's number; the box
   drawn under them, clear of the card fan. */
.setof { display: none; position: absolute; z-index: 3; right: 10px; top: 58px; align-items: center; gap: 2px; margin: 0; padding: 3px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; }
.setof > span { padding: 0 6px; }
.setof-b { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.setof-b svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-type="advent"]:not([data-flat]) .setof { display: flex; }
[data-type="advent"] .pv-frame { top: 100px; }
/* With touch the arrows are 44 px targets; the box is drawn under the taller pill. */
@media (pointer: coarse) {
  .setof-b { width: 44px; height: 44px; }
  [data-type="advent"] .pv-frame { top: 110px; }
}
/* The frame the box is drawn in: under the view buttons, clear of the card fan. */
.pv-frame { position: absolute; inset: 52px 4px 6px 64px; }
.dims { position: absolute; inset: 0; pointer-events: none; }
.dims-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.dim-label { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 5px; white-space: nowrap; padding: 2px 9px; border-radius: 999px; }
.dim-label i { display: none; font-style: normal; font-size: 11px; }
[data-flat] .dims { display: none; }

/* The fan of card colours: eight swatches from one corner of the stage; the one picked lifted. */
/* Each swatch turns about the middle of its foot; the fan is as wide as the turned swatches, so none is cut at a side. */
.fan { position: absolute; z-index: 2; left: 0; bottom: 0; width: 172px; height: 108px; }
.fan-cards { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 0 28px; }
.card-sw { position: absolute; left: 62px; bottom: -28px; width: 44px; height: 104px; transform-origin: 50% 100%; cursor: pointer; }
.card-sw::before { content: ""; position: absolute; left: 11px; right: 11px; top: 0; bottom: 0; border-radius: 6px 6px 4px 4px; }
.card-sw::after { content: ""; position: absolute; left: 50%; top: 10px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; }
.card-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.card-sw:nth-of-type(1) { transform: rotate(-40deg); z-index: 1; }
.card-sw:nth-of-type(2) { transform: rotate(-28.6deg); z-index: 2; }
.card-sw:nth-of-type(3) { transform: rotate(-17.1deg); z-index: 3; }
.card-sw:nth-of-type(4) { transform: rotate(-5.7deg); z-index: 4; }
.card-sw:nth-of-type(5) { transform: rotate(5.7deg); z-index: 5; }
.card-sw:nth-of-type(6) { transform: rotate(17.1deg); z-index: 6; }
.card-sw:nth-of-type(7) { transform: rotate(28.6deg); z-index: 7; }
.card-sw:nth-of-type(8) { transform: rotate(40deg); z-index: 8; }
.card-sw:has(input:checked) { z-index: 9; translate: 0 -12px; }
.fan-name { display: none; }
/* Below the two-column layout the fan would cover the box's lower corner and its labels: there the colours are a row of
   round chips along the stage's foot, and the box is drawn above them. */
@media (max-width: 959px) {
  /* Each chip a 44 px touch target round a 28 px dot; neighbours overlap by 6 px so eight fit a 360 px phone. */
  .fan { left: 4px; bottom: 4px; width: auto; height: 44px; }
  .fan-cards { position: static; display: flex; height: 100%; overflow: visible; border-radius: 0; }
  .card-sw { position: relative; left: auto; bottom: auto; flex: none; width: 44px; height: 44px; margin-right: -6px; transform: none !important; }
  .card-sw:last-child { margin-right: 0; }
  .card-sw::before { left: 8px; right: 8px; top: 8px; bottom: 8px; border-radius: 50%; }
  .card-sw::after { display: none; }
  .card-sw:has(input:checked) { translate: none; }
  .pv-frame { inset: 52px 4px 50px 4px; }
}
/* Under 360 px the row would run past the stage (and the screen): the chips overlap by 11 px there, still 44 px each. */
@media (max-width: 359px) { .card-sw { margin-right: -11px; } }
.netcard { display: none; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 0; font-size: 12px; }
.lg { display: inline-block; width: 18px; height: 0; margin-right: 5px; vertical-align: middle; border-top: 2px solid; }
.lg-fold { border-top-style: dashed; }
.lg-glue { width: 14px; height: 10px; border: 0; border-radius: 3px; }

/* The inside size: a phone's − and + change the number last tapped; a wide screen gives each number its own. */
.size { padding: 5px; border-radius: 20px; }
.ch { display: none; }
.size-row { display: flex; align-items: center; gap: 4px; }
.st { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; }
.st-sign { width: 12px; height: 12px; fill: currentColor; }
.nums { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
.num { position: relative; flex: 1 1 0; min-width: 0; max-width: 130px; display: flex; align-items: center; border-radius: 16px; }
.nst { display: none; }
.num-in { position: relative; flex: 1; min-width: 0; display: block; }
.num input { display: block; width: 100%; height: 46px; padding: 0 2px 15px; border: 0; border-radius: 14px; text-align: center; font-size: 25px; line-height: 32px; font-variant-numeric: tabular-nums; }
.num-l { position: absolute; left: 0; right: 0; bottom: 4px; font-size: 11.5px; line-height: 13px; text-align: center; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nums[data-count="1"] .num { max-width: 170px; }
/* A phone's size boxes hold their names inside, about 80 px wide: a long name (other languages) is set smaller, or on two
   lines over a smaller number, never cut. */
@media (max-width: 959px) {
  .num-l-s { font-size: 10.5px; }
  .num-l-2 { bottom: 1px; font-size: 10px; line-height: 10px; white-space: normal; text-overflow: clip; }
  .num:has(.num-l-2) input { padding-bottom: 20px; font-size: 21px; line-height: 26px; }
}
@media (max-width: 389px) {
  .num-l { font-size: 11px; }
  .num-l-s { bottom: 1px; font-size: 10px; line-height: 10px; white-space: normal; text-overflow: clip; }
  .num:has(.num-l-s) input { padding-bottom: 20px; font-size: 21px; line-height: 26px; }
}

.tl-ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 359px) { .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pills .pill-variant { display: none; }
.pill { display: grid; align-content: center; min-width: 0; min-height: 46px; padding: 4px 12px; border: 0; border-radius: 16px; text-align: left; }
.pill-k { font-size: 11px; line-height: 14px; }
.pill-v { font-size: 14px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 389px) { .pill-v { font-size: 13px; } }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-l { flex: none; font-size: 12.5px; }
.look-row .row-l { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.row .chips { flex: 1; }
.chip { position: relative; flex: none; display: inline-flex; }
/* On a phone what prints stays one row (five chips with Photo): it scrolls sideways where they do not all fit. */
@media (max-width: 959px) {
  .look-row .chips { flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .look-row .chip input:focus-visible + span, .look-row button.chip:focus-visible { outline-offset: -3px; }
  .look-row .chip > span, .look-row button.chip { justify-content: center; min-width: 44px; padding: 0 7px; }
}
.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 12px; border: 0; border-radius: 999px; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.sw-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.ready { flex-direction: column; align-items: flex-start; gap: 6px; }
.fits { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border-radius: 14px; font-size: 14px; }
.ok-tick { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; }
.ok-tick::after { content: ""; position: absolute; left: 6px; top: 3.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.more-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.more-choices .pill-variant { flex: 1 1 140px; }
[data-tool]:not([data-styles]) .pill-variant { display: none !important; }
.unit-row { display: flex; align-items: center; gap: 8px; }
.units { display: flex; gap: 2px; padding: 3px; border-radius: 999px; }
.unit { position: relative; display: inline-flex; }
.unit input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.unit > span[aria-hidden] { display: grid; place-items: center; min-width: 44px; min-height: 40px; padding: 0 10px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.more-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 16px; text-align: left; font-size: 15px; }
.more-row small { min-width: 0; font-size: 12.5px; line-height: 16px; text-align: right; }

/* The bar: stuck to a phone's foot (How to fold, Download PDF, the SVG); the foot of the right-hand column wide. */
.bar { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 6px; margin: 2px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) max(6px, env(safe-area-inset-bottom)); }
.print-tip { grid-column: 1 / -1; font-size: 12.5px; line-height: 15px; text-align: center; text-wrap: balance; }
.bar-notes { grid-column: 1 / -1; display: grid; gap: 4px; }
.bar-notes:not(:has(.feedback)):has(.status:empty) { display: none; }
.files { display: none; }
.btn2, .btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; font-size: 16px; }
.btn-primary { font-size: 17px; }
.fold-btn .fold-l, .fold-btn .fold-n { display: none; }
.svg-btn { font-size: 14px; }
.play { flex: none; width: 0; height: 0; border-left: 9px solid; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }
.tl-view > .note { margin: 0; }
.note, .status { font-size: 14px; line-height: 1.35; }
.note:empty, .status:empty, .outside:empty { display: none; }

/* 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; }
/* Closing, it lets taps through to what it uncovers. */
.sheetbox:not([data-shown]) { pointer-events: none; }
.sb-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 4px 18px; }
.sb-title { font-size: 19px; }
.sb-title:focus { outline: none; }
.btn-done { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; font-size: 15px; }
.sb-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 10px 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 14px; border: 0; border-radius: 14px; 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; margin-left: auto; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.opt-d + .opt-c { margin-left: 0; }
.opt[aria-pressed="true"] .opt-c, .opt:has(input:checked) .opt-c { opacity: 1; }
.max-line { padding: 0 4px; font-size: 14px; }
.lbl { display: block; margin: 0 0 6px; font-size: 13px; }
.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 14px 14px; border-radius: 18px; }
details.more-item { padding: 0 14px; }
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; }
.more-item summary::-webkit-details-marker, .need summary::-webkit-details-marker { display: none; }
.more-item summary small { min-width: 0; font-size: 13px; 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; }
/* Photo: the face picked, drawn upright with its picture (dragged, pinched); then its controls */
.photo-edit { height: 200px; border-radius: 16px; overflow: hidden; touch-action: none; cursor: grab; }
.photo-edit:active { cursor: grabbing; }
.pe-svg { display: block; width: 100%; height: 100%; }
.photo-row, .photo-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-ctl { display: grid; gap: 10px; }
.photo-size { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; min-height: 44px; }
.photo-size input { width: 100%; min-height: 44px; margin: 0; }
.photo-panel .dot { display: none; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; }
.photo-panel .chip[data-has] .dot { display: inline-block; }
.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; border-radius: 12px; 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; border-radius: 10px; 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; border-radius: 10px; 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; border-radius: 10px; 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; border-radius: 999px; }
.need-none { font-size: 14px; }

/* "Did it work?" (src/app/feedback.ts) */
.feedback { position: relative; display: grid; gap: 8px; padding: 10px 48px 10px 12px; border-radius: 16px; }
.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; border-radius: 999px; }
.feedback-close { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; 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 18px; }
.layer-title { font-size: 21px; }
.btn-close { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; 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; border-radius: 20px; }
.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; }
.film-bar { display: flex; align-items: center; gap: 12px; }
.film-play { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; font-size: 15px; }
.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; border-radius: 14px; 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: 19px; }
.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; border-radius: 999px; }
.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: 19px; 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): its perspective is PERSPECTIVE there */
.pv { perspective: 1700px; perspective-origin: 50% 45%; overflow: visible; }
.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: 26px; 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; } }

/* ---- The home page's heading ---- */
.hero { padding-top: 2px; padding-bottom: 4px; }
.hero h1 { font-size: 20px; line-height: 1.04; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; }
.hero .lede, .badges, .family { display: none; }
.badges { gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.badges li { padding: 5px 13px; border-radius: 999px; font-size: 13px; }

/* ---- Below the tool: the page ---- */
h1.display, .display { line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.lede { max-width: 54ch; font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.band { padding-top: 48px; }
@media (min-width: 900px) { .band { padding-top: 64px; } }
.sh { margin-bottom: 16px; }
.sh h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.sh p { margin-top: 8px; max-width: 56ch; text-wrap: pretty; }
.sh h2 small { margin-left: 6px; font-size: 14px; letter-spacing: 0; }
.catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 900px) { .catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1200px) { .catalog { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.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; width: 100%; min-width: 0; border-radius: 22px; overflow: hidden; text-decoration: none; }
.catalog .tile-art { position: relative; display: block; min-width: 0; aspect-ratio: 1 / 0.82; }
.catalog .tile-img { left: 19%; top: 11%; width: 62%; height: 76%; }
.tile-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 0 14px 13px; }
.catalog .tile-name { min-width: 0; overflow-wrap: break-word; font-size: 15px; line-height: 1.15; }
.tile-size { max-width: 100%; overflow-wrap: anywhere; font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* How it is made: the workbench film (src/app/bench.ts, its drawing styles loaded with it) over three steps, a drawing
   and a line each. Every frame holds its size before the drawings come in. */
.bench { position: relative; display: grid; gap: 8px; padding: 30px 6px 12px; border-radius: 26px; overflow: hidden; }
.bench-stage { aspect-ratio: 820 / 500; touch-action: pan-y; }
.bench-read { min-height: 212px; margin: 0 6px; }
.bench-ctl { min-height: 65px; margin: 0 6px; }
@media (max-width: 640px) { .bench-stage { aspect-ratio: 400 / 460; } }
@media (min-width: 641px) { .bench { padding: 36px 14px 14px; } .bench-stage { max-height: 600px; } }
@media (min-width: 900px) { .bench-read { position: absolute; top: 36px; right: 18px; width: 236px; min-height: 0; margin: 0; } }
.how { display: grid; gap: 12px; list-style: none; margin: 14px 0 0; padding: 0; counter-reset: how; }
.how li { display: grid; align-content: start; gap: 12px; padding: 8px 8px 16px; border-radius: 22px; counter-increment: how; }
.how-fig { aspect-ratio: 360 / 250; border-radius: 16px; overflow: hidden; }
.how p { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; margin: 0 8px; font-size: 15px; text-wrap: pretty; }
.how p::before { content: counter(how); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; }
@media (min-width: 720px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.good { margin-top: 18px; font-size: 14.5px; }
.good h3 { font-size: 15px; }
.good ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; max-width: 76ch; }
.good li { position: relative; padding-left: 22px; }
.good li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 9px; border-radius: 3px; }
/* A table of real sizes under the tool (src/pages/measures.ts): a card of rows; under 560 px each row stacks its cells,
   the thing's name first, so nothing scrolls sideways. */
.measure-card { border-radius: 22px; overflow: hidden; }
.sizes { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.4; }
.sizes th, .sizes td { padding: 11px 16px; text-align: left; vertical-align: top; }
.sizes thead th { font-size: 13px; }
.sizes td { font-variant-numeric: tabular-nums; }
.sizes .src { font-size: 13px; }
@media (max-width: 559px) {
  .sizes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sizes tr { display: grid; gap: 2px; padding: 12px 16px; }
  .sizes th, .sizes td { padding: 0; }
  .sizes td[data-l]::before { content: attr(data-l) " · "; font-size: 13px; }
}
.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 18px; border-radius: 999px; 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; 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; font-size: clamp(30px, 4.4vw, 44px); }
.lead-text { font-size: 18px; line-height: 1.5; }
.updated { font-size: 14px; }
/* A box page's last line: the day its words last changed and how the templates are checked. */
.foot-updated { padding-top: 16px; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; text-decoration: none; }
.lost { max-width: 240px; margin: 20px 0; }
/* The sources of the ready-made sizes: one small line that opens. */
.sources { padding-top: 32px; font-size: 14px; }
.sources summary { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; cursor: pointer; }
.sources ol { max-width: 64ch; padding-left: 20px; margin: 4px 0 0; display: grid; gap: 8px; }

/* Footer: the mark and a line, the most searched templates, the site */
.site-footer { margin-top: 64px; }
.foot { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 16px; }
@media (min-width: 900px) { .foot { grid-template-columns: 1.1fr 1.5fr 0.6fr; } }
.foot-brand p { margin-top: 10px; max-width: 36ch; font-size: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; columns: 2; font-size: 14px; }
.foot-legal ul { columns: 1; }
@media (max-width: 899px) { .foot-legal ul { display: flex; flex-wrap: wrap; column-gap: 20px; } }
.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: 13px; }

/* 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; }
  .oc { min-height: 44px; }
  .oc input { height: 44px; }
  .unit > span[aria-hidden] { min-height: 44px; }
  .nst { width: 44px; height: 44px; }
}

/* ---- A wide screen: the heading and its line over the tool; the box large on the left with the sheet as it prints
   beside it, everything else in one column on the right, Download PDF at its foot. ---- */
@media (min-width: 720px) {
  .tl-title { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; padding-top: 4px; padding-bottom: 14px; }
  .tl-title .intro { display: contents; }
  .tl-title h1 { font-size: clamp(30px, 3.3vw, 42px); letter-spacing: -0.02em; padding-right: 20px; }
  .tl-title .lede { display: block; max-width: none; padding-bottom: 6px; font-size: 15px; }
  /* A box made to sell: its badge under the line, in the room the row leaves below it, so nothing moves. */
  .tl-title .lede-wrap { position: relative; container-type: inline-size; }
  .tl-title .badges { display: none; position: absolute; left: 0; top: calc(100% - 3px); margin: 0; }
  .tl-title .badges li { padding: 0; border-radius: 0; font-size: 12.5px; line-height: 14px; white-space: nowrap; }
  @container (min-width: 184px) { .tl-title .badges { display: flex; } }
  .change-box { min-height: 48px; padding: 7px 18px 7px 7px; font-size: 15px; }
  .hero { padding-top: 8px; padding-bottom: 14px; }
  .hero h1 { font-size: clamp(40px, 4.4vw, 62px); letter-spacing: -0.025em; }
  .hero h1 em { display: block; }
  .hero .lede { display: block; margin-top: 14px; max-width: 44ch; font-size: 17px; }
  .badges { display: flex; flex-wrap: wrap; }
  .family { position: relative; height: 230px; }
  .family::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 4px; height: 60px; border-radius: 50%; }
  .fam { position: absolute; bottom: 22px; display: block; }
  .fam-img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
  .fam-pyramid { left: 0; width: 22%; height: 110px; }
  .fam-lid { left: 14%; width: 30%; height: 120px; }
  .fam-tuck { left: 39%; width: 17%; height: 200px; }
  .fam-gable { left: 55%; width: 19%; height: 160px; }
  .fam-pillow { left: 70%; width: 30%; height: 96px; }
  .strip { padding: 4px var(--gutter) 10px; }
  .strip .tile { grid-template-rows: 62px auto; min-width: 80px; }
  .strip .tile-art { width: 80px; height: 62px; border-radius: 18px; }
  .strip .tile-name { font-size: 12.5px; }
}
@media (min-width: 960px) {
  .photo-edit { height: 260px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 560px); align-items: center; gap: 40px; padding-bottom: 10px; min-height: 250px; }
  .family { display: block; }
  .tl { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 30vw, 400px); grid-template-rows: auto auto auto auto auto auto auto auto minmax(0, 1fr) auto; column-gap: 24px; row-gap: 0; height: calc(100svh - 64px - var(--above, 90px)); min-height: 620px; max-height: 1000px; position: relative; }
  .tool:has(.tl-pick) .tl { --above: 0px; height: 700px; min-height: 0; }
  .tl-view, .tl-ctl { display: contents; }
  .stagewrap { grid-column: 1; grid-row: 1 / -1; min-height: 0; }
  .stage { height: 100%; border-radius: 36px; }
  .stage-still { width: 40%; height: 64%; }
  .size { grid-column: 2; grid-row: 1; margin-bottom: 12px; padding: 14px 14px 12px; }
  .tl-view > .note { grid-column: 2; grid-row: 2; margin-bottom: 12px; }
  .pills { grid-column: 2; grid-row: 3; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .pills .pill-variant { display: grid; }
  .pills .pill:nth-child(3):last-child, [data-tool]:not([data-styles]) .pills .pill:nth-child(3) { grid-column: 1 / -1; }
  .look-row { grid-column: 2; grid-row: 4; margin-bottom: 10px; }
  .ready { grid-column: 2; grid-row: 5; margin-bottom: 10px; }
  .fits { grid-column: 2; grid-row: 6; margin-bottom: 10px; }
  .more-choices { display: none; }
  .more-row { grid-column: 2; grid-row: 8; min-height: 44px; }
  .bar { grid-column: 2; grid-row: 10; position: relative; bottom: auto; grid-template-columns: 1fr; gap: 8px; margin: 12px 0 0; padding: 0; }
  .look-row .row-l, .ready .row-l { display: block; }
  .chip > span, button.chip { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
  .ch { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 2px; }
  .lab { font-size: 13px; }
  .units .unit > span[aria-hidden] { min-width: 38px; min-height: 28px; font-size: 12.5px; }
  .size-row > .st { display: none; }
  .nums { gap: 6px; }
  .num { flex: 1 1 0; max-width: none; padding: 5px 4px; }
  .nst { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; }
  .num input { height: 40px; padding: 0 2px; font-size: clamp(22px, 2vw, 28px); line-height: 40px; }
  /* The name under the whole box, − and + included, so a long one (Deck thickness, Profundidade) is not cut. */
  .num-in { position: static; }
  .num-l { bottom: -15px; font-size: 12px; }
  .size { padding-bottom: 28px; }
  .pill { min-height: 56px; padding: 8px 14px; }
  .pill-k { font-size: 11.5px; }
  .pill-v { font-size: 15px; }
  .print-tip { order: 9; font-size: 12.5px; }
  .files { display: flex; flex-wrap: wrap; gap: 6px; }
  .file { position: relative; display: inline-flex; }
  .file input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .file > span { display: inline-block; min-height: 30px; line-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer; }
  .btn-primary { order: 2; min-height: 52px; }
  .fold-btn { order: 3; min-height: 48px; }
  .fold-btn .fold-l, .fold-btn .fold-n { display: inline; }
  .fold-btn .fold-s, .svg-btn { display: none; }
  .fold-n { font-size: 13px; }
  .bar-notes { order: 4; }
  .scrim { display: none; }
  .sheetbox { position: absolute; grid-column: 2 / 3; grid-row: 4 / -1; inset: -8px -6px -6px -6px; transform: translateX(12px); opacity: 0; transition: transform 0.18s ease, opacity 0.18s ease; border-radius: 24px; }
  .sheetbox[data-shown] { transform: none; opacity: 1; }
  .sb-h { padding: 14px 12px 6px 20px; }
  .sb-b { padding: 4px 12px 16px; }
  .viewbar { left: 18px; right: 18px; top: 18px; }
  .pv-frame { inset: 76px 40px 44px 150px; }
  .fan { width: 238px; height: 156px; }
  .fan-cards { border-radius: 0 0 0 36px; }
  .card-sw { left: 94px; bottom: -40px; width: 48px; height: 154px; }
  .card-sw::before { left: 8px; right: 8px; }
  .fan-name { display: block; position: absolute; z-index: 3; left: 246px; bottom: 20px; padding: 4px 11px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
  .look-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ready { flex-direction: row; align-items: center; gap: 8px; }
  .look-row .row-l { width: auto; }
  .dim-label { padding: 3px 10px 3px 9px; }
  .dim-label i { display: inline; }
  .layer { width: min(960px, calc(100vw - 48px)); height: auto; max-height: min(860px, calc(100vh - 48px)); margin: auto; border-radius: 28px; }
  .howto-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; padding: 0 16px 20px; }
  .measure-layer { width: min(1180px, calc(100vw - 48px)); }
  .measure-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
/* Room for the sheet as it prints beside the box. */
@media (min-width: 1240px) {
  .stagewrap { padding-right: 200px; }
  .viewbar { right: 218px; }
  .setof { right: 218px; }
  .nc-net { display: block; width: 100%; height: 100%; object-fit: contain; }
  .nc-sheet { display: grid; place-items: center; aspect-ratio: 0.85; }
  .netcard { display: block; position: absolute; z-index: 0; right: 0; top: 50%; width: 248px; padding: 16px 16px 14px 46px; border-radius: 24px; transform: translateY(-50%) rotate(2.5deg); }
  [data-flat] .netcard { opacity: 0; visibility: hidden; }
  .stage { z-index: 1; }
  .nc-head { margin: 0 0 8px; font-size: 13px; }
  .netcard .legend { flex-wrap: nowrap; gap: 10px; font-size: 11.5px; }
}
@media (min-width: 960px) and (max-height: 720px) { .tl { height: auto; min-height: 640px; } }

/* Skin "swatch" (design B, Swatch book): a pale lilac-grey page, white rounded cards ringed by a hairline, coloured
   cardstock (eight card colours, each with its inside, its edge and a pale tint), rounded type: Fredoka for headings,
   numbers and the main buttons, Nunito for the rest, both self-hosted (web/fonts/, OFL, Latin and Spanish only). The
   chosen thing is ink-dark; depth is a soft shadow. Everything visual lives here; web/base.css holds the structure. */
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 600; font-display: optional; src: url("/assets/fredoka-600.b2cf6ce475.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2002, U+2009, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2153-215E, U+2190-2193, U+2212; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: optional; src: url("/assets/nunito.0815999ea8.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2002, U+2009, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2153-215E, U+2190-2193, U+2212; }
/* Both preloaded and shown only if they arrive before the first paint (optional, never swapped in later: a swap moved the
   chips by a few pixels, Arial drawn to size or not); else Arial (Liberation Sans or Arimo, its metric twins, on Linux and ChromeOS) drawn to their size for that page,
   the fonts cached for the next. */
@font-face { font-family: "Fredoka fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 100.9%; ascent-override: 96.5%; descent-override: 23.4%; line-gap-override: 0%; }
@font-face { font-family: "Nunito fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 102.5%; ascent-override: 98.6%; descent-override: 34.4%; line-gap-override: 0%; }

:root {
  color-scheme: light;
  --bg: #F4F2F8;
  --card: #FFFFFF;
  --ink: #2A2540;
  --muted: #625D7C;
  --rule: #E6E2EF;
  --soft: #F6F4FA;
  --ok: #3A7246;
  --ok-t: #E3EFE0;
  --focus: #6E5C9E;
  --display: "Fredoka", "Fredoka fallback", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Nunito", "Nunito fallback", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font: var(--body);
  --ring: 0 0 0 1px var(--rule);
  --lift: 0 0 0 1px var(--rule), 0 18px 40px -24px rgba(42, 37, 64, 0.35);
  /* The card colours: the card, its inside, its edge, its pale tint. */
  --sky: #A8C9E8; --sky-in: #DCEAF7; --sky-e: #58809F; --sky-t: #E4EEF8;
  --lilac: #C9B9EA; --lilac-in: #EAE2F8; --lilac-e: #7A68A6; --lilac-t: #EEE9FA;
  --rose: #EDB3C1; --rose-in: #F9E0E6; --rose-e: #A9667A; --rose-t: #FAE6EB;
  --peach: #F2B593; --peach-in: #FBDFCD; --peach-e: #B4704C; --peach-t: #FCE7DA;
  --butter: #F2D589; --butter-in: #FAEDC4; --butter-e: #A98A33; --butter-t: #FBF2D6;
  --sage: #A9C7A3; --sage-in: #DCEBD8; --sage-e: #5F8559; --sage-t: #E6F0E3;
  --kraft: #CFA57A; --kraft-in: #ECD3B3; --kraft-e: #8A6239; --kraft-t: #F3E8DB;
  --white: #FBFAF8; --white-in: #F1EEEA; --white-e: #9A938C; --white-t: #EEEDF1;
  /* The fold preview's lines while it lies flat */
  --pv-cut: #D2463A;
  --pv-fold: #3A332E;
}

/* A card colour: on a tile, on the stage and on the box (data-tone on tiles, data-card on the tool) */
[data-tone="sky"], [data-card="sky"], [data-sw="sky"] { --c: var(--sky); --ci: var(--sky-in); --ce: var(--sky-e); --ct: var(--sky-t); }
[data-tone="lilac"], [data-card="lilac"], [data-sw="lilac"] { --c: var(--lilac); --ci: var(--lilac-in); --ce: var(--lilac-e); --ct: var(--lilac-t); }
[data-tone="rose"], [data-card="rose"], [data-sw="rose"] { --c: var(--rose); --ci: var(--rose-in); --ce: var(--rose-e); --ct: var(--rose-t); }
[data-tone="peach"], [data-card="peach"], [data-sw="peach"] { --c: var(--peach); --ci: var(--peach-in); --ce: var(--peach-e); --ct: var(--peach-t); }
[data-tone="butter"], [data-card="butter"], [data-sw="butter"] { --c: var(--butter); --ci: var(--butter-in); --ce: var(--butter-e); --ct: var(--butter-t); }
[data-tone="sage"], [data-card="sage"], [data-sw="sage"] { --c: var(--sage); --ci: var(--sage-in); --ce: var(--sage-e); --ct: var(--sage-t); }
[data-tone="kraft"], [data-card="kraft"], [data-sw="kraft"] { --c: var(--kraft); --ci: var(--kraft-in); --ce: var(--kraft-e); --ct: var(--kraft-t); }
[data-tone="white"], [data-card="white"], [data-sw="white"] { --c: var(--white); --ci: var(--white-in); --ce: var(--white-e); --ct: var(--white-t); }
[data-card] { --card-c: var(--c); --card-in: var(--ci); --card-e: var(--ce); --card-t: var(--ct); }

/* Type */
h1, h2, h3, .display, .brand-name, .sb-title, .layer-title, .measure-head h4, .zoom-title, .btn-primary, .num input, .dim-label b, .nc-head, .fan-name, .tile-name, .catalog .tile-name, .lab-d, .film-cap .n, .film-stills .n, .howto-steps .n, .tile-all .tile-art b { font-family: var(--display); font-weight: 600; }
/* The strip's names in the preloaded face: in place before the first paint, so the row never shifts. */
.strip .tile-name, .all-tiles .tile-name { font-family: var(--display); font-weight: 600; }
body { font-weight: 500; }
strong, b { font-weight: 800; }
.pill-v, .chip > span, button.chip, .more-row, .seg button, .oc, .change-box, .btn2, .unit > span[aria-hidden], .file > span, .fits, .opt-l, .btn-done, .btn-close, .film-play, .need-use, .feedback-choice, .feedback-question, .season-links a, .button, .row-l, .lab, .lbl, .more-item summary, .need summary, .sources summary, .badges li, .foot-all, .measure-pdf, .measure-print, .how p { font-weight: 800; }
.pill-k, .num-l, .tile-size, .legend, .dim-label i, .print-tip, .more-row small, .more-item summary small, .opt-d, .fold-n, .lbl small, .sh h2 small { font-weight: 700; }
.how p { font-weight: 600; }

/* Page */
.skip-link { background: var(--ink); color: #fff; }
.site-header { background: var(--bg); }
.brand { color: var(--ink); }
.nav-link { color: var(--muted); font-weight: 700; }
.nav-link:hover { background: #EBE8F2; color: var(--ink); }
.lang-link { color: var(--ink); }
.lang-menu[open] .lang-link { background: #EBE8F2; }
.lang-list { background: var(--card); box-shadow: var(--lift); }
.lang-opt { color: var(--ink); font-weight: 700; }
.lang-opt:hover { background: var(--soft); }
.lang-opt[aria-current] { background: var(--soft); font-weight: 800; }
.trail { color: var(--muted); }
.trail a { color: var(--ink); }
.lede, .sh p, .sh h2 small, .hint, .updated, .need-lede, .cs-hint, .set-row small, .film-note, .measure-sub, .good, .tile-size, .pill-k, .num-l, .lab, .row-l, .print-tip, .more-row small, .opt-d, .lbl small, .more-item summary small, .fold-n, .legend, .dim-label i, .nc-head, .max-line { color: var(--muted); }
a { text-decoration-color: rgba(42, 37, 64, 0.35); }
a:hover { text-decoration-color: currentColor; }
.display em { font-style: normal; color: var(--peach-e); }
.hero .display em { color: #9A5835; }

/* The tool */
.change-box { background: var(--card); box-shadow: var(--ring); color: var(--ink); }
.change-box:hover { box-shadow: 0 0 0 1px #D6D0E4; }
.change-art { background: var(--card-t); }
.strip .tile, .all-tiles .tile { color: var(--ink); }
.strip .tile-art, .all-tiles .tile-art { background: var(--ct, var(--soft)); }
.strip .tile[aria-pressed="true"] .tile-art, .all-tiles .tile[aria-pressed="true"] .tile-art { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px #fff; }
.strip .tile:hover .tile-art, .all-tiles .tile:hover .tile-art { filter: brightness(0.98); }
.tile-all .tile-art { background: var(--card); box-shadow: var(--ring); color: var(--ink); }
.all-grp .lbl small { color: var(--muted); }
.stage { background: radial-gradient(70% 60% at 50% 42%, rgba(255, 255, 255, 0.75), transparent 70%), var(--card-t); }
.seg { background: rgba(255, 255, 255, 0.78); }
.seg button { background: transparent; color: var(--muted); font-weight: 800; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.oc { background: rgba(255, 255, 255, 0.82); color: var(--muted); }
.oc input { accent-color: var(--card-e); cursor: pointer; }
.setof { background: rgba(255, 255, 255, 0.82); color: var(--muted); font-weight: 800; }
.setof-b:hover { background: rgba(255, 255, 255, 0.9); color: var(--ink); }
.dim { fill: none; stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 1.2; stroke-linecap: round; }
.dim-ext { fill: none; stroke: var(--ink); stroke-opacity: 0.2; stroke-width: 1; }
.dim-label { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(42, 37, 64, 0.25); }
.dim-label b { font-size: 14px; line-height: 20px; }
.card-sw::before { background: var(--c); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), -1px 0 3px rgba(42, 37, 64, 0.14); }
.card-sw::after { background: #fff; opacity: 0.9; }
.card-sw:has(input:checked)::before { box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px rgba(42, 37, 64, 0.45); }
.card-sw:has(input:focus-visible)::before { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.fan-name { background: rgba(255, 255, 255, 0.85); color: var(--ink); }
.netcard { background: var(--card); box-shadow: var(--lift); }
.lg { border-top-color: var(--ink); }
.lg-glue { background: var(--card-in); box-shadow: inset 0 0 0 1px var(--card-e); }
.nc-face { fill: var(--card-t); }
.nc-glue { fill: var(--card-in); }
.nc-cut { fill: none; stroke: var(--ink); stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.nc-fold { fill: none; stroke: var(--ink); stroke-opacity: 0.5; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.lg-cut { border-top-color: var(--ink); }
.size { background: var(--card); box-shadow: var(--ring); }
.units { background: var(--soft); }
.unit > span[aria-hidden] { color: var(--muted); }
.unit input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(42, 37, 64, 0.18); }
.unit input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 1px; }
.more-choices .units { background: var(--card); box-shadow: var(--ring); }
.more-choices .unit input:checked + span { background: var(--ink); color: #fff; }
.st, .nst { background: #fff; color: var(--ink); box-shadow: var(--ring); }
.st:hover, .nst:hover { background: var(--soft); }
.st.at-end, .nst.at-end { color: #A9A4BD; }
.num { background: transparent; }
.num[data-on] { background: var(--soft); }
.num input { background: transparent; color: var(--ink); }
.num input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--lilac-e); }
.num input[aria-invalid] { box-shadow: inset 0 0 0 2px var(--pv-cut); }
.num[data-on] .num-l { color: var(--ink); }
.pill { background: var(--card); box-shadow: var(--ring); color: var(--ink); }
.pill:hover { box-shadow: 0 0 0 1px #D6D0E4; }
.pill[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--ink); }
.chip > span, button.chip { background: var(--card); box-shadow: var(--ring); color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.chip input:checked + span .sw-dot { box-shadow: 0 0 0 1.5px #fff; }
.chip input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.chip > span:hover, button.chip:hover { box-shadow: 0 0 0 1px #D6D0E4; }
.sw-dots { background: radial-gradient(circle, var(--peach-e) 30%, transparent 33%) 0 0 / 6px 6px, var(--peach-in); }
.sw-stripes { background: repeating-linear-gradient(45deg, var(--sky) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px rgba(42, 37, 64, 0.12); }
.panel .chip > span, .panel button.chip { background: var(--soft); box-shadow: none; }
.fits { background: var(--ok-t); color: var(--ok); }
.ok-tick { background: var(--ok); }
.more-row { background: var(--card); box-shadow: var(--ring); color: var(--ink); }
.more-row:hover { box-shadow: 0 0 0 1px #D6D0E4; }
.more-row[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--ink); }
.bar { background: rgba(244, 242, 248, 0.94); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--rule); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 18px -10px rgba(42, 37, 64, 0.8); }
.btn-primary:hover { background: #3A3456; }
.btn2 { background: var(--card); box-shadow: var(--ring); color: var(--ink); font-weight: 800; }
.btn2:hover { box-shadow: 0 0 0 1px #D6D0E4; }
.play { border-left-color: var(--peach-e); }
.file > span { background: var(--card); box-shadow: var(--ring); color: var(--muted); }
.file input:checked + span { background: var(--lilac-t); color: var(--ink); box-shadow: 0 0 0 1.5px var(--lilac-e); }
.file input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.status, .note { color: var(--ink); }
.note:not(:empty) { padding: 8px 12px; border-radius: 14px; background: var(--lilac-t); color: var(--ink); }

/* The lists */
.scrim { background: rgba(42, 37, 64, 0.1); }
.sheetbox { background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -6px 28px rgba(42, 37, 64, 0.14); }
.btn-done { background: var(--ink); color: #fff; }
.opt { background: transparent; color: var(--ink); }
.opt-c { stroke: var(--ink); }
.opt[aria-pressed="true"], .opt:has(input:checked) { background: var(--soft); box-shadow: inset 0 0 0 2px var(--ink); }
.opt:has(input:focus-visible) { outline: 2.5px solid var(--focus); outline-offset: -2px; }
.opt:hover:not([aria-pressed="true"]) { background: var(--soft); }
.reset, .link { color: var(--ink); }
.lbl { color: var(--ink); }
.more-item { background: var(--soft); }
.photo-edit { background: var(--soft); }
.photo-edit:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.pe-face { fill: var(--card-c); }
.pe-ghost { opacity: 0.25; }
.pe-cut { fill: none; stroke: var(--pv-cut); stroke-width: 1.5; }
.photo-size input { accent-color: var(--ink); }
.photo-panel .dot { background: var(--ink); }
.photo-panel .chip input:checked + span .dot { background: #fff; }
[data-photos] .photo-chip { background: var(--ink); color: #fff; box-shadow: none; }
.more-item summary::after, .need summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); 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(--ring); }
.swatch { box-shadow: inset 0 0 0 1px rgba(42, 37, 64, 0.2); }
.ink input:checked + .swatch { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.ink input:focus-visible + .swatch { outline: 2.5px 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 { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px #D3CDE0; }
.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(--lilac-e); }
.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: #ABA6BE; }
.tick input { accent-color: var(--ink); }
.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 { background: var(--card); color: var(--ink); box-shadow: var(--ring); }
.need-size b { font-size: 20px; }
.feedback { background: var(--lilac-t); color: var(--ink); }
.feedback-choice { background: var(--card); color: var(--ink); box-shadow: var(--ring); }
.feedback-close { color: var(--ink); }

/* Over the page */
.layer { background: var(--bg); color: var(--ink); }
.layer::backdrop { background: rgba(42, 37, 64, 0.3); }
.btn-close { background: var(--card); color: var(--ink); box-shadow: var(--ring); }
.film-screen { background: var(--card); box-shadow: var(--ring); }
.film-cap .n, .film-stills .n, .howto-steps .n { background: var(--peach); color: var(--ink); }
.film-play { background: var(--ink); color: #fff; }
.film-stills figure { border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: var(--ring); }
.howto-steps button { background: var(--card); color: var(--ink); }
.howto-steps button[aria-current] { background: var(--peach-t); color: var(--ink); box-shadow: inset 0 0 0 2px var(--peach-e); }
.measure-close { border-radius: 12px; background: none; color: var(--ink); }
.measure-pdf { background: var(--ink); color: #fff; }
.measure-print { background: var(--card); color: var(--ink); box-shadow: var(--ring); }
.measure-view { border-radius: 16px; background: #fff; box-shadow: var(--ring); }
.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(--ring); }
.zoom-svg { box-shadow: var(--ring); }

/* The fold preview: the card in its colour (what prints on it shows instead), insides paler, edges in the card's dark
   shade once it stands, a soft light across each face and a shadow on the table. Flat, the cut and fold lines. */
.pv-fill { fill: var(--pv-out, var(--card-c)); stroke: var(--card-e); stroke-width: 1.2; stroke-linejoin: round; stroke-opacity: calc(var(--pv-p, 0) * 0.85); }
.pv-smooth .pv-fill { stroke: none; }
.pv-face.pv-in .pv-fill { fill: var(--card-in); }
.pv-face.pv-in .pv-pattern, .pv-face.pv-in .pv-label { display: none; }
.pv-glue .pv-fill { fill: var(--pv-out, var(--card-c)); }
.pv-wrap { display: none; }
.pv-label { fill: var(--pv-label); font-family: Helvetica, Arial, sans-serif; font-weight: 700; }
.pv-grad { opacity: var(--pv-p, 0); pointer-events: none; }
.g0 { stop-color: #fff; stop-opacity: 0.28; }
.g1 { stop-color: #5A3040; stop-opacity: 0.08; }
.pv-shade { fill: #5B2F3C; fill-opacity: calc(var(--sh, 0) * 1.05); }
.pv-cut, .pv-fold { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: calc(1 - var(--pv-p, 0) * 0.9); }
.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(--ink); stroke-width: 3; stroke-opacity: 1; }
.pv-shadow { background: radial-gradient(closest-side, color-mix(in srgb, var(--card-e) 45%, transparent), transparent); filter: blur(5px); margin-left: 12px; }
.pv-sheet { background: #fff; border-radius: 4px; box-shadow: 0 2px 14px rgba(42, 37, 64, 0.1); opacity: calc(1 - var(--fold, 0) * 1.6); }
.film-canvas, .film-stills { --wrap: var(--card-c); }

/* Below the tool */
.catalog .tile { background: var(--ct, var(--soft)); color: var(--ink); transition: transform 0.2s; }
.catalog .tile:hover { transform: translateY(-2px); }
.catalog .tile-name { color: var(--ink); }
.bench { background: radial-gradient(120% 90% at 40% 30%, var(--card) 35%, var(--ct, var(--soft)) 100%); box-shadow: var(--lift); }
.how li { background: var(--card); box-shadow: var(--lift); }
.how-fig { background: radial-gradient(110% 90% at 50% 35%, var(--card) 30%, var(--soft) 100%); box-shadow: inset 0 0 0 1px var(--rule); }
.how p::before { background: var(--ink); color: var(--card); font-family: var(--display); font-weight: 600; }
.good h3 { color: var(--ink); }
.good li::before { background: var(--peach); }
.good li:nth-child(2)::before { background: var(--sky); }
.good li:nth-child(3)::before { background: var(--sage); }
.measure-card { background: var(--card); box-shadow: var(--lift); }
.sizes thead th { color: var(--muted); font-weight: 800; border-bottom: 1px solid var(--rule); }
.sizes tbody tr + tr { border-top: 1px solid var(--rule); }
.sizes tbody th { font-family: var(--display); font-weight: 600; color: var(--ink); }
.sizes .src, .sizes td[data-l]::before { color: var(--muted); }
.season-links a { background: var(--card); box-shadow: var(--ring); color: var(--ink); }
.season-links a:hover { box-shadow: 0 0 0 2px var(--ink); }
.badges li { background: var(--card); box-shadow: var(--ring); color: var(--ink); font-weight: 800; }
.tl-title .badges li { background: none; box-shadow: none; color: var(--ok); }
.family::before { background: radial-gradient(closest-side, rgba(201, 185, 234, 0.55), transparent); }
.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 { background: var(--ink); color: #fff; font-weight: 800; }
.sources { color: var(--muted); }
.site-footer { box-shadow: 0 -1px 0 var(--rule); color: var(--ink); }
.foot-brand p, .legal-line, .foot .lbl { color: var(--muted); }
.foot .lbl { font-size: 13px; }

/* The closed boxes drawn inline (Open Graph cards, the Christmas pages' figures) in peach card */
.b-out { fill: var(--peach); }
.b-in { fill: var(--peach-in); }
.b-glue { fill: var(--peach); }
.b-shade { fill: #5B2F3C; opacity: 0.62; }
.b-dot, .pv-dot { fill: #2A2540; }
.b-edge { fill: none; stroke: var(--peach-e); stroke-width: 0.9px; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.b-floor { fill: var(--peach-e); fill-opacity: 0.18; }

@media (min-width: 960px) {
  .sheetbox { border-radius: 24px; box-shadow: 0 0 0 1px var(--rule), 0 16px 44px rgba(42, 37, 64, 0.16); }
  .bar { background: none; backdrop-filter: none; box-shadow: none; }
  .btn2 { font-weight: 800; }
}
.sources a, .foot-updated a { color: var(--ink); }
