.reprise-fourth #tv-video,
.reprise-fourth #notebook-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.reprise-fourth #wind-tvs {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.reprise-fourth #wind-tvs button {
  position: absolute;
  width: 42px;
  height: 36px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border: 0;
  background: transparent;
}

.reprise-fourth #wind-tvs button::after {
  content: "+";
  position: absolute;
  inset: auto 1px 1px auto;
  color: #fff;
  text-shadow: 0 0 2px #151515, 0 0 4px #151515;
  font: 14px/1 monospace;
}

.reprise-fourth #wind-tvs button:hover::after,
.reprise-fourth #wind-tvs button:focus-visible::after { content: "↗"; }
.reprise-fourth #graves button { width: 40px; height: 46px; }
.reprise-fourth #graves button::after { display: none; }
.reprise-fourth[data-memorial] #wind-tvs,
.reprise-fourth[data-tv] #graves,
.reprise-fourth #transmissions[data-tv="hidden"] { visibility: hidden; }

.reprise-fourth #tv-tune {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 0;
  background: transparent;
  color: #242424;
  text-shadow: 0 1px 1px #fff8;
  text-align: center;
  font: clamp(11px, 1.4vw, 15px)/1.26 monospace;
}

.reprise-fourth #tv-tune:hover #tv-tune-title,
.reprise-fourth #tv-tune:focus-visible #tv-tune-title {
  color: #111;
  text-decoration: underline;
  text-underline-offset: .3em;
}
.reprise-fourth #tv-tune:focus-visible { outline-color: #242424; }
.tv-play-label { font-size: 9px; letter-spacing: .16em; }
.reprise-fourth[data-tv="close"] #tv-video:not([hidden]) {
  animation: tune-in 180ms ease-out both;
}
@keyframes tune-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .reprise-fourth[data-tv="close"] #tv-video:not([hidden]) { animation: none; }
}
.reprise-fourth[data-tv] #return,
.reprise-fourth[data-tv] #chapter { display: none; }
.reprise-fourth #tv-back { margin-right: auto; }

.reprise-fourth .scene-key {
  position: absolute;
  z-index: 5;
  top: 24px;
  left: 24px;
  padding: 10px 12px;
  border: 1px solid currentColor;
  background: #fff;
  color: #141414;
  font: 12px/1 monospace;
  clip-path: inset(50%);
}

.reprise-fourth .scene-key:focus-visible { clip-path: none; }
.reprise-fourth[data-lamp]:not([data-lamp="closed"]) #menu { visibility: hidden; }
.reprise-fourth[data-lamp]:not([data-lamp="closed"]) #menu * { pointer-events: none; }
.reprise-fourth #sound-switch {
  padding: 6px;
  background: #fffc;
  color: #303030;
}

.reprise-fourth #sound-switch[aria-pressed="false"] { opacity: .46; }
.reprise-fourth #sound-switch:hover,
.reprise-fourth #sound-switch:focus-visible { opacity: 1; }

.reprise-fourth .memorial-note {
  --stone-curve: 49% 49% 3px 3px / 27% 27% 3px 3px;
  --stone-top: #c7c7c7;
  --stone-base: #8d8d8d;
  --stone-shade: #454545;
  --stone-light: #ededed;
  --stone-engraving: #252525;
  width: min(340px, calc(100vw - 42px));
  max-height: calc(100dvh - 26px);
  overflow: visible;
  padding: 18px 14px 14px 5px;
  border: 0;
  color: #141414;
  background: none;
}

.reprise-fourth .memorial-note[open] {
  animation: stone-arrival 280ms cubic-bezier(.15,.7,.25,1) both;
}

.memorial-note::backdrop { background: #eee5; backdrop-filter: blur(1px); }

.memorial-stone {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.15rem;
  min-height: min(268px, calc(100dvh - 74px));
  padding: 44px 25px 24px;
  border: 1px solid var(--stone-shade);
  border-radius: var(--stone-curve);
  background:
    radial-gradient(#29292931 .42px, transparent .9px) 0 0 / 4px 5px,
    radial-gradient(#ffffff44 .5px, transparent 1px) 1px 2px / 7px 8px,
    linear-gradient(118deg, var(--stone-top) 9%, var(--stone-base) 91%);
  box-shadow:
    inset 2px 2px 1px var(--stone-light),
    5px 5px 0 var(--stone-shade),
    9px 10px 12px #1115;
  color: var(--stone-engraving);
  text-align: center;
  text-shadow: 0 1px var(--stone-light);
}

.memorial-stone::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid var(--stone-shade);
  border-radius: var(--stone-curve);
  box-shadow: inset 1px 1px 0 var(--stone-light), 0 1px 0 var(--stone-light);
  pointer-events: none;
}

.memorial-note #inscription {
  margin: 0;
  font: 700 clamp(38px, 8vw, 56px)/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
}

.memorial-note #inscription-years {
  margin: 0;
  font: 600 clamp(17px, 3.8vw, 24px)/1.2 Georgia, "Times New Roman", serif;
  font-variant-numeric: lining-nums;
  letter-spacing: .14em;
}

