:root {
  --bg: #101012;
  --panel: #1b1b1f;
  --panel-raised: #232328;
  --border: #2c2c33;
  --text: #e9e9ec;
  --text-dim: #9a9aa2;
  --accent: #f2a93b;
  --accent-dim: #7a5a24;
  --danger: #e05a4e;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.status {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.status--on { color: var(--accent); border-color: var(--accent-dim); }
.status--off { color: var(--text-dim); }

.icon-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
}

.remote {
  max-width: 380px;
  margin: 0 auto;
  padding: 8px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 16px;
  padding: 14px 0;
  transition: transform 0.05s ease, background 0.15s ease;
}
.btn:active {
  transform: scale(0.95);
  background: var(--panel-raised);
}

.row { display: flex; gap: 12px; }
.row > .btn { flex: 1; }

.row--power { align-items: center; }
.btn--power {
  flex: 0 0 76px;
  height: 76px;
  border-radius: 50%;
  font-size: 28px;
  color: var(--danger);
  border-color: #4a2c28;
}
.btn--wake { flex: 1; color: var(--accent); }

.dpad {
  display: grid;
  grid-template-columns: 64px 76px 64px;
  grid-template-rows: 64px 76px 64px;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}
.btn--dpad { padding: 0; font-size: 18px; }
.btn--up { grid-column: 2; grid-row: 1; border-radius: 16px 16px 4px 4px; }
.btn--left { grid-column: 1; grid-row: 2; border-radius: 16px 4px 4px 16px; }
.btn--ok {
  grid-column: 2; grid-row: 2;
  border-radius: 50%;
  background: var(--panel-raised);
  border-color: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.btn--right { grid-column: 3; grid-row: 2; border-radius: 4px 16px 16px 4px; }
.btn--down { grid-column: 2; grid-row: 3; border-radius: 4px 4px 16px 16px; }

.rockers { display: flex; gap: 16px; }
.rocker {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rocker__label { font-size: 12px; color: var(--text-dim); }
.btn--rocker { width: 100%; }
.btn--mute { color: var(--text-dim); font-size: 14px; }

.btn--media { flex: 1; font-size: 16px; }

.hidden { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-end;
}

.sheet {
  width: 100%;
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet h2 { margin: 0 0 4px; font-size: 18px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
}
.field input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
}

.btn--full { width: 100%; }
.btn--ghost { background: transparent; color: var(--text-dim); }

.settings-msg {
  font-size: 13px;
  color: var(--text-dim);
  min-height: 18px;
  margin: 0;
}
