/* iPrint — ดูตัวอย่างวัสดุ 3 มิติ · mobile-first. Standalone page: these rules are global on purpose, do not load app.css with it. */

:root {
  --bg: #ecebe7;
  --panel: #fbfaf8;
  --ink: var(--ip-ink);
  --muted: var(--ip-muted);
  --line: rgba(20, 22, 28, 0.1);
  --chip: #ffffff;
  --chip-on: #1e2026;
  --chip-on-text: #ffffff;
  --accent: #b98a2f;
  --warn: #9a5a00;
  --radius: 14px;
  --gutter: 16px;
}

* { box-sizing: border-box; }

/* Author `display` rules (e.g. .fatal { display: grid }) would otherwise beat the UA's [hidden] rule. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 6px;
}
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.back { color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.back:hover { color: var(--ink); }
.topbar h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- stage ---------- */

.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 250px;
  overflow: hidden;
  touch-action: none; /* dragging tilts the card instead of scrolling the page */
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  /* neutral studio backdrop: lets edge, shadow and reflections read clearly */
  background: radial-gradient(120% 95% at 50% 40%, #f7f6f3 0%, #ebeae6 58%, #dcdad5 100%);
}
.stage.is-dragging { cursor: grabbing; }

#gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stage-ui {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.stage-ui > * { pointer-events: auto; }

.caption {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 12.5px;
  cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-text); border-color: transparent; }

.loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(236, 235, 231, 0.55);
  transition: opacity 0.25s ease, visibility 0.25s;
  pointer-events: none;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader.is-corner {
  inset: auto auto 12px 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(30, 32, 38, 0.18);
  border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fatal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  line-height: 1.6;
  background: var(--bg);
}

.debug {
  position: absolute;
  top: 8px;
  left: 8px;
  margin: 0;
  padding: 6px 8px;
  font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace;
  color: #0b3;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 6px;
  pointer-events: none;
}

.stage.is-drop { outline: 3px dashed var(--accent); outline-offset: -10px; }
.stage.is-drop::after {
  content: attr(data-drop);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(236, 235, 231, 0.75);
  pointer-events: none;
}

/* ---------- controls panel ---------- */

.panel {
  flex: 0 0 auto;
  max-height: 52vh; /* the card stays big while the panel scrolls inside itself */
  max-height: 52dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 30px rgba(20, 22, 28, 0.05);
}

