html, body { margin: 0; min-height: 100%; background: #000000; }
html { color: #545454; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
#display { position: relative; width: 100%; height: 100vh; background: #000000; }
#screen-awake { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; background: #000000; object-fit: fill; }
main {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 10vw;
  padding: max(6vh, env(safe-area-inset-top)) max(10vw, env(safe-area-inset-right)) max(6vh, env(safe-area-inset-bottom)) max(10vw, env(safe-area-inset-left));
}
#content { width: 100%; min-width: 0; max-height: 100%; overflow: hidden; text-align: center; opacity: 1; transition: opacity 150ms ease; }
#metadata { max-height: 88vh; overflow: hidden; }
#metadata.bottom-right { position: fixed; right: 10vw; bottom: 6vh; max-width: 80vw; text-align: right; right: max(10vw, env(safe-area-inset-right)); bottom: max(6vh, env(safe-area-inset-bottom)); }
#cover-art { display: block; width: auto; height: auto; max-width: 30vw; max-height: 24vh; margin: 0 auto 1em; object-fit: contain; }
#metadata.bottom-right #cover-art { margin-right: 0; }
p { margin: 0; overflow-wrap: break-word; overflow-wrap: anywhere; word-break: break-word; white-space: pre-line; }
#line, #title { font-size: 72px; font-size: clamp(42px, 5.7vw, 110px); line-height: 1.22; font-weight: 500; }
#line, #title { color: #545454; }
#lyric-group { width: 100%; }
.context-slot { display: flex; align-items: flex-end; justify-content: center; }
.context-slot:last-child { align-items: flex-start; }
#previous-line, #next-line { width: 100%; line-height: 1.22; font-weight: 500; color: #434343; }
#artist { font-size: 38px; font-size: clamp(24px, 3vw, 54px); line-height: 1.35; margin-bottom: 0.65em; color: #494949; }
#album { font-size: 26px; font-size: clamp(20px, 2vw, 36px); line-height: 1.4; margin-top: 1em; color: #3e3e3e; }
#status { font-size: 28px; font-size: clamp(22px, 2.8vw, 44px); line-height: 1.4; }
#content.dim { opacity: 0.3; }
#content.blank { opacity: 0; }
#content.fading { opacity: 0; transition-duration: 300ms; }
#content.changed { animation: appear 150ms ease; }
@keyframes appear { from { opacity: 0; } }
#setup { position: fixed; z-index: 2; bottom: 5vh; left: 10vw; right: 10vw; text-align: center; font-size: 16px; }
button { font: inherit; color: inherit; background: #000000; border: 1px solid #777777; border-radius: 4px; padding: 0.7em 1.2em; cursor: pointer; }
button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
#setup-help { margin-top: 0.6em; }
@media (max-width: 600px) {
  #line, #title { font-size: 28px; font-size: clamp(24px, 6.5vw, 40px); }
  #artist { font-size: 22px; }
  #album { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #content, #content.fading { transition: none; }
  #content.changed { animation: none; }
}
