/* MADE4ME kiosk – touch UI.
   One dark stage; products float on it, controls are frosted glass.
   Brand colours come from config.json → brand.colors at runtime (--electric, --deep, --sand).
   All sizes are rem and the root size follows the screen, so the layout scales from a phone
   to the 32" portrait touchscreen (1080 × 1920 → 1rem = 16px). */
@font-face { font-family: 'Outfit'; src: url('/shared/fonts/outfit-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Outfit'; src: url('/shared/fonts/outfit-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'pz-modern'; src: url('/shared/fonts/montserrat-800.woff'); }
@font-face { font-family: 'pz-script'; src: url('/shared/fonts/pacifico-400.woff'); }
@font-face { font-family: 'pz-classic'; src: url('/shared/fonts/playfair-900.woff'); }

:root {
  --electric: #F04A37; --deep: #1D1A3A; --blueprint: #1D1A3A; --sand: #FFC23D; --soft: #FFF4EE;
  --night: color-mix(in srgb, var(--deep) 62%, #05040c);
  --ink: #F7F4FF; --muted: color-mix(in srgb, var(--ink) 58%, transparent); --faint: color-mix(in srgb, var(--ink) 34%, transparent);
  --glass: rgba(255, 255, 255, .07); --glass-2: rgba(255, 255, 255, .12); --line: rgba(255, 255, 255, .14);
  --ok: #4ADE80; --bad: #FF8A7A;
  --r: 1.5rem; --ease: cubic-bezier(.22, .9, .24, 1);
  --font: 'Outfit', 'Segoe UI', system-ui, sans-serif;
}
html { font-size: clamp(10px, 1.4815vmin, 26px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--ink); font-family: var(--font);
  user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-font-smoothing: antialiased; }
img { -webkit-user-drag: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
input { font: inherit; color: inherit; user-select: text; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.ic { width: 1.5em; height: 1.5em; flex: none; }
:focus-visible { outline: .19rem solid var(--sand); outline-offset: .19rem; }

/* ---------- the stage ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--deep) 70%, #6a4bd8) 0%, transparent 62%), var(--night); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(7rem); opacity: .5; will-change: transform; }
.aurora i:nth-child(1) { width: 46rem; height: 46rem; left: -14rem; top: 18%; background: color-mix(in srgb, var(--electric) 60%, transparent); animation: drift-a 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 40rem; height: 40rem; right: -12rem; top: 46%; background: #5b3fd6; animation: drift-b 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 34rem; height: 34rem; left: 22%; bottom: -16rem; background: color-mix(in srgb, var(--sand) 45%, transparent); opacity: .28; animation: drift-a 38s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate(9rem, -7rem) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-8rem, 6rem) scale(.9); } }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s; }
.screen.active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .45s ease; }

/* ---------- buttons ---------- */
.cta { background: linear-gradient(180deg, color-mix(in srgb, var(--electric) 88%, white), var(--electric)); color: #fff; font-weight: 700; font-size: 1.5rem;
  padding: 1.35rem 2.75rem; border-radius: 999px; box-shadow: 0 .9rem 2.6rem color-mix(in srgb, var(--electric) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s var(--ease), filter .18s; }
.cta:active { transform: scale(.96); filter: brightness(1.1); }
.cta:disabled { background: var(--glass-2); color: var(--faint); box-shadow: none; }
.cta.wide { width: 100%; }
.ghost { padding: .9rem 1.75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-weight: 600; font-size: 1.125rem; }
.pulse { animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 .9rem 2.6rem color-mix(in srgb, var(--electric) 45%, transparent), 0 0 0 0 color-mix(in srgb, var(--electric) 50%, transparent); }
  50% { box-shadow: 0 .9rem 2.6rem color-mix(in srgb, var(--electric) 45%, transparent), 0 0 0 1.8rem transparent; } }

/* ---------- attract ---------- */
#attract { align-items: center; justify-content: center; overflow: hidden; }
.floaters { position: absolute; inset: 0; }
.floaters img { position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; object-fit: contain; translate: -50% -50%;
  filter: blur(var(--b, 0)) drop-shadow(0 2rem 2rem rgba(0,0,0,.35)); opacity: var(--o, 1);
  animation: bob var(--d, 7s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes bob { from { transform: translateY(-.9rem) rotate(-2.5deg); } to { transform: translateY(.9rem) rotate(2.5deg); } }
.attract-content { position: relative; text-align: center; padding: 2.5rem; max-width: 62rem; }
.attract-content h1 { font-size: 6.4rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; margin: .6rem 0 1.4rem; }
.attract-content p { font-size: 1.85rem; line-height: 1.35; color: var(--muted); margin: 0 auto 3.2rem; max-width: 26em; }
.station-tag { position: absolute; left: 50%; bottom: 2.4rem; transform: translateX(-50%); font-size: 1rem; font-weight: 500; color: var(--faint); letter-spacing: .04em; }
.attract-lang { position: absolute; top: 1.5rem; right: 1.75rem; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.75rem .6rem; flex: none; }
.logo { display: flex; align-items: center; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); padding: .2rem; backdrop-filter: blur(1rem); }
.lang-switch button { padding: .6rem 1rem; font-weight: 600; color: var(--muted); border-radius: 999px; font-size: 1rem; }
.lang-switch button.on { background: var(--ink); color: var(--night); }
.cart-btn { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem .8rem 1.3rem; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line);
  font-weight: 600; font-size: 1.15rem; backdrop-filter: blur(1rem); }
.cart-btn b { background: var(--sand); color: #1a1408; min-width: 2rem; height: 2rem; border-radius: 1rem; display: grid; place-items: center; padding: 0 .5rem; font-weight: 700; }
.cart-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.14); } }
.back { display: flex; align-items: center; gap: .35rem; font-size: 1.2rem; font-weight: 600; padding: .8rem 1.4rem .8rem .9rem; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(1rem); }
.title { font-size: 1.6rem; font-weight: 600; }

/* ---------- browse ---------- */
.browse-head { padding: .6rem 1.75rem 0; flex: none; transition: opacity .5s ease, transform .6s var(--ease); }
.browse-head h1 { font-size: 3.3rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: .4rem 0 1.4rem; }
.search { position: relative; }
.search input { width: 100%; height: 4.5rem; border-radius: 999px; border: 1px solid var(--line); padding: 0 4rem; font-size: 1.5rem; background: var(--glass); outline: none;
  backdrop-filter: blur(1.2rem); transition: border-color .2s, background .2s; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--sand); background: var(--glass-2); }
.search-icon { z-index: 1; position: absolute; left: 1.5rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.15rem; display: grid; }
.search-clear { z-index: 1; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%; background: var(--glass-2); }
.cats { display: flex; gap: .7rem; padding: 1.1rem 1.75rem 1.1rem; margin: 0 -1.75rem; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.75rem, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 1.75rem, #000 calc(100% - 3rem), transparent); }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; padding: .85rem 1.35rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 1.2rem; font-weight: 500; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s; }
.cats button.on { background: var(--ink); border-color: var(--ink); color: var(--night); font-weight: 600; }

.grid-wrap { flex: 1; overflow-y: auto; padding: 1.5rem 1.75rem 8rem; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 2.5rem, #000 calc(100% - 7rem), transparent); mask-image: linear-gradient(transparent, #000 2.5rem, #000 calc(100% - 7rem), transparent); }
.grid-wrap::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2.2rem 1.4rem; }

/* a product: no box, it just floats */
.piece { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 .3rem; position: relative;
  opacity: 0; animation: arrive .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
  transition: filter .9s ease, opacity .9s ease, transform 1s var(--ease); }
@keyframes arrive { from { opacity: 0; transform: translateY(3rem) scale(.86); filter: blur(.8rem); } to { opacity: 1; transform: none; filter: none; } }
.piece .obj { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 5rem;
  animation: bob var(--d, 6s) ease-in-out var(--dl, 0s) infinite alternate; }
.piece .obj::before { content: ''; position: absolute; inset: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.2), rgba(255,255,255,.06) 55%, transparent); transition: transform .5s var(--ease), opacity .5s; }
.piece .obj img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1.6rem 1.4rem rgba(0,0,0,.45)); transition: transform .35s var(--ease); }
.piece:active .obj img { transform: scale(1.08); }
.piece:active .obj::before { transform: scale(1.2); }
.piece .name { font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin-top: .5rem; text-wrap: balance;
  min-height: 2.4em; display: flex; align-items: center; justify-content: center; }   /* always two lines high, so prices and tags line up across a row */
