/* C F.M. Mariani - ENTHCREATIONS.COM */

:root {
  --void: #080712;
  --ink: #f7f4ee;
  --muted: #a9b3c7;
  --panel: rgba(10, 10, 22, 0.78);
  --panel-strong: rgba(19, 19, 38, 0.88);
  --line: rgba(103, 207, 255, 0.34);
  --acid: #ff4fd8;
  --blue: #48c8ff;
  --gold: #f7f1df;
  --green: #67e8ff;
  --cyan-soft: #a8e9ff;
  --red: #ff4638;
  --violet: #a970ff;
  --shadow: 0 16px 42px rgba(2, 2, 12, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Noto Sans", "Noto Sans JP", "Noto Sans KR", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  background:
    linear-gradient(rgba(4, 4, 14, 0.18), rgba(4, 4, 14, 0.34)),
    var(--holo-bg, url("assets/holo-liquid-bg.jpg?v=1.3.226")) center top / cover no-repeat,
    #080712;
}

body::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(110deg, transparent 9%, rgba(255, 255, 255, 0.07) 27%, transparent 43%),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 8px);
  opacity: 0.38;
}

body::after {
  display: none;
}

.app-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(6px, 0.8vw, 10px);
}

.topbar {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr) 410px;
  gap: 18px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(220, 232, 255, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.09), transparent 28%),
    rgba(7, 7, 18, 0.9);
  box-shadow: var(--shadow);
}

.enth-logo {
  width: 140px;
  max-width: 100%;
  height: auto;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(72, 200, 255, 0.12);
}

.brand-link {
  display: grid;
  gap: 3px;
  width: 150px;
  max-width: 100%;
  color: var(--muted) !important;
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 8px;
  line-height: 1;
  text-decoration: none !important;
  text-transform: uppercase;
}

.brand-link small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  text-transform: uppercase;
}

.brand-link:link,
.brand-link:visited {
  color: var(--muted) !important;
}

.brand-link:hover {
  color: var(--green);
}

.brand-link span {
  display: block;
  overflow: hidden;
  color: inherit !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.eyebrow,
.tagline,
.panel-header,
.instrument-title,
.metric span,
.stick-readout,
.controller-meta,
.button-tile small {
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 70, 56, 0.86), 0 0 34px rgba(255, 79, 216, 0.4);
}

