/* Every rule here is written against variables. The variables themselves (colours, fonts,
   shapes, the logo) come from the portal's theme, which the deploy writes to /css/theme.css. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 1.0625rem; line-height: 1.5;
}
a { color: var(--teal); }
.wrap {
  max-width: 78rem; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 3rem;
}
.wrap.narrow { max-width: 44rem; }
.wrap.small { max-width: 53.25rem; }
.wrap.mid { max-width: 64.5rem; }
.wrap.staff { max-width: 70.75rem; }

/* the mint band: the nav and the page heading share one full-width background */
header.top, .hero-copy { background: var(--band); color: var(--band-ink); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); }
nav.site { background: var(--nav); color: var(--nav-ink); box-shadow: 0 0 0 100vmax var(--nav); clip-path: inset(0 -100vmax); }
nav.site { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; padding-block: 1.1rem; margin-bottom: 1.5rem; }
nav.site:has(+ header.top), nav.site:has(+ .hero-copy), nav.site:has(+ .prose) { margin-bottom: 0; }
nav.site .brand { display: inline-flex; align-items: center; font-family: var(--head); font-weight: var(--w-head); font-size: 1.45rem; letter-spacing: -0.01em; color: var(--nav-ink); text-decoration: none; }
nav.site .brand::before { content: ""; flex: none; margin-right: 0.6rem; width: 2.2rem; height: 2.2rem; background: var(--logo) center / contain no-repeat; }
nav.site .brand span { color: inherit; margin-left: 0.28em; }
nav.site .btn, nav.site button { background: transparent; border-color: var(--nav-ink); color: var(--nav-ink); }
@media (max-width: 520px) {
  nav.site { gap: 0.5rem; }
  nav.site .brand { font-size: 1.2rem; }
  nav.site .brand::before { width: 1.8rem; height: 1.8rem; margin-right: 0.45rem; }
  nav.site .actions { gap: 0.35rem; }
  nav.site .btn, nav.site button { font-size: 0.82rem; padding: 0.6rem 0.65rem; }
}
/* the band's parts overlap by a pixel so no seam shows where one ends and the next begins */
header.top, .hero-copy, .prose > h1, .prose > .updated { margin-top: -1px; }

