:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: rgba(4, 9, 15, 0.7);
  --surface-strong: rgba(5, 11, 18, 0.88);
  --surface-soft: rgba(8, 17, 27, 0.56);
  --line: rgba(181, 213, 244, 0.18);
  --line-strong: rgba(190, 220, 255, 0.34);
  --text: #f7f9fc;
  --muted: #aab6c7;
  --faint: #718094;
  --cyan: #5be7ff;
  --blue: #4387ff;
  --amber: #ffd166;
  --magenta: #ff4fc3;
  --rose: #ff7383;
  --star: #dbeafe;
  --panel-blur: blur(18px);
  --shadow: 0 24px 74px rgba(0, 0, 0, 0.58);
  font-family: "Inter", "Segoe UI", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.immersive-viewer {
  min-height: 100vh;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 52% 18%, rgba(92, 146, 255, 0.12), transparent 31%),
    radial-gradient(circle at 24% 72%, rgba(255, 209, 102, 0.08), transparent 27%),
    #000000;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 12;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), transparent 16%, transparent 76%, rgba(0, 0, 0, 0.72)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.56), transparent 19%, transparent 76%, rgba(0, 0, 0, 0.66));
  pointer-events: none;
}

button,
select,
input {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
}

.topbar,
.control-rail,
.map-toolbox,
.timeline-card,
.legend-strip,
.side-stack {
  position: fixed;
  z-index: 30;
}

.topbar {
  top: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
}

.brand,
.topbar-metrics,
.control-rail,
.map-toolbox,
.timeline-card,
.legend-strip,
.candidate-panel {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 520px;
  min-width: 0;
}

.brand > div {
  min-width: 0;
}

.brand-mark {
  flex: 0 0 128px;
  width: 128px;
  height: 62px;
  margin-top: 1px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(247, 249, 252, 0.94);
  box-shadow: 0 0 28px rgba(91, 231, 255, 0.2);
}

h1 {
  max-width: 470px;
  font-size: 34px;
  line-height: 1.04;
  font-weight: 780;
  text-shadow: 0 0 30px rgba(247, 249, 252, 0.2);
}

h1 span {
  display: inline;
}

.brand p {
  margin-top: 6px;
  color: rgba(247, 249, 252, 0.68);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.topbar-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(136px, 1fr));
  gap: 12px;
  min-width: 308px;
}

.topbar-metrics > div {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.54);
  padding: 14px 16px;
  box-shadow: var(--shadow), inset 0 0 28px rgba(91, 231, 255, 0.03);
  backdrop-filter: var(--panel-blur);
}

.topbar-metrics > div:nth-child(n + 3) {
  display: none;
}

.topbar-metrics span {
  display: block;
  color: var(--cyan);
  font-size: 28px;
  line-height: 1;
  font-weight: 780;
}

.topbar-metrics > div:nth-child(2) span {
  color: var(--amber);
}

.topbar-metrics small {
  display: block;
  margin-top: 8px;
  color: rgba(247, 249, 252, 0.66);
  font-size: 12px;
}

.control-rail {
  top: 108px;
  left: 24px;
  display: block;
}

.control-rail summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 9, 15, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
  color: rgba(247, 249, 252, 0.82);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  list-style: none;
}

.control-rail summary::-webkit-details-marker {
  display: none;
}

