/* PANDA SCALPER — Neo Tokyo × Studio Ghibli. Night rain, neon, nature reclaiming the city. */
:root {
  --bg: #0a0618;
  --bg-2: #120c24;
  --washi: #16122e;
  --washi-2: #1c1736;
  --edge: rgba(61, 224, 255, 0.32);
  --edge-mag: rgba(255, 43, 214, 0.38);
  --ink: #f4efe4;
  --mute: #9aa3b8;
  --steel: #b7c0d4;
  --steel-hi: #e8e4d8;
  --magenta: #ff2bd6;
  --magenta-dim: #3a0a32;
  --cyan: #3de0ff;
  --cyan-dim: #062430;
  --sap: #7dffb1;
  --sap-dim: #07301c;
  --lantern: #ffc14a;
  --cream: #f4efe4;
  --green: #7dffb1;
  --green-dim: #07301c;
  --red: #ff2bd6;
  --red-hot: #ff5ae0;
  --red-dim: #3a0a32;
  --line: rgba(244, 239, 228, 0.08);
  --shadow: 0 18px 44px rgba(4, 0, 18, 0.55);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --wash-top: rgba(255, 43, 214, 0.22);
  --wash-bot: rgba(61, 224, 255, 0.10);
  --horizon: rgba(255, 43, 214, 0.28);
  --grid-neon: rgba(61, 224, 255, 0.12);
}

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

html, body { min-height: 100%; background: var(--bg); color: var(--ink); }
html { color-scheme: dark; }
html, body { background-color: var(--bg); }

body {
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
  overflow-x: hidden;
  transition: background-color 8s ease;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 46% at 18% -6%, var(--wash-top), transparent 58%),
    radial-gradient(ellipse 70% 40% at 88% 108%, var(--wash-bot), transparent 55%),
    radial-gradient(ellipse 50% 28% at 72% 8%, rgba(255, 193, 74, 0.08), transparent 50%);
  background-repeat: no-repeat;
}

img { display: block; max-width: 100%; }
code { font-family: var(--font-mono); color: var(--cyan); }

/* —— ATMOSPHERE —— */
.sky {
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 34% at 16% 16%, rgba(244, 239, 228, 0.22), transparent 58%),
    radial-gradient(ellipse 48% 30% at 78% 10%, rgba(255, 193, 74, 0.14), transparent 52%),
    radial-gradient(ellipse 42% 26% at 62% 22%, rgba(125, 255, 177, 0.10), transparent 50%),
    radial-gradient(ellipse 86% 50% at 50% 112%, rgba(255, 43, 214, 0.22), transparent 58%),
    radial-gradient(ellipse 40% 32% at 90% 48%, rgba(61, 224, 255, 0.10), transparent 52%);
  animation: skyDrift 64s ease-in-out infinite;
  will-change: transform;
}
@keyframes skyDrift {
  0%, 100% { transform: scale(1.05) translate3d(-1.6%, 0.4%, 0); }
  50% { transform: scale(1.1) translate3d(1.8%, -0.8%, 0); }
}

.orb {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.7;
  transition: top 8s ease, left 8s ease, right 8s ease, bottom 8s ease,
    background 8s ease, opacity 8s ease, width 8s ease, height 8s ease,
    box-shadow 8s ease, transform 8s ease;
}

.neo-horizon {
  position: fixed;
  left: 0; right: 0; bottom: 38vh;
  height: 28vh;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 100%, var(--horizon), transparent 70%);
  filter: blur(8px);
  animation: horizonPulse 8s ease-in-out infinite;
}
@keyframes horizonPulse {
  0%, 100% { opacity: 0.7; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.06); }
}

.neo-grid {
  position: fixed;
  left: -10%;
  right: -10%;
  bottom: -18%;
  height: 62vh;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to top, rgba(8, 4, 20, 0.92), rgba(8, 4, 20, 0.18) 42%, transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 56px, var(--grid-neon) 56px 57px),
    repeating-linear-gradient(0deg, transparent 0 56px, var(--grid-neon) 56px 57px);
  transform: perspective(520px) rotateX(66deg);
  transform-origin: bottom center;
  animation: gridScroll 22s linear infinite;
  opacity: 0.72;
}
@keyframes gridScroll {
  0% { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 0 0, 0 56px, 0 56px; }
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: rgba(180, 230, 255, 0.22);
  opacity: 0;
}

#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: 0.55;
}

.grit {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}

.red-wash {
  position: fixed;
  inset: auto 0 0 0;
  height: 38vh;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to top, rgba(255, 43, 214, 0.16), rgba(255, 193, 74, 0.07), transparent 72%);
}

