/* Sledneckotron 26,000 on the web (index.html, js/host.js): the page
   around the game. Marvyn's 1280x720 screen, scaled to the window and
   letterboxed; the landing view; and the key bar in the screen's top
   56 px (--safe-top), where Marvyn's is. Tokens from style.css. */

/* style.css is a kitchen screen's: no cursor, a fixed 1280x720 body. */
html, body { width: 100%; height: 100%; }
body, body * { cursor: auto !important; }
body button, body .snw-chip { cursor: pointer !important; }
body .sled-touch { cursor: default !important; }

.snw-device {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background: var(--bg);
  transform: translate(-50%, -50%) scale(var(--snw-scale, 1));
}
.snw-landing[hidden], .snw-game[hidden] { display: none; }

/* ---- Landing ---- */
.snw-landing {
  position: absolute;
  inset: 0;
  background: #0a0f1c url("../sledneck/screens/cover-final.webp") center / cover no-repeat;
}
/* The cover paints the title; the words are for readers and search. */
.snw-title {
  position: absolute;
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%);
  margin: 0;
}
.snw-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 1fr auto;
  gap: var(--s1) var(--s4);
  align-items: center;
  padding: var(--s3) var(--s5) var(--s2);
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.78) 22%);
}
.snw-play {
  grid-row: 1;
  height: 128px;
  border-radius: var(--r-pill);
  font-size: var(--fs-headline);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), 0 0 32px rgba(255, 181, 71, 0.45);
}
.snw-play:focus-visible { outline: var(--ring); outline-offset: 6px; }
.snw-controls {
  grid-row: 1 / span 2;
  grid-column: 2;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-l);
  background: var(--glass-strong);
  border: var(--edge-w) solid var(--line-strong);
}
.snw-controls h2 { margin: 0 0 var(--s1); font-size: var(--fs-label); color: var(--accent-mark); text-transform: uppercase; letter-spacing: 0.08em; }
.snw-controls table { width: 100%; border-collapse: collapse; font-size: 20px; }
.snw-controls th { text-align: left; font-size: var(--fs-micro); color: var(--text-3); font-weight: var(--fw-semibold); padding-bottom: 4px; }
.snw-controls td { padding: 3px var(--s2) 3px 0; color: var(--text); white-space: nowrap; }
.snw-controls td small { margin-left: var(--s1); color: var(--text-3); font-size: 16px; }
.snw-credits {
  grid-row: 2;
  grid-column: 1;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-2);
}

kbd, .snw-pad {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.5em;
  padding: 0 0.35em;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
  background: var(--surface-2);
  font: inherit;
  font-size: 0.85em;
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.snw-pad { border-radius: 999px; background: var(--surface-3); color: var(--accent-mark); }

/* ---- The game and its key bar ---- */
.snw-game { position: absolute; inset: 0; }
.snw-keybar {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: var(--safe-top);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s1);
  padding: 4px var(--s1);
  z-index: 30;
  background: var(--bg);
}
.snw-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 0 var(--s1);
  border-radius: var(--key-r);
  border: var(--edge-w) solid var(--key-edge);
  background: var(--key-fill);
  color: var(--key-text);
  font: inherit;
  touch-action: none;
}
.snw-chip:active { background: var(--key-press-fill); }
.snw-chip-label { max-width: 100%; font-size: 20px; line-height: 22px; font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The keys that press it: keyboard keys square, gamepad buttons round. */
.snw-chip-how { display: flex; gap: 3px; font-size: 13px; line-height: 1; flex: none; }
.snw-chip-how :is(kbd, .snw-pad) { height: 18px; border-width: 1px; border-radius: 4px; }
.snw-chip-how .snw-pad { border-radius: 999px; }
.snw-chip-how:empty { display: none; }
/* Nothing on this key just now: an empty outline, the word dim. */
.snw-chip.off { background: var(--key-off-fill); border-color: var(--key-off-edge); color: var(--key-off-text); }
.snw-chip.off .snw-chip-how { opacity: 0.55; }
.snw-chip.disabled { opacity: 0.55; }
