:root {
  --bg: #000000;
  --text: #f3f3f0;
  --muted: #9ca0ad;
  --banner-h: 50px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  overflow: hidden;
}

.hardware-page {
  width: 100%;
  height: 100svh;
  padding-top: var(--banner-h);
  background: #000;
}

.hardware-stage {
  position: relative;
  width: 100%;
  height: calc(100svh - var(--banner-h));
  overflow: hidden;
  background: #000;
  touch-action: none;
}

#hardware-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: grab;
}

#hardware-canvas.is-dragging {
  cursor: grabbing;
}

.hardware-status {
  position: absolute;
  left: clamp(18px, 3vw, 40px);
  bottom: clamp(18px, 3vw, 40px);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  pointer-events: none;
}

.hardware-status.is-hidden {
  display: none;
}

.hardware-debug {
  position: absolute;
  left: clamp(18px, 3vw, 40px);
  bottom: clamp(18px, 3vw, 40px);
  z-index: 2;
  max-width: min(360px, calc(100% - 36px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.48);
  color: rgba(255, 255, 255, 0.72);
  font: 700 10px/1.55 Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: pre-wrap;
  pointer-events: none;
}

.hardware-controls {
  position: absolute;
  right: clamp(18px, 3vw, 40px);
  bottom: clamp(18px, 3vw, 40px);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hardware-view-controls {
  position: absolute;
  top: clamp(18px, 3vw, 40px);
  right: clamp(18px, 3vw, 40px);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hardware-control {
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.52);
  color: rgba(255, 255, 255, 0.72);
  font: 700 10px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.hardware-control:hover,
.hardware-control.is-active {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.92);
  color: #000;
}

@media (max-width: 720px) {
  .hardware-controls {
    right: 14px;
    bottom: 14px;
    left: 14px;
    justify-content: flex-end;
    gap: 6px;
  }

  .hardware-view-controls {
    top: 14px;
    right: 14px;
    left: 14px;
    justify-content: flex-end;
    gap: 6px;
  }

  .hardware-debug {
    left: 14px;
    bottom: 56px;
    padding: 8px 9px;
    font-size: 9px;
  }

  .hardware-control {
    height: 32px;
    padding: 0 9px;
    font-size: 9px;
  }
}
