.gamepad-tester-page {
  --tester-navy: #0b1f35;
  --tester-navy-soft: #17344e;
  --tester-red: #e51646;
  --tester-blue: #1688cf;
  --tester-green: #0aaf69;
  --tester-amber: #d98208;
  --tester-bg: #eff9fd;
  --tester-surface: #ffffff;
  --tester-surface-soft: #f4f9fc;
  --tester-border: #cfe0ea;
  --tester-muted: #5b7186;
  background: var(--tester-bg);
  color: var(--tester-navy);
}

.gamepad-tester-page .site-header {
  border-bottom-color: rgba(147, 182, 202, 0.3);
}

.tester-main {
  padding: 34px 0 42px;
  background:
    linear-gradient(rgba(57, 139, 187, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 139, 187, 0.014) 1px, transparent 1px),
    linear-gradient(180deg, #eff9fd 0%, #edf8fe 50%, #eaf7fe 100%);
  background-size: 54px 54px, 54px 54px, auto;
}

.tester-main .section-shell {
  width: min(1405px, calc(100% - 100px));
}

.tester-intro {
  display: grid;
  grid-template-columns: minmax(0, 742px) minmax(0, 610px);
  justify-content: space-between;
  gap: 40px;
  align-items: start;
  margin-bottom: 20px;
}

.tester-intro-copy .back-link {
  margin-bottom: 12px;
}

.tester-intro h1 {
  max-width: 800px;
  margin: 0;
  color: var(--tester-navy);
  font-size: clamp(2.7rem, 3.25vw, 3.05rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.tester-intro-copy > p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #49657b;
  font-size: 1rem;
  line-height: 1.45;
}

.connection-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  min-height: 104px;
  padding: 20px 22px;
  border: 1px solid #c9dfea;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 26px rgba(19, 60, 87, 0.055);
}

.connection-dot {
  width: 26px;
  height: 26px;
  border: 4px solid rgba(91, 113, 134, 0.16);
  border-radius: 50%;
  background: #9bb0bf;
  box-shadow: 0 0 0 6px rgba(91, 113, 134, 0.08);
}

.connection-card[data-connection-state="connected"] .connection-dot {
  border-color: rgba(10, 175, 105, 0.22);
  background: var(--tester-green);
  box-shadow: 0 0 0 6px rgba(10, 175, 105, 0.1);
}

.connection-card > div {
  min-width: 0;
}

.connection-card strong,
.connection-card > div span {
  display: block;
}

.connection-card strong {
  margin-bottom: 4px;
  font-size: 1.08rem;
}

.connection-card > div span {
  overflow: hidden;
  color: var(--tester-muted);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-transport {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 15px;
  border-left: 1px solid var(--tester-border);
  color: #47677d;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.tester-workspace {
  display: grid;
  grid-template-columns: minmax(0, 684px) minmax(0, 692px);
  justify-content: space-between;
  gap: 29px;
  align-items: start;
}

.diagnostic-panel,
.tester-controls,
.tester-notes article {
  border: 1px solid var(--tester-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(19, 60, 87, 0.045);
}

.diagnostic-panel {
  border-radius: 7px;
}

.controller-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: visible;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
}

.panel-heading.compact {
  min-height: 45px;
  padding: 12px 15px 9px;
}

.panel-kicker {
  display: block;
  margin-bottom: 4px;
  color: #537287;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.panel-heading h2 {
  margin: 0;
  color: var(--tester-navy);
  font-size: 1.48rem;
  line-height: 1;
  text-transform: uppercase;
}

.live-indicator,
.deadzone-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #537287;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tester-green);
  box-shadow: 0 0 0 5px rgba(10, 175, 105, 0.1);
}

.deadzone-legend i {
  width: 16px;
  height: 16px;
  border: 1px dashed #7da1b9;
  border-radius: 50%;
}

.deadzone-legend {
  display: none;
}

.controller-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 600px;
  aspect-ratio: auto;
  margin: 0;
  overflow: visible;
  background: transparent;
}

.controller-stage::after {
  content: none;
}

.controller-shoulder-view {
  position: relative;
  width: min(100%, 620px);
  height: 218px;
  flex: 0 0 auto;
  overflow: visible;
}

.controller-shoulder-view > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 15px rgba(6, 31, 47, 0.10));
  user-select: none;
  pointer-events: none;
}

.controller-front-view {
  position: relative;
  display: grid;
  width: 100%;
  height: 380px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
}

.controller-device {
  position: relative;
  width: min(100%, 570px);
  aspect-ratio: 3 / 2;
}

.controller-visual {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.controller-front-view img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 22px 20px rgba(6, 31, 47, 0.13));
  user-select: none;
  pointer-events: none;
}

.controller-shoulder-marker {
  --trigger-strength: 1;
  position: absolute;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 3px;
  border: 2px solid #ffffff;
  color: #ffffff;
  background: rgba(229, 22, 70, calc(0.36 + var(--trigger-strength) * 0.32));
  box-shadow: 0 0 0 4px rgba(229, 22, 70, 0.16), 0 0 18px rgba(229, 22, 70, 0.34);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 80ms ease, transform 80ms ease, background-color 70ms linear, box-shadow 80ms ease;
  pointer-events: none;
}

.controller-shoulder-marker.is-active {
  opacity: 1;
  transform: scale(1);
}

.controller-shoulder-marker b,
.controller-shoulder-marker output {
  display: block;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.controller-shoulder-marker output {
  font-size: 0.7rem;
}

.controller-shoulder-l1 {
  top: 29.7%;
  left: 14%;
  width: 15%;
  height: 18%;
  border-radius: 30px 30px 11px 11px;
}

.controller-shoulder-l2 {
  top: 46.8%;
  left: 14%;
  width: 15%;
  height: 34.5%;
  border-radius: 11px 11px 52px 52px;
}

.controller-shoulder-r1 {
  top: 29.7%;
  right: 14%;
  width: 15%;
  height: 18%;
  border-radius: 30px 30px 11px 11px;
}

.controller-shoulder-r2 {
  top: 46.8%;
  right: 14%;
  width: 15%;
  height: 34.5%;
  border-radius: 11px 11px 52px 52px;
}

.controller-callout {
  position: absolute;
  z-index: 5;
  display: grid;
  min-height: 32px;
  place-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(60, 130, 186, 0.48);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: #183b5b;
  font-size: 0.78rem;
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 7px 20px rgba(25, 72, 103, 0.09);
  pointer-events: none;
}

.controller-callout b,
.controller-callout small {
  display: block;
}

.controller-callout b {
  font-weight: 800;
}

.controller-callout small {
  margin-top: 2px;
  color: #668196;
  font-size: 0.67rem;
  font-weight: 700;
}

.controller-callout.is-active {
  border-color: var(--tester-red);
  background: var(--tester-red);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(229, 22, 70, 0.12), 0 10px 24px rgba(229, 22, 70, 0.2);
}

.controller-callout.is-active small {
  color: rgba(255, 255, 255, 0.8);
}

.controller-callout::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34px;
  border-top: 1px solid rgba(38, 123, 190, 0.65);
}

.controller-callout::before {
  content: none;
  position: absolute;
  border-top: 1px solid rgba(38, 123, 190, 0.65);
}

