/* 0.47 · expedition information stays at the edges. Health, XP, boss warnings
   and the portal remain live; detailed controls and medals live in dialogs. */
#hud #medal-hud-slots,#hud #guide {display:none!important}
#hud .hud-top {display:flex;align-items:flex-start;justify-content:space-between;padding:10px 12px;gap:8px!important}
#hud .player-card {width:204px;padding:8px 10px;border-radius:10px;flex:0 0 auto;min-width:0}
#hud .player-row {gap:8px;margin-bottom:5px;align-items:baseline}
#hud .player-row b {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:calc(11px * var(--hud-text-scale,1))}
#hud .player-row span {white-space:nowrap;font-size:calc(11px * var(--hud-text-scale,1))}
#hud .player-card .bar {height:6px}
#hud .player-card .bar.xp {height:4px;margin-top:5px}
#hud .hp-info {gap:4px;margin-top:5px;flex-wrap:wrap}
#hud #hp-text,#hud #xp-text {font-size:calc(9px * var(--hud-text-scale,1));line-height:1.3}
#hud .clock {min-width:90px;padding:6px 10px;border-radius:9px;flex:0 0 auto;max-width:130px}
#hud #time {font-size:calc(22px * var(--hud-text-scale,1));letter-spacing:1px;line-height:1.1}
#hud #mode-label {display:block;font-size:calc(8px * var(--hud-text-scale,1));line-height:1.35;letter-spacing:.7px}
#hud .right-hud {display:flex;align-items:flex-start;justify-content:flex-end;flex-wrap:wrap!important;gap:5px!important;max-width:360px!important}
#hud .right-hud>.count {min-width:40px;min-height:34px;padding:6px 8px;border-radius:8px;font-size:12px;white-space:nowrap}
#hud .right-hud>.count em {margin-right:5px}
#hud .coin-hud {min-width:76px;gap:6px;padding:5px 8px;min-height:34px}
#hud .coin-hud .sc-coin {width:22px;height:22px;flex:0 0 22px}
#hud .coin-hud #coins {font-size:17px;line-height:1.2}
#hud .coin-hud small,#hud .coin-hud span {display:none}
#hud .right-hud>button {display:grid;place-items:center;flex:0 0 auto;width:34px;min-width:34px!important;height:34px!important;min-height:34px;padding:0 5px!important;border-radius:8px;font-size:14px;line-height:1.1;pointer-events:auto}
#hud .right-hud>#medal-hud {width:53px;min-width:53px!important;white-space:nowrap;font-size:11px;color:#f3cf8d}
#hud .right-hud>.sc37-hud-button {width:34px!important;font-size:14px!important}
#hud .right-hud .sc37-long {display:none}
#hud .right-hud .gp047-hud-button svg {width:19px;height:19px}
#hud #skillbar {bottom:10px;gap:5px;left:50%;transform:translateX(-50%);pointer-events:none}
#hud #skillbar .skillbox {width:50px;height:50px;padding:5px 3px;border-radius:8px;background:#10232de8}
#hud #skillbar .skillbox .icon {font-size:21px;line-height:1.1}
#hud #skillbar .skillbox small {font-size:8px;line-height:1.2;margin-top:4px;white-space:nowrap}
#hud .map-key {left:12px;bottom:10px;padding:0;border:0;background:none;gap:0}
#hud .map-key>span {display:none}
#hud #hud-map-guide {display:grid;place-items:center;width:30px;height:30px;min-height:30px;padding:0;border:1px solid #587183;border-radius:8px;background:#11232de8;color:#d2e4ed;font-size:13px}
#hud .biome {left:52px;bottom:12px;max-width:180px;pointer-events:none}
#hud .biome .eyebrow,#hud .biome .sub {display:none}
#hud .biome .name {font-size:11px;line-height:1.3;margin:0;color:#c0d4dc;text-shadow:0 1px 3px #000,0 0 5px #000;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#hud #world-context {left:12px;top:92px;width:208px;max-width:208px;max-height:none;padding:8px 10px;gap:7px;border-radius:8px;box-shadow:none;pointer-events:none}
#hud #world-context>div {min-width:0;flex:1}
#hud #world-context p {display:none}
#hud #world-context b {font-size:11px;line-height:1.3}
#hud #world-context small {display:block;font-size:8px;line-height:1.4;letter-spacing:.15px;margin-top:4px}
#hud #world-context .context-icon {flex:0 0 19px;width:19px;font-size:18px;line-height:1.2}
#hud #world-context .context-icon svg {width:19px;height:19px}
#hud #world-context .context-progress {height:3px;margin-top:5px}
#hud #active-effects {left:12px;right:auto;top:auto;bottom:52px;transform:none;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;flex-wrap:wrap;gap:4px;max-width:165px;width:max-content;max-height:244px;pointer-events:none}
#hud #active-effects .effect-chip {width:auto;max-width:165px;gap:5px;padding:4px 7px;border-radius:6px;background:#0a1923ef}
#hud #active-effects .effect-chip>span:last-child {display:flex;align-items:center;gap:7px;min-width:0}
#hud #active-effects .effect-chip b {font-size:8px;line-height:1.2;letter-spacing:.15px}
#hud #active-effects .effect-chip small {font-size:10px;line-height:1.2;white-space:nowrap}
#hud #active-effects .effect-icon {width:15px;font-size:16px;line-height:1;flex:0 0 15px}
#hud #active-effects .effect-icon svg {width:15px;height:15px}
#hud #compass {right:12px;left:auto;bottom:10px;top:auto;max-width:230px;padding:7px 9px;gap:7px;border-radius:8px}
#hud #portal-label {font-size:10px;letter-spacing:.1px}
#hud #portal-direction {font-size:15px}
#hud #portal-action {padding:6px 9px;min-height:32px;border-radius:6px;font-size:9px}
#hud #bossbar,#hud.in-nexo #bossbar {top:80px;width:min(360px,45vw);padding:4px 8px 5px;background:#07111ed9;border-radius:7px;box-shadow:inset 0 0 0 1px #9bb4cc30}
#hud #bossbar p {font-size:11px;line-height:1.3;margin-bottom:3px;letter-spacing:.5px;text-shadow:0 1px 2px #000}
#hud #boss-form {font-size:8px;letter-spacing:.4px;margin-bottom:4px;color:#dbe5f1;text-shadow:0 1px 2px #000}
#hud.scammer-practice046 #lab-tag {padding:0 5px;border-radius:3px;background:#07111ed9;color:#ffdda1;text-shadow:0 1px 2px #000}
#hud #meme-cast {left:12px;top:144px;transform:none;width:208px;padding:8px 10px;border-radius:8px}
#hud #meme-cast b {font-size:10px;line-height:1.3;letter-spacing:.4px;max-width:130px}
#hud #meme-cast span {font-size:8px}
#hud #meme-cast small {font-size:10px;line-height:1.4;margin-top:4px}
#hud.in-nexo #world-context {top:254px}

