:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f6f6f7;
  --border: #e6e6e8;
  --border-strong: #d4d4d7;
  --text: #16161a;
  --text-dim: #6b6b70;
  --text-faint: #a3a3a8;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 24, 0.05);
  --shadow-md: 0 12px 28px rgba(20, 20, 24, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  position: relative;
  transition: background-color 0.7s ease;
}

.site-header, .hero, main, .bag-layout, .customizer, footer, .back-link {
  position: relative;
  z-index: 1;
}

/* Continuous field of twinkling glints behind the whole page, so the
   background itself reads as shimmering sequin fabric rather than a flat
   tint — see js/sparkle.js. */
.sparkle-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sparkle-burst {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

.sparkle-text {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.mono {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
}

a { color: inherit; text-decoration: none; }

/* Scoped to the homepage only — the rest of the site stays strictly
   monochrome, but "digital identity" gets a slow-shifting holographic
   gradient to signal it's the one digital/physical crossover moment. */
.holo-text {
  background: linear-gradient(115deg, #6fd6c4, #8b7bdb 35%, #d97bb0 65%, #6fd6c4);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holoShift 8s ease-in-out infinite;
}

@keyframes holoShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.logo span { color: var(--text-dim); font-weight: 500; }

.tagline {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tagline .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(260px, 380px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(52px, 9vw, 120px) clamp(20px, 5vw, 64px) clamp(36px, 6vw, 76px);
  max-width: 1280px;
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 12px; }
}

.kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.kicker::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse 2.2s ease-in-out infinite;
}

.hero h1 {
  font-weight: 700;
  font-size: clamp(2.3rem, 5.6vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero h1 em { font-style: normal; color: var(--text-dim); }

.hero p {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 620px;
}

/* ---------- hero visual: bag, lining shimmer, NFC → site ---------- */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* A generic bag, not any specific real listing, built from CSS 3D transforms
   and continuously turned so both the exterior and the sequin-lined
   interior are visible in the loop, rather than showing product photos. */
.hv-model-stage {
  width: 220px;
  height: 250px;
  perspective: 1000px;
}

.hv-model {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: hvSpin 7s linear infinite;
}

@keyframes hvSpin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.hv-model-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  backface-visibility: hidden;
}

.hv-model-back { transform: rotateY(180deg); }

.hv-model-handle {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 62px;
  border: 9px solid #232328;
  border-bottom: none;
  border-radius: 60px 60px 0 0;
}

.hv-model-body {
  position: relative;
  width: 168px;
  height: 148px;
  border-radius: 20px 20px 28px 28px;
  background: linear-gradient(160deg, #2c2c32, #101013);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hv-model-lining {
  background-image: url(assets/fabrics/teal.jpg);
  background-size: cover;
  background-position: center;
}

.hv-model-lining::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: hvShimmerSweep 2.6s linear infinite;
}

@keyframes hvShimmerSweep {
  from { background-position: 160% 0; }
  to { background-position: -60% 0; }
}

.hv-glint {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.8);
  animation: hvTwinkle 1.8s ease-in-out infinite;
}

.hv-glint:nth-child(2) { animation-delay: 0.3s; }
.hv-glint:nth-child(3) { animation-delay: 0.6s; }
.hv-glint:nth-child(4) { animation-delay: 0.9s; }
.hv-glint:nth-child(5) { animation-delay: 1.2s; }

@keyframes hvTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.hv-model-caption {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--text-faint);
  text-align: center;
  max-width: 260px;
}

.hv-nfc-icon {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface);
}

.hv-nfc-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  opacity: 0;
  animation: hvRing 2.6s ease-out infinite;
}

@keyframes hvRing {
  0% { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.5); opacity: 0; }
}

.hv-nfc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
}

.hv-nfc-link {
  flex: 1;
  height: 10px;
  min-width: 24px;
  overflow: visible;
}

.hv-nfc-link path {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
  animation: hvDash 1.1s linear infinite;
}

@keyframes hvDash {
  to { stroke-dashoffset: -16; }
}

.hv-site-card {
  flex: none;
  width: 84px;
  height: 54px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 8px 9px;
}

.hv-site-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse 2.2s ease-in-out infinite;
}

.hv-site-lines {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hv-site-lines span {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
}

.hv-site-lines span:first-child { width: 90%; }
.hv-site-lines span:last-child { width: 60%; }

.hv-caption {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--text-faint);
  text-align: center;
  max-width: 280px;
}

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  padding: 0 clamp(20px, 5vw, 64px) 110px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--lining-color, var(--border));
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 0.12s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.card:hover {
  border-color: var(--border-strong);
  border-top-color: var(--lining-color, var(--border-strong));
  box-shadow: var(--shadow-md);
}