.callout-l2 { top: -7.5%; left: 5.2%; }
.callout-l1 { top: 2%; left: 5.2%; }
.callout-dpad { top: 26.5%; left: -2%; }
.callout-l2::after,
.callout-l1::after,
.callout-dpad::after { left: 100%; }
.callout-r2 { top: -7.5%; right: 5%; }
.callout-r1 { top: 2%; right: 5%; }
.callout-face { top: 26.5%; right: -4.5%; padding-inline: 6px; font-size: 0.7rem; }
.callout-r2::after,
.callout-r1::after,
.callout-face::after { right: 100%; }
.callout-left-stick { bottom: 14%; left: 16%; }
.callout-ps { bottom: 14%; left: 50%; transform: translateX(-50%); }
.callout-right-stick { right: 16%; bottom: 14%; }
.callout-l2::before {
  content: "";
  top: 50%;
  left: calc(100% + 33px);
  width: 43px;
  transform: rotate(38deg);
  transform-origin: left center;
}

.callout-r2::before {
  content: "";
  top: 50%;
  right: calc(100% + 33px);
  width: 43px;
  transform: rotate(-38deg);
  transform-origin: right center;
}

.callout-left-stick::after {
  top: auto;
  bottom: 100%;
  left: 56%;
  width: 123px;
  transform: rotate(-59deg);
  transform-origin: left center;
}

.callout-right-stick::after {
  top: auto;
  right: 56%;
  bottom: 100%;
  width: 123px;
  transform: rotate(59deg);
  transform-origin: right center;
}

.callout-ps::after {
  top: auto;
  bottom: 100%;
  left: 50%;
  width: 0;
  height: 108px;
  border-top: 0;
  border-left: 1px solid rgba(38, 123, 190, 0.65);
}

.controller-button,
.controller-stick {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  margin-top: 0;
}

.controller-button {
  width: 6.1%;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 50%;
  transition: border-color 90ms ease, background 90ms ease, box-shadow 90ms ease, transform 90ms ease;
}

.controller-button.is-active {
  border-color: #ffffff;
  background: rgba(229, 22, 70, 0.46);
  box-shadow: 0 0 0 4px rgba(229, 22, 70, 0.22), 0 0 22px rgba(229, 22, 70, 0.52);
  transform: scale(1.08);
}

.hotspot-triangle { left: 76.2%; top: 16.2%; }
.hotspot-square { left: 69.7%; top: 26.5%; }
.hotspot-circle { left: 82.85%; top: 26.3%; }
.hotspot-cross { left: 76.4%; top: 36.2%; }
.hotspot-up { left: 17.75%; top: 19.9%; }
.hotspot-left { left: 12.75%; top: 27%; }
.hotspot-right { left: 23.25%; top: 27%; }
.hotspot-down { left: 17.75%; top: 34.7%; }
.hotspot-create,
.hotspot-options {
  top: 13.3%;
  width: 3.2%;
  height: 7.1%;
  aspect-ratio: auto;
  border-radius: 999px;
}
.hotspot-create { left: 26.6%; }
.hotspot-options { left: 70.1%; }
.hotspot-ps { left: 46.8%; top: 45.6%; width: 6.5%; }
.hotspot-touchpad { left: 32.1%; top: 5.2%; width: 35.8%; aspect-ratio: 1.62; border-radius: 20%; }

.controller-stick {
  display: grid;
  place-items: center;
  width: 12.8%;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: none;
  transition: box-shadow 100ms ease, border-color 100ms ease;
}

.controller-stick i {
  width: 28%;
  aspect-ratio: 1;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--tester-blue);
  box-shadow: 0 4px 12px rgba(5, 28, 45, 0.35);
  opacity: 0;
  transform: translate(var(--stick-x, 0), var(--stick-y, 0));
  transition: opacity 80ms ease, background 80ms ease, box-shadow 80ms ease;
  will-change: transform;
}

.controller-stick.is-moving {
  border-color: rgba(38, 147, 215, 0.82);
  box-shadow: 0 0 0 5px rgba(38, 147, 215, 0.14), 0 0 20px rgba(38, 147, 215, 0.28);
}

.controller-stick.is-moving i {
  opacity: 1;
}

.controller-stick.is-active {
  border-color: var(--tester-red);
  box-shadow: 0 0 0 5px rgba(229, 22, 70, 0.17), 0 0 22px rgba(229, 22, 70, 0.35);
}

.controller-stick.is-active i {
  background: var(--tester-red);
  opacity: 1;
}

.callout-l2,
.callout-l1,
.callout-r2,
.callout-r1 {
  min-width: 49px;
}

.callout-dpad {
  min-width: 90px;
}

.callout-face {
  min-width: 96px;
}

.callout-left-stick,
.callout-right-stick {
  min-width: 110px;
}

.controller-stick-left { left: 28.9%; top: 41.5%; }
.controller-stick-right { left: 58.5%; top: 41.5%; }

.shoulder-label {
  display: block;
  width: 12%;
  min-width: 0;
  min-height: 7%;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  transition: background 90ms ease, color 90ms ease, transform 90ms ease;
}

.shoulder-label.is-active {
  border-color: #ffffff;
  background: rgba(229, 22, 70, 0.46);
  box-shadow: 0 0 0 4px rgba(229, 22, 70, 0.2);
  transform: translateY(-2px);
}

.shoulder-l1 { left: 13.5%; top: 4%; }
.shoulder-r1 { right: 13.5%; top: 4%; }

.trigger-readouts {
  display: grid;
  width: min(100%, 620px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 8px auto 0;
  padding: 14px 16px 12px;
  border: 1px solid var(--tester-border);
  border-radius: 8px;
  background: var(--tester-surface-soft);
  box-shadow: 0 8px 22px rgba(19, 60, 87, 0.05);
}

.trigger-readouts > div span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #4f6a7e;
}

.trigger-readouts strong {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  color: var(--tester-navy);
}

.trigger-readouts strong small {
  color: #526d80;
  font-size: 0.68rem;
  font-weight: 700;
}

.trigger-readouts output {
  color: var(--tester-navy);
  font-size: 0.92rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.trigger-readouts i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9f0;
}

.trigger-readouts b {
  display: block;
  width: var(--trigger-value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tester-blue), var(--tester-red));
  transition: width 70ms linear;
}

.trigger-readouts .trigger-peak {
  margin: 7px 0 0;
  color: #526d80;
  font-size: 0.68rem;
  font-weight: 700;
}

.trigger-readouts .trigger-peak output {
  font-size: 0.7rem;
}

.diagnostic-stack {
  position: relative;
  top: 1px;
  display: grid;
  min-width: 0;
  grid-template-rows: 326px auto 232px;
  gap: 12px;
}

.diagnostic-stack > .trigger-readouts {
  width: 100%;
  margin: 0;
  background: var(--tester-surface);
}

.diagnostic-panel {
  min-width: 0;
  overflow: hidden;
}

.stick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: calc(100% - 45px);
  gap: 10px;
  padding: 0 10px 10px;
}

.stick-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(192px, 1.2fr) minmax(100px, 0.8fr);
  grid-template-rows: auto 1fr;
  column-gap: 8px;
  min-width: 0;
  padding: 11px 10px 9px;
  border: 1px solid #d8e6ee;
  border-radius: 7px;
  background: #ffffff;
}

.stick-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  grid-column: 1 / -1;
}

.stick-card header strong {
  font-size: 0.92rem;
  text-transform: uppercase;
}

.stick-plot {
  display: grid;
  align-content: start;
  min-width: 0;
}

.stick-card canvas {
  display: block;
  width: min(100%, 192px);
  height: auto;
  margin: 11px auto 0;
  transform: translateX(-10px);
}

.stick-plot-legend {
  position: absolute;
  right: 70px;
  bottom: 25px;
  left: 16px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 0;
  color: #60798d;
  font-size: 0.69rem;
  font-weight: 700;
  white-space: nowrap;
}

