/* Reserve actual layout space for the HUD; the canvas is only the playable viewport. */
body.royal-theme[data-screen=game] .arena{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:58px minmax(160px,1fr) 28px 44px 86px;gap:0;height:100%;min-height:0;overflow:hidden;background:#10243a}
body.royal-theme[data-screen=game] .stage{position:relative;inset:auto;grid-row:2;grid-column:1;width:100%;height:100%;min-height:0;overflow:hidden}
body.royal-theme[data-screen=game] .scoreboard{grid-row:1;grid-column:1;width:100%;max-width:none;height:58px;min-height:0;box-sizing:border-box;margin:0;padding:3px 12px;border:0;border-bottom:1px solid #56758f;border-radius:0;box-shadow:none}
body.royal-theme[data-screen=game] .scoreboard .player{padding:3px 5px;gap:6px;min-width:0;opacity:.85}
body.royal-theme[data-screen=game] .scoreboard .player.active{opacity:1}
body.royal-theme[data-screen=game] .scoreboard .player small{display:none}
body.royal-theme[data-screen=game] .scoreboard .player strong{font-size:29px;line-height:1}
body.royal-theme[data-screen=game] .scoreboard .player b{font-size:11px}
body.royal-theme[data-screen=game] .scoreboard .round{display:grid;grid-template-columns:auto auto;gap:2px 7px;align-items:center;padding:3px 8px;min-width:66px;border-radius:9px}
body.royal-theme[data-screen=game] .round small{font-size:8px}
body.royal-theme[data-screen=game] .round b{font-size:19px;grid-column:2;grid-row:1}
body.royal-theme[data-screen=game] #goal47{font-size:7px}
body.royal-theme[data-screen=game] #turnClock{font-size:15px;line-height:1.1;margin:0}
body.royal-theme[data-screen=game] .table-toolbar{top:6px;left:8px;right:8px;gap:6px}
body.royal-theme[data-screen=game] .table-toolbar button{min-height:36px;height:36px;min-width:38px;padding:5px 9px;font-size:11px;border-bottom-width:3px}
body.royal-theme[data-screen=game] .table-toolbar button svg{width:17px;height:17px}
body.royal-theme[data-screen=game] .camera-controls{top:49px;right:8px;left:auto;flex-direction:row;gap:4px}
body.royal-theme[data-screen=game] .camera-controls button{min-height:32px;padding:4px 6px;font-size:8px}
body.royal-theme[data-screen=game] .camera-controls button:disabled{display:none}
body.royal-theme[data-screen=game] .aim-zoom{top:49px;bottom:auto;left:8px;min-height:32px;padding:5px 8px;font-size:9px}
body.royal-theme[data-screen=game] .stage-label,body.royal-theme[data-screen=game] #scoreExplain52{display:none}
body.royal-theme[data-screen=game] .tactics-panel{grid-row:3;grid-column:1;box-sizing:border-box;height:28px;margin:0;padding:5px 12px;border:0;border-top:1px solid #57778e;border-radius:0;background:#17354c}
body.royal-theme[data-screen=game] .tactics-panel .provisional-note,body.royal-theme[data-screen=game] #tacticsAim{display:none}
body.royal-theme[data-screen=game] .tactics-panel b{font-size:10px}
body.royal-theme[data-screen=game] .tactics{grid-row:4;grid-column:1;margin:0;padding:3px 8px;border-radius:0;box-sizing:border-box}
body.royal-theme[data-screen=game] .shot-options{gap:6px}
body.royal-theme[data-screen=game] .shot-options button{min-height:36px;height:36px;padding:4px;font-size:11px;border-bottom-width:3px}
body.royal-theme[data-screen=game] .controls{grid-row:5;grid-column:1;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 124px;grid-template-rows:28px 29px;gap:3px 10px;width:100%;height:86px;box-sizing:border-box;margin:0;padding:7px 10px;border-radius:0}
body.royal-theme[data-screen=game] .controls .turn{grid-column:1;grid-row:1}
body.royal-theme[data-screen=game] .controls .turn b{font-size:12px}
body.royal-theme[data-screen=game] .controls .turn small{display:none}
body.royal-theme[data-screen=game] .controls .power{grid-column:1;grid-row:2}
body.royal-theme[data-screen=game] .power>div:first-child{font-size:8px;margin-bottom:5px}
body.royal-theme[data-screen=game] .controls #throw,body.royal-theme[data-screen=game] .controls #next{grid-column:2;grid-row:1 / span 2;min-height:60px;height:60px;padding:5px;font-size:11px}
body.royal-theme[data-screen=game] #throw svg{display:none}
body.royal-theme[data-screen=game] .round-result{max-height:90%;width:90%;max-width:500px;left:50%}
body.royal-theme[data-screen=game] .toast{top:auto;bottom:8px;left:50%;max-width:80%;font-size:10px;padding:5px 8px}
body.royal-theme[data-screen=game] .aim-loupe{top:90px;width:110px;height:110px}
body.royal-theme[data-screen=game] .shot-quality{bottom:12px}
body.royal-theme.left-handed[data-screen=game] .controls{grid-template-columns:124px minmax(0,1fr)}
body.royal-theme.left-handed[data-screen=game] .controls .turn,body.royal-theme.left-handed[data-screen=game] .controls .power{grid-column:2}
body.royal-theme.left-handed[data-screen=game] .controls #throw,body.royal-theme.left-handed[data-screen=game] .controls #next{grid-column:1}
@media(max-height:480px) and (orientation:landscape){body.royal-theme[data-screen=game] .arena{grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:50px minmax(0,1fr) 28px 44px 86px}body.royal-theme[data-screen=game] .stage{grid-row:1 / -1;grid-column:1}body.royal-theme[data-screen=game] .scoreboard{grid-column:2;height:50px;padding:2px}body.royal-theme[data-screen=game] .tactics-panel,body.royal-theme[data-screen=game] .tactics,body.royal-theme[data-screen=game] .controls{grid-column:2}body.royal-theme[data-screen=game] .controls{grid-template-columns:1fr 86px}body.royal-theme[data-screen=game] .scoreboard .player b{font-size:8px}body.royal-theme[data-screen=game] .scoreboard .player strong{font-size:22px}body.royal-theme[data-screen=game] .scoreboard .dot{display:none}}
body.royal-theme[data-screen=game] .camera-controls{top:auto;bottom:6px}
body.royal-theme[data-screen=game] .aim-zoom{top:auto;bottom:6px}

/* v69: icon space is part of layout, including compact navigation. */
body.royal-theme #lobby .bottom-nav button[data-ui-icon]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:54px;padding:5px 2px;font-size:9px;line-height:1.2}
body.royal-theme #lobby .bottom-nav button[data-ui-icon]::before{position:static;transform:none;display:block;width:20px;height:20px;flex:none}
body.royal-theme #lobby .lobby-heading{display:flex;align-items:center}
body.royal-theme #lobby .lobby-avatar{flex-shrink:0}
body.royal-theme #lobby #lobbyMore66{padding-left:42px}
body.royal-theme[data-screen=game] #throw::before{display:none}
body.royal-theme[data-screen=game] #throw{display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.3}
body.royal-theme[data-screen=game] #throw>span{display:none}
body.royal-theme[data-screen=game] #tableHome{padding-left:32px}
body.royal-theme[data-screen=game] #tableHome::before{left:8px;width:18px;height:18px}
body.royal-theme[data-screen=game] #tableMenu{font-size:0;padding:0;width:40px}
body.royal-theme[data-screen=game] #tableMenu::before{left:10px;width:20px;height:20px}
body.royal-theme[data-screen=game] #aimZoom{top:50px;bottom:auto;left:8px;right:auto;min-height:34px;height:34px}
body.royal-theme.left-handed[data-screen=game] #aimZoom{left:auto;right:8px}
body.royal-theme[data-screen=game] #aimDistance49{top:auto;bottom:45px;max-width:90%;font-size:9px;box-sizing:border-box}
body.royal-theme[data-screen=game] #closest52{transform:translate(-50%,12px);font-size:9px;padding:3px 6px}
body.royal-theme[data-screen=game] .toast{bottom:7px;max-width:65%}
body.royal-theme[data-screen=game] #tacticsRound{font-size:10px}
body.royal-theme #lobby .lobby-heading h1{font-size:clamp(17px,5vw,22px)}
body.royal-theme #lobby .lobby-heading>div{min-width:0}
body.royal-theme #lobby .lobby-heading>button[data-ui-icon]{padding-left:0;position:relative;flex:0 0 44px;width:44px;height:44px;min-height:44px;font-size:0}
body.royal-theme #lobby .lobby-heading>button[data-ui-icon]::before{left:11px;width:22px;height:22px}

/* v70: readable equipment preview and stronger selected-state hierarchy. */
body.royal-theme #lobby .lodge-hero{position:relative;isolation:isolate}
body.royal-theme #lobby .lodge-hero .loadout-card{display:flex;position:absolute;bottom:10px;left:10px;right:10px;height:64px;margin:0;padding:4px 12px;border:1px solid #e3cd9855;border-radius:13px;background:linear-gradient(100deg,#10243af5,#18344be8);box-shadow:0 6px 20px #03122266;z-index:3;align-items:center;gap:12px}
body.royal-theme #lobby .loadout-card img{height:62px;width:42px;object-fit:contain;filter:drop-shadow(2px 4px 3px #0009)}
body.royal-theme #lobby .loadout-card>div{min-width:0;flex:1}
body.royal-theme #lobby .loadout-card small{display:block;font-size:7px;letter-spacing:.10em;color:#b2c8db}
body.royal-theme #lobby .loadout-card b{display:block;font-size:13px;line-height:1.35;color:#fff1ce;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.royal-theme #lobby #loadoutShop{font-size:9px;min-height:24px;padding:2px 3px;background:none;border:0;box-shadow:none;color:#a9ecf1;text-align:left}
body.royal-theme #lobby #loadoutShop::before{display:none}
body.royal-theme #lobby .mode-card{position:relative;min-height:60px;border-radius:12px;transition:background .15s,border-color .15s}
body.royal-theme #lobby .mode-card.selected{background:linear-gradient(135deg,#3d6d78,#1b424e);border-color:#a7ede2;box-shadow:inset 0 0 0 1px #b9f6e455,0 3px 10px #071e3433}
body.royal-theme #lobby .mode-card.selected::after{content:'✓';position:absolute;right:5px;top:3px;font:700 10px system-ui;color:#c8ffee}
body.royal-theme #lobby .mode-card b{font-size:12px;line-height:1.25}
body.royal-theme #lobby .bottom-nav button>span{display:none}
body.royal-theme #lobby .bottom-nav button.active{background:linear-gradient(#496d79,#2c4b59);box-shadow:inset 0 2px #ffe3a3;color:#ffe3a3}
body.royal-theme #lobby .hero-copy h2{font-size:clamp(23px,5.7vw,36px);text-shadow:0 2px 3px #10263e,0 0 14px #10263e99}
body.royal-theme[data-screen=game] .scoreboard .player.active{background:linear-gradient(90deg,#75dfff22,transparent);box-shadow:inset 0 -3px #ffe1a0}
body.royal-theme[data-screen=game] .controls #throw{background:linear-gradient(#fff0b6,#f7c350 65%,#e7a529);color:#34303b;box-shadow:inset 0 2px #fff9d8,0 3px 0 #92652c;letter-spacing:.035em}
body.royal-theme[data-screen=game] .controls #throw:active{transform:translateY(2px);box-shadow:inset 0 2px 7px #966a2855}
body.royal-theme[data-screen=game] .controls #throw:disabled{filter:saturate(.35);opacity:.6}
body.royal-theme[data-screen=game] .power .track{height:13px;border:1px solid #96c7b066;box-shadow:inset 0 2px 4px #0008}
body.royal-theme button:focus-visible{outline:2px solid #c1f5ff;outline-offset:2px}
@media(max-height:620px){body.royal-theme #lobby .lodge-hero .loadout-card{height:44px;bottom:6px;left:6px;right:6px;padding:2px 8px}body.royal-theme #lobby .loadout-card img{height:42px;width:28px}body.royal-theme #lobby .loadout-card small{display:none}body.royal-theme #lobby .loadout-card b{font-size:10px}body.royal-theme #lobby .hero-copy{padding:8px 12px}body.royal-theme #lobby .hero-copy h2{font-size:22px}}
@media(max-height:450px){body.royal-theme #lobby .lodge-hero .loadout-card{display:none}}
@media(prefers-reduced-motion:reduce){body.royal-theme #lobby .mode-card{transition:none}}

@media(max-height:620px){body.royal-theme #lobby .hero-copy h2{display:none}}

/* v71: the audio controls fit the existing header and intro title row. */
body.royal-theme .header-actions #sound{display:inline-flex;align-items:center;justify-content:center;width:32px;min-width:32px;padding:0;font-size:18px}
body.royal-theme #brandIntro #introSound71{position:relative;z-index:20;min-height:36px;padding:6px 10px;font:700 9px system-ui;letter-spacing:.03em;border:1px solid #c9e0ea77;border-radius:12px;background:#16334bd9;color:#ffdf97;box-shadow:none;white-space:nowrap;pointer-events:auto}
body.royal-theme #brandIntro .top62{pointer-events:auto}
body.royal-theme #audioSettings71{width:100%;margin:12px 0;min-height:44px}
body.royal-theme #musicValue71{color:#ffdf97;font-variant-numeric:tabular-nums}

/* v72: replay and result own their layer; live board annotations stay out. */
body.royal-theme[data-presentation=result] #closest52,body.royal-theme[data-presentation=replay] #closest52,
body.royal-theme[data-presentation=result] #seatMarkers,body.royal-theme[data-presentation=replay] #seatMarkers,
body.royal-theme[data-presentation=result] #aimDistance49,body.royal-theme[data-presentation=replay] #aimDistance49,
body.royal-theme[data-presentation=result] #aimZoom,body.royal-theme[data-presentation=replay] #aimZoom,
body.royal-theme[data-presentation=replay] .table-toolbar,body.royal-theme[data-presentation=replay] .camera-controls,
body.royal-theme[data-presentation=result] .controls .power,body.royal-theme[data-presentation=replay] .controls .power{visibility:hidden;pointer-events:none}
body.royal-theme[data-screen=game] #roundResult{z-index:20;background:linear-gradient(145deg,#435f88,#243e62);border:2px solid #90b9d5;box-shadow:0 14px 45px #051326aa,inset 0 1px #d3eaff55;isolation:isolate}
body.royal-theme[data-screen=game] #roundResultScore{font-size:clamp(38px,10vw,58px);line-height:1.15}
body.royal-theme[data-screen=game] #replayBanner{position:absolute;z-index:25;top:8px;left:8px;right:8px;min-height:44px;padding:6px 8px 8px 12px;gap:8px;border:1px solid #a6cfdd88;border-radius:12px;background:#122e42f5;box-shadow:0 5px 18px #04132366}
body.royal-theme[data-screen=game] #replayBanner>span{font-size:9px;letter-spacing:.06em;line-height:1.3}
body.royal-theme[data-screen=game] #stopReplay{min-height:32px;height:32px;padding:4px 10px;font-size:11px;border-radius:9px;border-bottom-width:2px;flex-shrink:0}
body.royal-theme[data-screen=game] #replayProgress{height:3px}