.signal-dot.locked {
  background: var(--blue);
  box-shadow: 0 0 18px rgba(72, 200, 255, 0.82), 0 0 30px rgba(103, 207, 255, 0.3);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(22px, 2.7vw, 42px);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tagline {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-stack {
  display: grid;
  grid-template-columns: 70px 86px 0.9fr repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.status-card,
.language-card,
.about-button,
.panel,
.instrument,
.metric,
.controller-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 32%),
    var(--panel);
  box-shadow: 0 8px 24px rgba(2, 2, 12, 0.2);
}

.panel {
  box-shadow: var(--shadow);
}

.instrument,
.metric,
.controller-card,
.status-card,
.language-card {
  contain: paint;
}

.status-card,
.language-card,
.about-button {
  min-height: 48px;
  padding: 8px;
}

.about-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    var(--panel);
  color: var(--cyan-soft);
  cursor: pointer;
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.about-button:hover,
.about-button:focus-visible {
  border-color: var(--blue);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(72, 200, 255, 0.18), 0 0 20px rgba(72, 200, 255, 0.12);
}

.status-card span,
.language-card span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.language-card select {
  width: 100%;
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.language-card option {
  background: var(--void);
  color: var(--ink);
}

.status-card strong {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 15px;
}

.live-mini {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
}

.live-mini b {
  color: var(--green);
}

.console-layout {
  display: grid;
  grid-template-columns: clamp(210px, 16vw, 230px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.panel {
  padding: 10px;
  border-radius: 18px;
}

.connection-panel {
  position: sticky;
  top: 20px;
}

.arcade-layout {
  position: relative;
  width: 86%;
  aspect-ratio: 788 / 448;
  margin: auto;
  transform: translateY(-10px);
}

.drift-instrument {
  min-height: 76px;
}

.arcade-visualizer-instrument {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-inline: 10px;
}

.arcade-lever {
  position: absolute;
  left: 12%;
  top: 44%;
  width: 16.9%;
  aspect-ratio: 1;
  border: 2px solid #6ee8ff;
  border-radius: 50%;
  background: #2789a7;
  box-shadow: 0 0 0 3px rgba(72, 200, 255, 0.08);
  transform: translate(-50%, -50%);
  transition: transform 55ms linear;
  will-change: transform;
}

.arcade-lever-center {
  position: absolute;
  left: 12%;
  top: 44%;
  width: 16.9%;
  aspect-ratio: 1;
  border: 1px solid rgba(110, 232, 255, 0.42);
  border-radius: 50%;
  background: rgba(16, 37, 52, 0.7);
  transform: translate(-50%, -50%);
}

.arcade-input-button {
  position: absolute;
  display: grid;
  width: 14.5%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #417e96;
  border-radius: 50%;
  background: #102534;
  color: #d9f3fa;
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  box-shadow: none;
  transform: translate(-50%, -50%);
  transition: transform 45ms linear, background 45ms linear, box-shadow 45ms linear;
}

.arcade-p1 { left: 41.1%; top: 26.3%; }
.arcade-p2 { left: 56.8%; top: 12.7%; }
.arcade-p3 { left: 73.8%; top: 18.5%; }
.arcade-p4 { left: 89.5%; top: 31.9%; }
.arcade-k1 { left: 40.9%; top: 56.5%; }
.arcade-k2 { left: 56.6%; top: 44.2%; }
.arcade-k3 { left: 73.6%; top: 48.4%; }
.arcade-k4 { left: 89.4%; top: 62.3%; }
.arcade-l3 { left: 40.8%; top: 87.3%; }
.arcade-r3 { left: 57.3%; top: 79%; }

.arcade-input-button.active {
  border-color: #efffff;
  background: #35c8e9;
  color: #06131c;
  box-shadow: 0 0 0 3px rgba(72, 200, 255, 0.16);
  transform: translate(-50%, -47%) scale(0.94);
}

.arcade-map-layout {
  position: relative;
  width: 82%;
  aspect-ratio: 788 / 448;
  margin: auto;
  transform: translateY(-8px);
}

.arcade-map-button {
  width: 9.9%;
  font-size: 6px;
}

.arcade-map-button[data-arcade-map-dpad] {
  color: #f4fdff;
  font-size: 6px;
  line-height: 1;
}

.arcade-map-left { left: 17.2%; top: 26%; }
.arcade-map-down { left: 29%; top: 26%; }
.arcade-map-right { left: 39.6%; top: 36.7%; }
.arcade-map-tp { left: 28%; top: 67.2%; }
.arcade-map-up { left: 40.9%; top: 79.1%; }
.arcade-map-button.arcade-map-up { width: 11.4%; }
.arcade-map-p1 { left: 52.8%; top: 31.9%; }
.arcade-map-p2 { left: 63.3%; top: 21.8%; }
.arcade-map-p3 { left: 74.7%; top: 17.3%; }
.arcade-map-p4 { left: 85.7%; top: 25.4%; }
.arcade-map-k1 { left: 53.3%; top: 52.2%; }
.arcade-map-k2 { left: 64.3%; top: 43.3%; }
.arcade-map-k3 { left: 75.5%; top: 39.1%; }
.arcade-map-k4 { left: 87%; top: 48.4%; }
.arcade-map-l3 { left: 53.9%; top: 76.7%; }
.arcade-map-r3 { left: 64.7%; top: 67.5%; }

.panel-header,
.instrument-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.panel-header strong,
.instrument-title strong {
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.controller-list {
  display: grid;
  gap: 6px;
  min-height: 64px;
}

.controller-card {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.controller-card.active {
  border-color: var(--blue);
  outline: 2px solid rgba(72, 200, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(72, 200, 255, 0.16);
}

.controller-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.controller-meta {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.profile-select {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-select select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 9, 23, 0.92);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.profile-select select:focus {
  border-color: var(--green);
}

button {
  font: inherit;
}

.primary-button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  font-weight: 800;
  text-transform: uppercase;
}

.primary-button {
  width: 100%;
  margin-top: 8px;
  border-radius: 8px;
  background: linear-gradient(105deg, #d92931, #8b45d9 52%, #168ec4);
  box-shadow: 0 10px 30px rgba(123, 47, 190, 0.22);
}

.app-version {
  margin-top: 7px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 9px;
  text-align: right;
}

.legal-mark {
  margin-top: 4px;
  color: rgba(148, 182, 194, 0.72);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 7px;
  line-height: 1.25;
  text-align: right;
}

.demon-warning {
  margin-top: 10px;
  color: rgba(148, 182, 194, 0.64);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 9px;
  line-height: 1.25;
  text-align: right;
}

.visit-counter {
  margin-top: 8px;
  color: rgba(148, 182, 194, 0.64);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 8px;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
}

.visit-counter b {
  margin-left: 4px;
  color: var(--cyan-soft);
  font-weight: 600;
}

.side-tool-kicker {
  margin-top: 9px;
  color: rgba(148, 182, 194, 0.6);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 7px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
}

.side-tool-link {
  display: block;
  margin-top: 3px;
  color: rgba(126, 226, 255, 0.78);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-align: right;
  text-decoration: none;
  text-transform: uppercase;
}

.side-tool-link:hover,
.side-tool-link:focus-visible {
  color: var(--ink);
  outline: none;
  text-shadow: 0 0 12px rgba(72, 200, 255, 0.42);
}

.input-note {
  margin: 9px 0 0;
  white-space: pre-line;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 9px;
  line-height: 1.35;
}

.primary-button:hover {
  filter: brightness(1.12);
}

.main-panel {
  min-height: 0;
}

.empty-state {
  min-height: 320px;
  display: grid;
  grid-template-rows: 112px minmax(58px, auto) minmax(50px, auto);
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  transition: opacity 360ms ease, transform 360ms ease;
}

.empty-state h2 {
  align-self: center;
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 48px);
  text-transform: uppercase;
}

.empty-state p {
  align-self: start;
  min-height: 50px;
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
  transition: opacity 180ms ease;
}

.empty-state p.lock-copy-hidden {
  opacity: 0;
  visibility: hidden;
}

.signal-scanner {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
}

.signal-scanner::before {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  content: "";
  background: conic-gradient(
    from 0deg,
    #ff4638,
    #f7f1df 23%,
    #48c8ff 48%,
    #a970ff 73%,
    #ff4638
  );
  -webkit-mask: radial-gradient(circle, transparent 0 42px, black 43px 100%);
  mask: radial-gradient(circle, transparent 0 42px, black 43px 100%);
  animation: loaderOrbit 5.4s linear infinite;
  will-change: transform;
}

.signal-scanner::after {
  position: absolute;
  inset: 31px;
  display: block;
  border-radius: 50%;
  content: "";
  background: var(--blue);
  opacity: 0;
  transform: scale(0.4);
}

.empty-state.locking .signal-scanner::before {
  animation: lockOrbit 1120ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.empty-state.locking .signal-scanner::after {
  animation: lockCorePulse 1120ms ease-out forwards;
}

.lock-check {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 29px;
  height: 16px;
  border-bottom: 5px solid #fff;
  border-left: 5px solid #fff;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.72));
  transform: translate(-50%, -62%) rotate(-45deg) scale(0.72);
  transform-origin: center;
}

.empty-state.locking .lock-check {
  animation: lockCheckReveal 1120ms ease-out forwards;
}

.empty-state.lock-confirmed .signal-scanner::before {
  background: var(--blue);
  -webkit-mask: radial-gradient(circle, transparent 0 42px, black 43px 100%);
  mask: radial-gradient(circle, transparent 0 42px, black 43px 100%);
  filter: brightness(1.65);
}

.empty-state.lock-confirmed .signal-scanner::after {
  opacity: 0;
  box-shadow: none;
  transition: opacity 120ms ease-out;
}

.empty-state.locking h2 {
  color: var(--cyan-soft);
  letter-spacing: 0.08em;
}

.empty-state.lock-confirmed {
  opacity: 0;
  transform: none;
}

.telemetry {
  display: grid;
  gap: 8px;
}

.telemetry.telemetry-enter {
  animation: telemetryFadeIn 520ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.hidden {
  display: none;
}

.about-panel {
  position: relative;
  width: min(820px, 100%);
  max-height: min(820px, calc(100vh - 24px));
  overflow-y: auto;
  border: 1px solid rgba(168, 233, 255, 0.48);
  border-radius: 18px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.09), transparent 28%),
    rgba(7, 7, 18, 0.97);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 42px rgba(72, 200, 255, 0.1);
}

.about-page {
  min-height: 100vh;
}

.about-page-shell {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: clamp(12px, 3vw, 34px) 0 48px;
}

.about-page-nav {
  display: flex;
  gap: 10px;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 12px;
}

.about-page-actions {
  display: flex;
  gap: 8px;
}

.about-page .about-panel {
  width: 100%;
  max-height: none;
  overflow: visible;
}

.about-page .about-header {
  position: static;
}

.about-back-link {
  min-width: 120px;
}

@media (max-width: 620px) {
  .about-page-nav,
  .about-page-actions {
    display: grid;
  }

  .about-page-nav {
    grid-template-columns: 1fr;
  }

  .about-page-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.about-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 18, 0.94);
  backdrop-filter: blur(14px);
}

.about-header h1,
.about-header h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1;
  text-transform: uppercase;
}

.about-content {
  padding: clamp(18px, 3vw, 30px);
}

.about-content > p {
  max-width: 720px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.65;
}

.about-content > p:first-child {
  color: var(--ink);
  font-weight: 700;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0;
}

.about-feature-grid section {
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
    var(--panel);
}

.about-index {
  color: var(--blue);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
}

.about-feature-grid h2,
.about-feature-grid h3 {
  margin: 28px 0 10px;
  font-size: 15px;
  text-transform: uppercase;
}

.about-feature-grid p,
.about-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.about-note {
  padding: 16px;
  border: 1px solid rgba(255, 79, 216, 0.38);
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(255, 79, 216, 0.09), rgba(72, 200, 255, 0.06));
}

.about-note strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.about-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(72, 200, 255, 0.08);
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.about-download {
  display: block;
  margin-top: 14px;
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration-color: rgba(72, 200, 255, 0.5);
  text-underline-offset: 3px;
}

.about-download:hover,
.about-download:focus-visible {
  color: var(--ink);
  outline: none;
  text-decoration-color: var(--blue);
}

.about-link:hover,
.about-link:focus-visible {
  border-color: var(--blue);
  color: var(--ink);
  outline: none;
}

.brick-collapse-scene {
  position: fixed;
  inset: 0;
  z-index: 1200;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  opacity: 1;
  transition: opacity 900ms ease;
}

.brick-collapse-piece {
  position: fixed !important;
  z-index: 1;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  transform-origin: center;
  will-change: transform;
}

body.brick-collapse-active {
  overflow: hidden;
}

body.brick-collapse-active .app-shell {
  visibility: hidden;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr 0.4fr 0.7fr 0.8fr 0.65fr;
  gap: 6px;
}

.metric {
  min-height: 50px;
  padding: 8px;
  border-radius: 10px;
  background: var(--panel-strong);
}

.metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.2;
}

.visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(235px, 1.02fr) minmax(0, 0.72fr) minmax(300px, 1.26fr);
  gap: 8px;
  align-items: stretch;
}

.stick-instrument {
  grid-column: auto;
}

.instrument {
  padding: 8px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 36%),
    rgba(10, 9, 23, 0.74);
}

.stick-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.stick-module {
  display: grid;
  place-items: center;
  gap: 5px;
}

.stick {
  position: relative;
  width: min(118px, 100%);
  aspect-ratio: 1;
  border: 1px solid rgba(238, 244, 247, 0.24);
  border-radius: 50%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 0 18%, rgba(72, 200, 255, 0.12) 19% 58%, rgba(103, 207, 255, 0.1) 59% 100%);
  background-size: 100% 50%, 50% 100%, auto;
}