.stick-plot-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stick-plot-legend i {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #082b53;
}

.stick-plot-legend span:last-child i {
  border: 1px dashed #70a0bd;
  background: transparent;
}

.stick-card dl {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 0;
  margin: 19px 0 0;
  width: calc(100% + 10px);
  transform: translateX(-10px);
}

.stick-card dl div {
  min-width: 0;
  padding: 0 9px;
  background: transparent;
}

.stick-card dl div:first-child,
.stick-card dl div:nth-child(2),
.stick-card dl .state-metric {
  background: #eff7fb;
}

.stick-card dl div:first-child {
  padding-top: 4px;
  border-radius: 6px 6px 0 0;
}

.stick-card dl div:nth-child(2) {
  padding-bottom: 4px;
  border-radius: 0 0 6px 6px;
}

.stick-card dl .deadzone-metric {
  padding-top: 7px;
  padding-bottom: 7px;
}

.stick-card dl .drift-metric {
  display: none;
}

.stick-card dl .state-metric {
  margin-top: 13px;
  min-height: 50px;
  padding-top: 5px;
  padding-bottom: 5px;
  border-radius: 6px;
}

.stick-card dl .state-metric dd {
  font-size: 0.82rem;
  line-height: 1.05;
}

.stick-card dt {
  color: #6b8295;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.05;
}

.stick-card dd {
  margin: 2px 0 0;
  color: var(--tester-navy);
  font-size: 0.94rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.stick-card .coverage-metric {
  display: none;
}

.stick-card .state-metric dd[data-state="good"] { color: var(--tester-green); }
.stick-card .state-metric dd[data-state="warning"] { color: var(--tester-amber); }
.stick-card .state-metric dd[data-state="danger"] { color: var(--tester-red); }

.button-count {
  display: none;
  align-items: baseline;
  gap: 2px;
  color: #617a8c;
  font-size: 0.85rem;
}

.button-count span {
  color: var(--tester-red);
  font-size: 1.45rem;
}

.button-test-grid {
  display: grid;
  grid-template-columns: 1.16fr 1.23fr 1fr 0.94fr 1fr;
  gap: 0;
  height: 181px;
  margin: 0 10px 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8e6ee;
  border-radius: 7px;
}

.button-test-grid.has-optional-inputs {
  height: auto;
  min-height: 181px;
}

.button-diagnostics .panel-heading.compact {
  min-height: 40px;
  padding: 9px 15px 6px;
}

.button-group {
  min-width: 0;
  padding: 9px 10px 3px;
  border-left: 1px solid #dce7ed;
}

.button-group:first-child {
  border-left: 0;
}

.button-group h3 {
  min-height: 21px;
  margin: 0 0 3px;
  color: #35536a;
  font-size: 0.66rem;
  line-height: 1.2;
  text-transform: none;
}

.button-group > span {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  min-height: 31px;
  padding: 4px 2px 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #536e82;
  font-size: 0.8rem;
  font-weight: 700;
  transition: border-color 90ms ease, background 90ms ease, color 90ms ease;
}

.button-group > span i,
.dpad-test-cluster span i {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1.5px solid #9ebbd0;
  border-radius: 50%;
  background: #ffffff;
}

.button-group > span .ps-face-icon {
  display: grid;
  place-items: center;
  color: #596571;
  border-color: #aebbc5;
  background: linear-gradient(145deg, #ffffff 10%, #e8edf0 100%);
  box-shadow: inset 0 1px 1px #ffffff, inset 0 -2px 3px rgba(18, 40, 56, 0.15), 0 1px 3px rgba(18, 40, 56, 0.09);
}

.ps-face-icon svg {
  width: 13px;
  height: 13px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.button-group > span em {
  width: 14px;
  color: #173f60;
  font-size: 1rem;
  font-style: normal;
  line-height: 1;
  text-align: center;
}

.button-group > span b {
  display: none;
}

.button-group > span.is-active,
.dpad-test-cluster span.is-active {
  border-color: rgba(229, 22, 70, 0.44);
  background: rgba(229, 22, 70, 0.075);
  color: #9e0d30;
}

.button-group > span.is-active i,
.dpad-test-cluster span.is-active i {
  border-color: var(--tester-red);
  background: var(--tester-red);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(229, 22, 70, 0.1);
}

.button-group > span.was-tested i,
.dpad-test-cluster span.was-tested i {
  border-color: var(--tester-green);
  background: var(--tester-green);
  color: #ffffff;
}

.dpad-test-cluster {
  position: relative;
  top: 11px;
  left: -7px;
  width: 132px;
  height: 110px;
  margin-inline: auto;
}

.dpad-test-cluster span {
  position: absolute;
  display: flex;
  gap: 3px;
  align-items: center;
  border: 0;
  color: #264963;
  transition: border-color 90ms ease, background 90ms ease, color 90ms ease;
}

.dpad-test-cluster span i {
  position: absolute;
  opacity: 0;
}

.dpad-test-cluster span em {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #9ebbd0;
  border-radius: 50%;
  background: #ffffff;
  color: transparent;
  font-size: 0;
  font-style: normal;
}

.dpad-test-cluster span small {
  color: #536e82;
  font-size: 0.66rem;
  font-weight: 700;
}

.dpad-test-cluster span b {
  display: none;
}

.dpad-test-up {
  top: 0;
  left: 50%;
  flex-direction: column;
  transform: translateX(-50%);
}

.dpad-test-left {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.dpad-test-right {
  top: 50%;
  right: 0;
  flex-direction: row-reverse;
  transform: translateY(-50%);
}

.dpad-test-down {
  bottom: 0;
  left: 50%;
  flex-direction: column-reverse;
  transform: translateX(-50%);
}

.dpad-test-cluster span.is-active {
  background: transparent;
}

.dpad-test-cluster span.is-active em {
  border-color: var(--tester-red);
  background: rgba(229, 22, 70, 0.12);
  color: var(--tester-red);
  box-shadow: 0 0 0 4px rgba(229, 22, 70, 0.08);
}

.dpad-test-cluster span.was-tested:not(.is-active) em {
  border-color: var(--tester-green);
  background: rgba(10, 175, 105, 0.12);
}

.tester-controls {
  display: grid;
  grid-template-columns: 524px minmax(0, 1fr) 315px;
  gap: 8px;
  min-height: 112px;
  margin-top: 8px;
  padding: 10px 6px 10px 18px;
  border-radius: 7px;
}

.tester-actions {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 10px 2px;
}

.tester-actions::after {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  bottom: 0;
  border-right: 1px solid #dce7ed;
}

.tester-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 58px;
  padding: 0 22px;
  border: 1px solid #bdd1de;
  border-radius: 6px;
  background: #ffffff;
  color: var(--tester-navy);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease, opacity 150ms ease;
}

.tester-btn:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: #6f9bb6;
}

.tester-btn-primary {
  min-width: 252px;
  border-color: var(--tester-red);
  background: var(--tester-red);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(229, 22, 70, 0.22);
}

.tester-actions .tester-btn:not(.tester-btn-primary) {
  min-width: 174px;
}

.tester-actions > .tester-btn {
  position: relative;
  top: -3px;
  height: 60px;
}

.tester-btn:disabled {
  opacity: 0.46;
}

.test-guidance,
.test-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #d5e4ec;
  border-radius: 6px;
  background: #fafdff;
}

.test-guidance {
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 24px;
}

.guidance-icon,
.result-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #e6f3f9;
  color: var(--tester-blue);
}

