/* Huisje: warm tile-white, cobalt, a soft serif. Phone first (360 × 640), fine on a tablet and a desktop. */
@font-face { font-family: Huisje; src: url(fonts/huisje-serif.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Huisje; font-style: italic; src: url(fonts/huisje-serif-italic.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  --ink: #1c3d8c; --ink2: #2f4f9e; --paper: #fbf9f3; --wash: #dfe6f5; --wash2: #8fa8da; --text: #1d2440; --muted: #56607d;
  --line: #cfd7ea; --ok: #2c6e49; --bad: #9b2c2c;
  --serif: Huisje, Georgia, 'Times New Roman', serif; --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --t: min(54vw, 200px, 29vh);
  --shop-bubble: var(--ink); --shop-bubble-fill: var(--wash); /* the shop bar's chat bubble, on our shelf */
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--text); font: 16px/1.45 var(--sans); display: flex; flex-direction: column;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px; background-position: -1px -1px; background-attachment: fixed; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(251,249,243,0.94) 40%, rgba(251,249,243,0.78)); pointer-events: none; z-index: -1; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--ink); }

.top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; height: 52px; }
.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); font: 600 22px/1 var(--serif); letter-spacing: 0.01em; }
.brand svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.brand .d { fill: var(--ink); stroke: none; }
.steps { flex: 1; display: flex; justify-content: center; gap: 6px; }
.steps i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); transition: background .3s, transform .3s; }
body[data-screen="build"] .steps [data-s="build"], body[data-screen="paint"] .steps [data-s="paint"], body[data-screen="done"] .steps [data-s="paint"],
body[data-screen="order"] .steps [data-s="order"] { background: var(--ink); transform: rotate(45deg); }
body[data-screen="pick"] .steps, body[data-screen="start"] .steps, body[data-screen="status"] .steps { visibility: hidden; }
.langs { display: flex; gap: 2px; }
.langs button { min-width: 34px; min-height: 36px; border: 0; background: none; border-radius: 8px; font: 600 13px var(--sans); color: var(--muted); padding: 4px 6px; }
.langs button[aria-pressed="true"] { background: var(--wash); color: var(--ink); }
.snd { width: 44px; height: 44px; border: 0; background: none; padding: 9px; border-radius: 10px; }
.snd svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.snd .spk { fill: var(--ink); }
.snd[data-muted="true"] .on, .snd[data-muted="false"] .off { display: none; }

main { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 0 16px 16px; display: flex; flex-direction: column; }

/* ---- the stage: the tile on its stand */
.stage { position: relative; display: grid; justify-items: center; margin: 4px auto 6px; transition: margin .5s; }
body[data-screen="build"] { --t: min(78vw, 300px, 40vh); }
body[data-screen="paint"] { --t: min(86vw, 340px, 56vh); }
body[data-screen="done"] { --t: min(72vw, 290px, 46vh); }
body[data-screen="order"], body[data-screen="status"] { --t: min(40vw, 150px); }
.tile { position: relative; width: var(--t); height: var(--t); border-radius: calc(var(--t) * 0.008); overflow: hidden; background: #fff;
  box-shadow: 0 1px 0 #fff inset, 0 2px 3px rgba(20,30,60,.18), 0 10px 26px -10px rgba(20,30,60,.35); transition: width .55s cubic-bezier(.3,1.4,.5,1), height .55s cubic-bezier(.3,1.4,.5,1), transform .5s, box-shadow .5s; touch-action: pan-y; }
.tile canvas { width: 100%; height: 100%; display: block; }
.flip { position: relative; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.3,1.25,.5,1); transform-style: preserve-3d; }
.flip canvas { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: inherit; }
.flip .back { transform: rotateY(180deg); }
.tile .back { display: none; }
/* the card: A6 landscape on the table, a soft shadow; it turns over to its postcard back */
body[data-product="cards"] { --cw: min(calc(var(--t) * 1.32), 92vw, 420px); }
body[data-product="cards"][data-screen="build"] { --cw: min(calc(var(--t) * 1.15), 86vw, 380px); }
body[data-product="cards"] .tile { width: var(--cw); height: calc(var(--cw) * 1110 / 1540); border-radius: 4px; overflow: visible; perspective: 1400px;
  background: none; box-shadow: none; }
