/* The live game is a viewport, not a scrolling document. Chat scrolls inside it. */
html.rage-playing,html.rage-playing body{height:100%;overflow:hidden!important;overscroll-behavior:none}
html.rage-playing .game-shell{height:100dvh;max-height:100dvh;overflow:hidden!important}
html.rage-playing .turn-banner{display:none!important}
.home small.owner-name{position:absolute!important;left:4px;right:4px;bottom:4px;max-width:none!important;width:auto;text-align:center;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.1!important;font-size:clamp(9px,1.1vmin,13px)!important;z-index:10;background:#100a17bb;border-radius:4px;padding:2px 1px!important;text-shadow:0 1px 3px #000!important}
@media (orientation:landscape) and (pointer:coarse), (orientation:landscape) and (max-height:700px){
  html.rage-playing .topbar{position:absolute!important;z-index:30!important;top:2px!important;right:8px!important;left:auto!important;width:auto!important;height:32px!important;min-height:32px!important;padding:0!important;pointer-events:none!important}
  html.rage-playing .topbar .brand,html.rage-playing .topbar .room{display:none!important}
  html.rage-playing .top-actions{pointer-events:auto!important}
  html.rage-playing .game-layout{height:100%;min-height:0;grid-template-columns:minmax(0,1fr) clamp(220px,27vw,340px)!important;grid-template-areas:'arena chat'!important;gap:5px!important;align-items:start!important}
  html.rage-playing .game-layout>.players,html.rage-playing .game-layout>.vertical-slogan{display:none!important}
  html.rage-playing .game-layout>.arena{min-height:0;max-height:100dvh;overflow:visible!important;padding:1px 2px 0!important}
  html.rage-playing .game-layout>.chat{display:flex!important;grid-area:chat!important;position:static!important;min-width:0!important;width:100%!important;height:var(--rage-chat-height,calc(100dvh - 42px))!important;max-height:var(--rage-chat-height,calc(100dvh - 42px))!important;min-height:0!important;margin:36px 0 0!important;padding:10px!important;overflow:hidden!important}
  html.rage-playing .chat .messages{display:block!important;flex:1 1 auto;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important}
  html.rage-playing .chat-head{flex:0 0 auto;gap:6px}
  html.rage-playing .chat-head .eyebrow{font-size:clamp(12px,1.7vw,17px)!important;line-height:1.1}
  html.rage-playing .chat-form{flex:0 0 auto}
  html.rage-playing .chat-form input{font-size:13px!important;padding:9px!important}
  html.rage-playing .board-wrap{width:min(var(--rage-fit-height,calc(100dvh - 130px)),calc(100vw - clamp(230px,28vw,350px)))!important;max-width:none!important;margin:0 auto!important}
  html.rage-playing .board{width:100%!important;height:auto!important;aspect-ratio:1/1!important}
  html.rage-playing .board-legend,html.rage-playing .action-row,html.rage-playing footer{display:none!important}
  html.rage-playing .home small.owner-name{bottom:4px!important;font-size:clamp(9px,1.2vmin,13px)!important}
  html.android-app.rage-playing body .game-layout{grid-template-columns:minmax(0,1fr) clamp(220px,27vw,340px)!important;grid-template-areas:'arena chat'!important}
  html.android-app.rage-playing body .turn-banner,html.android-app.rage-playing body .players,html.android-app.rage-playing body .vertical-slogan{display:none!important}
  html.android-app.rage-playing body .chat{display:flex!important;grid-area:chat!important;width:100%!important;height:var(--rage-chat-height,calc(100dvh - 42px))!important;max-height:var(--rage-chat-height,calc(100dvh - 42px))!important;margin:36px 0 0!important;padding:10px!important;overflow:hidden!important}
  html.android-app.rage-playing body .board-wrap{width:min(var(--rage-fit-height,calc(100dvh - 130px)),calc(100vw - clamp(230px,28vw,350px)))!important;max-width:none!important;margin:0 auto!important}
  html.android-app.rage-playing body .home small.owner-name{bottom:4px!important;font-size:clamp(9px,1.2vmin,13px)!important}
}
@media (orientation:portrait) and (pointer:coarse){html.rage-playing .game-shell{height:100dvh;overflow:hidden!important}html.rage-playing .game-layout{height:calc(100dvh - 52px);overflow:hidden!important}html.rage-playing .board-wrap{width:min(calc(100vw - 8px),var(--rage-fit-height,calc(100dvh - 90px)))!important}html.rage-playing .game-layout>.chat{flex:1 1 auto;min-height:95px!important;overflow:hidden!important}html.rage-playing .chat .messages{overflow-y:auto!important}}
