/* =============================================================
   Nike Copilot — Track Field Editorial
   Aesthetic: deep ink + warm paper + single Volt accent
   Fonts:    Bebas Neue (display) · Public Sans (body) ·
             JetBrains Mono (data) · Noto Serif SC (CJK editorial)
   ============================================================= */

:root {
  --paper:    #F5F1E8;
  --paper-dim:#E5DFD0;
  --ink:      #0A0A0A;
  --ink-2:    #131313;
  --ink-3:    #1C1C1C;
  --line:     #2A2A28;
  --smoke:    #6F6E66;
  --volt:     #D4FF00;
  --volt-dim: #B8E000;
  --blood:    #FF2E2E;

  --display: 'Bebas Neue', 'Noto Serif SC', sans-serif;
  --serif-cn: 'Noto Serif SC', 'Songti SC', serif;
  --body:    'Public Sans', 'Noto Serif SC', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --rail-w: 380px;
  --topbar-h: 64px;
  --composer-h: 92px;
  --easing: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------------------------------------------------------------
   Reset
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
ol, ul { list-style: none; padding: 0; margin: 0; }
em { font-style: normal; color: var(--volt); font-weight: 600; }

/* ---------------------------------------------------------------
   Decorative track lanes (full-page)
--------------------------------------------------------------- */
.track-lanes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 0;
  opacity: 0.45;
}
.track-lanes span {
  border-right: 1px solid var(--line);
  height: 100%;
  position: relative;
}
.track-lanes span:last-child { border-right: none; }
.track-lanes span::before {
  /* Tiny tick marks every 80px — like a 100m track */
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background-image: linear-gradient(to bottom, var(--volt-dim) 0 8px, transparent 8px 84px);
  background-size: 1px 92px;
  opacity: 0.18;
}

/* Subtle film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.94 0 0 0 0 0.91 0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.55;
}

/* ---------------------------------------------------------------
   Top bar
--------------------------------------------------------------- */
.topbar {
  position: relative;
  z-index: 10;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(6px);
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--volt);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1;
  transform: skewX(-8deg);
  box-shadow: 4px 4px 0 var(--ink-3);
}
.logo-text { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.logo-text__main {
  font-family: var(--display);
  letter-spacing: 0.06em;
  font-size: 20px;
  color: var(--paper);
}
.logo-text__sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--smoke);
  letter-spacing: 0.18em;
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--smoke);
  text-transform: uppercase;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--smoke);
  animation: pulse 2s var(--easing) infinite;
}
.status-dot.ok    { background: var(--volt); }
.status-dot.fail  { background: var(--blood); }
.status-text.ok   { color: var(--paper); }
.status-text.fail { color: var(--blood); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 160ms var(--easing);
}
.ghost-btn:hover {
  border-color: var(--volt);
  color: var(--volt);
  transform: translateY(-1px);
}
.ghost-btn__num {
  color: var(--volt);
  font-weight: 700;
}
.ghost-btn--primary {
  border-color: var(--volt);
  color: var(--volt);
}
.ghost-btn--primary:hover {
  background: var(--volt);
  color: var(--ink);
}

/* ---------------------------------------------------------------
   Main stage layout
--------------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr var(--rail-w);
  min-height: calc(100vh - var(--topbar-h) - var(--composer-h));
}

/* ---------------------------------------------------------------
   Canvas (left): hero + chat thread
--------------------------------------------------------------- */
.canvas {
  position: relative;
  padding: 44px 56px 32px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}

/* Hero / empty state */
.hero {
  max-width: 720px;
  animation: heroIn 700ms var(--easing) both;
}
.hero.faded {
  opacity: 0.18;
  filter: grayscale(0.6);
  transform: scale(0.96) translateY(-12px);
  transition: opacity 400ms var(--easing), filter 400ms var(--easing), transform 400ms var(--easing);
  pointer-events: none;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--smoke);
  text-transform: uppercase;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 6px 12px;
  margin-bottom: 28px;
}
.hero__eyebrow .caret { color: var(--volt); }

