/* Super Awesome T-Shirts — loud, friendly, touch-first. */
:root {
  --bg: #170b33;
  --bg2: #24124d;
  --ink: #fffaf0;
  --muted: #cfc3f5;
  --pink: #ff3ea5;
  --lime: #c6ff3d;
  --cyan: #2ee6ff;
  --sun: #ffd23f;
  --violet: #8b5cff;
  --card: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.16);
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --ui: "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;
  --r: 22px;
  --tap: 56px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 700 17px/1.4 var(--ui); overflow-x: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ---------- background: drifting color blobs + floating stickers */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(1200px 800px at 80% -10%, #3b1a7a 0%, transparent 60%), radial-gradient(900px 700px at -10% 110%, #3a0f4f 0%, transparent 60%), var(--bg); }
.blob { position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%; filter: blur(70px); opacity: 0.45; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.b1 { background: var(--pink); left: -18vmax; top: -12vmax; }
.b2 { background: var(--cyan); right: -20vmax; top: 18vh; animation-duration: 27s; opacity: 0.3; }
.b3 { background: var(--violet); left: 20vw; bottom: -30vmax; animation-duration: 31s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.12); } }
body:not([data-screen="welcome"]) .floaters { display: none; } /* keep the contact sheet clean */
.floaters img { position: absolute; width: clamp(70px, 9vw, 130px); opacity: 0.22; filter: saturate(1.2); animation: float 18s linear infinite; }
@keyframes float { from { transform: translateY(110vh) rotate(var(--r0)); } to { transform: translateY(-30vh) rotate(var(--r1)); } }

main { position: relative; z-index: 2; }
.screen { display: none; min-height: 100svh; padding: max(16px, env(safe-area-inset-top)) clamp(16px, 3vw, 40px) max(24px, env(safe-area-inset-bottom)); }
.screen.is-on { display: block; animation: pop-in 0.35s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- buttons */
.big-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 0 34px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; font: 400 clamp(1.3rem, 2.4vw, 1.7rem)/1 var(--display); letter-spacing: 0.02em; box-shadow: 0 6px 0 #5a1c8f, 0 14px 30px rgba(255, 62, 165, 0.35); transition: transform 0.12s, box-shadow 0.12s; }
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #5a1c8f, 0 8px 18px rgba(255, 62, 165, 0.3); }
.big-btn:disabled { filter: grayscale(0.7) brightness(0.8); cursor: default; }
.ghost-btn { min-height: var(--tap); padding: 0 22px; border-radius: 999px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.06); font-weight: 800; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: rgba(23, 11, 51, 0.6); backdrop-filter: blur(6px); font-weight: 800; font-size: 15px; }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- top bar + steps */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.back { width: var(--tap); height: var(--tap); flex: none; border-radius: 50%; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.06); font-size: 24px; font-weight: 900; }
.top-spacer { width: var(--tap); flex: none; }
.steps { flex: 1; display: flex; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 15px; font-weight: 800; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; font-size: 13px; }
.steps li.is-on { background: var(--ink); color: var(--bg); }
.steps li.is-done { color: var(--lime); }
.steps li.is-done::before { content: "✓"; }
.screen-title { font: 400 clamp(2rem, 5vw, 3.4rem)/1 var(--display); margin: 14px 0 16px; text-align: center; letter-spacing: 0.01em; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }

