/* ==========================================================================
   《互动大师 · JOYPLUS Interactive Studio》— EXECUTIVE DARK COMMAND CENTER
   File: hudong/static/screen_cmd.css
   Route: /screen (1920×1080 Auto-Scaling Wall + Responsive Mobile Fallback)
   Shared workbench theme and local preview surfaces
   ========================================================================== */

:root,
[data-theme="daylight"],
[data-theme="obsidian"],
[data-theme="dark"] {
  --page: var(--ui-bg);
  --surface: var(--ui-surface);
  --line: var(--ui-line);
  --line-2: var(--ui-line-strong, var(--ui-line));
  --t1: var(--ui-ink);
  --t2: var(--ui-ink-2, var(--ui-muted));
  --t3: var(--ui-muted);
  --joy: var(--ui-accent);
  --joy-2: var(--ui-accent-hover, var(--ui-accent));
  --vip: var(--ui-warn);
  --free: var(--ui-alternate);
  --ssr: var(--ui-clue, #b191ff);
  --good: var(--ui-ok);
  --warn: var(--ui-warn);
  --crit: var(--ui-danger);
  --neutral: var(--ui-muted);

  --font: var(--ui-font-sans, "Poppins", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", sans-serif);
  --num: var(--ui-font-display, "Poppins", Bahnschrift, "DIN Alternate", "Segoe UI", sans-serif);
  --mono: var(--ui-font-mono, "Cascadia Mono", Consolas, ui-monospace, monospace);
}

[data-theme="daylight"] { --ssr: #685775; }

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--page);
  color: var(--t1);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body.scroll {
  overflow-y: auto;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--joy-2);
  outline-offset: 3px;
}

.num,
[data-num],
.clock b,
.kp b,
.node .big {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

[hidden] {
  display: none !important;
}

svg.i {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   1. 1920×1080 AUTO-SCALING STAGE & AMBIENT GRID GLOW
   -------------------------------------------------------------------------- */
.wrap {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
body.scroll .wrap {
  position: relative;
  inset: auto;
  width: 100%;
}

.stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
  display: grid;
  grid-template-rows: 66px 148px minmax(0, 1fr) 186px;
  gap: 12px;
  padding: 16px 26px 20px;
  overflow: hidden;
  background: var(--page);
}

.stage > :not(.bg) {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
}

/* --------------------------------------------------------------------------
   2. EXECUTIVE COMMAND HEADER (.top + joyplus-logo-white.svg + .wing)
   -------------------------------------------------------------------------- */
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand img,
.brand svg {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.brand .prod {
  padding-left: 16px;
  border-left: 1px solid var(--line-2);
  line-height: 1.25;
  white-space: nowrap;
}
.brand .prod b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t1);
  white-space: nowrap;
}
.brand .prod span {
  display: block;
  font-size: 12px;
  color: var(--t3);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.title {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: center;
  white-space: nowrap;
}
.title h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--t1);
}
.title small {
  display: block;
  margin-top: 3px;
  font: 600 12px/1 var(--num);
  letter-spacing: 0.32em;
  color: var(--joy-2);
  opacity: 0.9;
  white-space: nowrap;
}

.right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  flex-wrap: nowrap;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  background: var(--surface);
  white-space: nowrap;
}
.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  flex-shrink: 0;
}
.live.busy i {
  background: var(--joy-2);
}