.blossoms {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}
.blossoms span {
  position: absolute;
  top: -16px;
  width: 11px;
  height: 9px;
  background: radial-gradient(circle at 30% 28%, #ffe8f0, #ff9ec4 55%, #ff2bd6 100%);
  border-radius: 80% 0 70% 28%;
  opacity: 0.72;
  animation: petalFall linear infinite;
  box-shadow: 0 0 8px rgba(255, 43, 214, 0.35);
}
.blossoms span:nth-child(1)  { left: 6%;  animation-duration: 16s; animation-delay: -2s;  transform: scale(1.1); }
.blossoms span:nth-child(2)  { left: 18%; animation-duration: 21s; animation-delay: -8s;  width: 8px; height: 7px; }
.blossoms span:nth-child(3)  { left: 29%; animation-duration: 18s; animation-delay: -4s; }
.blossoms span:nth-child(4)  { left: 41%; animation-duration: 24s; animation-delay: -11s; width: 13px; height: 10px; }
.blossoms span:nth-child(5)  { left: 52%; animation-duration: 17s; animation-delay: -1s;  }
.blossoms span:nth-child(6)  { left: 63%; animation-duration: 22s; animation-delay: -14s; width: 9px; height: 8px; }
.blossoms span:nth-child(7)  { left: 71%; animation-duration: 19s; animation-delay: -6s; }
.blossoms span:nth-child(8)  { left: 79%; animation-duration: 26s; animation-delay: -9s;  width: 12px; height: 9px; }
.blossoms span:nth-child(9)  { left: 88%; animation-duration: 15s; animation-delay: -3s; }
.blossoms span:nth-child(10) { left: 94%; animation-duration: 20s; animation-delay: -12s; width: 8px; height: 7px; }
@keyframes petalFall {
  0%   { transform: translate3d(0, -12px, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.75; }
  100% { transform: translate3d(48px, 110vh, 0) rotate(380deg); opacity: 0.15; }
}

.kanji-wash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-ui);
  font-weight: 700;
  color: rgba(244, 239, 228, 0.045);
  letter-spacing: 0.12em;
  overflow: hidden;
}
.kanji-wash .kj { position: absolute; line-height: 1; white-space: nowrap; }
.kanji-wash .k-tokyo { top: 8%; left: 4%; font-size: clamp(72px, 16vw, 180px); color: rgba(255, 43, 214, 0.05); }
.kanji-wash .k-rain  { top: 38%; right: 6%; font-size: clamp(90px, 18vw, 200px); color: rgba(61, 224, 255, 0.045); }
.kanji-wash .k-forest{ bottom: 18%; left: 12%; font-size: clamp(64px, 12vw, 140px); color: rgba(125, 255, 177, 0.05); }
.kanji-wash .k-night { top: 18%; right: 22%; font-size: clamp(48px, 8vw, 96px); color: rgba(255, 193, 74, 0.05); }

.city {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 40vh;
  min-height: 180px;
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
}

.kaiju {
  position: fixed;
  right: -3%;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  height: 88vh;
  width: auto;
  max-width: 48vw;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  opacity: 0.48;
  mix-blend-mode: normal;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.15) 18%, #000 40%),
    linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.2) 14%, #000 35%),
    linear-gradient(to top, transparent 0%, #000 22%);
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.15) 18%, #000 40%),
    linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.2) 14%, #000 35%),
    linear-gradient(to top, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in, source-in;
  mask-composite: intersect, intersect;
}
.kaiju img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
  filter: brightness(0.62) saturate(0.78) blur(0.3px);
}
.kaiju::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, var(--bg) 0%, var(--bg) 18%, transparent 40%),
    linear-gradient(to bottom, var(--bg) 0%, var(--bg) 10%, transparent 35%),
    linear-gradient(to top, var(--bg) 0%, transparent 22%);
}

