:root {
  --floor: #1a120c;
  --plank: #24180f;
  --neon: #ff7a18;
  --cream: #f4e6c8;
  --mute: #b9a078;
  --ink: #2a1c12;
  --rail: 6.1rem;
  --bezel: #070605;
  --line: #3a2a1c;
}

html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
  --floor: #efe4d2;
  --plank: #f7efe2;
  --neon: #d35400;
  --cream: #22170e;
  --mute: #6b5640;
  --ink: #22170e;
  --bezel: #d4c7b0;
  --line: #d3c3aa;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background: var(--bezel);
  color: var(--cream);
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  overflow: hidden;
}

.bezel {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  box-shadow: inset 0 0 0 10px #111, inset 0 0 0 12px #5a3a12;
  z-index: 6;
}

.orbit {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.marquee {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  padding: 0;
  border: 1px solid #000;
  background: #000;
  cursor: pointer;
  height: 3.15rem;
  width: auto;
  transform-origin: center center;
  box-shadow: 0 0 0 1px rgba(244, 230, 200, 0.12);
}

.marquee img {
  display: block;
  height: 3.15rem;
  width: auto;
  max-width: 11.5rem;
  object-fit: contain;
  object-position: center;
}

.marquee:hover,
.marquee:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
  z-index: 6;
}

.marquee.is-on {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  z-index: 7;
  box-shadow: 0 0 18px rgba(255, 122, 24, 0.45);
}

.marquee .badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon);
}

.glass {
  position: fixed;
  z-index: 5;
  inset: var(--rail);
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #000;
  border-radius: 0.4rem;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px #1a1a1a;
}

