/* ==========================================================
   RICKY WOLFE — WIN95 SITE — self-contained, no dependencies.
   Change the artist look in the :root block below.
   ========================================================== */

:root {
  --desktop: #000080;
  --face: #c0c0c0;
  --light: #dfdfdf;
  --white: #ffffff;
  --shadow: #808080;
  --black: #0a0a0a;
  --title: #000080;
  --title-end: #1084d0;
  --link: #0000ee;
  --font: Tahoma, "MS Sans Serif", "Segoe UI", Verdana, Arial, sans-serif;
  --taskbar-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--desktop);
  color: var(--black);
  font-family: var(--font);
  font-size: 16px;            /* 16px+ stops iOS zooming into inputs */
  line-height: 1.45;
  /* room for the fixed taskbar, plus the iPhone home-bar inset */
  padding-bottom: calc(var(--taskbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
  overflow-x: hidden;
}

img, iframe { max-width: 100%; }

a { color: var(--link); }
a:visited { color: #551a8b; }

/* ---------- bevel helpers ---------- */
.raised {
  background: var(--face);
  box-shadow:
    inset -1px -1px var(--black),
    inset 1px 1px var(--white),
    inset -2px -2px var(--shadow),
    inset 2px 2px var(--light);
}
.sunken {
  background: var(--white);
  box-shadow:
    inset -1px -1px var(--white),
    inset 1px 1px var(--shadow),
    inset -2px -2px var(--light),
    inset 2px 2px var(--black);
}

/* ---------- layout ---------- */
.desktop {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 10px 0;
  grid-template-columns: minmax(0, 1fr);   /* minmax(0) stops embeds forcing sideways scroll */
}
.desktop > * { min-width: 0; }

@media (min-width: 900px) {
  .desktop {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
    padding: 28px 24px 0;
    gap: 20px;
  }
  .span-2 { grid-column: 1 / -1; }
}

/* ---------- window ---------- */
.window {
  padding: 3px;
  margin: 0;
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 2px 3px 2px 6px;
  color: var(--white);
  background: linear-gradient(90deg, var(--title), var(--title-end));
  font-weight: bold;
  font-size: 15px;
}
.titlebar h2 {
  flex: 1;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.win-btn {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 30px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--black);
  font: bold 14px/1 var(--font);
  cursor: pointer;
  background: var(--face);
  box-shadow:
    inset -1px -1px var(--black),
    inset 1px 1px var(--white),
    inset -2px -2px var(--shadow),
    inset 2px 2px var(--light);
}
.win-btn:active {
  box-shadow:
    inset -1px -1px var(--white),
    inset 1px 1px var(--black),
    inset -2px -2px var(--light),
    inset 2px 2px var(--shadow);
  padding: 2px 0 0 2px;
}
/* bigger minimize button on touch screens */
@media (pointer: coarse) {
  .titlebar { min-height: 40px; }
  .win-btn { width: 44px; height: 34px; font-size: 16px; }
}
.window-body {
  padding: 12px;
}
.window.collapsed .window-body { display: none; }

.window-body > :first-child { margin-top: 0; }
.window-body > :last-child { margin-bottom: 0; }

/* ---------- type ---------- */
h1 {
  margin: 0 0 4px;
  font-size: clamp(30px, 9vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.tagline { margin: 0 0 14px; }
h3 { margin: 0 0 6px; font-size: 18px; }
p { margin: 0 0 12px; }
.muted { color: #404040; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;                 /* comfortable thumb target */
  padding: 8px 18px;
  border: 0;
  border-radius: 0;
  color: var(--black);
  background: var(--face);
  font: 16px/1.2 var(--font);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow:
    inset -1px -1px var(--black),
    inset 1px 1px var(--white),
    inset -2px -2px var(--shadow),
    inset 2px 2px var(--light);
}
.btn:visited { color: var(--black); }
.btn:active {
  box-shadow:
    inset -1px -1px var(--white),
    inset 1px 1px var(--black),
    inset -2px -2px var(--light),
    inset 2px 2px var(--shadow);
  padding: 9px 17px 7px 19px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 140px; }

:focus-visible {
  outline: 1px dotted var(--black);
  outline-offset: -5px;
}
.win-btn:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* ---------- latest release ---------- */
.release {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.cover {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  padding: 3px;
  text-align: center;
  font-size: 12px;
  color: #404040;
  overflow: hidden;
}
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 380px) {
  .release { grid-template-columns: minmax(0, 1fr); }
  .cover { width: 100%; height: auto; aspect-ratio: 1; }
}
.release-text .btn-row { margin-top: 10px; }

/* ---------- shows (notepad) ---------- */
.notepad {
  padding: 10px 12px;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.5;
}
.notepad ul { margin: 0; padding: 0; list-style: none; }
.notepad li { padding: 6px 0; border-bottom: 1px dotted var(--shadow); }
.notepad li:last-child { border-bottom: 0; }
.notepad .date { display: block; font-weight: bold; }

/* ---------- desktop icons ---------- */
.icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.icons > li { flex: 0 0 calc((100% - 8px) / 3); min-width: 0; }   /* 3 per row on phones */
@media (min-width: 700px) {
  .icons > li { flex: 0 0 108px; }
}
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 96px;
  padding: 8px 2px;
  color: var(--white);
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.icon:visited { color: var(--white); }
.icon-img {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
}
.icon-img img {
  display: block;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}
/* the little Win95 shortcut arrow */
.icon-img::after {
  content: "\2197";
  position: absolute;
  left: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--black);
  font: bold 11px/1 var(--font);
}
.icon-label { padding: 1px 4px; }
.icon:hover .icon-label,
.icon:active .icon-label,
.icon:focus-visible .icon-label {
  background: var(--title);
  outline: 1px dotted var(--white);
  outline-offset: -1px;
}
.icon:focus-visible { outline: 0; }

/* ---------- taskbar ---------- */
.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: calc(var(--taskbar-h) + env(safe-area-inset-bottom, 0px));
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
  background: var(--face);
  box-shadow: inset 0 1px var(--light), inset 0 2px var(--white);
  border-top: 1px solid var(--face);
}
.start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  color: var(--black);
  background: var(--face);
  font: bold 16px/1 var(--font);
  cursor: pointer;
  box-shadow:
    inset -1px -1px var(--black),
    inset 1px 1px var(--white),
    inset -2px -2px var(--shadow),
    inset 2px 2px var(--light);
}
.start[aria-expanded="true"] {
  box-shadow:
    inset -1px -1px var(--white),
    inset 1px 1px var(--black),
    inset -2px -2px var(--light),
    inset 2px 2px var(--shadow);
}
.flag {
  width: 18px; height: 18px;
  display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 1px;
}
.flag i:nth-child(1) { background: #e8412c; }
.flag i:nth-child(2) { background: #3aa845; }
.flag i:nth-child(3) { background: #1d6fd8; }
.flag i:nth-child(4) { background: #f2c230; }
.tasks {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 4px;
}
.task {
  flex: 0 1 auto;
  min-width: 56px;
  max-width: 200px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  color: var(--black);
  background: var(--face);
  font: 14px/1 var(--font);
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset -1px -1px var(--black),
    inset 1px 1px var(--white),
    inset -2px -2px var(--shadow),
    inset 2px 2px var(--light);
}
.task-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-label .short { display: none; }
@media (min-width: 700px) {
  .task { flex: 0 1 190px; }
}
/* phones: shorter label and tighter Start/clock so both buttons fit */
@media (max-width: 699px) {
  .task-label .long { display: none; }
  .task-label .short { display: inline; }
  .start { padding: 0 10px; gap: 6px; }
  .tray { padding: 0 6px; }
}
/* selected window: pressed in, with the Win95 checkered face */
.task.is-active {
  font-weight: bold;
  background-color: var(--white);
  background-image: conic-gradient(var(--face) 25%, var(--white) 0 50%, var(--face) 0 75%, var(--white) 0);
  background-size: 2px 2px;
  box-shadow:
    inset -1px -1px var(--white),
    inset 1px 1px var(--black),
    inset -2px -2px var(--light),
    inset 2px 2px var(--shadow);
}
.task:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

/* windows that aren't selected get a grey title bar, like Win95 */
.window:not(.active) .titlebar {
  background: var(--shadow);
  color: var(--face);
}

.tray {
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 14px;
  white-space: nowrap;
}

/* ---------- start menu ---------- */
.start-menu {
  position: fixed;
  left: 4px;
  bottom: calc(var(--taskbar-h) + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  width: min(280px, calc(100vw - 8px));
  padding: 3px;
}
.start-menu[hidden] { display: none; }
.start-menu .side {
  flex: none;
  width: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  color: var(--face);
  background: linear-gradient(0deg, var(--title), var(--title-end));
  font-weight: bold;
  font-size: 18px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.04em;
}
.start-menu ul { flex: 1; margin: 0; padding: 2px 0; list-style: none; }
.start-menu a {
  display: block;
  padding: 12px 14px;
  color: var(--black);
  text-decoration: none;
}
.start-menu a:hover,
.start-menu a:focus-visible {
  color: var(--white);
  background: var(--title);
  outline: 0;
}
.start-menu hr {
  margin: 2px 4px;
  border: 0;
  border-top: 1px solid var(--shadow);
  border-bottom: 1px solid var(--white);
}

/* ---------- utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* very narrow phones: drop the zone letters from the clock, tighten buttons */
@media (max-width: 380px) {
  .tray .tz { display: none; }
}
@media (max-width: 340px) {
  .task, .start { font-size: 13px; }
  .task { padding: 0 6px; }
  .flag { display: none; }
}


a.win-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- photo viewer ---------- */
.viewer { background: var(--black); aspect-ratio: 4 / 3; max-height: 55vh; margin: 0 auto; overflow: hidden; touch-action: pan-y; }
.viewer:focus-visible { outline: 2px dotted var(--white); outline-offset: -4px; }
.slides { list-style: none; margin: 0; padding: 0; height: 100%; }
.slide { height: 100%; }
.slide[hidden] { display: none; }
.slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.viewer-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 8px; }
.viewer-bar .btn { min-height: 44px; }
.viewer-bar .btn:disabled { color: var(--shadow); text-shadow: 1px 1px var(--white); cursor: default; }
.viewer-bar .count { padding: 6px 12px; min-width: 76px; text-align: center; font-size: 14px; }

/* keep the sunken bevel visible around photos (images otherwise paint over it) */
.viewer { box-sizing: border-box; padding: 3px; }
.slide img { border-radius: 0; }

/* iOS-safe viewer: absolute fill instead of percentage heights */
.viewer { position: relative; padding: 0; }
.slides { position: absolute; inset: 3px; height: auto; overflow: hidden; }
.slide { position: absolute; inset: 0; height: auto; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; }

/* clock: fixed-width digits so the taskbar never reflows as the time changes */
.tray { font-variant-numeric: tabular-nums; }
@media (max-width: 430px) {
  .task, .start { font-size: 13px; }
  .task { padding: 0 6px; }
}

/* store product: large portrait photo */
.release.product { grid-template-columns: minmax(0, 1fr); }
.release.product .cover { width: 100%; height: auto; aspect-ratio: 1 / 1; background: #fff; max-width: 220px; justify-self: center; }
.release.product .cover img { object-fit: contain; }
@media (min-width: 700px) {
  .release.product { grid-template-columns: 220px minmax(0, 1fr); }
  .release.product .cover { max-width: none; justify-self: stretch; }
}

/* product name stays on one line */
.release.product h3 { white-space: nowrap; font-size: clamp(13px, 4.2vw, 18px); }

/* ---------- FirmWare Update dialog ---------- */
.fw-backdrop { position: fixed; inset: 0 0 var(--taskbar-h) 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 12px; }
.fw-backdrop[hidden] { display: none; }
.fw-win { width: min(100%, 380px); padding: 3px; background: var(--face); }
.fw-win .titlebar { background: linear-gradient(90deg, var(--title), var(--title-end)); }
.fw-body { padding: 14px 12px 12px; }
.fw-msg { margin: 0 0 4px; font-size: 16px; line-height: 1.4; }
.fw-sub { margin: 0 0 12px; font-size: 14px; color: #404040; min-height: 20px; }
.fw-bar { display: flex; gap: 2px; height: 28px; padding: 4px; background: var(--white); }
.fw-bar i { flex: 1; background: var(--title); visibility: hidden; }
.fw-bar i.on { visibility: visible; }
.fw-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 14px; }
.fw-ok {
  appearance: none; -webkit-appearance: none; box-sizing: border-box; width: 90px; height: 32px; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font: 15px var(--font); color: var(--black); background: var(--face);
  border: 1px solid var(--black); border-radius: 0;
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--white), inset -2px -2px var(--shadow), inset 2px 2px var(--light);
}
.fw-ok span { padding: 2px 14px; border: 1px dotted transparent; }
.fw-ok:focus-visible { outline: 0; }
.fw-ok:focus-visible span { border-color: var(--black); }
.fw-ok:active { box-shadow: inset 1px 1px var(--shadow); padding: 1px 0 0 1px; }

/* FirmWare dialog: translucent white cover over the whole page while it is open */
/* white cover opacity: change the last number (0.50 = 50%) */
.fw-backdrop { inset: 0; background: rgba(255, 255, 255, 0.50); z-index: 100; }

/* ---------- tiled THE FIRM logo behind everything ---------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("../images/firm-tile.png") 0 0 / 126px 108px repeat;
  opacity: 0.15;               /* logo strength: 0.15 = 15%, change this number */
}

/* OK button flashes (blue / grey) from 4 s until the dialog closes */
.fw-ok.flash { animation: fw-flash 0.7s steps(1, end) infinite; }
@keyframes fw-flash { 50% { background: var(--title); color: var(--white); } }
.fw-ok.flash:active { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .fw-ok.flash { animation: none; background: var(--title); color: var(--white); }   /* steady highlight, no flashing */
}

/* ---------- movable windows ---------- */
.window .titlebar { touch-action: none; -webkit-user-select: none; user-select: none; }
@media (pointer: fine) { .window .titlebar { cursor: move; } }
.window.moved { position: relative; }
.window.active { z-index: 5; }
.window.dragging { opacity: 0.92; }

/* reset icon, left of the clock: white with a thin navy outline, navy once a window has moved */
.reset {
  appearance: none; -webkit-appearance: none;
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 44px; padding: 0; border: 0; border-radius: 0;
  color: var(--white); background: none; box-shadow: none;
  font: bold 28px/1 var(--font); cursor: pointer;
}
.reset .g {
  display: block;
  text-shadow: -1px 0 var(--title), 1px 0 var(--title), 0 -1px var(--title), 0 1px var(--title), -1px -1px var(--title), 1px -1px var(--title), -1px 1px var(--title), 1px 1px var(--title);   /* thin navy outline */
}
.reset.has-moves { color: var(--title); }
.reset:active { transform: translate(1px, 1px); }
.reset:focus-visible { outline: 2px dotted var(--black); outline-offset: -4px; }
@media (max-width: 430px) { .reset { width: 40px; } }


/* ---------- Snake ---------- */
.snake-win { max-width: 560px; width: 100%; justify-self: center; }
.snake-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
.snake-bar output { padding: 4px 8px; font-weight: bold; background: var(--white); }
.snake-board { position: relative; width: min(100%, calc(100svh - 300px)); min-width: 200px; margin: 0 auto; background: var(--desktop); touch-action: none; -webkit-user-select: none; user-select: none; isolation: isolate; }
.snake-win.pad-on .snake-board { width: min(100%, calc(100svh - 410px)); }
.snake-board::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: url("../images/firm-tile.png") 0 0 / 126px 108px repeat; opacity: 0.15; }   /* same logo tile and opacity as the page background */
.snake-board canvas { display: block; width: 100%; aspect-ratio: 1; }
.sn-hint { position: absolute; left: 0; right: 0; top: 18%; margin: 0; text-align: center; color: var(--white); font-weight: bold; font-size: 20px; pointer-events: none; text-shadow: 1px 1px var(--desktop), -1px -1px var(--desktop), 1px -1px var(--desktop), -1px 1px var(--desktop); }
.sn-hint small { display: block; margin-top: 4px; font-size: 14px; font-weight: normal; }
.sn-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.5); padding: 8px; }
.sn-overlay[hidden], .sn-hint[hidden] { display: none; }
.sn-panel { background: var(--face); padding: 10px 14px 12px; text-align: center; max-width: 100%; }
.sn-panel h3 { margin: 0 0 4px; font-size: 18px; color: var(--title); }
.sn-panel p { margin: 0 0 8px; }
.sn-pad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 48px); gap: 4px; justify-content: center; margin: 10px auto 0; touch-action: manipulation; }
.sn-pad[hidden] { display: none; }
.sn-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0 0 8px; font-weight: bold; cursor: pointer; }
.sn-toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--title); }
.sn-pad .btn { min-height: 0; padding: 0; width: 100%; height: 100%; }
.sn-up { grid-column: 2; grid-row: 1; } .sn-left { grid-column: 1; grid-row: 2; } .sn-down { grid-column: 2; grid-row: 2; } .sn-right { grid-column: 3; grid-row: 2; }
.sn-row { display: flex; gap: 8px; justify-content: center; }
.sn-row .btn { min-height: 44px; min-width: 96px; }
.sn-tools { margin-top: 10px; }
.sn-tools .btn { flex: 1; max-width: 200px; }

