/* Keep desktop instructions below gameplay, clear of the shortcut column. */
#gameFrame .pcControlsHint{top:auto!important;right:auto!important;left:50%;bottom:6px;transform:translateX(-50%);max-width:76%;width:max-content;text-align:center;font-size:clamp(7px,.7cqw,10px);z-index:28}
/* Display-only fourth circular shortcut; keep berryHud/berryCount IDs for profile updates. */
#gameFrame #berryHud{left:auto;right:1.4cqw;top:calc(1.8cqw + 3 * (var(--poke-shortcut-size) + var(--poke-shortcut-gap)));width:var(--poke-shortcut-size);height:var(--poke-shortcut-size);min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;gap:0;margin:0;padding:3px;border:3px solid #263d58;border-image:none;border-radius:999px;background:linear-gradient(145deg,#fffdea,#d6e8d5);box-shadow:inset 0 0 0 2px #f9ffff,2px 3px 0 #132f48;z-index:143;pointer-events:none}
#gameFrame #berryHud .shortcutIcon{width:80%;height:80%;max-width:34px;max-height:34px;object-fit:contain;image-rendering:pixelated}
#gameFrame #berryCount{position:absolute;top:-5px;right:-5px;min-width:19px;height:19px;display:flex;align-items:center;justify-content:center;padding:1px 4px;border:2px solid #fffbea;border-radius:12px;background:#b54559;color:#fff;box-shadow:1px 1px 0 #263d58;font:800 11px/1 system-ui,sans-serif;text-align:center;letter-spacing:0}