.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 18px 22px, #fff, transparent),
    radial-gradient(1px 1px at 92px 68px, #c9d4ee, transparent),
    radial-gradient(1.5px 1.5px at 164px 34px, #fff, transparent),
    radial-gradient(1px 1px at 48px 148px, #9aa8c8, transparent),
    radial-gradient(1px 1px at 210px 176px, #fff, transparent),
    radial-gradient(2px 2px at 130px 210px, #e8eefc, transparent),
    radial-gradient(1px 1px at 252px 96px, #a8b4d0, transparent);
  background-size:
    280px 240px,
    320px 260px,
    400px 340px,
    240px 220px,
    360px 300px,
    420px 380px,
    300px 280px;
  animation: star-scroll 90s linear infinite;
}

.starfield.spark {
  background-image:
    radial-gradient(1.5px 1.5px at 40px 80px, #fff, transparent),
    radial-gradient(2px 2px at 180px 30px, #ffe9a8, transparent),
    radial-gradient(1px 1px at 260px 160px, #fff, transparent),
    radial-gradient(2px 2px at 90px 200px, #cde4ff, transparent),
    radial-gradient(1.5px 1.5px at 310px 110px, #fff, transparent);
  background-size:
    340px 280px,
    280px 220px,
    400px 300px,
    260px 240px,
    360px 320px;
  animation:
    star-scroll 55s linear infinite reverse,
    star-spark 2.8s ease-in-out infinite;
}

@keyframes star-scroll {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to {
    background-position:
      280px 240px,
      -160px 130px,
      200px -170px,
      -120px 220px,
      180px 150px,
      -210px 190px,
      150px -140px;
  }
}

@keyframes star-spark {
  0%, 100% { opacity: 0.25; filter: none; }
  18% { opacity: 1; filter: drop-shadow(0 0 4px #fff); }
  32% { opacity: 0.2; }
  48% { opacity: 0.95; filter: drop-shadow(0 0 6px #ffe9a8); }
  62% { opacity: 0.15; }
  78% { opacity: 0.85; }
}

.glass:has(#attract:not([hidden])) {
  align-items: center;
}

.glass:has(#profile:not([hidden])) {
  align-items: stretch;
  justify-content: stretch;
}

.panel {
  position: relative;
  z-index: 1;
  padding: 1.6rem 2rem 2.4rem;
  max-width: 46rem;
}

.attract.panel {
  text-align: center;
  margin: 0 auto;
}

.profile.panel:not([hidden]) {
  max-width: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 1rem 0.75rem;
}

.tag {
  margin: 0 0 0.35rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--neon);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.9;
  font-weight: 700;
  text-shadow:
    0 0 18px rgba(255, 122, 24, 0.35),
    0 2px 0 #3a1c08;
  text-wrap: pretty;
}

h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  line-height: 1;
}

.attract h1 {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
}

h3,
h4 {
  margin: 1.4rem 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-weight: 400;
}

.lede,
.fact,
.hint {
  margin: 1.1rem auto 0;
  max-width: 36rem;
  line-height: 1.45;
  color: var(--mute);
  text-wrap: pretty;
}

.fact {
  color: var(--cream);
  font-size: 1.05rem;
}

.hint {
  font-size: 0.85rem;
}

.actions {
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  align-items: center;
  justify-content: center;
}

a {
  color: var(--neon);
}

a:hover,
a:focus-visible {
  color: #ffd08a;
}

button {
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--neon);
  border: 0;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: #ffd08a;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  float: none;
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--mute);
  padding: 0.4rem 0.7rem;
}

.close:hover,
.close:focus-visible {
  background: #3a2414;
  color: var(--cream);
}

.profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem 1rem;
  align-items: center;
  clear: both;
  max-width: none;
  margin: 0 3rem 0.45rem 0;
  flex: 0 0 auto;
}

.profile-head img {
  height: 2.35rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
  background: #000;
  border: 1px solid #000;
}

.profile-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(11rem, 0.2fr) minmax(0, 1fr) minmax(12.5rem, 0.22fr);
  gap: 0.55rem 0.85rem;
  align-items: stretch;
}

.ken-notes,
.tg-board {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.ken-notes {
  justify-content: center;
  text-align: center;
  padding: 0 0.35rem;
}

.ken-notes h3,
.tg-board h3 {
  margin: 0 0 0.5rem;
}

.ken-notes .fact {
  margin: 0 auto;
  max-width: 18rem;
  text-align: center;
}

.stage-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.tapes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  max-width: none;
  justify-content: center;
}

.tapes button {
  background: #3a2414;
  color: var(--cream);
  text-transform: none;
  letter-spacing: 0;
  font-family: Palatino, Georgia, serif;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
}

.tapes button.is-on,
.tapes button:hover {
  background: var(--neon);
  color: var(--ink);
}

.crt {
  flex: 1 1 auto;
  margin: 0;
  background: #050505;
  padding: 0.4rem 0.4rem 0.3rem;
  max-width: none;
  min-height: 62vh;
  display: flex;
  flex-direction: column;
}

.crt video,
.crt iframe {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  max-height: none;
  background: #000;
  border: 0;
}

.crt video[hidden],
.crt iframe[hidden],
.crt img[hidden] {
  display: none !important;
}

.crt iframe {
  aspect-ratio: auto;
  height: 100%;
}

.crt img {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  background: #000;
}

.pics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  max-width: none;
  justify-content: center;
}

.pics button {
  padding: 0;
  background: #000;
  border: 1px solid #3a2a1c;
}

.pics button.is-on,
.pics button:hover,
.pics button:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
  background: #000;
}

.pics img {
  display: block;
  width: 5.6rem;
  height: 5.6rem;
  object-fit: cover;
}

.crt a {
  display: inline-block;
  margin: 0.45rem 0.2rem 0.2rem;
  font-size: 0.9rem;
}

.crt a[hidden] {
  display: none !important;
}

.tg-board {
  justify-content: center;
  padding: 0 0.15rem;
}

.local-board {
  margin: 0 0 0.85rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--line);
}

.local-board h3 {
  margin: 0 0 0.5rem;
}

.tg-track {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
}

.tg-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tg-list li {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr) auto;
  gap: 0.3rem 0.4rem;
  align-items: baseline;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--line);
}

.tg-rank {
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  color: var(--neon);
  font-size: 0.78rem;
}

.tg-who {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-pts {
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
  font-size: 0.8rem;
}

.tg-list .empty {
  display: block;
  color: var(--mute);
  font-size: 0.9rem;
  border: 0;
  padding: 0.2rem 0;
}

.tg-board a {
  margin-top: 0.65rem;
  font-size: 0.85rem;
}

.tg-edit-wrap {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.tg-edit-wrap .hint {
  margin: 0 0 0.45rem;
  max-width: none;
  text-align: left;
}

.tg-edit-wrap .notes-label {
  text-align: left;
}

.tg-edit .score-add {
  margin-top: 0.35rem;
  gap: 0.3rem 0.4rem;
}

.tg-edit .score-add label {
  flex: 1 1 100%;
  margin: 0;
}

.profile.walk .ken-notes,
.profile.walk .tg-board {
  visibility: hidden;
}

@media (min-width: 861px) {
  .profile.jukebox .profile-stage {
    grid-template-columns: minmax(11rem, 0.2fr) minmax(0, 1fr);
  }
}

.profile.jukebox .tg-board {
  display: none;
}

.book {
  margin-top: 0.55rem;
  margin-inline: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  max-width: 18rem;
  text-align: left;
}

.ken-notes textarea {
  min-height: 7.5rem;
  text-align: center;
}

.notes-label,
.score-add label {
  display: block;
  margin: 0.4rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
}

textarea,
input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  background: #120c08;
  color: var(--cream);
  border: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  font: inherit;
}

.book-row,
.book-tools,
.score-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  align-items: end;
  margin-top: 0.6rem;
}

.score-add label {
  flex: 1 1 7rem;
}

.score-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.score-list li {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.score-list .who {
  color: var(--cream);
}

.score-list .pts {
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  color: var(--neon);
}

.score-list button {
  background: transparent;
  color: var(--mute);
  border: 1px solid var(--line);
  padding: 0.25rem 0.45rem;
  text-transform: none;
}

.saved {
  color: #c6e28a;
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.import {
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.import input {
  width: auto;
  display: inline;
  margin-left: 0.4rem;
}

.orbit-toggle {
  position: fixed;
  z-index: 8;
  left: calc(var(--rail) + 0.8rem);
  bottom: calc(var(--rail) + 0.8rem);
  background: #120c08;
  color: var(--cream);
  border: 1px solid var(--mute);
}

.theme-toggle {
  position: absolute;
  z-index: 2;
  right: 0.8rem;
  bottom: 0.8rem;
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--mute);
  padding: 0.4rem 0.7rem;
}

.orbit-toggle:hover,
.orbit-toggle:focus-visible {
  background: #3a2414;
  color: var(--cream);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: #3a2414;
  color: var(--cream);
}

.empty-scores {
  margin: 0;
  color: var(--mute);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  :root {
    --rail: 0px;
  }

  body {
    overflow: auto;
  }

  .bezel {
    display: none;
  }

  .orbit {
    position: relative;
    height: auto;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.35rem;
    padding: 0.5rem;
    background: #070605;
    -webkit-overflow-scrolling: touch;
  }

  .marquee {
    position: relative;
    transform: none !important;
    flex: 0 0 auto;
    height: 3.6rem;
  }

  .marquee img {
    height: 3.6rem;
    max-width: 12rem;
  }

  .glass {
    position: relative;
    inset: auto;
    min-height: calc(100vh - 5rem);
    border-radius: 0;
  }

  .orbit-toggle {
    display: none;
  }

  .profile.panel {
    height: auto;
  }

  .profile-head {
    grid-template-columns: 1fr;
    margin-right: 0;
  }

  .profile-stage,
  .profile.jukebox .profile-stage {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .profile.panel:not([hidden]) {
    height: auto;
    min-height: 0;
  }

  .profile.jukebox .profile-stage {
    display: flex;
    flex-direction: column;
  }

  .profile.jukebox .stage-center,
  .profile.jukebox .crt {
    width: 100%;
    max-width: 100%;
  }

  .ken-notes {
    order: 2;
    justify-content: flex-start;
  }

  .stage-center {
    order: 1;
  }

  .tg-board {
    order: 3;
    justify-content: flex-start;
  }

  .crt {
    min-height: 0;
  }

  .crt video,
  .crt iframe,
  .crt img {
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
  }

  .profile.jukebox .crt video {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
  }

  .panel {
    padding: 1.2rem 1rem 2rem;
  }

  .score-list li {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
}

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

  .starfield,
  .starfield.spark {
    animation: none;
  }
}

html[data-theme="light"] .bezel {
  background:
    radial-gradient(120% 80% at 50% 40%, transparent 40%, rgba(80, 50, 20, 0.16) 100%);
  box-shadow: inset 0 0 0 10px #e8dcc8, inset 0 0 0 12px #8a6230;
}

html[data-theme="light"] .glass {
  background-color: #f4ead8;
  box-shadow:
    inset 0 0 80px rgba(80, 50, 20, 0.08),
    0 0 0 1px #cbb99a;
}

html[data-theme="light"] .starfield {
  background-image:
    radial-gradient(1px 1px at 18px 22px, rgba(40, 32, 24, 0.5), transparent),
    radial-gradient(1px 1px at 92px 68px, rgba(70, 58, 90, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 164px 34px, rgba(34, 28, 22, 0.55), transparent),
    radial-gradient(1px 1px at 48px 148px, rgba(90, 70, 48, 0.4), transparent),
    radial-gradient(1px 1px at 210px 176px, rgba(40, 32, 24, 0.5), transparent),
    radial-gradient(2px 2px at 130px 210px, rgba(80, 60, 40, 0.35), transparent),
    radial-gradient(1px 1px at 252px 96px, rgba(60, 50, 80, 0.4), transparent);
}

html[data-theme="light"] .starfield.spark {
  background-image:
    radial-gradient(1.5px 1.5px at 40px 80px, rgba(180, 90, 20, 0.55), transparent),
    radial-gradient(2px 2px at 180px 30px, rgba(200, 140, 40, 0.5), transparent),
    radial-gradient(1px 1px at 260px 160px, rgba(40, 32, 24, 0.45), transparent),
    radial-gradient(2px 2px at 90px 200px, rgba(140, 90, 40, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 310px 110px, rgba(180, 90, 20, 0.5), transparent);
}

html[data-theme="light"] h1 {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 18px rgba(211, 84, 0, 0.28);
}

html[data-theme="light"] a:hover,
html[data-theme="light"] a:focus-visible {
  color: #8a3200;
}

html[data-theme="light"] .close:hover,
html[data-theme="light"] .close:focus-visible {
  background: #ead9c0;
  color: var(--cream);
}

html[data-theme="light"] .tapes button {
  background: #ead9c0;
  color: var(--cream);
}

html[data-theme="light"] .tapes button.is-on,
html[data-theme="light"] .tapes button:hover {
  background: var(--neon);
  color: #fff8ee;
}

html[data-theme="light"] .pics button {
  border-color: #cbb99a;
}

html[data-theme="light"] textarea,
html[data-theme="light"] input {
  background: #fffdf8;
  color: var(--cream);
}

html[data-theme="light"] .orbit-toggle {
  background: #fffdf8;
  color: var(--cream);
}

html[data-theme="light"] .theme-toggle {
  background: transparent;
  color: var(--cream);
}

html[data-theme="light"] .orbit-toggle:hover,
html[data-theme="light"] .orbit-toggle:focus-visible,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-toggle:focus-visible {
  background: #ead9c0;
  color: var(--cream);
}

html[data-theme="light"] .saved {
  color: #3a6b1a;
}

html[data-theme="light"] .score-list button {
  color: var(--mute);
}

@media (max-width: 860px) {
  html[data-theme="light"] .orbit {
    background: #d4c7b0;
  }
}

/* From the Vault box under Ken's notes (2026-11-21) */
.vault-box {
  margin: 1.1rem auto 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  max-width: 18rem;
  width: 100%;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.35;
}
.vault-box[hidden] { display: none; }
.vault-box h3 { text-align: center; }
.vault-box ul { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.vault-box li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.vault-box li:last-child { border-bottom: 0; }
.vault-st {
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.vault-log .is-open .vault-st { color: #ff6a4d; }
.vault-log .is-watch .vault-st { color: var(--neon); }
.vault-fixed, .vault-quiet { margin: 0 0 0.5rem; color: var(--cream); }
.vault-quiet { color: var(--mute); }
.vault-docs a { font-size: 0.82rem; }
.vault-more { display: block; margin-top: 0.35rem; text-align: center; font-size: 0.82rem; }
@media (max-width: 860px) {
  .vault-box { max-width: none; }
}/* keep Ken's notes centred but never clip the top when the column overflows */
.ken-notes { justify-content: flex-start; }
.ken-notes::before,
.ken-notes::after { content: ""; flex: 1 1 0; min-height: 0; }