body[data-product="cards"] .flip canvas { box-shadow: 0 1px 2px rgba(20,30,60,.16), 0 14px 26px -12px rgba(20,30,60,.4); border-radius: 3px; }
body[data-product="cards"] .tile .back { display: block; }
body[data-product="cards"] .tile.turned .flip { transform: rotateY(180deg); }
body[data-product="cards"] .gloss, body[data-product="mug"] .gloss { display: none; }
/* the mug: drawn whole on its canvas (body, handle, shadow), so no tile around it */
body[data-product="mug"] .tile { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
body[data-product="cards"] .stand, body[data-product="mug"] .stand { display: none; }
body[data-product="cards"] .dim { position: static; height: auto; width: auto; border: 0; opacity: 1; margin-top: 8px; }
body[data-product="cards"] .dim span { position: static; transform: none; width: auto; display: inline; }
body[data-product="cards"]:not([data-screen="start"]):not([data-screen="done"]) .dim { display: none; }
body[data-product="mug"] .dim { border: 0; height: var(--t); right: calc(50% - var(--t) / 2 + 2px); }
body[data-product="mug"] .dim span { transform: translate(0, -50%); font-size: 13px; }
/* while the brush paints: a way straight to the finished piece */
.skip { display: none; margin: 12px auto 0; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; color: var(--ink); }
body[data-screen="paint"] .skip { display: inline-flex; align-items: center; }
/* the card's Front | Back switch, under the card */
.turn { display: none; margin: 10px auto 0; padding: 3px; gap: 2px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; }
.turn button { min-width: 84px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font-size: 14px; color: var(--ink); transition: background .2s, color .2s; }
.turn button[aria-pressed="true"] { background: var(--ink); color: #fff; }
body[data-product="cards"]:is([data-screen="start"], [data-screen="done"], [data-screen="build"], [data-screen="order"]) .turn:not([hidden]) { display: inline-flex; }
body[data-screen="build"] .turn { margin-top: 8px; }
body[data-screen="build"] .turn button { min-height: 32px; font-size: 13px; }
.others a:not([hidden]) ~ a:not([hidden])::before { content: '·'; display: inline-block; margin-right: 8px; color: var(--muted); text-decoration: none; }
body[data-product="cards"] .tile.pressing { animation: land .6s cubic-bezier(.2,.8,.3,1.2); }
@keyframes land { 0% { transform: translateY(-22px) rotate(-3deg) scale(1.04); } 60% { transform: translateY(2px) rotate(.4deg); } 100% { transform: none; } }
body[data-product="mug"] .tile.pressing { animation: setdown .5s cubic-bezier(.2,.8,.3,1.2) .2s both; }
@keyframes setdown { 0% { transform: translateY(-18px); } 70% { transform: translateY(2px); } 100% { transform: none; } }
.gloss { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 47%, transparent 58%); transform: translateX(-120%); pointer-events: none; }
.tile.sheet { box-shadow: 0 0 0 1px var(--line), 0 30px 40px -18px rgba(20,30,60,.3); }
.tile.pressing { animation: press .55s cubic-bezier(.2,.8,.3,1.2); }
.tile.pressed .gloss { animation: gloss 1.1s .1s ease-out both; }
@keyframes press { 0% { transform: translateY(-14px) scale(1.04); } 55% { transform: translateY(2px) scale(0.985); } 100% { transform: none; } }
@keyframes gloss { to { transform: translateX(120%); } }
.stand { width: calc(var(--t) * var(--stand-w)); height: 0; position: relative; pointer-events: none; transition: height .4s, opacity .3s; opacity: 0; }
.stand canvas { position: absolute; left: 0; top: calc(var(--t) * var(--stand-over) * -1); width: 100%; display: block; }
body[data-screen="start"] .stand, body[data-screen="done"] .stand.on, body[data-screen="status"] .stand { height: calc(var(--t) * var(--stand-below)); opacity: 1; }
.stand.drop { animation: standIn .45s cubic-bezier(.3,1.5,.5,1); }
@keyframes standIn { from { transform: translateY(26px); opacity: 0; } }
.dim { position: absolute; top: 0; height: var(--t); right: calc(50% - var(--t) / 2 - 26px); width: 14px; border: 1.5px solid var(--muted); border-left: 0; opacity: .7; transition: height .55s cubic-bezier(.3,1.4,.5,1), right .55s cubic-bezier(.3,1.4,.5,1); }
.dim span { position: absolute; left: 6px; top: 50%; transform: translate(0, -50%) rotate(90deg); transform-origin: center; white-space: nowrap; font: italic 500 12px var(--serif); color: var(--muted); width: 0; display: grid; justify-items: center; }
body:not([data-screen="start"]):not([data-screen="done"]) .dim { opacity: 0; }

/* in the builder the picture and its tabs stay on top while the words scroll under them (app.js measures --stage-h) */
body[data-screen="build"] .stage { position: sticky; top: 0; z-index: 3; align-self: stretch; margin: 0 -16px; padding: 4px 16px 10px; background: var(--paper); }
body[data-screen="build"] .tabs { position: sticky; top: var(--stage-h, 0px); z-index: 3; background: var(--paper); }
body[data-screen="build"] .tabs::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; margin-top: 1.5px; pointer-events: none;
  background: linear-gradient(var(--paper), rgba(251,249,243,0)); }
