/* Presentation-only Sky skin. Keep the 800 x 600 world, source art and hold
 * logic. Adjust HUD spacing/targets only to avoid overlap and improve touch. */
#stage.theme-sky { background: #96d5f6; }
/* A connection pause is not a new turn or a loading screen. Leave the map
 * and Escape available, with one readable, non-interactive status message. */
#stage.theme-sky #match_sync_status {
    display: none; position: absolute; top: 88px; left: 50%; transform: translateX(-50%);
    width: max-content; max-width: 80%; box-sizing: border-box; padding: 10px 16px;
    border: 1.5px solid #a7c8dd; border-radius: 12px; background: #effaff;
    color: var(--sky-ink); font: 700 24px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    text-align: center; text-shadow: none; pointer-events: none; z-index: 2300;
}
#stage.theme-sky #match_sync_status:not(:empty) { display: block; }
#stage.theme-sky :is(#btnShot1,#btnShot2,#btnShotSS,#btnEsc,#btnPass,#gameChatButton,#tagMobileCard) {
    background: #f3fbff; border: 1.5px solid #a7c8dd; border-radius: 9px;
    color: var(--sky-ink); box-shadow: inset 0 1px #fff, 0 3px 10px #20577724;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-weight: 800; text-shadow: none;
}
/* Keep the entire dock to the left of the source HUD's x=149 middle bezel.
 * A shared width/left edge also anchors the turn list directly above Chat. */