@media(max-width:850px) and (min-width:601px){
 #hud .player-card {width:180px;padding:7px 9px}
 #hud .clock {min-width:78px;padding:5px 8px;max-width:110px}
 #hud .right-hud {max-width:330px!important}
 #hud #world-context {width:180px;max-width:180px}
 #hud #compass {max-width:190px}
 #hud .biome {max-width:140px}
}

@media(max-width:600px){
 #hud .hud-top {position:relative;display:block;padding:8px;height:92px}
 #hud .player-card {width:calc(100vw - 234px)!important;max-width:220px;min-width:112px;padding:7px 8px;border-radius:9px}
 #hud .player-row {gap:4px;margin-bottom:5px}
 #hud .player-row b,#hud .player-row span {font-size:calc(10px * var(--hud-text-scale,1))}
 #hud .hp-info {display:flex;flex-direction:column;gap:2px;margin-top:5px}
 #hud #hp-text,#hud #xp-text {font-size:calc(8px * var(--hud-text-scale,1));line-height:1.25}
 #hud .clock {position:absolute;top:9px;right:132px;width:66px;min-width:66px!important;max-width:66px;padding:5px 3px!important;border-radius:8px}
 #hud .clock #time {font-size:calc(18px * var(--hud-text-scale,1))!important;letter-spacing:0;line-height:1.1}
 #hud #mode-label {font-size:calc(6px * var(--hud-text-scale,1));letter-spacing:.2px;line-height:1.3}
 #hud .right-hud {position:absolute;right:8px;top:8px;display:grid;grid-template-columns:1.4fr repeat(4,minmax(0,1fr));grid-template-rows:40px 34px;align-items:start;width:210px;max-width:210px!important;gap:4px!important}
 #hud .right-hud>.count:first-child {grid-column:3 / span 2;grid-row:1}
 #hud .right-hud>.count:nth-child(2) {grid-column:5;grid-row:1}
 #hud .right-hud>.count {min-width:0;min-height:32px;padding:6px 5px;font-size:10px;overflow:hidden;text-overflow:ellipsis}
 #hud .right-hud>.count em {margin-right:3px}
 #hud .coin-hud {min-width:0;padding:5px 5px;gap:4px}
 #hud .coin-hud .sc-coin {width:18px;height:18px;flex-basis:18px}
 #hud .coin-hud #coins {font-size:15px;line-height:1.3}
 #hud .right-hud>button {grid-row:2;width:100%;min-width:0!important;height:34px!important;min-height:34px;font-size:13px;padding:0 3px!important}
 #hud .right-hud>#medal-hud {width:100%;min-width:0!important;font-size:10px}
 #hud .right-hud>.sc37-hud-button {width:100%!important;min-width:0!important}
 #hud #skillbar {bottom:8px;gap:4px}
 #hud #skillbar .skillbox {width:44px;height:44px;padding:4px 2px;border-radius:7px}
 #hud #skillbar .skillbox .icon {font-size:19px}
 #hud #skillbar .skillbox small {font-size:7px;margin-top:3px}
 #hud .map-key {left:9px;bottom:8px}
 #hud #hud-map-guide {width:28px;height:28px;min-height:28px;font-size:12px}
 #hud .biome {left:12px;bottom:56px;max-width:145px}
 #hud .biome .name {font-size:10px}
 #hud #world-context {left:8px;top:100px;width:156px;max-width:156px;padding:7px 8px;gap:5px}
 #hud #world-context b {font-size:10px}
 #hud #world-context small {font-size:7px;line-height:1.4;letter-spacing:0}
 #hud #world-context .context-icon {flex-basis:15px;width:15px;font-size:16px}
 #hud #world-context .context-icon svg {width:15px;height:15px}
 #hud #compass {top:100px;bottom:auto;right:8px;max-width:162px;padding:7px 8px;gap:5px}
 #hud #portal-label {font-size:9px;line-height:1.4}
 #hud #portal-action {min-height:34px;width:100%;font-size:9px}
 #hud #active-effects {left:8px;bottom:180px;max-width:145px;max-height:264px;gap:3px}
 #hud #active-effects .effect-chip {max-width:145px;padding:4px 5px;gap:4px}
 #hud #active-effects .effect-chip>span:last-child {gap:5px}
 #hud #active-effects .effect-chip b {font-size:7px}
 #hud #active-effects .effect-chip small {font-size:9px}
 #hud .touch {bottom:66px}
 #hud #touchpad {left:14px;width:96px;height:96px}
 #hud #touchpad .knob {left:28px;top:28px}
 #hud .touch-actions {right:12px;gap:7px}
 #hud .touch-actions button {width:58px;height:58px;font-size:10px}
 #hud #bossbar,#hud.in-nexo #bossbar {top:96px;width:calc(100vw - 24px);max-width:350px;padding:3px 7px 4px}
 #hud #bossbar p {font-size:10px;line-height:13px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #hud #boss-form {font-size:7px;line-height:10px;margin-bottom:3px;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #hud #bossbar .bar {height:6px}
 #hud:has(#bossbar:not(.hide)) #world-context,#hud:has(#bossbar:not(.hide)) #compass {top:150px}
 #hud #meme-cast {left:8px;top:150px;width:162px;padding:7px 8px}
 #hud #meme-cast>div:first-child {flex-wrap:wrap;gap:4px}
 #hud #meme-cast b {font-size:9px;max-width:none}
 #hud #meme-cast small {font-size:9px}
 #hud.in-nexo #world-context,#hud.in-nexo:has(#bossbar:not(.hide)) #world-context {top:262px}
 #hud.scammer-practice046 #lab-buttons {top:100px;left:auto;right:8px;max-width:194px;justify-content:flex-end;gap:4px}
 #hud.scammer-practice046 #lab-tag {top:89px;left:8px;max-width:160px;font-size:7px;line-height:1.5}
 #hud.scammer-practice046 #toast {top:auto;bottom:61px;max-width:calc(100vw - 26px);font-size:9px}
 #hud.scammer-practice046:has(#bossbar:not(.hide)) #bossbar {top:96px}
 #hud.scammer-practice046:has(#bossbar:not(.hide)) #lab-tag {top:145px;left:8px;right:8px;max-width:calc(100vw - 16px);height:12px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #hud.scammer-practice046:has(#bossbar:not(.hide)) #lab-buttons {top:164px;left:auto;right:8px;max-width:calc(100vw - 16px);justify-content:flex-end}
 body.gp047-active #hud #active-effects {bottom:70px}
}