body[data-screen="build"][data-product="mug"] { --t: min(68vw, 260px, 38vh); }
body[data-screen="build"][data-product="cards"] .stage { padding-bottom: 4px; }
body[data-screen="pick"] .stage { display: none; }

/* ---- screens */
.screen { display: none; }
body[data-screen="pick"] .s-pick, body[data-screen="start"] .s-start, body[data-screen="build"] .s-build, body[data-screen="done"] .s-done,
body[data-screen="order"] .s-order, body[data-screen="status"] .s-status { display: block; animation: rise .45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.kicker { margin: 6px 0 2px; font: italic 500 14px var(--serif); color: var(--ink); text-align: center; }
h1 { font: 600 clamp(23px, 6.8vw, 34px)/1.08 var(--serif); color: var(--ink); margin: 2px 0 8px; text-align: center; letter-spacing: -0.01em; }
h2 { font: 600 24px/1.15 var(--serif); color: var(--ink); margin: 4px 0 6px; }
.lede { margin: 0 0 8px; font-size: 14.5px; line-height: 1.4; text-align: center; }
.price { margin: 0 0 12px; text-align: center; color: var(--muted); font-size: 14px; }
.price b { font: 600 20px var(--serif); color: var(--ink); }
.fine { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.s-start .kicker { margin: 8px 0; }
.s-start h1 { margin: 0 0 12px; }
.s-start .lede { margin: 0 0 12px; }
.s-start .price { margin: 0 0 16px; }

/* the key: the way in */
.key { display: flex; align-items: center; gap: 14px; margin: 0 auto; padding: 8px 22px 8px 8px; border: 0; border-radius: 40px; background: var(--ink); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(28,61,140,.6); transition: transform .15s; }
.key:active { transform: scale(0.97); }
.key .plate { width: 54px; height: 54px; display: block; }
.key svg { width: 100%; height: 100%; overflow: visible; }
.key .rim { fill: #f3efe3; stroke: #c9b98d; stroke-width: 3; }
.key .hole { fill: #1d2440; }
/* the key slides down into the keyhole (the blade goes in past the hole's top, #keyIn), then turns on its own axis */
.key .keyart { transform-origin: 32px 31px; transform: translateY(-16px); opacity: 0; transition: transform .35s cubic-bezier(.3,1.1,.4,1), opacity .15s; }
.key .shaft { stroke: #b3923f; stroke-width: 4; stroke-linecap: round; }
.key .bow { fill: #d9b45a; stroke: #b3923f; stroke-width: 2; }
.key .bowhole { fill: #f3efe3; }
.key .bit { fill: none; stroke: #b3923f; stroke-width: 3; }
.key.in .keyart { transform: translateY(0); opacity: 1; }
.key.turn .keyart { transform: translateY(0) scaleX(0.2); opacity: 1; transition: transform .4s cubic-bezier(.5,0,.3,1.3); }
.key .label { display: grid; text-align: left; font: 600 19px/1.1 var(--serif); }
.key small { font: 13px var(--sans); opacity: .82; }

/* builder */
.pairbar { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.pairbar button, .seg button { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; min-height: 36px; font-size: 14px; }
.pairbar button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs { display: flex; border-bottom: 1.5px solid var(--line); margin-bottom: 8px; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px 4px 7px; font: 600 16px var(--serif); color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.panel { min-height: 150px; padding-bottom: 28px; }
.row { display: flex; align-items: center; gap: 10px; margin: 6px 0; justify-content: center; }
.row .lab { min-width: 54px; font-size: 14px; color: var(--muted); }
.row output { min-width: 64px; text-align: center; font: 600 18px var(--serif); color: var(--ink); }
/* the house: labels in one column, buttons and values in shared columns, the type name box fixed so its arrows stay put */
.panel[data-panel="house"] { display: grid; grid-template-columns: max-content 44px minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.panel[data-panel="house"] > :is(.type, .hint, .styles) { grid-column: 1 / -1; }
.panel[data-panel="house"] > .row:not(.type) { display: contents; }
.panel[data-panel="house"] .lab { margin-right: 6px; }
.panel[data-panel="house"] output { min-width: 0; line-height: 1.15; }
.row.type { display: grid; grid-template-columns: 44px minmax(0, 170px) 44px; justify-content: center; gap: 0 8px; margin: 0 0 4px; }
.row.type .typename { display: contents; }
.row.type .typename small { grid-row: 2; grid-column: 1 / -1; }
.round { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 22px; line-height: 1; color: var(--ink); transition: transform .12s; }
.round:active, .chip:active { transform: scale(0.92); }
.round:disabled { opacity: .35; }
.typename { flex: 1; display: grid; text-align: center; }
.typename b { font: 600 20px/1.1 var(--serif); color: var(--ink); }
.typename small { color: var(--muted); font-size: 13px; }
.hint { text-align: center; font-size: 13px; color: var(--ink); margin: 4px 0; }

/* the product pick */
.prods { display: grid; gap: 10px; margin: 6px 0 4px; }
.prod { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff;
  text-decoration: none; color: var(--text); box-shadow: 0 6px 16px -12px rgba(20,30,60,.5); transition: transform .15s, border-color .2s; }
.prod:active { transform: scale(0.98); }
.prod canvas { width: 112px; height: auto; aspect-ratio: 1; display: block; }
.prod[data-product="cards"] canvas { aspect-ratio: 1540 / 1110; box-shadow: 0 1px 2px rgba(20,30,60,.2), 0 6px 12px -6px rgba(20,30,60,.35); border-radius: 2px; }
.prod[data-product="tile"] canvas { width: 92px; margin: 0 10px; box-shadow: 0 1px 2px rgba(20,30,60,.2), 0 6px 12px -6px rgba(20,30,60,.35); border-radius: 3px; }
.pt { display: grid; gap: 1px; }
.pt b { font: 600 21px/1.1 var(--serif); color: var(--ink); }
.pt small { font-size: 13px; color: var(--muted); }
.pp { font: 600 15px var(--serif); color: var(--ink); margin-top: 3px; }
.post { text-align: center; font-size: 13px; color: var(--ink); margin: 10px 0 0; display: none; }
body[data-product="cards"] .post { display: block; }
.others, .also { text-align: center; font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.others a, .also button { margin: 0 4px; color: var(--ink); }
.also button { border: 0; background: none; text-decoration: underline; font-size: 14px; min-height: 40px; padding: 0 2px; }
.also { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; }
.also > span { flex-basis: 100%; }
.also button:not([hidden]) { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.also canvas { width: 48px; height: 48px; filter: drop-shadow(0 2px 3px rgba(20,30,60,.2)); }
.also [data-to="cards"] canvas { height: calc(48px * 1110 / 1540); margin: calc(48px * (1 - 1110 / 1540) / 2) 0; }

/* the styles: four small swatches of the sample house */
.styles { display: flex; justify-content: center; gap: 10px; margin: 10px 0 2px; }
.styles button { display: grid; justify-items: center; gap: 3px; border: 0; background: none; padding: 0; font-size: 12px; color: var(--muted); min-width: 64px; }
.styles canvas { width: 58px; height: 58px; border-radius: 8px; box-shadow: 0 0 0 1.5px var(--line); transition: box-shadow .2s, transform .15s; }
.styles button[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.styles button[aria-checked="true"] canvas { box-shadow: 0 0 0 2.5px var(--ink); }
.styles button:active canvas { transform: scale(0.94); }

/* the words: a search, then rows of chips per group */
.search { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; padding: 0 6px 0 12px; margin: 2px 0 6px; }
.search:focus-within { border-color: var(--ink); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; min-height: 44px; font-size: 16px; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.search button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--wash); color: var(--ink); font-size: 20px; line-height: 1; flex: none; }
/* what's on the house: a count in the search, and a tap shows just those words */
.search .onhouse { width: auto; min-width: 52px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; border-radius: 999px;
  font: 600 15px var(--sans); transition: background .2s, color .2s; }
.onhouse svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.onhouse[aria-pressed="true"] { background: var(--ink); color: #fff; }
.onhouse:disabled { opacity: .45; }
.onhouse span { display: inline-block; min-width: 1ch; }
.onhouse.bump span { animation: chipPop .45s cubic-bezier(.3,1.6,.5,1); }
/* a word that made way: a line under the tapped chip for a while, over the chips below it, so nothing on the page moves */
.panel[data-panel="life"] { position: relative; }
.made { position: absolute; left: 4px; right: 4px; z-index: 4; margin: 0; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--ink);
  box-shadow: 0 8px 20px -10px rgba(20,30,60,.55); font-size: 14px; line-height: 1.35; color: var(--ink); text-align: center; pointer-events: none; transition: opacity .3s; }
.made::before { content: ''; position: absolute; top: -7px; left: calc(var(--arrow-x, 50%) - 4px - 6px); width: 12px; height: 12px; background: #fff;
  border: solid var(--ink); border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); }
.made:empty { opacity: 0; }
/* the groups: one open at a time */
.group h3 { margin: 0; font: 600 15px var(--serif); color: var(--ink); }
.grouphead { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line);
  background: none; font: inherit; color: inherit; text-align: left; }
.grouphead::after { content: ''; width: 8px; height: 8px; margin-right: 6px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.grouphead[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, 0); }
.group .chips { padding: 8px 0 10px; }
.group:is(.hits, .mine) h3 { margin: 10px 0 6px; }
.group:is(.hits, .mine) .chips { padding: 0; }
.group.hits h3 { display: none; }
.group.mine h3 { color: var(--muted); font-style: italic; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 4px 13px 4px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-size: 14px; color: var(--text); transition: background .2s, border-color .2s, color .2s; }
.chip .ic { width: 30px; height: 30px; flex: none; background: center / contain no-repeat; border-radius: 50%; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .ic { background-color: #fff; }
.chip.popped { animation: chipPop .45s cubic-bezier(.3,1.6,.5,1); }
.chip.unpopped { animation: chipOff .3s ease-out; }
.chip.letgo { animation: chipLetGo .5s ease-out; }
.chip.nope { animation: chipNope .35s ease-in-out; }
@keyframes chipPop { 0% { transform: scale(0.88); } 55% { transform: scale(1.07); } 100% { transform: none; } }
@keyframes chipOff { 50% { transform: scale(0.94); } }
@keyframes chipLetGo { 0% { background: var(--wash); transform: scale(1); } 35% { transform: scale(0.9) rotate(-2deg); } 100% { background: #fff; transform: none; } }
@keyframes chipNope { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.none { font-size: 14px; color: var(--muted); text-align: center; margin: 14px 4px; }

/* the cards' new address, and the packs */
.addr { border: 0; padding: 0; margin: 10px 0 0; }
.addr legend { font: 600 15px var(--serif); color: var(--ink); padding: 0; margin-bottom: 2px; }
.hint.off { visibility: hidden; }
.addr .hint { text-align: left; color: var(--muted); font-size: 12px; }
.packs { display: flex; gap: 8px; margin: 10px 0 0; }
.packs button { flex: 1; display: grid; justify-items: center; gap: 1px; padding: 8px 4px; min-height: 56px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--text); transition: transform .12s; }
.packs button b { font: 600 16px var(--serif); color: var(--ink); }
.packs button small { font-size: 13px; color: var(--muted); }
.packs button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); }
.packs button[aria-checked="true"] b, .packs button[aria-checked="true"] small { color: #fff; }
.packs button:active { transform: scale(0.96); }
.field { display: grid; gap: 3px; margin: 6px 0; font-size: 13px; color: var(--muted); }
.field input, .field select { width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; padding: 8px 10px; font-size: 16px; color: var(--text); }
.field input:focus, .field select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
/* iOS gives a date field in its own look a minimum width and content-box over ours, past its column: the plain look skips that */
.field input[type=date] { -webkit-appearance: none; appearance: none; }
.field input[type=date]::-webkit-date-and-time-value { text-align: left; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg { display: flex; gap: 4px; }
.seg button { flex: 1; min-height: 44px; }
.say { text-align: center; font: italic 500 15px var(--serif); color: var(--ink); margin: 6px 0 0; min-height: 22px; }
.go { position: sticky; bottom: 8px; margin-top: 10px; z-index: 2; }
.s-order .go { position: static; }
.primary { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font: 600 19px var(--serif); display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 18px -8px rgba(28,61,140,.7); transition: transform .12s, opacity .2s; }
.primary svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.primary:active { transform: scale(0.98); }
.primary:disabled { opacity: .55; }
.ghost { min-height: 44px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 14px; font-size: 15px; color: var(--ink); }
.ghost[aria-pressed="true"] { background: #1b2a52; color: #ffe6a6; border-color: #1b2a52; }
.danger { color: var(--bad); display: block; margin: 12px auto 0; }
.tools { margin-top: 4px; }
.link { display: block; margin: 10px auto 0; border: 0; background: none; color: var(--ink); text-decoration: underline; font-size: 15px; min-height: 44px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.err { color: var(--bad); font-size: 14px; margin: 8px 0; }
.err a { color: var(--bad); }
/* over the words that scroll under the paint button: on its own white */
.go .err { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--bad); text-align: center; font-weight: 600;
  box-shadow: 0 8px 20px -10px rgba(20,30,60,.5); }
.what { margin: 0 0 6px; color: var(--muted); }
a.primary { text-decoration: none; }
.added .ok { font: 600 20px var(--serif); margin: 6px 0 14px; }
.added .ghost { width: 100%; margin-top: 10px; }
.closed-note, .soon-note { display: none; padding: 10px 12px; border-radius: 10px; background: var(--wash); color: var(--ink); }
html[data-ordering="closed"] .closed-note, html[data-ordering="soon"] .closed-note, html[data-ordering="soon"] .soon-note { display: block; }
html:is([data-ordering="closed"], [data-ordering="soon"]) :is(#form, #pairBtn, #toOrder) { display: none; }
.closed-done { display: none; }
html:is([data-ordering="closed"], [data-ordering="soon"]) .closed-done { display: block; text-align: center; color: var(--ink); padding: 12px; background: var(--wash); border-radius: 12px; }
.s-status p { margin: 6px 0; }
/* under the status: a cancel taken back, "Delete my details" confirmed once (kits/payments/order.js) */
.order-actions { margin-top: 12px; }
.order-actions .link { color: var(--muted); font-size: 14px; }
.order-actions-ask { margin-top: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.order-actions-ask .primary { margin-top: 10px; }

.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 14px 16px 20px; }
.foot a { color: var(--muted); }

/* help and legal pages */
.page { max-width: 640px; margin: 0 auto; padding: 8px 18px 24px; }
.page h1 { text-align: left; font-size: 28px; }
.page details { border-top: 1px solid var(--line); padding: 10px 0; }
.page summary { font: 600 17px var(--serif); color: var(--ink); cursor: pointer; }
.stub { padding: 10px 12px; border-radius: 10px; background: var(--wash); color: var(--ink); font-size: 14px; }

@media (min-width: 760px) {
  main:not(.page) { max-width: 900px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: start; align-content: center; padding-top: 30px; }
  .stage, body[data-screen="build"] .stage { grid-row: 1 / span 3; position: sticky; top: 30px; background: none; align-self: start; margin: 0; padding: 0 0 10px; }
  body[data-screen="build"] .tabs { position: static; }
  body[data-screen="build"] .tabs::after { display: none; }
  .s-pick { grid-column: 1 / span 2; max-width: 560px; margin: 0 auto; }
  body { --t: min(38vw, 380px); }
  body[data-screen="build"], body[data-screen="paint"], body[data-screen="done"] { --t: min(40vw, 400px); }
  body[data-screen="order"], body[data-screen="status"] { --t: min(30vw, 300px); }
  .s-start :is(h1, .kicker, .lede, .price, .others) { text-align: left; }
  .key { margin: 0; }
  .s-pick, .s-start, .s-build, .s-done, .s-order, .s-status { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }
body.nopicture .stage { display: none; }