.city-wins { opacity: 0.82; }
.city-wins .win { fill: #3de0ff; }
.city-wins circle.win { fill: #ffc14a; }
body[data-wx="clear"] .city-wins .win { fill: #7dffb1; }
body[data-wx="clear"] .city-wins circle.win { fill: #ffc14a; }
body[data-wx="rain"] .city-wins .win { fill: #3de0ff; }
body[data-wx="storm"] .city-wins .win { fill: #ff2bd6; }
body[data-wx="snow"] .city-wins .win { fill: #f4efe4; }
body[data-wx="fog"] .city-wins { opacity: 0.18; }
body[data-tod="day"] .city-wins { opacity: 0.28; }

.city-wins .win:nth-child(3n) { animation: firefly 2.8s ease-in-out infinite; }
.city-wins .win:nth-child(3n+1) { animation: firefly 3.6s ease-in-out infinite 0.7s; }
.city-wins .win:nth-child(3n+2) { animation: firefly 4.2s ease-in-out infinite 1.4s; }
@keyframes firefly {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.sky, .neo-horizon, .neo-grid, .city, .kaiju, .kaiju img, .red-wash, .grit, .city-wins {
  transition: opacity 8s ease, filter 8s ease, background 8s ease, background-color 8s ease;
}

/* —— FRAME / MAST —— */
.frame {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 80px;
}

.mast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 8px 0 6px;
}

.brand {
  display: flex;
  gap: 22px;
  align-items: center;
  min-width: 0;
}

.logo-plate {
  position: relative;
  flex: 0 0 auto;
  width: min(168px, 38vw);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.08), transparent 28%),
    linear-gradient(180deg, #1a1436, #0c081c);
  border: 1px solid var(--edge);
  box-shadow:
    0 0 0 1px rgba(255, 43, 214, 0.22),
    0 0 28px rgba(255, 43, 214, 0.16),
    0 0 40px rgba(61, 224, 255, 0.10),
    var(--shadow);
}

.logo-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(1.12);
}

.brand-copy { min-width: 0; position: relative; }

.kicker {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 6px;
}
.kicker-kanji {
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: none;
  color: var(--lantern);
  opacity: 0.7;
  margin-left: 8px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(52px, 9vw, 108px);
  line-height: 0.86;
  letter-spacing: 0.03em;
  font-weight: 600;
  font-style: italic;
  background: linear-gradient(180deg, #fff8ee 0%, #f4efe4 42%, #ffc14a 88%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 43, 214, 0.35)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
  margin-bottom: 12px;
}

.cp-plate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 20px 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, #221a40, #100c22);
  border: 1px solid var(--edge-mag);
  box-shadow:
    0 0 0 1px rgba(61, 224, 255, 0.18),
    0 0 22px rgba(255, 43, 214, 0.28);
}

.cp-glow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  letter-spacing: 0.28em;
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan), 0 0 22px var(--magenta), 0 0 40px rgba(255, 43, 214, 0.55);
}

.desk-meta {
  text-align: right;
  padding: 12px 16px 14px;
  min-width: 220px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.06), transparent 32%),
    linear-gradient(180deg, #1a1434, #100c22);
  border: 1px solid var(--edge);
  box-shadow:
    0 0 0 1px rgba(255, 43, 214, 0.16),
    var(--shadow);
}

.lamp-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2a2438;
  box-shadow: inset 0 2px 4px #000;
  border: 1px solid #140e22;
}
.lamp[data-state="live"] {
  background: radial-gradient(circle at 35% 30%, #e8ffe8, var(--sap) 45%, #0a7a48);
  box-shadow: 0 0 10px var(--sap), 0 0 22px rgba(125, 255, 177, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.lamp[data-state="down"] {
  background: radial-gradient(circle at 35% 30%, #ffd0f4, var(--magenta) 45%, #7a0058);
  box-shadow: 0 0 10px var(--magenta), 0 0 22px rgba(255, 43, 214, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: alarm 0.9s ease-in-out infinite;
}
.lamp[data-state="boot"] {
  background: radial-gradient(circle at 35% 30%, #ffe8b0, var(--lantern) 50%, #6a4a08);
  box-shadow: 0 0 8px var(--lantern);
}

.lamp-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--steel);
}

.clock {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.quotes-asof {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.session {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 4px 0 2px;
}

.wxline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-hi);
  margin: 2px 0 4px;
}

/* —— SLASH —— */
.slash-wrap { margin: 18px 0 8px; }
.slash { display: block; width: 100%; height: 56px; filter: drop-shadow(0 0 8px rgba(61, 224, 255, 0.55)) drop-shadow(0 0 14px rgba(255, 43, 214, 0.4)); }

/* —— BLOCKS —— */
.block { margin-top: 28px; }

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(61, 224, 255, 0.18);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.10em;
  color: var(--cream);
  font-weight: 600;
  font-style: italic;
}

.block-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}


/* —— WIN % —— */
.win-n {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
  margin: 0 0 2px;
}

.win-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.win-meter {
  position: relative;
  padding: 12px 12px 14px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.07) 0%, transparent 30%),
    linear-gradient(180deg, var(--washi-2), var(--washi));
  border: 1px solid rgba(61, 224, 255, 0.2);
  box-shadow: 0 8px 18px rgba(4, 0, 18, 0.35);
  overflow: hidden;
}

.win-lab {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}

.win-pct {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 32px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cream);
  line-height: 1.15;
  margin: 4px 0 10px;
  text-shadow: 0 0 12px rgba(125, 255, 177, 0.28);
}

.win-meter.empty .win-pct {
  color: var(--mute);
  text-shadow: none;
}

.win-track {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--magenta-dim);
  box-shadow: inset 0 0 10px rgba(255, 43, 214, 0.55);
  overflow: hidden;
}

.win-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1a6a44, var(--sap));
  box-shadow: 0 0 10px rgba(125, 255, 177, 0.55);
}

/* —— MARKET GAUGES (kept for any leftover markup) —— */
.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.gauge {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 18px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.06) 0%, transparent 18%),
    linear-gradient(180deg, #1a1434 0%, #100c22 100%);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}

.gauge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gauge-ticker {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.12em;
  color: var(--cream);
}

.gauge-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gauge-px {
  font-family: var(--font-mono);
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(61, 224, 255, 0.18);
}

.gauge-chg {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.06em;
}

.up { color: var(--sap); text-shadow: 0 0 12px rgba(125, 255, 177, 0.45); }
.down { color: var(--magenta); text-shadow: 0 0 12px rgba(255, 43, 214, 0.5); }
.flat { color: var(--steel); }

/* —— BOOK —— */
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rail-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(244, 239, 228, 0.04), var(--washi));
}
.rail-title.long {
  color: var(--sap);
  border: 1px solid rgba(61, 224, 255, 0.4);
  text-shadow: 0 0 10px rgba(125, 255, 177, 0.45);
  box-shadow: inset 0 0 20px rgba(61, 224, 255, 0.08), 0 0 18px rgba(125, 255, 177, 0.08);
}
.rail-title.short {
  color: var(--magenta);
  border: 1px solid rgba(255, 43, 214, 0.45);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.55);
  box-shadow: inset 0 0 20px rgba(255, 43, 214, 0.10), 0 0 18px rgba(255, 43, 214, 0.10);
}

