/* Idle only: a small native-art dock and an optional reading column.
   The renderer reserves the column; no overlay scales or covers the arena. */
body.native-ui.idle-game { --idle-inspector-width:380px; }
body.native-ui.idle-game .game-screen canvas#game-canvas {
 left:0;top:0;width:calc(100% - var(--idle-scene-inset,0px));height:100%;transform:none;
}
body.native-ui.idle-game .game-screen {
 --hud-player:210px;--hud-player-height:113px;--hud-right:118px;
}
body.native-ui.idle-game .game-screen .player-ident h2 { font-size:14px; }
body.native-ui.idle-game .game-screen .match-center {
 min-height:46px;padding:10px 21px;gap:2px;
}
body.native-ui.idle-game .game-screen .match-phase { font-size:12px; }
body.native-ui.idle-game .game-screen .match-objective { font-size:10px; }
body.native-ui.idle-game .game-screen .boss-hud { top:60px;height:44px; }
body.native-ui.idle-game .game-screen .boss-label { top:2px;height:16px; }
body.native-ui.idle-game .game-screen .boss-label strong { font-size:12px;line-height:16px; }
body.native-ui.idle-game .game-screen:has(#boss-hud:not([hidden])) .combat-status-strip { top:110px; }
body.native-ui.idle-game.in-game .game-screen .minimap-panel {
 left:14px;right:auto;top:128px;bottom:auto;width:74px;height:74px;
}
body.native-ui.idle-game.in-game .game-screen .minimap-panel canvas {
 left:15%;top:16%;width:70%;height:68%;
}
body.native-ui.idle-game .game-screen #idle-hud {
 display:grid;grid-template-columns:minmax(140px,1.8fr) repeat(4,minmax(64px,1fr)) 54px;
 grid-template-rows:60px;align-items:stretch;gap:5px;
 position:absolute;left:50%;right:auto;bottom:max(8px,env(safe-area-inset-bottom));
 width:min(760px,calc(100% - 24px));min-width:0;max-width:none;height:60px;
 transform:translateX(-50%);padding:0;border:0;box-shadow:none;
 background:none!important;pointer-events:auto;box-sizing:border-box;z-index:8;
}
body.native-ui.idle-game .game-screen #idle-hud[hidden] { display:none!important; }
body.native-ui.idle-game .game-screen #idle-hud button {
 grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
 width:100%;min-width:0;min-height:44px;height:60px;box-sizing:border-box;
 gap:2px;padding:8px 14px;border:0;font:12px/1.15 var(--pixel);color:#fff4dc;
 text-shadow:1px 1px #07191c;white-space:normal;overflow:visible;text-overflow:clip;
 overflow-wrap:normal;cursor:pointer;background-image:var(--native-panel-image,var(--native-button))!important;
 background-position:center;background-size:100% 100%;background-repeat:no-repeat;
}
body.native-ui.idle-game .game-screen #idle-hud button:focus-visible {
 outline:2px solid #fff0ad;outline-offset:1px;
}
body.native-ui.idle-game .game-screen #idle-hud .idle-action-icon {
 width:18px;height:18px;flex:0 0 18px;margin:0;object-fit:contain;image-rendering:pixelated;
}
body.native-ui.idle-game .game-screen #idle-hud .idle-hud-summary {
 align-items:stretch;gap:3px;padding:9px 18px;
}
body.native-ui.idle-game #idle-hud .idle-hud-balance {
 display:grid;grid-template-columns:16px max-content minmax(0,1fr);gap:5px;align-items:center;
 min-width:0;line-height:16px;text-align:left;white-space:nowrap;
}
body.native-ui.idle-game .game-screen #idle-hud .idle-hud-balance .idle-action-icon {
 width:16px;height:16px;flex-basis:16px;
}
body.native-ui.idle-game #idle-hud .idle-hud-balance strong {
 font:11px/16px var(--numeric-font,var(--pixel));font-weight:600;color:#fff1c7;
}
body.native-ui.idle-game #idle-hud .idle-hud-balance>span { font-size:10px;line-height:16px; }
body.native-ui.idle-game #idle-hud .idle-capture-hint {
 max-width:100%;min-height:10px;font-size:9px;line-height:10px;white-space:nowrap;color:#d7e5d8;
}
body.native-ui.idle-game #idle-hud .idle-quick-action[data-ready=true] { color:#fff2a0; }
body.native-ui.idle-game #idle-hud .idle-quick-action[data-ready=true] .idle-capture-hint { color:#ddf6b6; }
body.native-ui.idle-game #idle-quick-chat { display:flex;min-width:0;align-items:stretch; }
body.native-ui.idle-game .game-screen #idle-quick-chat .realm-chat-launcher {
 position:static;inset:auto;flex:1 1 100%;width:100%;height:60px;min-height:44px;
 padding:8px 9px;align-self:stretch;
}
body.native-ui.idle-game #idle-quick-chat .realm-chat-launcher img {
 width:18px;height:18px;flex:0 0 18px;object-fit:contain;
}
body.native-ui.idle-game #idle-quick-chat .idle-inspection-chat-label { font-size:11px;line-height:13px; }
body.native-ui.idle-game #idle-quick-chat:has(.realm-chat-launcher[hidden]) { display:none; }
body.native-ui.idle-game .game-screen #idle-hud:has(.realm-chat-launcher[hidden]) {
 grid-template-columns:minmax(140px,1.8fr) repeat(4,minmax(64px,1fr));
}