#stage.theme-sky #battleShotDock { position: absolute; left: 8px; bottom: 10px; width: 138px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; z-index: 1100; pointer-events: none; }
#stage.theme-sky #battleShotRow { display: flex; align-items: center; width: 100%; gap: 2px; }
#stage.theme-sky #battleShotRow button {
    position: relative; left: auto; top: auto; bottom: auto; flex: none; width: 32px; height: 40px; min-width: 0; min-height: 0; box-sizing: border-box;
    transform: none; padding: 0; border: 3px solid transparent; background-clip: padding-box;
    border-radius: 9px; box-shadow: none; font-size: 13px; pointer-events: auto; touch-action: manipulation;
}
#stage.theme-sky #battleShotRow #gameChatButton { width: 36px; font-size: 11px; }
#stage.theme-sky :is(#btnShot1,#btnShot2,#btnShotSS).Pressed { background: #1878b0; border-color: #8de3ff; color: #fff; }
#stage.theme-sky #battleShotRow button.Pressed { border-color: transparent; background-clip: padding-box; }
#stage.theme-sky :is(#btnEsc,#btnPass) { top: 0; height: 62px; width: 66px; font-size: 22px; }
#stage.theme-sky :is(#btnEsc,#btnPass)::before { content: none; }
#stage.theme-sky #gameChatButton { background-color: #1878b0; color: #fff; }
#stage.theme-sky #touch_ui:is(.control-small,.control-medium,.control-large) button {
    display: flex; align-items: center; justify-content: center; background: #effaff;
    border: 2px solid #a7c8dd; border-radius: 22px; color: #176b96; opacity: var(--control-opacity, .78);
    box-shadow: 0 4px 14px #20577735, inset 0 1px #fff; font: 700 75px/1 -apple-system,BlinkMacSystemFont,sans-serif;
}
#stage.theme-sky #touch_ui #btnShoot { background: #1878b0; color: #fff; border-color: #8de3ff; border-radius: 50%; font-size: 36px; }
#stage.theme-sky #touch_ui button.active { background: #d0edff; color: #125f8a; box-shadow: inset 0 0 0 3px #147cac; }
#stage.theme-sky #touch_ui #btnShoot.active { background: #125f8a; color: #fff; }
#stage.theme-sky #battleItems { border-color: #a7c8dd; border-radius: 9px; background: #e1eff8; box-shadow: inset 0 0 0 1px #fff; }
#stage.theme-sky #battleItems .battleItemIcon { background-color: #f3fbff; border-color: #aecddd; }
#stage.theme-sky #battleItems .battleItemIcon.prepared { outline-color: #147cac; filter: none; background-color: #c9eaff; }
#stage.theme-sky #uiGoldReadout { top: 64px; background: #164469; border-color: #a7c8dd; }
#stage.theme-sky #turns_list { position: relative; left: auto; bottom: auto; width: 100%; box-sizing: border-box; transform: none; padding: 5px; border: 1px solid #b8d9ea99; border-radius: 10px; background: #effaffb8; color: var(--sky-ink); }
#stage.theme-sky .turn_line_name { width: auto; right: 36px; text-overflow: ellipsis; }
#stage.theme-sky .turn_line_delay { color: #183b5b; text-shadow: none; }
#stage.theme-sky .turn_line_name_a { color: #176b96; text-shadow: none; }
#stage.theme-sky .turn_line_name_b { color: #a73349; text-shadow: none; }
#stage.theme-sky .turn_line_me { background: #c6e8fc99; border-radius: 4px; }
#stage.theme-sky #tagMobileName { color: var(--sky-ink); text-shadow: none; }
#stage.theme-sky #tagMobileHealthText { color: var(--sky-muted); text-shadow: none; }
#stage.theme-sky #battleModePanel { border-radius: 10px; background: #effaffeb; border: 1px solid #b8d9ea; }
#stage.theme-sky .battleModeTeam { color: #a73349; text-shadow: none; }
#stage.theme-sky .battleModeTeam.localTeam { color: #176b96; }
#stage.theme-sky :is(#match_loading_status,#game_click_to_revive) { border: 1.5px solid #fff; border-radius: 16px; background: #effaff; color: var(--sky-ink); text-shadow: none; padding: 16px; box-shadow: var(--sky-shadow); }
#stage.theme-sky #match_loading { z-index: 2400; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #96d5f6 var(--sky-background) center / cover no-repeat; color: var(--sky-ink); }
#stage.theme-sky #match_loading::before { content: "Preparing battle"; position: static; width: auto; height: auto; padding: 0; margin-bottom: 20px; transform: none; background: none; border: 0; box-shadow: none; color: var(--sky-ink); font-size: 32px; letter-spacing: 0; }
#stage.theme-sky #match_loading::after { content: none; }
#stage.theme-sky #match_loading_status { position: static; width: min(600px, 80%); box-sizing: border-box; min-height: 60px; display: grid; place-items: center; font-size: 22px; }
#stage.theme-sky #suddenDeathBanner { background: #ffedf0; border-color: #db8a9a; color: #a73349; text-shadow: none; }
#stage.theme-sky #OptionsDialog { width: 500px; height: 534px; grid-template-rows: 44px 216px 72px 72px 54px; background: #effaff; border: 2px solid #fff; border-radius: 22px; color: var(--sky-ink); box-shadow: 0 18px 60px #102c5e66; }
#stage.theme-sky .OptionsControlsSection { grid-template-rows: 22px 96px 48px; }
#stage.theme-sky .controlTransparencySetting { display: grid; grid-template-columns: auto minmax(0,1fr) 40px; gap: 10px; align-items: center; color: var(--sky-ink); font-size: 14px; font-weight: 700; }
#stage.theme-sky #controlTransparency { position: static; width: 100%; height: 48px; min-width: 0; padding: 0; margin: 0; accent-color: #147cac; touch-action: none; }
#stage.theme-sky #controlTransparencyValue { text-align: right; font-variant-numeric: tabular-nums; }
#stage.theme-sky.sky-battle-menu-open::after { content: ""; position: absolute; inset: 0; z-index: 2600; background: #153c6570; pointer-events: auto; }
#stage.theme-sky .OptionsDialogHeader { border-color: #bcd9ea; }
#stage.theme-sky .OptionsDialogHeader strong { color: var(--sky-ink); }
#stage.theme-sky .OptionsDialogHeader span { color: var(--sky-muted); }
#stage.theme-sky .OptionsDialogSection { background: #e2f2fc; border-color: #bfd9e8; }
#stage.theme-sky #OptionsDialog .OptionTitle1 { color: #176b96; }
#stage.theme-sky #OptionsDialog button { background: #f8fcff; color: var(--sky-ink); border-color: #a7c8dd; text-shadow: none; box-shadow: 0 2px 5px #20577714; }
#stage.theme-sky #OptionsDialog [role="radio"][aria-checked="true"],
#stage.theme-sky #OptionsDialog #OptionsOK { background: #1878b0; color: #fff; border-color: #8de3ff; }
#stage.theme-sky #OptionsDialog #OptionsLeave { background: #ffedf0; color: #a73349; border-color: #db8a9a; }
#stage.theme-sky #OptionsDialog :is(.RadioOn,.RadioOff) { background: none; border: 1.5px solid currentColor; border-radius: 50%; width: 10px; height: 10px; }
#stage.theme-sky #OptionsDialog .RadioOn { background: currentColor; box-shadow: inset 0 0 0 2px #1878b0; }
#stage.theme-sky #gameChatComposer { background: #effaff; border-color: #fff; color: var(--sky-ink); box-shadow: 0 9px 30px #20577740; }
#stage.theme-sky #gameChatInput { background: #fff; color: var(--sky-ink); border-color: #a7c8dd; }
#stage.theme-sky #gameChatInput:focus { border-color: #147cac; }
#stage.theme-sky #gameChatLimit { color: var(--sky-muted); }
#stage.theme-sky #gameChatStatus { color: #8d243c; background: #ffedf0; border-radius: 6px; }
#stage.theme-sky #gameChatStatus:empty { display: none; }
#stage.theme-sky #gameChatCancel { background: #f8fcff; color: var(--sky-ink); border: 1px solid #a7c8dd; }
#stage.theme-sky #gameChatSend { background: #1878b0; color: #fff; border: 1px solid #8de3ff; }
/* Results retain the authoritative values and automatic return timing. */
#stage.theme-sky #game_over { z-index: 2500; background: #96d5f6 var(--sky-background) center / cover no-repeat; }
#stage.theme-sky #game_over :is(#scores_lose_a,#scores_lose_b) { background: #ffedf0; border: 2px solid #fff; border-radius: 18px; color: #a73349; text-align: center; font: 800 22px/58px -apple-system,sans-serif; }
#stage.theme-sky #scores_lose_a::after { content: "Team A · Defeat"; }
#stage.theme-sky #scores_lose_b::after { content: "Team B · Defeat"; }
#stage.theme-sky #scores_lose_a.win::after { content: "Team A · Victory"; }
#stage.theme-sky #scores_lose_b.win::after { content: "Team B · Victory"; }
#stage.theme-sky #game_over :is(#scores_lose_a,#scores_lose_b).localTeam { color: #176b96; background: #e0f1fc; }
#stage.theme-sky #game_over :is(#scores_lose_a,#scores_lose_b).opponentTeam { color: #a73349; background: #ffedf0; }
#stage.theme-sky #game_over .score { background: #effaff; border: 1.5px solid #fff; border-radius: 14px; width: 352px; height: 94px; left: 36px; }
#stage.theme-sky #game_over :is(#score1,#score3,#score5,#score7) { left: 412px; }
#stage.theme-sky #game_over :is(#score0,#score1) { top: 115px; }
#stage.theme-sky #game_over :is(#score2,#score3) { top: 214px; }
#stage.theme-sky #game_over :is(#score4,#score5) { top: 313px; }
#stage.theme-sky #game_over :is(#score6,#score7) { top: 412px; }
#stage.theme-sky #game_over .score_me { inset: 0; width: auto; height: auto; background: none; border: 2px solid #147cac; border-radius: 14px; pointer-events: none; }
#stage.theme-sky #game_over .score_rank { left: 12px; top: 14px; }
#stage.theme-sky #game_over .score_name { left: 45px; top: 10px; width: calc(100% - 58px); color: var(--sky-ink); font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#stage.theme-sky #game_over .localTeam .score_name { color: #176b96; }
#stage.theme-sky #game_over .opponentTeam .score_name { color: #a73349; }
#stage.theme-sky #game_over :is(.score_gp,.score_gold,.score_bonus_gp,.score_bonus_gold) { font-size: 20px; color: #176b96; }
#stage.theme-sky #game_over .score_gp { left: 12px; top: 45px; }
#stage.theme-sky #game_over .score_gold { left: 134px; top: 45px; color: #825700; }
#stage.theme-sky #game_over :is(.score_bonus_gp,.score_bonus_gold) { display: none; }
#stage.theme-sky #game_over .score_state { left: auto; right: 10px; top: 67px; transform: none; font-size: 13px; color: #176440; text-shadow: none; }
#stage.theme-sky #resultsReturn { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); height: 72px; min-width: 230px; border-radius: 14px; background: #1878b0; border: 1.5px solid #8de3ff; color: #fff; font-size: 23px; font-weight: 750; touch-action: manipulation; }
/* Private Sandbox remains removable. Only paint these existing controls. */
#stage.theme-sky #sandboxUI { color: var(--sky-ink); }
#stage.theme-sky #sandboxUI :is(.sandboxPanel,.sandboxPlacementHint) { background: #effaff; border-color: #fff; color: var(--sky-ink); box-shadow: 0 14px 44px #20577755; }
#stage.theme-sky #sandboxUI .sandboxPanel > header { background: #e1f1fc; border-color: #bdd9e9; }
#stage.theme-sky #sandboxUI :is(.sandboxCard,.sandboxAdvancedSummary,.sandboxAdvancedTelemetry,.sandboxAdvancedGroup,.sandboxAdvancedField) { background: #f7fcff; border-color: #bdd9e9; }
#stage.theme-sky #sandboxUI :is(button,input[type="number"],select) { background: #f8fcff; border-color: #a7c8dd; color: var(--sky-ink); touch-action: manipulation; }
#stage.theme-sky #sandboxUI :is(button.selected,.sandboxPrimary) { background: #1878b0; border-color: #8de3ff; color: #fff; }
#stage.theme-sky #sandboxUI .sandboxDanger { background: #ffedf0; border-color: #db8a9a; color: #a73349; }
#stage.theme-sky #sandboxUI :is(p,.sandboxPlacementHint span,.sandboxAdvancedField p,.sandboxAdvancedFieldHeading small,.sandboxAdvancedFieldBound,.sandboxAdvancedSummary > span,#sandboxActiveForces.empty) { color: var(--sky-muted); }
#stage.theme-sky #sandboxUI :is(label,.sandboxAdvancedSummary strong,.sandboxAdvancedGroup > summary,.sandboxAdvancedTelemetry pre) { color: var(--sky-ink); }
#stage.theme-sky #sandboxUI :is(header span,#sandboxActivePlayer,.sandboxConfirmPanel > span),
#stage.theme-sky #sandboxUI .sandboxAdvancedField[data-field-scope="mobile"]::before,
#stage.theme-sky #sandboxUI .sandboxAdvancedGroup > summary::after { color: #176b96; }
#stage.theme-sky #sandboxUI :is(#sandboxMobileMessage,#sandboxAdvancedMessage,.sandboxAdvancedSummary > span.modified) { color: #825700; }
#stage.theme-sky #sandboxUI :is(.sandboxPlayerRow,.sandboxForceRow) { background: #e1f1fc; }
#stage.theme-sky #sandboxUI .sandboxPlayerRow.active { box-shadow: inset 3px 0 #147cac; }
#stage.theme-sky #sandboxUI :is(.sandboxScroll,.sandboxMobileGrid,.sandboxStatsFields,.sandboxAdvancedScroll),
#stage.theme-sky #sandboxUI :is(.sandboxScroll,.sandboxMobileGrid,.sandboxStatsFields,.sandboxAdvancedScroll) button { touch-action: pan-y; }
#stage.theme-sky #sandboxUI .sandboxPowerJog { background: #effaff; border-color: #a7c8dd; box-shadow: 0 3px 12px #20577735; }
#stage.theme-sky #sandboxUI .sandboxPowerJogRail { background: #bdddec; border-color: #8fbcd6; box-shadow: none; }
#stage.theme-sky #sandboxUI #sandboxPowerJogKnob { background: #1878b0; border-color: #fff; box-shadow: 0 2px 8px #20577745; touch-action: none; }
#stage.theme-sky #sandboxUI input[type="range"] { accent-color: #147cac; }
body.sandbox-create-mode #channelScreen.theme-sky #lobbyShell { background: transparent; }
.device-phone #stage.theme-sky #battleShotDock { left: calc(var(--safe-left) + 12px); bottom: 12px; width: 224px; }
.device-phone #stage.theme-sky #battleShotRow { gap: 4px; }
/* Smaller visible faces, with the original 72-unit vertical touch area. */
.device-phone #stage.theme-sky #battleShotRow button { width: 50px; height: 72px; border-width: 10px 3px; border-radius: 17px; font-size: 22px; }
.device-phone #stage.theme-sky #battleShotRow #gameChatButton { width: 62px; font-size: 19px; }
.device-phone #stage.theme-sky .turn_line { height: 21px; }
.device-phone #stage.theme-sky .turn_line_number { height: 21px; font-size: 16px; line-height: 21px; }
.device-phone #stage.theme-sky .turn_line_name { font-size: 16px; height: 21px; right: 44px; }
.device-phone #stage.theme-sky .turn_line_delay { font-size: 14px; }
.device-phone #stage.theme-sky #OptionsDialog { width: 620px; height: 576px; padding: 18px; gap: 8px; grid-template-rows: 44px 210px 86px 86px 72px; }
.device-phone #stage.theme-sky .OptionsControlsSection { grid-template-rows: 26px 72px 72px; }
.device-phone #stage.theme-sky .controlTransparencySetting { font-size: 20px; grid-template-columns: auto minmax(0,1fr) 52px; }
.device-phone #stage.theme-sky #controlTransparency { height: 72px; }
.device-phone #stage.theme-sky #OptionsDialog [role="radio"] { font-size: 21px; padding-left: 41px; padding-right: 10px; }
.device-phone #stage.theme-sky #OptionsDialog :is(.RadioOn,.RadioOff) { left: 15px; }
.device-phone #stage.theme-sky #OptionsDialog .OptionTitle1 { font-size: 20px; }
@media (prefers-reduced-motion: reduce) {
    #stage.theme-sky button { transition: none !important; }
}