.card .persona-tag {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.card .stage {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card canvas {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 14px 20px rgba(20, 20, 24, 0.12));
}

.card .di-code {
  font-size: 0.68rem;
  color: var(--text-faint);
  text-transform: uppercase;
}

.card h3 {
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 6px;
  color: var(--text);
}

.card .brand {
  color: var(--text-dim);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card .price {
  margin-top: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.92rem;
  color: var(--text);
}

.card .price-note {
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--text-faint);
}

.card .sold-badge {
  position: absolute;
  top: 22px;
  right: 20px;
  z-index: 2;
  background: var(--text);
  color: var(--surface);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}

.card.is-sold canvas { opacity: 0.55; }

.card .cta {
  margin-top: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.card:hover .cta {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

/* ---------- bag page ---------- */
.bag-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  padding: clamp(26px, 5vw, 52px) clamp(20px, 5vw, 64px);
}

@media (max-width: 880px) {
  .bag-layout { grid-template-columns: 1fr; }
}

.stage-large {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 440px;
  padding: 24px;
  overflow: hidden;
}

.stage-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 392px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.stage-inner canvas {
  position: absolute;
  max-width: 88%;
  max-height: 400px;
  width: auto;
  height: auto;
}

.bag-canvas {
  filter: drop-shadow(0 22px 30px rgba(20, 20, 24, 0.14));
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* The bag turns to face away, swaps to the next photo edge-on, then turns
   back, so switching photos (especially opening the bag) reads as
   physically turning the object rather than a flat crossfade. */
.bag-canvas.swapping {
  opacity: 0;
  transform: rotateY(90deg) scale(0.94);
}

.scan-sweep {
  position: absolute;
  left: 6%; right: 6%;
  height: 1px;
  top: 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  opacity: 0;
  pointer-events: none;
}

.stage-inner.opened .scan-sweep { animation: sweep 0.9s ease forwards; }

@keyframes sweep {
  0% { top: 4%; opacity: 1; }
  100% { top: 94%; opacity: 0; }
}

.open-toggle {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.open-toggle:hover { transform: translateX(-50%) translateY(-2px); box-shadow: var(--shadow-md); }

.open-toggle .ring {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.open-toggle.is-open .ring { background: var(--text); border-color: var(--text); transform: scale(1.25); }

.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.thumbs button {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.thumbs button.active { border-color: var(--text); }
.thumbs button:hover { border-color: var(--border-strong); }
.thumbs canvas { width: 100%; height: 100%; object-fit: contain; }

.identity {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--surface);
}

.identity .di-code {
  color: var(--text-faint);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.identity h1 {
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 10px 0 2px;
  color: var(--text);
}

.identity .brand {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.88rem;
}

.identity .nickname {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
  min-height: 1.3em;
}

.identity .price {
  margin-top: 16px;
  font-size: 1.3rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
}

.identity .price-note {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.sold-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sold-note {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text-dim);
  font-size: 0.88rem;
}

.spec-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.spec-grid .span-2 { grid-column: 1 / -1; }

.spec-grid div span {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 3px;
}

.identity .story {
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.nfc-panel {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface-muted);
}

.nfc-icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.nfc-panel .label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text);
}

.nfc-panel .label-row .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse 2.2s ease-in-out infinite;
}

.nfc-persona-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.nfc-swatch {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background-size: cover;
  background-position: center;
}

.nfc-swatch.is-original {
  background-image: repeating-linear-gradient(135deg, var(--surface), var(--surface) 4px, var(--border) 4px, var(--border) 8px);
}

.nfc-persona-text {
  font-size: 0.84rem;
  color: var(--text);
  font-weight: 600;
}

.nfc-panel .hash {
  color: var(--text-dim);
  font-size: 0.76rem;
  word-break: break-all;
  margin-top: 8px;
}

.buy-btn {
  margin-top: 22px;
  display: block;
  text-align: center;
  padding: 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  width: 100%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.buy-btn:hover { opacity: 0.85; transform: translateY(-2px); }

.preorder-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  min-height: 1.2em;
}

/* ---------- personalizer + lining controls ---------- */
.personalizer, .customizer {
  margin: 0 clamp(20px, 5vw, 64px) 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3.5vw, 30px) clamp(22px, 4vw, 34px);
  background: var(--surface);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.personalizer.needs-attention {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(20, 20, 24, 0.08);
  animation: attentionPulse 0.5s ease 2;
}

@keyframes attentionPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.008); }
}

