:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #5c6570;
  --line: #ffd0bf;
  --paper: #fff4ee;
  --panel: #ffffff;
  --orange: #ff4b1f;
  --orange-dark: #d32612;
  --blue: #1d4ed8;
  --danger: #9f1239;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(880px 240px at 0% -40px, rgba(255, 90, 20, 0.28), transparent 70%),
    var(--paper);
}

main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo {
  width: 88px;
  height: 88px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(211, 38, 18, 0.28));
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

h2 { color: var(--orange-dark); }

p { color: var(--muted); line-height: 1.5; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(211, 38, 18, 0.06);
}

.code {
  margin: 8px 0 0;
  color: var(--orange-dark);
  font-size: 64px;
  letter-spacing: 0.18em;
  font-weight: 700;
}

button, input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #ff6a33, var(--orange-dark));
  color: white;
  cursor: pointer;
  font-weight: 700;
}

button:hover { background: var(--orange-dark); }

button.danger { background: var(--danger); }

button:disabled { opacity: 0.55; cursor: default; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

input[type="text"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 28px;
  letter-spacing: 0.14em;
  width: 220px;
}

input.license {
  width: min(360px, 100%);
  font-size: 22px;
  letter-spacing: 0.08em;
}

label.check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
}

main.wide { width: min(1400px, calc(100% - 32px)); }

header a, .links a {
  color: white;
  background: var(--blue);
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 700;
}

.screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.screens video {
  width: 100%;
  max-height: 70vh;
  background: #111;
  border-radius: 12px;
  margin-top: 16px;
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.session-card .address {
  width: min(220px, 100%);
  font-size: 16px;
  letter-spacing: 0;
}

.session-card .code {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.08em;
}

.status {
  min-height: 1.5em;
  font-weight: 600;
}

.links a {
  display: inline-block;
  margin-right: 12px;
}

.remote-session {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #111;
}

.remote-session[hidden] { display: none; }

.remote-stage {
  position: absolute;
  inset: 0;
}

.remote-stage video {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  background: #111;
}

.remote-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(28, 36, 48, 0.88);
  color: white;
}

.remote-bar p {
  margin: 0;
  color: white;
}

.remote-screens, .remote-actions {
  display: flex;
  gap: 8px;
}

.remote-bar button.active {
  background: var(--blue);
}

.addresses {
  font-family: Consolas, monospace;
  color: var(--ink);
  white-space: pre-line;
}

.picker {
  position: fixed;
  inset: 0;
  background: rgba(28, 36, 48, 0.45);
  display: grid;
  place-items: center;
  padding: 24px;
}

.picker[hidden] { display: none; }

.picker-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--panel);
  border-radius: 16px;
  padding: 24px;
}

.picker-card h2 {
  margin: 0;
}

.picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

button.source {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px;
  text-align: left;
}

button.source img {
  width: 100%;
  border-radius: 8px;
  background: #111;
}