.stack { display: grid; gap: 10px; }

.pos {
  position: relative;
  padding: 14px 14px 12px 16px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.05), transparent 24%),
    linear-gradient(180deg, #1a1438, #100c24);
  border: 1px solid rgba(61, 224, 255, 0.16);
  box-shadow: 0 10px 24px rgba(4, 0, 18, 0.4);
  overflow: hidden;
}

.pos::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  background: #3a3458;
}

#longs .pos::after {
  background: var(--sap);
  box-shadow: 0 0 12px var(--sap);
}
#shorts .pos::after {
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
}

.pos.working {
  box-shadow:
    inset 0 0 0 1px rgba(125, 255, 177, 0.28),
    0 0 22px rgba(125, 255, 177, 0.12),
    0 10px 24px rgba(4, 0, 18, 0.4);
}
.pos.not-working {
  box-shadow:
    inset 0 0 0 1px rgba(255, 43, 214, 0.38),
    0 0 26px rgba(255, 43, 214, 0.16),
    0 10px 24px rgba(4, 0, 18, 0.4);
}

#longs .pos.take-now {
  border-color: rgba(61, 224, 255, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(61, 224, 255, 0.6),
    0 0 28px rgba(61, 224, 255, 0.5),
    0 0 52px rgba(125, 255, 177, 0.32),
    0 10px 24px rgba(4, 0, 18, 0.4);
}
#shorts .pos.take-now {
  border-color: rgba(255, 43, 214, 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(255, 43, 214, 0.6),
    0 0 32px rgba(255, 43, 214, 0.5),
    0 0 48px rgba(255, 43, 214, 0.22),
    0 10px 24px rgba(4, 0, 18, 0.4);
}
#longs .pos.take-now.be {
  box-shadow:
    inset 0 0 0 1px rgba(61, 224, 255, 0.32),
    0 0 16px rgba(61, 224, 255, 0.22),
    0 10px 24px rgba(4, 0, 18, 0.4);
}
#shorts .pos.take-now.be {
  box-shadow:
    inset 0 0 0 1px rgba(255, 43, 214, 0.32),
    0 0 16px rgba(255, 43, 214, 0.22),
    0 10px 24px rgba(4, 0, 18, 0.4);
}
.pos.closed {
  opacity: 0.78;
  filter: saturate(0.72);
}

.pos-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ticker {
  font-family: var(--font-display);
  font-size: 34px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 0.9;
}
.ticker.long-side {
  color: var(--sap);
  text-shadow: 0 0 10px rgba(125, 255, 177, 0.4), 0 0 18px rgba(61, 224, 255, 0.2);
}
.ticker.short-side {
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.5);
}

a.ticker {
  text-decoration: none;
  cursor: pointer;
}
a.ticker:hover {
  text-decoration: underline;
  text-underline-offset: 0.14em;
  filter: brightness(1.18);
}

.ticker.pulse-print { animation: print 1.8s ease-in-out infinite; }
.ticker.pulse-alarm { animation: alarm 0.85s ease-in-out infinite; }

.pos-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.08em;
  margin-top: 4px;
  text-transform: uppercase;
}

.badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(244, 239, 228, 0.14);
  background: #0c081c;
}
.badge.long {
  color: var(--sap);
  border-color: rgba(125, 255, 177, 0.45);
  box-shadow: 0 0 10px rgba(125, 255, 177, 0.15);
}
.badge.short {
  color: var(--magenta);
  border-color: rgba(255, 43, 214, 0.55);
  box-shadow: 0 0 10px rgba(255, 43, 214, 0.2);
}
.badge.work-yes {
  color: var(--sap);
  border-color: rgba(125, 255, 177, 0.7);
  background: var(--sap-dim);
  box-shadow: 0 0 14px rgba(125, 255, 177, 0.25);
  text-shadow: 0 0 8px var(--sap);
}
.badge.work-no {
  color: #fff;
  border-color: var(--magenta);
  background: var(--magenta-dim);
  box-shadow: 0 0 16px rgba(255, 43, 214, 0.35);
  text-shadow: 0 0 8px var(--magenta);
  animation: alarm 0.95s ease-in-out infinite;
}
.badge.work-na { color: var(--steel); }

.pos-quote {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(244, 239, 228, 0.12);
}

.px {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink);
}

.chg {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.04em;
}
.chg.tape {
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.mcap {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--ink);
  white-space: nowrap;
}