header.top { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: end; justify-content: space-between; padding-block: calc(1.25rem + 1px) 2.25rem; margin-bottom: 1.75rem; }
header.top h1 { font-family: var(--display); font-weight: var(--w-display); font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
header.top p { margin: 0.8rem 0 0; font-weight: 500; max-width: 44rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

button, .btn {
  font: inherit; font-weight: 700; font-size: 0.98rem; cursor: pointer; text-decoration: none;
  border-radius: var(--r-pill); padding: 0.55rem 1.15rem; display: inline-block;
  border: 2px solid var(--edge); background: var(--surface); color: var(--ink);
}
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.big, button.big { font-family: var(--head); font-weight: var(--w-head); font-size: 1.35rem; padding: 1rem 1.9rem; border-radius: var(--r-big); }
button.link { border: 0; border-radius: 0.3rem; background: none; padding: 0.25rem 0; color: var(--accent-ink); text-decoration: underline; }
button.remove { border: 0; background: none; color: var(--danger); padding: 0.25rem 0.4rem; font-size: 0.9rem; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, label.upload:focus-within { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
button:disabled { opacity: 0.5; cursor: default; }

/* landing */
.hero-copy { padding-block: calc(2rem + 1px) 3.25rem; margin-bottom: 3rem; }
/* the home page uses the full width on a big screen */
.wrap.home { max-width: 72rem; }
.home .hero-copy { padding-block: calc(3rem + 1px) 4.5rem; }
.home .hero-copy h1 { font-size: clamp(2.8rem, 9vw, 5.5rem); max-width: 52rem; }
.home .hero-copy p { font-size: clamp(1.2rem, 2vw, 1.4rem); max-width: 44rem; }
.home .steps3 { gap: 2rem 3rem; }
.hero-copy h1 { font-family: var(--display); font-weight: var(--w-display); font-size: clamp(2.8rem, 9vw, 4.6rem); line-height: 0.98; letter-spacing: -0.025em; margin: 0 0 1.25rem; text-wrap: balance; }
.hero-copy p { font-size: 1.2rem; font-weight: 500; margin: 0 0 1.75rem; max-width: 40rem; }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 2rem; margin: 0 0 3rem; padding: 0; list-style: none; counter-reset: n; }
.steps3 li { counter-increment: n; }
.steps3 li::before { content: counter(n); display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--head); font-weight: var(--w-head); font-size: 1.3rem; margin-bottom: 0.9rem; }
.steps3 h2 { font-family: var(--head); font-weight: var(--w-head); font-size: 1.6rem; line-height: 1.1; margin: 0 0 0.45rem; }
.steps3 p { margin: 0; }
.callout { background: var(--soft); color: var(--ink); border-radius: 1.1rem; padding: 1.1rem 1.3rem; }
.callout b { color: inherit; }
.callout.next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 1.5rem; padding: 1.3rem 1.5rem; font-weight: 600; }
.callout.next p { margin: 0; flex: 1 1 16rem; }
.callout.tick { position: relative; padding-left: 3.4rem; font-weight: 600; }
.callout.tick::before { content: ""; position: absolute; left: 1.35rem; top: 1.35rem; width: 1.1rem; height: 0.55rem; border-left: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(-45deg); }
.nobr { white-space: nowrap; }
.sample { margin: 2.5rem 0 0; }
.sample h2 { font-family: var(--head); font-weight: var(--w-head); font-size: 1.5rem; margin: 0 0 0.75rem; }

/* builder */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 2rem; align-items: start; }
.switch { display: none; }
@media (max-width: 860px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .switch { display: flex; gap: 0.4rem; margin-bottom: 1rem; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 0.5rem; }
  .switch button { min-height: 2.75rem; }
  .switch button { flex: 1; }
  .switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  body[data-view="edit"] .preview-col { display: none; }
  body[data-view="preview"] .form-col { display: none; }
}
form { display: flex; flex-direction: column; gap: 1.25rem; }
fieldset {
  margin: 0; border: var(--bw) solid var(--edge); border-radius: var(--r-card);
  background: var(--surface); padding: 1.1rem 1.3rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.9rem; min-width: 0;
}
legend { font-family: var(--head); font-weight: var(--w-head); font-size: 1.4rem; line-height: 1.1; padding: 0 0.5rem; }
.why { margin: -0.4rem 0 0; color: var(--muted); font-size: 0.95rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field > label, .field > .lbl { font-weight: 700; font-size: 0.95rem; }
.hint { color: var(--muted); font-size: 0.88rem; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  font: inherit; color: var(--ink); background: var(--field);
  border: var(--bw) solid var(--line); border-radius: var(--r-field); padding: 0.6rem 0.8rem; width: 100%;
}
textarea { display: block; min-height: 5.4rem; resize: vertical; }
/* in the builder a box is as tall as its text (js/create.js); a one-line answer starts as one line */
#f textarea { resize: none; overflow: hidden; }
textarea.one { min-height: 0; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
::placeholder { color: var(--muted); opacity: 0.75; }
.repeat { display: flex; flex-direction: column; gap: 0.75rem; }
.item {
  border: 0; border-radius: 1rem; padding: 0.9rem;
  display: flex; flex-direction: column; gap: 0.6rem; background: var(--tint);
}
.item input[type="text"], .item textarea { background: var(--surface); }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.item-head span { font-weight: 700; color: var(--muted); font-size: 0.9rem; }
.step-row { display: flex; gap: 0.5rem; align-items: center; }
.step-row textarea { flex: 1; min-width: 0; }
/* on a phone the answer takes the whole row and "Remove" goes under it */
@media (max-width: 520px) { .step-row { flex-wrap: wrap; } .step-row textarea { flex: 1 1 calc(100% - 2.5rem); } .step-row .remove { margin-left: auto; } }
.step-row .num {
  flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--head); font-weight: var(--w-head); font-size: 0.9rem;
}
.photo-pick { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.thumb {
  width: 4.5rem; height: 4.5rem; border-radius: 1rem; flex: none;
  border: 2px dashed var(--line); background: var(--field) center / cover no-repeat;
  display: grid; place-items: center; color: var(--muted); font-size: 0.75rem; text-align: center;
}
.thumb.has { border-style: solid; }
/* in the builder: the photo as the page crops it; pressing it opens the editor */
.thumb.frame { width: auto; height: 6.5rem; max-width: 100%; overflow: hidden; position: relative; }
.thumb.frame img { position: absolute; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.thumb.frame.movable { cursor: pointer; }
.photo-pick.round .thumb.frame { border-radius: 50%; }
.photo-pick button.edit { font-weight: 700; font-size: 0.95rem; border: 2px solid var(--edge); border-radius: var(--r-pill); padding: 0.5rem 1.1rem; background: var(--surface); color: inherit; }
/* The photo editor: the whole screen on a phone, a panel on a wider one. It is dark in light and dark mode
   alike (the theme's stage colours), so the photo is what stands out. */
dialog.crop {
  border: 0; padding: 0; margin: auto; width: min(100vw, 34rem); max-width: 100vw; height: min(100dvh, 42rem); max-height: 100dvh;
  border-radius: 1.25rem; background: var(--stage); color: var(--stage-ink); flex-direction: column; overflow: hidden;
}
dialog.crop[open] { display: flex; }
dialog.crop::backdrop { background: color-mix(in srgb, var(--stage) 60%, transparent); }
@media (max-width: 640px) { dialog.crop { width: 100vw; height: 100dvh; border-radius: 0; } }
.crop-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 0.75rem; }
.crop-head h2 { margin: 0; font-size: 1rem; color: inherit; }
.crop-head button { border: 0; border-radius: var(--r-pill); background: none; color: inherit; font-weight: 700; font-size: 1rem; padding: 0.5rem 1rem; }
.crop-head .done { background: var(--stage-ink); color: var(--stage); }
.crop-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; cursor: grab; touch-action: none; outline-offset: -3px; }
.crop-stage.dragging { cursor: grabbing; }
.crop-frame { position: relative; }
.crop-frame img { position: absolute; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* the frame's edge, and a shade over the part of the photo outside it */
.crop-frame::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--stage-ink); border-radius: 1rem; box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--stage) 65%, transparent); pointer-events: none; }
.crop-frame.round::after { border-radius: 50%; }
.crop-zoom { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem 0.25rem; }
.crop-zoom input { flex: 1; min-width: 0; accent-color: var(--stage-ink); }
.crop-zoom button { flex: none; width: 2.75rem; height: 2.75rem; border: 2px solid var(--stage-dim); border-radius: 50%; background: none; color: inherit; font-size: 1.4rem; line-height: 1; padding: 0; }
.crop-hint { margin: 0.25rem 1.25rem 1.25rem; text-align: center; font-size: 0.88rem; color: var(--stage-dim); }
dialog.crop button:focus-visible, dialog.crop input:focus-visible, .crop-stage:focus-visible { outline: 3px solid var(--stage-ink); outline-offset: 2px; }
.crop-stage:focus-visible { outline-offset: -3px; }
.frame-hint { flex-basis: 100%; margin: 0; font-size: 0.88rem; color: var(--muted); }
.frame-hint.unkept { color: var(--amber-ink); font-weight: 700; }
label.upload { display: inline-block; cursor: pointer; position: relative; }
label.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.upload span { display: inline-block; font-weight: 700; font-size: 0.95rem; border: 2px solid var(--edge); border-radius: var(--r-pill); padding: 0.5rem 1.1rem; background: var(--surface); }
label.upload.off { cursor: default; }
label.upload.off span { opacity: 0.5; }
label.upload.off[data-why]::after { content: attr(data-why); display: block; margin-top: 0.35rem; font-size: 0.88rem; font-weight: 700; color: var(--amber-ink); }

