:root { color-scheme: dark; font-family: system-ui, sans-serif; color: #f4ecda; background: #181816; touch-action: manipulation; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: var(--room-standalone-height, 100dvh); display: grid; grid-template-rows: minmax(0, 1fr) auto; }
[hidden] { display: none !important; }
main { position: relative; min-width: 0; min-height: 0; }
iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Keep the viewport laid out while the account check covers the game. */
#native[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
#notice { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem; }
a { color: #e1c48a; }
footer { display: flex; gap: .4rem; align-items: center; background: #222320; border-top: 1px solid #514b3c; padding: 0 max(.55rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(.55rem, env(safe-area-inset-left)); touch-action: manipulation; }
button { min-height: 44px; padding: 0 .65rem; border: 0; color: #f0dfbd; background: transparent; font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #f3d790; }
button:disabled { color: #99978f; cursor: default; }
#status { flex: 1; font-size: .78rem; line-height: 1.25; }
[data-room-rotation-slot]:empty, body.at-table > [data-room-rotation-notice] { display: none; }
[data-room-rotation-slot] { min-width: 0; color: #dfd4ba; font-size: .78rem; line-height: 1.2; pointer-events: none; }
.room-voice-title { display: none; }
.room-voice-microphone, .room-voice-open { touch-action: manipulation; }
.room-voice-open::after { content: '开麦'; }
.room-voice-open[aria-pressed=true]::after { content: '关麦'; color: #aae2ac; }
@media (max-width: 420px) { footer { gap: .1rem; } button { padding-inline: .4rem; font-size: .875rem; } }

/* Eight seats use the long side of a small phone even when its OS rotation is
   locked. The iframe keeps a true landscape viewport and native hit testing. */
@media (orientation: portrait) and (max-width: 599px) {
  html:has(body.at-table) { overflow: clip; }
  body.at-table {
    position: fixed; left: 100%; top: 0;
    width: 100vh; width: 100dvh; height: 100vw; height: 100dvw;
    transform-origin: top left; transform: rotate(90deg);
    padding: env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) env(safe-area-inset-top);
  }
  body.at-table footer { padding: 0 .45rem; }
}
