/* Scoped presentation; room state, world transforms and input handlers stay native. */
body > header { gap: 10px; padding: 10px 16px; background: #f8fcf1ed; }
body > header a { letter-spacing: .02em; }
body > header span { white-space: nowrap; }
body > header button { min-height: 44px; }
body > header #ggBugReport { min-height: 44px; border-radius: 6px; border: 1px solid #1c4f39; }
.gg-bug-report-dialog button { min-height: 48px; border-radius: 6px; }
button { border: 1px solid #76958d; border-radius: 6px; background: #e6f1e9; box-shadow: inset 0 1px #fff, inset 0 -3px #b5cdc3; font-size: 16px; line-height: 1.3; min-height: 48px; font-weight: 800; }
button:hover:not(:disabled) { background-color: #d7eadd; }
button:active:not(:disabled) { box-shadow: inset 0 3px #52736750; }
button:disabled { opacity: 1; background: #e1e5e2; color: #52635c; border-color: #a7b5ac; box-shadow: none; }
button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #175dbd; outline-offset: 3px; }
.primary, #idle-continue { background: #b44b21; color: #fff; border-color: #843817; box-shadow: inset 0 1px #ec9b73, inset 0 -3px #843817; }
.primary:hover:not(:disabled), #idle-continue:hover { background: #983e1c; }
input { border-radius: 6px; border-color: #8ca89d; }
#panel:has([data-endpoint="/party-race/rooms"]) { top: 78px; bottom: 20px; padding: 24px; border: 1px solid #9cb6a5; border-radius: 18px; box-shadow: 0 12px 28px #23485426; }
#panel h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.06em; margin: 10px 0 18px; }
#panel h1 br { display: none; }
#panel:has(#entry[hidden]) { width: min(460px,calc(100vw - 24px)); bottom: auto; max-height: calc(100dvh - 100px); }
#customizer { margin-bottom: 18px; padding: 8px 12px; border-color: #b6cbbd; border-radius: 8px; }
#customizer summary { min-height: 32px; line-height: 24px; }
#room-code { letter-spacing: .12em; margin: 12px 0; }
#rename-status { display: block; min-height: 20px; font-size: 14px; }
#copy { margin-top: 8px; }
.invite-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.invite-row #copy { margin: 0; }
.invite-row #room-code { margin: 0; font-size: 22px; }
#members li { padding: 9px 12px; font-size: 15px; }
#panel .gg-room-directory { padding: 18px; border-radius: 10px; box-shadow: none; }
#panel .gg-room-directory__room { border-radius: 6px; }
#panel .gg-room-directory__refresh { border: 1px solid #8ca89d; border-radius: 6px; background: #e6f1e9; }
#grab { border-radius: 12px; box-shadow: inset 0 1px #fff, inset 0 -3px #478c7e; }
#grab[aria-pressed=true] { transform: none; box-shadow: inset 0 3px #346e60; }
#jump { border-radius: 12px; box-shadow: inset 0 1px #ffedaf, inset 0 -3px #a78633; }
#attack { border-radius: 12px; }
#attack:disabled { background: #e1e5e2; }
#spectator button { min-width: 48px; }
.gg-bug-report-dialog header { position: static; }
@media (max-width: 760px) {
  #panel:has([data-endpoint="/party-race/rooms"]) { top: 74px; bottom: 12px; padding: 18px; }
  #panel h1 { font-size: 32px; margin-bottom: 16px; }
  #panel .gg-room-directory { padding: 14px; }
}
@media (max-width: 430px) {
  body > header { gap: 8px; padding: 8px 12px; }
  body > header a { font-size: 11px; }
  body > header span { font-size: 11px; }
  body > header button { font-size: 14px; padding: 6px 10px; }
  #hud { flex-wrap: wrap; gap: 6px; }
  #hud > div { flex: 1 1 100%; padding: 8px 12px; }
  #hud > strong, #hud > span { padding: 6px 10px; margin: 0; }
  #environment { top: 182px; }
}
@media (max-height: 520px) {
  body #panel:has([data-endpoint="/party-race/rooms"]) { top: 68px; bottom: 10px; max-height: none; padding: 16px 20px; }
  #panel h1 { font-size: 28px; margin: 6px 0 12px; }
  #customizer { margin-bottom: 12px; }
  #hud { top: 66px; }
  #environment { top: 125px; }
}
@media (max-height: 520px) and (min-width: 761px) {
  body #panel:has([data-endpoint="/party-race/rooms"]) { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 12px 28px; align-content: start; }
  #panel > .eyebrow, #panel > h1 { grid-column: 1; }
  body #panel:has([data-endpoint="/party-race/rooms"]) > h1 { font-size: 28px; margin: 0; }
  body #panel:has([data-endpoint="/party-race/rooms"]) > #customizer { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: start; }
  #panel > #entry, #panel > #lobby, #panel > #error { grid-column: 1 / -1; }
  body #panel:has([data-endpoint="/party-race/rooms"]) #entry input { min-height: 48px; padding: 10px; }
  body #panel:has([data-endpoint="/party-race/rooms"]) #entry button { min-height: 48px; }
  body #panel:has(#entry[hidden]) { width: min(900px,calc(100vw - 64px)); max-height: none; bottom: 10px; }
  body #panel:has([data-endpoint="/party-race/rooms"]) #lobby { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 8px 24px; align-items: start; }
  #lobby #rename-form { grid-column: 1; grid-row: 1 / span 2; }
  #lobby .invite-row { grid-column: 2; grid-row: 1; margin: 0; }
  #lobby #count { grid-column: 2; grid-row: 2; margin: 0; }
  #lobby #members { grid-column: 2; grid-row: 3; margin: 0; max-height: 68px; }
  #lobby #start, #lobby #return { grid-column: 1; grid-row: 3; margin: 0; }
  body #panel:has(#customizer[open]) { display: block; }
}
