/* Look follows leems.me (GOOD® Records). The sky/cloud/CRT/ticker class
   names match that site so its rules can be dropped in directly. */
:root {
  --ink: #0b1526;
  --ink-soft: #3b4d68;
  --paper: #ffffff;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --blue: #1a5cff;
  --sky-top: #3f8fe8;
  --sky-mid: #7cbcf5;
  --sky-low: #cfe8ff;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: #0000ff; /* GOOD® BLUE */
  overflow-x: hidden;
}
/* THE MAKER: the AMONG THE TREES® fall gradient, leaves drifting behind the panels */
body.fall { background: linear-gradient(to bottom, #2b1d12 0, #4a2716 22%, #7e3a1d 48%, #b35a26 74%, #d98a3a 100%) fixed; }
.fall-leaves { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.mono { font-family: 'Space Mono', ui-monospace, monospace; }

/* ---------- Sky ---------- */
.hero-sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
}
.cloud {
  position: absolute; background: #fff; border-radius: 999px;
  filter: blur(1px); opacity: 0.92;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after {
  content: ''; position: absolute; background: inherit; border-radius: 50%;
}
.cloud::before { width: 55%; height: 180%; left: 12%; bottom: 20%; }
.cloud::after { width: 40%; height: 140%; right: 14%; bottom: 25%; }
.cloud-1 { width: 260px; height: 64px; top: 14%; animation-duration: 90s; animation-delay: -20s; }
.cloud-2 { width: 180px; height: 46px; top: 36%; animation-duration: 120s; animation-delay: -70s; opacity: 0.8; }
.cloud-3 { width: 320px; height: 78px; top: 62%; animation-duration: 105s; animation-delay: -45s; }
.cloud-4 { width: 140px; height: 38px; top: 82%; animation-duration: 140s; animation-delay: -110s; opacity: 0.75; }
@keyframes drift { from { transform: translateX(-40vw); } to { transform: translateX(140vw); } }

/* ---------- Header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px;
}
.wordmark {
  font-weight: 800; font-size: 2rem; letter-spacing: -0.05em;
  color: var(--paper); text-decoration: none;
  text-shadow: 0 2px 0 rgba(11, 21, 38, 0.18);
}
.wordmark span { font-weight: 400; letter-spacing: -0.03em; }
.site-nav { display: flex; gap: 8px; margin-right: 110px; }
.nav-link {
  border: 0; background: #0000ff; color: #fff; cursor: pointer; font-weight: 700;
  padding: 9px 18px; border-radius: 999px; font-size: 0.8rem; letter-spacing: 0.16em;
  box-shadow: 0 6px 18px rgba(0, 0, 90, 0.28); transition: background 0.15s, color 0.15s, transform 0.15s;
}
.nav-link { text-decoration: none; display: inline-block; }
.nav-link:hover, .nav-link:focus-visible { background: #fff; color: #0000ff; transform: translateY(-1px); }
/* Header nav: plain underlined small caps, no pills */
.site-nav { gap: clamp(20px, 2.6vw, 34px); align-items: center; }
.site-nav .nav-link {
  background: none; box-shadow: none; border-radius: 0; padding: 4px 0; color: #fff;
  font-size: 1.2rem; font-weight: 700; letter-spacing: 0.12em; font-variant-caps: all-small-caps;
  text-shadow: 0 1px 2px rgba(11, 21, 38, 0.35), 0 2px 12px rgba(11, 21, 38, 0.3);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  transition: opacity 0.2s, text-underline-offset 0.2s;
}
.site-nav .nav-link:hover, .site-nav .nav-link:focus-visible { background: none; color: #fff; transform: none; opacity: 0.75; text-underline-offset: 9px; }
.right-col { display: flex; flex-direction: column; gap: 14px; }
.download-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 16px 20px; border-radius: var(--radius);
  background: rgba(135, 206, 250, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 12px 40px rgba(11, 21, 38, 0.14);
  color: var(--ink); font: 800 1.15rem 'Inter', sans-serif; letter-spacing: 0.02em;
  cursor: pointer; transition: transform 0.15s, background 0.15s;
}
.download-btn:hover:not(:disabled) { transform: translateY(-2px); background: rgba(135, 206, 250, 0.55); }
.download-btn:disabled { opacity: 0.5; cursor: default; }
.download-hint { margin: -4px 4px 0; text-align: center; }
.download-hint strong { color: var(--ink); font-weight: 700; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-row .chip { padding: 10px 12px; font-weight: 700; }
.share-row .chip:hover:not(:disabled) { background: #fff; border-color: var(--blue); }
.share-row .chip:disabled { opacity: 0.5; }
#shareHint { margin: -6px 4px 0; min-height: 1em; }
.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: #3dff7a;
  box-shadow: 0 0 0 0 rgba(61, 255, 122, 0.6); animation: pulse 1.6s infinite;
}
.download-btn:disabled .dot-live { background: #888; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61, 255, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 255, 122, 0); } }

/* ---------- Tickers ---------- */
.ticker { overflow: hidden; white-space: nowrap; font-family: 'Space Mono', monospace; }
.ticker-track { display: inline-flex; animation: ticker 30s linear infinite; }
.ticker-track.slow { animation-duration: 55s; }
.ticker-top { color: rgba(255, 255, 255, 0.85); font-size: 0.8rem; letter-spacing: 0.2em; padding: 4px 0; }
.ticker-band {
  background: var(--ink); color: var(--paper); font-size: 1rem; letter-spacing: 0.15em; padding: 10px 0;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Layout ---------- */
.stage {
  display: grid;
  /* 20% you / 20% the model / 60% the fit: the catalogue gets the room */
  grid-template-columns: minmax(250px, 2fr) minmax(220px, 2fr) minmax(0, 6fr);
  gap: 24px; align-items: center;
  max-width: 1760px; margin: 0 auto; padding: 12px 28px 40px;
  min-height: calc(100vh - 150px);
}
/* Right panel: shirts and pants side by side */
.fit-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.fit-col { min-width: 0; }
.fit-col #pantsSection > .section-tag:first-child { margin-top: 0; }
/* FINE TUNE: hair and head tools, folded away */
.fine-tune { margin-top: 20px; border-top: 1px solid rgba(11, 21, 38, 0.1); padding-top: 14px; }
.fine-tune > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-soft);
}
.fine-tune > summary::-webkit-details-marker { display: none; }
.fine-tune > summary::after { content: '+'; font: 400 1.1rem/1 'Inter', sans-serif; transition: transform 0.2s; }
.fine-tune[open] > summary::after { transform: rotate(45deg); }
.fine-tune .swiper { margin-top: 14px; }
.panel {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 12px 40px rgba(11, 21, 38, 0.14);
}
.section-tag {
  font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-soft);
  margin: 20px 0 10px;
}
.section-tag:first-child { margin-top: 0; }
.micro { font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-soft); margin: 10px 0 0; }
.center { text-align: center; }
.error { color: #d1123f; font-size: 0.75rem; }

/* ---------- Upload ---------- */
.upload {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.7);
  border: 1.5px dashed rgba(26, 92, 255, 0.45);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.upload:hover, .upload.over { transform: translateY(-1px); border-color: var(--blue); background: #fff; }
.upload input { display: none; }
.upload-text { display: flex; flex-direction: column; gap: 2px; }
.upload-text small { color: var(--ink-soft); font-size: 0.66rem; letter-spacing: 0.06em; }
#face {
  width: 56px; height: 56px; flex: none; border-radius: 10px;
  image-rendering: pixelated; background: rgba(11, 21, 38, 0.08); cursor: crosshair;
}

/* ---------- Username ---------- */
.username {
  display: flex; align-items: center; margin-top: 10px;
  border-bottom: 1.5px solid rgba(11, 21, 38, 0.18); transition: border-color 0.15s;
}
.username:focus-within { border-color: var(--blue); }
.username input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 2px;
  font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink); outline: none;
}
.username input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.username button {
  border: 0; background: transparent; color: var(--ink-soft); font-size: 1rem;
  padding: 4px 6px; cursor: pointer;
}
.username button:hover { color: var(--blue); }
.username.loading { opacity: 0.6; pointer-events: none; }

/* ---------- Body toggle ---------- */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px;
  background: rgba(11, 21, 38, 0.08); border-radius: 12px;
}
.line-toggle { margin-bottom: 16px; }
.line-toggle button { font-family: "Space Mono", monospace; font-size: 0.72rem; letter-spacing: 0.14em; }
.segmented.four { grid-template-columns: repeat(4, 1fr); }
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented.three button { padding: 9px 4px; font-size: 0.85rem; }
.line-toggle { margin-bottom: 16px; }
.line-toggle button { font-family: "Space Mono", monospace; font-size: 0.72rem; letter-spacing: 0.14em; }
.segmented.four button { padding: 9px 4px; font-size: 0.85rem; }
.segmented button {
  border: 0; background: transparent; padding: 10px; border-radius: 9px;
  font: 600 0.95rem 'Inter', sans-serif; color: var(--ink-soft); cursor: pointer;
}
.segmented button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(11, 21, 38, 0.12); }