.guidance-icon {
  background: transparent;
  color: #103d67;
  font-size: 1.45rem;
}

.result-icon {
  width: 34px;
  background: transparent;
  color: #a9bfce;
  font-size: 0.95rem;
}

.test-result[data-result="idle"] strong {
  color: #60798c;
}

.test-guidance strong,
.test-result strong,
.test-result > div > span {
  display: block;
}

.test-guidance strong,
.test-result strong {
  color: var(--tester-navy);
  font-size: 0.88rem;
}

.test-guidance strong {
  text-transform: uppercase;
}

.test-guidance p,
.test-result p {
  margin: 3px 0 0;
  color: #637c8f;
  font-size: 0.74rem;
  line-height: 1.35;
}

.result-content {
  min-width: 0;
}

.result-actions {
  display: none;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.test-result[data-actions="service"] .result-actions {
  display: flex;
}

.result-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
  padding: 0 11px;
  border: 1px solid #b9cfdd;
  border-radius: 6px;
  background: #ffffff;
  color: #153d59;
  font-size: 0.67rem;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.result-action:hover,
.result-action:focus-visible {
  transform: translateY(-1px);
  border-color: #739bb3;
  box-shadow: 0 6px 14px rgba(20, 61, 89, 0.1);
}

.result-action-primary {
  border-color: var(--tester-red);
  background: var(--tester-red);
  color: #ffffff;
}

.result-action-viber {
  border-color: #7562e6;
  color: #5b48ca;
}

.result-good-link {
  display: none;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 7px;
  color: #42677e;
  font-size: 0.69rem;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.test-result[data-actions="quiet"] .result-good-link {
  display: inline-flex;
}

.result-good-link:hover,
.result-good-link:focus-visible {
  color: var(--tester-red);
}

.guidance-progress {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9f0;
}

.guidance-vibration-button {
  min-width: 180px;
  min-height: 50px;
  margin-right: 10px;
  padding-inline: 15px;
  font-size: 0.78rem;
}

.guidance-progress i {
  display: block;
  width: var(--test-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tester-blue), var(--tester-red));
  transition: width 100ms linear;
}

.test-result > div > span {
  margin-bottom: 2px;
  color: #6a8293;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.test-result[data-result="good"] .result-icon {
  background: rgba(10, 175, 105, 0.1);
  color: var(--tester-green);
}

.test-result[data-result="warning"] .result-icon {
  background: rgba(217, 130, 8, 0.11);
  color: var(--tester-amber);
}

.test-result[data-result="danger"] .result-icon {
  background: rgba(229, 22, 70, 0.1);
  color: var(--tester-red);
}

html[data-theme="dark"] .result-action {
  border-color: rgba(151, 187, 210, 0.45);
  background: #143149;
  color: #edf8ff;
}

html[data-theme="dark"] .result-action-primary {
  border-color: var(--tester-red);
  background: var(--tester-red);
  color: #ffffff;
}

html[data-theme="dark"] .result-action-viber {
  border-color: #8b79ef;
  color: #c2b9ff;
}

html[data-theme="dark"] .result-good-link {
  color: #b8d0df;
}

.tester-notes {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.tester-notes article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 9px 16px;
  border-radius: 6px;
}

.tester-notes article > i {
  margin-top: 0;
  color: var(--tester-blue);
  font-size: 1.15rem;
}

.tester-notes strong {
  display: inline;
  margin: 0 8px 0 0;
  font-size: 0.78rem;
}

.tester-notes p {
  display: inline;
  margin: 0;
  color: #60798c;
  font-size: 0.75rem;
  line-height: 1.35;
}

.tester-notes a {
  color: var(--tester-red);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.tester-notes a:hover,
.tester-notes a:focus-visible {
  color: #b80f35;
}

.test-report {
  margin-top: 18px;
  scroll-margin-top: 112px;
}

.test-report-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, 0.82fr);
  gap: 32px;
  align-items: center;
  padding: 24px 26px;
  border: 1px solid rgba(34, 121, 171, 0.42);
  border-left: 5px solid var(--tester-red);
  border-radius: 10px 10px 0 0;
  background:
    radial-gradient(circle at 84% 18%, rgba(45, 155, 218, 0.24), transparent 34%),
    linear-gradient(135deg, #0a2036, #123957);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(8, 34, 53, 0.14);
}

.report-eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  color: #8ed7ff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.test-report-toolbar h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.test-report-toolbar > div:first-child > p {
  margin: 9px 0 0;
  color: #c5dcea;
  font-size: 0.88rem;
  line-height: 1.45;
}

.report-toolbar-actions {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr);
  gap: 10px 12px;
  align-items: end;
}

.report-action-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.report-action-button:hover,
.report-action-button:focus-visible {
  transform: translateY(-1px);
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.report-email-button {
  border-color: var(--tester-red);
  background: var(--tester-red);
  white-space: nowrap;
}

.report-email-control label {
  display: block;
  margin-bottom: 5px;
  color: #c5dcea;
  font-size: 0.67rem;
  font-weight: 800;
}

.report-email-control > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.report-email-control input {
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(181, 216, 235, 0.56);
  border-radius: 7px;
  outline: 0;
  background: #ffffff;
  color: var(--tester-navy);
  font: inherit;
  font-size: 0.8rem;
}

.report-email-control input:focus {
  border-color: #71c5ef;
  box-shadow: 0 0 0 3px rgba(63, 172, 229, 0.2);
}

.report-email-hint {
  grid-column: 1 / -1;
  color: #a9c7d8;
  font-size: 0.65rem;
  line-height: 1.35;
}

.test-report-sheet {
  padding: 28px;
  border: 1px solid #cbdde7;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #ffffff;
  color: #10263a;
  box-shadow: 0 18px 42px rgba(17, 56, 80, 0.1);
}

.report-sheet-header,
.report-result-heading {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.report-sheet-header {
  padding-bottom: 18px;
  border-bottom: 1px solid #d8e5ec;
}

.report-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.report-brand img {
  width: 66px;
  height: auto;
}

.report-logo-dark {
  display: none;
}

.report-brand strong,
.report-brand span,
.report-sheet-contact span {
  display: block;
}

.report-brand strong {
  font-size: 1rem;
}

.report-brand span,
.report-sheet-contact span {
  margin-top: 3px;
  color: #647b8c;
  font-size: 0.72rem;
}

.report-sheet-contact {
  text-align: right;
}

.report-sheet-contact strong {
  color: var(--tester-red);
  font-size: 1rem;
}

.report-result-heading {
  padding: 22px 0 17px;
}

.report-result-heading span {
  display: block;
  margin-bottom: 4px;
  color: #6c8191;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-result-heading h3 {
  margin: 0;
  color: #10263a;
  font-size: 1.45rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.report-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  max-width: 360px;
  padding: 8px 14px;
  border: 1px solid #cbdce5;
  border-radius: 999px;
  background: #edf5f9;
  color: #526d7f;
  font-size: 0.76rem;
  line-height: 1.2;
  text-align: center;
}

.report-status-badge[data-state="good"] {
  border-color: rgba(10, 175, 105, 0.3);
  background: rgba(10, 175, 105, 0.09);
  color: #087c4c;
}

.report-status-badge[data-state="warning"],
.report-status-badge[data-state="incomplete"] {
  border-color: rgba(217, 130, 8, 0.32);
  background: rgba(217, 130, 8, 0.09);
  color: #9a5c04;
}

.report-status-badge[data-state="danger"] {
  border-color: rgba(229, 22, 70, 0.32);
  background: rgba(229, 22, 70, 0.08);
  color: #bd123a;
}

.report-meta-grid,
.report-device-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid #d8e5ec;
  border-radius: 8px;
  background: #f7fbfd;
}

.report-meta-grid > div,
.report-device-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #d8e5ec;
}