.piece .from { color: var(--muted); font-size: 1.1rem; margin-top: .3rem; }
.piece .tags { display: flex; gap: .4rem; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: .55rem; min-height: 1.7rem; }
.piece .tag { line-height: 1.3; white-space: nowrap; font-size: .85rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; background: var(--glass-2); color: var(--muted); }
.piece .tag.own { background: color-mix(in srgb, var(--sand) 22%, transparent); color: var(--sand); }
/* tapped: the chosen one flies to the stage, the others melt into the background */
.grid.leaving .piece { filter: blur(1.4rem); opacity: 0; transform: scale(.7); transition-delay: calc(var(--dist, 0) * 55ms); pointer-events: none; animation: none; }
.grid.leaving .piece.picked { transition: none; opacity: 0; filter: none; }
#browse.leaving .browse-head, #browse.leaving .topbar { opacity: 0; transform: translateY(-1.5rem); }
#browse .topbar { transition: opacity .5s ease, transform .6s var(--ease); }
.flyer { position: fixed; z-index: 60; pointer-events: none; background: center / contain no-repeat; transform-origin: 0 0; will-change: transform, opacity;
  filter: drop-shadow(0 2.5rem 2.5rem rgba(0,0,0,.45)); display: grid; place-items: center; font-size: 5rem; }
