:root {
  --bg: #141414;
  --bar: #1c1c1c;
  --text: #f4f4f4;
  --muted: #9a9a9a;
  --red: #e10600;
  --line: #2c2c2c;
  --radius: 5px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.35 "Segoe UI", system-ui, sans-serif;
}

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

button { cursor: pointer; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

html[data-role="display"] .remote { display: none; }
html[data-role="remote"] .app { display: none; }

.remote {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 12px;
}

.remote form, .phone-pop {
  width: min(420px, 100%);
  background: var(--bar);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.kicker {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

label { display: block; margin: 8px 0 4px; color: var(--muted); }

input[type="text"] {
  width: 100%;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 8px;
  outline: none;
}

input:focus { border-color: var(--red); }

.row { display: flex; gap: 6px; margin-top: 8px; }

.btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
}

.btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn:focus-visible { outline: 1px solid var(--red); outline-offset: 2px; }

.msg { min-height: 1.2em; margin: 8px 0 0; color: #fff; }
.msg.bad { color: var(--red); }
.fine { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
code { color: var(--text); }

.app {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.bar, .dock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}

.dock {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  align-items: flex-start;
  min-height: 36px;
}

.url { display: flex; gap: 6px; flex: 1; min-width: 0; }
.url input { min-width: 0; }

.now {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.now b { color: #fff; font-weight: 600; }
.now span { color: var(--red); }

.stage {
  position: relative;
  background: #000;
  min-height: 0;
  overflow: hidden;
}

.stage > iframe,
.stage > object,
.stage > embed,
.stage > svg,
.stage > .fill-host,
.stage > .alt-surface,
.stage > .sprite-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.sprite-clip { overflow: hidden; }
.sprite-clip img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  display: block;
}

.stage audio { display: none; }

.extras { display: flex; flex-wrap: wrap; gap: 6px; }
.extras:empty { display: none; }

.transport { display: flex; gap: 6px; }

.transport button, .extras > button {
  background: #101010;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 8px;
}

.status, .alt-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock:has(.alt-status) .status { display: none; }

.phone-pop {
  position: fixed;
  top: 46px;
  right: 6px;
  z-index: 3;
  width: 220px;
}

.phone-pop img {
  width: 180px;
  height: 180px;
  display: block;
  background: #fff;
  border-radius: var(--radius);
  margin-top: 6px;
}

.phone-pop[hidden] { display: none; }

@media (max-width: 720px) {
  .bar { flex-wrap: wrap; }
  .now { order: 3; width: 100%; }
}
