body.ended:not(.victory) #panel {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(240px,34%) minmax(0,1fr);
  grid-template-areas:". title ." ". result ." ". board menu" ". entry studio" ". replay .";
  align-content:safe center;
  justify-content:stretch;
  justify-items:center;
  gap:clamp(6px,2dvh,18px) 0;
  background:#08070c url("./art/game-over-stars.png") center / cover;
  font-family:OutlandArcade,monospace;
}
body.ended:not(.victory) h1 {
  color:#ff3636;
  text-shadow:none;
  grid-area:title;
  white-space:nowrap;
  font-size:clamp(28px,min(9vw,9dvh),78px);
}
body.ended:not(.victory) #brief {grid-area:result;color:#f3dece;font-weight:400}
body.ended:not(.victory) #high-scores {
  grid-area:board;
  width:clamp(190px,24vw,320px);
  padding:clamp(8px,2dvh,16px) 20px;
  border-radius:4px;
  background:#211025dc;
  color:#fff1dc;
}
body.ended:not(.victory) #high-scores h2 {margin-bottom:.65em;color:#78ffdc}
body.ended:not(.victory) #high-scores ol {counter-reset:rank;display:grid;gap:.36em}
body.ended:not(.victory) #high-scores li {
  counter-increment:rank;display:grid;grid-template-columns:2ch 1fr auto;gap:1ch;text-align:left;
}
body.ended:not(.victory) #high-scores li::before {content:counter(rank);color:#c89cb7}
body.ended:not(.victory) #panel button {
  min-height:44px;padding:0 14px;border:1px solid #a787a5;border-radius:4px;
  background:#29172f;color:#fff2de;font:400 clamp(12px,2.6dvh,19px)/1 OutlandArcade,monospace;
  text-transform:uppercase;white-space:nowrap;
}
body.ended:not(.victory) #panel #start {
  grid-area:replay;width:clamp(160px,19vw,270px);
  border:2px solid #88f4cd;color:#a1ffda;font-size:clamp(16px,3.5dvh,25px);
}
body.ended:not(.victory) #menu {grid-area:menu;align-self:end;width:clamp(130px,18vw,240px)}
body.ended:not(.victory) #panel #studio-wordmark {
  grid-area:studio;display:block;color:#ebc5bc;font-size:clamp(10px,2.4dvh,17px);letter-spacing:0;
}
body.ended:not(.victory) :is(#initial-entry,#score-saved) {grid-area:entry}
body.ended:not(.victory) #initial-entry {justify-content:center;flex-wrap:wrap;color:#ebc5bc}
@media(orientation:portrait),(max-width:600px) {
  body.ended:not(.victory) #panel {
    grid-template-columns:100%;grid-template-areas:"title" "result" "board" "entry" "replay" "menu" "studio";
    gap:clamp(5px,1.7dvh,14px);
  }
}
@media (orientation:portrait) {
  body.ended:not(.victory) #panel :is(#start,#menu,#boss-trial) {
    box-sizing:border-box;
    width:min(100%, clamp(210px,72vw,290px));
    min-height:48px;
    margin-inline:auto;
    padding:6px 14px;
    text-align:center;
    font-size:clamp(14px,4vw,19px);
    line-height:1.25;
    letter-spacing:0;
  }
}