.stick span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(72, 200, 255, 0.48);
  transform: translate(-50%, -50%);
}

.stick-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
}

.stick-readout b {
  color: var(--ink);
}

.drift-details {
  height: 38px;
  overflow: auto;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.35;
}

[data-tone="ok"] {
  color: var(--green);
}

[data-tone="warn"] {
  color: var(--cyan-soft);
}

[data-tone="bad"] {
  color: #ff786d;
}

.dpad-module {
  width: 140px;
  height: 140px;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  place-items: center;
  contain: layout paint;
}

.dpad-svg {
  width: 140px;
  height: 140px;
  overflow: visible;
}

.dpad-svg .dpad-key {
  stroke-width: 1;
  shape-rendering: geometricPrecision;
}

.dpad-svg .dpad-center {
  stroke: rgba(23, 200, 255, 0.45);
  stroke-width: 1;
}

.dpad-svg text {
  fill: var(--ink);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
}

.readout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 8px;
}

.buttons-instrument {
  display: flex;
  flex-direction: column;
  grid-row: span 3;
}

.button-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  grid-auto-rows: minmax(72px, 1fr);
  gap: 5px;
  align-content: stretch;
}

.button-grid.four-column-layout {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.button-tile {
  min-height: 46px;
  padding: 6px;
  border: 1px solid rgba(238, 244, 247, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  contain: layout paint;
}

.button-spacer {
  visibility: hidden;
  pointer-events: none;
}

.button-tile.pressed {
  border-color: var(--green);
  background: rgba(72, 200, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(168, 233, 255, 0.2);
}

.button-tile.touched {
  border-color: var(--cyan-soft);
}

.button-tile strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  min-width: 0;
}

.button-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-tile small {
  color: var(--muted);
  font-size: 9px;
}

.value-bar {
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.value-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--violet), var(--blue), var(--gold));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.axis-bars {
  display: grid;
  gap: 5px;
}

.axis-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 58px;
  gap: 7px;
  align-items: center;
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 10px;
}

.axis-track {
  position: relative;
  overflow: hidden;
  height: 7px;
  background: rgba(255, 255, 255, 0.11);
}

.axis-track::before {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 1px;
  height: 15px;
  content: "";
  background: rgba(255, 255, 255, 0.32);
}

.axis-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--blue);
}

.latency-instrument {
  display: grid;
  gap: 7px;
}

.latency-signal {
  display: grid;
  min-height: 36px;
  place-items: center;
  border: 1px solid rgba(115, 215, 238, 0.24);
  border-radius: 8px;
  background: rgba(72, 200, 255, 0.08);
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", "Noto Sans JP", "Noto Sans KR", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.feedback-panel {
  overflow: visible;
}

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
}

.feedback-compose,
.feedback-board {
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
    rgba(7, 7, 18, 0.7);
  padding: 16px;
}

.feedback-compose h2,
.feedback-board h2 {
  margin: 0 0 8px;
  font-size: 15px;
  text-transform: uppercase;
}

.feedback-compose p,
.feedback-board-header p,
.feedback-empty {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.feedback-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feedback-form label {
  display: grid;
  gap: 5px;
}

.feedback-form span,
.feedback-form small {
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea,
.feedback-admin input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 7, 18, 0.82);
  color: var(--ink);
  font: 600 12px "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
}

.feedback-form input,
.feedback-form select,
.feedback-admin input {
  min-height: 38px;
  padding: 0 10px;
}

.feedback-form textarea {
  min-height: 156px;
  resize: vertical;
  padding: 10px;
  line-height: 1.5;
}

.feedback-wide,
.feedback-submit,
.feedback-status {
  grid-column: 1 / -1;
}

.feedback-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 11px;
}

.feedback-status[data-kind="ok"] {
  color: var(--cyan-soft);
}

.feedback-status[data-kind="error"] {
  color: #ff8bcf;
}