.hero__title {
  font-family: var(--display);
  font-size: clamp(72px, 11vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--paper);
}
.hero__line {
  display: block;
  animation: lineIn 600ms var(--easing) both;
}
.hero__line:nth-child(1) { animation-delay: 60ms; }
.hero__line:nth-child(2) { animation-delay: 180ms; }
.hero__line:nth-child(3) { animation-delay: 300ms; }
.hero__line--volt { color: var(--volt); }
.hero__dot {
  display: inline-block;
  margin-left: 6px;
  width: 28px;
  height: 28px;
  background: var(--volt);
  vertical-align: 0;
  transform: translateY(-8px);
  animation: dotPop 600ms 600ms var(--easing) both;
}
@keyframes lineIn {
  from { opacity: 0; transform: translateY(28px) skewY(2deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes dotPop {
  from { transform: translateY(-8px) scale(0); }
  to   { transform: translateY(-8px) scale(1); }
}

.hero__lede {
  font-family: var(--serif-cn);
  font-size: 19px;
  line-height: 1.7;
  color: var(--paper);
  max-width: 600px;
  margin: 0 0 36px;
  font-weight: 500;
}

.hero__suggest { margin-top: 8px; }
.suggest__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--smoke);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.suggest__label::before,
.suggest__label::after {
  content: '';
  flex: 0 0 auto;
}
.suggest__label::before {
  width: 28px;
  height: 1px;
  background: var(--volt);
}
.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.chip {
  position: relative;
  border: 1px solid var(--line);
  padding: 14px 16px 14px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 200ms var(--easing);
  background: var(--ink-2);
}
.chip:hover {
  border-color: var(--volt);
  transform: translateY(-2px);
  box-shadow: 0 8px 0 -4px var(--ink), 0 8px 0 -3px var(--volt);
}
.chip__num {
  font-family: var(--display);
  font-size: 28px;
  color: var(--volt);
  line-height: 1;
  flex: 0 0 auto;
}
.chip__text {
  font-family: var(--body);
  font-size: 14px;
  color: var(--paper);
  letter-spacing: 0;
}

/* ---------------------------------------------------------------
   Thread (chat messages)
--------------------------------------------------------------- */
.thread {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 12px;
}
.turn {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 24px;
  position: relative;
  animation: turnIn 360ms var(--easing) both;
}
@keyframes turnIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.turn__meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--smoke);
  text-transform: uppercase;
  padding-top: 6px;
  border-right: 1px solid var(--line);
  padding-right: 12px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.turn__role {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.06em;
  line-height: 1;
}
.turn--user .turn__role  { color: var(--paper); }
.turn--coach .turn__role { color: var(--volt); }
.turn__num {
  font-size: 10px;
  color: var(--smoke);
}

.turn__body {
  font-size: 16px;
  line-height: 1.72;
  color: var(--paper);
  max-width: 680px;
}
.turn--user .turn__body {
  font-family: var(--serif-cn);
  font-weight: 500;
  color: var(--paper);
  font-size: 18px;
  line-height: 1.6;
}
.turn--coach .turn__body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--paper-dim);
}
.turn--coach .turn__body strong {
  color: var(--volt);
  font-weight: 600;
  background: linear-gradient(to top, rgba(212,255,0,0.12) 35%, transparent 35%);
  padding: 0 2px;
}
.turn__body p { margin: 0 0 12px; }
.turn__body p:last-child { margin-bottom: 0; }

/* Pipeline indicator (replaces old typing dot) */
.pipeline {
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 16px 18px;
  max-width: 720px;
  animation: turnIn 280ms var(--easing) both;
}
.pipeline__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.pipeline__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--volt);
  text-transform: uppercase;
}
.pipeline__bar {
  position: relative;
  flex: 1;
  height: 2px;
  max-width: 320px;
  background: var(--line);
  overflow: hidden;
}
.pipeline__bar span {
  position: absolute;
  top: 0;
  left: -40%;
  height: 100%;
  width: 40%;
  background: var(--volt);
  animation: dash 1.4s var(--easing) infinite;
}
@keyframes dash {
  0%   { left: -40%; }
  100% { left: 100%; }
}
.pipeline__elapsed {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--smoke);
}