.memorial-close {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  background: #f7f7f7;
  font: 21px/1 monospace;
}

.reprise-fourth[data-polarity="negative"] .memorial-note {
  --stone-top: #515151;
  --stone-base: #343434;
  --stone-shade: #171717;
  --stone-light: #767676;
  --stone-engraving: #efefef;
  color: #eee;
}

.reprise-fourth[data-polarity="negative"] .memorial-note::backdrop { background: #0005; }
.reprise-fourth[data-polarity="negative"] .memorial-close { background: #1c1c1c; }
.memorial-close:focus-visible { outline-color: currentColor; }

@keyframes stone-arrival {
  from { opacity: 0; transform: translateY(5px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reprise-fourth dialog.tv-player {
  width: min(780px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 26px);
  padding: 13px;
  border: 1px solid #222;
  background: #fff;
  color: #181818;
}

.tv-player-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tv-player-head h2 { margin: 0; font: 700 clamp(16px, 4vw, 26px)/1.1 -apple-system, Arial, sans-serif; }
.tv-player-head p { margin: 5px 0 0; font: 11px/1.3 monospace; }
.youtube-slot { background: #101010; }
.youtube-slot iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 0; }
#youtube-source { display: inline-block; margin-top: 10px; color: inherit; font: 11px/1.3 monospace; }
.reprise-fourth .tv-player::backdrop { background: #fff9; }

.reprise-fourth[data-polarity="negative"] dialog.tv-player { background: #0e0e0e; color: #f2f2f2; border-color: #888; }
.reprise-fourth[data-polarity="negative"] .tv-player::backdrop { background: #000a; }
.reprise-fourth dialog.tv-player[data-in-glass] {
  position: fixed;
  inset: auto;
  top: var(--glass-y);
  left: var(--glass-x);
  margin: 0;
  transform: translate(-50%, -50%);
  width: var(--glass-width);
  padding: 0 0 4px;
  border: 0;
  background: #111;
  color: #eee;
}

.reprise-fourth .tv-player[data-in-glass]::backdrop { background: transparent; }
.tv-player[data-in-glass] .tv-player-head { align-items: center; margin: 0; padding: 0 4px 0 8px; }
.tv-player[data-in-glass] .tv-player-head h2 { font: 12px/1.15 monospace; letter-spacing: .035em; }
.tv-player[data-in-glass] #transmission-format { display: none; }
.reprise-fourth .tv-player[data-in-glass] .tv-player-head button { border: 0; height: 28px; min-height: 28px; }
.tv-player[data-in-glass] #youtube-source { margin: 5px 8px 0; font-size: 10px; }
.tv-player[data-in-glass] #youtube-status { margin: 4px 8px 0; }
.tv-player[data-in-glass] .youtube-slot iframe,
.tv-player[data-in-glass] #local-tv-video { height: var(--glass-height); }

.reprise-fourth dialog.tv-player[data-glass-video] {
  height: var(--glass-height);
  max-height: none;
  padding: 0;
  transform: none;
  clip-path: var(--glass-outline);
}

.tv-player[data-glass-video] #local-video-player { position: absolute; inset: 0; }
.tv-player[data-glass-video] #local-tv-video { height: 100%; max-height: none; }
.tv-player[data-glass-video] .tv-player-head,
.tv-player[data-glass-video] .tv-transport {
  position: absolute;
  inset-inline: clamp(20px, 6%, 45px);
  z-index: 1;
  text-shadow: 0 1px 3px #000;
}
.tv-player[data-glass-video] .tv-player-head { top: 8px; }
.tv-player[data-glass-video] .tv-transport { bottom: 10px; }
.tv-player[data-local-video] #youtube-status[hidden] + #youtube-source { display: none; }
.tv-player[data-glass-video] #youtube-status,
.tv-player[data-glass-video] #youtube-source {
  position: absolute;
  z-index: 2;
  inset-inline: 12%;
  bottom: 30%;
  margin: 0;
  background: #111;
}
.tv-player[data-glass-video] #youtube-source { bottom: 22%; }

#local-tv-video {
  display: block;
  width: 100%;
  max-height: 59dvh;
  background: #111;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.tv-transport {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 4ch;
  align-items: center;
  gap: 7px;
  padding: 3px 8px;
  font: 11px/1 monospace;
}
.reprise-fourth[data-polarity="negative"] #grave-monarch { filter: drop-shadow(0 0 3px #0005); }

.reprise-fourth #tv-tune[hidden],
.reprise-fourth #wind-tvs[hidden],
.reprise-fourth .scene-key[hidden],
.reprise-fourth .angle-menu a[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .reprise-fourth .memorial-note[open] { animation: none; }
}

.reprise-fourth[data-notebook-shot] #viewfinder { visibility: hidden; }
.reprise-fourth .tv-player-head button { min-width: 36px; min-height: 36px; border: 1px solid currentColor; font: 20px/1 monospace; }

.reprise-fourth #notebook-video:not([hidden]) {
  animation: notebook-glance-in 220ms ease-out both;
}

@keyframes notebook-glance-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reprise-fourth[data-notebook-shot="settled"] #notebook-video:not([hidden]) {
  animation: notebook-glance-out 380ms 150ms ease-in-out both;
}

@keyframes notebook-glance-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

#youtube-status { margin: 10px 0 0; font: 11px/1.3 monospace; }
.reprise-fourth .tv-player button:focus-visible { outline-color: currentColor; }

.reprise-fourth #radio-switch {
  padding: 6px;
  background: #fffc;
  color: #303030;
}

.reprise-fourth #radio-switch[aria-expanded="true"],
.reprise-fourth[data-radio-playing] #radio-switch { box-shadow: inset 0 -1px currentColor; }

.reprise-fourth #radio {
  position: absolute;
  top: calc(max(4vh, 15px) + 32px);
  right: max(4.6vw, 20px);
  width: min(320px, calc(100vw - 40px));
  padding: 10px 12px 12px;
  border: 1px solid #252525;
  background: #fffffff5;
  color: #181818;
  box-shadow: 3px 3px #15151521;
  pointer-events: auto;
  font: 12px/1.35 monospace;
}

.radio-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.radio-head strong { font-size: 15px; }
#radio-close { min-width: 24px; min-height: 24px; font-size: 18px; line-height: 1; }

#radio-tracks {
  width: 100%;
  margin: 7px 0 8px;
  padding: 5px 6px;
  color: inherit;
  background: #fff;
  border: 1px solid #777;
  border-radius: 0;
  font: 13px/1.3 monospace;
}

#radio-local {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 4ch;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

#radio-play { min-height: 30px; border: 1px solid currentColor; }
#radio-time { text-align: right; }
#radio-connect { display: block; min-height: 34px; padding: 2px 0; text-align: left; text-decoration: underline; }
#radio-embed iframe { display: block; width: 100%; height: 110px; border: 0; }
#radio-source { display: inline-block; margin-top: 6px; color: inherit; text-underline-offset: .15em; }
#radio-status { margin: 8px 0 0; }

.pixel-play {
  display: grid;
  place-items: center;
  min-height: 26px;
}

.pixel-play::before {
  content: "";
  width: 10px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(0 0, 20% 0, 20% 17%, 40% 17%, 40% 33%, 60% 33%, 60% 42%, 80% 42%, 80% 50%, 100% 50%, 100% 58%, 80% 58%, 80% 67%, 60% 67%, 60% 75%, 40% 75%, 40% 83%, 20% 83%, 20% 100%, 0 100%);
}

.pixel-play[data-playing]::before {
  background: linear-gradient(90deg, currentColor 32%, transparent 32% 68%, currentColor 68%);
  clip-path: none;
}

.pixel-seek {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 24px;
  margin: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.pixel-seek::-webkit-slider-runnable-track { height: 1px; background: currentColor; }
.pixel-seek::-webkit-slider-thumb { appearance: none; width: 5px; height: 9px; margin-top: -4px; background: currentColor; }
.pixel-seek::-moz-range-track { height: 1px; background: currentColor; }
.pixel-seek::-moz-range-thumb { width: 5px; height: 9px; border: 0; border-radius: 0; background: currentColor; }
.pixel-seek:disabled { opacity: .38; cursor: default; }
.pixel-seek:focus-visible, .pixel-play:focus-visible { outline: 1px dashed currentColor; outline-offset: 3px; }
