:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f0e8;
  background: #171615;
  --muted: #b9b1a5;
  --accent: #efb97f;
  --line: #3c3934;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden], .symbols { display: none !important; }

.masthead {
  min-height: 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #302d29;
  padding: 0 max(24px, calc((100% - 1040px) / 2));
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.brand svg { width: 30px; height: 30px; stroke: var(--accent); stroke-width: 1.55; }
.test-label { color: var(--muted); font-size: 13px; }
main { width: min(calc(100% - 48px), 925px); margin: 34px auto 44px; }
.heading { margin-bottom: 19px; }
.cassette-no { margin: 0 0 7px; color: var(--accent); font-size: 13px; font-weight: 650; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.045em; line-height: 1.05; }

.player {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e0d0c;
  box-shadow: 0 16px 48px #0004;
}

.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #080807;
  display: grid;
  place-items: center;
}

video { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.hero-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid #fff6;
  border-radius: 50%;
  color: white;
  background: #151211bb;
  box-shadow: 0 5px 22px #0008;
  backdrop-filter: blur(8px);
}
.hero-play:hover { background: #332820ee; }
.hero-play svg { width: 36px; height: 36px; }
.remote-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #100e0deb;
}
.remote-message svg { width: 44px; height: 44px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.4; }

.controls { padding: 8px 13px 5px; background: #11100f; }
.seek {
  width: 100%;
  margin: 0;
  height: 19px;
  accent-color: var(--accent);
  display: block;
  cursor: pointer;
}
.seek:disabled { cursor: default; }
.control-row, .control-group { display: flex; align-items: center; }
.control-row { justify-content: space-between; gap: 4px; }
.control-group { gap: 3px; min-width: 0; }
.icon-button {
  width: 43px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #f4f0e8;
  padding: 0;
}
.icon-button:hover { background: #ffffff12; }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon-button[data-available="false"] { color: #aaa39a; }
.icon-button[aria-pressed="true"].icon-button:is(#cast, #airplay) { color: var(--accent); }
.time { color: #d5cec2; font-size: 12px; padding-left: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pause-shape, .muted-shape, #play[data-playing] .play-shape, #mute[aria-pressed="true"] .sound-shape { display: none; }
#play[data-playing] .pause-shape, #mute[aria-pressed="true"] .muted-shape { display: inline; }

.under-player { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; margin-top: 16px; }
.under-player p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.drive-link { flex: none; font-size: 14px; color: var(--accent); text-decoration-color: #efb97f65; text-underline-offset: 4px; }
.drive-link span { margin-left: 3px; }
details { margin-top: 16px; max-width: 615px; font-size: 13px; color: var(--muted); }
summary { cursor: pointer; width: fit-content; }
details p { margin: 12px 0 8px; }
.share { display: flex; gap: 8px; }
.share input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #211f1b;
  color: #f4f0e8;
}
.share button { border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; background: #2d2721; color: #f4f0e8; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.player:fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; border: 0; border-radius: 0; }
.player:fullscreen .screen { flex: 1; min-height: 0; aspect-ratio: auto; }

@media (max-width: 600px) {
  .masthead { min-height: 56px; padding: 0 16px; }
  main { width: calc(100% - 28px); margin-top: 26px; }
  .screen { aspect-ratio: 4 / 3; }
  .controls { padding-inline: 8px; }
  .icon-button { width: 41px; height: 43px; }
  .control-group { gap: 0; }
  .time { padding-left: 3px; font-size: 11px; }
  .under-player { flex-direction: column; gap: 9px; }
  .hero-play { width: 62px; height: 62px; }
}