.customizer { margin-bottom: 110px; }

.personalizer h2, .customizer h2 {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.name-field {
  display: block;
  margin-top: 20px;
  max-width: 320px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.name-field input {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.name-field input:focus { outline: none; border-color: var(--border-strong); }

.personality-picker {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.personality-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.personality-pill:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.personality-pill.selected { background: var(--text); border-color: var(--text); color: var(--surface); }

/* One-shot confetti burst of the picked personality's emoji, spawned by
   emojiConfettiBurst() in js/sparkle.js — flies out from the button and is
   removed from the DOM once its animation ends. */
.emoji-confetti {
  position: fixed;
  z-index: 1200;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation-name: confettiFly;
  animation-timing-function: cubic-bezier(0.15, 0.6, 0.4, 1);
  animation-fill-mode: forwards;
}

@keyframes confettiFly {
  0% { transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(0.6); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--dx), calc(var(--dy) + 100px)) rotate(var(--rot)) scale(0.85); opacity: 0; }
}

.personality-note {
  margin-top: 12px;
  color: var(--text-faint);
  font-size: 0.8rem;
  max-width: 520px;
}

.personalizer .sub, .customizer .sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 6px;
  max-width: 620px;
}

.fabric-swatches {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}

.fabric-swatch {
  position: relative;
  height: 96px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.fabric-swatch:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.fabric-swatch.selected { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }

.fabric-swatch span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 7px 9px 6px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fabric-swatch.keep-original {
  background: repeating-linear-gradient(135deg, var(--surface-muted), var(--surface-muted) 8px, var(--surface) 8px, var(--surface) 16px);
  display: flex;
  align-items: flex-end;
}

.fabric-swatch.keep-original span {
  position: static;
  width: 100%;
  background: none;
  color: var(--text-dim);
  padding: 9px;
}

.quality-note {
  margin-top: 14px;
  color: var(--text-faint);
  font-size: 0.82rem;
  max-width: 620px;
}

.save-note {
  margin-top: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-dim);
  min-height: 1.1em;
}

/* ---------- preorder modal ---------- */
.preorder-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 20, 24, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.preorder-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.preorder-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.preorder-close:hover { border-color: var(--border-strong); color: var(--text); }

.preorder-modal h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  padding-right: 30px;
}

.preorder-modal .sub {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.preorder-summary {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preorder-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text);
}

.preorder-summary div span {
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  align-self: center;
}

.preorder-modal form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preorder-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preorder-modal label .optional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
}

.preorder-modal input {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.preorder-modal input:focus {
  outline: none;
  border-color: var(--border-strong);
}

.bot-field-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.preorder-actions { margin-top: 6px; }
.preorder-modal .buy-btn { margin-top: 0; }
.preorder-modal .buy-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.preorder-status {
  font-size: 0.85rem;
  color: var(--text-dim);
  min-height: 1.2em;
}

.preorder-status.success { color: var(--text); font-weight: 600; }
.preorder-status.error { color: #b3261e; }

/* ---------- "a new persona is born" reveal ---------- */
.persona-birth {
  padding: 12px 4px 4px;
  text-align: center;
}

.birth-blob {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, #6fd6c4, #8b7bdb 55%, #d97bb0);
  animation: doughRise 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes doughRise {
  0% { transform: scale(0.25); border-radius: 50%; opacity: 0; }
  35% { opacity: 1; }
  55% { transform: scale(1.2); border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%; }
  75% { transform: scale(0.94); border-radius: 55% 45% 45% 55% / 55% 55% 45% 45%; }
  100% { transform: scale(1); border-radius: 50%; opacity: 1; }
}

.birth-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0;
  animation: birthFadeUp 0.5s ease 0.5s forwards;
}

.birth-name {
  margin-top: 8px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  opacity: 0;
  animation: birthFadeUp 0.5s ease 0.65s forwards;
}

.birth-sub {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-dim);
  opacity: 0;
  animation: birthFadeUp 0.5s ease 0.8s forwards;
}

.birth-message {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-dim);
  opacity: 0;
  animation: birthFadeUp 0.5s ease 0.95s forwards;
}

.birth-done {
  margin-top: 40px;
  opacity: 0;
  animation: birthFadeUp 0.5s ease 1.1s forwards;
}

@keyframes birthFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

footer {
  padding: 30px clamp(20px, 5vw, 64px) 60px;
  color: var(--text-faint);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
}

.back-link {
  display: inline-block;
  margin: 24px clamp(20px, 5vw, 64px) 0;
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--text); }
