:root {
  --bg: #070914;
  --bg-elev: #0c1020;
  --surface: #131a2d;
  --surface-2: #171f35;
  --surface-3: #1b2540;
  --text: #edf0ff;
  --muted: #97a2c7;
  --line: #2b3558;
  --line-strong: #3a4974;
  --primary: #8a5bff;
  --primary-2: #6c43d8;
  --primary-soft: rgba(138, 91, 255, 0.15);
  --success: #2dd4a4;
  --warning: #f3c96b;
  --danger: #ff7777;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
  --glow: 0 0 0 1px rgba(138, 91, 255, 0.2), 0 0 34px rgba(138, 91, 255, 0.14);
  --radius: 18px;
  --sidebar-width: 270px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #1a1f38 0, #0b0f1f 28%, #070914 65%);
  min-height: 100%;
}

body {
  line-height: 1.6;
}

a {
  color: #bca6ff;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #dacdff;
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}

h2 {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

h3 {
  font-size: 1rem;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 1000;
  background: #fff;
  color: #111;
  border-radius: 8px;
  padding: 6px 10px;
}

.skip-link:focus {
  top: 8px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0f1427 0%, #0a0d1a 100%);
  border-right: 1px solid var(--line);
  padding: 20px 14px 14px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-brand {
  padding: 2px 8px 14px;
  border-bottom: 1px solid rgba(138, 91, 255, 0.15);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.02rem;
}

.logo:hover,
.logo:focus-visible {
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.24);
}

.main-nav {
  overflow: auto;
  padding-right: 4px;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  background: rgba(138, 91, 255, 0.08);
  border-color: rgba(138, 91, 255, 0.2);
  text-decoration: none;
}

.main-nav a.active {
  color: #f4f0ff;
  background: linear-gradient(90deg, rgba(138, 91, 255, 0.32), rgba(138, 91, 255, 0.08));
  border-color: rgba(138, 91, 255, 0.44);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 8px 20px rgba(65, 33, 158, 0.3);
}

.nav-icon {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  background: #1e2743;
  border: 1px solid #33436f;
  color: #dcd2ff;
}

.nav-label {
  font-size: 0.94rem;
}

.app-main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  padding: 16px 18px 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(7, 9, 20, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(138, 91, 255, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(2, 4, 10, 0.3);
}

.topbar-title {
  min-width: 0;
}

.topbar-kicker {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-heading {
  margin: 2px 0 0;
  font-size: 1.12rem;
  color: #f4f7ff;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #323d62;
  background: #11172a;
  border-radius: 10px;
  color: #aeb8da;
  padding: 0 10px;
  min-width: 180px;
}

.topbar-search-wrap:focus-within {
  border-color: rgba(138, 91, 255, 0.44);
  box-shadow: 0 0 0 1px rgba(138, 91, 255, 0.2);
}

.topbar-search-icon {
  color: #7384b5;
  font-size: 0.82rem;
  line-height: 1;
}

.topbar-search-input {
  width: 100%;
  min-width: 180px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eef2ff;
  font-size: 0.86rem;
  padding: 9px 0;
}

.topbar-search-input::placeholder {
  color: #7384b5;
}

.is-search-hidden {
  display: none !important;
}

.topbar-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: #7f53ff;
  box-shadow: 0 0 0 5px rgba(127, 83, 255, 0.2);
}

.nav-toggle {
  display: none;
  border: 1px solid #364571;
  background: #141c33;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
}

.container {
  width: 100%;
}

.page-main {
  padding: 18px 0;
  display: grid;
  gap: 14px;
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, #11182c 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero {
  background: radial-gradient(circle at 85% 20%, rgba(138, 91, 255, 0.28), transparent 45%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border-color: rgba(138, 91, 255, 0.34);
}

.eyebrow {
  color: #cfbeff;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.78rem;
  margin: 0;
}

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

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

.summary-card {
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -34px;
  top: -34px;
  background: radial-gradient(circle, rgba(138, 91, 255, 0.34), transparent 70%);
}

.summary-label {
  color: var(--muted);
  margin: 0;
  font-size: 0.85rem;
}

.summary-value {
  font-size: 1.34rem;
  font-weight: 700;
  margin: 2px 0 8px;
}

.tool-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.embed-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
}

.tester-hero {
  display: grid;
  gap: 14px;
}

.tester-hero-copy {
  max-width: 860px;
}

.tester-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tester-app-shell {
  padding: 14px;
}

.tester-app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tester-app-topbar h2 {
  margin-bottom: 4px;
}

.tester-frame-wrap {
  border: 1px solid #314273;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0f1e;
  min-height: 82vh;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.tester-frame {
  width: 100%;
  min-height: 82vh;
  border: 0;
  display: block;
  background: #0a0f1e;
}

.embed-frame-wrap {
  border: 1px solid #314273;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0f1e;
  min-height: 70vh;
}

.embed-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  display: block;
  background: #0a0f1e;
}

.tool-card {
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(138, 91, 255, 0.45);
  box-shadow: var(--glow);
}

.tool-tag {
  display: inline-block;
  background: rgba(138, 91, 255, 0.14);
  border: 1px solid rgba(138, 91, 255, 0.32);
  color: #d6c9ff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.76rem;
  margin-bottom: 8px;
}

.button-row,
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
button,
select,
input,
textarea {
  font: inherit;
}

.button,
button {
  border: 1px solid transparent;
  border-radius: 11px;
  background: linear-gradient(180deg, #9a74ff, #6f46e0);
  color: #fff;
  padding: 9px 14px;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.button:hover,
button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.button-secondary {
  background: #1b2440;
  color: #e5e9ff;
  border-color: #35426d;
}

select,
input,
textarea {
  background: #121a30;
  color: #e6edff;
  border: 1px solid #364571;
  border-radius: 10px;
  padding: 8px 10px;
}

.button:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.small-note {
  color: var(--muted);
  margin: 6px 0;
}

.status-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(138, 91, 255, 0.16);
  border: 1px solid rgba(138, 91, 255, 0.3);
  color: #ddcfff;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.chip {
  background: #1b2646;
  border: 1px solid #334372;
  color: #dce5ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.88rem;
}

.history-list,
.event-log {
  margin: 8px 0 0;
  padding-left: 20px;
  max-height: 220px;
  overflow: auto;
}

.keyboard-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  padding-bottom: 4px;
}

.keyboard {
  width: max(980px, 100%);
  display: grid;
  gap: 8px;
}

.keyboard-row {
  display: grid;
  grid-template-columns: repeat(var(--row-cols), minmax(0, 1fr));
  gap: 6px;
}

.keyboard-key {
  border: 1px solid #3a4a77;
  background: linear-gradient(180deg, #202b4c, #1a2442);
  color: #f0f3ff;
  border-radius: 10px;
  min-height: clamp(32px, 3.8vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  font-size: clamp(0.58rem, 1.05vw, 0.82rem);
  padding: 2px;
  text-align: center;
  font-weight: 600;
  overflow: hidden;
}

.keyboard-key .main {
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.keyboard-key .sub {
  font-size: clamp(0.5rem, 0.9vw, 0.66rem);
  color: #a6b3da;
  line-height: 1;
}

.keyboard-key.active {
  background: linear-gradient(180deg, #6f4adf, #5333bf);
  border-color: #a386ff;
  box-shadow: 0 0 0 1px rgba(163, 134, 255, 0.75);
}

.keyboard-key.toggle-on {
  background: linear-gradient(180deg, #7f6040, #6a4e35);
  border-color: #e3b77f;
}

.keyboard-key.unmapped {
  opacity: 0.8;
}

.timer-card {
  text-align: center;
}

.timer-display {
  font-size: clamp(2.2rem, 8vw, 4rem);
  margin: 4px 0 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f7f9ff;
}

.placeholder-box {
  border: 1px dashed #445487;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background: #111a31;
}

.meter-wrap,
.progress-wrap {
  margin-top: 14px;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #314273;
  background: #11192f;
  overflow: hidden;
}

.meter-fill,
.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #7a56f8, #43d2d0, #2dd4a4);
  transition: width 0.12s linear;
}

.spec-card p {
  margin: 0;
  color: #dbe4ff;
  word-break: break-word;
}

.manual-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid {
  display: grid;
  gap: 8px;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
}

.summary-box {
  border: 1px solid #37446d;
  background: #10182f;
  border-radius: 10px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e8ecff;
}

.video-shell {
  background: #0a0f1e;
  border-radius: 12px;
  border: 1px solid #2f3b60;
  padding: 12px;
  min-height: 240px;
  display: grid;
  place-items: center;
}

#cameraPreview {
  width: min(100%, 760px);
  border-radius: 10px;
  background: #0d1325;
  transition: transform 0.2s ease;
}

.trackpad-zone {
  position: relative;
  border: 2px dashed #435285;
  border-radius: 12px;
  min-height: 260px;
  padding: 18px;
  background: #101a33;
  color: #d4deff;
  user-select: none;
}

.trackpad-stats-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
  border: 1px solid #33436f;
  border-radius: 12px;
  background: #10182f;
  padding: 12px;
}

.stat-card h3 {
  margin: 0 0 6px;
  color: #9ba8d2;
  font-size: 0.82rem;
  font-weight: 600;
}

.stat-card p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #eef2ff;
}

.trackpad-zone:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.click-pulse {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(138, 91, 255, 0.3);
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  pointer-events: none;
}

.click-pulse.show {
  animation: pulse 420ms ease-out;
}

@keyframes pulse {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.2);
  }
}

.speedtest-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 360px) 1fr;
  align-items: center;
}

