@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,400;0,600;0,700;1,700&family=Kanit:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ========================================================
   LOCAL FONTS (Bebas Neue, Prompt, Inter Miami)
   ======================================================== */
@font-face {
  font-family: 'BebasNeue';
  src: url('../assets/fonts/Bebas_Neue/BebasNeue-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Prompt';
  src: url('../assets/fonts/Prompt/Prompt-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PromptBold';
  src: url('../assets/fonts/Prompt/Prompt-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JerseyMiami';
  src: url('../assets/fonts/Inter Miami 23-24 Tipografstore.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


/* ========================================================
   FULLSCREEN DIAGONAL WATERMARK (PANNAWAT MOCUP)
   ======================================================== */
.watermark-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transform: rotate(-25deg) scale(1.15);
  opacity: 0.22;
}

.watermark-text {
  color: #dc2626;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1;
}

.watermark-text-large {
  font-size: clamp(3rem, 9vw, 8.5rem);
  border-top: 6px dashed #dc2626;
  border-bottom: 6px dashed #dc2626;
  padding: 0.75rem 2.5rem;
}

.watermark-text-small {
  font-size: clamp(1.5rem, 5vw, 4.5rem);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
input,
select,
textarea,
button {
  font-family: 'Kanit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}


/* ========================================================
   STUDIO 3D FLOATING WEBGL CANVAS WITH LIGHTING
   ======================================================== */
.studio-3d-webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  display: block;
}

.studio-spotlight {
  position: absolute;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(243, 232, 255, 0.5) 35%, rgba(224, 242, 254, 0.3) 60%, transparent 80%);
  filter: blur(7px);
  top: 48%;
  left: 18%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.studio-3d-polo {
  width: min(520px, 46vw);
  max-height: 82vh;
  object-fit: contain;
  opacity: 0.92;
  filter: 
    drop-shadow(0 35px 50px rgba(15, 23, 42, 0.12)) 
    drop-shadow(0 12px 20px rgba(69, 26, 3, 0.08));
  animation: floatStudioPolo 9s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes floatStudioPolo {
  0% { transform: translateY(0px) rotate(-14deg) scale(1); }
  50% { transform: translateY(-18px) rotate(-11deg) scale(1.02); }
  100% { transform: translateY(0px) rotate(-14deg) scale(1); }
}

@media (max-width: 1024px) {
  .studio-3d-bg-container {
    justify-content: center;
    padding-left: 0;
    opacity: 0.45;
  }
  .studio-3d-polo {
    width: 75vw;
    max-height: 55vh;
  }
}

/* ========================================================
   OPAL WHITE LIQUID GLASS COMPONENTS
   ======================================================== */
.apple-glass-nav {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(3px) saturate(200%);
  -webkit-backdrop-filter: blur(3px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 12px 36px -8px rgba(15, 23, 42, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.02),
    inset 0 1px 1.5px rgba(255, 255, 255, 1);
  border-radius: 9999px;
}

.apple-glass-card {
  background: var(--opal-card-bg);
  backdrop-filter: blur(3px) saturate(190%);
  -webkit-backdrop-filter: blur(3px) saturate(190%);
  border: 1px solid var(--opal-glass-border);
  box-shadow: 
    0 24px 50px -12px rgba(15, 23, 42, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.02),
    inset 0 1.5px 2px rgba(255, 255, 255, 1);
  border-radius: 30px;
}

/* Opal Segmented Pill Control */
.apple-segmented-control {
  background: var(--opal-pill-track);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 9999px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.apple-segmented-btn {
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  background: transparent;
}

.apple-segmented-btn:hover {
  color: #0f172a;
}

.apple-segmented-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Opal Action Buttons */
.apple-btn-primary {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 12px 28px -6px rgba(15, 23, 42, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.apple-btn-primary:hover:not(:disabled) {
  background: #1e293b;
  transform: translateY(-1.5px);
  box-shadow: 
    0 16px 32px -6px rgba(15, 23, 42, 0.32),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.3);
}

.apple-btn-primary:active:not(:disabled) {
  transform: translateY(0.5px);
}

.apple-btn-secondary {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: #334155;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  cursor: pointer;
}

.apple-btn-secondary:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Opal Glass Inputs */
.apple-glass-input {
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  color: #0f172a;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.apple-glass-input:focus {
  outline: none;
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 
    0 0 0 3.5px rgba(15, 23, 42, 0.06),
    0 4px 12px rgba(15, 23, 42, 0.03);
}

.apple-glass-input::placeholder {
  color: #94a3b8;
}

/* Opal Size Selector Pills */
.apple-size-btn {
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  color: #334155;
  font-weight: 600;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.apple-size-btn:hover {
  border-color: #0f172a;
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px);
}

.apple-size-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.25);
}

/* Opal Swatches */
.apple-style-swatch {
  border: 1.5px solid rgba(226, 232, 240, 0.85);
  border-radius: 14px;
  background: #ffffff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s ease;
  cursor: pointer;
}

.apple-style-swatch:hover {
  background: #f8fafc;
  border-color: #0f172a;
}

.apple-style-swatch.active {
  background: #ffffff;
  border-color: #0f172a;
  color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.15), 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* ========================================================
   JERSEY STAGE & SVG RENDERING (PURE TRANSPARENT)
   ======================================================== */
.jersey-stage-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent !important;
}

.jersey-card-wrapper {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 780 / 1019;
  position: relative;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jersey-hd-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/jersey_clean_back_preview.webp?v=20261018_2215');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.jersey-hd-back.jersey-highres-loaded {
  background-image: url('../assets/images/jersey_clean_back.png?v=20261018_2215');
}

.jersey-hd-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/jersey_clean_front_preview.webp?v=20261018_2215');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.jersey-hd-front.jersey-highres-loaded {
  background-image: url('../assets/images/jersey_clean_front.png?v=20261018_2215');
}

.jersey-hd-both {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/jersey_clean_both_clene_preview.webp?v=20261018_2215');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.jersey-hd-both.jersey-highres-loaded {
  background-image: url('../assets/images/jersey_clean_both_clene.png?v=20261018_2215');
}

.jersey-hd-both-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.jersey-both-side-card {
  position: relative;
  flex: 1;
  height: 100%;
  max-width: 50%;
  aspect-ratio: 780 / 1019;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jersey-hd-front-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/jersey_clean_front_preview.webp?v=20261018_2215');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent !important;
}

.jersey-hd-front-inner.jersey-highres-loaded {
  background-image: url('../assets/images/jersey_clean_front.png?v=20261018_2215');
}

.jersey-hd-back-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/jersey_clean_back_preview.webp?v=20261018_2215');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent !important;
}

.jersey-hd-back-inner.jersey-highres-loaded {
  background-image: url('../assets/images/jersey_clean_back.png?v=20261018_2215');
}

.jersey-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Sports Typography */
.font-jersey {
  font-family: 'BebasNeue', 'JerseyMiami', sans-serif !important;
  letter-spacing: 0.08em;
}

.font-cmu-name {
  font-family: 'Computer Modern Serif', 'CMU Serif', serif !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.font-sport-bold {
  font-family: 'Prompt', 'Kanit', sans-serif;
  font-weight: 700;
}

.number-style-clean {
  fill: #ffffff;
  stroke: #451a03;
  stroke-width: 5px;
  paint-order: stroke fill;
  filter: none !important;
}


/* Opal Dropzone */
.apple-dropzone {
  border: 1.5px dashed rgba(244, 63, 94, 0.45);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(2.5px) saturate(180%);
  -webkit-backdrop-filter: blur(2.5px) saturate(180%);
  border-radius: 24px;
  box-shadow: inset 0 1.2px 1.8px rgba(255, 255, 255, 0.7);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-dropzone:hover {
  border-color: #f43f5e;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px -4px rgba(244, 63, 94, 0.2);
  transform: translateY(-1px);
}

.apple-dropzone.dragover {
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
  transform: scale(1.01);
}


/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.8);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.9);
}

/* ========================================================
   EDITORIAL STUDIO THEME TOKENS (PERMANENT DARK MODE)
   ======================================================== */
:root {
  --studio-bg: #0a0a0c;
  --studio-bg-gradient: radial-gradient(circle at 32% 38%, #1b1b20 0%, #101013 48%, #070709 100%);
  --studio-spotlight: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 68%);
  --surface-nav: rgba(22, 22, 26, 0.88);
  --surface-card: rgba(20, 20, 24, 0.94);
  --surface-subcard: #1a1a1f;
  --surface-input: #141418;
  --surface-pill-track: #18181c;
  --border-hairline: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --ink-primary: #f4f4f6;
  --ink-secondary: #cbd5e1;
  --ink-muted: #94a3b8;
  --pill-active-bg: #f4f4f6;
  --pill-active-ink: #111113;
  --accent-pink: #f472b6;
  --focus-ring: rgba(244, 244, 246, 0.85);
  --card-shadow:
    0 28px 60px -16px rgba(0, 0, 0, 0.65),
    0 4px 16px rgba(0, 0, 0, 0.4);
  --jersey-shadow: drop-shadow(0 30px 44px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 28px rgba(244, 114, 182, 0.10));
  --liquid-ink: #f4f4f6;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
  background-color: var(--studio-bg);
}

body {
  color: var(--ink-primary);
  background: var(--studio-bg);
}

.studio-backdrop,
.luxury-2k-bg-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--studio-bg-gradient);
  transition: background 0.35s ease;
}

.luxury-2k-video,
.luxury-2k-fallback {
  display: none !important;
}

.studio-silk-webgl-canvas,
.studio-3d-webgl-canvas,
.studio-spotlight {
  display: none !important;
}


.apple-glass-nav {
  min-height: 62px;
  color: var(--ink-primary);
  background: var(--surface-nav);
  border: 1px solid var(--border-hairline);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 9999px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.app-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.app-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.app-brand-title {
  font-size: 18px;
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: -0.01em;
  text-shadow: none;
}

main {
  isolation: isolate;
}

main.max-w-5xl {
  max-width: 1120px;
}

.apple-glass-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 28px;
  color: var(--ink-primary);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.apple-glass-card h1,
.apple-glass-card h2,
.apple-glass-card h3,
.apple-glass-card .font-sport-bold {
  font-family: 'Kanit', 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Secondary & helper text styling (low visual dominance) */
.helper-microtext {
  font-size: 11px;
  color: #64748b;
  font-weight: 400;
  letter-spacing: normal;
}

/* ========================================================
   APPLE GLASS MOBILE SHEET PULL HANDLE
   ======================================================== */
.mobile-sheet-handle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-top: 2px;
  padding-bottom: 12px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.mobile-sheet-handle {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.90);
  border-radius: 9999px;
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.12),
    inset 0 1px 1.5px rgba(255, 255, 255, 1);
  backdrop-filter: blur(3px) saturate(180%);
  -webkit-backdrop-filter: blur(3px) saturate(180%);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-sheet-handle-container:hover .mobile-sheet-handle,
.mobile-sheet-handle-container:active .mobile-sheet-handle {
  width: 52px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 3px 12px rgba(239, 79, 163, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 1);
}

.apple-segmented-control {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  background: var(--surface-pill-track);
  border: 1px solid var(--border-hairline);
  border-radius: 9999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.apple-segmented-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 25%;
  background: var(--pill-active-bg);
  border-radius: 9999px;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.apple-segmented-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  color: var(--ink-muted);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Kanit', sans-serif;
  text-shadow: none;
  white-space: nowrap;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: color 0.25s ease;
}

.apple-segmented-btn:hover {
  color: var(--ink-primary);
  font-weight: 700;
}

.apple-segmented-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 9999px !important;
}

.apple-segmented-btn.active {
  color: var(--pill-active-ink) !important;
  font-weight: 700;
}

.jersey-stage-container {
  min-height: 540px;
  height: 540px;
  border-radius: 32px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.jersey-stage-container::before {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 9999px;
  background: var(--studio-spotlight);
  pointer-events: none;
  z-index: 0;
}

.jersey-card-wrapper {
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 480px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 26px 40px rgba(108, 23, 64, 0.22));
}

.jersey-3d-stage-container {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#jersey3DCanvas {
  width: 100% !important;
  height: 100% !important;
  outline: none;
  cursor: grab;
  touch-action: none;
}

#jersey3DCanvas:active {
  cursor: grabbing;
}