.feedback-board-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.feedback-admin {
  min-width: 160px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.feedback-admin summary {
  cursor: pointer;
  color: var(--cyan-soft);
}

.feedback-admin input {
  margin: 8px 0;
}

.feedback-admin .about-button {
  min-height: 34px;
  width: 100%;
}

.feedback-list {
  display: grid;
  gap: 10px;
}

.feedback-card {
  padding: 12px;
  border: 1px solid rgba(72, 200, 255, 0.28);
  border-radius: 10px;
  background: rgba(15, 16, 29, 0.76);
}

.feedback-card header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.feedback-card strong,
.feedback-card time,
.feedback-card span {
  display: block;
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.feedback-card strong {
  color: var(--cyan-soft);
}

.feedback-card span,
.feedback-card time {
  color: var(--muted);
}

.feedback-card p {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.feedback-image {
  display: block;
  width: fit-content;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.feedback-image img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 220px;
  object-fit: cover;
}

.feedback-delete {
  margin-top: 10px;
  border: 1px solid rgba(255, 79, 216, 0.45);
  border-radius: 6px;
  background: rgba(255, 79, 216, 0.08);
  color: #ffb7ea;
  cursor: pointer;
  font: 700 10px "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  letter-spacing: 0.05em;
  padding: 7px 9px;
  text-transform: uppercase;
}

.latency-signal.ready {
  border-color: rgba(72, 200, 255, 0.9);
  background: rgba(72, 200, 255, 0.16);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(72, 200, 255, 0.14);
}

.latency-signal.waiting {
  color: var(--cyan-soft);
}

.latency-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.latency-stats b {
  color: var(--ink);
}

.latency-button {
  min-height: 28px;
  border: 1px solid rgba(72, 200, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(105deg, rgba(255, 70, 56, 0.16), rgba(169, 112, 255, 0.2), rgba(72, 200, 255, 0.16));
  color: var(--green);
  cursor: pointer;
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.ufo-scene {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
}

.ufo-scene.ufo-active {
  opacity: 1;
}

.ufo-craft {
  position: fixed;
  left: var(--ufo-x, 50vw);
  top: var(--ufo-y, 28vh);
  width: 72px;
  height: 34px;
  transform: translate(-120vw, -160px);
  filter: drop-shadow(0 0 12px rgba(109, 231, 255, 0.42));
}

.ufo-scene.ufo-active:not(.ufo-returning) .ufo-craft {
  animation: ufoPass 8.2s cubic-bezier(0.2, 0.72, 0.32, 1) forwards;
}

.ufo-scene.ufo-returning .ufo-craft {
  animation: ufoReturn 3.2s cubic-bezier(0.2, 0.72, 0.32, 1) forwards;
}

.ufo-dome,
.ufo-body,
.ufo-light {
  position: absolute;
  display: block;
}

.ufo-dome {
  left: 24px;
  top: 2px;
  width: 24px;
  height: 16px;
  border: 1px solid rgba(115, 215, 238, 0.75);
  border-bottom: 0;
  border-radius: 18px 18px 4px 4px;
  background: rgba(115, 215, 238, 0.22);
}

.ufo-body {
  left: 4px;
  top: 14px;
  width: 64px;
  height: 16px;
  border: 1px solid rgba(238, 244, 247, 0.7);
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(5, 18, 28, 0.98), rgba(115, 215, 238, 0.38), rgba(5, 18, 28, 0.98));
}

.ufo-light {
  top: 24px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(157, 255, 0, 0.8);
}

.light-left {
  left: 18px;
}

.light-mid {
  left: 34px;
}

.light-right {
  left: 50px;
}

.ufo-beam {
  position: fixed;
  left: var(--ufo-x, 50vw);
  top: calc(var(--ufo-y, 28vh) - 126px);
  width: 118px;
  height: 165px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  background: linear-gradient(rgba(157, 255, 0, 0.38), rgba(23, 200, 255, 0.16), transparent);
  opacity: 0;
}

.ufo-scene.ufo-active:not(.ufo-returning) .ufo-beam {
  animation: ufoBeam 8.2s ease forwards;
}

.ufo-scene.ufo-returning .ufo-beam {
  animation: ufoBeamReturn 3.2s ease forwards;
}

.dpad-instrument.ufo-target-abducting .dpad-module {
  animation: dpadAbduct 8.2s ease forwards;
}

.dpad-instrument.ufo-target-missing .dpad-module {
  opacity: 0;
}

.dpad-instrument.ufo-target-returning .dpad-module {
  animation: dpadReturn 3.2s ease forwards;
}

.ten-scene {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #000;
  opacity: 0;
  visibility: hidden;
}

.ten-scene.ten-active {
  opacity: 1;
  visibility: visible;
}

.ten-scene span {
  color: #ff102a;
  font-family: "Noto Sans JP", "Noto Sans", serif;
  font-size: min(42vw, 360px);
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 22px rgba(255, 16, 42, 0.7), 0 0 72px rgba(255, 16, 42, 0.34);
  transform: scale(0.92);
}

.ten-scene.ten-white span {
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.9), 0 0 72px rgba(168, 233, 255, 0.5);
}

.ten-scene.ten-revealed span {
  animation: tenReveal 4s ease forwards;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderOrbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lockOrbit {
  0% {
    filter: brightness(1);
    transform: rotate(0deg);
  }
  45% {
    filter: brightness(1.7);
    transform: rotate(240deg);
  }
  70% {
    filter: brightness(1.25);
    transform: rotate(330deg);
  }
  100% {
    filter: brightness(2);
    transform: rotate(360deg);
  }
}

@keyframes lockCorePulse {
  0% {
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(72, 200, 255, 0);
  }
  14% {
    opacity: 1;
    box-shadow: 0 0 38px 22px rgba(72, 200, 255, 0.78);
  }
  30% {
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(72, 200, 255, 0);
  }
  46% {
    opacity: 1;
    box-shadow: 0 0 46px 26px rgba(72, 200, 255, 0.84);
  }
  62%,
  100% {
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(72, 200, 255, 0);
  }
}

@keyframes lockCheckReveal {
  0%,
  76% {
    opacity: 0;
    transform: translate(-50%, -62%) rotate(-45deg) scale(0.72);
  }
  90% {
    opacity: 1;
    transform: translate(-50%, -62%) rotate(-45deg) scale(1.14);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -62%) rotate(-45deg) scale(1);
  }
}

@keyframes telemetryFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ufoPass {
  0% {
    transform: translate(-220px, -146px) rotate(-8deg);
    opacity: 1;
  }
  18% {
    transform: translate(-86px, -154px) rotate(5deg);
    opacity: 1;
  }
  34% {
    transform: translate(-12px, -132px) rotate(-4deg);
    opacity: 1;
  }
  50% {
    transform: translate(-68px, -166px) rotate(6deg);
    opacity: 1;
  }
  64%,
  88% {
    transform: translate(-50%, -146px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(220px, -146px) rotate(8deg);
    opacity: 0;
  }
}

@keyframes ufoReturn {
  0% {
    transform: translate(120vw, -168px) rotate(8deg);
    opacity: 0;
  }
  22%,
  78% {
    transform: translate(-50%, -146px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(-120vw, -168px) rotate(-8deg);
    opacity: 0;
  }
}

@keyframes ufoBeam {
  0%,
  58%,
  88%,
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
  }
  66%,
  80% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes ufoBeamReturn {
  0%,
  24%,
  82%,
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
  }
  34%,
  70% {
    opacity: 0.84;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes dpadAbduct {
  0%,
  68% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  86%,
  100% {
    opacity: 0;
    transform: translateY(-88px) scale(0.42);
  }
}

@keyframes dpadReturn {
  0%,
  28% {
    opacity: 0;
    transform: translateY(-88px) scale(0.42);
  }
  76%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tenReveal {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  18%,
  82% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

@media (max-width: 860px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .visual-grid {
    grid-template-columns: minmax(205px, 0.7fr) minmax(165px, 0.55fr);
  }

  .stick-instrument {
    grid-column: 1 / -1;
  }

  .readout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar,
  .console-layout,
  .visual-grid,
  .metrics-grid,
  .readout-grid {
    grid-template-columns: 1fr;
  }

  .connection-panel {
    position: static;
  }

  .topbar-title {
    order: -1;
  }

  .status-stack {
    grid-template-columns: 70px 86px repeat(3, minmax(0, 1fr));
  }

  .buttons-instrument {
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 8px;
  }

  .topbar {
    gap: 8px;
  }

  .status-stack {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .status-card {
    grid-column: span 1;
  }

  .about-feature-grid {
    grid-template-columns: 1fr;
  }

  .feedback-layout {
    grid-template-columns: 1fr;
  }

  .feedback-form {
    grid-template-columns: 1fr;
  }

  .feedback-board-header {
    display: grid;
  }

  .about-feature-grid section {
    min-height: 0;
  }

  .about-feature-grid h3 {
    margin-top: 16px;
  }

  .enth-logo {
    width: 110px;
  }

  h1 {
    font-size: 28px;
  }

  .tagline,
  .eyebrow {
    font-size: 9px;
  }

  .stick-row {
    grid-template-columns: 1fr;
  }

  .button-grid,
  .button-grid.four-column-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dpad-module {
    width: 138px;
    height: 138px;
  }

  .axis-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .axis-row output {
    grid-column: 2;
  }
}

@media (max-width: 420px) {
  body {
    background-attachment: scroll;
  }

  .panel,
  .instrument,
  .metric {
    padding: 7px;
  }

  .button-grid,
  .button-grid.four-column-layout {
    grid-template-columns: 1fr;
  }

  .latency-stats {
    grid-template-columns: 1fr;
  }
}

/* Fightpad Stats dashboard */
.legacy-interface {
  display: none !important;
}

.secondary-button,
.danger-button {
  width: 100%;
  min-height: 30px;
  margin-top: 6px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.secondary-button {
  border: 1px solid rgba(103, 207, 255, 0.45);
  background: rgba(26, 46, 67, 0.72);
  color: var(--cyan-soft);
}

.danger-button {
  border: 1px solid rgba(255, 70, 56, 0.34);
  background: rgba(70, 18, 35, 0.56);
  color: #ffaaa3;
}

.secondary-button:hover,
.secondary-button:focus-visible,
.danger-button:hover,
.danger-button:focus-visible {
  border-color: var(--blue);
  color: white;
  outline: none;
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: var(--red);
}

.stats-dashboard {
  display: grid;
  gap: 10px;
}

.stats-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid rgba(103, 207, 255, 0.3);
  border-radius: 14px;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 79, 216, 0.16), transparent 30%),
    linear-gradient(120deg, rgba(72, 200, 255, 0.12), transparent 48%),
    rgba(10, 10, 25, 0.78);
}

.stats-kicker {
  margin: 0 0 4px;
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stats-hero h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 0.95;
  text-transform: uppercase;
}

.stats-hero p:last-child {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tracking-badge {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(103, 207, 255, 0.32);
  border-radius: 999px;
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.tracking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 70, 56, 0.74);
}

.tracking-dot.active {
  background: var(--green);
  box-shadow: 0 0 13px rgba(103, 232, 255, 0.9);
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stats-kpi {
  min-height: 102px;
  padding: 12px;
  border: 1px solid rgba(103, 207, 255, 0.3);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 42%),
    rgba(13, 14, 29, 0.83);
}

.stats-kpi span,
.session-readout-grid span {
  display: block;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-kpi strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1;
}

.stats-kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
}

.stats-kpi-time strong,
.stats-kpi-move strong {
  color: var(--green);
}

.stats-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 10px;
}

.stats-section-grid-bottom {
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}

.stats-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(103, 207, 255, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 36%),
    rgba(10, 11, 23, 0.82);
}

.stats-card-heading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stats-card-heading h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
  text-transform: uppercase;
}

.stats-card-heading > strong {
  color: var(--green);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 18px;
  white-space: nowrap;
}

.stats-card-note {
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 8px;
  text-align: right;
  text-transform: uppercase;
}

.session-card {
  background:
    radial-gradient(circle at 100% 0, rgba(72, 200, 255, 0.12), transparent 38%),
    rgba(10, 11, 23, 0.82);
}

.session-readout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.session-readout-grid > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(103, 207, 255, 0.15);
  border-radius: 8px;
  background: rgba(16, 25, 39, 0.56);
}

.session-readout-grid b {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--ink);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-strip {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  margin-top: 10px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(103, 207, 255, 0.14);
  border-radius: 8px;
  background: rgba(6, 8, 18, 0.66);
}

.activity-event {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 32px;
  height: 25px;
  padding: 0 7px;
  border: 1px solid rgba(103, 232, 255, 0.34);
  border-radius: 5px;
  background: rgba(41, 91, 110, 0.38);
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
}

.activity-event.move {
  border-color: rgba(255, 79, 216, 0.5);
  background: rgba(126, 40, 112, 0.36);
  color: #ffd2f4;
}

.activity-empty,
.stats-empty {
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
}

.usage-list {
  display: grid;
  gap: 8px;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(68px, 0.38fr) minmax(0, 1fr) 50px;
  gap: 8px;
  align-items: center;
}

.usage-label,
.usage-count,
.direction-count,
.move-count,
.history-value {
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
}

.usage-label {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-track,
.direction-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(104, 134, 157, 0.2);
}

.usage-fill,
.direction-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--acid));
  transition: width 220ms ease;
}