.pipeline__steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.step {
  display: grid;
  grid-template-columns: 36px 1fr auto 16px;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--smoke);
  border-left: 2px solid transparent;
  transition: all 200ms var(--easing);
}
.step__index {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--smoke);
}
.step__label {
  letter-spacing: 0.16em;
  color: inherit;
}
.step__time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--smoke);
  letter-spacing: 0.1em;
}
.step__bullet {
  font-family: monospace;
  font-size: 14px;
  text-align: center;
  color: var(--smoke);
  transition: all 180ms var(--easing);
}
/* States */
.step.is-running {
  color: var(--volt);
  border-left-color: var(--volt);
  background: rgba(212, 255, 0, 0.04);
}
.step.is-running .step__index { color: var(--volt); }
.step.is-running .step__bullet { color: var(--volt); animation: pulseBullet 1s ease-in-out infinite; }
.step.is-done {
  color: var(--paper);
  border-left-color: var(--paper);
}
.step.is-done .step__index { color: var(--paper); }
.step.is-done .step__bullet { color: var(--volt); }
.step.is-done .step__time { color: var(--volt); }
.step.is-skipped {
  opacity: 0.32;
}
.step.is-skipped .step__bullet::before { content: '⊘'; }
@keyframes pulseBullet {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ---------------------------------------------------------------
   Rail (right): recommendation cards
--------------------------------------------------------------- */
.rail {
  position: sticky;
  top: var(--topbar-h);
  align-self: start;
  height: calc(100vh - var(--topbar-h) - var(--composer-h));
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rail__head {
  padding: 28px 28px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.rail__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.rail__hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--smoke);
  text-transform: uppercase;
}
.rail__cards {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rail__cards::-webkit-scrollbar { width: 4px; }
.rail__cards::-webkit-scrollbar-thumb { background: var(--line); }

.card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--ink);
  padding: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms var(--easing), border-color 200ms var(--easing), box-shadow 200ms var(--easing);
  animation: cardIn 480ms var(--easing) both;
  overflow: hidden;
}
.card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #161613 0%, #1f1f1c 100%);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px 18px;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.35));
  transition: transform 360ms var(--easing);
}
.card:hover .card__image img {
  transform: scale(1.04);
}
.card__image::after {
  /* 1px Volt anchor line at bottom of image well */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--volt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--easing);
}
.card:hover .card__image::after {
  transform: scaleX(1);
}
.card__image--fallback img { display: none; }
.card__image--fallback::before {
  content: attr(data-sku);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--smoke);
  padding: 8px 12px;
  border: 1px dashed var(--line);
}
.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 18px 0;
}
.card:nth-child(1) { animation-delay: 80ms; }
.card:nth-child(2) { animation-delay: 200ms; }
.card:nth-child(3) { animation-delay: 320ms; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.card:hover {
  border-color: var(--volt);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 var(--volt);
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.card__num {
  font-family: var(--display);
  font-size: 42px;
  line-height: 0.8;
  color: var(--volt);
  letter-spacing: 0;
}
.card__price {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0;
}
.card__price-currency {
  color: var(--smoke);
  font-weight: 400;
  margin-right: 2px;
}

.card__title {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  line-height: 1.3;
  margin: 0;
}
.card__subtitle {
  font-family: var(--serif-cn);
  font-weight: 500;
  font-size: 13px;
  color: var(--smoke);
  line-height: 1.5;
  margin: -4px 0 0;
}

.card__sku {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--smoke);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card__sku::before {
  content: 'SKU';
  color: var(--ink);
  background: var(--volt);
  font-weight: 700;
  padding: 2px 5px;
  letter-spacing: 0.14em;
}

.card__reason {
  font-family: var(--serif-cn);
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper-dim);
  font-weight: 500;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.card__cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--volt);
  color: var(--volt);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  transition: all 180ms var(--easing);
}
.card:hover .card__cta {
  background: var(--volt);
  color: var(--ink);
}
.card__cta .cta-arrow {
  font-size: 16px;
  transform: translateX(0);
  transition: transform 200ms var(--easing);
}
.card:hover .card__cta .cta-arrow {
  transform: translateX(4px);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--volt);
  color: var(--volt);
}
.tag--bestseller { background: var(--volt); color: var(--ink); border-color: var(--volt); }
.tag--newin      { color: var(--paper); border-color: var(--paper); }
.tag--sale       { color: var(--blood); border-color: var(--blood); }