/* Both player views share the existing FireRed-framed shortcut panel. */
#gameFrame .playerListPanel{grid-template-rows:25px 28px minmax(0,1fr)}
.playerListTabs{display:flex;gap:4px;padding:2px 4px;border-bottom:1px solid #9a967f;background:#eeeccf}
.playerListTabs button,.scoreboardRefresh{padding:3px 6px;border:1px solid #526a62;background:#ffffde;color:#355caa;font:900 9px/1 "Courier New",monospace;touch-action:manipulation}
.playerListTabs button{flex:1}.playerListTabs button[aria-selected="true"]{background:#355caa;color:#fff}
.playerListTabs button:focus-visible,.scoreboardRefresh:focus-visible{outline:2px solid #c98031;outline-offset:1px}
#playerListRows[hidden],#playerScoreboard[hidden]{display:none!important}
.scoreboardHint{margin:2px 0 7px;color:#65716c;font:700 8px/1.4 "Courier New",monospace}
.scoreboardSelf{padding:5px;margin-bottom:6px;border:1px solid #9a967f;background:#f4f6d4;color:#355caa;font:900 9px/1.4 "Courier New",monospace;overflow-wrap:anywhere}
.scoreboardTable{width:100%;border-collapse:collapse;font:800 9px/1.4 "Courier New",monospace;table-layout:fixed}
.scoreboardTable th,.scoreboardTable td{padding:5px 3px;border-bottom:1px dashed #aaa58d;text-align:right}
.scoreboardTable th:first-child,.scoreboardTable td:first-child{width:26px;text-align:center}
.scoreboardTable th:nth-child(2),.scoreboardTable td:nth-child(2){width:auto;text-align:left;overflow-wrap:anywhere;color:#355caa}
.scoreboardTable th:nth-child(n+3),.scoreboardTable td:nth-child(n+3){width:38px}
.scoreboardTable tr.scoreboardYou{background:#f4f6d4}.scoreboardRefresh{display:block;margin:8px auto 3px}


/* Five shortcuts, plus an independent help button. */
#gameFrame .updatesDock{top:calc(1.8cqw + var(--poke-shortcut-size) + var(--poke-shortcut-gap))!important}
#gameFrame .playerListDock{top:calc(1.8cqw + 2 * (var(--poke-shortcut-size) + var(--poke-shortcut-gap)))!important}
#gameFrame .globalChat{top:calc(1.8cqw + 3 * (var(--poke-shortcut-size) + var(--poke-shortcut-gap)))!important}
#gameFrame #berryHud{top:calc(1.8cqw + 4 * (var(--poke-shortcut-size) + var(--poke-shortcut-gap)))}
#gameFrame .fieldRoundButton{position:absolute;top:1.8cqw;right:1.4cqw;width:var(--poke-shortcut-size);height:var(--poke-shortcut-size);padding:3px;border:3px solid #263d58;border-radius:999px;background:linear-gradient(145deg,#fffdea,#d6e8d5);box-shadow:inset 0 0 0 2px #f9ffff,2px 3px 0 #132f48;color:#355caa;font:900 clamp(20px,4cqw,34px)/1 "Courier New",monospace;z-index:144;touch-action:manipulation;cursor:pointer}
#gameFrame .fieldRoundButton[hidden],#helpTour[hidden],#playerTracker[hidden]{display:none!important}
#gameFrame #helpToggle{right:auto;left:1.4cqw}
#gameFrame.hud-collapsed .updatesDock,#gameFrame.hud-collapsed .playerListDock,#gameFrame.hud-collapsed .globalChat,#gameFrame.hud-collapsed #berryHud{display:none!important}
.hudHamburger{display:block;width:58%;height:45%;margin:auto;background:linear-gradient(to bottom,#355caa 0 18%,transparent 18% 41%,#355caa 41% 59%,transparent 59% 82%,#355caa 82% 100%)}
.playerListTabs{gap:2px}.playerListTabs button{font-size:8px;padding:3px 2px;white-space:nowrap}
#trackerStatus{font:800 9px/1.5 "Courier New",monospace;color:#355caa;overflow-wrap:anywhere;margin:5px 0}
#trackerDestinations{display:grid;gap:5px;padding-bottom:4px}
.trackerDestination{display:block;width:100%;padding:7px 5px;border:1px solid #7b8f79;background:#ffffde;color:#263d58;text-align:left;font:800 10px/1.3 "Courier New",monospace;cursor:pointer;touch-action:manipulation}
.trackerDestination[aria-pressed="true"]{background:#355caa;color:white;border-color:#263d58}.trackerDestination:focus-visible{outline:2px solid #c98031}.scoreboardRefresh:disabled{opacity:.5}
#helpTour{position:absolute;inset:0;z-index:9990;background:#10203355;cursor:pointer;touch-action:manipulation}
#helpSpotlight{position:absolute;border:3px solid #fff1a1;border-radius:9px;box-shadow:0 0 0 2px #263d58;pointer-events:none}
#helpArrow{position:absolute;color:#ffdf59;text-shadow:2px 2px #263d58,-1px -1px #263d58;font:900 clamp(16px,3.5cqw,28px)/1 monospace;pointer-events:none}
#helpCard{position:absolute;left:12%;right:12%;bottom:4%;padding:clamp(9px,2cqw,18px);border:4px solid #263d58;outline:2px solid #fcf4c5;border-radius:8px;background:#ffffde;box-shadow:inset 0 0 0 2px #9fae98,3px 4px #17283c;color:#263d58;font:700 clamp(10px,1.8cqw,15px)/1.45 "Courier New",monospace}
#helpCard.helpCardTop{bottom:auto;top:4%}#helpTitle{display:block;padding-right:24px;color:#355caa;font-size:1.1em}#helpText{margin:8px 0}#helpProgress{font-size:.85em;color:#586854}
#helpExit{position:absolute;right:5px;top:5px;width:27px;height:27px;padding:0;border:2px solid #263d58;background:#fae5bb;color:#7c2634;font:900 22px/1 monospace;cursor:pointer;touch-action:manipulation}
/* Anchor open panels near the first shortcut so they fit inside a phone frame. */
#gameFrame .playerListPanel{top:calc(-1 * (var(--poke-shortcut-size) + var(--poke-shortcut-gap)))}
#gameFrame .chatPanel{top:calc(-2 * (var(--poke-shortcut-size) + var(--poke-shortcut-gap)))}
#gameFrame:is(.dialog-open,.special-event-open,.training-open,.team-open,.field-menu-open,.bag-open,.pc-open,.frlg-pc-open,.summary-open,.frlg-summary-open,.battle-active,.battle-prompt-open,.recruit-open,.piccolo-recruit-open,.chansey-egg-open,.overworld-combat,.shop-open,.slot-open,.evolution-open,.gym-open,.trade-open,.sound-settings-open) .fieldRoundButton,
#gameFrame:has(:is(#dialog,#specialPrompt,#trainingLayer,#teamLayer,#fieldMenu,#battleLayer,#onlinePrompt,#battlePrompt):not([hidden])) .fieldRoundButton{display:none!important}
#helpCard{border:8px solid transparent;border-image:url('./native/fr_textbox_type1.png') 8 fill / 8px / 0 stretch;outline:none;border-radius:0}

/* The tour also demonstrates touch controls on keyboard-only desktops. */
#gameFrame.help-show-controls #mobileControls{display:block!important}

/* Vaporeon's staged challenge keeps movement/menu shortcuts behind the scene. */
#gameFrame.vaporeon-scene-open :is(.fieldRoundButton,.updatesDock,.playerListDock,.globalChat,#berryHud,#mobileControls){display:none!important}
/* Legacy tags belong to their slot; never flow into the PC DATA heading. */
.frlgPcDynamic.competitiveLegacyIcon{position:absolute!important}

.frlgPcMonIcon.frlgPcMiniFront{width:10cqw!important;height:10cqw!important}
.frlgPcPartyIcon.frlgPcMiniFront{width:13.333333cqw!important;height:13.333333cqw!important}
