@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');
* { box-sizing: border-box; }
body { background: #000; display: flex; flex-direction: column; align-items: center; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 8px; overflow-x: hidden; }
#app-root { display: flex; flex-direction: column; align-items: center; width: 100%; }
#title {
  display: block;
  height: 72px;
  width: 227px;
  max-width: 100%;
  margin: 12px auto 16px;
  background: url("logo_title.png") no-repeat center;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
}
canvas { image-rendering: pixelated; width: 100%; max-width: 640px; aspect-ratio: 16/10; display: block; touch-action: none; }
#c-3d { display: none; position: absolute; inset: 0; pointer-events: none; }
#c-3d.active { display: block; }
#c.three-d-active { display: none; }
canvas.e2e-mask-canvas { visibility: hidden !important; }
/* Screenshot mode must not depend on network font timing, CSS transitions, or
   which renderer canvas was active during the preceding input coverage. */
body.e2e-mask-mode #canvas-wrap canvas { visibility: hidden !important; }
body.e2e-mask-mode #tv-menu-overlay,
body.e2e-mask-mode #tv-menu-overlay * {
  animation: none !important;
  transition: none !important;
}
body.e2e-mask-mode #tv-menu-overlay h2 { font-family: monospace; }
#canvas-wrap { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16/10; }
#play-overlay { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px;
  border-radius: 50%; background: rgba(0,0,0,0.55); border: 2px solid rgba(0,255,68,0.6);
  color: #0f4; font-size: 32px; line-height: 1; display: flex; align-items: center;
  justify-content: center; cursor: pointer; z-index: 5; padding: 0 0 0 6px; min-height: 84px;
  box-shadow: 0 0 24px rgba(0,255,68,0.25); }
#play-overlay:hover { background: rgba(0,40,10,0.7); box-shadow: 0 0 32px rgba(0,255,68,0.5); }
#play-overlay.hidden { display: none !important; }
body.fs-mode #play-overlay { display: none !important; }
#controls { width: 100%; max-width: 640px; }
#bar { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
#info { color: #888; font: 11px monospace; }
#info[data-state="tap"] { color: #0f0; font-weight: bold; animation: tap-blink 1s step-start infinite; }
@keyframes tap-blink { 50% { opacity: 0; } }
button, select { background: #111; border: 1px solid #333; color: #888; font: 12px monospace; padding: 6px 12px; cursor: pointer; min-height: 36px; }
button:hover, select:hover { border-color: #888; color: #aaa; }
button:disabled { color: #555; border-color: #333; cursor: not-allowed; opacity: 0.65; }
select { max-width: 220px; flex: 1; }
#config-bar { display: flex; gap: 6px; margin-top: 6px; width: 100%; max-width: 640px; }
#config-url { background: #111; border: 1px solid #333; color: #888; font: 11px monospace; padding: 6px; flex: 1; min-width: 0; }
#config-url:focus { border-color: #2a6; outline: none; }
#config-show { white-space: nowrap; font-size: 14px; padding: 6px 8px; }
#config-copy { white-space: nowrap; font-size: 14px; padding: 6px 8px; }
#config-error { color: #e44; font: 11px monospace; margin-top: 3px; max-width: 640px; width: 100%; min-height: 0; }
#source-bar { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
#source-bar label { color: #888; font: 12px monospace; }
.hidden { display: none !important; }
.ctl-caption { color: #555; font: 10px monospace; letter-spacing: 2px; text-transform: uppercase;
  margin-top: 10px; border-bottom: 1px solid #1a1a1a; padding-bottom: 2px; }

/* UI modes (see docs/UiUxReview.md): body.ui-simple shows the minimal
   music-player bar; anything else shows the full power cockpit. */
body.ui-simple #touch-bar, body.ui-simple #controls, body.ui-simple #compat {
  display: none !important;
}
body:not(.ui-simple) #simple-bar { display: none !important; }
body.fs-mode #simple-bar { display: none !important; }

/* Simple player bar */
#simple-bar { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 640px;
  margin-top: 10px; }
#simple-now-playing { color: #6a9; font: 14px monospace; min-height: 17px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
/* flex-wrap + min-width:0 on the select: a <select> never shrinks below its
   widest option, so without these the row overflows narrow phone screens. */
#simple-main { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#simple-pause { font-size: 18px; min-width: 56px; min-height: 44px; flex: 0 0 auto; }
#simple-stations { flex: 1 1 140px; min-width: 0; min-height: 44px; max-width: none; }
#simple-mic-note { color: #888; font: 13px monospace; flex: 1 1 auto; }
#simple-shuffle { min-height: 44px; white-space: nowrap; flex: 0 0 auto; }
#simple-fs, #simple-more-btn { min-height: 44px; min-width: 44px; font-size: 15px;
  flex: 0 0 auto; }
#simple-volume-row { display: flex; align-items: center; gap: 8px; }
#simple-volume-row label { color: #888; font: 13px monospace; }
#simple-volume { flex: 1; accent-color: #555; min-height: 36px; }
#simple-more { display: flex; flex-direction: column; gap: 10px; border: 1px solid #222;
  padding: 10px; }