.gauge-wrap {
  position: relative;
  width: min(320px, 88vw);
  aspect-ratio: 1;
  margin: 0 auto;
}

.speed-gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-track,
.gauge-progress {
  fill: none;
  stroke-width: 15;
}

.gauge-track {
  stroke: #2d3d67;
}

.gauge-progress {
  stroke: #8a5bff;
  transition: stroke-dashoffset 0.18s linear;
}

.gauge-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.live-speed-value {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
  line-height: 1;
  font-weight: 700;
}

.live-speed-unit {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.site-footer {
  padding: 8px 0 10px;
  display: grid;
  gap: 12px;
}

.footer-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.footer-card h2 {
  margin-bottom: 8px;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.footer-bottom {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.gamepad-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 380px) 1fr;
}

.hid-top-strip {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #324166;
  border-radius: 12px;
  background: #10182f;
}

.advanced-hid summary {
  cursor: pointer;
  color: #c8d3fb;
  font-weight: 600;
  margin-bottom: 8px;
}

.advanced-hid[open] summary {
  margin-bottom: 10px;
}

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

.hid-inline-grid p {
  margin: 0;
}

.gamepad-side-panel,
.gamepad-main-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.gamepad-meta-grid {
  display: grid;
  gap: 8px;
}

.gamepad-meta-grid p {
  margin: 0;
}

.gamepad-control-grid {
  display: grid;
  gap: 8px;
}

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

.gamepad-axes-grid div > span {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--muted);
  font-weight: 600;
}