.report-meta-grid > div:last-child,
.report-device-grid > div:last-child {
  border-right: 0;
}

.report-meta-grid dt,
.report-device-grid dt,
.report-compact-metrics dt,
.report-stick-grid dt {
  color: #6d8291;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.report-meta-grid dd,
.report-device-grid dd,
.report-compact-metrics dd,
.report-stick-grid dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #10263a;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.report-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d8e5ec;
  border-radius: 8px;
  background: #ffffff;
}

.report-block > h4,
.report-recommendation h4 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 13px;
  color: #10263a;
  font-size: 0.83rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.report-block > h4 i {
  color: var(--tester-red);
}

.report-stick-grid,
.report-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-stick-grid article {
  padding: 13px;
  border-radius: 7px;
  background: #f2f8fb;
}

.report-stick-grid article > header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.report-stick-grid article > header strong {
  font-size: 0.82rem;
}

.report-stick-grid article > header span {
  color: #526f82;
  font-size: 0.68rem;
  font-weight: 800;
}

.report-stick-grid dl,
.report-compact-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.report-stick-grid dl > div,
.report-compact-metrics > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d8e5ec;
  border-radius: 6px;
  background: #ffffff;
}

.report-detail-grid > .report-block {
  margin-top: 12px;
}

.report-compact-metrics > div:nth-child(2):last-child {
  grid-column: span 2;
}

.report-recommendation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(21, 136, 207, 0.26);
  border-radius: 8px;
  background: #eef8fd;
}

.report-recommendation > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--tester-blue);
}

.report-recommendation h4 {
  margin-bottom: 5px;
}

.report-recommendation p {
  margin: 0;
  color: #49677a;
  font-size: 0.78rem;
  line-height: 1.45;
}

.report-recommendation[data-state="danger"] {
  border-color: rgba(229, 22, 70, 0.28);
  background: rgba(229, 22, 70, 0.055);
}

.report-recommendation[data-state="danger"] > span {
  color: var(--tester-red);
}

.report-recommendation[data-state="warning"],
.report-recommendation[data-state="incomplete"] {
  border-color: rgba(217, 130, 8, 0.3);
  background: rgba(217, 130, 8, 0.06);
}

.report-recommendation[data-state="warning"] > span,
.report-recommendation[data-state="incomplete"] > span {
  color: var(--tester-amber);
}

.report-service-promo {
  display: grid;
  grid-template-columns: minmax(200px, 0.75fr) minmax(0, 1.5fr);
  gap: 20px;
  align-items: center;
  margin-top: 16px;
  padding: 17px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0a2036, #123957);
  color: #ffffff;
}

.report-service-promo > div span,
.report-service-promo > div strong {
  display: block;
}

.report-service-promo > div span {
  color: #8ed7ff;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-service-promo > div strong {
  margin-top: 5px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.report-service-promo nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.report-service-promo a {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(183, 220, 240, 0.26);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}

.report-service-promo a i {
  color: #ff6f91;
}

.report-service-promo a:hover,
.report-service-promo a:focus-visible {
  border-color: #8ed7ff;
  background: rgba(255, 255, 255, 0.08);
}

.report-sheet-footer {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #d8e5ec;
  color: #687e8e;
  font-size: 0.64rem;
  line-height: 1.4;
}

.report-sheet-footer p {
  max-width: 720px;
  margin: 0;
}

.report-sheet-footer strong {
  color: #2f536b;
  text-align: right;
}

html[data-theme="dark"] .test-report-sheet {
  border-color: #35566c;
  background: #0d2233;
  color: #edf7fc;
}

html[data-theme="dark"] .report-logo-light {
  display: none;
}

html[data-theme="dark"] .report-logo-dark {
  display: block;
}

html[data-theme="dark"] .report-sheet-header,
html[data-theme="dark"] .report-sheet-footer {
  border-color: #35566c;
}

html[data-theme="dark"] .report-result-heading h3,
html[data-theme="dark"] .report-meta-grid dd,
html[data-theme="dark"] .report-device-grid dd,
html[data-theme="dark"] .report-compact-metrics dd,
html[data-theme="dark"] .report-stick-grid dd,
html[data-theme="dark"] .report-block > h4,
html[data-theme="dark"] .report-recommendation h4 {
  color: #edf7fc;
}

html[data-theme="dark"] .report-meta-grid,
html[data-theme="dark"] .report-device-grid,
html[data-theme="dark"] .report-block,
html[data-theme="dark"] .report-stick-grid dl > div,
html[data-theme="dark"] .report-compact-metrics > div {
  border-color: #35566c;
  background: #10283a;
}

html[data-theme="dark"] .report-meta-grid > div,
html[data-theme="dark"] .report-device-grid > div {
  border-color: #35566c;
}

html[data-theme="dark"] .report-stick-grid article {
  background: #0a1b29;
}

html[data-theme="dark"] .report-recommendation {
  background: #10283a;
}

html[data-theme="dark"] .report-recommendation p,
html[data-theme="dark"] .report-brand span,
html[data-theme="dark"] .report-sheet-contact span,
html[data-theme="dark"] .report-sheet-footer {
  color: #aac2d1;
}

.optional-gamepad-input[hidden] {
  display: none !important;
}

.advanced-diagnostics {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--tester-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 30px rgba(19, 60, 87, 0.05);
}

.advanced-heading {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid #dce8ef;
}

.advanced-heading > div:first-child {
  min-width: 0;
}

.advanced-heading h2 {
  margin: 0;
  color: var(--tester-navy);
  font-size: 1.55rem;
  line-height: 1;
  text-transform: uppercase;
}

.advanced-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--tester-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.advanced-heading-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  align-items: center;
}

.advanced-section-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #79a7c1;
  border-radius: 8px;
  background: #f6fbfe;
  color: #173f60;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.advanced-section-toggle i {
  transition: transform 180ms ease;
}

.advanced-section-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

@media (max-width: 900px) {
  .advanced-section-toggle {
    display: inline-flex;
    width: 100%;
  }

  .advanced-diagnostics.is-collapsed .advanced-diagnostics-body,
  .advanced-diagnostics.is-collapsed .advanced-status,
  .advanced-diagnostics.is-collapsed .advanced-connect-button {
    display: none;
  }

  .advanced-diagnostics.is-collapsed .advanced-heading {
    border-bottom: 0;
  }
}

.advanced-connect-button {
  flex: 0 0 auto;
  min-height: 48px;
  border-color: #79a7c1;
  background: #f6fbfe;
  color: #173f60;
  font-size: 0.78rem;
}

.advanced-diagnostics[data-hid-state="connected"] .advanced-connect-button {
  border-color: #9ecdb9;
  color: #087c4c;
  background: #f1fbf6;
}

.advanced-status,
.motion-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #647c8e;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.advanced-status > i,
.motion-status > i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a7bdca;
  box-shadow: 0 0 0 4px rgba(104, 134, 153, 0.1);
}

.advanced-status[data-state="connected"],
.motion-status[data-state="good"] {
  color: #087c4c;
}

.advanced-status[data-state="connected"] > i,
.motion-status[data-state="good"] > i {
  background: var(--tester-green);
  box-shadow: 0 0 0 4px rgba(10, 175, 105, 0.11);
}

.advanced-status[data-state="warning"],
.motion-status[data-state="warning"] {
  color: #a86507;
}