.age {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

.badge.age {
  color: var(--ink);
  border-color: rgba(61, 224, 255, 0.45);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.badge.take {
  color: #07140c;
  background: var(--sap);
  border-color: var(--lantern);
  box-shadow: 0 0 16px rgba(125, 255, 177, 0.55), 0 0 22px rgba(255, 193, 74, 0.35);
  text-shadow: none;
  letter-spacing: 0.12em;
  font-weight: 700;
}
#shorts .badge.take {
  color: #fff;
  background: var(--magenta);
  border-color: var(--lantern);
  box-shadow: 0 0 16px rgba(255, 43, 214, 0.55), 0 0 22px rgba(255, 193, 74, 0.3);
}
.badge.notrade {
  color: #fff;
  background: var(--magenta);
  border-color: var(--lantern);
  box-shadow: 0 0 16px rgba(255, 43, 214, 0.55), 0 0 22px rgba(255, 193, 74, 0.3);
  text-shadow: none;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.badge.past {
  color: var(--mute);
  border-color: rgba(244, 239, 228, 0.18);
  letter-spacing: 0.12em;
  opacity: 0.75;
}
.badge.be {
  color: var(--lantern);
  border-color: rgba(255, 193, 74, 0.7);
  box-shadow: 0 0 12px rgba(255, 193, 74, 0.25);
  letter-spacing: 0.12em;
}
.badge.closed {
  color: #fff;
  border-color: var(--magenta);
  background: var(--magenta-dim);
  letter-spacing: 0.12em;
}

.badge.conf {
  color: var(--lantern);
  border-color: rgba(255, 193, 74, 0.65);
  box-shadow: 0 0 10px rgba(255, 193, 74, 0.18);
  letter-spacing: 0.12em;
}

/* —— STATES —— */
.empty, .skeleton {
  min-height: 88px;
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(244, 239, 228, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.04), transparent 40%),
    #120c24;
}

.empty-copy, .empty {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mute);
  text-transform: uppercase;
  text-align: center;
  padding: 22px 12px;
}

.banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  border: 1px solid rgba(255, 43, 214, 0.4);
  background: rgba(58, 10, 50, 0.45);
  box-shadow: inset 0 0 16px rgba(255, 43, 214, 0.15);
}

.noscript {
  position: relative;
  z-index: 6;
  margin: 16px auto;
  width: min(1180px, calc(100% - 28px));
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-mono);
  color: var(--magenta);
  border: 1px solid var(--magenta);
}

.foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid rgba(61, 224, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--steel);
}
.foot-mute { color: var(--mute); margin-top: 6px; font-size: 11px; }

.ident {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.str {
  font-family: var(--font-mono);
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--lantern);
  text-shadow: 0 0 12px rgba(255, 193, 74, 0.55);
  line-height: 1;
}

.ladder {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  font-family: var(--font-mono);
}
.rung {
  display: grid;
  grid-template-columns: 7.5em 1fr auto;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--ink);
}
.rung .lab {
  color: var(--steel);
  letter-spacing: 0.14em;
  font-size: 12px;
  text-transform: uppercase;
}
.rung .val {
  font-size: 14px;
  color: var(--ink);
}
.rung .tail {
  color: var(--lantern);
  letter-spacing: 0.1em;
  font-size: 12px;
  text-align: right;
  text-transform: uppercase;
}
.rung .chk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  margin-left: 0.45em;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
  color: #062418;
  background: var(--sap);
  box-shadow: 0 0 8px var(--sap), 0 0 16px rgba(125, 255, 177, 0.5);
  vertical-align: middle;
}
.rung.hit .lab { color: var(--sap); }
.rung.hit .val {
  text-decoration: line-through;
  opacity: 0.55;
}
.rung.hit .tail { color: var(--mute); }
.rung.take-zone {
  background: rgba(61, 224, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(61, 224, 255, 0.32);
}
#shorts .rung.take-zone {
  background: rgba(255, 43, 214, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 43, 214, 0.32);
}
.ladder-cap {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--steel);
  text-transform: uppercase;
}

.rail-title.high {
  color: var(--lantern);
  text-shadow: 0 0 10px rgba(255, 193, 74, 0.45);
  box-shadow: inset 0 0 20px rgba(255, 193, 74, 0.08);
  border: 1px solid rgba(255, 193, 74, 0.4);
}
.rail-title.extreme {
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.55);
  box-shadow: inset 0 0 20px rgba(255, 43, 214, 0.08);
}

.ticker.high-side {
  color: var(--lantern);
  text-shadow: 0 0 10px rgba(255, 193, 74, 0.4);
}
.ticker.extreme-side {
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.5);
}

.badge.high {
  color: var(--lantern);
  border-color: rgba(255, 193, 74, 0.55);
  box-shadow: 0 0 10px rgba(255, 193, 74, 0.18);
}
.badge.extreme {
  color: var(--magenta);
  border-color: rgba(255, 43, 214, 0.55);
  box-shadow: 0 0 10px rgba(255, 43, 214, 0.2);
}

.pos.no-pair { opacity: 0.88; }
.pos.no-pair::after { background: #555; }

.pos-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.dex-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-hi);
  text-decoration: none;
  border: 1px solid rgba(61, 224, 255, 0.28);
  border-radius: 6px;
  padding: 3px 8px;
  background: #0c081c;
  white-space: nowrap;
}
.dex-link:hover,
.dex-link:focus {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(61, 224, 255, 0.28);
  outline: none;
}

.tape {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mute);
  text-transform: uppercase;
  margin-top: 8px;
  line-height: 1.35;
}