.usage-count,
.direction-count {
  color: var(--cyan-soft);
  font-size: 10px;
  text-align: right;
}

.direction-usage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.direction-cell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 35px;
  gap: 7px;
  align-items: center;
}

.direction-label {
  color: var(--ink);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.direction-cell:nth-child(3n) .direction-fill {
  background: linear-gradient(90deg, var(--violet), var(--acid));
}

.move-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.move-row {
  position: relative;
  min-height: 68px;
  padding: 9px;
  border: 1px solid rgba(169, 112, 255, 0.28);
  border-radius: 8px;
  background: rgba(39, 25, 57, 0.42);
}

.move-row.active {
  border-color: var(--acid);
  box-shadow: inset 0 0 0 1px rgba(255, 79, 216, 0.2), 0 0 16px rgba(255, 79, 216, 0.1);
}

.move-name {
  display: block;
  padding-right: 32px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.move-input {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 8px;
}

.move-count {
  position: absolute;
  top: 8px;
  right: 9px;
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
}

.controller-history-list {
  display: grid;
  gap: 6px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(74px, 0.6fr));
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(103, 207, 255, 0.14);
  border-radius: 7px;
  background: rgba(17, 24, 37, 0.48);
}

.history-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-value {
  color: var(--cyan-soft);
  font-size: 9px;
  text-align: right;
}

.history-value small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 8px;
  text-transform: uppercase;
}

.stats-footnote {
  margin: 0 4px 2px;
  color: rgba(169, 179, 199, 0.72);
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 9px;
  text-align: right;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 160px minmax(0, 1fr) 360px;
  }

  .stats-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .stats-hero,
  .stats-section-grid,
  .stats-section-grid-bottom {
    grid-template-columns: 1fr;
  }

  .stats-hero {
    display: grid;
  }

  .tracking-badge {
    justify-self: start;
  }

  .move-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(55px, 0.55fr));
  }
}

@media (max-width: 520px) {
  .stats-kpi-grid,
  .session-readout-grid,
  .direction-usage,
  .move-list {
    grid-template-columns: 1fr;
  }

  .stats-hero {
    padding: 14px;
  }

  .stats-card {
    padding: 11px;
  }

  .history-row {
    grid-template-columns: 1fr 1fr;
  }

  .history-name {
    grid-column: 1 / -1;
  }

  .history-value {
    text-align: left;
  }
}

/* Fightpad Stats dashboard skin. The raw tester surface stays available to
   the controller reader, but the Stats product leads with session analytics. */
body.stats-app {
  --void: #0b0e12;
  --ink: #f3f4ef;
  --muted: #9aa5a7;
  --panel: rgba(18, 23, 27, 0.86);
  --panel-strong: rgba(25, 31, 35, 0.92);
  --line: rgba(180, 195, 188, 0.2);
  --acid: #ff725e;
  --blue: #8ed8be;
  --gold: #f4c56a;
  --green: #b7f36b;
  --cyan-soft: #cde8d7;
  --red: #ff725e;
  --violet: #c4a6ff;
  --stats-line: rgba(180, 195, 188, 0.18);
  background:
    radial-gradient(circle at 16% 0%, rgba(183, 243, 107, 0.1), transparent 30%),
    radial-gradient(circle at 92% 16%, rgba(255, 114, 94, 0.12), transparent 32%),
    linear-gradient(135deg, #0b0e12 0%, #10171a 52%, #0b0e12 100%);
}

body.stats-app::before {
  background-image:
    linear-gradient(90deg, transparent 0 49.7%, rgba(205, 232, 215, 0.035) 50%, transparent 50.3%),
    linear-gradient(rgba(205, 232, 215, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 232, 215, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 42px, 42px 100%;
  opacity: 0.62;
}

body.stats-app .app-shell {
  width: min(1540px, 100%);
  padding: clamp(14px, 2vw, 28px) clamp(14px, 2.6vw, 42px) 34px;
}

body.stats-app .topbar {
  grid-template-columns: 224px minmax(0, 1fr) auto;
  gap: 24px;
  margin-bottom: 18px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--stats-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.stats-app .brand-link {
  width: 166px;
  gap: 7px;
  align-content: center;
  min-height: 74px;
  padding-left: 2px;
}

body.stats-app .enth-logo {
  width: 148px;
  border-color: rgba(183, 243, 107, 0.62);
  border-radius: 4px;
  filter: saturate(0.72);
}

body.stats-app .brand-link span,
body.stats-app .brand-link small {
  color: var(--muted);
  font-size: 9px;
}

body.stats-app .topbar-title {
  position: relative;
  padding-left: 20px;
}

body.stats-app .topbar-title::before {
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(var(--green), var(--acid));
  content: "";
}

body.stats-app .topbar-title h1 {
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.06em;
  text-transform: none;
}

body.stats-app .eyebrow {
  color: var(--green);
  letter-spacing: 0.16em;
}

body.stats-app .tagline {
  color: var(--muted);
}

body.stats-app .signal-dot {
  border-color: rgba(183, 243, 107, 0.38);
  background: var(--acid);
}

body.stats-app .signal-dot.locked {
  background: var(--green);
  box-shadow: 0 0 14px rgba(183, 243, 107, 0.8);
}

body.stats-app .status-stack {
  grid-template-columns: repeat(5, max-content);
  gap: 7px;
  align-items: stretch;
}

body.stats-app .status-card,
body.stats-app .language-card,
body.stats-app .about-button {
  min-height: 44px;
  border-color: var(--stats-line);
  border-radius: 10px;
  background: rgba(18, 23, 27, 0.76);
  box-shadow: none;
}

body.stats-app .status-card strong {
  color: var(--green);
}

body.stats-app .language-card select,
body.stats-app .about-button {
  color: var(--cyan-soft);
}

body.stats-app .about-button:hover,
body.stats-app .about-button:focus-visible {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(183, 243, 107, 0.16);
}

body.stats-app .console-layout {
  grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
  gap: 20px;
}

body.stats-app .connection-panel {
  position: sticky;
  top: 18px;
  padding: 16px;
  border-color: var(--stats-line);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(183, 243, 107, 0.07), transparent 36%),
    rgba(15, 20, 23, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

body.stats-app .connection-panel::before {
  display: block;
  margin-bottom: 14px;
  color: var(--green);
  content: "SESSION SOURCE / 01";
  font: 700 9px/1.2 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
}

body.stats-app .connection-panel .panel-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stats-line);
  color: var(--ink);
  letter-spacing: 0.08em;
}

body.stats-app .controller-card {
  border-color: rgba(180, 195, 188, 0.16);
  border-radius: 11px;
  background: rgba(27, 35, 37, 0.72);
  box-shadow: none;
}

body.stats-app .controller-card.active {
  border-color: var(--green);
  outline: 0;
  box-shadow: inset 3px 0 0 var(--green), 0 0 0 1px rgba(183, 243, 107, 0.12);
}

body.stats-app .profile-select select {
  border-color: var(--stats-line);
  border-radius: 9px;
  background: #11171a;
}

body.stats-app .primary-button {
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: #11170f;
  box-shadow: none;
}

body.stats-app .primary-button:hover,
body.stats-app .primary-button:focus-visible {
  background: #d0ff94;
  box-shadow: 0 8px 22px rgba(183, 243, 107, 0.15);
}

body.stats-app .secondary-button {
  border-color: rgba(142, 216, 190, 0.42);
  border-radius: 9px;
  background: rgba(47, 75, 67, 0.36);
  color: var(--cyan-soft);
}

body.stats-app .danger-button {
  border-radius: 9px;
  background: rgba(102, 39, 39, 0.34);
}

body.stats-app .input-note {
  border-top-color: var(--stats-line);
  color: var(--muted);
}

body.stats-app .main-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.stats-app .stats-dashboard {
  gap: 16px;
}

body.stats-app .stats-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: 24px;
  align-items: stretch;
  overflow: hidden;
  min-height: 188px;
  padding: 28px 30px;
  border: 1px solid rgba(183, 243, 107, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 114, 94, 0.18), transparent 25%),
    linear-gradient(115deg, rgba(183, 243, 107, 0.11), transparent 46%),
    rgba(18, 25, 27, 0.92);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.2);
}