/* Empty rail state */
.rail__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 28px;
  border-top: 1px dashed var(--line);
}
.rail__empty h3 {
  font-family: var(--display);
  font-size: 56px;
  line-height: 0.85;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  color: var(--paper);
}
.rail__empty span.volt-bar {
  display: inline-block;
  width: 48px;
  height: 6px;
  background: var(--volt);
  margin-bottom: 16px;
}
.rail__empty p {
  font-family: var(--serif-cn);
  font-size: 13px;
  font-weight: 500;
  color: var(--smoke);
  line-height: 1.6;
  margin: 0;
  max-width: 240px;
}

/* ---------------------------------------------------------------
   Composer (sticky bottom)
--------------------------------------------------------------- */
.composer {
  position: sticky;
  bottom: 0;
  z-index: 8;
  height: var(--composer-h);
  border-top: 1px solid var(--line);
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 32px;
  gap: 6px;
}
.composer__form {
  display: flex;
  align-items: center;
  gap: 12px;
}
.composer__caret {
  font-family: var(--display);
  font-size: 32px;
  color: var(--volt);
  line-height: 1;
}
.composer__input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line);
  outline: none;
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  padding: 10px 4px;
  transition: border-color 200ms var(--easing);
}
.composer__input::placeholder {
  color: var(--smoke);
  font-style: italic;
}
.composer__input:focus {
  border-bottom-color: var(--volt);
}
.composer__send {
  background: var(--volt);
  color: var(--ink);
  border: none;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 200ms var(--easing);
}
.composer__send:hover:not(:disabled) {
  background: var(--paper);
  transform: translateX(2px);
}
.composer__send:disabled {
  background: var(--line);
  color: var(--smoke);
  cursor: not-allowed;
}
.composer__send-arrow {
  font-size: 16px;
  transform: translateY(-1px);
}
.composer__meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--smoke);
  text-transform: uppercase;
  display: flex;
  gap: 12px;
  padding-left: 28px;
}
.composer__meta .dot { color: var(--volt); }

/* ---------------------------------------------------------------
   Debug drawer
--------------------------------------------------------------- */
.debug {
  position: fixed;
  top: 0;
  right: 0;
  width: 460px;
  height: 100vh;
  background: var(--ink-2);
  border-left: 1px solid var(--volt);
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: drawerIn 320ms var(--easing) both;
}
@keyframes drawerIn {
  from { transform: translateX(100%); }
  to   { transform: none; }
}
.debug__head {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.debug__head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.08em;
}
.debug__body {
  flex: 1;
  margin: 0;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--paper-dim);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------------------------------------------------------
   Safety blocked overlay
--------------------------------------------------------------- */
.blocked {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(6px);
  z-index: 80;
  display: grid;
  place-items: center;
  animation: fadeIn 220ms var(--easing) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.blocked__panel {
  width: min(520px, 92vw);
  background: var(--ink);
  border: 2px solid var(--volt);
  padding: 36px 36px 32px;
  position: relative;
}
.blocked__panel::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--volt) 0 12px,
    var(--ink) 12px 24px
  );
}
.blocked__tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--blood);
  border: 1px solid var(--blood);
  padding: 4px 10px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.blocked__title {
  font-family: var(--display);
  font-size: 88px;
  line-height: 0.85;
  margin: 0 0 14px;
  color: var(--paper);
  letter-spacing: 0;
}
.blocked__body {
  font-family: var(--serif-cn);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.65;
  color: var(--paper-dim);
  margin: 0 0 22px;
}

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 1100px) {
  :root { --rail-w: 320px; }
  .canvas { padding: 32px 32px 24px; }
}
@media (max-width: 880px) {
  .stage { grid-template-columns: 1fr; }
  .rail {
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .canvas { border-right: none; padding: 28px 22px 18px; }
  .turn { grid-template-columns: 60px 1fr; gap: 14px; }
  .composer { padding: 0 18px; }
  .debug { width: 100%; }
  .chips { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(56px, 16vw, 88px); }
}

/* ---------------------------------------------------------------
   Hidden attribute fix — must override flex/grid display
--------------------------------------------------------------- */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------
   Selection + scrollbar global
--------------------------------------------------------------- */
::selection {
  background: var(--volt);
  color: var(--ink);
}
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-thumb { background: var(--line); }