.empty { text-align: center; padding: 5rem 2rem; font-size: 1.5rem; color: var(--muted); }

/* ---------- detail ---------- */
.detail { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(26rem, 34rem); min-height: 0; }
.stage { position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.viewer-wrap { position: relative; flex: 1; min-height: 0; }
.pool { position: absolute; left: 50%; top: 52%; width: min(86%, 46rem); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.2), rgba(255,255,255,.05) 60%, transparent); }
.viewer { position: absolute; inset: 0; transition: opacity .5s ease; }
.viewer.loading { opacity: 0; }
.viewer canvas { display: block; touch-action: none; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.dims { position: absolute; left: 1.75rem; bottom: 1rem; padding: .7rem 1.1rem; border-radius: 1.1rem; font-size: 1.25rem; font-weight: 600;
  background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(1rem); }
.dims small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: .1rem; }
.hint { position: absolute; right: 1.75rem; bottom: 1.6rem; color: var(--faint); font-size: 1rem; }
#detail.active .hint { animation: hint-out .8s ease 7s forwards; }
@keyframes hint-out { to { opacity: 0; } }
.refbar { display: flex; align-items: center; gap: .9rem; flex: none; padding: .7rem 1.75rem 1.1rem; }
.reflabel { font-weight: 600; font-size: 1.1rem; white-space: nowrap; }
#refButtons { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; flex: 1; padding-right: 2rem;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); }
#refButtons::-webkit-scrollbar { display: none; }
#refButtons button { flex: none; padding: .65rem 1.05rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-weight: 500; font-size: 1.05rem; white-space: nowrap; transition: background .25s, color .25s; }
#refButtons button.on { background: var(--ink); border-color: var(--ink); color: var(--night); font-weight: 600; }