/* ---------- welcome */
.screen-welcome.is-on { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 2vw; }
.welcome-copy { position: relative; z-index: 3; text-align: left; padding-left: clamp(0px, 2vw, 40px); }
.logo { margin: 18px 0 14px; font: 400 clamp(3.4rem, 9.5vw, 8.4rem)/0.86 var(--display); letter-spacing: 0.01em; display: flex; flex-direction: column; transform: rotate(-4deg); transform-origin: left center; }
.logo span { width: fit-content; -webkit-text-stroke: 0; paint-order: stroke fill; text-shadow: 0 0.06em 0 #000, 0.035em 0.09em 0 rgba(0, 0, 0, 0.35); }
.logo span:nth-child(1) { color: var(--sun); }
.logo span:nth-child(2) { color: var(--ink); margin-left: 0.35em; }
.logo span:nth-child(3) { background: linear-gradient(90deg, var(--pink), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0.06em 0 #000); animation: shimmer 4s linear infinite; background-size: 200% 100%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tagline { font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 900; margin: 18px 0 26px; color: var(--ink); }
.small-print { color: var(--muted); margin-top: 18px; font-size: 15px; }
.shop-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 2px solid var(--line); font-size: 15px; font-weight: 800; }
.shop-pill i { width: 12px; height: 12px; border-radius: 50%; background: #888; }
.shop-pill.open i { background: var(--lime); box-shadow: 0 0 0 0 rgba(198, 255, 61, 0.7); animation: ping 1.6s infinite; }
@keyframes ping { to { box-shadow: 0 0 0 12px rgba(198, 255, 61, 0); } }
#startBtn { animation: bounce 2.4s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.welcome-stage-slot { height: min(88svh, 900px); }

/* ---------- 3D stage (moved into whichever slot is active) */
.stage { position: fixed; z-index: 1; left: 0; top: 0; width: 0; height: 0; transition: none; }
.stage canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.stage-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); text-align: center; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, 0.15); border-top-color: var(--pink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-hud { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; width: max-content; max-width: 100%; }
.stage-hud .hint { color: var(--muted); font-size: 13px; padding: 0 6px; }

/* ---------- pick */
.filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.filters .chip { min-height: 48px; font-size: 16px; }
/* contact sheet: lots of designs at a glance */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(8px, 1.2vw, 14px); max-width: 1400px; margin: 0 auto; }
.card { position: relative; padding: 8px 8px 10px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); text-align: center; display: grid; gap: 6px; transition: transform 0.15s, background 0.15s; }
.card:hover { background: rgba(255, 255, 255, 0.12); }
.card:active { transform: scale(0.97); }
.card .art { aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.14), transparent 70%); }
.card .art img { width: 92%; height: 92%; object-fit: contain; transform: rotate(var(--tilt, -3deg)); transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35)); }
.card:hover .art img, .card:focus-visible .art img { transform: rotate(0deg) scale(1.06); }
.card b { font: 400 1rem/1.1 var(--display); letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-own { border-style: dashed; border-color: rgba(46, 230, 255, 0.6); background: rgba(46, 230, 255, 0.08); }
.card-own .art { background: none; }
.own-plus { display: grid; place-items: center; width: 64%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--violet)); font: 400 3rem/1 var(--display); color: #fff; }
.card .tag { position: absolute; top: 6px; right: 6px; z-index: 1; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 999px; background: var(--lime); color: #142000; }

/* ---------- try on */
.try-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); gap: clamp(12px, 2vw, 28px); align-items: start; }
.try-stage-slot { height: calc(100svh - 110px); min-height: 460px; border-radius: 28px; background: radial-gradient(ellipse at 50% 85%, rgba(139, 92, 255, 0.35), transparent 60%), rgba(255, 255, 255, 0.04); border: 2px solid var(--line); }
.panel { display: grid; gap: 18px; padding: 18px; border-radius: 28px; background: rgba(23, 11, 51, 0.72); border: 2px solid var(--line); backdrop-filter: blur(10px); }
.picked { display: flex; gap: 14px; align-items: center; }
.picked img { width: 84px; height: 84px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.picked b { display: block; font: 400 1.6rem/1 var(--display); }
.picked span { color: var(--muted); font-size: 15px; }
.field { display: grid; gap: 10px; }
.label { font-size: 14px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { flex: 1 1 auto; min-height: var(--tap); padding: 0 16px; border-radius: 16px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.05); font-weight: 900; font-size: 16px; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 50px; height: 50px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); background: var(--c); position: relative; }
.swatches button[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--pink); transform: scale(1.08); }
.swatches button[aria-checked="true"]::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: var(--tick, #fff); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.sizes button { min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.05); font-weight: 900; }
.sizes button[aria-checked="true"] { background: var(--lime); color: #142000; border-color: var(--lime); }
.sizes small { display: block; font-size: 10px; font-weight: 800; opacity: 0.7; }
.label small { text-transform: none; letter-spacing: 0; font-weight: 700; opacity: 0.8; }
.fit-note { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.other-note { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(46, 230, 255, 0.1); border: 2px dashed rgba(46, 230, 255, 0.5); font-size: 15px; }
.panel-actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.panel-actions .big-btn { flex: 1; }

/* ---------- send + done */
.send-card, .done-card { max-width: 620px; margin: 4vh auto 0; padding: clamp(20px, 4vw, 36px); border-radius: 32px; background: rgba(23, 11, 51, 0.78); border: 2px solid var(--line); backdrop-filter: blur(10px); display: grid; gap: 18px; text-align: center; }
.summary { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; text-align: left; padding: 14px; border-radius: 20px; background: rgba(255, 255, 255, 0.06); }
.summary img { width: 120px; height: 120px; object-fit: contain; }
.summary b { font: 400 1.5rem/1.05 var(--display); display: block; margin-bottom: 6px; }
.summary .dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; border: 2px solid rgba(255, 255, 255, 0.5); margin-right: 4px; }
.summary.small { grid-template-columns: 80px 1fr; }
.summary.small img { width: 80px; height: 80px; }
.name-label { font: 400 clamp(1.5rem, 3.6vw, 2.1rem)/1.1 var(--display); }
#name { width: 100%; min-height: 72px; border-radius: 20px; border: 3px solid var(--line); background: rgba(0, 0, 0, 0.25); color: var(--ink); font: 900 1.8rem/1 var(--ui); text-align: center; padding: 0 16px; }
#name:focus { border-color: var(--cyan); outline: none; }
.err { color: #ff9ac9; min-height: 1.2em; margin: 0; font-size: 15px; }
.closed-note { margin: 0; color: var(--sun); }
.rocket { width: 100%; }
.done-kicker { margin: 0; font-size: 1.3rem; font-weight: 900; color: var(--muted); }
.order-no { margin: 0; font: 400 clamp(5rem, 22vw, 10rem)/0.9 var(--display); color: var(--sun); text-shadow: 0 0.06em 0 #000; animation: wobble 1.2s ease-in-out infinite alternate; }
@keyframes wobble { from { transform: rotate(-3deg) scale(1); } to { transform: rotate(3deg) scale(1.04); } }
.done-status { margin: 0; font-size: 1.25rem; font-weight: 900; }
.done-status.ready { color: var(--lime); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 30px; z-index: 50; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 900; opacity: 0; pointer-events: none; transition: opacity 0.2s, translate 0.2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- kiosk tweaks (iPad at the table) */
.kiosk .small-print::after { content: " Tap anywhere to start!"; }

/* ---------- phones / portrait */
@media (max-width: 820px), (orientation: portrait) and (max-width: 1100px) {
  .screen-welcome.is-on { grid-template-columns: 1fr; grid-template-rows: auto 1fr; text-align: center; gap: 0; }
  .welcome-copy { text-align: center; padding: 0; }
  .logo { align-items: center; transform: rotate(-3deg); transform-origin: center; }
  .logo span:nth-child(2) { margin-left: 0; }
  .welcome-stage-slot { height: 46svh; min-height: 320px; }
  .try-layout { grid-template-columns: 1fr; }
  .try-stage-slot { height: 56svh; min-height: 360px; }
  .steps li { padding: 6px 8px; font-size: 13px; }
  .steps li::before { width: 22px; height: 22px; }
}
@media (max-width: 420px) {
  .steps li { font-size: 0; gap: 0; }
  .steps li::before { font-size: 12px; }
  .summary { grid-template-columns: 90px 1fr; }
  .summary img { width: 90px; height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* bring-your-own-design dialog */
dialog.own { width: min(460px, 92vw); border: 2px solid var(--line); border-radius: 28px; background: #1f1145; color: var(--ink); padding: 24px; text-align: center; }
dialog.own::backdrop { background: rgba(10, 4, 30, 0.7); backdrop-filter: blur(4px); }
dialog.own h2 { font: 400 1.8rem/1.1 var(--display); margin: 0 0 16px; }
.own-btn { display: flex; align-items: center; justify-content: center; min-height: 64px; border-radius: 999px; background: linear-gradient(135deg, var(--pink), var(--violet)); font: 400 1.3rem/1 var(--display); cursor: pointer; box-shadow: 0 6px 0 #5a1c8f; }
.own-or { color: var(--muted); margin: 16px 0 8px; font-size: 15px; }
.own-link { display: flex; gap: 8px; }
.own-link input { flex: 1; min-width: 0; min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: rgba(0, 0, 0, 0.25); color: var(--ink); font: 700 16px var(--ui); padding: 0 12px; }
.own-link button { min-height: 52px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--ink); color: var(--bg); font-weight: 900; }
.own-tip, .own-closed { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.own-closed { color: var(--sun); font-size: 16px; }
dialog.own .ghost-btn { margin-top: 14px; }

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .card { padding: 6px 6px 8px; border-radius: 14px; gap: 4px; }
  .card b { font-size: 0.8rem; }
  .card .tag { font-size: 9px; padding: 2px 6px; }
  .own-plus { font-size: 2rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; scrollbar-width: none; }
  .filters .chip { flex: none; min-height: 40px; font-size: 14px; }
  .screen-title { font-size: 1.8rem; margin: 6px 0 10px; }
}