.stage-3d-hint-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(108, 23, 64, 0.08);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.stage-3d-reset-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.90);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(108, 23, 64, 0.08);
  z-index: 5;
}

.stage-3d-reset-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #db2777;
  transform: scale(1.08);
}

.stage-3d-reset-btn:active {
  transform: scale(0.95);
}

.jersey-card-wrapper[data-view="both"] {
  max-width: 600px;
}

.jersey-hd-back,
.jersey-hd-front,
.jersey-hd-both-container {
  transform: scale(1.02);
  filter: var(--jersey-shadow);
  position: relative;
  z-index: 1;
}

.number-style-clean {
  fill: #fff7db;
  stroke: #451a03;
  stroke-width: 4.5px;
}

.apple-glass-input,
.apple-dropzone,
.apple-size-btn,
.apple-style-swatch {
  background: var(--surface-input);
  border: 1px solid var(--border-strong);
  color: var(--ink-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.apple-glass-input::placeholder {
  color: var(--ink-muted);
}

.apple-glass-input:focus {
  border-color: var(--ink-primary);
  background: var(--surface-input);
  box-shadow: 0 0 0 3px var(--border-hairline);
}

.apple-dropzone {
  border: 1.5px dashed var(--border-strong);
  background: var(--surface-subcard);
}

.apple-dropzone:hover {
  border-color: var(--ink-primary);
  background: var(--surface-input);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.apple-size-btn {
  border-radius: 9999px;
  min-height: 44px;
  font-weight: 600;
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-input);
  border: 1px solid var(--border-hairline);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-size-btn:hover {
  border-color: var(--ink-primary);
  background: var(--surface-subcard);
  color: var(--ink-primary);
  transform: translateY(-1px);
}

.apple-size-btn.active {
  background: var(--pill-active-bg) !important;
  border-color: var(--pill-active-bg) !important;
  color: var(--pill-active-ink) !important;
  font-weight: 700;
  box-shadow: 0 6px 16px -3px rgba(0, 0, 0, 0.25) !important;
  transform: scale(1.02);
}

.apple-btn-primary {
  background: var(--pill-active-bg);
  color: var(--pill-active-ink);
  border: 1px solid transparent;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.28);
  min-height: 48px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1.5px);
  box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.35);
}