/* ---------- song landing pages ---------- */
.song-win { max-width: 520px; width: 100%; justify-self: center; align-self: start; }
.song-head { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 10px; text-align: center; }
.song-cover { flex: none; width: var(--cover, 160px); aspect-ratio: 1; background: var(--white); }
.song-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.song-text { min-width: 0; max-width: 100%; width: 100%; }
.song-title { margin: 0; font-size: clamp(19px, 5.6vw, 24px); line-height: 1.15; letter-spacing: 0; white-space: nowrap; overflow: hidden; }   /* always one line; js/song.js shrinks long titles to fit */
.song-meta { margin: 4px 0 0; font-size: 15px; }
.song-prompt { margin: 0 0 6px; font-weight: bold; text-align: center; }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.svc-list::-webkit-scrollbar { width: 16px; background: var(--face); }
.svc-list::-webkit-scrollbar-thumb { background: var(--face); box-shadow: inset -1px -1px var(--black), inset 1px 1px var(--white), inset -2px -2px var(--shadow), inset 2px 2px var(--light); }
.svc-list::-webkit-scrollbar-track { background: repeating-conic-gradient(var(--face) 0 25%, var(--white) 0 50%) 0 0 / 2px 2px; }
.btn.svc { display: flex; justify-content: flex-start; gap: 12px; width: 100%; min-height: 48px; padding: 6px 12px; text-align: left; }
.btn.svc:active { padding: 7px 11px 5px 13px; }
.svc img { width: 32px; height: 32px; flex: none; image-rendering: pixelated; }
.svc-name { flex: 1; font-weight: bold; }
.svc-act { color: var(--title); font-weight: bold; }