/* the frosted sheet with all choices */
.config { position: relative; overflow-y: auto; display: flex; flex-direction: column; padding: 1.9rem 2.1rem 0; scrollbar-width: none;
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05)); border: 1px solid var(--line); border-bottom: 0;
  backdrop-filter: blur(2.2rem) saturate(1.3); -webkit-backdrop-filter: blur(2.2rem) saturate(1.3); }
.config::-webkit-scrollbar { display: none; }
#detail .config { transform: translateY(3rem); opacity: 0; transition: transform .7s var(--ease) .15s, opacity .5s ease .15s; }
#detail.active .config { transform: none; opacity: 1; }
.cat-label { color: var(--sand); font-weight: 500; font-size: 1.05rem; }
.config h2 { font-size: 2.6rem; font-weight: 700; margin: .25rem 0 .5rem; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
.desc { color: var(--muted); font-size: 1.15rem; line-height: 1.45; max-width: 44em; }
.config h3 { margin: 1.6rem 0 .7rem; font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.config h3 small { color: var(--muted); font-weight: 500; margin-left: .5rem; font-size: 1rem; }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .7rem; }
.sizes button { border: 1px solid var(--line); background: var(--glass); border-radius: 1.1rem; padding: .85rem .5rem; text-align: center; transition: background .25s, border-color .25s, transform .2s var(--ease); }
.sizes button b { display: block; font-size: 1.6rem; font-weight: 700; }
.sizes button span { display: block; color: var(--muted); font-size: .95rem; }
.sizes button i { display: block; font-style: normal; font-weight: 600; margin-top: .25rem; font-size: 1.05rem; }
.sizes button.on { background: var(--ink); border-color: var(--ink); color: var(--night); transform: translateY(-.15rem); }
.sizes button.on span { color: color-mix(in srgb, var(--night) 60%, transparent); }
.tabs { display: flex; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: .25rem; }
.tabs button { flex: 1; padding: .75rem; border-radius: 999px; font-weight: 600; font-size: 1.1rem; color: var(--muted); transition: background .25s, color .25s; }
.tabs button.on { background: var(--ink); color: var(--night); }
.tabs button:disabled { opacity: .3; }
.finish-tabs { display: flex; gap: .5rem; margin-top: .9rem; }
.finish-tabs button { padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; font-size: 1.05rem; background: var(--glass); }
.finish-tabs button.on { border-color: var(--sand); color: var(--sand); background: color-mix(in srgb, var(--sand) 12%, transparent); }
.finish-tabs button small { color: var(--faint); margin-left: .35rem; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); gap: .7rem; margin-top: .9rem; }
.swatch { aspect-ratio: 1; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 .3rem .8rem rgba(0,0,0,.35); transition: transform .25s var(--ease), box-shadow .25s; }
.swatch.matte { background-image: radial-gradient(circle at 35% 30%, rgba(255,255,255,.2), rgba(255,255,255,0) 60%); }
.swatch.glossy { background-image: radial-gradient(circle at 32% 28%, rgba(255,255,255,.8), rgba(255,255,255,0) 32%), linear-gradient(160deg, rgba(255,255,255,.15), rgba(0,0,0,.14)); }
.swatch.silk { background-image: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,0) 45%, rgba(0,0,0,.18)); }
.swatch.on { transform: scale(1.14); box-shadow: 0 0 0 .2rem var(--night), 0 0 0 .42rem var(--ink), 0 .4rem 1.2rem rgba(0,0,0,.5); z-index: 1; }
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; margin-top: .9rem; }
.variant { display: flex; align-items: center; gap: .8rem; border: 1px solid var(--line); background: var(--glass); border-radius: 1.1rem; padding: .75rem 1rem; font-weight: 500; font-size: 1.1rem; text-align: left; transition: background .25s, color .25s; }
.variant.on { background: var(--ink); border-color: var(--ink); color: var(--night); font-weight: 600; }
.dots { display: flex; flex: none; }
.dots i { width: 1.6rem; height: 1.6rem; border-radius: 50%; margin-left: -.5rem; box-shadow: 0 0 0 .12rem rgba(255,255,255,.7), 0 .15rem .4rem rgba(0,0,0,.4); }
.dots i:first-child { margin-left: 0; }
.color-name { margin-top: .7rem; color: var(--muted); font-size: 1rem; min-height: 1.4rem; }
.buy-bar { position: sticky; bottom: 0; margin: auto -2.1rem 0; padding: 1.6rem 2.1rem 1.6rem; z-index: 2;
  background: color-mix(in srgb, var(--night) 88%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(1.6rem); -webkit-backdrop-filter: blur(1.6rem); padding-top: 1.1rem; }
.config > :nth-last-child(2) { margin-bottom: 1.6rem; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); background: var(--glass); border-radius: 999px; }
.qty button { width: 3.6rem; height: 3.6rem; font-size: 1.8rem; font-weight: 500; }
.qty span { min-width: 2.2rem; text-align: center; font-size: 1.5rem; font-weight: 600; }
.price-box { text-align: right; }
.price { font-size: 2.8rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ready { color: var(--muted); font-size: 1rem; margin-top: .3rem; }

/* personalisation */
.pz { border-radius: 1.5rem; padding: .2rem 1.4rem 1.3rem; margin-top: 1.3rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--sand) 16%, transparent), color-mix(in srgb, var(--electric) 12%, transparent)); border: 1px solid color-mix(in srgb, var(--sand) 40%, transparent); }
.pz h3 { margin-top: 1.1rem; }
.pz-field { margin-bottom: .8rem; }
.pz-field label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; font-size: 1.05rem; margin-bottom: .4rem; }
.pz-field label small { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.pz-field input { width: 100%; font-size: 1.9rem; font-weight: 600; padding: .8rem 1.1rem; border-radius: 1rem; border: 1px solid var(--line); background: rgba(0,0,0,.25); outline: none; transition: border-color .2s, box-shadow .2s; }
.pz-field input::placeholder { color: var(--faint); font-weight: 400; }
.pz-field input:focus { border-color: var(--sand); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--sand) 22%, transparent); }
.pz-field.bad input { border-color: var(--bad); }
.pz-field .pz-err { color: var(--bad); font-weight: 500; font-size: 1rem; min-height: 1.25rem; margin-top: .3rem; }
.pz-row { display: flex; align-items: center; gap: .9rem; margin-top: .5rem; }
.pz-row > span { font-weight: 500; font-size: 1.05rem; min-width: 5.5rem; }
.pz-fonts { display: flex; gap: .5rem; flex-wrap: wrap; }
.pz-fonts button { padding: .45rem 1.1rem; border-radius: .9rem; border: 1px solid var(--line); background: var(--glass); font-size: 1.35rem; line-height: 1.3; transition: background .25s, color .25s; }
.pz-fonts button.on { background: var(--ink); border-color: var(--ink); color: var(--night); }
.pz-colors { display: flex; gap: .55rem; overflow-x: auto; padding: .5rem .3rem; flex: 1; scrollbar-width: none; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent); }
.pz-colors::-webkit-scrollbar { display: none; }
.pz-colors button { flex: 0 0 2.5rem; height: 2.5rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); transition: transform .2s var(--ease); }
.pz-colors button.same { flex-basis: auto; border-radius: 999px; padding: 0 1rem; font-weight: 500; font-size: 1rem; background: var(--glass); border: 1px solid var(--line); box-shadow: none; white-space: nowrap; }
.pz-colors button.on { transform: scale(1.12); box-shadow: 0 0 0 .15rem var(--night), 0 0 0 .34rem var(--ink); }
.pz-colors button.same.on { background: var(--ink); color: var(--night); box-shadow: none; transform: none; }
.pz-hint { color: var(--sand); font-weight: 500; font-size: 1rem; margin-top: .5rem; }