body.stats-app .stats-hero::before {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(var(--green), var(--acid));
  content: "";
}

body.stats-app .stats-hero::after {
  position: absolute;
  right: -34px;
  bottom: -56px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(183, 243, 107, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(183, 243, 107, 0.035), 0 0 0 38px rgba(183, 243, 107, 0.025);
  content: "";
}

body.stats-app .stats-kicker {
  color: var(--green);
  letter-spacing: 0.16em;
}

body.stats-app .stats-hero h2 {
  max-width: 700px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 58px);
  letter-spacing: -0.075em;
  line-height: 0.92;
  text-transform: none;
}

body.stats-app .stats-hero p:last-child {
  max-width: 590px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

body.stats-app .stats-hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 210px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

body.stats-app .hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

body.stats-app .hero-chip {
  padding: 5px 7px;
  border: 1px solid rgba(180, 195, 188, 0.2);
  border-radius: 99px;
  color: var(--muted);
  font: 700 8px/1 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
}

body.stats-app .tracking-badge {
  border-color: rgba(183, 243, 107, 0.34);
  border-radius: 9px;
  background: rgba(183, 243, 107, 0.08);
  color: var(--cyan-soft);
}

body.stats-app .tracking-dot {
  background: var(--acid);
  box-shadow: 0 0 12px rgba(255, 114, 94, 0.7);
}

body.stats-app .tracking-dot.active {
  background: var(--green);
  box-shadow: 0 0 13px rgba(183, 243, 107, 0.84);
}

body.stats-app .hero-controller {
  max-width: 230px;
  overflow: hidden;
  color: var(--ink);
  font: 700 12px/1.25 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.stats-app .stats-kpi-grid {
  gap: 12px;
}

body.stats-app .stats-kpi {
  position: relative;
  min-height: 122px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--stats-line);
  border-radius: 16px;
  background: rgba(18, 23, 27, 0.84);
  box-shadow: none;
}

body.stats-app .stats-kpi::before {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--blue);
  content: "";
}

body.stats-app .stats-kpi:nth-child(2)::before {
  background: var(--gold);
}

body.stats-app .stats-kpi:nth-child(3)::before {
  background: var(--violet);
}

body.stats-app .stats-kpi:nth-child(4)::before {
  background: var(--acid);
}

body.stats-app .stats-kpi span,
body.stats-app .session-readout-grid span {
  color: var(--muted);
  letter-spacing: 0.1em;
}

body.stats-app .stats-kpi strong {
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(24px, 2.7vw, 36px);
  letter-spacing: -0.06em;
}

body.stats-app .stats-kpi-time strong,
body.stats-app .stats-kpi-move strong {
  color: var(--green);
}

body.stats-app .stats-kpi small {
  margin-top: 10px;
  color: var(--muted);
}

body.stats-app .stats-section-grid,
body.stats-app .stats-section-grid-bottom {
  gap: 14px;
}

body.stats-app .stats-card {
  padding: 18px;
  border: 1px solid var(--stats-line);
  border-radius: 17px;
  background: rgba(16, 22, 25, 0.88);
  box-shadow: none;
}

body.stats-app .stats-card-heading {
  margin-bottom: 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(180, 195, 188, 0.12);
}

body.stats-app .stats-card-heading h3 {
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -0.02em;
  text-transform: none;
}

body.stats-app .stats-card-heading > strong {
  color: var(--green);
}

body.stats-app .stats-card-note {
  color: var(--muted);
}

body.stats-app .session-card {
  background:
    linear-gradient(135deg, rgba(142, 216, 190, 0.08), transparent 43%),
    rgba(16, 22, 25, 0.88);
}

body.stats-app .session-readout-grid > div {
  padding: 11px;
  border-color: rgba(180, 195, 188, 0.14);
  border-radius: 11px;
  background: rgba(28, 38, 38, 0.58);
}

body.stats-app .session-readout-grid b {
  color: var(--ink);
}

body.stats-app .activity-strip {
  min-height: 42px;
  border-color: rgba(183, 243, 107, 0.18);
  border-style: dashed;
  border-radius: 11px;
  background: rgba(7, 12, 13, 0.54);
}

body.stats-app .activity-event {
  border-color: rgba(183, 243, 107, 0.34);
  border-radius: 7px;
  background: rgba(74, 103, 64, 0.36);
  color: var(--cyan-soft);
}

body.stats-app .activity-event.move {
  border-color: rgba(255, 114, 94, 0.52);
  background: rgba(122, 49, 42, 0.34);
  color: #ffd0c8;
}

body.stats-app .usage-list {
  gap: 10px;
}

body.stats-app .usage-row {
  grid-template-columns: minmax(72px, 0.42fr) minmax(0, 1fr) 46px;
}

body.stats-app .usage-track,
body.stats-app .direction-track {
  height: 6px;
  background: rgba(180, 195, 188, 0.15);
}