.nopair-mark {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.18em;
  color: var(--steel);
  text-transform: uppercase;
}

@keyframes print {
  0%, 100% { opacity: 1; filter: brightness(1.15); }
  50% { opacity: 0.78; filter: brightness(0.92); }
}
@keyframes alarm {
  0%, 100% { opacity: 1; filter: brightness(1.2); }
  50% { opacity: 0.55; filter: brightness(0.75); }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0618; }
::-webkit-scrollbar-thumb { background: #2a2450; border: 1px solid #ff2bd644; border-radius: 8px; }

body.tod-shift .sky,
body.tod-shift .orb,
body.tod-shift .neo-horizon {
  animation: todKick 1.6s ease;
}
@keyframes todKick {
  0% { filter: brightness(0.55) saturate(0.7); }
  35% { filter: brightness(1.35) saturate(1.25); }
  100% { filter: brightness(1) saturate(1); }
}

/* —— TIME OF DAY (Chicago) — one system —— */
body[data-tod="night"] {
  --bg: #070414;
  --wash-top: rgba(255, 43, 214, 0.42);
  --wash-bot: rgba(40, 0, 70, 0.55);
  --horizon: rgba(255, 43, 214, 0.46);
  --grid-neon: rgba(61, 224, 255, 0.14);
}
body[data-tod="night"] .orb {
  top: 8%;
  right: 12%;
  left: auto;
  width: 96px;
  height: 96px;
  background: radial-gradient(circle, rgba(255, 210, 240, 0.85), rgba(255, 43, 214, 0.2) 55%, transparent 70%);
  opacity: 0.5;
  box-shadow: 0 0 40px rgba(255, 43, 214, 0.35);
}
body[data-tod="night"] .sky {
  opacity: 1;
  background:
    radial-gradient(ellipse 52% 30% at 14% 12%, rgba(80, 40, 120, 0.45), transparent 58%),
    radial-gradient(ellipse 40% 26% at 82% 8%, rgba(61, 224, 255, 0.10), transparent 52%),
    radial-gradient(ellipse 100% 58% at 50% 122%, rgba(255, 43, 214, 0.42), transparent 54%),
    linear-gradient(#08051a, #160820);
}
body[data-tod="night"] .red-wash {
  background: linear-gradient(to top, rgba(255, 43, 214, 0.22), rgba(61, 224, 255, 0.06), transparent 72%);
}
body[data-tod="night"] .city { opacity: 1; filter: brightness(0.72) contrast(1.12) saturate(1.15); }
body[data-tod="night"] .kaiju { opacity: 0.38; }
body[data-tod="night"] .kaiju img {
  filter: brightness(0.48) saturate(0.7) blur(0.3px);
}
body[data-tod="night"] .kaiju::after {
  background:
    linear-gradient(to right, var(--bg) 0%, var(--bg) 22%, transparent 44%),
    linear-gradient(to bottom, var(--bg) 0%, var(--bg) 14%, transparent 38%),
    linear-gradient(to top, var(--bg) 0%, transparent 26%),
    linear-gradient(180deg, rgba(255, 43, 214, 0.08), transparent 52%);
}
body[data-tod="night"] .city-wins { opacity: 0.95; }
body[data-tod="night"] .neo-grid { opacity: 0.7; }
body[data-tod="night"] .grit { opacity: 0.2; }
body[data-tod="night"] .session { color: #ff7ae8; }
body[data-tod="night"] h1 { filter: drop-shadow(0 0 22px rgba(255, 43, 214, 0.5)) drop-shadow(0 0 10px rgba(61, 224, 255, 0.25)); }

body[data-tod="dawn"] {
  --bg: #2a1828;
  --wash-top: rgba(255, 170, 140, 0.48);
  --wash-bot: rgba(255, 110, 90, 0.28);
  --horizon: rgba(255, 180, 120, 0.55);
  --grid-neon: rgba(255, 193, 74, 0.16);
}
body[data-tod="dawn"] .orb {
  top: auto;
  bottom: 32%;
  left: 10%;
  right: auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 230, 180, 0.95), rgba(255, 140, 120, 0.4) 45%, transparent 70%);
  opacity: 0.95;
  box-shadow: 0 0 90px rgba(255, 160, 100, 0.5);
}
body[data-tod="dawn"] .sky {
  opacity: 1;
  background:
    radial-gradient(ellipse 70% 40% at 22% 18%, rgba(244, 239, 228, 0.55), transparent 58%),
    radial-gradient(ellipse 50% 32% at 70% 8%, rgba(255, 180, 170, 0.4), transparent 52%),
    radial-gradient(ellipse 110% 62% at 18% 92%, rgba(255, 150, 110, 0.62), transparent 55%),
    radial-gradient(ellipse 70% 46% at 86% 0%, rgba(120, 160, 220, 0.32), transparent 58%),
    linear-gradient(#3a2848, #d47868);
}
body[data-tod="dawn"] .red-wash {
  background: linear-gradient(to top, rgba(255, 160, 110, 0.22), rgba(255, 193, 74, 0.12), transparent 70%);
}
body[data-tod="dawn"] .city { opacity: 0.72; filter: brightness(1.18) saturate(1.05); }
body[data-tod="dawn"] .city-wins { opacity: 0.55; }
body[data-tod="dawn"] .neo-grid { opacity: 0.42; }
body[data-tod="dawn"] .grit { opacity: 0.08; }
body[data-tod="dawn"] .session { color: #ffb080; }
body[data-tod="dawn"] h1 { filter: drop-shadow(0 0 16px rgba(255, 193, 74, 0.45)); }

body[data-tod="day"] {
  --bg: #1c3a44;
  --wash-top: rgba(140, 210, 200, 0.32);
  --wash-bot: rgba(40, 90, 90, 0.22);
  --horizon: rgba(125, 255, 177, 0.22);
  --grid-neon: rgba(61, 224, 255, 0.08);
}
body[data-tod="day"] .orb {
  top: 6%;
  left: 42%;
  right: auto;
  bottom: auto;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(255, 250, 230, 1), rgba(170, 230, 220, 0.4) 40%, transparent 68%);
  opacity: 0.85;
  box-shadow: 0 0 120px rgba(180, 230, 220, 0.5);
}
body[data-tod="day"] .sky {
  opacity: 1;
  background:
    radial-gradient(ellipse 58% 34% at 18% 16%, rgba(244, 239, 228, 0.5), transparent 56%),
    radial-gradient(ellipse 48% 28% at 78% 12%, rgba(170, 230, 210, 0.35), transparent 52%),
    radial-gradient(ellipse 90% 50% at 50% -8%, rgba(160, 210, 230, 0.45), transparent 58%),
    radial-gradient(ellipse 100% 48% at 50% 118%, rgba(60, 130, 120, 0.32), transparent 55%),
    linear-gradient(#6aa0a8, #2a4c50);
}
body[data-tod="day"] .red-wash {
  background: linear-gradient(to top, rgba(40, 90, 90, 0.16), rgba(125, 255, 177, 0.06), transparent 70%);
}
body[data-tod="day"] .city { opacity: 0.52; filter: brightness(1.45) contrast(0.88) saturate(0.85); }
body[data-tod="day"] .kaiju { opacity: 0.5; }
body[data-tod="day"] .kaiju img {
  filter: brightness(0.72) saturate(0.82) contrast(0.94) blur(0.3px);
}
body[data-tod="day"] .city-wins { opacity: 0.22; }
body[data-tod="day"] .neo-grid { opacity: 0.22; }
body[data-tod="day"] .grit { opacity: 0.05; }
body[data-tod="day"] #rain { opacity: 0.12; }
body[data-tod="day"] .session { color: #b8e8e0; }
body[data-tod="day"] h1 { filter: drop-shadow(0 0 12px rgba(244, 239, 228, 0.35)); }
body[data-tod="day"] .logo-plate,
body[data-tod="day"] .desk-meta,
body[data-tod="day"] .pos {
  box-shadow: 0 12px 28px rgba(10, 30, 36, 0.28);
}
body[data-tod="day"] #longs .pos.take-now {
  box-shadow:
    inset 0 0 0 1px rgba(61, 224, 255, 0.6),
    0 0 28px rgba(61, 224, 255, 0.45),
    0 0 52px rgba(125, 255, 177, 0.28),
    0 12px 28px rgba(10, 30, 36, 0.28);
}
body[data-tod="day"] #shorts .pos.take-now {
  box-shadow:
    inset 0 0 0 1px rgba(255, 43, 214, 0.6),
    0 0 32px rgba(255, 43, 214, 0.42),
    0 12px 28px rgba(10, 30, 36, 0.28);
}

body[data-tod="dusk"] {
  --bg: #1a0818;
  --wash-top: rgba(255, 43, 214, 0.42);
  --wash-bot: rgba(120, 20, 50, 0.48);
  --horizon: rgba(255, 43, 214, 0.5);
  --grid-neon: rgba(255, 193, 74, 0.16);
}
body[data-tod="dusk"] .orb {
  top: auto;
  bottom: 28%;
  left: auto;
  right: 8%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 210, 120, 0.95), rgba(255, 43, 214, 0.4) 48%, transparent 70%);
  opacity: 0.95;
  box-shadow: 0 0 100px rgba(255, 193, 74, 0.45), 0 0 60px rgba(255, 43, 214, 0.35);
}
body[data-tod="dusk"] .sky {
  opacity: 1;
  background:
    radial-gradient(ellipse 48% 30% at 16% 10%, rgba(80, 20, 50, 0.45), transparent 55%),
    radial-gradient(ellipse 40% 24% at 40% 18%, rgba(255, 193, 74, 0.18), transparent 50%),
    radial-gradient(ellipse 110% 68% at 82% 95%, rgba(255, 43, 214, 0.58), transparent 54%),
    radial-gradient(ellipse 60% 42% at 10% 0%, rgba(90, 20, 60, 0.5), transparent 58%),
    linear-gradient(#2a1028, #8a1858);
}
body[data-tod="dusk"] .red-wash {
  background: linear-gradient(to top, rgba(255, 43, 214, 0.22), rgba(255, 193, 74, 0.14), transparent 70%);
}
body[data-tod="dusk"] .city { opacity: 0.95; filter: brightness(0.88) saturate(1.25); }
body[data-tod="dusk"] .city-wins { opacity: 0.9; }
body[data-tod="dusk"] .neo-grid { opacity: 0.62; }
body[data-tod="dusk"] .grit { opacity: 0.12; }
body[data-tod="dusk"] .session { color: #ffc14a; }
body[data-tod="dusk"] h1 { filter: drop-shadow(0 0 18px rgba(255, 193, 74, 0.4)) drop-shadow(0 0 22px rgba(255, 43, 214, 0.35)); }

/* —— WEATHER —— */
body[data-wx="clear"] #rain { opacity: 0.12; }
body[data-wx="clear"] .neo-grid { opacity: 0.9; }
body[data-wx="clear"] .grit { opacity: 0.06; }

body[data-wx="cloud"] .sky { filter: saturate(0.78) brightness(0.92); }
body[data-wx="cloud"] .neo-grid { opacity: 0.5; }

body[data-wx="rain"] #rain { opacity: 0.75; }
body[data-wx="rain"] .neo-grid { opacity: 0.48; }

body[data-wx="storm"] #rain { opacity: 0.9; }
body[data-wx="storm"] .sky { filter: contrast(1.15) saturate(1.2); }
body[data-wx="storm"] { --grid-neon: rgba(255, 43, 214, 0.18); --horizon: rgba(255, 43, 214, 0.32); }

body[data-wx="fog"] .sky {
  background: radial-gradient(ellipse 100% 80% at 50% 60%, rgba(200, 210, 220, 0.3), transparent 70%) !important;
}
body[data-wx="fog"] .neo-grid { opacity: 0.28; filter: blur(1.5px); }
body[data-wx="fog"] .city { opacity: 0.25; filter: blur(2px); }
body[data-wx="fog"] #rain { opacity: 0.2; }

body[data-wx="snow"] #rain { opacity: 0.7; }
body[data-wx="snow"] { --grid-neon: rgba(180, 220, 255, 0.14); --horizon: rgba(160, 200, 255, 0.2); }

@media (max-width: 820px) {
  .mast, .market-grid, .book-grid { grid-template-columns: 1fr; }
  .win-grid { gap: 6px; }
  .win-meter { padding: 10px 8px 12px; }
  .win-lab { font-size: 10px; letter-spacing: 0.08em; }
  .win-pct { font-size: clamp(16px, 4.8vw, 24px); margin: 2px 0 8px; }
  .win-track { height: 5px; }
  .desk-meta { text-align: left; }
  .lamp-row { justify-content: flex-start; }
  .block-head { flex-direction: column; align-items: flex-start; }
  .block-sub { text-align: left; }
  .logo-plate { width: min(128px, 42vw); }
  h1 { font-size: clamp(44px, 14vw, 72px); }
  .frame { width: min(1180px, calc(100% - 18px)); padding-top: 14px; }
  .gauge-px { font-size: 36px; }
  .ticker { font-size: 30px; }
  .str { font-size: 22px; }
  .kanji-wash { opacity: 0.7; }
  .kaiju {
    height: 55vh;
    max-width: 58vw;
    right: -18%;
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  #rain { display: none; }
  .sky { animation: none; }
  .blossoms { display: none; }
  .neo-grid, .neo-horizon { animation: none; }
  .orb, .sky, .neo-horizon, .neo-grid, .city, .kaiju, .kaiju img { transition: none; }
  body.tod-shift .sky, body.tod-shift .orb, body.tod-shift .neo-horizon { animation: none; }
}

/* —— LIVE CHART MODAL —— */
body.chart-open { overflow: hidden; }

.chart-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  background: rgba(5, 5, 6, 0.84);
  backdrop-filter: blur(7px);
}
.chart-modal[hidden] { display: none !important; }

.chart-modal-panel {
  width: min(1100px, 100%);
  height: min(78vh, 820px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 18%),
    linear-gradient(180deg, #16122e, #0a0618);
  border: 1px solid var(--edge);
  box-shadow:
    0 0 40px rgba(255, 43, 214, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.chart-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--edge);
}

.chart-modal-kicker {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--magenta);
}

.chart-modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
  margin-top: 2px;
}

.chart-modal-symbol {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.chart-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chart-modal-ext {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--steel-hi);
  text-decoration: none;
  border: 1px solid var(--edge);
  padding: 5px 8px;
  background: #0a0618;
}
.chart-modal-ext:hover {
  color: var(--sap);
  border-color: rgba(125, 255, 177, 0.45);
}

.chart-modal-x {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  width: 36px;
  height: 36px;
  color: var(--ink);
  background: #0a0618;
  border: 1px solid var(--edge);
  cursor: pointer;
}
.chart-modal-x:hover {
  color: var(--magenta);
  border-color: var(--magenta);
}

.chart-modal-body {
  flex: 1;
  min-height: 0;
  background: #0a0618;
}
.chart-modal-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0618;
}

@media (max-width: 820px) {
  .chart-modal { padding: 10px; }
  .chart-modal-panel { height: min(88vh, 900px); }
  .chart-modal-head { flex-wrap: wrap; }
  .chart-modal-title { font-size: 24px; }
}