.preview-col { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.preview-col .cap { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 0.9rem; }
.preview-col .cap span:first-child { color: var(--teal); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; }
.phone {
  border: 3px solid var(--edge); border-radius: 2.2rem; background: var(--surface);
  overflow: hidden;
}
.phone iframe { display: block; width: 100%; height: min(78vh, 46rem); border: 0; background: var(--bg); }
@media (max-width: 860px) { .preview-col { position: static; } .phone iframe { height: 75vh; } }

/* purple panels: the last step of the builder, and "Print a card" once the code is ready */
.finish, .done-grid > div > .card:first-child { background: var(--panel); color: var(--on-panel); border: 0; border-radius: var(--r-panel); padding: 1.5rem 1.6rem 1.7rem; }
/* floated, the legend sits inside the panel as its heading instead of on its top edge */
.finish legend { float: left; width: 100%; padding: 0; font-size: 1.7rem; }
.finish .privacy, .finish a, .finish button.link, .done-grid > div > .card:first-child p { color: var(--on-panel); }
.finish .privacy { font-weight: 500; }
.done-grid > div > .card:first-child h2 { font-size: 1.7rem; }
.finish button.primary, .done-grid > div > .card:first-child button.primary { background: var(--on-panel); border-color: var(--on-panel); color: var(--panel-ink); }
.done-grid > div > .card:first-child button:not(.primary) { background: transparent; border-color: var(--on-panel); color: var(--on-panel); }
.finish .status, .done-grid > div > .card:first-child .status { color: var(--on-panel); }
.finish .status.err { color: var(--panel-danger); }
.finish .signin-or { color: var(--on-panel); }
.finish .signin-form .signin-note { color: var(--on-panel); }
.finish .status:empty, .done-grid > div > .card:first-child .status:empty { min-height: 0; margin-top: -0.9rem; }
.done-grid > div > .card:first-child .status:empty { margin-top: -0.75rem; }
.finish progress { background: color-mix(in srgb, var(--on-panel) 30%, transparent); }
.finish progress::-webkit-progress-value { background: var(--on-panel); }
.finish progress::-moz-progress-bar { background: var(--on-panel); }
.finish :focus-visible, .done-grid > div > .card:first-child :focus-visible { outline-color: var(--on-panel); }
/* the sign-in box: Google's button, then the email and password form (js/auth.js) */
/* one column, 400px at most: the widest Google draws its button, so it and the fields line up */
.signin { display: flex; flex-direction: column; align-items: stretch; gap: 0.9rem; width: 100%; max-width: 400px; }
.signin-google { display: flex; justify-content: center; min-height: 44px; }
.card.signin-card { width: 100%; max-width: calc(400px + 3.6rem + 2 * var(--bw)); margin-inline: auto; padding: 1.6rem 1.8rem 1.8rem; }
.signin-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; width: 100%; font-size: 0.9rem; }
.signin-new { font-weight: 700; }
.signin-form .field.with-link { display: grid; grid-template-columns: 1fr auto; align-items: baseline; }
.signin-form .field.with-link input { grid-column: 1 / -1; grid-row: 2; }
.signin-form .field.with-link button.link { grid-column: 2; grid-row: 1; padding: 0; font-size: 0.9rem; }
.signin-or { margin: 0; color: var(--muted); font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 0.75rem; width: 100%; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; border-top: 1px solid currentColor; opacity: 0.6; }
.signin-form { display: flex; flex-direction: column; align-items: stretch; gap: 0.8rem; width: 100%; }
.signin-form button.primary { width: 100%; margin-top: 0.2rem; }
.signin-form .field { width: 100%; }
.signin-form [hidden] { display: none; }
.signin-form .signin-note { margin: 0; color: var(--ink); font-size: 0.95rem; }
.signin-form .status { font-size: 0.95rem; }
.signin-form .status:empty { display: none; }
/* a refusal is a box above the fields, not a line under the last link */
.signin-form .status.err, .finish .signin-form .status.err { width: 100%; background: var(--surface); color: var(--danger); border: 2px solid var(--danger); border-radius: 0.8rem; padding: 0.6rem 0.8rem 0.6rem 2.4rem; position: relative; }
.signin-form .status.err::before { content: "!"; position: absolute; left: 0.7rem; top: 0.62rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--danger); color: var(--surface); display: grid; place-items: center; font-size: 0.85rem; line-height: 1; }
.status { min-height: 1.5em; font-weight: 700; color: var(--teal); margin: 0; }
.status.err { color: var(--danger); }
.privacy { font-size: 0.92rem; color: var(--muted); margin: 0; }
.confirm { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; background: var(--amber-soft); color: var(--amber-ink); border-radius: 1rem; padding: 0.7rem 1rem; font-weight: 700; }
progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 0.6rem; border: 0; border-radius: var(--r-pill); overflow: hidden; background: var(--tint); }
progress::-webkit-progress-bar { background: transparent; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
/* High Contrast mode replaces these colours, so hand the bar back to the browser */
@media (forced-colors: active) { progress, .finish progress { -webkit-appearance: auto; appearance: auto; border-radius: 0; overflow: visible; background: revert; } }

/* done page */
.done-grid { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 700px) { .done-grid { grid-template-columns: minmax(0, 1fr); } #cardCanvas { margin-inline: auto; } }
#cardCanvas { width: 100%; max-width: 18rem; height: auto; border: 2px solid var(--edge); border-radius: 1.1rem; background: var(--paper); display: block; }
#qrCanvas { width: 12rem; height: 12rem; display: block; background: var(--paper); border-radius: 0.5rem; border: 1px solid var(--line); }
.linkbox { display: flex; gap: 0.5rem; align-items: stretch; }
.linkbox input { flex: 1; min-width: 0; font-size: 0.95rem; }
.card { background: var(--surface); border: var(--bw) solid var(--edge); border-radius: var(--r-card); padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: 0.75rem; }
.card h2 { margin: 0; font-family: var(--head); font-weight: var(--w-head); font-size: 1.45rem; line-height: 1.1; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.page-list { display: flex; flex-direction: column; gap: 1rem; }
.card.page-row { flex-direction: row; align-items: center; gap: 1.75rem; }
.page-row .thumb { flex: none; width: 7.75rem; height: 7.75rem; border-color: var(--edge); background-color: var(--tint); }
.page-row .thumb:not(.has) { border-color: var(--muted); background-color: var(--surface); }
.page-row-body { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.page-row h2 { font-size: 1.9rem; overflow-wrap: anywhere; }
.card.soft { background: var(--soft); border-color: var(--soft); }
.card.soft p { color: var(--ink); }
@media (max-width: 520px) {
  .card.page-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem 1rem; }
  .page-row .thumb { width: 6rem; height: 6rem; }
  .page-row-body { display: contents; }
  .page-row h2 { font-size: 1.6rem; }
  .page-row .actions { grid-column: 1 / -1; }
  .page-row .actions .btn { flex: 1 1 40%; text-align: center; }
  .page-row .actions .btn.primary, .page-row .actions .btn:nth-child(4) { flex-basis: 100%; }
  /* buttons in order, staff and survey cards fill the row on a phone */
  #orderForm .actions > button, #list .card > .actions > *, .ship-form .actions > *, #form .actions > *, .wrap.small .card .actions > * { flex: 1 1 100%; text-align: center; }
  .notfound .hero-copy .btn { display: block; text-align: center; }
  .callout.next .btn { flex: 1 1 100%; text-align: center; }
}
/* ordering */
/* signed out: the items and prices are shown, the card and the total wait for the sign-in */
body.browsing .done-grid.order { grid-template-columns: minmax(0, 1fr); }
body.browsing .done-grid.order > div:first-child, body.browsing .totals-card, body.browsing .order-item .actions { display: none; }
.done-grid.order { grid-template-columns: minmax(0, 22.5rem) minmax(0, 1fr); gap: 2rem 3.5rem; }
.done-grid.order #cardCanvas { max-width: 22.5rem; }
@media (max-width: 1000px) { .done-grid.order { grid-template-columns: minmax(0, 1fr); } .done-grid.order #cardCanvas { max-width: 16.25rem; margin-inline: auto; } }
.card.order-item { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 0.6rem 1.5rem; padding: 1.6rem 1.75rem; align-items: start; }
.order-item .product-pic { grid-row: 1 / span 3; }
.card.order-item.no-pic { grid-template-columns: minmax(0, 1fr); }
.product-pic, ul.lines.pics img { display: block; width: 100%; height: auto; border: 2px solid var(--edge); border-radius: 1rem; background: var(--picture); }
.order-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; min-width: 0; }
.order-item-head h2 { min-width: 0; overflow-wrap: anywhere; }
.order-item-head h2 { font-size: 1.6rem; }
.order-item-head .price { font-family: var(--head); font-weight: var(--w-head); font-size: 1.45rem; white-space: nowrap; }
.card.order-item p { font-size: 1rem; color: var(--ink); }
.order-item .actions { align-items: end; gap: 1rem; margin-top: 0.4rem; }
.order-item label.pick { flex: 1 1 9rem; max-width: 13rem; }
.order-item label.pick:only-child { max-width: 26.5rem; }
@media (max-width: 620px) {
  .card.order-item { grid-template-columns: 7rem minmax(0, 1fr); gap: 0.75rem 0.9rem; padding: 1.2rem 1.3rem 1.3rem; }
  .order-item .product-pic { grid-row: auto; }
  .order-item .order-item-head { flex-direction: column; align-self: center; }
  .order-item .order-item-head h2 { font-size: 1.35rem; }
  .order-item .order-item-head .price { font-size: 1.3rem; }
  .order-item > p, .order-item > .actions { grid-column: 1 / -1; }
  .order-item label.pick, .order-item label.pick:only-child { max-width: none; }
}
label.pick { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 700; font-size: 0.95rem; }
select { font: inherit; font-weight: 400; color: var(--ink); background: var(--field); border: var(--bw) solid var(--line); border-radius: var(--r-field); padding: 0.7rem 0.8rem; width: 100%; }
select:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
#orderForm { display: flex; flex-direction: column; gap: 1.25rem; }
#orderForm .page-list { gap: 1.25rem; }
.card.totals-card { border-width: 3px; padding: 1.75rem; gap: 1.1rem; }
.card.totals-card p { font-size: 1rem; color: var(--ink); }
dl.totals { margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
dl.totals div { display: flex; justify-content: space-between; gap: 1rem; }
dl.totals dd { margin: 0; }
dl.totals .grand { font-family: var(--head); font-weight: var(--w-head); font-size: 1.45rem; border-top: 2px solid var(--edge); padding-top: 0.9rem; margin-top: 0.6rem; }
.badge { font-weight: 700; font-size: 0.85rem; border-radius: var(--r-pill); padding: 0.2rem 0.85rem; border: 2px solid var(--teal); background: var(--soft); color: var(--teal); white-space: nowrap; }
.badge.in_production { border-color: var(--accent); background: transparent; color: var(--accent-ink); }
.badge.shipped { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.badge.refunded { border-color: var(--line); background: var(--tint); color: var(--muted); }
.badge.pending { border-color: var(--amber-ink); background: var(--amber-soft); color: var(--amber-ink); }
#list .card { padding: 1.6rem 1.75rem; }
#list .card > p { font-size: 1rem; }
#list .order-item-head { align-items: center; }
.card p.total { color: var(--ink); font-weight: 700; }
.card p.sent { color: var(--ink); border-top: 1px solid var(--line); padding-top: 0.9rem; margin-top: 0.3rem; }
.card p.sent a { font-weight: 700; }
ul.lines { margin: 0; padding-left: 1.2rem; }
ul.lines.pics { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
ul.lines.pics li { display: flex; align-items: center; gap: 0.9rem; font-weight: 500; }
ul.lines.pics img { flex: none; width: 4rem; border-radius: 0.6rem; }
@media (max-width: 520px) { #list .card { padding: 1.2rem 1.3rem 1.3rem; } #list .order-item-head { flex-wrap: wrap; } }
/* staff page */
.tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.75rem; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.order-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 1rem 2rem; align-items: start; }
.order-what { display: flex; flex-direction: column; gap: 0.75rem; }
@media (max-width: 760px) { .order-cols { grid-template-columns: minmax(0, 1fr); } }
address.ship-to { font-style: normal; white-space: pre-line; background: var(--tint); border-radius: 1rem; padding: 0.9rem 1.1rem; line-height: 1.6; }
.order-extra { display: flex; flex-direction: column; gap: 0.75rem; }
.order-extra:empty { display: none; }
.ship-form { display: grid; grid-template-columns: minmax(0, 13.75rem) minmax(0, 1fr); gap: 1rem; background: var(--soft); border-radius: 1.1rem; padding: 1.4rem 1.5rem; }
.ship-form > p, .ship-form > .actions { grid-column: 1 / -1; }
.card .ship-form p { color: var(--ink); font-size: 1rem; }
@media (max-width: 620px) { .ship-form { grid-template-columns: minmax(0, 1fr); padding: 1.1rem; } }
.print-preview { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.print-preview canvas { height: auto; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--paper); }
.print-preview .print-card { width: 14rem; }
.print-preview .print-qr { width: 9rem; }
.feedback { background: var(--soft); border-radius: 1rem; padding: 0.9rem 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; white-space: pre-line; }
.card .feedback p { color: var(--ink); }
/* email setting and feedback survey */
label.check { display: flex; gap: 0.75rem; align-items: flex-start; font-weight: 700; }
label.check input { width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; flex: none; accent-color: var(--accent); }
label.check + p { padding-left: 2.1rem; }
.wrap.small .card { padding: 1.75rem; gap: 1.25rem; }
.wrap.small .card > p { color: var(--ink); font-size: 1rem; }
fieldset.rating { border: 0; padding: 0; margin: 0; }
fieldset.rating legend { font-family: var(--head); font-size: 1.45rem; line-height: 1.15; font-weight: var(--w-head); padding: 0; margin-bottom: 0.9rem; }
.rating-row { display: flex; flex-wrap: wrap; gap: 0.6rem 0.5rem; }
.rating-row label { display: flex; gap: 0.5rem; align-items: center; border: 2px solid var(--edge); border-radius: var(--r-pill); padding: 0.6rem 0.8rem; flex: 1 1 auto; justify-content: center; font-weight: 700; font-size: 0.92rem; cursor: pointer; white-space: nowrap; }
.rating-row label:has(input:checked) { background: var(--soft); }
.rating-row label:focus-within { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.rating-row input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--accent); }
.rating-row input:focus-visible { outline: 0; }
@media (max-width: 620px) { .rating-row { flex-direction: column; } .rating-row label { font-size: 1rem; padding: 0.7rem 1.1rem; justify-content: flex-start; } }
.card details { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.card details summary { cursor: pointer; font-weight: 700; font-size: 1rem; }
/* long-form text pages (privacy) */
.prose { max-width: 40rem; }
.prose h1 { font-family: var(--display); font-weight: var(--w-display); font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; }
.prose > h1, .prose > .updated { background: var(--band); color: var(--band-ink); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); }
.prose > h1 { margin-bottom: 0; padding-block: calc(1.25rem + 1px) 0.8rem; }
.prose > .updated { margin-bottom: 1.75rem; padding-bottom: 2.25rem; font-weight: 500; }
.prose h2 { font-family: var(--head); font-weight: var(--w-head); font-size: 1.6rem; line-height: 1.15; margin: 2.25rem 0 0.5rem; }
.prose h3 { font-size: 1.08rem; margin: 1.4rem 0 0.25rem; }
.prose p, .prose ul { margin: 0 0 0.9rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35rem; }
.prose .updated { font-size: 0.95rem; }
.prose .callout { margin: 1.25rem 0; }
footer.site a { color: inherit; }
footer.site { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
/* An empty message line takes no room inside a card. It stays in the page, not display: none,
   so a screen reader is already watching it when its first message arrives. */
#list .card > p:empty, .totals-card .status:empty, .card.soft .status:empty { min-height: 0; height: 0; margin-top: -0.75rem; }
.totals-card .status:empty { margin-top: -1.1rem; }