.rail-mark {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(247, 249, 252, 0.68);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(247, 249, 252, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 0, rgba(247, 249, 252, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle at 100% 50%, rgba(247, 249, 252, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 100%, rgba(247, 249, 252, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle at 0 50%, rgba(247, 249, 252, 0.78) 0 1px, transparent 2px);
}

.rail-arrow {
  color: rgba(247, 249, 252, 0.62);
  font-size: 17px;
  line-height: 1;
  transform: translateY(-1px);
}

.control-rail[open] .rail-arrow {
  transform: rotate(90deg);
}

.control-popover {
  position: absolute;
  top: 50px;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(136px, 1fr));
  gap: 10px;
  width: min(380px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
}

.control-popover label {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: rgba(247, 249, 252, 0.7);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.range-control {
  grid-column: 1 / -1;
  min-width: 230px;
}

.range-control input {
  width: 100%;
  min-width: 0;
  accent-color: var(--cyan);
}

.toggle-control {
  flex-direction: row !important;
  align-items: center !important;
  padding: 0 4px;
}

.toggle-control input {
  width: 15px;
  height: 15px;
  accent-color: var(--amber);
}

select,
button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 10, 18, 0.82);
  color: var(--text);
}

select {
  max-width: 145px;
  padding: 0 28px 0 12px;
  font-size: 12px;
}

button {
  padding: 0 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 740;
}

.control-popover button {
  justify-self: start;
}

button:hover,
select:hover {
  border-color: rgba(247, 249, 252, 0.48);
  background: rgba(12, 24, 38, 0.88);
}

.workspace {
  position: relative;
  min-height: 100vh;
}

.map-column {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.map-frame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000000;
}

.map-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 52%, rgba(0, 0, 0, 0.2) 72%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(180deg, rgba(247, 249, 252, 0.02), transparent 18%, rgba(0, 0, 0, 0.14));
  pointer-events: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.map-badge {
  position: absolute;
  left: 24px;
  bottom: 126px;
  z-index: 5;
  color: rgba(247, 249, 252, 0.5);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.axis {
  position: absolute;
  z-index: 18;
  color: rgba(247, 249, 252, 0.68);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  opacity: 0.72;
  pointer-events: none;
  text-shadow:
    0 0 12px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(91, 231, 255, 0.14);
}

.x-axis {
  left: 50%;
  bottom: 146px;
  transform: translateX(-50%);
}

.x-axis::before,
.x-axis::after {
  content: "";
  position: absolute;
  top: 50%;
  width: min(260px, 22vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 249, 252, 0.52));
}

.x-axis::before {
  right: calc(100% + 18px);
}

.x-axis::after {
  left: calc(100% + 18px);
  transform: rotate(180deg);
}

.y-axis {
  left: 138px;
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.y-axis::before,
.y-axis::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: min(190px, 20vh);
  transform: translateX(-50%);
}

.y-axis::before {
  bottom: calc(100% + 16px);
  background: linear-gradient(0deg, transparent, rgba(247, 249, 252, 0.52));
}

.y-axis::after {
  top: calc(100% + 16px);
  background: linear-gradient(180deg, transparent, rgba(247, 249, 252, 0.52));
}

.hover-panel {
  position: absolute;
  z-index: 42;
  max-width: min(300px, 52vw);
  padding: 11px 12px;
  border: 1px solid rgba(247, 249, 252, 0.22);
  border-radius: 8px;
  background: rgba(3, 7, 12, 0.9);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.64);
  backdrop-filter: var(--panel-blur);
  pointer-events: none;
}

.hover-panel strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.hover-panel span {
  color: var(--muted);
  font-size: 12px;
}

.explore-panel,
.side-stack {
  display: contents;
}

.map-toolbox {
  left: 24px;
  top: 47%;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
  padding: 8px;
  border: 1px solid rgba(181, 213, 244, 0.16);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.46);
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
}

.map-toolbox button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  border-color: rgba(247, 249, 252, 0.18);
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.46);
  color: rgba(247, 249, 252, 0.84);
}

.map-toolbox svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-toolbox button:hover {
  border-color: rgba(91, 231, 255, 0.44);
  color: var(--cyan);
}

.timeline-card {
  left: 24px;
  right: 398px;
  bottom: 22px;
  display: grid;
  grid-template-columns: minmax(132px, auto) minmax(280px, 1fr) minmax(112px, auto) 104px;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid rgba(181, 213, 244, 0.18);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
}

.timeline-start,
.timeline-end,
.timeline-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.timeline-start span:last-child,
.timeline-end,
.timeline-progress {
  display: grid;
  gap: 3px;
}

.play-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(91, 231, 255, 0.28);
  border-radius: 50%;
  background: rgba(91, 231, 255, 0.08);
  color: rgba(247, 249, 252, 0.9);
  box-shadow: 0 0 18px rgba(91, 231, 255, 0.14);
}

