/* The page around PolyConsole's canvas: black like the TV it imitates, with
   neutral gray surfaces and off-white text; the brand red stays in the logo. */
:root {
  color-scheme: dark;
  --ground: #000;
  --surface: #1a1a1a;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f0eaf2;
  --text-2: rgba(240, 234, 242, 0.68);
  --button: #f0eaf2;
  --button-text: #141214;
  --radius: 12px;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--ground);
  color: var(--text);
  overflow: hidden;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  outline: none;
}

#status,
.notice {
  position: fixed;
  left: 50%;
  bottom: max(32px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 16px;
  max-width: min(90vw, 60ch);
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 15px;
  text-align: center;
}

.notice {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  border-radius: var(--radius);
  padding: 24px 32px;
  line-height: 1.6;
}

dialog {
  width: min(92vw, 440px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

dialog h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.25;
}

dialog p {
  margin: 0 0 24px;
  color: var(--text-2);
}

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

button {
  font: inherit;
  font-weight: 600;
  padding: 8px 16px;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out;
}

button:hover {
  background: rgba(255, 255, 255, 0.06);
}

button.primary {
  background: var(--button);
  border-color: var(--button);
  color: var(--button-text);
}

button.primary:hover {
  background: #fff;
}

button.quiet {
  margin-left: auto;
  border-color: transparent;
  color: var(--text-2);
}

button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

#drop {
  position: fixed;
  inset: 16px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(240, 234, 242, 0.4);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

#drop p {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