.clock {
  text-align: right;
  line-height: 1.08;
  padding: 0 4px;
}
.clock b {
  font: 600 22px/1.08 var(--num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.clock small {
  display: block;
  color: var(--t3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.sbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--t2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
.sbtn:hover {
  color: var(--joy);
  border-color: var(--joy);
  background: var(--ui-soft);
}
.sbtn.primary {
  background: var(--joy);
  border-color: transparent;
  color: var(--ui-on-accent);
  font-weight: 700;
}
.sbtn.primary:hover {
  background: var(--joy-2);
  color: var(--ui-on-accent);
}
.sbtn.accent-sbtn {
  border-color: color-mix(in srgb, var(--joy) 55%, var(--line-2));
  background: var(--ui-soft);
  color: var(--joy);
  font-weight: 700;
}
.sbtn.accent-sbtn:hover {
  background: var(--joy);
  color: var(--ui-on-accent);
  border-color: var(--joy);
}
.sbtn.design-sbtn {
  border-color: color-mix(in srgb, var(--ssr) 48%, var(--line-2));
  color: var(--t1);
}
.sbtn.design-sbtn:hover {
  border-color: var(--ssr);
  background: var(--ui-clue-soft, var(--ui-soft));
  color: var(--ssr);
}
.sbtn.theme-switch-btn {
  padding: 0 5px;
  gap: 3px;
}
.sbtn.theme-switch-btn .th-seg {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  transition: background 150ms ease, color 150ms ease;
}
.sbtn.theme-switch-btn .th-seg.is-on {
  background: var(--ui-soft);
  color: var(--joy);
  font-weight: 700;
}
.sbtn.theme-switch-btn .th-div {
  color: var(--line-2);
  font-size: 12px;
}
:fullscreen .sbtn.hide-fs {
  display: none;
}

/* --------------------------------------------------------------------------
   3. SIGNATURE RETICLE PANELS (.pn::before / .pn::after)
   -------------------------------------------------------------------------- */
.pn {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.ph {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.ph h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--t1);
}
.ph h2::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--joy);
}
.ph .sub {
  font-size: 12px;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph .sub b {
  color: var(--t2);
  font-weight: 600;
}

.chip-r {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--t2);
  white-space: nowrap;
}
.chip-r i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
}
.chip-r.run {
  border-color: var(--joy);
  color: var(--joy);
  background: var(--ui-soft);
}
.chip-r.run i {
  background: var(--joy-2);
}


/* --------------------------------------------------------------------------
   4. ROW 1: 5-SYSTEM FULL-CHAIN PIPELINE
   (01 剧本大师 → 02 分镜大师 → 03 剪辑/切片 → 04 互动大师 [HERO] → 05 投放上线)
   -------------------------------------------------------------------------- */
.flow-5,
.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.26fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.wires .wire-line {
  stroke: var(--ui-muted);
  stroke-width: 1.75;
  stroke-dasharray: 6 5;
  fill: none;
}

.node,
.sys-node {
  position: relative;
  padding: 12px 14px 12px 76px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.node .ic,
.sys-node .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--ui-raised);
}
.node .ic svg,
.sys-node .ic svg {
  width: 22px;
  height: 22px;
  stroke: var(--t1);
  fill: none;
  stroke-width: 1.7;
}

.node .k,
.sys-node .k {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--t3);
}
.node .k b,
.sys-node .k b {
  font: 700 12px/1 var(--num);
  color: var(--joy-2);
  letter-spacing: 0.06em;
}
.node .nm,
.sys-node .nm {
  font-size: 15px;
  font-weight: 700;
  color: var(--t1);
}
.node .big,
.sys-node .big {
  margin-top: 2px;
  line-height: 1.1;
  white-space: nowrap;
}
.node .big .num,
.sys-node .big .num {
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.node .big small,
.sys-node .big small {
  margin-left: 6px;
  font-size: 12px;
  color: var(--t3);
}
.node .s,
.sys-node .s {
  margin-top: 4px;
  font-size: 12px;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node .s b,
.sys-node .s b {
  color: var(--t2);
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
}
.node .chip,
.sys-node .chip {
  position: absolute;
  right: 12px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--t2);
}
.node .chip i,
.sys-node .chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
}
.node .chip.run i,
.sys-node .chip.run i {
  background: var(--joy-2);
}

/* Stage 04 Hero Highlight: 互动大师 */
.node.hero, .sys-node.hero {
  border-color: var(--joy);
  background: var(--ui-soft);
}
.node.hero .ic, .sys-node.hero .ic {
  color: var(--joy);
  border-color: var(--joy);
}
.node.hero .big .num, .sys-node.hero .big .num {
  font-size: 40px;
  color: var(--t1);
}

/* --------------------------------------------------------------------------
   5. ROW 2: 3-COLUMN COMMAND CENTER BODY
   Left: Monte Carlo KPIs & Telemetry | Center: Live 9:16 Twin | Right: Funnel & ROI
   -------------------------------------------------------------------------- */
.cmd-main,
.main {
  display: grid;
  grid-template-columns: 486px minmax(0, 1fr) 486px;
  gap: 14px;
  min-height: 0;
}

.cmd-col,
.col {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 208px;
  gap: 12px;
  min-height: 0;
}

/* Monte Carlo KPI Tiles */
.kp-grid-4,
.kp4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.kp {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--ui-bg);
  min-width: 0;
}
.kp small {
  display: block;
  font-size: 12px;
  color: var(--t3);
}
.kp b {
  display: block;
  margin-top: 2px;
  font: 700 26px/1.18 var(--num);
  font-variant-numeric: tabular-nums;
  color: var(--t1);
}
.kp.hero-kp b {
  font-size: 32px;
  color: var(--joy-2);
}
.kp.hero-kp .negative-delta {
  color: var(--ui-warn);
}
.kp .delta {
  display: inline-block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--good);
}