.advanced-status[data-state="warning"] > i,
.motion-status[data-state="warning"] > i {
  background: var(--tester-amber);
}

.advanced-status[data-state="error"] {
  color: var(--tester-red);
}

.advanced-status[data-state="error"] > i {
  background: var(--tester-red);
}

.device-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #dce8ef;
}

.device-info-grid article {
  min-width: 0;
  min-height: 108px;
  padding: 18px 20px;
  border-right: 1px solid #e0ebf1;
  border-bottom: 1px solid #e0ebf1;
  background: #fbfdfe;
}

.device-info-grid article:nth-child(4n) {
  border-right: 0;
}

.device-info-grid article:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.device-info-grid article > span {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 9px;
  color: #648096;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.device-info-grid article > span i {
  color: var(--tester-blue);
}

.device-info-grid strong,
.device-info-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-info-grid strong {
  color: var(--tester-navy);
  font-size: 0.94rem;
}

.device-info-grid small {
  margin-top: 4px;
  color: #526d80;
  font-size: 0.69rem;
}

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

.advanced-test-card {
  min-width: 0;
  min-height: 290px;
  padding: 16px;
  border: 1px solid #d5e4ec;
  border-radius: 8px;
  background: #ffffff;
}

.advanced-test-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 48px;
  margin-bottom: 14px;
}

.advanced-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: #eaf5fa;
  color: #176e9f;
}

.advanced-test-card h3 {
  margin: 0;
  color: var(--tester-navy);
  font-size: 0.95rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.advanced-test-card header p {
  margin: 4px 0 0;
  color: #526d80;
  font-size: 0.68rem;
  line-height: 1.35;
}

.advanced-metrics {
  display: grid;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dfeaf0;
  border-radius: 7px;
  background: #dfeaf0;
}

.advanced-metrics > div {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 8px 10px;
  background: #f9fcfd;
}

.advanced-metrics dt {
  color: #506b7e;
  font-size: 0.69rem;
  font-weight: 700;
}

.advanced-metrics dd {
  margin: 0;
  color: var(--tester-navy);
  font-size: 0.77rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.advanced-metrics dd[data-state="good"] { color: var(--tester-green); }
.advanced-metrics dd[data-state="warning"] { color: var(--tester-amber); }
.advanced-metrics dd[data-state="danger"] { color: var(--tester-red); }

.extra-inputs {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #eef7fb;
  color: #526e82;
  font-size: 0.7rem;
  line-height: 1.45;
}

.hid-button-test {
  margin-top: 10px;
}

.hid-button-test-label {
  display: block;
  margin-bottom: 7px;
  color: #506b7e;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hid-button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hid-button-list span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #d5e4ec;
  border-radius: 6px;
  background: #f9fcfd;
  color: #4d687b;
  font-size: 0.66rem;
  font-weight: 800;
}

.hid-button-list span[hidden] {
  display: none !important;
}

.hid-button-list span > i {
  width: 8px;
  height: 8px;
  border: 1px solid #88a7ba;
  border-radius: 50%;
  background: #ffffff;
}

.hid-button-list span > b {
  color: var(--tester-navy);
  font-variant-numeric: tabular-nums;
}

.hid-button-list span.was-tested {
  border-color: rgba(10, 175, 105, 0.44);
  color: #087c4c;
}

.hid-button-list span.was-tested > i {
  border-color: var(--tester-green);
  background: var(--tester-green);
}

.hid-button-list span.is-active {
  border-color: rgba(229, 22, 70, 0.5);
  background: rgba(229, 22, 70, 0.08);
  color: var(--tester-red);
}

#touchpad-test-canvas {
  display: block;
  width: 100%;
  height: 128px;
  border: 1px solid #a7c4d5;
  border-radius: 7px;
  background: #f3f9fc;
}

.advanced-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.advanced-checks span {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 5px;
  border: 1px solid #d8e5ec;
  border-radius: 6px;
  color: #647d90;
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
}

.advanced-checks i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a8bdca;
}

.advanced-checks span.is-complete {
  border-color: rgba(10, 175, 105, 0.34);
  background: rgba(10, 175, 105, 0.06);
  color: #087c4c;
}

.advanced-checks span.is-complete i {
  background: var(--tester-green);
}

.motion-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.motion-groups section {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfeaf0;
  border-radius: 7px;
  background: #f9fcfd;
}

.motion-groups section > strong {
  display: block;
  margin-bottom: 9px;
  color: #31536b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.motion-groups section > strong small {
  color: #8398a7;
  font-weight: 700;
  text-transform: none;
}

.motion-axis {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 48px;
  gap: 6px;
  align-items: center;
  min-height: 27px;
  color: #607b8f;
  font-size: 0.65rem;
  font-weight: 800;
}

.motion-axis > i {
  position: relative;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #dce9ef;
}

.motion-axis > i b {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--sensor-width, 0%);
  border-radius: inherit;
  background: var(--tester-blue);
  transform: scaleX(var(--sensor-direction, 1));
  transform-origin: left center;
}

.motion-axis output {
  color: var(--tester-navy);
  font-size: 0.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.motion-status {
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-top: 11px;
  border-radius: 6px;
  background: #eef7fb;
}

html[data-theme="dark"] .gamepad-tester-page {
  --tester-bg: #071522;
  --tester-surface: #0e2132;
  --tester-surface-soft: #10283a;
  --tester-border: rgba(143, 183, 207, 0.22);
  --tester-muted: #a9becd;
  background: var(--tester-bg);
  color: #edf7fd;
}

html[data-theme="dark"] .tester-main {
  background:
    linear-gradient(rgba(118, 174, 207, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 174, 207, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(34, 130, 177, 0.13), transparent 27%),
    var(--tester-bg);
  background-size: 36px 36px, 36px 36px, auto, auto;
}

html[data-theme="dark"] .connection-card,
html[data-theme="dark"] .diagnostic-panel,
html[data-theme="dark"] .tester-controls,
html[data-theme="dark"] .advanced-diagnostics,
html[data-theme="dark"] .tester-notes article {
  border-color: var(--tester-border);
  background: rgba(14, 33, 50, 0.96);
  color: #edf7fd;
}

html[data-theme="dark"] .tester-intro h1,
html[data-theme="dark"] .panel-heading h2,
html[data-theme="dark"] .connection-card strong,
html[data-theme="dark"] .trigger-readouts strong,
html[data-theme="dark"] .stick-card header strong,
html[data-theme="dark"] .stick-card dd,
html[data-theme="dark"] .test-guidance strong,
html[data-theme="dark"] .test-result strong,
html[data-theme="dark"] .advanced-heading h2,
html[data-theme="dark"] .advanced-test-card h3,
html[data-theme="dark"] .device-info-grid strong,
html[data-theme="dark"] .advanced-metrics dd,
html[data-theme="dark"] .motion-axis output,
html[data-theme="dark"] .tester-notes strong {
  color: #f3f9fd;
}

html[data-theme="dark"] .tester-intro-copy > p,
html[data-theme="dark"] .connection-card > div span,
html[data-theme="dark"] .connection-transport,
html[data-theme="dark"] .panel-kicker,
html[data-theme="dark"] .live-indicator,
html[data-theme="dark"] .deadzone-legend,
html[data-theme="dark"] .advanced-heading p,
html[data-theme="dark"] .advanced-test-card header p,
html[data-theme="dark"] .device-info-grid small,
html[data-theme="dark"] .tester-notes p {
  color: #a9becd;
}

html[data-theme="dark"] .controller-stage {
  background: transparent;
}

html[data-theme="dark"] .controller-shoulder-view > img {
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.30));
}

