.community-dialog{width:min(680px,94vw);max-height:90dvh;overflow:auto;background:#13221d;color:#f4ecd8;padding:24px;border:1px solid #ae9766;border-radius:8px}.community-dialog::backdrop{background:#050b09d9}.community-dialog p{font-size:16px;line-height:1.5}.community-dialog form{display:flex;gap:10px;flex-wrap:wrap}.community-dialog input,.community-dialog select{min-height:48px;font-size:16px;max-width:100%;padding:10px;background:#0d1814;color:#fff;border:1px solid #859981}.community-dialog input{flex:1;min-width:150px}.community-dialog button,.donation-link{min-height:48px;padding:12px;font-size:16px}.donation-link{display:inline-block;text-decoration:none}.board-table{overflow:auto}.board-table table{width:100%;border-collapse:collapse;margin:18px 0}.board-table th,.board-table td{padding:10px 6px;text-align:left;border-bottom:1px solid #72877044;font-size:14px}.board-table td:last-child{white-space:nowrap}.community-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.community-actions button{min-height:48px}.miner-portrait.six-miners{background-size:300% 200%!important}
.rescue-action[hidden]{display:none!important}.rescue-action{border:1px solid #e4c488;color:#fff3ce;min-height:44px}.journey-bar:has(.rescue-action:not([hidden])) .journey-status{display:none}.journey-bar .rescue-action{flex:1;font-size:14px}

.donation-spotlight{position:relative;display:flex;justify-content:center;padding:18px 12px 20px;text-align:center}
body[data-view]:not([data-view="camp"]) .donation-spotlight{display:none}
#support-game{display:flex;flex-direction:column;align-items:center;gap:5px;width:min(390px,100%);min-height:66px;padding:12px 20px;border:2px solid #ffe59a;border-radius:12px;background:linear-gradient(120deg,#ffc65b,#ffe8a2,#eeb03d);color:#29200b;box-shadow:0 0 20px #ffbd4266;animation:donation-pulse 2.4s ease-in-out infinite;cursor:pointer}
#support-game strong{font-size:21px;line-height:1.25}#support-game small{font-size:12px;color:#3a2a0c}#support-game:focus-visible{outline:3px solid white;outline-offset:5px}
@keyframes donation-pulse{0%,100%{transform:scale(1);box-shadow:0 0 14px #ffbd4255}50%{transform:scale(1.025);box-shadow:0 0 28px #ffd66eb0,0 0 48px #ffb92e40}}
@media(prefers-reduced-motion:reduce){#support-game{animation:none;box-shadow:0 0 24px #ffd66e88}}
#toast{background:#17231fee;color:#fff}

/* Dark lettering follows light fills, including nested labels and pressed controls. */
button.primary,button.primary *,a.donation-link,a.donation-link *,.tool-switch button.active,.tool-switch button.active *,.journey-controls button:active,.journey-controls button:active *,#support-game,#support-game *{color:#111!important;text-shadow:none}
a.donation-link{background:var(--mint);border-radius:4px;font-weight:700}
/* Full-window play with compact edge overlays. */
body:is([data-view=mine],[data-view=journey],[data-view=workshop]):not(.tutorial-demo){overflow:hidden}
body:is([data-view=mine],[data-view=journey],[data-view=workshop]):not(.tutorial-demo) #game{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;padding:0;display:block}
body:is([data-view=mine],[data-view=journey],[data-view=workshop]):not(.tutorial-demo) .topbar{position:absolute;top:max(6px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));height:44px;z-index:12;border:0;background:transparent}
body:is([data-view=mine],[data-view=journey],[data-view=workshop]):not(.tutorial-demo) .topbar .brand,body:is([data-view=mine],[data-view=journey],[data-view=workshop]) .stats,body:is([data-view=mine],[data-view=journey],[data-view=workshop]) .navigation{display:none}
body:is([data-view=mine],[data-view=journey],[data-view=workshop]):not(.tutorial-demo) .view:not(.hidden){position:absolute;inset:0;width:100%;height:100%;padding:0;display:block}
body:not(.tutorial-demo) #fps-viewport,body:not(.tutorial-demo) #journey-stage{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;margin:0}
body:not(.tutorial-demo) #mine-view>.fps-bottom{position:absolute;left:8px;right:8px;bottom:calc(66px + env(safe-area-inset-bottom));z-index:7;padding:0}
body:not(.tutorial-demo) #mine-view>.mine-footer{position:absolute;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));z-index:7;background:#102019b8;border-radius:6px}
body:not(.tutorial-demo) #mine-view>.room-controls{position:absolute;bottom:8px;z-index:8;left:8px;right:8px}
body:not(.tutorial-demo) #fps-viewport .face-grid{top:17%;height:48%}
body:not(.tutorial-demo) #fps-viewport .excavation{bottom:130px}
body:not(.tutorial-demo) #fps-viewport .fps-top{right:80px}
body:not(.tutorial-demo) #journey-view>.journey-controls{position:absolute;bottom:calc(60px + env(safe-area-inset-bottom));left:8px;right:8px;z-index:8;background:transparent}
body:not(.tutorial-demo) #journey-view>.mobile-travel-buttons{position:absolute;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));z-index:8;display:flex;gap:8px}
body:not(.tutorial-demo) #journey-view>.journey-bar{position:absolute;left:8px;right:8px;top:115px;z-index:7;max-width:420px}
body:not(.tutorial-demo) #journey-view .journey-action{display:none}
body:not(.tutorial-demo) #journey-view[data-mode=ladder]>.journey-controls{display:none}
body:not(.tutorial-demo) #journey-view[data-mode=ladder] .journey-cruise{min-height:54px;min-width:190px;background:#c5e5c9;color:#111!important;font-weight:700}
body:not(.tutorial-demo) #workshop-view .workshop-layout{position:absolute;inset:0;display:block;height:100%;border:0}
body:not(.tutorial-demo) #workshop-view .gem-stage{position:absolute;inset:0;height:100%}
body:not(.tutorial-demo) #workshop-view .cut-panel{position:absolute;bottom:0;left:0;right:0;z-index:7;background:#102019d9;padding:8px 8px max(8px,env(safe-area-inset-bottom));border:0}
body:not(.tutorial-demo) #workshop-view .mobile-workshop-bar{position:absolute;top:max(8px,env(safe-area-inset-top));left:8px;right:90px;z-index:8}
body:not(.tutorial-demo) #workshop-view .gem-caption{bottom:180px}
body:not(.tutorial-demo) #workshop-view .rotation-hint{top:65px}
.new-day-banner{position:fixed;top:12%;left:50%;transform:translateX(-50%);z-index:100;width:min(600px,92vw);padding:22px;text-align:center;background:#15271f;border:2px solid #dfc081;box-shadow:0 10px 60px #0009;color:#fff;font-size:clamp(20px,4vw,30px);font-weight:700;pointer-events:none}
#rest{background:#c5e5c9!important;color:#111!important;font-weight:700;font-size:18px!important;padding:18px!important;border:2px solid #e7f3d9!important}#rest *{color:#111!important}
#fullscreen{display:inline-block!important}
@media(min-width:901px){body:not(.tutorial-demo) #mine-view>.fps-bottom,body:not(.tutorial-demo) #mine-view>.mine-footer{left:calc(50% - 300px);right:auto;width:600px}}
@media(max-height:500px){body:not(.tutorial-demo) #journey-view>.journey-bar{top:65px;max-width:55%}.journey-status{font-size:11px!important;padding:5px!important}body:not(.tutorial-demo) #workshop-view .gem-caption{display:none}}

#play-options .navigation{display:flex!important;flex-wrap:wrap;gap:8px}#play-options .navigation button{min-height:44px;color:#fff}

.supply-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:12px}.supply-picture{width:72px;height:72px;border-radius:8px;background:#253029;border:1px solid #a6977255;object-fit:contain}.refill-picture{width:110px;height:110px;float:right;margin:0 0 16px 12px}.supply-row button{min-height:44px}.supply-row h3{overflow-wrap:anywhere}@media(max-width:480px){.supply-row{grid-template-columns:56px minmax(0,1fr);gap:10px}.supply-picture{width:56px;height:56px;grid-row:1/3}.supply-row button{grid-column:2;justify-self:start}.supply-row p{margin:5px 0}}

#camp-leaderboard{grid-column:1/-1;grid-row:5;background:#102019ed;border:1px solid #b7a77a66;border-radius:8px;padding:18px;margin:16px 0}.leaderboard-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.leaderboard-heading h2{margin:0;flex:1;font-size:28px}.leaderboard-heading select{background:#21382b;color:#fff;padding:10px;min-height:44px}.leaderboard-heading button{padding:9px!important;min-height:44px!important}.leaderboard-scroll{max-height:260px;overflow:auto;overscroll-behavior:contain;scrollbar-color:#9aaa89 #16271f}.leaderboard-scroll table{width:100%;border-collapse:collapse}.leaderboard-scroll th{position:sticky;top:0;background:#23382c;color:#fff;z-index:1}.leaderboard-scroll td,.leaderboard-scroll th{padding:12px 8px;text-align:left;border-bottom:1px solid #8a9b7840;font-size:14px}.leaderboard-scroll td:nth-child(2){overflow-wrap:anywhere}.leaderboard-scroll td:last-child{white-space:nowrap}#camp-leaderboard small{display:block;margin-top:12px;color:#d2d9d0}@media(max-width:600px){.leaderboard-scroll td,.leaderboard-scroll th{font-size:12px;padding:10px 5px}#camp-leaderboard{padding:12px}.leaderboard-heading h2{flex-basis:100%}}

/* Keep rankings above the main camp content at every screen width. */
#game>#camp-leaderboard{flex:none;width:100%;margin:0 0 12px;padding:12px 16px;border-color:#d7bd7f;background:#102019f5}
body[data-view]:not([data-view=camp]) #game>#camp-leaderboard,body.tutorial-demo #camp-leaderboard{display:none}
#camp-leaderboard .leaderboard-heading h2{font-size:24px}#camp-leaderboard .board-status{margin:5px 0;font-size:13px}#camp-leaderboard .leaderboard-scroll{max-height:150px}#camp-leaderboard small{font-size:11px;margin-top:6px}
.leaderboard-ticker{overflow:hidden;background:#263b2c;border-radius:4px;margin:8px 0;color:#fff;padding:8px 0}.leaderboard-ticker-track{display:flex;width:max-content;animation:rankings-scroll 30s linear infinite}.leaderboard-ticker-track span{flex:none;white-space:pre;padding-right:64px;font-size:15px;font-weight:600}
@keyframes rankings-scroll{to{transform:translateX(-50%)}}
.scroll-paused .leaderboard-ticker-track,#camp-leaderboard:hover .leaderboard-ticker-track,#camp-leaderboard:focus-within .leaderboard-ticker-track{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.leaderboard-ticker-track{animation:none}}

/* Compact leaderboard: one control row and one scrolling line. */
#game>#camp-leaderboard{padding:4px 8px;margin-bottom:8px}
#camp-leaderboard .leaderboard-heading{gap:8px;flex-wrap:nowrap;height:44px}
#camp-leaderboard .leaderboard-heading h2{font-size:15px;flex:1 1 auto;white-space:nowrap}
#camp-leaderboard .leaderboard-heading label{font-size:0;flex:none}
#camp-leaderboard .leaderboard-heading select{font-size:12px;padding:4px;max-width:110px;min-height:44px}
#camp-leaderboard .leaderboard-heading button{font-size:12px;padding:4px 8px!important;min-height:44px!important;white-space:nowrap}
#camp-leaderboard .leaderboard-ticker{padding:3px 0;margin:0 0 3px}
#camp-leaderboard .leaderboard-ticker-track span{font-size:13px}
#camp-leaderboard small,#camp-leaderboard[data-populated=true] .board-status{display:none}
#camp-leaderboard .leaderboard-scroll{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#camp-leaderboard .board-status{font-size:12px;margin:2px 0}

#game>#camp-leaderboard{width:25%;min-width:min(280px,100%);max-width:100%;align-self:center}
#camp-leaderboard .leaderboard-heading{gap:5px}
#camp-leaderboard .leaderboard-heading h2{font-size:13px}
#camp-leaderboard .leaderboard-heading select{max-width:85px;font-size:11px}
#camp-leaderboard .leaderboard-heading button{font-size:11px;padding:4px 6px!important}
/* Narrow score ticker; keep the original controls available to assistive technology. */
#game>#camp-leaderboard{width:6.25%;min-width:min(90px,100%);padding:4px;align-self:center}
#camp-leaderboard .leaderboard-heading{height:28px;justify-content:center}
#camp-leaderboard .leaderboard-heading h2{font-size:12px;text-align:center;flex:none}
#camp-leaderboard .leaderboard-heading label,#camp-leaderboard .leaderboard-heading button{position:absolute;width:1px;height:1px;min-height:0!important;padding:0!important;overflow:hidden;clip-path:inset(50%)}
#camp-leaderboard .leaderboard-heading label:focus-within,#camp-leaderboard .leaderboard-heading button:focus-visible{position:fixed;top:12px;left:12px;width:auto;height:auto;min-height:44px!important;clip-path:none;z-index:20;background:#17271f}
#camp-leaderboard .leaderboard-ticker{margin:0;padding:5px 0}
#camp-leaderboard .board-status{font-size:10px;overflow-wrap:anywhere}

/* Finished work remains actionable without opening the mobile options drawer. */
#finished-actions:not(.hidden){display:flex;gap:8px}
#finished-actions button{flex:1;min-width:0;min-height:44px;margin:0;font-size:14px}
.rescue-notice button{min-height:48px;margin:6px 0;width:100%}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body:not(.tutorial-demo) #journey-view[data-mode=drive]>.journey-controls{display:grid;grid-template-columns:56px 56px minmax(0,1fr) 72px 100px;gap:8px;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));padding:0}
 body:not(.tutorial-demo) #journey-view>.journey-controls button{min-height:48px;width:100%;font-size:12px;padding:6px;grid-row:1}
 #journey-view>.journey-controls [data-control=KeyA]{grid-column:1}
 #journey-view>.journey-controls [data-control=KeyD]{grid-column:2}
 #journey-view>.journey-controls [data-control=KeyS]{grid-column:4}
 #journey-view>.journey-controls [data-control=KeyW]{grid-column:5}
 body:not(.tutorial-demo) #journey-view[data-mode=drive]>.mobile-travel-buttons{left:auto;right:max(8px,env(safe-area-inset-right));bottom:calc(64px + env(safe-area-inset-bottom));width:180px;gap:4px}
 body:not(.tutorial-demo) #journey-view>.mobile-travel-buttons button{font-size:11px!important;min-height:44px;padding:4px}
}

#fps-viewport #dig-return-camp{position:absolute;top:55px;left:max(8px,env(safe-area-inset-left));z-index:12;min-height:44px;padding:8px 12px;font-size:13px;font-weight:700;color:#fff;background:#17271fed;border:1px solid #b9cbb8;border-radius:5px;pointer-events:auto}
/* Matching front-page donation and Top 20 panels. */
#support-game{height:80px;min-height:80px;justify-content:center}
#game>#camp-leaderboard{width:min(390px,calc(100% - 24px));min-width:0;height:80px;min-height:80px;padding:8px 12px;border-width:2px;border-radius:12px;align-self:center;display:flex;flex-direction:column;justify-content:center;gap:3px}
#camp-leaderboard .leaderboard-heading{height:26px;min-height:26px}
#camp-leaderboard .leaderboard-heading h2{font-size:20px;line-height:26px}
#camp-leaderboard .leaderboard-ticker{padding:0;margin:0;min-height:24px;line-height:24px}
#camp-leaderboard .leaderboard-ticker-track span{font-size:14px}
#camp-leaderboard .board-status{font-size:11px;line-height:15px;margin:0}
#game>#camp-leaderboard{height:105px;min-height:105px}
#camp-leaderboard .leaderboard-heading h2{font-size:18px}
#camp-leaderboard .leaderboard-champion{margin:0;color:#f5deb0;font-size:14px;font-weight:700;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#journey-view .journey-controls button.throttle-control,#journey-view .journey-controls button.throttle-control *{color:#000!important;text-shadow:none}

/* Driving notices share one flowing row below the speed display and Menu. */
body:not(.tutorial-demo) #journey-view>.journey-bar{top:calc(68px + env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));max-width:none;display:flex;flex-direction:row;align-items:flex-start;flex-wrap:wrap;gap:6px;pointer-events:none}
#journey-view>.journey-bar>*{pointer-events:auto;min-width:0}
body[data-view=journey] #journey-view .wildlife-look{position:static;inset:auto;max-width:100%;display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-start;flex:0 1 auto}
body[data-view=journey] #journey-view .wildlife-look[hidden]{display:none}
body[data-view=journey] #journey-view .junction-choice{position:static;transform:none;width:auto;max-width:100%;margin:0;min-height:44px;flex:0 1 auto;font-size:12px;padding:6px 10px}
#journey-view>.journey-bar .rescue-action{flex:0 1 auto;min-height:44px;margin:0;padding:6px 10px}
#journey-view>.journey-bar .journey-status{flex:1 1 180px;max-width:320px;margin:0}
body:not(.tutorial-demo) #journey-view[data-mode=ladder]>.mobile-travel-buttons{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:8px}
body:not(.tutorial-demo) #journey-view[data-mode=ladder] .journey-cruise{min-width:0;width:100%;font-size:14px}
body:not(.tutorial-demo) #journey-view>.mobile-travel-buttons button{white-space:normal;min-width:0}
body:not(.tutorial-demo) #workshop-view .mobile-workshop-bar{right:86px;display:grid;grid-template-columns:1fr 1fr;gap:6px}
#workshop-view .mobile-workshop-bar button{min-width:0;min-height:44px;white-space:normal;font-size:12px;padding:5px}
#mine-view .mine-tools button{min-width:0;white-space:normal}
#modal #encounter-yes,#modal #encounter-yes *{color:#fff!important;background:#28543d;text-shadow:none}
#modal #encounter-leave{color:#fff!important;background:#24362e;min-height:44px;padding:10px}
#modal .modal-actions{display:flex;flex-wrap:wrap;gap:8px}
#modal .modal-actions button{min-width:0;white-space:normal}
@media(max-height:600px) and (orientation:landscape){
 #journey-view>.journey-bar .journey-status{display:none}
 body:not(.tutorial-demo) #journey-view[data-mode=drive]>.journey-controls{display:grid;grid-template-columns:52px 52px minmax(0,1fr) 68px 96px;gap:6px;bottom:max(8px,env(safe-area-inset-bottom))}
 #journey-view>.journey-controls [data-control=KeyA]{grid-column:1}
 #journey-view>.journey-controls [data-control=KeyD]{grid-column:2}
 #journey-view>.journey-controls [data-control=KeyS]{grid-column:4}
 #journey-view>.journey-controls [data-control=KeyW]{grid-column:5}
 #journey-view>.journey-controls button{grid-row:1;min-height:48px;padding:6px;font-size:12px}
 body:not(.tutorial-demo) #journey-view[data-mode=drive]>.mobile-travel-buttons{left:auto;right:max(8px,env(safe-area-inset-right));bottom:calc(64px + env(safe-area-inset-bottom));width:180px}
}

.competition-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:12px}.competition-choices button{display:block;width:100%;margin:8px 0;white-space:normal}.competition-table{overflow:auto}.competition-table table{width:100%;border-collapse:collapse}.competition-table th,.competition-table td{text-align:left;padding:10px;border-bottom:1px solid #6a827a;font-size:14px}.competition-table td:first-child{overflow-wrap:anywhere}.competition-error{color:#ffdcaa}#head-to-head-panel button{min-height:44px}#head-to-head-panel p{font-size:16px}

body:not(.tutorial-demo) #workshop-view .mobile-workshop-bar{grid-template-columns:repeat(3,minmax(0,1fr))}#collection-open-showroom{min-height:44px;margin:8px 0;padding:10px 16px}

/* A dedicated champion row stays in normal flow above chat. */
#game>#camp-leaderboard{height:auto;min-height:116px}
#camp-leaderboard .leaderboard-champion{order:-1;flex:none;padding:7px 10px;border:1px solid #e4bd55;border-radius:7px;background:linear-gradient(110deg,#5a4218,#2a2e1d);color:#fff0b9;font-size:19px;line-height:25px;font-weight:800;white-space:normal;overflow-wrap:anywhere;text-shadow:0 1px 2px #000}

#journey-view .junction-choice[hidden]{display:none!important}#journey-view .junction-choice{min-width:0;white-space:normal;min-height:44px}

.finished-stone-choices{display:flex;flex-wrap:wrap;gap:12px}
.finished-stone-choices button{flex:1 1 180px;min-height:48px;white-space:normal;margin:0}
#finished-actions{flex-wrap:wrap}
#finished-actions button{flex-basis:120px;white-space:normal}

body[data-view="camp"] .mobile-settings,.mobile-settings[hidden]{display:none!important}

/* Leave more room above the desktop mine return control. */
@media(min-width:901px){#fps-viewport #dig-return-camp{top:calc(55px + 1cm)}}

/* Compact gas pedal stays inside phone safe areas in either orientation. */
@media(max-width:720px),(pointer:coarse) and (max-width:1000px){
 body:not(.tutorial-demo) #journey-view[data-mode=drive]>.journey-controls{display:grid;grid-template-columns:52px 52px minmax(0,1fr) 84px 64px;gap:6px;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}
 #journey-view[data-mode=drive]>.journey-controls [data-control=KeyA]{grid-column:1;grid-row:1}
 #journey-view[data-mode=drive]>.journey-controls [data-control=KeyD]{grid-column:2;grid-row:1}
 #journey-view[data-mode=drive]>.journey-controls [data-control=KeyS]{grid-column:4;grid-row:1}
 #journey-view[data-mode=drive]>.journey-controls .throttle-control{grid-column:5;grid-row:1;flex:0 0 64px;width:64px;min-width:0!important;min-height:48px;padding:6px;font-size:14px}
}

/* Make recovery an unmistakable button and give the brake label room. */
#journey-view button.journey-reset{background:#253b32;border:1px solid #a5b8a3;border-radius:5px;min-height:44px;padding:8px 12px;text-align:center;color:#fff;line-height:1.25}
@media(max-width:720px),(pointer:coarse) and (max-width:1000px){
 #journey-view[data-mode=drive]>.journey-controls .brake-control{width:84px;min-width:84px!important;min-height:48px;padding:6px;line-height:1.25;letter-spacing:.3px;font-size:12px;margin-left:0}
}