/* Linear vs Interactive Dual Comparison Bars / SVG */
.vs-compare-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--ui-bg);
  border: 1px solid var(--line);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.vs-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--t2);
}

/* Live Event Feed & Static Health Gauges */
.feed {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feed .fi {
  display: grid;
  grid-template-columns: 68px 82px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 12px;
  min-width: 0;
}
.feed .fi .t {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--t3);
}
.feed .fi .w {
  color: var(--joy-2);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed .fi .x {
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center Showcase: Live 9:16 Auto-Play Interactive Twin + Synced Hook List */
.twin-body,
.spot-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.twin-phone,
.phone {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-height: 100%;
  justify-self: center;
  border-radius: 26px;
  padding: 7px;
  background: linear-gradient(160deg, #3C404C, #14161E 42%, #2B2F3A);
  box-shadow: 0 3px 12px rgb(0 0 0 / 0.15);
  overflow: hidden;
}
.twin-phone-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #050609;
}
.twin-phone .notch,
.phone .notch {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 56px;
  height: 14px;
  margin-left: -28px;
  border-radius: 10px;
  background: #000000;
  z-index: 35;
  pointer-events: none;
}

.twin-ai-pill {
  position: absolute;
  top: 32px;
  left: 14px;
  z-index: 34;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(12, 14, 20, 0.78);
  border: 1px solid #87d7c1;
  color: #FFFFFF;
  font: 700 12px/1.3 var(--font);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

/* Right Side of Center Panel: Live Synced Mini-DAG & Top Hooks */
.twin-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.twin-mini-dag {
  flex: 1;
  min-height: 150px;
  border-radius: 10px;
  background: var(--ui-bg);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.toplist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toplist li {
  position: relative;
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--ui-bg);
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}
.toplist li:hover {
  background: var(--ui-raised);
}
.toplist li.on {
  border-color: var(--joy);
  background: var(--ui-soft);
}
.toplist .rk {
  font: 700 18px/1 var(--num);
  font-variant-numeric: tabular-nums;
  color: var(--t3);
  text-align: center;
}
.toplist li.on .rk {
  color: var(--joy-2);
}
.toplist img {
  width: 36px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.toplist .t1 {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toplist .t2 {
  font-size: 12px;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toplist .mt {
  text-align: right;
}
.toplist .mt b {
  display: block;
  font: 700 16px/1.2 var(--num);
  font-variant-numeric: tabular-nums;
  color: var(--t1);
}
.toplist .mt span {
  font-size: 12px;
  color: var(--t3);
}

/* Reclaimed vertical height (268px -> 314px) after removing redundant #dramaQuickPills */
.twin-side #dramaTopList,
#dramaTopList {
  max-height: 314px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  gap: 5px;
}
.twin-side #dramaTopList li,
#dramaTopList li {
  grid-template-columns: 26px 30px minmax(0, 1fr) 104px;
  padding: 4px 10px 4px 6px;
  gap: 8px;
}
.twin-side #dramaTopList img,
#dramaTopList img {
  width: 30px;
}

/* Right Column: 10,000-Player Waterfall & Playable Channel Rank */
.cmd-waterfall {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.cwf-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
}
.cwf-label {
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cwf-bar {
  height: 16px;
  border-radius: 5px;
  background: var(--ui-line);
  overflow: hidden;
  display: flex;
  gap: 2px;
}
.cwf-bar > i {
  height: 100%;
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cwf-val {
  text-align: right;
  font: 700 13px/1 var(--num);
  font-variant-numeric: tabular-nums;
  color: var(--t1);
  white-space: nowrap;
}

/* 5-Pass Graph Verifier & Compliance Rows */
.health-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
}
.hl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--ui-bg);
  border: 1px solid var(--ui-line);
  font-size: 12px;
  min-width: 0;
}
.hl-name {
  min-width: 0;
  color: var(--ui-ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hl-tag {
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
  font-weight: 700;
  color: var(--ui-accent);
}
.hl-tag.warn {
  color: var(--ui-warn);
}
.hl-tag.failed {
  color: var(--ui-danger);
}
.hl-tag.skipped {
  color: var(--ui-muted);
}

/* Ending Tier Distribution Strip */
.tier-seg {
  display: flex;
  height: 26px;
  gap: 3px;
  margin-top: 8px;
}
.tier-seg > i {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font: 700 12px/1 var(--num);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink-on-bright, #111113);
  min-width: 36px;
}
.tier-seg > i.ssr { background: var(--ssr); color: var(--ui-ink-on-bright, #111113); }
.tier-seg > i.s   { background: var(--vip); color: var(--ui-ink-on-bright, #111113); }
.tier-seg > i.a   { background: var(--free); color: var(--ui-ink-on-bright, #111113); }
.tier-seg > i.b   { background: var(--neutral); color: var(--ui-ink-on-bright, #111113); }
.tier-seg > i.be  { background: var(--crit); color: var(--ui-ink-on-bright, #111113); }

/* --------------------------------------------------------------------------
   6. ROW 3: INTERACTIVE BRANCH & 9:16 MATRIX WALL (.wall)
   -------------------------------------------------------------------------- */
.wall {
  flex-direction: row;
  gap: 18px;
  padding: 12px 16px;
}
.wall-h {
  flex-shrink: 0;
  width: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.wall-h h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wall-h h2::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--joy);
}
.wall-n b {
  display: block;
  font: 700 42px/1.05 var(--num);
  font-variant-numeric: tabular-nums;
  color: var(--t1);

}
.wall-n span {
  font-size: 12px;
  color: var(--t3);
}
.wall-lg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--t2);
}

.wall-view {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.track {
  display: flex;
  gap: 10px;
  width: max-content;
  height: 100%;
  align-items: center;
  animation: wall-marquee var(--dur, 90s) linear infinite;
  will-change: transform;
}
.wall-view:hover .track {
  animation-play-state: paused;
}
@keyframes wall-marquee {
  to { transform: translateX(-50%); }
}

.tile {
  position: relative;
  flex-shrink: 0;
  width: 90px;
  height: 158px;
  border-radius: 8px;
  overflow: hidden;
  background: #181B24;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.tile img,
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tile:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 0 2px var(--joy-2), 0 10px 26px rgba(0, 0, 0, 0.65);
  z-index: 3;
}
.tile.is-vip {
  box-shadow: 0 0 0 1.5px var(--vip);
}
.tile.is-ssr {
  box-shadow: 0 0 0 1.5px var(--ssr);
}

.tile-badge {
  position: absolute;
  left: 5px;
  top: 5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(8, 10, 15, 0.84);
  color: #FFFFFF;
  font: 700 12px/1.3 var(--font);
}
.tile-badge.vip  { background: var(--vip); color: var(--ui-ink-on-bright, #111113); }
.tile-badge.ok   { background: var(--good); color: var(--ui-ink-on-bright, #111113); }
.tile-badge.free { background: var(--free); color: var(--ui-ink-on-bright, #111113); }
.tile-badge.ssr  { background: var(--ssr); color: var(--ui-ink-on-bright, #111113); }
.tile-badge.be   { background: var(--crit); color: var(--ui-ink-on-bright, #111113); }
.tile-badge.qte  { background: var(--joy-2); color: var(--ui-on-accent, #ffffff); }

.tile .ft {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 6px 5px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1.25;
}
.tile .ft b {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile .ft span {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.8);
}

/* Floating Tooltip */
.tip {
  position: fixed;
  z-index: 80;
  display: none;
  max-width: 320px;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  font-size: 12px;
  line-height: 1.5;
  color: var(--t2);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. RESPONSIVE FALLBACKS (body.scroll / 1080px Tablet / 390px Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  html, body {
    overflow-y: auto;
    height: auto;
  }
  .wrap {
    position: relative;
    inset: auto;
    overflow: visible;
  }
  .stage {
    position: relative;
    width: 100%;
    height: auto;
    transform: none !important;
    grid-template-rows: auto;
    padding: 16px;
    gap: 14px;
  }
  .top {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 12px;
  }
  .title {
    text-align: left;
  }
  .title h1 {
    font-size: 22px;
    letter-spacing: 0.08em;
    padding-left: 0;
  }
  .right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .flow-5,
  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wires {
    display: none;
  }
  .cmd-main,
  .main {
    grid-template-columns: minmax(0, 1fr);
  }
  .cmd-col,
  .col {
    grid-template-rows: auto;
  }
  .twin-body,
  .spot-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .twin-phone,
  .phone {
    width: min(280px, 100%);
    height: auto;
  }
}

@media (max-width: 560px) {
  .stage {
    padding: 12px;
  }
  .flow-5,
  .flow,
  .kp-grid-4,
  .kp4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .wall {
    flex-direction: column;
  }
  .wall-h {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