.apple-btn-primary:active:not(:disabled) {
  transform: translateY(0.5px) scale(0.99);
}

.apple-btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: var(--ink-muted);
  color: var(--pill-active-ink);
}

.apple-btn-primary.is-submitted,
.apple-btn-primary.is-submitted:disabled {
  opacity: 1 !important;
  cursor: default !important;
  transform: none !important;
  background: rgba(16, 185, 129, 0.16) !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  color: #6ee7b7 !important;
  box-shadow: none !important;
}

.apple-btn-secondary {
  background: var(--surface-input);
  border: 1px solid var(--border-strong);
  color: var(--ink-primary);
  border-radius: 9999px;
  font-weight: 600;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.apple-btn-secondary:hover:not(:disabled) {
  background: var(--surface-subcard);
  border-color: var(--ink-primary);
  color: var(--ink-primary);
  transform: translateY(-1px);
}

.apple-btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

#slipUploadSection,
#submitButtonSection,
.apple-glass-card .border-b,
.apple-glass-card .border-t {
  border-color: var(--border-hairline) !important;
}

#toastContainer {
  bottom: 24px;
}

#qrPromptPayModal .bg-white {
  background: #ffffff !important;
  border: 1px solid rgba(17, 17, 19, 0.08) !important;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.24) !important;
  color: #111113 !important;
}

