/* ===============================================================
   base.css — reset, page frame, and the small shared controls
   (buttons, fields, toggles) that every panel reuses.
   =============================================================== */

* { box-sizing: border-box; }

html { height: 100%; }

body {
  /* min-height, NOT height: with border-box a height of 100% pins the
     body box to the viewport, so this padding would sit inside it and
     reserve nothing below the last row — the fixed transport then
     covers the final row of cards and eats their clicks. min-height
     lets the box grow with the board so the padding lands after the
     content, where it is needed. */
  min-height: 100%;
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
  padding-bottom: calc(var(--bar-h) + 20px);
  overflow-x: hidden;
}

button, input, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--holo);
  outline-offset: 2px;
  border-radius: 4px;
}

kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text);
  background: var(--panel-hi);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.spacer { flex: 1 1 auto; }

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(17, 24, 35, 0.7);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.btn:hover {
  border-color: var(--holo-line);
  color: var(--holo);
}

.btn:active { transform: translateY(1px); }

.btn--key {
  border-color: var(--holo-line);
  color: var(--holo);
  background: var(--holo-soft);
}

.btn--key:hover { background: rgba(86, 224, 214, 0.2); }

.btn--quiet { color: var(--muted); }
.btn--quiet:hover { color: var(--danger); border-color: rgba(255, 92, 106, 0.5); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(17, 24, 35, 0.6);
  color: var(--text);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.icon-btn svg { width: 13px; height: 13px; fill: currentColor; }
.icon-btn:hover { border-color: var(--holo-line); color: var(--holo); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn:disabled:hover { border-color: var(--line); color: var(--text); }

.icon-btn--play {
  border-color: var(--holo-line);
  color: var(--holo);
}

/* ---------------------------------------------------------------
   Fields
   --------------------------------------------------------------- */
.field {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.field--grow { flex: 1 1 200px; }

.field label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  white-space: nowrap;
}

.field input[type="search"],
.field select {
  min-width: 0;
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 5px 9px;
  font-size: 12px;
  transition: border-color var(--t-fast);
}

.field select { cursor: pointer; }
.field input[type="search"]:focus,
.field select:focus { border-color: var(--holo-line); }

.field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 92px;
  height: 18px;
  background: transparent;
  cursor: pointer;
}

.field input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line-hard);
}

.field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px; height: 11px;
  margin-top: -4.5px;
  border-radius: 2px;
  background: var(--holo);
}

.field input[type="range"]::-moz-range-track { height: 2px; background: var(--line-hard); }
.field input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px;
  border: 0; border-radius: 2px;
  background: var(--holo);
}

/* ---------------------------------------------------------------
   Toggles
   --------------------------------------------------------------- */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle .dot {
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--muted-dim);
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.toggle:hover { color: var(--text); }

.toggle.is-on {
  color: var(--holo);
  border-color: var(--holo-line);
  background: var(--holo-soft);
}

.toggle.is-on .dot {
  background: var(--holo);
  box-shadow: 0 0 7px var(--holo-glow);
}