.play-dot svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.timeline-card strong,
.timeline-card b {
  font-weight: 780;
}

.timeline-start strong,
.timeline-end span {
  color: rgba(247, 249, 252, 0.88);
  font-size: 13px;
}

.timeline-card small,
.timeline-labels {
  color: rgba(247, 249, 252, 0.58);
  font-size: 12px;
}

.timeline-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.timeline-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(247, 249, 252, 0.12);
}

.timeline-track::before,
.timeline-track::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(247, 249, 252, 0.72);
  box-shadow: 0 0 16px rgba(247, 249, 252, 0.52);
  transform: translateY(-50%);
}

.timeline-track::before {
  left: 0;
}

.timeline-track::after {
  right: 0;
  background: var(--amber);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.75);
}

#timelineFill {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  box-shadow: 0 0 20px rgba(91, 231, 255, 0.35), 0 0 22px rgba(255, 209, 102, 0.26);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.timeline-labels span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-end b {
  color: var(--amber);
}

.timeline-progress {
  justify-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid rgba(181, 213, 244, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.58);
}

.timeline-progress strong {
  color: var(--cyan);
  font-size: 27px;
  line-height: 1;
}

.timeline-progress span {
  color: rgba(247, 249, 252, 0.6);
  font-size: 11px;
}

.legend-strip {
  left: 24px;
  bottom: 110px;
  display: grid;
  gap: 9px;
  width: 148px;
  padding: 11px 12px;
  border: 1px solid rgba(181, 213, 244, 0.13);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.42);
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
  color: rgba(247, 249, 252, 0.55);
  font-size: 11px;
  opacity: 0.78;
}

.legend-strip span {
  display: grid;
  grid-template-columns: 11px 1fr;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.legend-strip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 16px currentColor;
}

.legend-candidate,
.status-promising {
  color: var(--amber);
  background: var(--amber);
}

.legend-high,
.status-explored {
  color: var(--cyan);
  background: var(--cyan);
}

.legend-pass,
.status-verified {
  color: var(--blue);
  background: var(--blue);
}

.legend-review,
.status-discovery {
  color: var(--magenta);
  background: var(--magenta);
}

.legend-negative {
  color: var(--rose);
  background: var(--rose);
}

.status-final {
  color: var(--text);
  background: var(--text);
}

.story-card,
.status-card,
.spotlight-panel,
.comparison-panel {
  display: none;
}

.candidate-panel {
  position: fixed;
  top: 118px;
  right: 24px;
  bottom: 136px;
  z-index: 34;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 360px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.72);
  box-shadow: var(--shadow), inset 0 0 44px rgba(91, 231, 255, 0.035);
  backdrop-filter: var(--panel-blur);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 18px;
  line-height: 1.2;
}

.panel-head span {
  display: inline-block;
  margin-top: 6px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 740;
}

.panel-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: rgba(247, 249, 252, 0.64);
}

.panel-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.selected-card {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 20px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 209, 102, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.018);
  scrollbar-color: rgba(247, 249, 252, 0.25) transparent;
}

.selected-card.is-empty {
  display: grid;
  align-content: center;
}

.selected-card h3 {
  margin-bottom: 9px;
  font-size: 20px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.selected-card p {
  color: rgba(247, 249, 252, 0.7);
  font-size: 13px;
  line-height: 1.65;
}

.inspector-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(247, 249, 252, 0.74);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.stage-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(247, 249, 252, 0.7);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0;
}

.stage-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.score-radar {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 18px 0 16px;
}

.main-score span,
.metric-row span,
.meta-row span {
  display: block;
  color: rgba(247, 249, 252, 0.56);
  font-size: 11px;
}

.main-score strong {
  display: block;
  margin-top: 7px;
  color: var(--amber);
  font-size: 35px;
  line-height: 1;
}

.main-score small {
  color: rgba(247, 249, 252, 0.58);
  font-size: 14px;
}

.radar-chart {
  width: 184px;
  max-width: 100%;
  height: 154px;
}