#qrPromptPayModal .bg-gradient-to-r {
  background: #111113 !important;
}

#qrPromptPayModal .text-slate-400,
#qrPromptPayModal .text-slate-500 {
  color: #475569 !important;
}

/* Studio Theme Toggle Pill */
.studio-theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-pill-track);
  border: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.studio-theme-pill:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.studio-subcard {
  background: var(--surface-subcard);
  border: 1px solid var(--border-hairline);
}

.studio-price-pill {
  background: var(--pill-active-bg);
  color: var(--pill-active-ink);
  border: 1px solid transparent;
}

/* Permanent Dark Theme Overrides for Tailwind Utility Classes inside Configurator */
.apple-glass-card .text-slate-900,
.apple-glass-card .text-slate-800,
.apple-glass-card .text-slate-700,
.apple-glass-card .text-slate-950 {
  color: var(--ink-primary) !important;
}

.apple-glass-card .text-slate-500,
.apple-glass-card .text-slate-400 {
  color: var(--ink-muted) !important;
}

.apple-glass-card select option,
.apple-glass-card select optgroup {
  background: #141418;
  color: #f4f4f6;
}

.apple-glass-card .bg-white\/90,
.apple-glass-card .bg-white\/70,
.apple-glass-card .bg-slate-100 {
  background: var(--surface-input) !important;
  color: var(--ink-primary) !important;
  border-color: var(--border-hairline) !important;
}

