/* Layout: backlit stage (white-hot ring, model, orbiting disc buttons) beside a contextual panel; stacks on phones. */
:root {
  --bg: #1a0f08;
  --bg-2: #2c1a0f;
  --stage-hi: #c8925f;
  --stage-mid: #7a5233;
  --disc: #6a4329;
  --disc-hi: #93643f;
  --cream: #f6ead2;
  --ink: #f3e6d3;
  --muted: #bfa184;
  --orange: #ff9a33;
  --orange-2: #e07a1f;
  --red: #d8231a;
  --green: #5c9a1d;
  --line: rgb(255 200 150 / .16);
  --card: rgb(52 31 18 / .78);
  --cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body { background: radial-gradient(130% 90% at 50% 30%, #3c2414 0%, var(--bg-2) 40%, var(--bg) 100%) fixed var(--bg); color: var(--ink); font: 15px/1.45 var(--body); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
svg { display: block; }

.app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; height: 100dvh; }

/* Main: full-height stage. On phones the panel floats over the stage; on wide screens it sits beside it. */
.main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.stage-wrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.stage {
  position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: radial-gradient(80% 62% at 50% 60%, var(--stage-hi) 0%, var(--stage-mid) 42%, var(--bg-2) 82%, var(--bg) 100%);
}
.stage.flip { animation: flip .44s ease-in-out; }
@keyframes flip { 50% { transform: perspective(1200px) rotateY(90deg); } }
.backdrop { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 30%, #2a1609, #0b0604); }
.scene { position: absolute; left: 0; top: 0; width: 2712px; height: 1761px; transform-origin: 0 0; }
#figure {
  isolation: isolate;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 7%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 7%);
  mask-composite: intersect;
}
.scene.animate { transition: transform .4s cubic-bezier(.3, .8, .3, 1); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.figure { position: absolute; pointer-events: none; isolation: isolate; }
.figure img, .figure .shirt { position: absolute; inset: 0; width: 100%; height: 100%; }
.shirt { mix-blend-mode: multiply; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; transition: background-color .25s; }
.print { position: absolute; }
.objs { position: absolute; inset: 0; overflow: hidden; }
.objs::after { content: ''; position: absolute; inset: 0; pointer-events: none; display: none;
  border: calc(1.6px * var(--inv, 1)) dashed rgb(255 255 255 / .75); }
.step2 .stage.moving .objs::after { display: block; }   /* print area: only while moving an item */
.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.print:not(.inked) .ink { display: none; }   /* no fabric layer: nothing stale can show */
.print.inked .obj { opacity: 0; }
.print .obj.t.editing { opacity: 1; cursor: text; outline: none; user-select: text; -webkit-user-select: text; touch-action: auto; caret-color: var(--orange); }   /* the canvas shows the design on the fabric; these stay for touch and selection */
.obj { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; cursor: grab; touch-action: none; }
.obj.t { white-space: pre; line-height: 1.1; text-align: center; paint-order: stroke fill; }
.obj.img { display: block; max-width: none; -webkit-user-drag: none; }
.obj.art svg { width: 100%; height: 100%; }
.step1 .obj, .step3 .obj { pointer-events: none; }

.sel-layer { pointer-events: none; }
.sel { position: absolute; left: 0; top: 0; border: calc(1.5px * var(--inv, 1)) solid var(--orange); border-radius: calc(4px * var(--inv, 1)); }
.h {
  position: absolute; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; pointer-events: auto;
  background: var(--orange); color: #2a1404; font-weight: 800; box-shadow: 0 4px 12px rgb(0 0 0 / .45); transform: scale(var(--inv, 1));
}
.h svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.h-del { left: -17px; top: -17px; background: #2e1a0d; color: var(--cream); border: 1px solid var(--line); }
.h-rot { right: -17px; bottom: -17px; cursor: nwse-resize; touch-action: none; }
.guide { position: absolute; top: 0; bottom: 0; left: 50%; border-left: calc(1px * var(--inv, 1)) dashed var(--orange); }

/* Logo (positioned by JS just above the model's hair) */
.logo { position: absolute; left: 50%; top: calc(6px + env(safe-area-inset-top, 0px)); width: var(--logo-w, 200px); height: auto; transform: translateX(-50%); pointer-events: none; z-index: 2; transition: top .4s, width .4s; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .55)); }

/* Step bar (as in the original artwork): dark see-through strip with thin bronze lines; the current step is a bronze
   chevron with a glowing amber edge; steps ahead fade out a little more each. */
.steps {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  background: linear-gradient(rgb(30 19 11 / .66), rgb(14 9 5 / .74)); border-top: 1px solid rgb(200 150 90 / .35); border-bottom: 1px solid rgb(200 150 90 / .25);
}
.steps button {
  position: relative; isolation: isolate; min-width: 0; text-align: left; padding: 7px 16px 8px 28px;
  font: 700 clamp(14px, 3.4vw, 24px)/1 var(--cond); text-transform: uppercase; color: #c48f5c; letter-spacing: .01em;
}
.steps button:first-child { padding-left: 16px; }
.steps button:not(:last-child)::after {          /* thin bronze chevron divider */
  content: ''; position: absolute; top: 0; bottom: 0; right: -9px; width: 18px; z-index: 1;
  background: rgb(200 150 90 / .55); clip-path: polygon(0 0, 1.5px 0, 100% 50%, 1.5px 100%, 0 100%, calc(100% - 1.5px) 50%);
}
.steps small { display: block; font: 700 clamp(10px, 2.2vw, 14px)/1.05 var(--cond); letter-spacing: .02em; color: inherit; margin-bottom: 1px; }
.steps button.on + button + button { opacity: .62; }   /* two steps ahead: fainter */
.steps button.on {
  color: #fff; text-shadow: 0 1px 2px rgb(40 20 5 / .6);
  background: linear-gradient(#ffc477, #e7a04b 50%, #ffbe6a);                 /* the glowing amber edge */
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
}
.steps button.on:first-child { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); }
.steps button.on::before {                      /* bronze fill, 2px inside the edge, with light glowing up from the bottom */
  content: ''; position: absolute; inset: 2px 2px 2px 2px; z-index: -1;
  background: linear-gradient(to top, rgb(255 188 104 / .7), rgb(255 188 104 / 0) 30%), linear-gradient(rgb(255 200 130 / .5), rgb(255 200 130 / 0) 26%), linear-gradient(90deg, rgb(255 190 110 / .4), rgb(255 190 110 / 0) 10%), radial-gradient(28% 100% at 100% 50%, rgb(255 186 100 / .6), transparent 75%), linear-gradient(100deg, #5e3f24, #3e2716 60%, #2e1c0f);
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%, 17px 50%);
}
.steps button.on:first-child::before { clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%); }
.steps button.on::after { display: none; }
.steps button.on small { color: #f0a556; }

/* Disc buttons (positioned by JS on the ring; in design they move to the top corners) */
.ring { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ring-btn {
  position: absolute; width: var(--btn, 80px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--cream);
  background: radial-gradient(circle at 35% 30%, rgb(170 118 76 / .82) 0%, rgb(118 76 44 / .8) 45%, rgb(80 48 26 / .84) 100%);
  box-shadow: inset 0 0 0 1px rgb(255 225 190 / .14);
  transition: left .4s, top .4s, filter .15s; animation: pop .35s backwards;
}
.ring-btn { transition: left .4s, top .4s, filter .18s, box-shadow .18s, transform .18s; }
.ring-btn:hover, .ring-btn:focus-visible {          /* light up: brighter disc, warm glow from the ring */
  filter: brightness(1.35) saturate(1.1);
  box-shadow: inset 0 0 0 1px rgb(255 225 190 / .4), 0 0 18px 4px rgb(255 190 110 / .55);
  transform: translate(-50%, -50%) scale(1.06);
}
.ring-btn.go:hover, .ring-btn.go:focus-visible {
  filter: brightness(1.05);
  box-shadow: 0 0 0 calc(var(--btn, 80px) * .16) rgb(255 236 210 / .34), 0 0 32px 12px rgb(255 210 160 / .6);
}
.ring-btn:active { filter: brightness(.9); }
.ring-btn b { font: 700 calc(var(--btn, 80px) * .235)/.95 var(--cond); text-transform: uppercase; letter-spacing: .02em; text-align: center; text-shadow: 0 1px 2px rgb(60 30 10 / .6); padding: 0 4px; }
.ring-btn i { font: normal 600 calc(var(--btn, 80px) * .15)/1.1 var(--cond); color: #ffb35c; text-shadow: 0 1px 2px rgb(40 20 5 / .8); max-width: 86%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.ring-btn .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 3px; vertical-align: 0; box-shadow: 0 0 0 1px rgb(255 255 255 / .55); }
.ring-btn.go {                                   /* white disc in a soft halo with a pointer, as in the artwork */
  color: #a3170f; background: radial-gradient(circle at 45% 38%, #ffffff, #fdf8ef 62%, #efe2cc 100%);
  box-shadow: 0 0 0 calc(var(--btn, 80px) * .16) rgb(255 236 210 / .2), 0 0 24px 8px rgb(255 210 160 / .35);
}
.ring-btn.go::after {
  content: ''; position: absolute; top: 50%; right: calc(var(--btn, 80px) * -.3); transform: translateY(-50%);
  border: calc(var(--btn, 80px) * .1) solid transparent; border-left: calc(var(--btn, 80px) * .11) solid rgb(255 236 210 / .32); border-right: 0;
}
.ring-btn.go b { text-shadow: none; }
.ring-btn.go i { color: #9e1a12; opacity: .75; }
@keyframes pop { from { opacity: 0; } }

/* Design step: half dials at the screen edges (segment arcs + cream center), as in the original artwork */
.dial { position: absolute; top: 4px; pointer-events: auto; overflow: visible; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .5)); animation: pop .35s backwards; }
.dial.L { left: 0; } .dial.R { right: 0; }
.dial .seg { cursor: pointer; outline: none; }
.dial .seg path:first-child { stroke: #2a170c; stroke-width: 1.5; transition: filter .15s; }
.dial .seg:hover path:first-child, .dial .seg:focus-visible path:first-child { filter: brightness(1.18); }
.dial .seg:active path:first-child { filter: brightness(.9); }
.dial text { font: 600 14px var(--cond); letter-spacing: .06em; text-transform: uppercase; fill: var(--cream); pointer-events: none; }
.dial .hub text { fill: #9e1a12; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.dial .hub circle { stroke: rgb(255 240 220 / .5); stroke-width: 3; }
.dial .seg:focus-visible path:first-child { stroke: var(--orange); stroke-width: 3; }


/* Clothing-tag cart (photo of the woven tag; live count stitched on top) */
.tag { position: absolute; left: calc(var(--btn, 80px) * -.28); top: 40%; width: calc(var(--btn, 80px) * 1.45); z-index: 2; transition: top .3s, transform .15s; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .5)); }
.tag:active { transform: scale(.96); }
.tag img { display: block; width: 100%; height: auto; }
#cart-count { position: absolute; left: 69%; top: 19%; transform: translate(-50%, -50%); height: 23%; display: flex; gap: 0; }
#cart-count img { height: 100%; width: auto; margin: 0 -1.5%; filter: drop-shadow(0 1px 0 rgb(90 20 10 / .35)); }

/* Panel */
.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .05); }
.card h3 { margin: 0 0 10px; font: 600 15px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .05em; color: var(--orange); }
.summary { display: grid; gap: 2px; }
.row-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border-radius: 10px; text-align: left; }
.row-btn:hover { background: rgb(255 255 255 / .05); }
.row-btn span { color: var(--muted); width: 64px; flex: none; font: 600 14px var(--cond); text-transform: uppercase; }
.row-btn strong { flex: 1; font-weight: 600; }
.row-btn em { font: normal 600 14px var(--cond); text-transform: uppercase; color: var(--orange); }
.swatch-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; vertical-align: -3px; margin-right: 8px; box-shadow: 0 0 0 1.5px rgb(255 255 255 / .4); }
.price-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.price-line strong { font: 700 30px/1 var(--cond); color: var(--orange); font-variant-numeric: tabular-nums; }
.big-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.big-actions button { padding: 16px 6px 12px; border-radius: 12px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); display: grid; justify-items: center; gap: 6px; font: 600 15px var(--cond); text-transform: uppercase; }
.big-actions svg { width: 26px; height: 26px; fill: none; stroke: var(--orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.text-input { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; background: var(--cream); color: #2a1709; border: 0; box-shadow: inset 0 2px 4px rgb(80 50 20 / .35); resize: vertical; font-size: 16px; }
.scroll-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.font-chip { flex: none; padding: 9px 14px; border-radius: 10px; background: rgb(255 255 255 / .06); border: 1px solid var(--line); font-size: 19px; line-height: 1.1; white-space: nowrap; }
.font-chip.on, .chip.on, .tile.on, .brand-card.on, .size-grid button.on { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange), 0 0 14px rgb(255 140 40 / .3); }
.color-dot { flex: none; width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgb(255 255 255 / .25); }
.color-dot.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--orange); }
.color-dot input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.color-dot.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 16px; border-radius: 999px; background: rgb(255 255 255 / .06); border: 1px solid var(--line); font: 600 15px var(--cond); text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.actions button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 7px 4px; border-radius: 9px; background: rgb(255 255 255 / .05); font: 600 12.5px var(--cond); text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.actions button svg { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--cream); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.actions .danger svg { stroke: #ff7b6e; }
.label-row { margin: 14px 0 8px; font: 600 14px var(--cond); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Order */
.mockups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mockups figure { margin: 0; text-align: center; font: 600 13px var(--cond); text-transform: uppercase; color: var(--muted); }
.mockups img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: rgb(0 0 0 / .25); }
.qty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 4px 14px; }
.qty-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.qty-row span { flex: 1; font: 700 18px var(--cond); }
.qty-row small { color: var(--muted); font: 500 13px var(--body); margin-left: 8px; }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--cream); color: #2a1709; border-radius: 999px; padding: 3px; box-shadow: inset 0 2px 4px rgb(80 50 20 / .3); }
.stepper button { width: 34px; height: 34px; border-radius: 50%; font-size: 18px; font-weight: 700; }
.stepper button:hover { background: rgb(0 0 0 / .08); }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Bottom toolbar */
.bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(#24140a, #140b05); border-top: 1px solid rgb(255 160 80 / .15);
}
.bar button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 8px; font: 600 16px var(--cond); text-transform: uppercase; letter-spacing: .03em; color: #fff; white-space: nowrap; }
.bar button { min-height: 32px; padding: 0 13px; border-radius: 7px; font-size: 15px; }
.bar .project { height: 32px; font-size: 15px; }
.bar { padding-top: 7px; padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)); }
.bar svg, .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar button { box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -2px 4px rgb(0 0 0 / .18), 0 2px 6px rgb(0 0 0 / .45); text-shadow: 0 1px 1px rgb(0 0 0 / .35); }
.combo { flex: 1; min-width: 0; max-width: 420px; display: flex; border-radius: 8px; box-shadow: 0 2px 6px rgb(0 0 0 / .45); }
.combo .project { flex: 1; max-width: none; border-radius: 8px 0 0 8px; }
.combo #save { border-radius: 0 8px 8px 0; box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -2px 4px rgb(0 0 0 / .18); }
.bar #cart-go { position: relative; margin-left: 14px; }
.bar #cart-go::before { content: ''; position: absolute; left: -12px; top: -10px; bottom: -10px; width: 1px; background: rgb(0 0 0 / .7); box-shadow: 1px 0 0 rgb(255 255 255 / .07); }
.b-orange { background: linear-gradient(#f0a252, #d4782c 50%, #b9601d); }
.b-red { background: linear-gradient(#f4473a, #cf2419 50%, #a8140c); }
.b-brown { background: linear-gradient(#8e5a35, #6a4022 50%, #4f2c16); }
.b-green, .btn.primary { background: linear-gradient(#93cf45, #64a422 50%, #437a12); color: #fff; }
.project { flex: 1; min-width: 0; max-width: 300px; height: 42px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--cream); color: #2a1709; font: 600 16px var(--cond); text-transform: uppercase; box-shadow: inset 0 2px 4px rgb(80 50 20 / .35); }
.project::placeholder { color: #9c8466; }
.btn.ghost { background: rgb(255 255 255 / .08); border: 1px solid var(--line); }
.btn.primary:disabled { opacity: .5; }
.wide { width: 100%; }

/* Sheets */
.sheet { border: 1px solid var(--line); padding: 0; width: min(560px, 100%); max-height: min(86dvh, 760px); border-radius: 20px; background: linear-gradient(#3a2313, #24150b); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .6); }
.sheet[open] { display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2, .9, .3, 1.1); }
.sheet::backdrop { background: rgb(10 5 2 / .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px 22px; }
.sheet-head h2 { margin: 0; font: 700 26px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .02em; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .08); border: 1px solid var(--line); }
.sheet-body { padding: 8px 22px calc(22px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }

.brand-list { display: grid; gap: 10px; }
.brand-card { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border-radius: 14px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); text-align: left; }
.brand-card strong { font: 700 20px/1.1 var(--cond); text-transform: uppercase; }
.brand-card span { color: var(--muted); font-size: 13px; }
.brand-card em { grid-row: 1 / 3; grid-column: 2; align-self: center; font: normal 700 24px/1 var(--cond); color: var(--orange); }
.brand-card .swatches { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.brand-card .swatches i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(255 255 255 / .3); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { padding: 8px 6px 10px; border-radius: 14px; background: radial-gradient(70% 60% at 50% 40%, #8a6040, #3a2313); border: 1px solid var(--line); display: grid; justify-items: center; gap: 2px; font: 700 18px var(--cond); text-transform: uppercase; }
.tile .mini { position: relative; width: 100%; aspect-ratio: 600 / 560; overflow: hidden; }
.tile .mini .inner { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 600 / 760; }
.tile:disabled { opacity: .35; cursor: not-allowed; }
.tile small { color: var(--muted); font: 500 12px var(--body); text-transform: none; }

.wheel-wrap { display: grid; justify-items: center; gap: 12px; }
.wheel { width: min(100%, 360px); aspect-ratio: 1; overflow: visible; filter: drop-shadow(0 10px 20px rgb(0 0 0 / .5)); }
.wheel path { cursor: pointer; transition: transform .18s; transform-origin: 200px 200px; stroke: #1b0f07; stroke-width: 2; }
.wheel path:hover, .wheel path:focus-visible { transform: scale(1.04); outline: none; }
.wheel path.on { transform: scale(1.08); stroke: #fff; stroke-width: 3; }
.wheel text { font-family: var(--cond); fill: var(--cream); text-anchor: middle; text-transform: uppercase; }

.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.size-grid button { padding: 12px 6px; border-radius: 12px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); display: grid; gap: 2px; }
.size-grid strong { font: 700 24px/1 var(--cond); }
.size-grid small { color: var(--muted); font-size: 11px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.art-grid button { aspect-ratio: 1; border-radius: 10px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); display: grid; place-items: center; }
.art-grid svg { width: 62%; height: 62%; fill: var(--orange); }

.acct-intro { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; color: var(--muted); }
.acct-intro img { width: 92px; border-radius: 10px; flex: none; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: rgb(0 0 0 / .3); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.tabs button { padding: 9px; border-radius: 999px; font: 600 16px var(--cond); text-transform: uppercase; color: var(--muted); }
.tabs button.on { background: var(--orange); color: #2a1404; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font: 600 14px var(--cond); text-transform: uppercase; color: var(--orange); letter-spacing: .04em; }
.field input { width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--cream); color: #2a1709; border: 0; box-shadow: inset 0 2px 4px rgb(80 50 20 / .35); font-size: 16px; }
.pw { position: relative; }
.pw input { padding-right: 50px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #7a5a3a; }
.eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgb(255 154 51 / .12); color: var(--orange); font-size: 13px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; border-radius: 8px; }
.cart-line small { display: block; color: var(--muted); }
.confirm-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: .25s; z-index: 20; background: var(--cream); color: #2a1709; padding: 11px 18px; border-radius: 999px; font: 600 15px var(--cond); text-transform: uppercase; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Phones and tablets in portrait: panel floats over the lower stage */
@media (max-width: 899px) {
  .panel {
    position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--steps-h, 56px) + 14px); max-height: 46%; overflow-y: auto; z-index: 4; gap: 8px;
    border-radius: var(--r); box-shadow: 0 10px 30px rgb(0 0 0 / .5);
  }
  .panel .card { background: rgb(40 23 12 / .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 12px; }
  .step1 .panel, .panel:empty, .panel:has(> .wide-only:only-child) { display: none; }
  .panel .mockups, .panel .wide-only { display: none; }
  .panel .text-input { min-height: 42px; }
  .panel .label-row { margin: 8px 0 6px; }
  .panel .actions { margin-top: 8px; }
  .panel .card:has(.sec-tabs) h3 { display: none; }
  .sec-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; padding: 3px; border-radius: 10px; background: rgb(0 0 0 / .25); }
  .sec-tabs button { padding: 7px 0; border-radius: 8px; font: 600 14px var(--cond); text-transform: uppercase; color: var(--muted); }
  .sec-tabs button.on { background: rgb(255 178 77 / .18); color: var(--cream); }
  .sec:not(.on) { display: none; }
  .sec .label-row { display: none; }
  .sec { margin-top: 8px; }
}
@media (max-width: 640px) {
  .bar { gap: 6px; }
  .bar button span { display: none; }
  .bar button { width: 38px; padding: 0; flex: none; }
  .bar #save { width: auto; padding: 0 12px; }
  .bar #save span { display: inline; }
  .bar #cart-go { display: none; }
  .project, .combo { max-width: none; }
  .sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; max-height: 88dvh; }
  .steps button { padding-left: 18px; }
}

/* Tablet landscape / desktop: panel beside the stage */
@media (min-width: 900px) {
  .main { grid-template-columns: minmax(0, 1fr) 380px; }
  .panel { overflow-y: auto; padding: 14px 16px 14px 0; }
  .sec-tabs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Flat product shirt (model picker tiles): color multiplied over the white shirt photo */
.flat { position: absolute; inset: 4% 8%; isolation: isolate; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.flat img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }
.sheen { mix-blend-mode: soft-light; background: center / 100% 100% no-repeat; transition: opacity .25s; }
.rim { mix-blend-mode: screen; pointer-events: none; }
.light { mix-blend-mode: screen; pointer-events: none; }

/* Image background tools */
.bg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bg-tools h3 { margin: 0 4px 0 0; }
.bg-tools .chip { padding: 7px 12px; }
.bg-tools .chip { display: inline-flex; align-items: center; gap: 6px; }
.bg-tools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hint.on { color: var(--orange); margin: 8px 0 0; }
.pick-mode .stage { cursor: crosshair; }

/* Design zoom (+ / -) */
.zoom { position: absolute; right: 10px; z-index: 3; display: none; flex-direction: column; border-radius: 999px; overflow: hidden;
  background: rgb(40 23 12 / .82); border: 1px solid rgb(255 178 77 / .35); }
.step2 .zoom { display: flex; }
.zoom button { width: 40px; height: 40px; color: var(--cream); font: 600 22px/1 var(--body); }
.zoom button + button { border-top: 1px solid rgb(255 178 77 / .2); }
.zoom button:disabled { opacity: .35; }

/* Flat view toggle (all steps) and the flat 2-D shirt */
.viewbtn { position: absolute; right: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: rgb(40 23 12 / .82); border: 1px solid rgb(255 178 77 / .35); color: var(--cream); font: 600 13px var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.viewbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.stage.flatview .backdrop { background: radial-gradient(70% 60% at 50% 45%, #5a3a22, #2a170b 70%, #140b05); }
.stage.flatview .figure { filter: drop-shadow(0 6px 10px rgb(0 0 0 / .3)); }