.radar-chart text {
  fill: rgba(247, 249, 252, 0.64);
  font-size: 8px;
}

.inspector-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
  border-top: 1px solid rgba(181, 213, 244, 0.14);
  border-bottom: 1px solid rgba(181, 213, 244, 0.14);
}

.metric-row {
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid rgba(181, 213, 244, 0.12);
}

.metric-row:last-child {
  border-right: 0;
}

.metric-row strong,
.meta-row strong {
  display: block;
  margin-top: 6px;
  color: var(--cyan);
  font-size: 16px;
}

.metric-row.is-safe strong {
  color: #55e39a;
}

.inspector-meta {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(181, 213, 244, 0.1);
  padding-bottom: 9px;
}

.meta-row strong {
  margin-top: 0;
  color: rgba(247, 249, 252, 0.74);
  font-size: 13px;
  text-align: right;
}

.inspector-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.inspector-actions button {
  width: 100%;
  border-radius: 8px;
  background: rgba(8, 18, 30, 0.64);
  color: rgba(247, 249, 252, 0.82);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.score-grid div {
  min-width: 0;
  padding: 12px 8px 0 0;
  border-right: 1px solid rgba(181, 213, 244, 0.12);
}

.score-grid div:nth-child(even) {
  padding-left: 10px;
  border-right: 0;
}

.score-grid span {
  display: block;
  color: rgba(247, 249, 252, 0.58);
  font-size: 11px;
}

.score-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--cyan);
  font-size: 19px;
}

.candidate-list {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.candidate-row {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.candidate-row:hover,
.candidate-row.is-selected {
  background: rgba(255, 209, 102, 0.08);
}

.candidate-row.is-selected {
  box-shadow: inset 2px 0 0 var(--amber);
}

.candidate-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.candidate-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.34;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-meta {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(247, 249, 252, 0.58);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-score {
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

@media (max-width: 1240px) {
  .timeline-card {
    right: 400px;
    grid-template-columns: minmax(118px, auto) minmax(220px, 1fr) 92px;
  }

  .timeline-end {
    display: none;
  }
}

@media (max-width: 920px) {
  body.immersive-viewer {
    overflow: hidden;
  }

  body::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 24%, transparent 62%, rgba(0, 0, 0, 0.86));
  }

  .topbar {
    top: 14px;
    left: 12px;
    right: 12px;
    display: grid;
    gap: 10px;
  }

  .brand {
    max-width: calc(100vw - 24px);
    gap: 10px;
  }

  .brand-mark {
    flex-basis: 86px;
    width: 86px;
    height: 42px;
  }

  h1 {
    font-size: 27px;
    line-height: 1.04;
  }

  h1 span {
    display: inline;
  }

  .brand p {
    max-width: 96vw;
    font-size: 12px;
  }

  .topbar-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .topbar-metrics > div {
    min-height: 54px;
    padding: 10px 12px;
  }

  .topbar-metrics span {
    font-size: 20px;
  }

  .topbar-metrics small {
    margin-top: 4px;
  }

  .control-rail {
    top: 128px;
    left: 12px;
    right: auto;
  }

  .control-popover {
    width: min(360px, calc(100vw - 24px));
  }

  .map-toolbox,
  .legend-strip,
  .timeline-card,
  .map-badge,
  .axis {
    display: none;
  }

  .candidate-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: 38vh;
  }

  .panel-head {
    padding: 12px 14px;
  }

  .selected-card {
    padding: 13px 14px;
  }

  .selected-card h3 {
    font-size: 17px;
  }

  .selected-card p {
    display: none;
  }

  .score-radar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .main-score strong {
    font-size: 25px;
  }

  .radar-chart {
    display: none;
  }

  .inspector-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-row {
    padding: 9px 7px;
  }

  .inspector-meta,
  .inspector-actions,
  .candidate-list {
    display: none;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 24px;
  }

  .brand p {
    display: none;
  }

  .control-rail {
    top: 112px;
  }

  select,
  button {
    min-height: 32px;
  }

  .candidate-panel {
    max-height: 42vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