.mobile-sheet-handle {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.35);
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 36px;
  }

  .mobile-liquid-status {
    display: none;
  }

  .apple-glass-nav {
    max-width: 620px;
    margin: 0 auto;
  }

  .grid.lg\:grid-cols-12 {
    display: grid !important;
  }

  .grid.lg\:grid-cols-12 > div:first-child,
  .grid.lg\:grid-cols-12 > div:nth-child(2) {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }

  .mobile-sheet-handle-container,
  .mobile-sheet-handle {
    display: none !important;
  }

  .apple-glass-card {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
}

@media (max-width: 1023px) {
  body {
    background-attachment: fixed;
  }

  header.sticky {
    top: 4px;
  }

  .apple-glass-nav {
    position: relative;
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 6px 12px !important;
  }

  .apple-glass-nav .apple-segmented-control {
    padding: 3px;
    display: flex;
    max-width: 220px;
  }

  .apple-glass-nav .apple-segmented-indicator {
    top: 3px;
    bottom: 3px;
  }

  .apple-glass-nav .apple-segmented-btn {
    padding: 6px 4px !important;
    font-size: 11px !important;
    min-height: 28px !important;
    text-align: center;
  }

  main.max-w-5xl {
    max-width: 480px;
    width: calc(100% - 20px);
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 18px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 90px !important;
    scrollbar-gutter: stable both-edges;
  }

  .grid.lg\:grid-cols-12 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
    margin-top: 0 !important;
    position: relative;
  }

  .grid.lg\:grid-cols-12 > div:first-child {
    position: sticky;
    top: 18px;
    z-index: 10;
    width: 100%;
    max-width: 440px;
  }

  .grid.lg\:grid-cols-12 > div:nth-child(2) {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 440px;
    margin-top: 0px;
  }

  .jersey-stage-container {
    height: 480px;
    max-height: 500px;
    min-height: 460px;
    padding: 2px 18px 20px;
    overflow: visible;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .jersey-card-wrapper[data-view="both"] {
    width: 100%;
  }

  .mobile-sheet-handle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-top: 2px;
    padding-bottom: 12px;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
  }

  .mobile-sheet-handle {
    width: 44px;
    height: 5px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: 9999px;
    box-shadow:
      0 2px 8px rgba(15, 23, 42, 0.12),
      inset 0 1px 1.5px rgba(255, 255, 255, 1);
    backdrop-filter: blur(3px) saturate(180%);
    -webkit-backdrop-filter: blur(3px) saturate(180%);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-sheet-handle-container:hover .mobile-sheet-handle,
  .mobile-sheet-handle-container:active .mobile-sheet-handle {
    width: 52px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
      0 3px 12px rgba(239, 79, 163, 0.25),
      inset 0 1px 2px rgba(255, 255, 255, 1);
  }

  #configuratorCard.apple-glass-card {
    border-radius: 28px;
    position: static;
    z-index: 20;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 60px;
  }

  #modeStatusBanner {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  #brandLogoLink {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
    white-space: nowrap;
  }

  #headerSegmentedControl {
    display: none;
    opacity: 0;
    pointer-events: none;
    transform: translateX(12px) scale(0.94);
    margin-left: auto;
    max-width: 195px;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #stageSegmentedWrapper {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 0.22s ease,
                transform 0.22s ease,
                visibility 0.22s ease;
  }

  /* Scrolled State for Bottom Sheet & Header Switcher */
  .mobile-scrolled-collapsed #brandLogoLink {
    left: 8px;
    transform: translateX(0);
  }

  .mobile-scrolled-collapsed #headerSegmentedControl {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
  }

  .mobile-scrolled-collapsed #stageSegmentedWrapper {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-8px) scale(0.95);
  }

  .mobile-scrolled-collapsed .jersey-stage-container {
    transform: translateY(-44px);
  }
}