html[data-theme="dark"] .controller-callout {
  border-color: rgba(105, 179, 224, 0.54);
  background: rgba(12, 35, 52, 0.94);
  color: #eaf7ff;
}

html[data-theme="dark"] .controller-callout small,
html[data-theme="dark"] .button-group h3 {
  color: #9fbbce;
}

html[data-theme="dark"] .trigger-readouts,
html[data-theme="dark"] .stick-card,
html[data-theme="dark"] .test-guidance,
html[data-theme="dark"] .test-result,
html[data-theme="dark"] .advanced-test-card {
  border-color: var(--tester-border);
  background: #10283a;
}

html[data-theme="dark"] .trigger-readouts strong small,
html[data-theme="dark"] .trigger-readouts .trigger-peak {
  color: #a9becd;
}

html[data-theme="dark"] .trigger-readouts output {
  color: #edf7fc;
}

html[data-theme="dark"] .advanced-heading,
html[data-theme="dark"] .device-info-grid {
  border-color: var(--tester-border);
}

html[data-theme="dark"] .device-info-grid article,
html[data-theme="dark"] .advanced-metrics > div,
html[data-theme="dark"] .motion-groups section {
  border-color: rgba(143, 183, 207, 0.18);
  background: #0c2030;
}

html[data-theme="dark"] .device-info-grid article > span,
html[data-theme="dark"] .advanced-metrics dt,
html[data-theme="dark"] .motion-axis,
html[data-theme="dark"] .advanced-checks span,
html[data-theme="dark"] .motion-groups section > strong {
  color: #a9becd;
}

html[data-theme="dark"] .advanced-metrics,
html[data-theme="dark"] .advanced-checks span,
html[data-theme="dark"] #touchpad-test-canvas {
  border-color: rgba(143, 183, 207, 0.22);
  background: #0a1b29;
}

html[data-theme="dark"] .extra-inputs,
html[data-theme="dark"] .motion-status {
  background: #0a1b29;
  color: #a9becd;
}

html[data-theme="dark"] .hid-button-test-label {
  color: #a9becd;
}

html[data-theme="dark"] .hid-button-list span {
  border-color: rgba(143, 183, 207, 0.22);
  background: #0a1b29;
  color: #b8cedd;
}

html[data-theme="dark"] .hid-button-list span > i {
  border-color: #63849a;
  background: #10283a;
}

html[data-theme="dark"] .hid-button-list span > b {
  color: #edf7fc;
}

html[data-theme="dark"] .advanced-card-icon {
  background: #15344a;
  color: #84cef7;
}

html[data-theme="dark"] .advanced-connect-button {
  border-color: #416b85;
  background: #10283a;
  color: #d9ebf5;
}

html[data-theme="dark"] .advanced-section-toggle {
  border-color: rgba(123, 183, 216, 0.34);
  background: rgba(123, 183, 216, 0.08);
  color: #d5e7f2;
}

html[data-theme="dark"] .advanced-status[data-state="connected"],
html[data-theme="dark"] .motion-status[data-state="good"] {
  color: #59dfa4;
}

html[data-theme="dark"] .advanced-status {
  color: #a9becd;
}

html[data-theme="dark"] .advanced-diagnostics[data-hid-state="connected"] .advanced-connect-button {
  border-color: #277958;
  background: #10382d;
  color: #70e5b2;
}

html[data-theme="dark"] .stick-card dl div {
  background: #0c2030;
}

html[data-theme="dark"] .button-group {
  border-color: rgba(143, 183, 207, 0.2);
}

html[data-theme="dark"] .button-test-grid {
  border-color: rgba(143, 183, 207, 0.2);
}

html[data-theme="dark"] .button-group > span,
html[data-theme="dark"] .dpad-test-cluster span {
  color: #b8cedd;
}

html[data-theme="dark"] .dpad-test-cluster span small {
  color: #b8cedd;
}

html[data-theme="dark"] .button-group > span em,
html[data-theme="dark"] .dpad-test-cluster span em {
  color: #dcecf6;
}

html[data-theme="dark"] .dpad-test-cluster span em {
  border-color: #51738a;
  background: #0c2030;
  color: transparent;
}

html[data-theme="dark"] .stick-plot-legend {
  color: #a9becd;
}

html[data-theme="dark"] .guidance-icon {
  color: #8ed0f6;
}

html[data-theme="dark"] .trigger-readouts i,
html[data-theme="dark"] .guidance-progress {
  background: #233e51;
}

html[data-theme="dark"] .tester-btn {
  border-color: #35566c;
  background: #10283a;
  color: #f3f9fd;
}

html[data-theme="dark"] .tester-btn-primary {
  border-color: var(--tester-red);
  background: var(--tester-red);
  color: #ffffff;
}

@media (min-width: 1437px) and (max-width: 1504px) {
  .tester-main .section-shell {
    width: min(1405px, calc(100% - 32px));
  }
}