@media(max-width:359px){
 #hud .right-hud {width:182px;max-width:182px!important;grid-template-rows:40px 32px}
 #hud .right-hud>button {height:32px!important;min-height:32px}
 #hud .right-hud>#medal-hud {font-size:9px}
 #hud .clock {right:116px;width:56px;min-width:56px!important;max-width:56px}
 #hud .clock #time {font-size:16px!important}
 #hud #skillbar .skillbox {width:41px}
 #hud #world-context {width:142px;max-width:142px}
 #hud #compass {max-width:146px}
}

@media(max-height:540px) and (min-width:601px){
 #hud .hud-top {padding:7px 10px}
 #hud .player-card {width:176px;padding:6px 8px}
 #hud .clock {min-width:76px;padding:5px 8px}
 #hud #time {font-size:20px}
 #hud #skillbar {bottom:7px;gap:4px}
 #hud #skillbar .skillbox {width:44px;height:44px;padding:4px 2px}
 #hud #skillbar .skillbox .icon {font-size:19px}
 #hud #skillbar .skillbox small {font-size:7px;margin-top:3px}
 #hud #world-context {top:81px;left:10px;width:176px;max-width:176px;padding:6px 8px}
 #hud #world-context b {font-size:10px}
 #hud #world-context small {font-size:7px}
 #hud #active-effects {left:10px;bottom:48px;max-width:160px;max-height:160px;gap:3px}
 #hud #active-effects .effect-chip {padding:3px 5px}
 #hud .map-key {bottom:7px;left:10px}
 #hud .biome {bottom:11px;left:49px;max-width:130px}
 #hud #compass {top:auto;bottom:8px;right:10px;max-width:195px;padding:6px 8px}
 #hud #portal-action {width:auto;min-height:30px;padding:5px 7px}
 #hud #bossbar,#hud.in-nexo #bossbar {top:65px;max-width:320px}
 #hud #meme-cast {left:10px;top:116px;width:180px;padding:6px 8px}
 #hud #meme-cast b,#hud #meme-cast small {font-size:9px}
 #hud.in-nexo #world-context {top:211px}
}

@media(pointer:coarse) and (min-width:601px){
 #hud #active-effects {bottom:160px;max-width:155px}
 #hud #touchpad {left:18px;bottom:62px}
 #hud .touch-actions {right:14px;bottom:62px}
 body.gp047-active #hud #active-effects {bottom:48px}
}

/* Core Paused has five actions, or six in the Lab. Keep every action inside
   the dialog instead of letting the flex row overflow beyond the viewport. */
#modal-root:has(#resume) {padding:16px}
#modal-root .modal:has(#resume) {min-width:0;max-width:100%;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scroll-padding:12px}
#modal-root .modal:has(#resume) .modal-actions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:stretch}
#modal-root .modal:has(#resume) .modal-actions>button {min-width:0;min-height:44px;padding:10px 12px;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
@media(max-width:600px){
 #modal-root .modal:has(#resume) .modal-actions {grid-template-columns:repeat(2,minmax(0,1fr))}
 #modal-root .modal:has(#resume) .modal-actions>button {font-size:13px;padding:10px 8px}
}
@media(max-height:540px){
 #modal-root:has(#resume) {padding:12px}
 #modal-root .modal:has(#resume) {max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:18px 20px}
 #modal-root .modal:has(#resume) .modal-actions {margin-top:14px}
}