/* ---------- song preview player ---------- */
.preview { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 6px 8px; background: var(--face); }
.pv-btn { flex: none; min-width: 92px; min-height: 0; height: 34px; padding: 0 12px; font-weight: bold; }
.pv-btn:active { padding: 1px 11px 0 13px; }
.pv-bar { flex: 1; min-width: 0; height: 28px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.pv-bar:disabled { cursor: default; }
.pv-bar::-webkit-slider-runnable-track { height: 10px; background: linear-gradient(var(--title), var(--title)) 0 0 / var(--p, 0%) 100% no-repeat, var(--white); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light), inset 2px 2px var(--black); }
.pv-bar::-moz-range-track { height: 10px; background: var(--white); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light), inset 2px 2px var(--black); }
.pv-bar::-moz-range-progress { height: 10px; background: var(--title); }
.pv-bar::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 24px; margin-top: -7px; border: 0; border-radius: 0; background: var(--face); box-shadow: inset -1px -1px var(--black), inset 1px 1px var(--white), inset -2px -2px var(--shadow), inset 2px 2px var(--light); }
.pv-bar::-moz-range-thumb { width: 16px; height: 24px; border: 0; border-radius: 0; background: var(--face); box-shadow: inset -1px -1px var(--black), inset 1px 1px var(--white), inset -2px -2px var(--shadow), inset 2px 2px var(--light); }
.pv-bar:focus-visible { outline: 2px dotted var(--black); outline-offset: 2px; }
.pv-time { flex: none; min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-height: 760px) {
  .song-head { gap: 6px; margin-bottom: 6px; }
  .btn.svc { min-height: 42px; padding: 4px 12px; }
  .btn.svc:active { padding: 5px 11px 3px 13px; }
  .preview { margin-bottom: 6px; }
}
@media (max-height: 680px) {
  .btn.svc { min-height: 38px; padding: 3px 12px; }
  .btn.svc:active { padding: 4px 11px 2px 13px; }
}