/* Build 89: the whole six-slot strip communicates the active global lock. */
#stage.theme-sky #battleItems.battleItemsLocked { background: none; }
#stage.theme-sky .battleItemsLockBanner { grid-column: 1 / -1; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border: 2px solid #b7f09e; background: linear-gradient(#65bd34,#3c8d20); color: #071c04; font: 900 17px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing: .8px; text-shadow: none; box-sizing: border-box; }
#stage.theme-sky #btnShotSS.grayscale { filter: grayscale(1) brightness(.65); opacity: .48; box-shadow: none; }
#stage.theme-sky #gameBuddyOpen { position: absolute; top: 14px; right: 18px; width: 54px; height: 54px; border: 2px solid white; border-radius: 50%; background: #e8f6ff; color: #176b96; display: flex; align-items: center; justify-content: center; font: 800 25px/1 -apple-system,sans-serif; z-index: 100; box-shadow: 0 3px 10px #12334a40; }
#stage.theme-sky #gameBuddyOpen .sky-icon { width: 28px; height: 28px; }
#stage.theme-sky #gameBuddyOpen.has-unread { background: #bd354a; color: white; }
.device-phone #stage.theme-sky #gameBuddyOpen { width: 78px; height: 78px; right: calc(var(--safe-right) + 16px); font-size: 30px; }
.device-phone #stage.theme-sky #gameBuddyOpen .sky-icon { width: 36px; height: 36px; }
#stage.spectator-mode :is(#touch_ui,#btnPass,#powerMarkArea,#last_power_mark,#lastAngleDisplay) { display: none !important; }
#stage.spectator-mode :is(#powerBar,#walkBar) { width: 0 !important; }
