:root {
  --ink: #1c3934;      /* deep green: text, dark buttons */
  --paper: #f9edf0;    /* blush: page background */
  --card: #ffffff;
  --muted: #56665f;
  --line: #ead3d9;
  --accent: #c3955b;   /* gold: highlight buttons, borders */
  --on-accent: #1c3934;
  --soft: #f3e0e5;     /* blush, one step darker: pills, tags */
  --ok: #2d7a55;
  --warn: #c98a00;
  --radius: 16px;
  --font: 'Inter', system-ui, sans-serif;
  --display: 'Archivo', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* Keyboard focus: dark green ring (gold is too light against blush/white for 3:1) */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--paper); color: var(--ink); line-height: 1.45; }
body.big { font-size: 125%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 64px; }
.wide { max-width: 1280px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 18px; margin-bottom: 20px; }
.brand img { max-height: 48px; max-width: 100%; display: block; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }

/* Forms */
label.field { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
textarea { min-height: 96px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--ink); flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 16px; padding: 12px 20px;
  border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; }
.btn.accent { background: var(--ink); border-color: var(--ink); color: var(--on-ink, var(--accent)); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { font-size: 13px; padding: 7px 12px; }
.btn.block { width: 100%; padding: 16px; font-size: 18px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Choice chips (radio cards) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Embroidery font tiles: the guest's text in each font style */
.font-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ftile { position: relative; }
.ftile input { position: absolute; opacity: 0; pointer-events: none; }
.ftile span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; text-align: center; box-sizing: border-box; height: 100%; }
.ftile .fsample { font-style: normal; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; color: var(--ink); }
.ftile b { font-size: 12px; font-weight: 600; color: var(--muted); }
.ftile input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.ftile input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
/* DTF design picture tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile span { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; height: 100%; box-sizing: border-box; }
.tile img, .tile .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #f6f6f6; display: block; }
.tile b { font-size: 14px; text-align: center; }
.tile input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.tile input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.design-thumb { display: block; width: 120px; height: 120px; object-fit: contain; margin: 10px auto 0; border-radius: 10px; background: #f6f6f6; }
.order .dthumb { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #f6f6f6; float: right; margin-left: 8px; }
.design-pics { display: grid; gap: 8px; margin-top: 8px; }
.toast-msg:empty { display: none; }
.toast-msg { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; z-index: 10; }
.design-pics .dp { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.design-pics .dp img, .design-pics .dp .noimg { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #f6f6f6; flex: none; }
.design-pics .dp .name { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.chip input:disabled + span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); }
.tabs { display: grid; grid-auto-flow: column; gap: 8px; margin-bottom: 8px; }
.tabs .chip span { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.preview { font-size: 28px; padding: 14px; text-align: center; border: 2px dashed var(--line); border-radius: 12px; margin-top: 8px; min-height: 64px; word-break: break-word; }
.error { background: #fde8e3; border: 2px solid var(--accent); color: #7a1e05; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }

/* Status page */
.ticket { text-align: center; padding: 28px 18px; }
.ticket .code { font-family: var(--display); font-size: 64px; font-weight: 900; letter-spacing: -.02em; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; background: var(--line); }
.pill.waiting { background: var(--soft); }
.pill.in_progress { background: #fff1c7; color: #6b4a00; }
.pill.ready { background: var(--ok); color: #fff; }
.pill.picked_up, .pill.cancelled { background: #ddd; color: #555; }
.bigstat { font-family: var(--display); font-size: 48px; font-weight: 900; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stats .card { margin: 0; text-align: center; }
.ready-banner { background: var(--ok); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; font-family: var(--display); font-size: 28px; font-weight: 900; margin-bottom: 16px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .ready-banner { animation: none; } }

/* Admin */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.col h2 { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; text-transform: uppercase; letter-spacing: .05em; }
.col h2 .count { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.order { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.order.new { border-color: var(--accent); }
.order .code { font-family: var(--display); font-size: 26px; font-weight: 900; }
.order .who { font-size: 18px; font-weight: 700; }
.order .what { font-size: 16px; margin: 6px 0; }
.order .note { background: #f8eedf; padding: 6px 10px; border-radius: 8px; font-size: 14px; margin: 6px 0; }
.order .meta { font-size: 12px; color: var(--muted); }
.order .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; background: var(--soft); vertical-align: middle; }
.tag.dtf { background: #dceeff; } .tag.embroidery { background: #f6e0ff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
dialog { border: none; border-radius: var(--radius); padding: 20px; width: min(480px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }

/* TV board */
footer.legal { margin-top: 28px; text-align: center; }
.legal-page h2 { font-size: 18px; margin-top: 22px; }
.legal-page p, .legal-page li { font-size: 15px; }
.check a { color: inherit; }
/* Colors come from the studio's primary color (see tvColors in src/colors.js) so text always reads on it. */
body.tv-body { background: var(--tv-bg, var(--ink)); }
.tv { background: var(--tv-bg, var(--ink)); color: var(--tv-fg, #fff); min-height: 100vh; padding: 32px; }
.tv h1, .tv h2, .tv .brand, .tv .bigstat { color: var(--tv-fg, #fff); }
.tv h1 { font-size: 40px; }
.tv .tv-label, .tv .muted { color: var(--tv-muted, #d0d0d0); font-size: 20px; font-weight: 600; }
.tv .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.tv .item { font-family: var(--display); font-size: 44px; font-weight: 900; padding: 8px 0; border-bottom: 1px solid var(--tv-line, #333); }
.tv .item small { font-size: 24px; font-weight: 600; color: var(--tv-muted, #bbb); margin-left: 12px; }
.tv .ready .item { color: var(--tv-ready, #6ee7a0); }

/* Marketing site */
.marketing .hero { padding: 32px 0 24px; max-width: 760px; }
.marketing .hero h1 { font-size: clamp(32px, 6vw, 56px); }
.marketing .lead { font-size: 19px; color: var(--muted); margin: 8px 0 20px; }
.steps3, .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
@media (max-width: 860px) { .steps3, .plans { grid-template-columns: 1fr; } }
.steps3 h2 { font-size: 18px; }
.plan .price { font-family: var(--display); font-size: 36px; font-weight: 900; margin: 4px 0 8px; }
.plan .price span { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan ul { padding-left: 18px; margin: 0 0 16px; min-height: 140px; }
.center { text-align: center; margin-top: 32px; }
select { font: inherit; font-size: 15px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
/* Patch bar */
.ptile { display: flex; flex-direction: column; gap: 6px; }
.ptile select { width: 100%; padding: 6px 8px; font-size: 14px; }
.ptile input:disabled + span { opacity: .45; cursor: not-allowed; }
.tile small { text-align: center; font-size: 12px; }
.patch-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.patch-thumbs .design-thumb { width: 96px; height: 96px; }
.tag.patches { background: #ffe9cc; }
.dthumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