/* ---------- song page video window ---------- */
.vid-win { max-width: 520px; width: 100%; justify-self: center; align-self: start; }
.vid-frame { aspect-ratio: 16 / 9; width: 100%; background: #000; }
.vid-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* with a video window below, tighten the service rows so more of the song window stays visible */
.song-win:has(+ .vid-win) .btn.svc { min-height: 42px; padding: 4px 12px; }
.song-win:has(+ .vid-win) .btn.svc:active { padding: 5px 11px 3px 13px; }

/* when the song and video windows are both open, the preview player is tucked behind a down arrow */
.pv-toggle { display: none; margin: 0 auto 8px 0; min-width: 56px; min-height: 0; height: 28px; padding: 0 12px; font-size: 14px; line-height: 1; color: #000; }
.pv-toggle:active { padding: 1px 11px 0 13px; }
.both-open .pv-toggle { display: block; }
.both-open [data-preview]:not(.open) { display: none; }

/* both windows open: cover art on the left, title on the right, so the cover can stay large */
.both-open .song-head { flex-direction: row; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.both-open .song-text { width: auto; flex: 0 1 auto; min-width: 0; }
.both-open .song-title { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.1; }

/* toggle arrow sits to the left of the preview player when it is shown */
.both-open .pv-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.both-open .pv-row .pv-toggle { flex: none; min-width: 44px; min-height: 40px; margin: 0; padding: 0 8px; align-self: stretch; height: auto; }
.both-open .pv-row .preview { flex: 1 1 auto; min-width: 0; margin: 0; padding: 4px 6px; gap: 6px; }
.both-open .pv-row .pv-btn { min-width: 76px; padding: 0 8px; }

.pv-toggle:disabled { color: #808080; text-shadow: 1px 1px 0 #fff; cursor: default; }

/* High scores window (under the game) */
.hs-win { max-width: 520px; width: 100%; justify-self: center; align-self: start; }
.hs-list { background: #fff; }
.hs-table { width: 100%; border-collapse: collapse; font-family: "Courier New", monospace; font-size: 15px; }
.hs-table th { background: var(--face); font-family: inherit; font-weight: normal; text-align: left; padding: 3px 8px; border: 1px solid; border-color: #fff #404040 #404040 #fff; }
.hs-table td { padding: 2px 8px; }
.hs-table .r { text-align: right; }
.hs-table tr.me td { background: #000080; color: #fff; }
.sn-name { margin: 0 0 8px; }
.sn-name label { display: block; margin: 0 0 4px; }
.sn-name input { font: 22px "Courier New", monospace; letter-spacing: 6px; text-align: center; text-transform: uppercase; width: 9.5ch; height: 40px; padding: 0 0 0 6px; border-radius: 0; background: #fff; color: #000; border: 2px solid; border-color: #808080 #fff #fff #808080; }
.sn-name .sn-err { color: #a00; font-size: 13px; min-height: 16px; margin: 4px 0 0; }
.sn-name .sn-row { margin-top: 6px; }
.sn-row[hidden] { display: none; }

/* Back button at the top of the song window body */
.back-row { margin: 0 0 10px; }
.back-btn { width: auto; min-width: 70px; height: 30px; padding: 0 12px; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (pointer: coarse) { .back-btn { height: 40px; min-width: 88px; padding: 0 16px; font-size: 16px; } }

/* Music page: extra room between the Music.exe window and the song icons */
#music + #songs { margin-top: 22px; }
@media (min-width: 900px) { #music + #songs { margin-top: 30px; } }

/* 7+ services: slimmer rows, still one column, so every link shows at once */
.svc-list:has(> li:nth-child(7)) { gap: 3px; overflow: visible; }
.svc-list:has(> li:nth-child(7)) .btn.svc { min-height: 33px; padding: 1px 10px; gap: 10px; }
.svc-list:has(> li:nth-child(7)) .btn.svc:active { padding: 3px 9px 1px 11px; }
.svc-list:has(> li:nth-child(7)) .svc img { width: 24px; height: 24px; }
.svc-list:has(> li:nth-child(7)) .svc-name, .svc-list:has(> li:nth-child(7)) .svc-act { font-size: 15px; }

/* song pages: Back button floats at the top-left of the window body, beside the cover, so the cover sits right under the title bar */
.song-win .window-body { position: relative; }
.song-win .back-row { position: absolute; top: 12px; left: 12px; margin: 0; z-index: 1; }
.song-win .back-btn { min-width: 0; padding: 0 10px; }
@media (pointer: coarse) { .song-win .back-btn { min-width: 0; padding: 0 12px; } }
.both-open .back-row { position: static; margin: 0 0 10px; }

/* Link-in-bio page (/links/): icon row up top, big link rows below; the page scrolls on short screens */
.links-win .svc-list { overflow: visible; }
.links-win .song-head { margin-bottom: 12px; }
.links-icons { list-style: none; margin: 0 0 16px; padding: 0; display: flex; justify-content: center; flex-wrap: nowrap; gap: 6px; }
.links-ico { display: block; padding: 3px; border: 2px solid transparent; line-height: 0; -webkit-tap-highlight-color: transparent; }
.links-ico:hover, .links-ico:focus-visible { border-color: var(--title); outline: none; background: rgba(0, 0, 128, 0.08); }
.links-ico:active { background: rgba(0, 0, 128, 0.2); }
.links-ico img { width: 44px; height: 44px; image-rendering: pixelated; }
.links-list { gap: 10px; }
.links-row.btn.svc { min-height: 64px; padding: 8px 12px; gap: 14px; }
.links-row.btn.svc:active { padding: 9px 11px 7px 13px; }
.links-row img { width: 40px; height: 40px; image-rendering: pixelated; }
.links-row .svc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.links-row .svc-name { flex: none; line-height: 1.15; }
.links-row .svc-sub { font-size: 13px; line-height: 1.2; color: #404040; }

.links-photo { width: 84px; aspect-ratio: 1; background: var(--white); }
.links-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.links-win .song-head { gap: 8px; }
.links-win .song-title, .links-win .song-meta { margin: 0; }
.links-row.btn.svc { min-height: 58px; padding: 6px 12px; }
.links-photo { width: 76px; }
.links-icons { margin-bottom: 10px; }
.links-list { gap: 6px; }
.links-row.btn.svc { min-height: 56px; padding: 5px 12px; }
.links-photo { border-radius: 50%; overflow: hidden; }

/* labels under the top icons: same face as the tagline, smaller */
.links-icons { align-items: flex-start; gap: 2px; }
.links-icons > li { flex: 1 1 0; min-width: 0; max-width: 76px; }
.links-ico { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 0 2px; line-height: normal; }
.links-ico img { width: 40px; height: 40px; }
.links-lbl { font-size: 11px; line-height: 1.1; text-align: center; color: #404040; }
.links-ico, .links-ico:hover { text-decoration: none; }
.links-lbl { white-space: nowrap; font-size: 10.5px; color: #404040; }
.links-ico:hover .links-lbl, .links-ico:focus-visible .links-lbl { color: var(--title); }
.links-photo { width: 68px; }
.links-win .song-head { gap: 6px; margin-bottom: 8px; }
.links-city { font-size: 13px; }
.links-photo { width: 96px; }

/* etched Win95 divider between the name block and the icon row */
.links-rule { border: 0; height: 2px; margin: 4px 0 12px; background: linear-gradient(var(--shadow) 0 1px, var(--white) 1px 2px); }
.links-rule { height: 5px; margin: 6px 0 12px; background: linear-gradient(90deg, var(--title), #1084d0); box-shadow: 0 1px 0 var(--white); }
.links-rule { width: calc(100% - 6px); max-width: 390px; margin-left: auto; margin-right: auto; }   /* spans just past the first and last icon */

/* photo left, name and tagline right */
.links-win .links-id { flex-direction: row; align-items: center; justify-content: center; gap: 16px; text-align: left; }
.links-id .links-photo { flex: none; width: 125px; }
.links-who { min-width: 0; }
.links-win .links-who .song-title { white-space: nowrap; }