.step { border-top: 1px solid var(--line); padding: 10px 0; }
.step:first-of-type { border-top: 0; }
.step > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}
.step > summary::-webkit-details-marker { display: none; }
.step > summary::after { content: "▾"; color: var(--muted); font-size: 12px; }
.step[open] > summary::after { content: "▴"; }
.step > summary .num {
  flex: 0 0 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chip-on);
  color: var(--chip-on-text);
  font-size: 12px;
  font-weight: 700;
}
.step > summary h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.step > summary .sum {
  flex: 1 1 0;
  min-width: 0; /* lets the summary shrink with an ellipsis instead of squeezing the heading onto two lines */
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.step-body { padding-top: 10px; }

.designer-ad {
  margin: 8px 0 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 119, 255, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, #eef7ff 0%, #f8fbff 58%, #eef2ff 100%);
  box-shadow: 0 8px 22px rgba(0, 82, 170, 0.07);
}
.designer-ad > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}
.designer-ad > summary::-webkit-details-marker { display: none; }
.designer-ad > summary::after {
  content: "▾";
  margin-left: auto;
  color: #0876e8;
  font-size: 13px;
}
.designer-ad[open] > summary::after { content: "▴"; }
.designer-ad-icon {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #0b84f3;
  color: #fff;
  font-size: 18px;
}
.designer-ad-copy { display: grid; gap: 2px; min-width: 0; }
.designer-ad-copy strong { font-size: 14px; color: #102f54; }
.designer-ad-copy small { color: #56708d; font-size: 12px; line-height: 1.35; }
.designer-ad-body { padding: 0 14px 14px 58px; }
.designer-ad-body p { margin: 0 0 10px; color: #526b84; font-size: 12.5px; line-height: 1.55; }
.designer-ad-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #0b84f3;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.designer-ad-button:hover { background: #006fd5; }
.designer-ad-button:focus-visible { outline: 2px solid #102f54; outline-offset: 2px; }

.sub {
  margin: 12px 0 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.sub:first-child { margin-top: 0; }

.chips {
  display: grid;
  gap: 8px;
}
.chips.two { grid-template-columns: repeat(2, 1fr); }
.shape-chips { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.paper-chips { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
.coat-chips { grid-template-columns: repeat(3, 1fr); }
.finish-chips { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }

.chip {
  min-height: 42px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] {
  background: var(--chip-on);
  color: var(--chip-on-text);
  border-color: transparent;
}
.chip.is-attn { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip:focus-visible, .pill:focus-visible, .primary:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chip:disabled { opacity: 0.38; cursor: not-allowed; }

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.field.wide { grid-column: 1 / -1; }
.field input, .field select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}
.field input:read-only { background: #f1f0ec; color: var(--muted); }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12.5px;
}

.cut-box { margin-top: 10px; }

.desc {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.desc:empty { display: none; }

.notes {
  margin: 8px 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.notes:empty { display: none; }
.notes .is-warn { color: var(--warn); }

/* export checklist */
.checks {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
}
.checks li { display: flex; gap: 8px; padding: 3px 0; }
.checks li::before { flex: 0 0 14px; font-weight: 700; text-align: center; }
.checks .ok::before { content: "✓"; color: #1c6b46; }
.checks .warn::before { content: "!"; color: var(--warn); }
.checks .warn { color: var(--warn); }
.checks .error::before { content: "✕"; color: #b3261e; }
.checks .error { color: #b3261e; }
.checks .note::before { content: "i"; color: var(--muted); }
.checks .note { color: var(--muted); }
.desc b { color: var(--ink); }

.actions { margin-top: 10px; }

.primary {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.hint, .status, .disclaimer {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}
.status { min-height: 1.5em; color: var(--ink); }
.status.is-warn { color: var(--warn); }
/* a message is shown as a highlighted box (empty = nothing), e.g. "กรุณาอัปโหลดดีไซน์ของคุณ…" before ordering */
.status:not(:empty) {
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff3e0;
  color: #8a4500;
  font-size: 13.5px;
  font-weight: 700;
}
.disclaimer { /* sits right above the print button */
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #efe9fb; /* light purple */
  color: #3b3452;
  font-size: 12.5px;
  font-weight: 600;
}
.samples { margin: 10px 0 0; font-size: 12px; line-height: 1.6; text-align: center; color: var(--muted); }
.samples a { color: var(--accent); }

/* ---------- wider screens: stage left, controls right ---------- */

@media (min-width: 880px) {
  .app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .topbar { grid-column: 1 / -1; padding-top: 14px; padding-bottom: 10px; }
  .stage { grid-column: 1; grid-row: 2; border-radius: 0 20px 0 0; }
  .panel {
    grid-column: 2;
    grid-row: 2;
    max-height: none;
    overflow: auto;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    padding-top: 12px;
  }
}

/* short landscape phones: keep the card big, tuck the panel to the side */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 879px) {
  .app { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); }
  .topbar { grid-column: 1 / -1; padding-top: 6px; padding-bottom: 2px; }
  .stage { grid-column: 1; grid-row: 2; min-height: 0; }
  .panel { grid-column: 2; grid-row: 2; max-height: none; overflow: auto; border-radius: 0; box-shadow: none; padding-top: 8px; }
  .desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .chip { transition: none; }
}

.material-catalog { display: grid; gap: 8px; margin-bottom: 12px; }
.material-catalog label { display: grid; gap: 6px; }
.material-catalog select { width: 100%; min-height: 42px; padding: 8px; border: 1px solid #ddd; border-radius: 10px; background: #fff; color: #202124; font: inherit; }
.material-catalog > button { justify-self: start; }
.material-catalog p { margin: 0; font-size: 12px; color: #62676b; }

/* preview controls: flip + zoom side by side */
.stage-actions { display: flex; gap: 8px; }

/* step 1 groups front, back and shape: a summary beside the shape heading, a hairline above it */
.sub-sum { margin-left: 6px; letter-spacing: 0; opacity: 0.8; }
#shapeChips { margin-top: 0; }
.sub:has(+ #shapeChips) { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* the advice above the print button */
.print-advice {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef3fa;
  color: #33415a;
  font-size: 12.5px;
  line-height: 1.6;
}

/* warning icon: in the advice box and in the first-special-finish notice */
.warn-icon { flex: none; color: #075ac8; } /* primary blue, same as the print button */
.print-advice { display: flex; align-items: flex-start; gap: 8px; }
.print-advice .warn-icon { margin-top: 1px; }

.notice-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 22px 22px 18px;
  border: 0;
  border-radius: 18px;
  background: #fbfaf8;
  color: #1e2026;
  text-align: center;
  box-shadow: 0 18px 50px rgba(16, 28, 48, 0.28);
}
.notice-dialog::backdrop { background: rgba(16, 28, 48, 0.45); }
.notice-dialog .warn-icon { width: 36px; height: 36px; }
.notice-dialog p { margin: 10px 0 18px; font-size: 14px; line-height: 1.7; }
.notice-dialog form { margin: 0; }
.notice-ok {
  min-width: 120px;
  padding: 11px 24px;
  border: 0;
  border-radius: 10px;
  background: #075ac8;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ---- step 1 artwork: "ภาพบน Preview" source switch, then one card per side ---- */
:root { --pick: #1f7ae0; --pick-bg: #eaf3fe; }

.art-source { padding: 12px 12px 14px; border-radius: var(--radius); background: #ecebe8; }
.art-source .sub { margin: 0 0 8px; }
.src-chip[aria-pressed="true"] { background: var(--pick-bg); color: var(--ink); border: 2px solid var(--pick); }
.src-chip.is-cta { background: var(--chip-on); color: var(--chip-on-text); border-color: transparent; }

.side-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.side-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--chip);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}
.side-card.is-shown { border-color: var(--pick); background: var(--pick-bg); box-shadow: none; }
.side-title {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.side-title small { font-size: 12px; font-weight: 400; color: var(--muted); }
.side-card.is-shown .side-title { color: var(--pick); }
.side-body { display: grid; justify-items: center; gap: 8px; }
.side-action {
  width: min(100%, 150px);
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--chip-on);
  color: var(--chip-on-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.side-action:active { transform: scale(0.97); }
.side-file { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink); }
.side-remove { padding: 0; border: 0; background: none; color: #d92d20; /* red: removes the file */ font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.side-remove:hover { color: #b42318; }
/* on the sample card the side cards are just a front / back switch */
.side-cards.is-compact .side-card { padding: 9px 12px; }
.side-cards.is-compact .side-body { display: none; }
.side-title:focus-visible, .side-action:focus-visible, .side-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.art-notes { margin-top: 10px; }
.art-notes li + li { margin-top: 6px; }

/* ---- Tilt Preview: an on / off switch in the top-right corner of the preview ---- */
.stage-top {
  position: absolute;
  top: 10px;
  right: var(--gutter);
  display: grid;
  justify-items: end;
  gap: 6px;
  max-width: min(320px, calc(100% - 2 * var(--gutter)));
  pointer-events: none;
}
.stage-top > * { pointer-events: auto; }
.tilt-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 4.5px 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tilt-switch:disabled { cursor: wait; opacity: 0.75; }
.tilt-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-track {
  position: relative;
  width: 27px;
  height: 16.5px;
  border-radius: 999px;
  background: #c9c9cd;
  transition: background 0.2s ease;
}
.switch-thumb {
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  width: 13.5px;
  height: 13.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.tilt-switch[aria-checked="true"] .switch-track { background: #075ac8; }
.tilt-switch[aria-checked="true"] .switch-thumb { transform: translateX(10.5px); }
.stage-note {
  margin: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}
.stage-note.is-warn { color: var(--warn); }
@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-thumb { transition: none; }
}

/* ---- full screen: the preview alone, settings hidden ---- */
.pill-icon { width: 34px; padding: 0; justify-content: center; }
.pill-icon .icon-exit, .pill-icon[aria-pressed="true"] .icon-enter { display: none; }
.pill-icon[aria-pressed="true"] .icon-exit { display: block; }
.app.is-full { display: block; }
.app.is-full .topbar, .app.is-full .panel { display: none; }
.app.is-full .stage {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 0;
  border-radius: 0;
}
.app.is-full .stage-top { top: calc(10px + env(safe-area-inset-top)); }
.app.is-full .stage-ui { bottom: calc(10px + env(safe-area-inset-bottom)); }


/* ---- "check the cut" pop-up before an artwork file is used ---- */
.art-check {
  width: min(720px, calc(100vw - 24px));
  max-height: 92dvh;
  overflow: auto;
  padding: 20px;
  border: 0;
  border-radius: 18px;
  background: #fbfaf8;
  color: #1e2026;
  box-shadow: 0 18px 50px rgba(16, 28, 48, 0.28);
}
.art-check::backdrop { background: rgba(16, 28, 48, 0.45); }
.art-check h2 { margin: 0 0 2px; font-size: 18px; }
.art-check-file { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.art-check-stage { display: grid; place-items: center; padding: 12px; border-radius: 12px; background: #e9e8e4; }
.art-check-stage canvas { display: block; max-width: 100%; height: auto; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.art-check-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; color: #3b3f48; }
.art-check-legend li { display: flex; align-items: center; gap: 6px; }
.art-check-legend i { display: inline-block; width: 18px; height: 12px; }
.lg-cut { background: rgba(20, 22, 28, 0.55); border-radius: 2px; }
.lg-line { border-top: 2px dashed #e5322d; height: 0 !important; }
.lg-safe { border-top: 2px dashed #1f7ae0; height: 0 !important; }
.art-check-ask { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff3e0; color: #8a4500; font-size: 14.5px; font-weight: 700; text-align: center; }
.art-check-text { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: #3b3f48; }
.art-check-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.art-check-again { padding: 11px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
/* size / position controls in the check pop-up */
.art-check-stage canvas { cursor: grab; touch-action: none; }
.art-check-stage canvas.is-dragging { cursor: grabbing; }
.art-check-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.art-check-fit { display: grid; grid-template-columns: repeat(3, auto); gap: 6px; }
.art-check-fit .chip { min-height: 34px; padding: 0 12px; font-size: 13px; }
.art-check-fit .chip[aria-pressed="true"] { background: var(--pick-bg); color: var(--ink); border: 2px solid var(--pick); }
.art-check-zoom { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; font-size: 13px; color: #3b3f48; }
.art-check-zoom input { flex: 1; accent-color: #075ac8; }
.art-check-zoom output { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.art-check-reset { padding: 0; border: 0; background: none; color: #075ac8; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.art-check-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
/* paper size chosen while the picture is placed: a preset, or width x height in cm */
.art-check-size { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.art-check-size label { display: grid; gap: 4px; font-size: 12.5px; color: #3b3f48; }
.art-check-size select, .art-check-size input { width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.art-check-size[hidden] { display: none; }
.art-check-size-note { min-height: 0; margin: 4px 0 0; font-size: 12px; color: #b42318; }
.art-check-size-note:empty { display: none; }
.chips .chip.is-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .art-check-size { grid-template-columns: 1fr 1fr; } .art-check-size label:first-child { grid-column: 1 / -1; } }
/* the second button of a side card: outlined, so the two buttons do not compete */
.side-action.is-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.side-action[hidden] { display: none; }

/* Touch targets: at least 44px on phones and touch screens (QA 2026-10-09). Inline links inside sentences are exempt. */
@media (max-width: 767px), (pointer: coarse) {
  .back, .tilt-switch, .side-title, .designer-ad-button { display: inline-flex; align-items: center; min-height: 44px; }
  .pill, .chip { min-height: 44px; }
  .pill { min-width: 44px; }
  summary { display: flex; align-items: center; min-height: 44px; }
  select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  .field input, .field select, .material-catalog select, .art-check-size select, .art-check-size input { min-height: 44px; height: auto; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
}