/* Only an authenticated live inspection becomes a side column. Enrollment,
   session recovery, settings and the paused Center keep their own surfaces. */
body.native-ui.idle-game.in-game:has(#overlay[hidden]) #modal.realm-modal[data-idleinspection=true] {
 inset:0 0 0 auto;width:var(--idle-inspector-width);max-width:100%;height:100dvh;
 display:flex;align-items:stretch;justify-content:flex-end;padding:8px 10px;
 box-sizing:border-box;background:none;backdrop-filter:none;pointer-events:none;
}
body.native-ui.idle-game.in-game:has(#overlay[hidden]) #modal.realm-modal[data-idleinspection=true][hidden] { display:none!important; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .modal-panel {
 display:flex;flex-direction:column;gap:0;width:100%;max-width:none;min-width:0;
 height:100%;max-height:100%;padding:21px 24px 22px;box-sizing:border-box;
 pointer-events:auto;overflow:hidden;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .modal-header {
 flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;
 gap:8px;padding:0 0 8px;min-width:0;border:0;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .modal-header>div { min-width:0; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .section-kicker { display:none; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] #modal-title {
 margin:0;font:17px/1.2 var(--pixel);color:#fff1cd;white-space:normal;overflow-wrap:anywhere;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] #modal-close {
 flex:0 0 80px;width:80px;height:40px;min-width:80px;padding:10px 15px;
 font:12px/16px var(--pixel);white-space:nowrap;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .modal-content {
 flex:1 1 auto;min-height:0;min-width:0;padding:2px 3px 2px 0;overflow:auto;
 overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;
 font:13px/1.35 var(--pixel);touch-action:pan-y;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-panel {
 gap:10px;min-width:0;font:13px/1.35 var(--pixel);
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-panel button {
 min-height:44px;padding:11px 19px!important;font:13px/1.25 var(--pixel);
 white-space:normal;overflow-wrap:anywhere;opacity:1;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-tabs {
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;
}
body.native-ui.idle-game #modal .idle-inspection-view-select { display:none; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-tabs button {
 min-height:42px;padding:10px 14px!important;font-size:12px;overflow-wrap:normal;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] :is(.realm-note,.realm-status) {
 font-size:13px;line-height:1.4;overflow-wrap:anywhere;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] :is(input,select) {
 min-height:48px;font-size:13px;line-height:1.3;padding:7px 12px;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] label {
 display:block;margin:0;padding:0;border:0;font-size:13px;line-height:1.35;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-chat-form {
 grid-template-columns:minmax(0,1fr);gap:6px;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-chat-form button { min-width:0;width:100%; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-chat-log {
 height:clamp(130px,30dvh,290px);padding:8px 10px;border-width:12px;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-chat-log p { font-size:13px;line-height:1.4; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] :is(.realm-offers,.realm-achievements,.realm-market-modes) {
 grid-template-columns:minmax(0,1fr);
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] :is(.realm-offer,.realm-achievement) { padding:22px 25px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] :is(.realm-offer,.realm-achievement,.realm-ranking) strong { font-size:15px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-world { padding:10px 12px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-world-counts { grid-template-columns:1fr;gap:7px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-world-counts>div {
 display:grid;grid-template-columns:minmax(55px,auto) minmax(0,1fr);align-items:center;gap:10px;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-world-counts strong { font-size:18px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] :is(.idle-inspection-team,.idle-inspection-toolbar,.idle-inspection-journal,.idle-inspection-capture,.idle-capture-inspection) {
 display:grid;gap:8px;min-width:0;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-team-list { display:grid;gap:12px;min-width:0; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-member {
 display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:10px;
 min-width:0;padding:3px 0;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-face {
 width:42px;height:42px;object-fit:contain;image-rendering:pixelated;align-self:center;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-member-details {
 display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-member-details strong { font-size:14px;line-height:1.25; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-member-details span { font-size:12px;line-height:1.3; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-member-status { font-size:11px;line-height:1.3;color:#c9dfc7; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-pagination {
 display:grid;grid-template-columns:minmax(0,1fr) minmax(45px,.65fr) minmax(0,1fr);align-items:center;gap:4px;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-pagination button { padding:11px 14px!important;font-size:12px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-pagination>span { font-size:11px;line-height:1.25;text-align:center; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-journal-stats {
 display:grid;grid-template-columns:minmax(0,1fr);gap:9px;margin:0;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-journal-stats>div {
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:start;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-journal-stats dt { color:#c6d8ca;font-size:12px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-journal-stats dd { margin:0;overflow-wrap:anywhere;font-size:13px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-journal-actions { display:grid;gap:6px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-capture p { margin:0; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-capture-inspection { gap:6px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-capture-inspection select { min-height:44px;height:44px;padding:4px 14px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-capture button {
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
}
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-capture [data-idle-capture] { gap:3px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-capture button .idle-action-icon { width:20px;height:20px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-capture [data-idle-capture] .idle-action-icon { width:16px;height:16px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-capture .idle-hud-action-title { display:flex;align-items:center;justify-content:center;gap:6px; }
body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-capture button small { font-size:12px;line-height:1.3; }

/* The diary retains these readings while the temporary inspector is open. */
body.native-ui.idle-game.idle-inspecting .game-screen #idle-hud,
body.native-ui.idle-game.idle-inspecting .game-screen .match-center,
body.native-ui.idle-game.idle-inspecting .game-screen .match-stats,
body.native-ui.idle-game.idle-inspecting .game-screen .minimap-panel { display:none!important; }
body.native-ui.idle-game.idle-inspecting .game-screen .match-right {
 right:calc(var(--idle-scene-inset,0px) + 8px);top:8px;width:34px;
}
body.native-ui.idle-game.idle-inspecting .game-screen .game-actions { flex-direction:column;gap:5px; }
body.native-ui.idle-game.idle-inspecting .game-screen .game-actions .icon-button { width:34px;height:34px; }
body.native-ui.idle-game.idle-inspecting .game-screen .experience-controls {
 left:8px;right:auto;top:calc(var(--hud-player-height) + 14px);width:var(--hud-player);max-width:var(--hud-player);
}
body.native-ui.idle-game.idle-inspecting .game-screen .boss-hud {
 left:8px;right:auto;top:auto;bottom:8px;transform:none;
 width:min(300px,calc(100% - var(--idle-scene-inset,0px) - 16px));
}
body.native-ui.idle-game.idle-inspecting .game-screen .combat-status-strip {
 left:8px;right:auto;top:auto;bottom:58px;transform:none;
 max-width:calc(100% - var(--idle-scene-inset,0px) - 16px);justify-content:flex-start;
}
body.native-ui.idle-game.idle-inspecting .game-screen:has(#boss-hud:not([hidden])) .combat-status-strip { top:auto; }
body.native-ui.idle-game.idle-inspecting .game-screen .toast {
 left:8px;top:calc(var(--hud-player-height) + 56px);bottom:auto;
 max-width:calc(100% - var(--idle-scene-inset,0px) - 16px);box-sizing:border-box;
}
@media(max-width:1000px),(max-height:540px) {
 body.native-ui.idle-game .game-screen { --hud-edge:8px;--hud-player:168px;--hud-player-height:90px;--hud-right:112px; }
 body.native-ui.idle-game .game-screen .player-ident h2 { font-size:11px; }
 body.native-ui.idle-game .game-screen .player-hud .resource { height:9px; }
 body.native-ui.idle-game .game-screen .resource-label strong { font-size:8px;padding-right:7px; }
 body.native-ui.idle-game .game-screen .match-center { min-height:44px;padding:9px 18px; }
 body.native-ui.idle-game .game-screen .match-phase { font-size:11px; }
 body.native-ui.idle-game .game-screen .match-objective { font-size:10px; }
 body.native-ui.idle-game .game-screen .boss-hud { top:57px;height:44px; }
 body.native-ui.idle-game.in-game .game-screen .minimap-panel { left:8px;top:106px;width:64px;height:64px; }
 body.native-ui.idle-game .game-screen #idle-hud { width:calc(100% - 16px);gap:4px;grid-template-columns:minmax(140px,1.8fr) repeat(4,minmax(64px,1fr)) 48px; }
 body.native-ui.idle-game .game-screen #idle-hud button { font-size:11px;padding:8px 12px; }
 body.native-ui.idle-game .game-screen #idle-hud .idle-hud-summary { padding:9px 15px; }
 body.native-ui.idle-game .game-screen #idle-hud .idle-action-icon { width:16px;height:16px;flex-basis:16px; }
 body.native-ui.idle-game .game-screen #idle-quick-chat .realm-chat-launcher { padding:8px 8px; }
 body.native-ui.idle-game .game-screen #idle-quick-chat .realm-chat-launcher img { width:16px;height:16px; }
 body.native-ui.idle-game.idle-inspecting .game-screen .boss-hud { top:auto; }
}
@media(max-width:844px) {
 body.native-ui.idle-game { --idle-inspector-width:304px; }
 body.native-ui.idle-game.in-game:has(#overlay[hidden]) #modal.realm-modal[data-idleinspection=true] { padding:8px 12px; }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .modal-panel { padding:19px 20px 20px; }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] #modal-title { font-size:15px; }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .realm-tabs { display:none; }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-view-select {
  display:block;min-height:44px;height:44px;width:100%;padding:4px 12px;font-size:13px;
 }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true][data-modalview=capture] .idle-inspection-content { gap:4px; }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true][data-modalview=capture] .idle-capture-inspection { gap:4px; }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-pagination { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-pagination>span { grid-column:1/-1;grid-row:2; }
 body.native-ui.idle-game.in-game #modal.realm-modal[data-idleinspection=true] .idle-inspection-journal-stats>div { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); }
}