@media (min-width: 1024px) {
  #brandLogoLink {
    position: static !important;
    transform: none !important;
  }

  #headerSegmentedControl {
    display: none !important;
    visibility: hidden !important;
  }

  #stageSegmentedWrapper {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .jersey-stage-container {
    transform: none !important;
  }
}


@media (max-width: 520px) {
  main.max-w-5xl {
    width: calc(100% - 16px);
    max-width: 100%;
  }

  .apple-glass-nav {
    padding: 6px 8px !important;
  }

  .jersey-stage-container {
    min-height: 330px;
  }

  .apple-segmented-btn {
    padding: 5px 6px !important;
    font-size: 11px !important;
    min-height: 32px !important;
  }

  .mobile-scrolled-collapsed #brandLogoLink .app-brand-title {
    font-size: 15px !important;
  }

  .mobile-scrolled-collapsed #brandLogoLink img {
    width: 28px !important;
    height: 28px !important;
  }

  .mobile-scrolled-collapsed #headerSegmentedControl {
    max-width: 185px;
    padding: 2px !important;
  }

  .mobile-scrolled-collapsed #headerSegmentedControl .apple-segmented-btn {
    font-size: 10px !important;
    padding: 4px 3px !important;
    min-height: 26px !important;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  main.max-w-5xl {
    max-width: 600px;
    width: calc(100% - 40px);
  }

  .apple-glass-nav {
    max-width: 600px;
  }

  .apple-segmented-btn {
    font-size: 14px;
    padding: 11px 14px;
  }
}

/* Accessibility & Contrast Enhancements */
.apple-glass-card .text-slate-500 {
  color: var(--ink-muted) !important;
}

.apple-glass-input:focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 1px !important;
  border-color: var(--ink-primary) !important;
}

.apple-btn-primary:focus-visible {
  outline: 3px solid var(--focus-ring) !important;
  outline-offset: 2px !important;
}

/* ========================================================
   WIZARD MULTI-STEP FORM STYLING & MULTI-ORDER TABS
   Pure Studio Dark - No Glow, No AI Slop
   ======================================================== */
.wizard-step-btn {
  background: var(--surface-input);
  border: 1px solid var(--border-hairline);
  color: var(--ink-muted);
  border-radius: 12px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.wizard-step-btn:hover {
  background: var(--surface-subcard);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.wizard-step-btn .step-badge {
  background: var(--surface-subcard);
  color: var(--ink-muted);
  border: 1px solid var(--border-hairline);
  box-shadow: none !important;
}

/* Active: Exact brand theme match (solid quiet contrast, no glow) */
.wizard-step-btn.active {
  background: var(--surface-subcard) !important;
  border-color: var(--ink-primary) !important;
  color: var(--ink-primary) !important;
  box-shadow: none !important;
}

.wizard-step-btn.active .step-badge {
  background: var(--pill-active-bg) !important;
  color: var(--pill-active-ink) !important;
  border-color: var(--pill-active-bg) !important;
  box-shadow: none !important;
}

.wizard-step-btn.completed {
  color: var(--ink-secondary);
}

.wizard-step-btn.completed .step-badge {
  background: var(--surface-input);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: none !important;
}

.wizard-step-pane {
  animation: fadeInStep 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.order-tab-pill {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid var(--border-hairline);
  background: var(--surface-input);
  color: var(--ink-secondary);
}

.order-tab-pill:hover {
  background: var(--surface-subcard);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.order-tab-pill.active {
  background: var(--pill-active-bg) !important;
  border-color: var(--pill-active-bg) !important;
  color: var(--pill-active-ink) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.order-tab-pill.btn-add-order {
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--ink-primary);
  background: transparent;
}

.order-tab-pill.btn-add-order:hover {
  background: var(--surface-subcard);
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