.simple-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.simple-row label { color: #888; font: 12px monospace; min-width: 70px; }
#ui-power-btn { min-height: 40px; }
#volume-bar { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
#volume-bar label { color: #888; font: 12px monospace; }
#volume { width: 120px; accent-color: #555; min-height: 36px; }
#now-playing { display: flex; gap: 6px; align-items: center; margin-top: 4px; max-width: 640px; width: 100%; }
#now-playing-text { color: #6a9; font: 11px monospace; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#now-playing-copy { font-size: 13px; padding: 4px 8px; min-height: 28px; flex-shrink: 0; }
#scene-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px;
  margin-top: 6px; }
.scene-control { display: flex; align-items: center; gap: 6px; min-width: 0; }
.scene-control label { color: #888; font: 12px monospace; flex: 0 0 auto; }
.scene-control select, .scene-control button { min-width: 0; max-width: none; flex: 1; }
.scene-control input[type="range"] { min-width: 0; flex: 1; }
.scene-speed-value { color: #6a9; font: 12px monospace; flex: 0 0 auto; min-width: 4ch; text-align: right; }
#scene-cycle { color: #6a9; text-transform: uppercase; }
@media (max-width: 520px) {
  #scene-controls { grid-template-columns: 1fr; }
}
details { color: #888; font: 11px monospace; margin-top: 12px; max-width: 640px; width: 100%; }
details summary { cursor: pointer; padding: 8px 0; }
details table { border-collapse: collapse; margin-top: 4px; width: 100%; }
details th, details td { border: 1px solid #333; padding: 4px 6px; text-align: left; }
details p { margin-top: 6px; }
.audio-compat-table { max-width: 100%; overflow-x: auto; }
.audio-compat-table table { min-width: 520px; }
.resolution-info-card { margin-top: 10px; padding: 8px; border: 1px solid #333; border-radius: 4px; background: #0b0b0b; }
.resolution-info-card table { margin-top: 7px; }
.resolution-info-card th { color: #2a6; width: 35%; }
.report-problem { margin-top: 12px; padding-top: 12px; border-top: 1px solid #222; }
.report-problem-toggle { color: #0f4; background: #151515; border: 1px solid #2a6; }
.report-problem-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.report-problem-form label { color: #aaa; }
.report-problem-form textarea,
.report-problem-form input[type="email"] {
  box-sizing: border-box;
  width: 100%;
  color: #ddd;
  background: #090909;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px;
  font: inherit;
}
.report-problem-form textarea { min-height: 84px; resize: vertical; }
.report-diagnostics-choice { display: flex; align-items: center; gap: 7px; }
.report-diagnostics-preview { max-height: 260px; overflow-y: auto; padding: 8px; background: #0b0b0b; border: 1px solid #333; border-radius: 4px; }
.report-diagnostic-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #222; overflow-wrap: anywhere; }
.report-diagnostic-row:last-child { border-bottom: 0; }
.report-diagnostic-row button { flex: 0 0 auto; padding: 3px 6px; font-size: 10px; }
.report-privacy-note { color: #777; font-size: 11px; }
.report-problem-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#report-problem-status { color: #0f4; }
kbd { background: #222; border: 1px solid #444; border-radius: 2px; padding: 0 3px; font: 10px monospace; color: #aaa; }
#banner { margin-top: 12px; }
/* Fullscreen overlay mode */
body.fs-mode { padding: 0; }
body.fs-mode #canvas-wrap { width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; }
body.fs-mode #title, body.fs-mode #controls, body.fs-mode #touch-bar,
body.fs-mode details, body.fs-mode #banner, body.fs-mode footer { display: none !important; }
body.fs-mode canvas { width: 100vw; height: 100vh; max-width: none; position: fixed; top: 0; left: 0; z-index: 100; }
#fs-exit { display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 200; background: rgba(30,30,30,0.6); border: 1px solid rgba(100,100,100,0.4);
  color: rgba(200,200,200,0.8); font: 14px monospace; padding: 12px 24px; border-radius: 8px;
  backdrop-filter: blur(4px); cursor: pointer; transition: opacity 0.3s; }
body.fs-mode #fs-exit.visible { display: block; }
#radio-warning {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 250;
  max-width: min(80vw, 560px);
  padding: 9px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(235, 170, 45, 0.7);
  border-radius: 4px;
  background: rgba(35, 25, 5, 0.78);
  color: #f1c46a;
  font: 12px monospace;
  line-height: 1.35;
  pointer-events: none;
  text-align: center;
}
#radio-warning.hidden { display: none; }
/* Touch toolbar */
#touch-bar { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 640px; }
#touch-bar button { font-size: 13px; padding: 5px 8px; min-width: 44px; min-height: 44px; flex: 0 0 auto; user-select: none; -webkit-user-select: none;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tb-ico { font-size: 14px; line-height: 1.1; }
.tb-label { font-size: 8px; color: #666; letter-spacing: 0.5px; line-height: 1; }
#touch-bar button:hover .tb-label { color: #999; }
.tb-sep { width: 1px; height: 28px; background: #333; align-self: center; flex: 0 0 1px; margin: 0 2px; }
/* Mobile: hide keyboard section */
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  #title { height: 48px; margin-bottom: 8px; }
  body { padding: 4px; justify-content: flex-start; }
  #compat { display: none; }
  #config-url { font-size: 10px; }
  /* Collapsed, the intro is a heading sitting above the canvas; at phone
     widths the full sentence would wrap to three lines and push the
     visualizer off screen. */
  #intro details { font-size: 13px; }
  #intro summary h1 { font-size: 1.05em; }
}
/* Landscape mobile: maximize canvas */
@media (max-height: 500px) and (orientation: landscape) {
  #title { display: none; }
  body { padding: 0; justify-content: center; }
  #canvas-wrap { max-width: none; height: 100vh; aspect-ratio: auto; }
  canvas { width: 100vw; height: 100vh; max-width: none; }
  #controls { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.85); padding: 4px 8px; transform: translateY(100%); transition: transform 0.2s; z-index: 10; }
  #controls.visible { transform: translateY(0); }
  #touch-bar { display: flex; position: fixed; top: 8px; right: 8px; z-index: 10; flex-wrap: nowrap; gap: 2px; width: auto; }
  #touch-bar button { min-width: 36px; min-height: 36px; padding: 4px 6px; font-size: 11px; opacity: 0.7; }
  .tb-label { display: none; }
  #touch-menu { display: block; }
  #banner { display: none; }
  details { display: none; }
  #simple-more details { display: block; }
  #simple-bar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.85);
    padding: 4px 8px; margin: 0; max-width: none; z-index: 10; gap: 4px; }
  #simple-now-playing { display: none; }
  #simple-volume-row { display: none; }
}
/* touch-menu only relevant in landscape where controls panel slides in */
#touch-menu { display: none; }
#tooltip { position: fixed; background: rgba(0,0,0,.85); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 9999; white-space: nowrap; }
#tooltip.visible { opacity: 1; }

/* Footer styling */
footer { margin-top: 24px; padding: 16px 0; border-top: 1px solid #222; text-align: center; font: 11px monospace; color: #777; width: 100%; max-width: 640px; }
footer a { color: #888; text-decoration: none; margin: 0 10px; transition: color 0.2s; }
footer a:hover { color: #0f4; text-shadow: 0 0 4px #0f4; }
footer p { margin: 8px 0 0; }
#store-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
footer a.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 168px;
  min-height: 50px;
  margin: 0;
  padding: 7px 12px;
  background: #050505;
  border: 1px solid #444;
  border-radius: 6px;
  color: #f2f2f2;
  text-align: left;
}
footer a.store-badge:hover {
  border-color: #2a6;
  color: #fff;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(0, 255, 68, 0.18);
}
.store-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid #555;
  border-radius: 4px;
  color: #0f4;
  font: 18px/1 monospace;
}
.store-icon-amazon {
  color: #ffb13b;
  font: bold 21px/1 Arial, sans-serif;
}
.store-copy { display: flex; flex-direction: column; gap: 1px; line-height: 1.05; }
.store-copy span { color: #aaa; font-size: 8px; letter-spacing: 0; }
.store-copy strong { color: #fff; font: bold 15px/1.05 Arial, sans-serif; letter-spacing: 0; }

/* ToS Overlay Styles */
#tos-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#tos-overlay.hidden {
  display: none !important;
}
.tos-modal {
  background: #111;
  border: 1px solid #2a6;
  border-radius: 8px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 0 20px rgba(15, 68, 30, 0.5);
  text-align: center;
  font-family: monospace;
  color: #888;
}
.tos-modal h2 {
  font-family: 'MedievalSharp', serif;
  color: #2a6;
  margin-top: 0;
  font-size: 1.6em;
  text-shadow: 0 0 6px #0f4;
}
.tos-sub {
  color: #999;
  font-size: 12px;
  margin: -8px 0 14px;
}
.tos-warning {
  border: 1px solid #a70;
  border-left-width: 4px;
  border-radius: 4px;
  background: rgba(200, 130, 0, 0.08);
  padding: 12px;
  margin: 16px 0;
  color: #da5;
  text-align: left;
  font-size: 11px;
  line-height: 1.4;
}
.tos-modal p {
  font-size: 12px;
  margin-bottom: 20px;
}
.tos-modal a {
  color: #2a6;
  text-decoration: underline;
}
.tos-modal a:hover {
  color: #0f4;
}
#tos-agree-btn {
  background: #2a6;
  border: 1px solid #0f4;
  color: #000;
  font-weight: bold;
  font-size: 14px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  width: 100%;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(42, 102, 17, 0.3);
}
#tos-agree-btn:hover {
  background: #0f4;
  color: #000;
  box-shadow: 0 0 15px #0f4;
}
#mobile-app-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1b0c34, #483d8b);
  color: #fff;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  position: relative;
  z-index: 2000;
  border-bottom: 1px solid #7b68ee;
}
#mobile-app-banner.hidden {
  display: none !important;
}
#mobile-app-banner span {
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
#mobile-app-open-btn {
  background: #0f4;
  color: #000;
  border: none;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 12px;
  margin-right: 8px;
  transition: all 0.2s ease;
}
#mobile-app-open-btn:hover {
  box-shadow: 0 0 10px #0f4;
}
#mobile-app-close-btn {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  vertical-align: middle;
  opacity: 0.7;
}
#mobile-app-close-btn:hover {
  opacity: 1;
}

/* TV Menu Overlay Styles */
#tv-menu-overlay {
  position: fixed;
  top: 27px;
  left: 48px;
  bottom: 27px;
  width: 320px;
  background: rgba(10, 10, 10, 0.95);
  border: 2px solid #2a6;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(15, 68, 30, 0.7);
  z-index: 50000;
  display: flex;
  flex-direction: column;
  padding: 20px;
  font-family: monospace;
  color: #888;
  transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
  transform: translateX(0);
  opacity: 1;
}
#tv-menu-overlay.hidden {
  transform: translateX(-150%);
  opacity: 0;
  pointer-events: none;
}
#tv-menu-overlay h2 {
  font-family: 'MedievalSharp', serif;
  color: #2a6;
  margin-top: 0;
  font-size: 1.4em;
  text-shadow: 0 0 6px #0f4;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.tv-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 0;
  position: relative;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.tv-menu-list::-webkit-scrollbar {
  display: none; /* Hide scrollbar for WebKit/Blink (Android WebView) */
}
.tv-system-info-list {
  scrollbar-width: thin;
  scrollbar-color: #2a6 #111;
}
.tv-system-info-list::-webkit-scrollbar { display: block; width: 6px; }
.tv-system-info-list::-webkit-scrollbar-thumb { background: #2a6; }
.tv-system-info-list::-webkit-scrollbar-track { background: #111; }
.tv-menu-group {
  font-size: 10px;
  color: #2a6;
  letter-spacing: 3px;
  margin: 10px 0 2px;
  border-bottom: 1px solid #163;
  padding-bottom: 3px;
}
.tv-menu-group:first-child { margin-top: 0; }
.tv-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #151515;
  border: 1px solid #222;
  border-radius: 4px;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tv-menu-item.focused {
  background: #2a6;
  border-color: #0f4;
  color: #000;
  font-weight: bold;
  box-shadow: 0 0 10px #0f4;
  transform: scale(1.02);
}
.tv-menu-item.disabled {
  color: #666;
  cursor: not-allowed;
  opacity: 0.55;
}
.tv-menu-item-val {
  font-weight: bold;
}
.tv-menu-item.focused .tv-menu-item-val {
  color: #fff;
  text-shadow: 0 0 4px #000;
}
.tv-system-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #222;
  border-radius: 4px;
  font-size: 11px;
  color: #aaa;
  overflow-wrap: anywhere;
}
.tv-system-info span:first-child { color: #2a6; font-size: 10px; letter-spacing: 1px; }
.tv-resolution-mappings { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 0; }
.tv-resolution-mappings div { display: flex; justify-content: space-between; gap: 12px; }
.tv-resolution-mappings dt, .tv-resolution-mappings dd { margin: 0; }
.tv-resolution-mappings dt { color: #aaa; }
.tv-resolution-mappings dd { color: #ddd; font-weight: bold; }
.tv-menu-help {
  font-size: 9px;
  color: #888;
  margin-top: 8px;
  border-top: 1px solid #333;
  padding-top: 8px;
  line-height: 1.3;
}
/* custom focus outlines for regular buttons for standard accessibility */
button:focus, select:focus, input:focus {
  outline: 2px solid #2a6;
  box-shadow: 0 0 8px #2a6;
}

/* Landing-page intro (web/index.html.in, web/intro.js).
   Everything is scoped under #intro because the generic `details` rules above
   style the app's own control-panel disclosures at 11px, which is unreadable
   for prose. Fullscreen and landscape-mobile already hide bare `details`, so
   the intro correctly disappears when the canvas takes over the viewport. */
/* intro.js relocates this above the app's footer, so it needs its own rule off
   the controls above it; the footer's border-top closes the section below. */
#intro { width: 100%; max-width: 640px; margin: 16px 0 0; padding-top: 8px; border-top: 1px solid #222; }
#intro details { color: #999; font: 14px/1.7 monospace; margin: 0; max-width: none; }
#intro summary { cursor: pointer; padding: 6px 0; color: #2a6; }
#intro summary h1 {
  display: inline;
  font-family: 'MedievalSharp', serif;
  font-size: 1.3em;
  font-weight: normal;
  color: #2a6;
  text-shadow: 0 0 6px #0f4;
}
#intro a { color: #2a6; text-decoration: none; transition: color 0.2s; }
#intro a:hover { color: #0f4; text-shadow: 0 0 4px #0f4; }
#intro h2 {
  font-family: 'MedievalSharp', serif;
  font-size: 1.15em;
  font-weight: normal;
  color: #2a6;
  margin: 24px 0 6px;
}
.intro-body { padding-bottom: 6px; }
.intro-body p { margin: 12px 0; }
.intro-warning { color: #f1c46a; border-left: 2px solid rgba(235, 170, 45, 0.5); padding-left: 10px; }
.intro-links { text-align: center; font-size: 12px; }
.intro-links a { margin: 0 4px; }
.intro-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.intro-videos li { margin: 0; min-width: 0; }
button.intro-video {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid #333;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}
button.intro-video:hover { border-color: #2a6; }
button.intro-video:hover .intro-video-play { color: #0f4; text-shadow: 0 0 12px #0f4; }
.intro-video-thumb { position: relative; display: block; }
/* hqdefault is a 4:3 canvas with letterboxing baked in; cropping to 16:9
   trims the bars rather than rendering black slabs above and below. */
.intro-video-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.intro-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #2a6;
  text-shadow: 0 0 10px #000;
}
.intro-video-label { display: block; padding: 6px 8px; text-align: left; font: 11px monospace; color: #888; }
.intro-video-label strong { display: block; color: #aaa; font-weight: normal; }
.intro-video-label em { font-style: normal; color: #666; }
.intro-video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid #333; }
