:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #111620;
  --panel-2: #171e2a;
  --text: #f4f8fb;
  --muted: #9aa8b6;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #38f3ff;
  --green: #69f0ae;
  --red: #ff4f6a;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 243, 255, 0.16), transparent 32%),
    linear-gradient(180deg, #0b1018, var(--bg));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.remote-shell {
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
}

.remote-header,
.session-card,
.slider-card,
.status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 22, 32, 0.88);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.remote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
}

.remote-header span,
.session-card span,
dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.5rem;
}

#connectionState {
  min-width: 92px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.remote-shell.connected #connectionState {
  color: #04100c;
  background: var(--green);
}

.session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.session-card h2 {
  margin-top: 4px;
  font-size: clamp(1.25rem, 7vw, 2rem);
  line-height: 1.05;
}

.session-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

#sessionTimer {
  color: var(--cyan);
  font-size: clamp(1.8rem, 10vw, 3rem);
  font-variant-numeric: tabular-nums;
}

.button-grid,
.quick-grid {
  display: grid;
  gap: 10px;
}

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

.quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 850;
  touch-action: manipulation;
}

button span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

button b,
label b {
  font: inherit;
  font-weight: inherit;
}

button:active {
  transform: translateY(1px);
  filter: brightness(1.18);
}

button.primary {
  border-color: rgba(56, 243, 255, 0.7);
  color: #031013;
  background: var(--cyan);
}

button.danger {
  border-color: rgba(255, 79, 106, 0.65);
  background: rgba(255, 79, 106, 0.16);
}

button.is-active {
  border-color: rgba(105, 240, 174, 0.78);
  color: #03100b;
  background: linear-gradient(180deg, #77f6b8, var(--green));
  box-shadow: 0 0 0 1px rgba(105, 240, 174, 0.18), 0 12px 28px rgba(105, 240, 174, 0.2);
}

button.is-active span {
  color: rgba(3, 16, 11, 0.72);
}

button.is-active[data-state-button="audio"],
button.is-active[data-state-button="music"] {
  border-color: rgba(56, 243, 255, 0.82);
  color: #031013;
  background: linear-gradient(180deg, #8ff8ff, var(--cyan));
  box-shadow: 0 0 0 1px rgba(56, 243, 255, 0.18), 0 12px 28px rgba(56, 243, 255, 0.18);
}

button.is-warning {
  border-color: rgba(255, 79, 106, 0.82);
  color: #fff;
  background: linear-gradient(180deg, #ff6b81, var(--red));
  box-shadow: 0 0 0 1px rgba(255, 79, 106, 0.18), 0 12px 28px rgba(255, 79, 106, 0.2);
}

button.is-warning span {
  color: rgba(255, 255, 255, 0.78);
}

.slider-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

.status-card {
  padding: 14px;
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 800;
}
