body { min-height: 100vh; overflow-x: hidden; }
.universe-main { padding: 34px 0 0; }
.universe-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 30px; padding-bottom: 24px; }
.universe-intro h1 { margin: 0; font: 760 34px/1.18 var(--display); }
.universe-intro p { margin: 9px 0 0; color: var(--text-2); line-height: 1.6; }
.universe-update { min-width: 190px; text-align: right; }
.universe-update span, .universe-update strong { display: block; }
.universe-update span { color: var(--text-3); font-size: 11px; }
.universe-update strong { margin-top: 5px; color: var(--text-2); font-size: 12px; }

.universe-workspace { width: min(calc(100% - 32px), 1420px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 330px; border: 1px solid var(--line-strong); background: var(--surface); }
.universe-stage-column { min-width: 0; border-right: 1px solid var(--line); }
.universe-toolbar { min-height: 58px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.universe-toolbar input, .universe-toolbar select, .universe-toolbar button, .universe-toolbar a { min-height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 12px; }
.universe-toolbar input { width: min(250px, 24vw); padding: 8px 11px; color: var(--text); }
.universe-toolbar select { min-width: 126px; padding: 7px 30px 7px 10px; color: var(--text); }
.universe-toolbar button, .universe-toolbar a { display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; cursor: pointer; white-space: nowrap; }
.universe-toolbar button:hover, .universe-toolbar a:hover { background: var(--surface-2); color: var(--text); }
.universe-toolbar-spacer { flex: 1; }

.universe-stage { position: relative; height: 720px; overflow: hidden; background-color: var(--surface-2); isolation: isolate; }
.universe-stage::before { content: ''; position: absolute; inset: 42px 18px 48px 106px; z-index: 0; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(203, 211, 213, .72) 25%); pointer-events: none; }
.universe-stage canvas { position: absolute; inset: 42px 18px 48px 106px; z-index: 1; pointer-events: none; }
.universe-axis { position: absolute; inset: 12px 18px auto 106px; z-index: 4; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: var(--text-3); font-size: 9px; pointer-events: none; }
.universe-axis i { height: 1px; background: var(--line-strong); }
.universe-plot { position: absolute; inset: 42px 18px 48px 0; z-index: 3; }
.universe-data-layer { position: absolute; inset: 0 0 0 106px; }
.universe-lane-label { position: absolute; left: 7px; width: 90px; min-height: 30px; padding: 4px 8px; overflow: hidden; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); cursor: pointer; font-size: 9px; font-weight: 650; text-align: right; text-overflow: ellipsis; white-space: nowrap; transform: translateY(-50%); }
.universe-lane-label:hover, .universe-lane-label.is-selected { border-color: var(--line); background: var(--surface); color: var(--text); }
.universe-lane-line { position: absolute; left: 106px; right: 0; height: 1px; background: var(--line); pointer-events: none; }
.universe-marker { --cluster: var(--tap-cyan); position: absolute; width: 38px; height: 38px; display: grid; place-items: center; padding: 2px; border: 2px solid var(--surface); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 0 color-mix(in srgb, var(--cluster) 68%, transparent), 0 6px 13px rgba(27, 42, 45, .11); cursor: pointer; transform: translate(-50%, -50%); transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, opacity var(--motion-fast) ease; }
.universe-marker:hover, .universe-marker:focus-visible, .universe-marker.is-selected { z-index: 6; transform: translate(-50%, -50%) scale(1.12); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cluster) 34%, transparent), 0 9px 20px rgba(27, 42, 45, .18); }
.universe-marker .game-icon, .universe-marker .game-icon-fallback { width: 30px !important; height: 30px !important; border-radius: 9px; }
.universe-marker-score { position: absolute; left: -3px; bottom: -6px; min-width: 24px; padding: 2px 3px; border: 2px solid var(--surface-2); border-radius: 6px; background: var(--surface); color: var(--text); font: 750 8px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.universe-marker-score[data-band="excellent"] { color: var(--positive); }
.universe-marker-cover { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 3px; border: 2px solid var(--surface-2); border-radius: 6px; background: var(--cluster); color: #fff; font: 750 8px/1 var(--font); }
.universe-stage-state { position: absolute; z-index: 5; left: 12px; bottom: 10px; color: var(--text-3); font-size: 9px; pointer-events: none; }
.universe-stage[data-render-mode="error"] .universe-stage-state { inset: 0; display: grid; place-items: center; font-size: 13px; }
.universe-stage[data-render-mode="error"] .universe-plot { display: none; }

.universe-key { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 10px; }
.universe-key span { display: inline-flex; align-items: center; gap: 7px; }
.key-position { width: 24px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--surface-3), var(--tap-cyan)); }
.key-score, .key-cover { min-width: 24px; min-height: 20px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-style: normal; font-weight: 750; }
.key-cover { color: #fff; border-color: var(--tap-cyan); background: var(--tap-cyan); }
.universe-reading-note { margin: 0; padding: 12px 14px 13px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 10px; line-height: 1.55; }

.universe-side { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.universe-detail-shell { min-height: 250px; padding: 20px; border-bottom: 1px solid var(--line); }
.universe-detail-empty { min-height: 208px; display: grid; place-content: center; text-align: center; }
.universe-detail-empty strong { font-size: 15px; }
.universe-detail-empty p { max-width: 220px; margin: 7px auto 0; color: var(--text-3); font-size: 11px; line-height: 1.6; }
.universe-detail-head { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 13px; }
.universe-detail-head h2 { margin: 0; font: 720 17px/1.3 var(--display); }
.universe-detail-head p { margin: 5px 0 0; overflow: hidden; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.universe-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.universe-fact { min-width: 0; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.universe-fact dt { color: var(--text-3); font-size: 9px; }
.universe-fact dd { margin: 5px 0 0; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.universe-detail-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.universe-detail-actions a { color: var(--tap-cyan-strong); font-size: 11px; font-weight: 650; }

.universe-index { min-height: 0; }
.universe-index-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); }
.universe-index-head h2 { margin: 0; font: 700 13px/1.2 var(--display); }
.universe-index-head span { color: var(--text-3); font-size: 10px; }
.universe-list { max-height: 440px; overflow: auto; scrollbar-width: thin; }
.universe-game-row { width: 100%; min-height: 54px; display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: center; gap: 11px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.universe-game-row:hover, .universe-game-row.is-selected { background: var(--surface-2); }
.universe-game-row.is-selected { box-shadow: inset 3px 0 0 var(--tap-cyan); }
.universe-game-row > i { width: 8px; height: 8px; border-radius: 3px; background: var(--cluster); }
.universe-game-copy { min-width: 0; }
.universe-game-copy strong, .universe-game-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.universe-game-copy strong { font-size: 12px; }
.universe-game-copy small { margin-top: 4px; color: var(--text-3); font-size: 9px; }
.universe-list-empty { margin: 0; padding: 28px 18px; color: var(--text-3); font-size: 11px; line-height: 1.6; text-align: center; }
.universe-footer { min-height: 64px; display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 10px; }
.universe-footer a { color: var(--tap-cyan-strong); font-weight: 650; }

@media (max-width: 980px) {
  .universe-workspace { grid-template-columns: 1fr; }
  .universe-stage-column { border-right: 0; }
  .universe-side { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); grid-template-rows: none; border-top: 1px solid var(--line-strong); }
  .universe-detail-shell { border-right: 1px solid var(--line); border-bottom: 0; }
  .universe-list { max-height: 360px; }
}

@media (max-width: 720px) {
  .universe-main { padding-top: 26px; }
  .universe-intro { display: block; padding-bottom: 20px; }
  .universe-intro h1 { font-size: 28px; }
  .universe-update { min-width: 0; margin-top: 15px; text-align: left; }
  .universe-workspace { width: 100%; border-inline: 0; }
  .universe-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 116px; }
  .universe-toolbar label:first-child { min-width: 0; }
  .universe-toolbar input, .universe-toolbar select { width: 100%; min-width: 0; }
  .universe-toolbar-spacer { display: none; }
  #universeClear, #universeModeLink { grid-column: 1 / -1; }
  .universe-stage { height: 660px; overflow: hidden; }
  .universe-stage::before { left: 78px; }
  .universe-stage canvas { left: 78px; }
  .universe-axis { left: 78px; }
  .universe-lane-label { left: 2px; width: 70px; padding-inline: 4px; }
  .universe-lane-line { left: 78px; }
  .universe-data-layer { left: 78px; }
  .universe-side { display: block; }
  .universe-detail-shell { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .universe-detail-empty { min-height: 120px; }
  .universe-list { max-height: 420px; }
  .universe-key { gap: 9px 16px; }
  .universe-footer { min-height: 72px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .universe-marker { transition: none; }
}