@media (max-width: 1436px) {
  .tester-workspace {
    grid-template-columns: 1fr;
  }

  .controller-front-view img {
    max-width: 820px;
  }

  .controller-stage {
    max-width: 820px;
    margin-inline: auto;
  }

  .tester-controls {
    grid-template-columns: 1fr 1fr;
  }

  .tester-actions {
    grid-column: 1 / -1;
  }

  .tester-actions::after {
    display: none;
  }

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

@media (max-width: 1100px) {
  .tester-main {
    padding-top: 32px;
  }

  .tester-main .section-shell {
    width: min(100% - 32px, 1380px);
  }

  .tester-intro {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .diagnostic-stack {
    grid-template-rows: auto auto auto;
  }

  .stick-grid,
  .button-test-grid {
    height: auto;
  }

  .tester-intro h1 {
    font-size: clamp(2.45rem, 10vw, 4rem);
  }

  .stick-grid,
  .tester-controls,
  .tester-notes {
    grid-template-columns: 1fr;
  }

  .tester-actions {
    grid-column: auto;
    flex-wrap: wrap;
  }

  .tester-btn {
    flex: 1 1 160px;
  }

  .advanced-heading {
    align-items: flex-start;
  }

  .advanced-heading-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .advanced-heading-actions .advanced-connect-button {
    flex: 0 0 auto;
  }

  .advanced-status {
    justify-content: flex-end;
  }

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

  .device-info-grid strong,
  .device-info-grid small {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .device-info-grid article:nth-child(4n) {
    border-right: 1px solid #e0ebf1;
  }

  .device-info-grid article:nth-child(2n) {
    border-right: 0;
  }

  .device-info-grid article:nth-last-child(-n + 4) {
    border-bottom: 1px solid #e0ebf1;
  }

  .device-info-grid article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .tester-main {
    padding: 24px 0 96px;
  }

  .tester-intro {
    margin-bottom: 18px;
  }

  .tester-intro h1 {
    font-size: clamp(2.25rem, 12vw, 3.1rem);
    line-height: 0.98;
  }

  .tester-intro-copy > p {
    margin-top: 15px;
    font-size: 0.96rem;
  }

  .connection-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
    padding: 16px;
  }

  .connection-transport {
    grid-column: 2;
    padding: 0;
    border: 0;
  }

  .diagnostic-panel {
    border-radius: 14px;
  }

  .controller-stage {
    height: auto;
    border: 0;
    border-radius: 0;
  }

  .controller-shoulder-view {
    width: 100%;
    height: auto;
    aspect-ratio: 620 / 218;
  }

  .controller-front-view {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .controller-shoulder-marker {
    gap: 2px;
    border-width: 1.5px;
    font-size: clamp(0.58rem, 3vw, 0.72rem);
  }

  .controller-shoulder-marker output {
    font-size: clamp(0.52rem, 2.7vw, 0.66rem);
  }

  .controller-callout {
    display: none;
  }

  .panel-heading,
  .panel-heading.compact {
    padding: 16px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .live-indicator,
  .deadzone-legend {
    font-size: 0.66rem;
  }

  .shoulder-label {
    min-width: 0;
    min-height: 7%;
  }

  .trigger-readouts {
    gap: 12px;
    padding: 14px 16px 17px;
  }

  .stick-grid {
    padding: 0 10px 10px;
  }

  .stick-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(92px, 0.8fr);
    padding: 12px;
  }

  .stick-card canvas {
    width: min(100%, 260px);
  }

  .stick-plot-legend {
    right: auto;
    bottom: 10px;
    left: 12px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 3px;
    font-size: 0.64rem;
    line-height: 1.1;
  }

  .button-test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 0;
    padding: 0 10px 10px;
  }

  .button-group:nth-child(odd) {
    border-left: 0;
  }

  .button-group:last-child {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
  }

  .button-group:last-child h3 {
    grid-column: 1 / -1;
  }

  .tester-controls {
    gap: 12px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
  }

  .tester-actions {
    gap: 8px;
  }

  .tester-btn {
    min-height: 48px;
    padding-inline: 12px;
    font-size: 0.72rem;
  }

  .tester-btn-primary {
    flex-basis: 100%;
  }

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

  .result-actions {
    display: none;
    grid-template-columns: 1fr;
  }

  .test-result[data-actions="service"] .result-actions {
    display: grid;
  }

  .result-action {
    width: 100%;
  }

  .guidance-vibration-button {
    grid-column: 1 / -1;
    width: 100%;
    margin-right: 0;
  }

  .tester-notes {
    gap: 10px;
    margin-top: 14px;
  }

  .tester-notes article {
    padding: 15px;
  }

  .advanced-diagnostics {
    margin-top: 14px;
    border-radius: 14px;
  }

  .advanced-heading {
    flex-direction: column;
    gap: 16px;
    padding: 18px 16px;
  }

  .advanced-heading h2 {
    font-size: 1.35rem;
  }

  .advanced-heading-actions {
    width: 100%;
  }

  .advanced-status {
    justify-content: flex-start;
  }

  .advanced-connect-button {
    width: 100%;
  }

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

  .advanced-test-grid {
    grid-template-columns: 1fr;
  }

  .device-info-grid article,
  .device-info-grid article:nth-child(2n),
  .device-info-grid article:nth-child(4n),
  .device-info-grid article:nth-last-child(-n + 2),
  .device-info-grid article:nth-last-child(-n + 4) {
    min-height: 94px;
    border-right: 1px solid #e0ebf1;
    border-bottom: 1px solid #e0ebf1;
  }

  .device-info-grid article:nth-child(2n) {
    border-right: 0;
  }

  .device-info-grid article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .advanced-test-grid {
    gap: 10px;
    padding: 10px;
  }

  .advanced-test-card {
    min-height: 0;
  }

  .motion-groups {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 360px) {
  .device-info-grid {
    grid-template-columns: 1fr;
  }

  .advanced-diagnostics .device-info-grid article {
    border-right: 0;
    border-bottom: 1px solid #e0ebf1;
  }

  .advanced-diagnostics .device-info-grid article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 1100px) {
  .test-report-toolbar {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .report-toolbar-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .test-report {
    margin-top: 14px;
  }

  .test-report-toolbar {
    gap: 18px;
    padding: 20px 16px;
    border-radius: 14px 14px 0 0;
  }

  .report-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .report-print-button {
    width: 100%;
  }

  .report-email-control > div {
    grid-template-columns: 1fr;
  }

  .report-email-button {
    width: 100%;
  }

  .test-report-sheet {
    padding: 16px;
    border-radius: 0 0 14px 14px;
  }

  .report-sheet-header,
  .report-result-heading,
  .report-sheet-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-sheet-contact,
  .report-sheet-footer strong {
    text-align: left;
  }

  .report-status-badge {
    max-width: none;
  }

  .report-meta-grid,
  .report-device-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-meta-grid > div:nth-child(2),
  .report-device-grid > div:nth-child(2) {
    border-right: 0;
  }

  .report-meta-grid > div:nth-child(-n + 2),
  .report-device-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid #d8e5ec;
  }

  .report-stick-grid,
  .report-detail-grid {
    grid-template-columns: 1fr;
  }

  .report-stick-grid dl,
  .report-compact-metrics {
    grid-template-columns: 1fr;
  }

  .report-compact-metrics > div:nth-child(2):last-child {
    grid-column: auto;
  }

  .report-service-promo {
    grid-template-columns: 1fr;
  }

  .report-service-promo nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .report-meta-grid,
  .report-device-grid {
    grid-template-columns: 1fr;
  }

  .report-meta-grid > div,
  .report-device-grid > div,
  .report-meta-grid > div:nth-child(2),
  .report-device-grid > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #d8e5ec;
  }

  .report-meta-grid > div:last-child,
  .report-device-grid > div:last-child {
    border-bottom: 0;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html,
  body.gamepad-tester-page {
    min-height: auto !important;
    background: #ffffff !important;
  }

  body.gamepad-tester-page {
    color: #10263a !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.gamepad-tester-page > .site-topbar,
  body.gamepad-tester-page > .site-header,
  body.gamepad-tester-page > .site-footer,
  .tester-main > :not(.test-report),
  .test-report-toolbar {
    display: none !important;
  }

  .tester-main {
    padding: 0 !important;
    background: #ffffff !important;
  }

  .tester-main .test-report {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .test-report-sheet,
  html[data-theme="dark"] .test-report-sheet {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #10263a !important;
    box-shadow: none !important;
  }

  .report-logo-light,
  html[data-theme="dark"] .report-logo-light {
    display: block !important;
  }

  .report-logo-dark,
  html[data-theme="dark"] .report-logo-dark {
    display: none !important;
  }

  .report-sheet-header {
    padding-bottom: 10px;
  }

  .report-result-heading {
    padding: 12px 0 9px;
  }

  .report-result-heading h3 {
    font-size: 1.1rem;
  }

  .report-meta-grid > div,
  .report-device-grid > div,
  .report-block {
    padding: 8px 9px;
  }

  .report-block {
    margin-top: 9px;
  }

  .report-stick-grid article {
    padding: 8px;
  }

  .report-stick-grid dl > div,
  .report-compact-metrics > div {
    padding: 6px 7px;
  }

  .report-meta-grid dd,
  .report-device-grid dd,
  .report-compact-metrics dd,
  .report-stick-grid dd {
    color: #10263a !important;
    font-size: 0.7rem;
  }

  .report-result-heading h3,
  .report-block > h4,
  .report-recommendation h4 {
    color: #10263a !important;
  }

  .report-recommendation {
    margin-top: 9px;
    padding: 9px;
  }

  .report-recommendation p {
    color: #49677a !important;
    font-size: 0.7rem;
  }

  .report-service-promo {
    margin-top: 9px;
    padding: 10px;
  }

  .report-service-promo a {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 0.59rem;
  }

  .report-sheet-footer {
    margin-top: 8px;
    padding-top: 8px;
  }

  .report-block,
  .report-recommendation,
  .report-service-promo,
  .report-sheet-footer {
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gamepad-tester-page *,
  .gamepad-tester-page *::before,
  .gamepad-tester-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
