/* Screen mode (/screen), loaded after styles.css: a setup page, then a full-window show over it. */

.screen-page { max-width: 1160px; margin: 0 auto; padding: calc(var(--nav-h) + 8px) var(--gutter) 80px; }
.screen-head { margin-bottom: 28px; }
.screen-head h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 600; }
.screen-head .lede { max-width: 640px; margin: 18px 0 0; }

.screen-setup { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.screen-preview { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; }
.screen-preview canvas { display: block; width: 100%; height: 100%; }
.screen-form { display: grid; gap: 18px; padding: 22px; }
.screen-form .field { display: grid; gap: 8px; }
.screen-form .seg { justify-self: start; }
.screen-form .input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 12px var(--mono); }
.link-row { display: flex; gap: 8px; }
.pro-line { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 207, 92, 0.3); background: rgba(255, 207, 92, 0.06); color: var(--muted); font-size: 13px; }
.pro-line a { color: var(--pro); }
.pro-line.ok { border-color: rgba(125, 255, 180, 0.3); background: rgba(125, 255, 180, 0.06); color: #7dffb4; }
[hidden] { display: none !important; }

.screen-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.screen-tips h3 { font-size: 17px; font-weight: 600; }
.screen-tips p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
kbd { display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 4px; font: 11px/16px var(--mono); color: var(--text); text-align: center; }

/* ---------- the show ---------- */

.show { display: none; }
body.playing { overflow: hidden; }
body.playing > :not(.show) { display: none; }
body.playing .show { display: block; position: fixed; inset: 0; z-index: 100; background: #000; }
.show canvas { display: block; width: 100vw; height: 100vh; }
.caption {
  position: fixed; left: 0; right: 0; bottom: 9vh; margin: 0; text-align: center;
  color: rgba(255, 255, 255, 0.82); font: 600 clamp(18px, 3vw, 44px) var(--font); letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}
.show-hud { position: fixed; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: opacity 0.4s; }
body.idle .show-hud { opacity: 0; pointer-events: none; }
body.idle { cursor: none; }
.hud-title { display: flex; align-items: center; gap: 10px; text-align: center; }
.hud-title b { display: block; font-weight: 600; }
.hud-title span { display: block; font: 12px var(--mono); color: var(--muted); }
.hud-btn, .hud-icon {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(10, 13, 19, 0.8);
  color: var(--text); font: 500 14px var(--font); cursor: pointer;
}
.hud-icon { width: 36px; padding: 0; font-size: 20px; }
.hud-btn:hover, .hud-icon:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 900px) {
  .screen-setup { grid-template-columns: 1fr; }
  .screen-tips { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .show-hud { flex-wrap: wrap; justify-content: center; }
  .hud-title { order: -1; flex-basis: 100%; justify-content: center; }
}