/* ---------- Hair & Head swiper ---------- */
.swiper { margin-top: 18px; }
.swiper-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px;
  border-radius: 10px; background: rgba(11, 21, 38, 0.06); margin-bottom: 12px;
}
.swiper-tabs button {
  border: 0; background: transparent; padding: 7px 4px; border-radius: 8px; cursor: pointer;
  font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ink-soft);
}
.swiper-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 6px rgba(11, 21, 38, 0.1); }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.slide-row { display: flex; align-items: center; gap: 8px; }
.slide-row .segmented { flex: 1; }
.slide .micro { margin-top: 6px; }
.pixmap {
  display: block; width: 100%; aspect-ratio: 2; margin-top: 10px; border-radius: 8px;
  image-rendering: pixelated; cursor: crosshair; touch-action: none;
  background: repeating-conic-gradient(#e6edf5 0 25%, #fff 0 50%) 0 0 / 12px 12px;
}
.map-labels {
  display: grid; margin-top: 4px;
  font-size: 0.6rem; letter-spacing: 0.08em; color: var(--ink-soft); text-align: center;
}
.map-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.map-foot .micro { margin: 0; }
.eraser-actions { display: flex; gap: 4px; flex: none; }
.eraser-actions .chip { font-size: 0.62rem; padding: 4px 9px; }
.eraser-actions .chip:disabled { opacity: 0.4; cursor: default; }
.swiper-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.swiper-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(11, 21, 38, 0.2); transition: background 0.2s; }
.swiper-dots span.on { background: var(--blue); }

/* ---------- Chips ---------- */
.chip {
  border: 1px solid rgba(11, 21, 38, 0.14); background: rgba(255, 255, 255, 0.75);
  padding: 6px 12px; border-radius: 999px; font-family: 'Space Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.06em; color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Outfits ---------- */
/* Two outfits visible at a time; side buttons (or swipe) move through the rest. */
.outfit-carousel { display: flex; align-items: center; gap: 6px; }
.outfits {
  flex: 1; min-width: 0; display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows, 3), auto);  /* three rows of cards ... */
  grid-auto-columns: calc((100% - 16px) / 3); gap: 8px;  /* ... three columns at a time; scroll for more */
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain; padding: 2px 0;
}
.outfits::-webkit-scrollbar { display: none; }
.outfits .outfit { scroll-snap-align: start; min-width: 0; padding: 6px; }
.outfit img.pants-thumb { width: 60%; margin: 0 auto 4px; aspect-ratio: 8 / 12; }
.outfit img.ghost-thumb { width: 100%; height: auto; aspect-ratio: auto; margin: 0 auto 4px; }
/* soft tile behind ghost mannequins so white garments still read on white cards */
.outfit img.ghost-thumb, .outfit img.pants-thumb {
  box-sizing: border-box; padding: 6px; border-radius: 8px; background: rgba(11, 21, 38, 0.08);
}
#pantsSection[hidden] { display: none; }
/* Sleeve, tuck, shoe and boxer come and go with the piece: they keep their space
   (invisible, not removed) so the panel doesn't jump between e.g. SHIRT® I and SMILEY®. */
