/* Keep the same two-column, 4:3 console on every screen. */
  html[data-theme] .player-card{
    --console-space:16px;--console-inset:20px;
    width:var(--console-frame-width,min(1200px,100%));max-width:none;min-width:0;aspect-ratio:4/3;min-height:0;
    zoom:var(--console-frame-zoom,1);
    padding:var(--console-inset);gap:var(--console-space);
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:auto minmax(0,1.8fr) minmax(0,1fr);
    grid-template-areas:"header header" "player tracks" "effects ghost";
    align-content:stretch;
  }
  html[data-theme] .card-caption{padding-bottom:12px}
  html[data-theme] .card-caption h1{font-size:28px;line-height:40px}
  html[data-theme] .system-label{margin-bottom:6px}
  html[data-theme] .deck{display:flex;flex-direction:column;justify-content:space-between;align-self:stretch;min-width:0}
  html[data-theme] .playlist-panel{align-self:stretch}
  html[data-theme] .effects-rack{display:flex;flex-direction:column;align-self:stretch}
  html[data-theme] .effect-tabs{gap:10px;margin-bottom:10px;flex:none}
  html[data-theme] .effects-rack .curse-control{flex:1;padding:10px}
  html[data-theme] .effects-rack .curse-control:not([hidden]){display:grid;grid-template-rows:auto minmax(0,1fr) auto}
  html[data-theme] .curse-control .curse-heading{padding-bottom:3px;margin-bottom:4px}
  html[data-theme] .curse-mode{margin-top:4px;line-height:20px}
  html[data-theme] .curse-dial-field{grid-template-columns:44px 56px 44px;grid-template-rows:48px 16px;justify-content:center;align-content:center;gap:4px 12px}
  html[data-theme] .curse-dial-field>.curse-scale:first-child{grid-column:1;grid-row:2;text-align:center}
  html[data-theme] .curse-dial-field>.curse-scale:last-child{grid-column:3;grid-row:2;text-align:center}
  html[data-theme] .curse-dial-field>.curse-step{grid-row:1}
  html[data-theme] .curse-dial-field>.curse-step:nth-child(2){grid-column:1}
  html[data-theme] .curse-dial-field>.curse-step:nth-child(4){grid-column:3}
  html[data-theme] .curse-dial-field>.curse-dial{grid-column:2;grid-row:1;justify-self:center}
  html[data-theme] .art{position:relative;height:100%;align-self:stretch;padding:16px;min-height:0}
  html[data-theme] .art .ghost-actor{
    position:absolute;left:50%;top:50%;width:90px;height:auto;aspect-ratio:388/394;
    margin:0;transform:translate(-50%,-50%);cursor:default;touch-action:auto;will-change:auto;
  }
  html[data-theme] .art .ghost-name{top:-8px}
  html[data-theme] .art .ghost-help{position:absolute;left:12px;right:12px;bottom:8px;margin:0}
  html[data-theme] .extra-links{padding-top:10px;border-top-width:2px;gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}
  html[data-theme] .player-card .donation-link{min-height:40px;height:40px;line-height:18px;padding:8px 10px}
  html[data-theme] .upload-note{font-size:12px;line-height:1.5}
  html[data-theme] .console-footer{display:none}
  /* Final geometry belongs here, after the historical theme and mobile rules. */
  html[data-theme] .player-status:empty{display:none}
  html[data-theme] .track-name{min-width:0;min-height:48px;overflow-wrap:anywhere}
  html[data-theme] .track{min-height:70px}
  html[data-theme] .track-slot,html[data-theme] .track-duration{align-self:center}
  html[data-theme] :is(.times,.track-duration,.display-line output,.volume-panel output,.curse-heading output){font-variant-numeric:tabular-nums;white-space:nowrap}
  html[data-theme] .now{overflow-wrap:anywhere}
  html[data-theme] .deck .volume-panel{grid-template-columns:44px auto minmax(0,1fr) 56px}
  html[data-theme] .volume-panel output{text-align:right}
  html[data-theme] .playlist{overscroll-behavior:contain}
  html[data-theme] .settings-panel{scrollbar-gutter:stable}
  html[data-theme] .deck .visualizer.signal-meter{--signal-led:#61DE2A}
  html[data-theme] .beat-lamp.is-hit b{background:var(--signal-led);border-color:var(--g-line)}
  html[data-theme][data-button-style=reliquary] :is(.player-card,.start-screen) .console-key{
    transition:transform 90ms ease-out,background-color 90ms linear,box-shadow 90ms ease-out;
  }
  html[data-theme] :is(.track,.win30-thumb):focus-visible{outline:2px solid var(--g-line);outline-offset:-4px}
  @media(prefers-reduced-motion:reduce){
    html[data-theme][data-button-style=reliquary] :is(.player-card,.start-screen) .console-key{transition:none}
  }
@media(max-width:940px){
  html[data-theme] .player-page{
    padding:max(20px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
    align-content:center;
  }
  html[data-theme] .card-caption{display:flex;align-items:center;gap:12px}
  html[data-theme] .system-label{font-size:12px;line-height:1.5}
  html[data-theme] .now{font-size:28px}
  html[data-theme] .player-card .settings-toggle{width:auto;height:44px;padding:8px 12px;justify-content:center}
  html[data-theme] .settings-toggle>span,html[data-theme] .settings-toggle>.key-label{display:block}
  html[data-theme] .settings-panel{width:340px;max-width:340px;max-height:calc((100dvh - 100px)/var(--console-frame-zoom,1))}
  html[data-theme] .panel-heading{flex-wrap:nowrap;min-height:0;padding:14px 12px;font-size:16px;line-height:1.5}
  html[data-theme] .playlist-panel{contain:size}
  html[data-theme] .playlist-window{height:auto;flex:1}
  html[data-theme] .track{grid-template-columns:30px minmax(0,1fr) auto;gap:12px;min-height:61px;padding:10px 12px;font-size:18px}
  html[data-theme] .track-duration{font-size:14px}
  html[data-theme] .player-card .curse-dial-field{grid-template-columns:44px 56px 44px;grid-template-rows:48px 16px;gap:4px 12px;padding-block:5px}
  html[data-theme] .player-card .curse-step{width:44px;height:44px;min-width:44px;min-height:44px}
  html[data-theme] .curse-scale{font-size:14px;line-height:1.5}
  html[data-theme] .deck .volume-panel{grid-template-columns:44px auto minmax(0,1fr) 56px;gap:10px}
  html[data-theme] .volume-panel input{min-height:0}
  html[data-theme] .seek{height:28px;padding:5px}
  html[data-theme] .extra-links{align-items:center}
  html[data-theme] .player-card .donation-link{width:auto}
}
@media(max-height:500px){
  html[data-theme] .player-page{align-content:start}
}
