:root {
  color-scheme: light dark;
  --bg: #f6f7f4;
  --text: #17201b;
  --muted: #59635e;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #134e4a;
  --danger: #b42318;
  --border: #d7ddd8;
  --shadow: 0 24px 70px rgba(23, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 35%),
    linear-gradient(315deg, rgba(180, 35, 24, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  min-height: 48px;
  padding: 0 18px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.panel {
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  max-width: 520px;
  padding: 28px;
  width: min(100%, 520px);
}

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

.mark {
  background:
    linear-gradient(90deg, var(--accent), #31585d),
    var(--accent);
  border-radius: 999px;
  display: inline-block;
  height: 18px;
  width: 36px;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 750;
  line-height: 1;
}

.session-label {
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.status {
  font-size: 1.35rem;
  font-weight: 700;
}

.route-indicator {
  background: #e9eeee;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  justify-self: start;
  line-height: 1.2;
  padding: 8px 10px;
}

.notice {
  background: #eef7f5;
  border: 1px solid #b8dad4;
  border-radius: 8px;
  color: var(--accent-strong);
  line-height: 1.45;
  padding: 12px;
}

.error {
  background: #fff0ee;
  border: 1px solid #ffd0c8;
  border-radius: 8px;
  color: var(--danger);
  line-height: 1.45;
  padding: 12px;
}

.preview {
  aspect-ratio: 16 / 9;
  background: #101817;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 42vh;
  object-fit: contain;
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#startButton {
  background: var(--accent);
  color: #ffffff;
  flex: 1 1 220px;
}

#startButton:not(:disabled):hover {
  background: var(--accent-strong);
}

.secondary {
  background: #e9eeee;
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101412;
    --text: #f3f7f4;
    --muted: #b6c0ba;
    --panel: #181f1c;
    --border: #2b3631;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  }

  .error {
    background: #331614;
    border-color: #6f2720;
  }

  .secondary {
    background: #26312d;
    color: var(--text);
  }

  .route-indicator {
    background: #26312d;
  }

  .notice {
    background: #17302d;
    border-color: #2b5d56;
    color: #c6f1ea;
  }
}