#sleeveSection[hidden], #tuckSection[hidden], #shoeSection[hidden], #boxerSection[hidden] { display: none; }
@media (min-width: 1251px) {
  #sleeveSection[hidden], #tuckSection[hidden], #shoeSection[hidden], #boxerSection[hidden] { display: block; visibility: hidden; }
}
#pantsSection > .section-tag:first-child, #sleeveSection > .section-tag:first-child,
#shoeSection > .section-tag:first-child, #boxerSection > .section-tag:first-child,
#tuckSection > .section-tag:first-child { margin-top: 22px; }
.outfits .outfit span { display: block; line-height: 1.2; overflow-wrap: anywhere; }
.outfits .outfit .outfit-name { font-size: 0.64rem; overflow-wrap: normal; letter-spacing: -0.01em; } /* whole words: WATERMELONS® fits a third of the panel */
.carousel-btn {
  flex: none; width: 26px; height: 26px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(11, 21, 38, 0.14); background: rgba(255, 255, 255, 0.8);
  color: var(--ink); font: 700 1rem/1 'Inter', sans-serif; cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.carousel-btn:hover:not(:disabled) { background: var(--ink); color: #fff; }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
.outfit {
  border: 2px solid transparent; background: rgba(255, 255, 255, 0.75); border-radius: 12px;
  padding: 8px; font: 600 0.85rem 'Inter', sans-serif; color: var(--ink); cursor: pointer;
}
.outfit img { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; margin-bottom: 4px; }
.outfit[aria-pressed="true"] { border-color: var(--blue); background: #fff; }

.outfit .locked-thumb {
  width: 100%; aspect-ratio: 1; margin-bottom: 4px; border-radius: 8px;
  background: #87cefa;
}
.segmented button:disabled { opacity: 0.35; cursor: not-allowed; }
.segmented button[hidden] { display: none; }
.segmented.small { padding: 3px; gap: 3px; border-radius: 10px; }
.segmented.small button { padding: 6px 4px; font-size: 0.78rem; border-radius: 7px; }

/* Colour picker under the Shirt / Pants cards: dots, then the picked colourway's name */
.swatches { display: flex; align-items: center; gap: 12px; margin-top: 12px; min-height: 28px; }
.swatches[hidden] { display: none; }
.sw-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.sw-dots[hidden] { display: none; }
.swatch-btn { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch-btn .dot {
  width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(11, 21, 38, 0.22);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}
.swatch-btn:hover .dot { transform: scale(1.12); }
.swatch-btn[aria-pressed="true"] .dot { box-shadow: inset 0 0 0 1px rgba(11, 21, 38, 0.22), 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.sw-label {
  font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: 0.12em; color: var(--ink);
  line-height: 1.3; min-width: 0;
}
.sw-dots:not([hidden]) + .sw-label { padding-left: 12px; border-left: 1px solid rgba(11, 21, 38, 0.18); }


/* ---------- Tone ---------- */
.tone { display: flex; gap: 10px; align-items: center; }
.tone.off .swatch, .tone.off + .ramp { opacity: 0.35; }
.swatch { position: relative; width: 44px; height: 44px; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch span {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 2px 10px rgba(11, 21, 38, 0.22);
}
.ramp { display: flex; margin-top: 12px; border-radius: 8px; overflow: hidden; height: 16px; }
.ramp span { flex: 1; }

.texture { margin-top: 16px; }
.texture summary { cursor: pointer; font-size: 0.7rem; letter-spacing: 0.08em; color: var(--ink-soft); }
#flat {
  display: block; width: 100%; max-width: 280px; aspect-ratio: 1; margin-top: 8px; border-radius: 10px;
  image-rendering: pixelated;
  background: repeating-conic-gradient(#e6edf5 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}

/* ---------- Viewer ---------- */
.viewer-wrap { display: flex; flex-direction: column; align-items: center; position: relative; }

#view3d { width: 100%; height: min(70vh, 640px); position: relative; }
#view3d canvas { cursor: grab; position: relative; z-index: 1; }
/* POSTUP: a cloud behind the model to lean on (slides in/out and bobs, see app.js) */
.lean-cloud {
  position: absolute; z-index: 0; left: 50%; top: 20%; width: min(88%, 480px);
  transform: translateX(-50%); visibility: hidden; pointer-events: none;
}
.lean-cloud-body {
  position: relative; width: 100%; aspect-ratio: 2.6; border-radius: 999px; background: #fff;
  box-shadow: 0 30px 60px rgba(11, 21, 38, 0.16), inset 0 -18px 30px rgba(120, 150, 190, 0.18);
}
.lean-cloud-body::before, .lean-cloud-body::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.lean-cloud-body::before { width: 46%; height: 140%; left: 12%; bottom: 32%; }
.lean-cloud-body::after { width: 38%; height: 115%; right: 13%; bottom: 38%; }
/* where the character's back presses into the cloud */
.lean-shadow {
  position: absolute; z-index: 1; left: 50%; top: 18%; width: 46%; height: 80%; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(ellipse at center, rgba(11, 21, 38, 0.24), rgba(11, 21, 38, 0.1) 45%, transparent 72%);
  filter: blur(6px);
}
.lean-cloud::before { width: 48%; height: 150%; left: 14%; bottom: 30%; }
.lean-cloud::after { width: 36%; height: 120%; right: 16%; bottom: 35%; }
#view3d canvas:active { cursor: grabbing; }
#view3d::after {
  content: ''; position: absolute; left: 50%; bottom: 5%; width: 32%; height: 18px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(rgba(11, 21, 38, 0.25), transparent 70%);
  pointer-events: none; z-index: -1;
}
.viewer-bar {
  display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: center;
  padding: 5px; border-radius: 999px; background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-edge);
}
.viewer-bar .chip { border-color: transparent; background: transparent; }
.viewer-bar .chip[aria-pressed="true"] { background: var(--ink); }
.viewer-bar .sep { width: 1px; height: 18px; background: rgba(11, 21, 38, 0.15); margin: 0 4px; }
/* the model's column is narrow now: keep the bar on one line */
.viewer-bar { flex-wrap: nowrap; gap: 2px; max-width: 100%; }
.viewer-bar .chips { flex-wrap: nowrap; gap: 2px; }
.viewer-bar .chip { padding: 6px 9px; font-size: 0.64rem; white-space: nowrap; }
.viewer-bar .sep { margin: 0 2px; }

/* ---------- Help ---------- */
.help-btn {
  flex: none; width: 24px; height: 24px; border-radius: 50%; padding: 0;
  border: 1.5px solid rgba(11, 21, 38, 0.3); background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft); font: 700 0.7rem 'Inter', sans-serif; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.help-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.help-modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; }
.help-modal[hidden] { display: none; }
.help-backdrop {
  position: absolute; inset: 0; background: rgba(11, 21, 38, 0.55);
  animation: fade 0.2s ease-out;
}
.help-card {
  position: relative; width: min(360px, 100%);
  background: rgba(255, 255, 255, 0.96); border: 1px solid var(--glass-edge);
  border-radius: var(--radius); padding: 20px 20px 16px; text-align: center;
  box-shadow: 0 24px 60px rgba(11, 21, 38, 0.3);
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.help-card .section-tag { margin: 0 0 12px; text-align: left; }
.help-close {
  position: absolute; top: 12px; right: 12px; border: 0; background: transparent;
  font-size: 0.9rem; color: var(--ink-soft); cursor: pointer;
}
.help-stage {
  position: relative; width: 162px; margin: 0 auto; padding: 10px;
  border-radius: 14px;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-low));
}
.help-stage canvas { display: block; width: 100%; image-rendering: pixelated; }
.help-cursor {
  position: absolute; left: 10px; top: 10px; width: 18px; height: 18px; pointer-events: none;
  margin: -2px 0 0 -2px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 2l7 19 2.6-7.4L20 11z' fill='%230b1526' stroke='white' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform 0.25s ease;
}
.help-cursor.erasing { transition: none; }
.help-cursor.erasing::after {
  content: ''; position: absolute; left: -8px; top: -8px; width: 12px; height: 12px;
  border: 2px solid var(--blue); border-radius: 2px;
}
.help-chips { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.help-chips span {
  padding: 5px 10px; border-radius: 999px; font-size: 0.68rem; letter-spacing: 0.06em;
  background: rgba(11, 21, 38, 0.06); color: var(--ink-soft); transition: background 0.2s, color 0.2s;
}
.help-chips span.on { background: var(--ink); color: #fff; }
.help-caption { font-size: 0.9rem; line-height: 1.4; margin: 12px 4px 10px; min-height: 2.8em; }
.help-dots { display: flex; justify-content: center; gap: 6px; }
.help-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(11, 21, 38, 0.2); }
.help-dots span.on { background: var(--blue); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(8px); } }

/* ---------- CRT ---------- */
.crt-scanlines, .crt-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
.crt-scanlines {
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(to right, rgba(255, 0, 0, 0.03) 0 1px, rgba(0, 255, 0, 0.02) 1px 2px, rgba(0, 0, 255, 0.03) 2px 3px);
  animation: flicker 0.15s infinite;
}
.crt-scanlines::after {
  content: ''; position: absolute; left: 0; right: 0; height: 20vh;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: roll 8s linear infinite;
}
.crt-vignette { background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 12, 40, 0.42) 100%); }
body { text-shadow: 0.5px 0 rgba(255, 0, 60, 0.22), -0.5px 0 rgba(0, 190, 255, 0.22); }
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.9; } }
@keyframes roll { from { top: -20vh; } to { top: 100vh; } }