/* ---------- cart drawer ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(5, 4, 12, .55); backdrop-filter: blur(.5rem); z-index: 20; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(36rem, 94vw); z-index: 21; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.06)), color-mix(in srgb, var(--night) 82%, transparent); border-left: 1px solid var(--line);
  backdrop-filter: blur(2.5rem) saturate(1.3); -webkit-backdrop-filter: blur(2.5rem) saturate(1.3);
  transform: translateX(105%); transition: transform .55s var(--ease); border-radius: 2.2rem 0 0 2.2rem; }
.drawer.open { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 1.75rem 2rem 1rem; }
.drawer h2 { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.x { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--glass-2); font-size: 1.25rem; }
.drawer-items { flex: 1; overflow-y: auto; padding: .5rem 2rem; scrollbar-width: none; }
.drawer footer { padding: 1.25rem 2rem 2rem; }
.line { display: grid; grid-template-columns: 7rem 1fr auto; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.line img, .line .ph { width: 7rem; height: 7rem; object-fit: contain; display: grid; place-items: center; font-size: 2.2rem; filter: drop-shadow(0 .6rem .6rem rgba(0,0,0,.4)); }
.line .n { font-weight: 600; font-size: 1.2rem; }
.line .m { color: var(--muted); font-size: 1rem; margin-top: .15rem; }
.line .pzt { color: var(--sand); font-weight: 500; }
.line .pzt:empty { display: none; }
.line .r { text-align: right; }
.line .p { font-weight: 600; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.line .rm { color: var(--bad); font-weight: 500; padding: .5rem 0; font-size: 1rem; }
.totals { font-size: 1.15rem; margin-bottom: 1rem; }
.totals div { display: flex; justify-content: space-between; padding: .25rem 0; }
.totals .sum { font-size: 1.8rem; font-weight: 700; border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .8rem; font-variant-numeric: tabular-nums; }
.totals small { color: var(--muted); }

/* ---------- checkout ---------- */
.checkout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(24rem, 30rem); min-height: 0; gap: 1.5rem; padding: 0 1.75rem; }
.co-form { padding: 1rem .5rem 20rem; overflow-y: auto; scrollbar-width: none; }
.co-summary { background: var(--glass); border: 1px solid var(--line); border-radius: 1.75rem; padding: 1.5rem 1.75rem; overflow-y: auto; scrollbar-width: none; backdrop-filter: blur(1.5rem); margin-bottom: 1.75rem; }
.co-summary h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: .4rem; }
.steps { display: flex; gap: .6rem; margin-bottom: 1.6rem; }
.step { padding: .55rem 1.2rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-weight: 500; color: var(--muted); }
.step i { font-style: normal; }
.step.on { background: var(--ink); color: var(--night); border-color: var(--ink); font-weight: 600; }
.delivery { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: 1.3rem; }
.delivery button { border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.1rem 1.2rem; text-align: left; background: var(--glass); transition: background .25s, color .25s; }
.delivery button b { display: block; font-size: 1.3rem; font-weight: 600; }
.delivery button small { color: var(--muted); font-size: 1.05rem; }
.delivery button.on { background: var(--ink); border-color: var(--ink); color: var(--night); }
.delivery button.on small { color: color-mix(in srgb, var(--night) 60%, transparent); }
.co-form label { display: block; font-weight: 500; font-size: 1.1rem; margin-bottom: 1rem; color: var(--muted); }
.co-form input { display: block; width: 100%; height: 4.2rem; margin-top: .4rem; border-radius: 1.1rem; border: 1px solid var(--line); padding: 0 1.2rem; font-size: 1.5rem; font-weight: 500; background: var(--glass); outline: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.co-form input:focus { border-color: var(--sand); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--sand) 22%, transparent); }
.row2 { display: grid; grid-template-columns: 11rem 1fr; gap: .9rem; }
.err { background: color-mix(in srgb, var(--bad) 16%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); color: #ffd3cc; padding: .9rem 1.2rem; border-radius: 1rem; margin: .6rem 0 1rem; font-weight: 500; font-size: 1.1rem; }
.paychoices { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.paychoices button { border: 1px solid var(--line); border-radius: 1.75rem; padding: 2.2rem 1.5rem; background: var(--glass); text-align: center; backdrop-filter: blur(1.5rem); transition: transform .2s var(--ease), background .2s; }
.paychoices button:active { transform: scale(.97); background: var(--glass-2); }
.paychoices .big { display: block; font-size: 4rem; }
.paychoices b { display: block; font-size: 1.7rem; font-weight: 700; margin: .6rem 0 .35rem; }
.paychoices small { color: var(--muted); font-size: 1.1rem; }

/* ---------- done ---------- */
.done { margin: auto; text-align: center; padding: 2.5rem; max-width: 52rem; }
.check { width: 9rem; height: 9rem; border-radius: 50%; background: var(--ok); color: #052e14; display: grid; place-items: center; margin: 0 auto 2rem;
  box-shadow: 0 0 0 1.4rem color-mix(in srgb, var(--ok) 14%, transparent), 0 0 6rem color-mix(in srgb, var(--ok) 50%, transparent); }
.check svg { width: 5rem; height: 5rem; }
#done.active .check { animation: pop .8s var(--ease) both; }
#done.active .check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s ease .35s forwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h1 { font-size: 3.4rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: 1.6rem; text-wrap: balance; }
.order-no { display: inline-block; background: var(--glass-2); border: 1px solid var(--line); padding: 1.1rem 2.6rem; border-radius: 1.5rem; margin-bottom: 1.4rem; backdrop-filter: blur(1.5rem); }
.order-no small { display: block; color: var(--muted); font-size: 1rem; }
.order-no b { font-size: 3rem; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.done p { font-size: 1.5rem; line-height: 1.4; margin-bottom: 1rem; }
.done .cta { margin-top: 1.2rem; }
.cash-note { background: color-mix(in srgb, var(--sand) 18%, transparent); border: 1px solid color-mix(in srgb, var(--sand) 50%, transparent); color: var(--sand); padding: 1rem 1.5rem; border-radius: 1.1rem; font-weight: 600; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; background: rgba(5, 4, 12, .6); backdrop-filter: blur(1.2rem); z-index: 40; display: grid; place-items: center; animation: fade .3s ease; }
.pay-box { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07)); border: 1px solid var(--line); border-radius: 2.2rem; padding: 3rem 3.5rem; text-align: center; min-width: min(34rem, 90vw);
  animation: rise .5s var(--ease); }
@keyframes rise { from { transform: translateY(2rem) scale(.96); opacity: 0; } }
.pay-box h2 { font-size: 2rem; font-weight: 700; margin: .6rem 0; }
.pay-box p { font-size: 1.3rem; color: var(--muted); margin-bottom: 1.5rem; }
.pay-amount { font-size: 3.6rem; font-weight: 700; letter-spacing: -.03em; margin: .5rem 0 1.2rem; font-variant-numeric: tabular-nums; }
.terminal-anim { font-size: 5.5rem; animation: tap 1.6s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(1.1rem) rotate(0); } }
.spinner { width: 3.4rem; height: 3.4rem; border: .35rem solid var(--glass-2); border-top-color: var(--sand); border-radius: 50%; animation: spin .9s linear infinite; margin: .6rem auto 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; top: 6.5rem; transform: translateX(-50%); background: var(--ink); color: var(--night); padding: 1rem 1.8rem; border-radius: 999px; font-size: 1.2rem; font-weight: 600; z-index: 70;
  box-shadow: 0 1rem 3rem rgba(0,0,0,.5); animation: rise .4s var(--ease); white-space: nowrap; }