.axis-track {
  height: 10px;
  border-radius: 999px;
  border: 1px solid #334372;
  background: #121a30;
  overflow: hidden;
}

.axis-fill {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, #5aa6ff, #8a5bff);
  transition: width 0.08s linear;
}

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

.gamepad-button-list-wrap {
  overflow: auto;
}

.gamepad-button-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 360px;
}

.gamepad-button-table th,
.gamepad-button-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid #2c375e;
  font-size: 0.9rem;
}

.gamepad-button-table th {
  color: var(--muted);
  font-weight: 600;
}

.controller-shell {
  position: relative;
  margin: 6px auto 0;
  width: min(900px, 100%);
  aspect-ratio: 855 / 670;
  background: radial-gradient(circle at 50% 10%, rgba(104, 171, 232, 0.08) 0%, rgba(12, 20, 39, 0.72) 54%, rgba(9, 14, 29, 0.92) 100%);
  border: 1px solid #20375f;
  border-radius: 22px;
  overflow: hidden;
  padding: 0;
}

.controller-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.controller-svg .gp-part .part-shape {
  fill: rgba(106, 201, 255, 0.18);
  stroke: rgba(132, 217, 255, 0.95);
  stroke-width: 2.4;
  opacity: 0;
  transition: fill 0.12s ease, stroke 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.controller-svg .gp-part .btn-label {
  display: none;
}

.controller-svg .gp-part.active .part-shape {
  fill: rgba(106, 201, 255, 0.25);
  stroke: rgba(169, 233, 255, 0.98);
  opacity: 1;
  filter: url(#btnGlow);
}

.controller-svg .touch-hit {
  fill: transparent;
  stroke: transparent;
}

.controller-svg .stick-base .stick-ring {
  fill: none;
  stroke: rgba(99, 181, 232, 0.18);
  stroke-width: 1.6;
}

.controller-svg .stick-thumb {
  fill: rgba(107, 218, 255, 0.95);
  stroke: rgba(178, 242, 255, 0.98);
  stroke-width: 1.8;
  transition: cx 0.05s linear, cy 0.05s linear, fill 0.12s ease;
  filter: url(#btnGlow);
}

.controller-svg .lightbar {
  fill: rgba(79, 126, 255, 0.8);
  stroke: rgba(149, 215, 255, 0.5);
  stroke-width: 1.6;
  transition: fill 0.18s ease;
}

.controller-svg .tp-dot {
  fill: #72f89b;
  filter: url(#btnGlow);
  transition: opacity 0.08s linear;
}

.controller-svg .tp-dot-2 {
  fill: #9cfbba;
}


.joystick-info-grid {
  display: grid;
  gap: 12px;
}

.joystick-plot-wrap {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(150px, 220px));
  justify-content: center;
}

.joystick-plot {
  position: relative;
  width: min(220px, 38vw);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 2px solid #4a5b92;
  background: #10182f;
  margin: 0 auto;
}

.joystick-cross {
  position: absolute;
  background: #3a4974;
}

.joystick-cross.x {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.joystick-cross.y {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.joystick-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 999px;
  background: #4d6dff;
  box-shadow: 0 0 12px rgba(77, 109, 255, 0.5);
}

.joystick-values {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.touchpanel-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 360px) 1fr;
  align-items: start;
}

.touch-inline-stats {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.touch-dot-onpad {
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
}

.touch-dot-wrap {
  display: flex;
  justify-content: center;
}

.touchpad-surface {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 2px solid #56607f;
  background: linear-gradient(180deg, #f7f9ff, #e9eef8);
  overflow: hidden;
}

.touch-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 999px;
  background: #2f8dcc;
  box-shadow: 0 0 8px rgba(47, 141, 204, 0.45);
  opacity: 0;
}

.touch-dot-secondary {
  background: #6ab7ea;
  box-shadow: 0 0 8px rgba(106, 183, 234, 0.45);
}

.touchpanel-stats p {
  margin: 0 0 7px;
}

.gamepad-kv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.gamepad-kv-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #2e3a60;
  padding-bottom: 6px;
}

.gamepad-kv-list span {
  color: var(--muted);
}

.quick-tests-list {
  display: grid;
  gap: 6px;
}

.quick-test-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  background: #11192f;
  border: 1px solid #2e3b63;
}

.test-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  background: #3f4a62;
  color: #eef2ff;
}

.test-badge.passed {
  background: #20664d;
}

.test-badge.failed {
  background: #7d3a48;
}

.test-badge.unavailable {
  background: #5d5368;
}

@media (max-width: 1240px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .embed-layout,
  .gamepad-layout {
    grid-template-columns: 1fr;
  }

  .gamepad-axes-grid,
  .gamepad-trigger-grid,
  .touchpanel-grid,
  .hid-inline-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
    width: 100%;
  }

  .nav-toggle {
    display: inline-block;
  }

  .speedtest-shell {
    grid-template-columns: 1fr;
  }

  .topbar-search,
  .topbar-dot {
    display: none;
  }

  .tester-app-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .page-main {
    padding-top: 14px;
  }

  .topbar {
    padding: 10px;
  }

  .topbar-heading {
    font-size: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .keyboard-row {
    gap: 4px;
  }

  .keyboard-key {
    min-height: 30px;
  }

  .keyboard {
    width: 980px;
  }
}