/* ---------- RUNWAY® ---------- */
.rw-modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; }
.rw-modal[hidden] { display: none; }
.rw-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 40, 0.62); animation: fade 0.2s ease-out; }
.rw-card {
  position: relative; width: min(340px, 100%); padding: 22px 20px 18px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88); border: 1px solid var(--glass-edge);
  box-shadow: 0 24px 60px rgba(0, 0, 60, 0.35); animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.rw-card h2 { margin: 0 0 16px; font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; color: #0000ff; }
.rw-card .section-tag { margin: 0 0 4px; }
.rw-close { position: absolute; top: 12px; right: 12px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.rw-field { display: block; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 12px; }
.rw-field input {
  display: block; width: 100%; margin-top: 4px; padding: 9px 2px; border: 0;
  border-bottom: 1.5px solid rgba(11, 21, 38, 0.2); background: transparent;
  font: 400 0.95rem 'Space Mono', monospace; color: var(--ink); outline: none;
}
.rw-field input:focus { border-color: #0000ff; }
.rw-warn { margin: -4px 0 12px; color: #e0001b; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; }
.rw-error { color: #d1123f; font-size: 0.72rem; margin: 0 0 10px; }
.rw-enter {
  width: 100%; padding: 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: #0000ff; color: #fff; font: 800 0.95rem 'Inter', sans-serif; letter-spacing: 0.06em;
}
.rw-enter:disabled { opacity: 0.6; cursor: default; }

.rw-blue { position: fixed; inset: 0; z-index: -1; background: #0000ff; opacity: 0; pointer-events: none; }

.rw-stage {
  position: fixed; inset: 0; z-index: 500; overflow-y: auto; color: #fff;
  display: flex; flex-direction: column; padding: 20px 28px 24px;
}
.rw-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.rw-back {
  justify-self: start; border: 1px solid rgba(255, 255, 255, 0.5); background: transparent; color: #fff;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 0.72rem; letter-spacing: 0.1em;
}
.rw-back:hover { background: #fff; color: #0000ff; }
.rw-title {
  font: 800 2.4rem 'Inter', sans-serif; letter-spacing: -0.04em;
  text-shadow: 2px 0 rgba(255, 0, 60, 0.6), -2px 0 rgba(0, 255, 255, 0.6);
}
.rw-who { justify-self: end; font-size: 0.75rem; letter-spacing: 0.14em; opacity: 0.85; }
.rw-tone {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px;
  font-size: 0.68rem; letter-spacing: 0.14em;
}
.rw-swatch { position: relative; width: 28px; height: 28px; cursor: pointer; }
.rw-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rw-swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 60, 0.35); }
.rw-auto {
  border: 1px solid rgba(255, 255, 255, 0.5); background: transparent; color: #fff; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; font: inherit; letter-spacing: 0.1em;
}
.rw-auto[aria-pressed="true"], .rw-auto:hover { background: #fff; color: #0000ff; }
.rw-looks { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: center; margin-top: 12px; }
.rw-look { display: flex; flex-direction: column; align-items: center; }
.rw-view { width: 100%; height: min(58vh, 520px); }
.rw-flat { width: 50%; margin: 20% auto; display: block; image-rendering: pixelated; }
.rw-name { font: 800 1.3rem 'Inter', sans-serif; letter-spacing: -0.02em; margin: 6px 0 10px; }
.rw-access {
  padding: 12px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: #0000ff; font: 800 0.9rem 'Inter', sans-serif; letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(0, 0, 60, 0.35); transition: transform 0.15s;
}
.rw-access:hover { transform: translateY(-2px); }
.rw-access:disabled { background: rgba(255, 255, 255, 0.25); color: #fff; box-shadow: none; cursor: not-allowed; transform: none; }
.rw-preview {
  margin: 12px -28px 0; padding: 7px 16px; text-align: center;
  background: #fff; color: #0000ff; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.3em;
}
.rw-stage.is-preview .rw-view::after {
  content: 'PREVIEW MODE'; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  font: 700 0.62rem 'Space Mono', monospace; letter-spacing: 0.2em; opacity: 0.7; pointer-events: none;
}
.rw-view { position: relative; }
.rw-note { font-size: 0.62rem; letter-spacing: 0.1em; opacity: 0.75; margin: 8px 0 0; }
.rw-legal { text-align: center; font-size: 0.6rem; letter-spacing: 0.1em; opacity: 0.7; margin: 16px 0 0; }
@media (max-width: 900px) {
  .rw-stage { padding: 14px 16px; }
  .rw-preview { margin: 10px -16px 0; }
  .rw-title { font-size: 1.8rem; }
  .rw-looks { grid-template-columns: 1fr; }
  .rw-view { height: 50vh; }
}

/* While a pop-up is open, freeze the busy background so typing stays snappy. */
.modal-open .cloud, .modal-open .ticker-track, .modal-open .panel,
.modal-open .crt-scanlines, .modal-open .crt-scanlines::after, .modal-open .dot-live { animation-play-state: paused; }

/* ---------- Intro + idle motion ---------- */
/* Hidden until js/intro.js flies everything in from the centre. */
.intro .site-header, .intro .ticker, .intro #view3d, .intro .viewer-bar,
.intro .viewer-wrap > .micro, .intro .panel, .intro #download { opacity: 0; }
.hero-sky { transform-origin: 50% 55%; }

/* Very small idle float on the Your Skin and Outfit panels; stops while in use. */
.panel.left, .panel.right { animation: idle-float 7s ease-in-out infinite; }
.panel.right { animation-delay: -3.5s; }
.panel:hover, .panel:focus-within { animation-play-state: paused; }
@keyframes idle-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(0.15deg); }
}

@media (prefers-reduced-motion: reduce) {
  .crt-scanlines, .crt-scanlines::after, .cloud, .ticker-track, .dot-live, .drop-free,
  .panel.left, .panel.right { animation: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 1250px) {
  .stage { grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr) minmax(0, 2fr); }
  .fit-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fit-col #pantsSection > .section-tag:first-child { margin-top: 22px; }
  .outfits { --rows: 2; grid-auto-columns: calc((100% - 24px) / 4); }
}
@media (max-width: 900px) {
  .site-header { padding: 14px 16px; }
  .site-nav { margin-right: 0; }
  .stage { grid-template-columns: 1fr; padding: 8px 16px 32px; min-height: 0; }
  .viewer-wrap { order: -1; }
  #view3d { height: 58vh; }
  .outfits { grid-auto-columns: calc((100% - 16px) / 3); }
}

/* ---------- DEEP END® ---------- */
.dp-pine {
  position: fixed; top: 64px; right: 26px; z-index: 450; width: 84px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 12px 18px rgba(0, 30, 90, 0.35)); animation: dp-bob 3.6s ease-in-out infinite;
}
.dp-pine { transition: opacity 0.5s ease-in, translate 0.5s ease-in, scale 0.5s ease-in; }
.dp-pine.dp-gone { opacity: 0; translate: 0 -30px; scale: 1.1; pointer-events: none; }
.dp-pine img { display: block; width: 100%; height: auto; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.dp-pine:hover img, .dp-pine:focus-visible img { transform: scale(1.1) rotate(-4deg); }
.dp-pine-tag {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 8px; border-radius: 999px; background: #0000ff; color: #fff; font-size: 0.58rem; letter-spacing: 0.14em;
  opacity: 0; transition: opacity 0.2s;
}
.dp-pine:hover .dp-pine-tag, .dp-pine:focus-visible .dp-pine-tag { opacity: 1; }
@keyframes dp-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.modal-open .dp-pine { animation-play-state: paused; }

.dp-water {
  position: fixed; inset: 0; z-index: 800; pointer-events: none; transform: translateY(100%);
  background: linear-gradient(to bottom, rgba(0, 150, 255, 0.86), rgba(0, 70, 190, 0.95) 45%, rgba(3, 20, 90, 0.98));
}
.dp-water::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
  background: linear-gradient(to bottom, #0a8cf0, #0046be 45%, #031a5c);
}
.dp-water.dp-full::after { opacity: 1; }
.dp-fizz { position: fixed; inset: 0; z-index: 845; pointer-events: none; overflow: hidden; }
.dp-water[hidden] { display: none; }
.dp-surface {
  position: absolute; left: -40px; right: -40px; top: -14px; height: 28px;
  background: radial-gradient(ellipse 40px 14px at 40px 14px, rgba(160, 225, 255, 0.95) 60%, transparent 62%) 0 0 / 80px 28px repeat-x;
  animation: dp-wave 2.4s linear infinite;
}
@keyframes dp-wave { to { background-position: 80px 0; } }
.dp-rays {
  position: absolute; inset: 0; z-index: 1; opacity: 0.16; mix-blend-mode: screen;
  background: repeating-linear-gradient(100deg, transparent 0 60px, rgba(255, 255, 255, 0.9) 60px 90px, transparent 90px 170px);
  animation: dp-rays 9s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%); mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
@keyframes dp-rays { to { background-position: 240px 0; } }
.dp-bubble {
  position: absolute; bottom: -50px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.9) 0 14%, rgba(180, 230, 255, 0.25) 16%, rgba(120, 200, 255, 0.08) 60%);
}

.dp-stage {
  position: fixed; inset: 0; z-index: 850; overflow-y: auto; color: #fff;
  display: flex; flex-direction: column; padding: 20px 28px 24px;
}
.dp-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.dp-back {
  justify-self: start; border: 1px solid rgba(255, 255, 255, 0.55); background: transparent; color: #fff;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 0.72rem; letter-spacing: 0.1em;
}
.dp-back:hover { background: #fff; color: #0046be; }
.dp-title {
  font: 800 2.4rem 'Inter', sans-serif; letter-spacing: -0.04em;
  text-shadow: 0 3px 0 rgba(0, 20, 80, 0.35), 2px 0 rgba(255, 230, 0, 0.55), -2px 0 rgba(255, 90, 200, 0.5);
}
.dp-user { justify-self: end; display: flex; align-items: center; border-bottom: 1.5px solid rgba(255, 255, 255, 0.6); }
.dp-user input {
  width: 200px; padding: 8px 2px; border: 0; background: transparent; color: #fff; outline: none;
  font-size: 0.8rem; letter-spacing: 0.06em;
}
.dp-user input::placeholder { color: rgba(255, 255, 255, 0.7); }
.dp-user button { border: 0; background: transparent; color: #fff; font-size: 1.1rem; cursor: pointer; }
.dp-msg { text-align: center; min-height: 1.2em; margin: 8px 0 0; font-size: 0.7rem; letter-spacing: 0.12em; }
.dp-looks { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; align-items: center; }
.dp-look { display: flex; flex-direction: column; align-items: center; text-align: center; }
.dp-view { width: 100%; height: min(52vh, 460px); }
.dp-name { font: 800 1.15rem 'Inter', sans-serif; letter-spacing: -0.02em; margin: 4px 0 4px; }
.dp-color { font-size: 0.6rem; letter-spacing: 0.1em; opacity: 0.85; line-height: 1.6; margin-bottom: 10px; }
.dp-get {
  padding: 11px 24px; border-radius: 999px; border: 0; cursor: pointer;
  background: #ffe600; color: #0000ff; font: 800 0.85rem 'Inter', sans-serif; letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(0, 20, 80, 0.35); transition: transform 0.15s;
}
.dp-get:hover { transform: translateY(-2px); }
.dp-legal { text-align: center; font-size: 0.6rem; letter-spacing: 0.1em; opacity: 0.7; margin: 14px 0 0; }
@media (max-width: 900px) {
  .dp-pine { top: auto; bottom: 16px; right: 16px; width: 64px; }
  .dp-stage { padding: 14px 16px; }
  .dp-head { grid-template-columns: 1fr auto; }
  .dp-title { font-size: 1.8rem; justify-self: end; }
  .dp-user { grid-column: 1 / -1; justify-self: stretch; }
  .dp-user input { width: 100%; }
  .dp-looks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-view { height: 36vh; }
}

/* ---------- STUDY® (magazine: white paper, Caslon, justified columns) ---------- */
body.st {
  background: #fff; color: #111; margin: 0;
  font-family: 'Libre Caslon Text', Georgia, serif;
  --st-sans: 'Inter', Helvetica, Arial, sans-serif; --st-grey: #6b6b6b; --st-rule: #e2e2e2;
}
.st a { color: inherit; }
.st-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 18px 24px; border-bottom: 1px solid #111;
}
.st .st-wordmark { font: 800 1.2rem var(--st-sans); letter-spacing: -0.03em; text-decoration: none; color: #0000ff; }
.st-wordmark span { font-weight: 400; color: #111; }
.st-nav { display: flex; gap: 22px; font: 600 0.7rem var(--st-sans); letter-spacing: 0.14em; }
.st-nav a { text-decoration: none; }
.st-nav a:hover { color: #0000ff; }
.st-rubric { margin: 0; font: 600 0.72rem var(--st-sans); letter-spacing: 0.16em; text-transform: uppercase; color: #0000ff; }
.st-dek { margin: 0; font-style: italic; }
.st-byline { margin: 0; font: 400 0.72rem var(--st-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--st-grey); }
.st-byline strong { color: #111; font-weight: 600; }
.st-byline time { margin-left: 10px; }

/* Archive */
.st-archive { max-width: 1100px; margin: 0 auto; padding: 0 24px 60px; }
.st-mast { text-align: center; padding: 46px 0 26px; border-bottom: 4px double #111; }
.st-mast h1 { margin: 0; font: 400 clamp(3.6rem, 12vw, 7.5rem) 'Libre Caslon Display', Georgia, serif; letter-spacing: -0.02em; line-height: 0.9; }
.st-mast h1 span { font-size: 0.35em; vertical-align: 1.4em; }
.st-mast p { margin: 16px auto 0; max-width: 540px; font-style: italic; font-size: 1.05rem; color: #333; }
.st-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: center; padding: 34px 0; border-bottom: 1px solid var(--st-rule); }
.st-item-img { display: block; background: #f4f2ee; }
.st-item-img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.st-item-text { display: grid; gap: 10px; }
.st-item h2 { margin: 0; font: 400 clamp(1.9rem, 4vw, 2.6rem) 'Libre Caslon Display', Georgia, serif; line-height: 1.05; }
.st-item h2 a { text-decoration: none; }
.st-item h2 a:hover { color: #0000ff; }
.st-item .st-dek { font-size: 1.15rem; color: #333; }
.st-feature { grid-template-columns: 1fr; text-align: center; gap: 22px; }
.st-feature .st-item-img img { aspect-ratio: 21 / 9; }
.st-feature h2 { font-size: clamp(2.4rem, 6vw, 3.8rem); }
.st-feature .st-item-text { justify-items: center; }

/* Post */
.st-article { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.st-head { text-align: center; max-width: 820px; margin: 0 auto; padding: 48px 0 30px; display: grid; gap: 14px; justify-items: center; }
.st-head h1 { margin: 0; font: 400 clamp(2.8rem, 8vw, 5.2rem) 'Libre Caslon Display', Georgia, serif; line-height: 0.98; letter-spacing: -0.01em; }
.st-head .st-dek { font-size: clamp(1.2rem, 2.6vw, 1.5rem); color: #333; }
.st-lead { margin: 0 auto; max-width: 1100px; }
.st-lead img { display: block; width: 100%; background: #f4f2ee; }
.st-lead figcaption, .st-fig figcaption, .st-gcap {
  margin-top: 8px; font: 400 0.74rem/1.5 var(--st-sans); color: var(--st-grey); text-align: left;
}
.st-body { max-width: 640px; margin: 0 auto; padding: 40px 0 10px; font-size: 1.13rem; line-height: 1.62; }
.st-body p { margin: 0 0 1.05em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.st-body a { color: #0000ff; text-decoration: underline; text-underline-offset: 2px; }
.st-first::first-letter {
  float: left; font: 400 5.1em/0.8 'Libre Caslon Display', Georgia, serif; margin: 0.06em 0.08em -0.05em 0; color: #0000ff;
}
.st-body .st-note { font-style: italic; font-size: 0.95rem; color: var(--st-grey); text-align: left; }
.st-body .st-q { margin-top: 1.8em; font-weight: 700; text-align: left; hyphens: manual; }
.st-pull { margin: 1.6em 0; padding: 22px 0; border-top: 1px solid #111; border-bottom: 1px solid #111; }
.st-pull p { margin: 0 !important; text-align: center !important; hyphens: manual !important; font: italic 400 clamp(1.5rem, 3.4vw, 2rem)/1.25 'Libre Caslon Text', Georgia, serif; color: #0000ff; }
.st-pull p::before { content: '“'; } .st-pull p::after { content: '”'; }
.st-wide { margin: 2.2em -120px; }
.st-fig img { display: block; width: 100%; background: #f4f2ee; }
.st-pair { display: grid; gap: 14px; }
.st-pair.st-n2 { grid-template-columns: 1fr 1fr; }
.st-pair.st-n3 { grid-template-columns: 1fr 1fr 1fr; }
.st-pair figcaption { grid-column: 1 / -1; margin-top: 0; }
.st-pair > *, .st-grid > * { min-width: 0; }
.st-tile { background: #f4f2ee; aspect-ratio: 3 / 4; padding: 18px; box-sizing: border-box; overflow: hidden; }
.st-tile img { display: block; width: 100% !important; height: 100%; background: none !important; object-fit: contain; }
.st-end { color: #0000ff; font-size: 0.7em; vertical-align: 0.1em; }
.st-h { margin: 2.6em 0 0.8em; padding-top: 14px; border-top: 4px double #111; font: 600 0.8rem var(--st-sans); letter-spacing: 0.18em; text-transform: uppercase; }
.st-gallery h3 { margin: 0 0 10px; font: 400 1.5rem 'Libre Caslon Display', Georgia, serif; }
.st-grid { display: grid; gap: 12px; }
.st-grid.st-n4 { grid-template-columns: repeat(4, 1fr); }
.st-grid.st-n6 { grid-template-columns: repeat(6, 1fr); }
.st-grid figure { margin: 0; }
.st-grid .st-tile { aspect-ratio: 5 / 8; padding: 10px; }
.st-grid figcaption { margin-top: 8px; display: grid; gap: 2px; font: 400 0.7rem/1.35 var(--st-sans); color: var(--st-grey); }
.st-grid figcaption strong { color: #111; font-weight: 600; letter-spacing: 0.04em; }
.st-gcap a { color: #0000ff; font-weight: 600; }

/* Comments */
.st-comments { max-width: 640px; margin: 0 auto; padding-bottom: 60px; }
.st-form { display: grid; gap: 10px; }
.st-form input, .st-form textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #cfcfcf; border-radius: 0;
  font: 400 1rem 'Libre Caslon Text', Georgia, serif; color: #111; background: #fff; resize: vertical;
}
.st-form input:focus, .st-form textarea:focus { outline: 2px solid #0000ff; outline-offset: -1px; }
.st-form .st-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.st-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: italic 0.9rem 'Libre Caslon Text', Georgia, serif; color: var(--st-grey); }
.st-form button { border: 0; background: #111; color: #fff; padding: 11px 24px; font: 600 0.72rem var(--st-sans); letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }
.st-form button:hover { background: #0000ff; }
.st-form button:disabled { opacity: 0.35; cursor: default; }
.st-list { list-style: none; margin: 26px 0 0; padding: 0; }
.st-list li { padding: 16px 0; border-top: 1px solid var(--st-rule); }
.st-c-head { margin: 0; display: flex; justify-content: space-between; gap: 10px; font: 400 0.72rem var(--st-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-grey); }
.st-c-head strong { color: #0000ff; font-weight: 600; }
.st-list li > p:last-child { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.st-foot { max-width: 1100px; margin: 0 auto; padding: 22px 24px 40px; border-top: 1px solid #111; font: 400 0.72rem var(--st-sans); letter-spacing: 0.08em; color: var(--st-grey); display: flex; justify-content: space-between; }

@media (max-width: 980px) { .st-wide { margin-left: 0; margin-right: 0; } }
@media (max-width: 700px) {
  .st-nav { gap: 14px; }
  .st-item { grid-template-columns: 1fr; gap: 16px; }
  .st-body { font-size: 1.05rem; }
  .st-grid.st-n4 { grid-template-columns: repeat(2, 1fr); }
  .st-grid.st-n6 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Mobile nav (js/nav.js): hamburger under 700px ---------- */
.nav-burger { display: none; }
@media (max-width: 700px) {
  .site-header, .st-bar { position: relative; z-index: 800; }
  .nav-burger {
    display: grid; align-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 12px; border: 0; cursor: pointer;
    border-radius: 999px; background: #0000ff; box-shadow: 0 6px 18px rgba(0, 0, 90, 0.28); flex-shrink: 0;
  }
  .nav-burger span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform 0.25s ease, opacity 0.2s; }
  .nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header .site-nav, .st-bar .st-nav {
    display: none; position: absolute; z-index: 700; top: calc(100% - 4px); left: 16px; right: 16px; margin: 0;
    flex-direction: column; gap: 0; padding: 6px; border-radius: 18px;
    background: #fff; box-shadow: 0 24px 60px rgba(11, 21, 38, 0.28);
    animation: nav-drop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-open .site-nav, .nav-open .st-nav { display: flex; }
  .site-nav .nav-link {
    background: none; box-shadow: none; color: #0000ff; border-radius: 12px; padding: 16px 14px;
    font-size: 1.05rem; text-align: left; transform: none; text-decoration: none; opacity: 1; text-shadow: none;
  }
  .site-nav .nav-link + .nav-link { border-top: 1px solid rgba(11, 21, 38, 0.08); border-radius: 0; }
  .site-nav .nav-link:hover, .site-nav .nav-link:focus-visible { background: rgba(0, 0, 255, 0.06); }
  /* STUDY®: black on white, like the rest of the page */
  .st-bar .nav-burger { background: none; box-shadow: none; padding: 0 10px; }
  .st-bar .nav-burger span { background: #111; }
  .st-bar .st-nav { border-radius: 0; border: 1px solid #111; box-shadow: none; background: #fff; }
  .st-bar .st-nav a, .st-bar .st-nav a:last-child { display: block; padding: 16px 12px; font-size: 0.8rem; }
  .st-bar .st-nav a + a { border-top: 1px solid #e2e2e2; }
}
@keyframes nav-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }


/* ---------- Fall banner (AMONG THE TREES®) ---------- */
.fall-banner {
  display: block; position: relative; z-index: 5; padding: 11px 16px; text-align: center; text-decoration: none;
  background: linear-gradient(90deg, #7a5d86 0%, #b06e7a 22%, #c2452b 50%, #d0802c 76%, #e0a24a 100%);
  color: #fff4e2; font-size: 0.72rem; letter-spacing: 0.24em; font-weight: 400;
  text-shadow: 0 1px 2px rgba(80, 25, 0, 0.35);
}
.fall-banner span { margin-left: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.fall-banner:hover span { text-underline-offset: 7px; }
.intro .fall-banner { opacity: 0; }

/* ---------- Calmer, roomier outfitter: lighter type, more space ---------- */
.wordmark { font-weight: 700; }
.site-nav .nav-link { font-weight: 500; }
.download-btn { font-weight: 500; letter-spacing: 0.06em; }
.download-hint strong { font-weight: 600; }
.share-row .chip { font-weight: 400; }
.segmented button { font-weight: 400; }
.outfit { font-weight: 400; }
.carousel-btn { font-weight: 300; }
.upload-text strong { font-weight: 500; }
@media (min-width: 901px) {
  .stage { gap: clamp(28px, 3vw, 56px); padding: 24px clamp(28px, 3vw, 56px) 72px; }
  .panel { padding: 32px 32px 34px; }
  .section-tag { margin: 36px 0 16px; }
  .section-tag:first-child { margin-top: 0; }
  #pantsSection > .section-tag:first-child, #sleeveSection > .section-tag:first-child,
  #shoeSection > .section-tag:first-child, #boxerSection > .section-tag:first-child,
  #tuckSection > .section-tag:first-child { margin-top: 36px; }
  .fit-col #pantsSection > .section-tag:first-child { margin-top: 0; }
  .fit-cols { gap: clamp(36px, 4vw, 64px); }
  .line-toggle { margin-bottom: 34px; }
  /* arrows float over the grid's edges so the cards keep the full width */
  .outfit-carousel { position: relative; display: block; }
  .outfit-carousel .carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 30px; box-shadow: 0 4px 14px rgba(11, 21, 38, 0.16); }
  .outfit-carousel .carousel-btn:first-child { left: -15px; }
  .outfit-carousel .carousel-btn:last-child { right: -15px; }
  .outfit-carousel .carousel-btn:disabled { opacity: 0; pointer-events: none; }
  .outfits { gap: 12px; grid-auto-columns: calc((100% - 24px) / 3); }
  .outfits .outfit { padding: 10px 8px 12px; }
  .outfit img.ghost-thumb, .outfit img.pants-thumb { padding: 5px; }
  .outfits .outfit .outfit-name { font-size: 0.62rem; }
  .panel.left { padding-left: 26px; padding-right: 26px; }
  .outfit img { margin-bottom: 8px; }
  .swatches { margin-top: 20px; }
  .micro { margin-top: 12px; line-height: 1.6; }
  .username { margin-top: 14px; }
  .fine-tune { margin-top: 32px; padding-top: 22px; }
  .right-col { gap: 22px; }
  .share-row { gap: 12px; }
}
@media (min-width: 901px) and (max-width: 1250px) {
  .outfits { grid-auto-columns: calc((100% - 36px) / 4); }
  .fit-col #pantsSection > .section-tag:first-child { margin-top: 36px; }
}
@media (max-width: 900px) {
  .panel { padding: 24px 22px 26px; }
  .section-tag { margin: 28px 0 14px; }
  .outfits { gap: 12px; }
  .fall-banner { font-size: 0.62rem; letter-spacing: 0.16em; padding: 10px 12px; }
  .fall-banner span { display: inline-block; margin-left: 8px; }
}

.tone .chip { white-space: nowrap; }

/* ---------- One-screen layout (wide screens) ----------
   Configurator pattern: the result on the left (model + GOOD® ME), the
   controls on the right (your skin, then the fit). The whole app fits the
   first screen; each panel scrolls inside itself if it ever runs long. */
@media (min-width: 1251px) {
  .site-header { padding: 10px 40px; }
  .wordmark { font-size: 1.7rem; }
  .stage {
    --chrome: 128px;   /* banner + header + ticker, and a little air below */
    height: calc(100svh - var(--chrome)); min-height: 600px;
    grid-template-columns: minmax(260px, 25fr) minmax(250px, 19fr) minmax(0, 56fr);
    grid-template-rows: minmax(0, 1fr) auto auto auto auto;
    grid-template-areas: "view you fit" "dl you fit" "dlhint you fit" "share you fit" "sharehint you fit";
    align-items: stretch; gap: 0 clamp(28px, 2.6vw, 48px);
    padding: 6px clamp(28px, 2.6vw, 48px) 26px; max-width: 1800px;
  }
  .viewer-wrap { grid-area: view; min-height: 0; justify-content: center; }
  #view3d { flex: 1; height: auto; min-height: 0; width: 100%; }
  .viewer-wrap > .micro { margin-top: 8px; }
  .right-col { display: contents; }
  .panel.left { grid-area: you; }
  .panel.right { grid-area: fit; }
  .panel.left, .panel.right { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; align-self: stretch; padding: 26px 28px 28px; }
  #download { grid-area: dl; margin-top: 12px; padding: 13px 18px; font-size: 1.05rem; }
  #downloadHint { grid-area: dlhint; margin: 8px 4px 0; }
  .share-row { grid-area: share; margin-top: 12px; }
  #shareHint { grid-area: sharehint; margin: 6px 4px 0; }

  /* The fit: tighter tags, four cards a row, small options side by side */
  .panel.right .line-toggle { margin-bottom: 22px; }
  .panel.right .section-tag { margin: 22px 0 12px; }
  .panel.right .section-tag:first-child { margin-top: 0; }
  .outfits { grid-auto-columns: calc((100% - 20px) / 3); gap: 10px; }
  .sw-dots { flex-wrap: nowrap; gap: 2px; }
  .swatches { gap: 10px; }
  .outfits .outfit { padding: 8px 6px 9px; }
  .outfit img { margin-bottom: 6px; }
  .outfits .outfit .outfit-name { font-size: 0.58rem; }
  .swatches { margin-top: 14px; }
  .fit-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; align-content: start; }
  .fit-col > *, #pantsSection > * { grid-column: 1 / -1; }
  .fit-col > #sleeveSection, .fit-col > #tuckSection { grid-column: auto; }
  #pantsSection { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; align-content: start; }
  #pantsSection > #shoeSection { grid-column: 1 / -1; }
  #pantsSection > #boxerSection { grid-column: 1 / -1; }
  #pantsSection > .section-tag:first-child, #sleeveSection > .section-tag:first-child,
  #shoeSection > .section-tag:first-child, #boxerSection > .section-tag:first-child,
  #tuckSection > .section-tag:first-child { margin-top: 22px; }
  .fit-col #pantsSection > .section-tag:first-child { margin-top: 0; }
  .texture { margin-top: 18px; }

  /* Your skin: a little tighter so it fits the column height */
  .panel.left .section-tag { margin: 24px 0 12px; }
  .panel.left .section-tag:first-child { margin-top: 0; }
  .panel.left .fine-tune { margin-top: 24px; padding-top: 18px; }
}
/* Shorter laptop screens: shrink a little more */
@media (min-width: 1251px) and (max-height: 820px) {
  .fall-banner { padding: 8px 16px; }
  .stage { --chrome: 116px; }
  .outfits { --rows: 2; grid-auto-columns: calc((100% - 30px) / 4); }
}
@media (min-width: 1251px) and (max-width: 1440px) {
  .panel.right .segmented.small button { font-size: 0.7rem; padding: 6px 2px; letter-spacing: -0.01em; }
  .outfits .outfit .outfit-name { font-size: 0.54rem; }
  .share-row .chip { white-space: nowrap; font-size: 0.66rem; }
  .panel.right { padding-left: 22px; padding-right: 22px; }
  .fit-cols { gap: 26px; }
  .stage { grid-template-columns: minmax(240px, 24fr) minmax(240px, 19fr) minmax(0, 57fr); }
  .outfits { min-width: 0; }
}

/* STUDY®: pixel shapes the text wraps around (the Gs in OLD G® TO NEW G®).
   Locked to the text's line grid: one shape row = two lines (one on phones),
   so the open side of each G takes whole lines. The gap lives in the mask. */
.st-wrap {
  --cell: 1.62em; /* one G pixel per line of text: a four-line drop cap */
  float: left; width: calc((var(--cols) + 0.4) * var(--cell)); height: auto; /* PNG carries the gutter */
  margin: 0 0 -0.5em; -webkit-user-drag: none; /* lets line five clear the cap even if a line box runs tall */
}
.st-wrap ~ p { margin-bottom: 1.62em; }
.st-body .st-h, .st-body .st-pull, .st-body figure, .st-body section { clear: both; }

/* ---------- Equipped: what's on, by the model ---------- */
.viewer-wrap { position: relative; }
.equipped { position: absolute; z-index: 4; left: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; }
.eq-slot {
  position: relative; width: 58px; height: 58px; padding: 6px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--glass-edge);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(11, 21, 38, 0.14); transition: transform 0.15s, box-shadow 0.15s;
}
.eq-slot img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.equipped { gap: 10px; }
.eq-slot .eq-locked { display: block; width: 100%; height: 100%; border-radius: 8px; background: #87cefa; }
.eq-dot { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(11, 21, 38, 0.25); }
.eq-x {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px;
  background: rgba(11, 21, 38, 0.55); color: #fff; font: 300 1.6rem/1 'Inter', sans-serif;
  opacity: 0; transition: opacity 0.15s;
}
.eq-slot:not(.eq-empty):hover .eq-x, .eq-slot:not(.eq-empty):focus-visible .eq-x { opacity: 1; }
.eq-slot:not(.eq-empty):hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(11, 21, 38, 0.2); }
.eq-empty { cursor: default; background: rgba(255, 255, 255, 0.3); border-style: dashed; border-color: rgba(11, 21, 38, 0.25); box-shadow: none; }
.eq-none { display: grid; place-items: center; height: 100%; font-size: 0.5rem; letter-spacing: 0.1em; color: var(--ink-soft); text-align: center; line-height: 1.3; }
.intro .equipped { opacity: 0; }
@media (max-width: 900px) { .equipped { left: 4px; } .eq-slot { width: 52px; height: 52px; } }

/* ---------- Site footer ---------- */
.site-foot { position: relative; z-index: 1; text-align: center; padding: 40px 24px 48px; font-size: 0.68rem; letter-spacing: 0.16em; color: #fff; text-shadow: 0 1px 2px rgba(11, 21, 38, 0.35); }

/* AMONG THE TREES®: NEW tag on Season II cards */
.outfit { position: relative; }
.new-tag {
  position: absolute; top: 5px; left: 5px; z-index: 1; padding: 2px 5px; border-radius: 3px;
  background: #a65a2e; color: #fff4e2; font-size: 0.5rem !important; font-weight: 700; letter-spacing: 0.14em; line-height: 1.3 !important;
  display: inline-block !important; pointer-events: none;
}

/* CURRENT SEASON filter, beside the SHIRT and PANTS labels */
.tag-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.season-filter { display: inline-flex; align-items: center; gap: 2px; }
.season-btn, .season-x {
  border: 1px solid rgba(11, 21, 38, 0.18); background: transparent; color: var(--ink); cursor: pointer;
  font-size: 0.56rem; letter-spacing: 0.14em; padding: 3px 8px; border-radius: 999px; line-height: 1.4;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.season-btn:hover { border-color: #a65a2e; color: #a65a2e; }
.season-btn[aria-pressed="true"] { background: #a65a2e; border-color: #a65a2e; color: #fff4e2; }
.season-x { padding: 2px 7px; font-size: 0.72rem; border-color: #a65a2e; background: #a65a2e; color: #fff4e2; }
.season-x:hover { background: #7e3a1d; border-color: #7e3a1d; }
.season-x[hidden] { display: none; }

/* Shoe cards: LOAFER®, SNEAK01, CHELSEA® (colourways picked under them) */
.shoe-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.shoe-cards .outfit { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; min-width: 0; }
.shoe-cards .shoe-thumb { width: 56%; max-width: 48px; aspect-ratio: 8 / 7; height: auto; margin: 0; image-rendering: pixelated; filter: drop-shadow(0 3px 3px rgba(11, 21, 38, 0.18)); }
.shoe-cards .outfit-name { font-size: 0.64rem; letter-spacing: -0.01em; line-height: 1.2; }
#shoeColors { margin-top: 8px; }

/* GOOD® BLUE background: text and the download button that sit straight on the blue */
.viewer-wrap > .micro, .download-hint, #shareHint { color: rgba(255, 255, 255, 0.85); }
.download-hint strong { color: #fff; }
.download-btn { background: #fff; color: #0000ff; border-color: #fff; }
.download-btn:hover:not(:disabled) { background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 40, 0.35); }
.download-btn:disabled { background: rgba(255, 255, 255, 0.55); color: #0000ff; }

/* ---------- GOOD® ACCOUNT ---------- */
.home-skin { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.home-skin[hidden] { display: none; }
.home-skin .chip { font-size: 0.62rem; letter-spacing: 0.14em; padding: 7px 12px; }
.wardrobe-save { width: 100%; margin-top: 10px; padding: 11px 14px; border: 1px solid #fff; background: transparent; color: #fff; font-size: 0.7rem; letter-spacing: 0.16em; font-weight: 700; cursor: pointer; display: flex; justify-content: center; gap: 10px; }
.wardrobe-save span { opacity: 0.75; font-weight: 400; }
.wardrobe-save:hover { background: #fff; color: #0000ff; }
.acct-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 960; background: #fff; color: #0000ff; padding: 12px 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; box-shadow: 0 10px 30px rgba(0, 0, 40, 0.35); }
.acct-toast[hidden] { display: none; }

.st-member::after { content: ' ●'; color: #0000ff; }
.st-as { margin: 0; font-family: var(--st-sans); font-size: 0.8rem; color: var(--st-grey); }

/* GOOD® COIN: metallic GOOD® BLUE fading into chrome, the new G stamped in */
.coin { display: inline-block; width: 1.15em; height: 1.15em; background: url(assets/coin.svg) center / contain no-repeat; vertical-align: -0.22em; margin-right: 0.3em; }
.wardrobe-save { flex-wrap: wrap; align-items: center; white-space: nowrap; }
.wardrobe-save > span { display: inline-flex; align-items: center; }
.foot-link { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