/* ---------- on-screen keyboard ---------- */
.osk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 1rem .9rem 1.4rem; border-top: 1px solid var(--line); border-radius: 1.75rem 1.75rem 0 0;
  background: color-mix(in srgb, var(--night) 78%, transparent); backdrop-filter: blur(2.2rem) saturate(1.3); -webkit-backdrop-filter: blur(2.2rem) saturate(1.3); animation: kb-in .4s var(--ease); }
@keyframes kb-in { from { transform: translateY(100%); } }
.osk .row { display: flex; gap: .5rem; justify-content: center; margin-bottom: .5rem; }
.osk button { min-width: 0; flex: 0 0 calc((100% - 13 * .5rem) / 14); height: 4.8rem; border-radius: .9rem; background: var(--glass-2); border: 1px solid var(--line); font-size: 1.8rem; font-weight: 500; transition: background .1s, transform .1s; }
.osk button:active { background: var(--ink); color: var(--night); transform: scale(.94); }
.osk button.wide { flex-basis: calc((100% - 13 * .5rem) / 14 * 2 + .5rem); font-size: 1.3rem; background: var(--glass); }
.osk button.space { flex-basis: 40%; }
.osk button.go { background: var(--electric); border-color: transparent; color: #fff; }
.osk button.on { background: var(--ink); color: var(--night); }

/* ---------- MADE4ME wordmark ---------- */
.m4m-logo { font-weight: 900; letter-spacing: -0.04em; line-height: 1; display: inline-flex; align-items: center; color: inherit; }
.m4m-four { position: relative; display: inline-block; margin: 0 .03em; font-size: 1.12em; line-height: .9; color: transparent; transform: rotate(-6deg);
  background: repeating-linear-gradient(to bottom, var(--electric) 0 .055em, color-mix(in srgb, var(--electric) 72%, black) .055em .075em);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(.035em .035em 0 color-mix(in srgb, var(--electric) 55%, black)) drop-shadow(.03em .03em 0 color-mix(in srgb, var(--electric) 45%, black)); }
.m4m-four3d { display: inline-block; width: 1.05em; height: 1.25em; margin: -.12em -.02em -.1em; vertical-align: middle; }
.m4m-four3d canvas { width: 100%; height: 100%; display: block; }
.m4m-logo.xl { font-size: 8.6rem; }
.m4m-logo.sm { font-size: 2rem; }

/* ===== 32" portrait touchscreen (1080 × 1920) and phones ===== */
@media (orientation: portrait) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 2.2rem 1.2rem; }
  .detail { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 46fr) minmax(0, 54fr); }
  .config { border-radius: 2.6rem 2.6rem 0 0; border-left: 0; border-right: 0; padding-top: 2.1rem; }
  .checkout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 0; }
  .co-summary { order: -1; max-height: 26rem; margin: .5rem 0 1.5rem; }
  .co-form { padding-bottom: 34rem; }
  .paychoices { grid-template-columns: 1fr; }
  .paychoices button { display: grid; grid-template-columns: 6.5rem 1fr; text-align: left; align-items: center; padding: 1.7rem 1.8rem; }
  .paychoices .big { grid-row: span 2; }
  .paychoices b { margin: 0; }
  .drawer { top: auto; left: 0; width: 100%; max-height: 82%; border-radius: 2.6rem 2.6rem 0 0; border-left: 0; border-top: 1px solid var(--line); transform: translateY(105%); }
  .osk button { height: 5rem; }
}
@media (orientation: landscape) {
  .config { border-radius: 2.2rem 0 0 0; border-right: 0; }
  .attract-content h1 { font-size: 5.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora i, .floaters img, .piece .obj, .pulse { animation: none; }
  .piece { animation-duration: .01s; }
}