body.stats-app .usage-fill,
body.stats-app .direction-fill {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

body.stats-app .usage-count,
body.stats-app .direction-count {
  color: var(--green);
}

body.stats-app .move-list {
  gap: 10px;
}

body.stats-app .move-row {
  min-height: 76px;
  padding: 11px;
  border-color: rgba(196, 166, 255, 0.22);
  border-radius: 11px;
  background: rgba(38, 31, 49, 0.44);
}

body.stats-app .move-row.active {
  border-color: var(--acid);
  box-shadow: inset 3px 0 0 var(--acid), 0 0 18px rgba(255, 114, 94, 0.1);
}

body.stats-app .move-name {
  font-size: 10px;
  letter-spacing: 0.02em;
}

body.stats-app .move-count {
  color: var(--green);
}

body.stats-app .history-row {
  padding: 10px 11px;
  border-color: rgba(180, 195, 188, 0.13);
  border-radius: 10px;
  background: rgba(27, 35, 37, 0.44);
}

body.stats-app .history-value {
  color: var(--cyan-soft);
}

body.stats-app .stats-footnote {
  margin-top: 2px;
  color: rgba(154, 165, 167, 0.74);
}

body.stats-app .legacy-interface {
  display: none !important;
}

@media (max-width: 1120px) {
  body.stats-app .topbar {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  body.stats-app .status-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.stats-app .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.stats-app .brand-link {
    min-height: auto;
  }

  body.stats-app .enth-logo {
    width: 132px;
  }

  body.stats-app .status-stack {
    grid-column: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.stats-app .console-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  body.stats-app .main-panel {
    order: 1;
  }

  body.stats-app .connection-panel {
    position: static;
    order: 2;
  }

  body.stats-app .stats-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }

  body.stats-app .stats-hero-meta {
    min-width: 0;
    align-items: flex-start;
  }

  body.stats-app .hero-chip-row {
    justify-content: flex-start;
  }

  body.stats-app .hero-controller {
    max-width: min(100%, 320px);
    text-align: left;
  }
}

@media (max-width: 520px) {
  body.stats-app .app-shell {
    padding-inline: 10px;
  }

  body.stats-app .status-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.stats-app .language-card {
    grid-column: 1 / -1;
  }

  body.stats-app .stats-hero h2 {
    font-size: clamp(32px, 12vw, 48px);
  }

  body.stats-app .stats-card,
  body.stats-app .stats-kpi {
    padding: 14px;
  }
}

/* v1.4.27: monochrome NASA-console skin. Keep the visual language quiet so
   the data and the input history carry the interface. */
body.stats-app {
  --void: #080a0c;
  --ink: #f3f4f0;
  --muted: #9da3a5;
  --panel: #111417;
  --panel-strong: #181c1f;
  --line: #343a3e;
  --acid: #e1e3df;
  --blue: #b8bec0;
  --gold: #d6d2c9;
  --green: #f3f4f0;
  --cyan-soft: #d5d9d8;
  --red: #aeb4b5;
  --violet: #92999c;
  --stats-line: #30363a;
  background: #080a0c;
}

body.stats-app::before {
  background: none;
  opacity: 0;
}

body.stats-app .topbar {
  border-bottom-color: #30363a;
}

body.stats-app .topbar-title::before,
body.stats-app .stats-hero::before {
  background: #f3f4f0;
}

body.stats-app .topbar-title h1,
body.stats-app .stats-hero h2 {
  letter-spacing: -0.045em;
}

body.stats-app .status-card,
body.stats-app .language-card,
body.stats-app .about-button,
body.stats-app .connection-panel,
body.stats-app .stats-hero,
body.stats-app .stats-kpi,
body.stats-app .stats-card,
body.stats-app .controller-card,
body.stats-app .session-readout-grid > div,
body.stats-app .history-row,
body.stats-app .move-row {
  border-color: #30363a;
  background: #111417;
  box-shadow: none;
}

body.stats-app .connection-panel {
  background: #0e1113;
}

body.stats-app .stats-hero {
  min-height: 168px;
  border-radius: 6px;
  background: #15191c;
}

body.stats-app .stats-hero::after {
  display: none;
}

body.stats-app .stats-hero h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 0.98;
}

body.stats-app .stats-hero-meta {
  justify-content: flex-end;
}

body.stats-app .hero-chip-row {
  display: none;
}

body.stats-app .tracking-badge {
  border-color: #565d60;
  border-radius: 4px;
  background: #0b0d0f;
  color: var(--ink);
}

body.stats-app .tracking-dot,
body.stats-app .tracking-dot.active,
body.stats-app .signal-dot,
body.stats-app .signal-dot.locked {
  background: var(--ink);
  box-shadow: none;
}

body.stats-app .stats-kpi {
  min-height: 108px;
  border-radius: 5px;
  background: #111417;
}

body.stats-app .stats-kpi::before,
body.stats-app .stats-kpi:nth-child(2)::before,
body.stats-app .stats-kpi:nth-child(3)::before,
body.stats-app .stats-kpi:nth-child(4)::before {
  height: 2px;
  background: #e6e8e4;
}

body.stats-app .stats-kpi strong,
body.stats-app .stats-kpi-time strong,
body.stats-app .stats-kpi-move strong,
body.stats-app .stats-card-heading > strong,
body.stats-app .move-count,
body.stats-app .usage-count,
body.stats-app .direction-count {
  color: var(--ink);
}

body.stats-app .stats-card {
  border-radius: 6px;
  background: #111417;
}

body.stats-app .stats-card-heading {
  border-bottom-color: #2a3033;
}

body.stats-app .stats-card-heading h3,
body.stats-app .move-name,
body.stats-app .history-name,
body.stats-app .usage-label,
body.stats-app .direction-label {
  color: var(--ink);
}

body.stats-app .session-card {
  background: #111417;
}

body.stats-app .session-readout-grid > div {
  border-radius: 4px;
  background: #181c1f;
}

body.stats-app .activity-strip {
  align-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  min-height: 88px;
  max-height: 136px;
  padding: 9px;
  border-color: #3a4044;
  border-radius: 4px;
  background: #0a0c0e;
  overflow-y: auto;
  scrollbar-color: #656b6e #111417;
}

body.stats-app .activity-event {
  min-width: 40px;
  height: 25px;
  border-color: #4b5256;
  border-radius: 3px;
  background: #1c2124;
  color: var(--ink);
}

body.stats-app .activity-event.move {
  border-color: #cdd1ce;
  background: #e5e7e3;
  color: #0b0d0f;
}

body.stats-app .usage-track,
body.stats-app .direction-track {
  background: #2a3033;
}

body.stats-app .usage-fill,
body.stats-app .direction-fill {
  background: #e1e3df;
}

body.stats-app .move-row {
  border-radius: 4px;
  background: #181c1f;
}

body.stats-app .move-row.active {
  border-color: #e5e7e3;
  box-shadow: inset 3px 0 0 #e5e7e3;
}

body.stats-app .history-row {
  border-radius: 4px;
  background: #181c1f;
}

body.stats-app .history-value {
  color: var(--cyan-soft);
}

body.stats-app .primary-button {
  border-radius: 4px;
  background: #f1f2ee;
  color: #0a0c0e;
}

body.stats-app .primary-button:hover,
body.stats-app .primary-button:focus-visible {
  background: #ffffff;
  box-shadow: none;
}

body.stats-app .secondary-button,
body.stats-app .danger-button {
  border-color: #4a5155;
  border-radius: 4px;
  background: #181c1f;
  color: var(--ink);
}

body.stats-app .danger-button:hover,
body.stats-app .danger-button:focus-visible,
body.stats-app .secondary-button:hover,
body.stats-app .secondary-button:focus-visible {
  border-color: #e5e7e3;
  color: #ffffff;
}

body.stats-app .profile-select select {
  border-color: #4a5155;
  border-radius: 4px;
  background: #0b0d0f;
  color: var(--ink);
}

body.stats-app .side-tool-link,
body.stats-app .side-tool-link:hover,
body.stats-app .side-tool-link:focus-visible,
body.stats-app .app-version {
  color: var(--ink);
}

body.stats-app .enth-logo {
  border-color: #4b5256;
  filter: grayscale(1) contrast(1.12);
}

body.stats-app .eyebrow,
body.stats-app .stats-kicker,
body.stats-app .side-tool-kicker,
body.stats-app .stats-card-note,
body.stats-app .live-mini,
body.stats-app .status-card strong,
body.stats-app .language-card select,
body.stats-app .about-button {
  color: var(--muted);
}

body.stats-app .signal-dot,
body.stats-app .signal-dot.locked,
body.stats-app .topbar-title::before,
body.stats-app .tracking-dot,
body.stats-app .tracking-dot.active {
  background: var(--ink);
  box-shadow: none;
}

body.stats-app .connection-panel::before {
  background: none;
  color: var(--muted);
}

body.stats-app .status-card,
body.stats-app .language-card,
body.stats-app .about-button,
body.stats-app .controller-card,
body.stats-app .stats-kpi,
body.stats-app .stats-card,
body.stats-app .history-row,
body.stats-app .move-row,
body.stats-app .primary-button,
body.stats-app .secondary-button,
body.stats-app .danger-button,
body.stats-app .profile-select select {
  border-radius: 4px;
}

body.stats-app .activity-strip {
  max-height: 180px;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

body.stats-app .activity-strip::-webkit-scrollbar {
  display: none;
}

body.stats-app .stats-empty,
body.stats-app .activity-empty,
body.stats-app .stats-footnote,
body.stats-app .stats-hero p:last-child,
body.stats-app .move-input,
body.stats-app .input-note {
  color: var(--muted);
}

@media (max-width: 520px) {
  body.stats-app .stats-hero {
    padding: 20px;
  }

  body.stats-app .activity-strip {
    max-height: 160px;
  }
}

/* v1.4.27: analytics hierarchy — motions first, then the live session and
   full input rankings. */
body.stats-app .stats-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

body.stats-app .stats-kpi {
  min-height: 102px;
  padding: 14px;
}

body.stats-app .stats-kpi-ratio strong {
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: -0.04em;
  white-space: nowrap;
}

body.stats-app .stats-kpi-ratio small {
  white-space: nowrap;
}

body.stats-app .stats-kpi:nth-child(5)::before {
  height: 2px;
  background: #e6e8e4;
}

body.stats-app .stats-hero {
  display: block;
  min-height: 0;
}

body.stats-app .stats-hero > div {
  max-width: 760px;
}

body.stats-app .topbar-title h1 {
  font-size: clamp(28px, 3.5vw, 42px);
}

body.stats-app .topbar-title .tagline {
  max-width: 680px;
}

body.stats-app .moves-card-priority .move-list {
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}

body.stats-app .session-card-wide .session-readout-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.stats-app .session-heading-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

body.stats-app .session-heading-meta .tracking-badge {
  flex: 0 0 auto;
}

body.stats-app .session-controller {
  overflow: hidden;
  color: var(--ink);
  font: 700 11px/1.2 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.stats-app .session-duration {
  flex: 0 0 auto;
  color: var(--ink);
  font: 700 18px/1 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  white-space: nowrap;
}

body.stats-app .commands-card .usage-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  column-gap: 18px;
}

body.stats-app .directions-card .direction-usage {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
}

body.stats-app .directions-card .direction-cell {
  grid-template-columns: 64px minmax(0, 1fr) 38px;
}

@media (max-width: 900px) {
  body.stats-app .session-card-wide .session-readout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.stats-app .directions-card .direction-usage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.stats-app .session-heading-meta {
    gap: 8px;
  }
}

@media (max-width: 620px) {
  body.stats-app .stats-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.stats-app .commands-card .usage-list,
  body.stats-app .directions-card .direction-usage {
    grid-template-columns: 1fr;
  }

  body.stats-app .session-card-wide .stats-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  body.stats-app .session-heading-meta {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  body.stats-app .session-controller {
    max-width: 100%;
    text-align: left;
  }
}

/* Compact global-status controls after removing the secondary page links. */
body.stats-app .status-stack {
  grid-template-columns: 136px 92px;
  gap: 6px;
  justify-content: end;
}

body.stats-app .status-card,
body.stats-app .language-card {
  min-height: 34px;
  padding: 5px 8px;
}

body.stats-app .status-card span,
body.stats-app .language-card span {
  font-size: 8px;
}

body.stats-app .status-card strong {
  margin-top: 1px;
  font-size: 12px;
}

body.stats-app .language-card select {
  margin-top: 1px;
  font-size: 12px;
}

@media (max-width: 620px) {
  body.stats-app .status-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep the dashboard monochrome; use light blue only for live activation. */
body.stats-app {
  --activation: #9edcff;
  --activation-ink: #07131b;
}

body.stats-app .signal-dot.locked,
body.stats-app .tracking-dot.active {
  border-color: var(--activation);
  background: var(--activation);
}

body.stats-app .controller-card.active {
  border-color: var(--activation);
  box-shadow: inset 3px 0 0 var(--activation);
}

body.stats-app .move-row.active {
  border-color: var(--activation);
  box-shadow: inset 3px 0 0 var(--activation);
}

body.stats-app .activity-event.move {
  border-color: var(--activation);
  background: var(--activation);
  color: var(--activation-ink);
}

/* Keep all operational controls together and reduce the side rail to setup. */
body.stats-app .status-stack {
  grid-template-columns: 82px 100px 118px 136px 92px;
}

body.stats-app .top-action {
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

body.stats-app .connection-panel {
  display: flex;
  min-height: 430px;
  flex-direction: column;
}

body.stats-app .connection-panel::before,
body.stats-app .connection-panel .input-note {
  display: none;
}

body.stats-app .connection-panel-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #30363a;
}

body.stats-app .controller-count-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 9px;
  border: 1px solid #3a4044;
  border-radius: 4px;
  background: #181c1f;
}

body.stats-app .controller-count-readout span {
  color: var(--muted);
  font: 700 8px/1 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.stats-app .controller-count-readout strong {
  color: var(--ink);
  font: 700 14px/1 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
}

body.stats-app .connection-panel-footer .app-version,
body.stats-app .connection-panel-footer .legal-mark {
  text-align: right;
}

@media (max-width: 620px) {
  body.stats-app .status-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.stats-app .connection-panel {
    min-height: 0;
  }
}

/* The operational strip never wraps; setup details live at the bottom. */
body.stats-app .status-stack {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

body.stats-app .status-stack > * {
  flex: 0 0 auto;
}

body.stats-app #rescanButton { width: 68px; }
body.stats-app #exportStatsButton { width: 88px; }
body.stats-app #resetStatsButton { width: 106px; }
body.stats-app .status-stack .language-card { width: 136px; }
body.stats-app .status-stack .status-card { width: 92px; }

/* The former controller sidebar is gone: never retain its grid track. */
body.stats-app .console-layout {
  display: block;
  width: 100%;
  min-width: 0;
}

body.stats-app .main-panel {
  width: 100%;
  min-width: 0;
}

/* Motions are the primary reading surface: give each move room and emphasis. */
body.stats-app .moves-card-priority {
  padding: 20px;
}

body.stats-app .moves-card-priority .stats-kicker {
  font-size: 10px;
}

body.stats-app .moves-card-priority .stats-card-heading h3 {
  font-size: 16px;
}

body.stats-app .moves-card-priority .move-row {
  min-height: 84px;
  padding: 13px;
  border-color: #343a3e;
}

body.stats-app .moves-card-priority .move-name {
  padding-right: 38px;
  font-size: 12px;
}

body.stats-app .moves-card-priority .move-input {
  margin-top: 6px;
  font-size: 10px;
}

body.stats-app .moves-card-priority .move-count {
  top: 11px;
  right: 13px;
  font-size: 17px;
}

body.stats-app .moves-card-priority .move-row.active {
  border-color: var(--activation);
}

body.stats-app .session-heading-meta .session-controller {
  display: none;
}

/* Desktop and landscape tablet: read the live dashboard in compact pairs. */
@media (min-width: 920px) {
  body.stats-app .stats-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  body.stats-app .stats-kpi-grid,
  body.stats-app .controller-history-card,
  body.stats-app .stats-footnote,
  body.stats-app .dashboard-system-footer {
    grid-column: 1 / -1;
  }

  body.stats-app .directions-card .direction-usage {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.stats-app .directions-card .direction-cell {
    grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr) 38px;
  }

  body.stats-app .directions-card .direction-label {
    white-space: nowrap;
  }
}

@media (min-width: 1280px) {
  body.stats-app .stats-dashboard {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  }
}

@media (min-width: 920px) and (max-width: 1079px) {
  body.stats-app .session-card-wide .session-readout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.stats-app .dashboard-system-footer {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 176px 90px auto;
  gap: 12px;
  align-items: end;
  margin-top: 4px;
  padding: 12px 0 0;
  border-top: 1px solid #30363a;
}

body.stats-app .dashboard-controller-list {
  display: flex;
  min-height: 0;
  gap: 8px;
}

body.stats-app .dashboard-controller-list .controller-card {
  width: min(100%, 310px);
  padding: 8px 10px;
}

body.stats-app .dashboard-system-footer .profile-select {
  margin-top: 0;
}

body.stats-app .dashboard-system-footer .controller-count-readout {
  min-height: 36px;
}

body.stats-app .dashboard-system-meta {
  display: grid;
  gap: 3px;
  align-self: center;
  color: var(--muted);
  font: 700 8px/1.25 "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 760px) {
  body.stats-app .dashboard-system-footer {
    grid-template-columns: minmax(0, 1fr) 150px 76px;
  }

  body.stats-app .dashboard-system-meta {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 620px) {
  body.stats-app .status-stack {
    gap: 4px;
  }

  body.stats-app #rescanButton { width: 60px; }
  body.stats-app #exportStatsButton { width: 76px; }
  body.stats-app #resetStatsButton { width: 96px; }
  body.stats-app .status-stack .language-card { width: 104px; }
  body.stats-app .status-stack .status-card { width: 58px; }

  body.stats-app .dashboard-system-footer {
    grid-template-columns: 1fr 76px;
  }

  body.stats-app .dashboard-controller-list,
  body.stats-app .dashboard-system-footer .profile-select {
    grid-column: 1 / -1;
  }
}
