/* Reference palette: warm outlines, paper cream, sage and coastal blue. */
body{background:#325a63}.game-shell{background:#96ad52;box-shadow:0 0 100px #193c4266}#world,.game-button canvas,.item canvas,.seed canvas,.order-row-head canvas{image-rendering:auto}
.ship-patience-accessible{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}
.crop-bubble button[aria-pressed=true]{background:#b7ca89;border:2px solid #69834b}
.coin-counter{background:#4b6048;border-color:#354633;box-shadow:0 4px #344231,inset 0 2px #839071}.gold-coin{background:#e9c76c;border-color:#9d7e3e;box-shadow:inset 0 0 0 3px #f3dda0,0 2px #37462f;color:#d4a94e}.island-counter{text-shadow:0 2px #4b5c38,1px 0 #4b5c38}.island-counter span{color:#f6efce}.round-button{background:#f2e6c5;border-color:#536043;color:#516344;box-shadow:0 4px #3b4d38,inset 0 2px #fff3d6}.auto-on{background:#b6ca83;color:#47633b}.order-pill{background:#f6edce;border-color:#596349;box-shadow:0 5px #46583c70}.anchor{color:#6b817b}.order-pill-body>span{color:#798168}.order-pill-end{border-color:#dfd7b5}.order-pill-end b{color:#aa813b}.order-pill-end small{color:#8c8b6d}.pill-progress{background:#d8dbb4}.pill-progress i{background:#98b16d}
.satchel-strip{background:#435d4deb;border-color:#354b3c;box-shadow:0 3px #2c443c80;color:#f9efd0}.game-button{background:#eddfb7;border-color:#5c654c;color:#526345;box-shadow:0 5px #3a4d3b,inset 0 3px #faf0d1}.primary-action{background:#a9be75;border-color:#526b41;box-shadow:0 5px #435b37,inset 0 3px #cfdda1;color:#405734}.game-button:disabled{background:#c8d0b0;color:#83906f;box-shadow:0 5px #4d6249,inset 0 3px #dde2c4}.notification{background:#c58254;border-color:#875b3c;color:#fff3d1}
.sheet{background:#e6e8d3;border-color:#5e6a50;box-shadow:0 -7px #52644d60}.sheet-heading{background:#f3ead1;border-color:#d3d8bb}.sheet-handle{background:#b0bda0}.sheet-heading h1{color:#49603e}.close-button{background:#b77c56;border-color:#855b40;box-shadow:0 3px #775239}.upgrade{background:#f8f0d9;border-color:#c6cfab;box-shadow:0 3px #cbd3b6}.upgrade-icon{background:#dde4c3;border-color:#b8c99b;color:#718558}.purchase{background:#99b86c;border-color:#628143;box-shadow:0 3px #566e3d,inset 0 2px #c2d69a;color:#fbf4d6;text-shadow:0 1px #718449}.purchase:disabled{background:#d0d7bc;color:#8b9977;border-color:#b2bfa0;box-shadow:0 3px #a7b494}.seed{background:#f6edcf;border-color:#c1cea6;color:#546641;box-shadow:0 3px #b0bf96}.seed.active{background:#e2e8c1;border-color:#809759;box-shadow:0 3px #637b43}.order-row{background:#f7edce;border-color:#c1cca4}.progress{background:#dce3bd;border-color:#aab985}.progress i{background:#9eb96c}.station-note{background:#dde4c3;color:#6a7f51}.pause-dialog{background:#f3e8c8;border-color:#596c4e;color:#536746}.pause-icon{color:#8fa367}.help-step>b{background:#a2b978;border-color:#778d52}

.crop-bubble{position:absolute;z-index:7;display:flex;gap:6px;padding:10px;background:#fff0d0;border:2px solid #819267;border-radius:19px;box-shadow:0 4px 0 #3f543c55,0 8px 16px #243e2522;isolation:isolate;animation:bubble-in .12s ease-out}.crop-bubble[hidden]{display:none}.crop-bubble:after{content:"";position:absolute;left:calc(var(--tip-x) - 7px);bottom:-9px;width:13px;height:13px;background:#fff0d0;border-right:2px solid #819267;border-bottom:2px solid #819267;transform:rotate(45deg);z-index:-1}.crop-bubble.below:after{bottom:auto;top:-9px;transform:rotate(225deg)}.crop-bubble button{display:grid;place-items:center;width:50px;height:53px;padding:3px;background:#e7e9c5;border:1px solid #c2cba1;border-radius:11px;box-shadow:none}.crop-bubble button:hover,.crop-bubble button:focus-visible{background:#d2dda9;outline:2px solid #819b5d;outline-offset:0}.crop-bubble button:active{transform:translateY(2px);box-shadow:none}.crop-bubble canvas{width:43px;height:43px;image-rendering:auto;pointer-events:none;filter:drop-shadow(0 1px 0 #73624522)}@keyframes bubble-in{from{opacity:0;translate:0 3px}to{opacity:1;translate:0 0}}
.milestone-summary{display:flex;justify-content:space-between;align-items:center;color:#49603e;font-size:15px}.milestone-summary+.progress{margin-bottom:12px}.milestone-list{list-style:none;margin:0;padding:0}.milestone{gap:10px;min-height:88px}.milestone-check{width:26px;height:26px;flex-shrink:0;border:2px solid #9daa80;border-radius:7px;display:grid;place-items:center;font-size:21px;font-weight:1000;background:#fff9e5}.milestone.is-done{background:#dce6c8;box-shadow:none;border-color:#b4c49e}.is-done .milestone-check{background:#76965a;color:#fff7da;border-color:#648348}.is-done h3{color:#667c52}.milestone-done{font-size:12px;font-weight:900;color:#66814d}.milestone.is-locked{background:#e9e9da;box-shadow:none}.milestone small{display:block;font-size:11px;line-height:1.4;color:#89917c;margin-top:4px}.milestone .purchase{box-sizing:border-box;width:112px;min-width:112px;flex:0 0 112px;padding:9px 6px;white-space:nowrap;font-variant-numeric:tabular-nums}
.ship-order{border-bottom:2px solid #bfcca5;margin-bottom:20px;padding-bottom:12px}.ship-order:last-of-type{border-bottom:0;margin-bottom:0}
.bottom-hud .action-bar .game-button{min-height:48px;flex-direction:row;gap:8px;padding:6px 12px}.bottom-hud .satchel-strip{min-height:30px;margin-bottom:6px;padding:4px 8px}.bottom-hud .safe-bottom{height:calc(env(safe-area-inset-bottom) + 10px)}

.crop-bubble{display:grid;grid-template-columns:repeat(4,50px)}.crop-bubble:not([hidden]):has(button:last-child:nth-child(-n+3)){display:flex}#inventory{flex-wrap:wrap;gap:4px}.voyage-card{background:#eee7c7;border:2px solid #b1ba8c;border-radius:18px;padding:18px;margin-top:14px}.voyage-card h2{font-size:23px;margin:8px 0;color:#435737}.voyage-card p{line-height:1.5;color:#677354}.voyage-kicker{font-size:11px;font-weight:900;letter-spacing:1px;color:#6f8950}.voyage-goal{display:flex;justify-content:space-between;gap:8px;font-size:14px;margin:18px 0 8px}.sail-button{width:100%;margin-top:22px;min-height:52px}.sail-button:disabled{opacity:.5;cursor:default}.voyage-reset{font-size:12px;margin-bottom:0}

.milestone-icon{width:44px;height:48px;flex:0 0 44px;display:grid;place-items:center}.milestone-icon svg,.milestone-icon canvas{width:40px;height:40px;image-rendering:auto}.is-locked .milestone-icon{opacity:.65}

.bottom-hud .satchel-strip:has(#inventory:empty){display:none}.bottom-hud .satchel-strip{width:fit-content;max-width:100%;margin-left:auto;margin-right:auto}
.hud #pause{order:0}.hud .island-counter{order:1;min-width:0}.hud .coin-counter{order:2;min-width:105px}.reward-effects{position:absolute;inset:0;width:100%;height:100%;z-index:8;pointer-events:none}

.audio-settings{display:grid;gap:8px;margin:0 0 22px}.audio-settings button{padding:11px;border:2px solid #9daa80;border-radius:12px;background:#e0e9bf;color:#435737;font-size:14px;font-weight:900;min-height:44px}.audio-settings button[aria-pressed="false"]{background:#eee8d5;color:#788067}.audio-settings button:active{transform:translateY(1px)}
.upgrade-balance{display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:12px;padding:4px 10px 4px 4px;border:2px solid #69724d;border-radius:24px;background:#4b6048;color:#fff1bc;white-space:nowrap}.upgrade-balance[hidden]{display:none}.upgrade-balance strong{font-size:19px;font-variant-numeric:tabular-nums}.upgrade-balance .gold-coin{width:27px;height:27px;line-height:21px;font-size:21px;flex-shrink:0}.sheet-heading h1{min-width:0}@media(max-width:360px){.upgrade-balance{margin-right:8px;gap:4px;padding-right:7px}.upgrade-balance strong{font-size:16px}}

/* Solid woodland header with a carved wooden menu control. */
.game-shell .hud{background:#43563e;border-bottom:3px solid #a68a54;box-shadow:0 3px 0 #30412f55;padding:calc(env(safe-area-inset-top) + 11px) 14px 12px;gap:10px;pointer-events:auto}.hud .island-counter{text-shadow:0 1px #283c29}.hud .island-counter strong{color:#fff1cb}.hud .island-counter span{color:#d8dfbd}.hud #pause{width:45px;height:45px;background:#9b7849;border:2px solid #614e32;border-radius:12px;box-shadow:inset 0 2px 0 #c7a66c,inset 0 -3px 0 #7c5e3b,0 2px 0 #283b2b}.hud #pause svg{width:29px;height:29px}.hud #pause:active{transform:translateY(1px);box-shadow:inset 0 2px 3px #62482f}.hud .coin-counter{height:45px;background:#354a34;border:2px solid #71805a;box-shadow:inset 0 2px 0 #263d2c;min-width:100px}.hud .coin-counter strong{font-size:24px}.hud .gold-coin{width:32px;height:32px;line-height:27px;font-size:25px}@media(max-width:360px){.game-shell .hud{padding-left:10px;padding-right:10px;gap:6px}.hud .island-counter strong{font-size:15px}.hud .coin-counter{min-width:88px;padding-right:9px}}

.game-shell .bottom-hud{padding:12px 14px 0;border-top:3px solid #a68a54;box-shadow:0 -3px 0 #30412f55}.game-shell .bottom-hud .action-bar{gap:10px}.game-shell .bottom-hud .safe-bottom{height:calc(env(safe-area-inset-bottom) + 12px)}@media(max-width:360px){.game-shell .bottom-hud{padding-left:10px;padding-right:10px}.game-shell .bottom-hud .action-bar{gap:6px}}
.inventory-section{margin-top:10px}.inventory-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.inventory-toolbar h2{font-size:17px;margin:0}.inventory-mode{min-height:44px;padding:7px 16px;border:2px solid #7c7955;border-radius:10px;background:#efe2b9;color:#4d5b3b;font-weight:900}.inventory-mode[aria-pressed=true]{background:#b6c68c}.character-screen .inventory-grid{height:clamp(150px,27dvh,260px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:8px;background:#c8ceac;border:2px solid #99a47f;border-radius:14px;align-content:start;grid-auto-rows:min-content;scrollbar-color:#879269 #c8ceac;scrollbar-width:thin}.character-screen .inventory-item{aspect-ratio:1;min-height:48px;padding:5px;display:grid;place-items:center;box-shadow:inset 0 2px 4px #66532f20}.character-screen .inventory-item svg{width:100%;height:100%;max-height:48px}.character-screen .inventory-item.empty-slot{background:#b9c29e;border-color:#a5b18c;box-shadow:inset 0 2px 5px #52633b22}.character-screen .inventory-item.worn{background:#e0ecc6}.character-screen .inventory-item.selected{outline:3px solid #4b6a36;outline-offset:-1px;background:#f4edb8}.character-screen .inventory-item:disabled{opacity:.4}.slot-equipped,.slot-check{position:absolute;right:2px;bottom:2px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 3px;border-radius:5px;background:#4d683b;color:#fff8d7;font-size:11px;font-weight:1000}.inventory-status{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:60px;padding:8px 2px;font-size:12px;color:#586343}.inventory-status .purchase{white-space:nowrap;min-height:44px;font-size:12px}.character-screen .character-stage{min-height:180px}.character-screen .farmer-preview{width:180px;height:180px}.character-screen .equipped-slots{top:8px;gap:4px}.character-screen .equipment-slot{height:52px}.character-screen .equipment-slot svg{height:29px}.character-screen .gear-note{margin:8px 0;font-size:11px}
.appearance-customizer{margin-top:10px;border:1px solid #bdc5a1;border-radius:12px;background:#eee6ca;overflow:hidden}.appearance-toggle{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:44px;padding:8px 12px;border:0;background:transparent;color:#4d6142;font:inherit;font-size:14px;font-weight:800}.appearance-options{padding:0 10px 12px;display:grid;gap:10px}.character-kind{display:flex;gap:8px}.character-kind button{flex:1;min-height:44px;border:2px solid #b3bd95;border-radius:10px;background:#fff5db;color:#4d6142;font:inherit;font-weight:800}.character-kind button[aria-pressed=true]{background:#d6e4b8;border-color:#627d47}.hair-options{display:flex;gap:7px;justify-content:center}.hair-options button{width:44px;height:44px;border:3px solid #fff2d2;border-radius:50%;background:var(--hair);box-shadow:0 0 0 1px #9c9878;color:white;font-size:22px;font-weight:900;text-shadow:0 1px 3px #222}.hair-options button[aria-pressed=true]{box-shadow:0 0 0 3px #607b46}.appearance-customizer button:focus-visible{outline:3px solid #465f38;outline-offset:-3px}
.character-screen .equipped-slots{inset:8px 10px auto;display:grid;grid-template-columns:54px 54px;justify-content:space-between;gap:5px;pointer-events:none}.character-screen .equipment-slot{width:54px;height:52px;pointer-events:auto}.character-screen .farmer-preview{margin-right:0}
/* Opening colors are independent of the reward; its rarity is shown only at reveal. */
.loot-overlay.opening .loot-halo{color:#f5f3e8;background:radial-gradient(circle,currentColor,transparent 68%);animation:chest-rarity-cycle 1.1s linear infinite,loot-glow 2s ease-in-out infinite alternate}
@keyframes chest-rarity-cycle{0%,100%{color:#f5f3e8}20%{color:#68ab52}40%{color:#579bd4}60%{color:#ab70cc}80%{color:#e99b42}}
/* Uniformly fit the full map between the HUD bars without world scrolling. */
/* The native wrapper already reserves the status/navigation bar insets. */
.native-app .game-shell .hud{padding-top:8px;padding-bottom:10px}
.native-app .game-shell .bottom-hud{background:linear-gradient(#96ad52,#496d4e)}
.native-app .game-shell .bottom-hud .safe-bottom{height:12px}
.world-viewport{position:absolute;left:0;right:0;overflow:hidden;touch-action:none;display:flex;align-items:center;justify-content:center;background:#325a63}.world-viewport #world{width:100%;height:auto;min-height:0;max-width:100%;max-height:100%;aspect-ratio:600/960;flex:none;object-fit:fill;touch-action:none;margin:0}

/* The chest room itself becomes the opening/reward stage. */
.chest-sequence{position:relative;inset:auto;z-index:auto;flex:1;min-height:0;overflow-y:auto;border-radius:0;background:radial-gradient(circle,#f9edc9,#d6dfbb);color:#465d3d;padding:24px;isolation:isolate}
.chest-sequence .loot-halo{pointer-events:none;z-index:-1;max-width:100%}
.chest-sequence .loot-done{background:#567443;color:#fff7da;border:2px solid #405934;border-radius:12px;box-shadow:0 3px 0 #354c2d}
.chest-sequence .loot-rarity{color:#465d3d}
.chest-sequence .loot-actions{flex-shrink:0;margin-top:24px}
@media(max-height:650px){.chest-sequence{justify-content:flex-start}.chest-sequence .loot-chest{width:150px}.chest-sequence .loot-rarity{margin:8px 0 16px}.chest-sequence .loot-item{width:110px;height:110px;padding:14px}.chest-sequence h2{margin-top:15px}}

/* Keep equipment in its original side slots, with bonuses beside the portrait. */
.character-screen .character-stage{min-height:180px;display:flex;padding:0}
.character-screen .farmer-preview{width:180px;height:180px;margin-right:0}
.character-stage .character-stats{position:absolute;inset:8px 70px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;column-gap:72px;row-gap:8px;margin:0;align-items:center;pointer-events:none}
.character-stage .character-stats span{background:none;padding:0;text-align:center;font-size:10px;line-height:1.25;color:#52613e;min-width:0}
.character-stage .character-stats b{font-size:16px;color:#3d5832;display:block;margin-bottom:4px;white-space:nowrap}
.character-stage .character-stats span:nth-child(1){grid-column:1;grid-row:1}
.character-stage .character-stats span:nth-child(2){grid-column:1;grid-row:2}
.character-stage .character-stats span:nth-child(3){grid-column:2;grid-row:1}
.character-stage .character-stats span:nth-child(4){grid-column:2;grid-row:2}
@media(max-width:360px){.character-stage .character-stats{inset-inline:66px;column-gap:60px}.character-stage .character-stats b{font-size:13px}.character-stage .character-stats span{font-size:9px}}

.character-screen .character-stage{padding-top:48px;min-height:228px}
.character-screen .character-stage .equipped-slots{top:56px}
.character-stage .character-stats{top:56px}
.frame-customize{position:absolute;right:8px;top:4px;width:44px;height:40px;min-height:44px;padding:7px;border:2px solid #a8976b;border-radius:11px;background:#fff3d3;color:#59683d;display:grid;place-items:center;z-index:2}
.frame-customize svg{width:28px;height:28px}
.frame-customize:focus-visible{outline:3px solid #486339;outline-offset:2px}
.character-stage.customizing{flex-direction:column;padding:48px 8px 12px}
.customizing .frame-customize{left:8px;right:auto}
.frame-title{position:absolute;top:17px;left:62px;right:62px;text-align:center;font-weight:900;color:#4d6142}
.character-screen .customizing .farmer-preview{width:160px;height:160px}
.customizing .appearance-options{width:100%;padding:4px 2px 0}
.customizing .hair-options{gap:7px;flex-wrap:wrap;padding:4px}
.hairstyle-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.hairstyle-options button{min-height:44px;padding:6px 4px;border:2px solid #b3bd95;border-radius:10px;background:#fff5db;color:#4d6142;font:inherit;font-size:12px;font-weight:800}.hairstyle-options button[aria-pressed=true]{background:#d6e4b8;border-color:#627d47}
.character-name-form{display:grid;gap:5px;text-align:left}.character-name-form label{font-size:14px;font-weight:800;color:#4d6142}.character-name-form>div{display:flex;gap:6px}.character-name-form input{min-width:0;width:100%;min-height:44px;border:2px solid #a8b68c;border-radius:10px;background:#fff8df;padding:8px;font:inherit;color:#3f5736}.character-name-form .purchase{min-height:44px}.name-status{font-size:12px;color:#596846}.level-total{text-align:center;margin:10px 0 4px;font-size:14px;font-weight:800;color:#4d6142}.leaderboard-sheet{max-height:85dvh}.leaderboard-body{padding:16px;overflow-y:auto;max-height:65dvh;color:#4b5d3c}.leaderboard-intro{font-weight:900;margin-top:0}.leaderboard-you{background:#d6e4b8;border-radius:10px;padding:12px;font-weight:800;font-size:14px}.leaderboard-list{list-style:none;padding:0}.leaderboard-list li{display:grid;grid-template-columns:40px 1fr 40px;gap:8px;padding:12px 8px;border-bottom:1px solid #c5c8a3;font-size:14px}.leaderboard-list li span{overflow-wrap:anywhere}.leaderboard-list .is-you{background:#e1eac8}.leaderboard-empty{padding:18px 0;line-height:1.5}

.appearance-label{font-size:14px;font-weight:800;color:#4d6142}.customizing .skin-options{gap:5px}.skin-options button{width:40px;height:44px;flex-shrink:0}
.character-screen .character-stage:not(.customizing){padding-top:0;padding-bottom:48px}
.character-stage:not(.customizing) .frame-customize{top:auto;bottom:4px;left:50%;right:auto;transform:translateX(-50%)}
.character-screen .character-stage:not(.customizing) .equipped-slots{top:8px}
.character-stage:not(.customizing) .character-stats{top:8px;bottom:56px}
.leaderboard-player,.leaderboard-list li.leaderboard-player{display:grid;grid-template-columns:30px 64px minmax(0,1fr) 60px;align-items:center;gap:8px;padding:10px 4px;border-bottom:1px solid #c5c8a3;color:#4b5d3c}.leaderboard-player.is-you{background:#dce8bf;border-radius:12px}.leaderboard-portrait{width:64px;height:64px;border-radius:14px;background:radial-gradient(circle,#fff1ca,#bfcf9e);border:1px solid #a6b685}.leaderboard-player-info{min-width:0;display:grid;gap:4px}.leaderboard-player-info strong{font-size:14px;overflow-wrap:anywhere}.leaderboard-player-info small{font-size:12px}.leaderboard-score{text-align:center;display:grid;gap:3px}.leaderboard-score strong{font-size:20px}.leaderboard-score small{font-size:11px}.leaderboard-rank{text-align:center;font-size:13px}@media(max-width:360px){.leaderboard-player,.leaderboard-list li.leaderboard-player{grid-template-columns:24px 52px minmax(0,1fr) 48px;gap:5px}.leaderboard-portrait{width:52px;height:52px}}
/* Upgrade purchases change the list, not the panel's footprint. */
#sheet[data-mode="upgrades"][open]{display:flex;flex-direction:column;box-sizing:border-box;height:min(600px,80dvh)}
#sheet[data-mode="upgrades"]>.sheet-handle,#sheet[data-mode="upgrades"]>.sheet-heading{flex:none}
#sheet[data-mode="upgrades"]>#sheet-body{flex:1 1 0;min-height:0;max-height:none;overflow-y:auto}
@media(max-width:640px),(pointer:coarse){#sheet[data-mode="upgrades"][open]{height:50dvh;max-height:50dvh}}

.game-shell{--side-tabs-top:calc(env(safe-area-inset-top) + 84px)}.native-app .game-shell{--side-tabs-top:79px}.leaderboard-side-tab{top:var(--side-tabs-top)}.leaderboard-side-tab:focus-visible{outline:3px solid #fff1be;outline-offset:3px}

.leaderboard-player[role="button"]{cursor:pointer}.leaderboard-player:focus-visible{outline:3px solid #78964b;outline-offset:2px}.leaderboard-back{min-height:44px;border:2px solid #a4b480;border-radius:10px;padding:8px 14px;background:#e3e9c6;color:#405c38;font:inherit;font-weight:800}.leaderboard-gear-hero{text-align:center;margin:12px 0}.leaderboard-gear-hero .leaderboard-portrait{width:144px;height:144px}.leaderboard-gear-hero h2{margin:8px 0 4px}.leaderboard-gear-hero p{margin:0}.leaderboard-gear-list{display:grid;gap:8px}.leaderboard-gear-card{display:flex;gap:12px;align-items:center;padding:10px;background:#fff5d9;border:2px solid var(--rarity);border-radius:12px}.leaderboard-gear-icon{width:56px;flex:0 0 56px;text-align:center;font-size:28px}.leaderboard-gear-icon img,.leaderboard-gear-icon svg{width:56px;height:56px;object-fit:contain}.leaderboard-gear-card strong,.leaderboard-gear-card small{display:block}.leaderboard-gear-card p{font-size:12px;margin:5px 0 0;line-height:1.4}


.leaderboard-countdown{margin:-4px 0 14px;font-size:13px;font-weight:800;color:#667b45}

.leaderboard-own-position{position:sticky;bottom:0;border-top:2px solid #a6b685;box-shadow:0 -5px 12px #4b5d3c18}

.leaderboard-inline-prize{display:inline-flex;align-items:center;gap:4px;justify-self:start;color:#725530;font-size:13px;font-weight:900;line-height:1}.leaderboard-inline-chest,.leaderboard-inline-chest svg{display:block;width:26px;height:26px}

.cloud-dialog{max-width:min(420px,calc(100vw - 32px));box-sizing:border-box;border:3px solid #a4b480;border-radius:22px;padding:24px;background:#f4ecd2;color:#405c38;text-align:center;font-family:Nunito,sans-serif}.cloud-dialog::backdrop{background:#203c31e8}.cloud-dialog h2{margin-top:0}.cloud-dialog p{line-height:1.5}.cloud-dialog .game-button{width:100%;margin-top:12px;font-size:14px;min-height:48px}.cloud-summary{white-space:pre-line;background:#dfe6c6;border-radius:12px;padding:12px}

.item-detail-dialog{width:min(340px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow-y:auto;margin:auto;padding:28px 24px 24px;border:3px solid #879866;border-radius:22px;background:#f4ecd2;color:#40583c;text-align:center;box-shadow:0 8px 0 #263c3266;font-family:Nunito,sans-serif}.item-detail-dialog::backdrop{background:#18352b99}.item-detail-close{position:absolute;top:10px;right:10px}.item-detail-art{width:110px;height:110px;margin:14px auto 16px;border:3px solid var(--rarity);border-radius:20px;background:#fff7df;display:grid;place-items:center;box-shadow:0 3px 0 #75634122}.item-detail-art svg{width:92px;height:92px}.item-detail-dialog h2{font-size:23px;margin:0 0 6px}.item-detail-rarity{font-size:14px;margin:0;color:#726442}.item-detail-bonuses{padding:12px;margin:16px 0;background:#dfe5c5;border-radius:12px}.item-detail-bonuses p{margin:6px 0;font-size:15px;font-weight:800}.item-detail-dialog>.purchase{width:100%;min-height:48px}

.action-bar .notification{min-width:30px;width:30px;height:30px;line-height:24px;background:#c34f40;border-color:#883e32}.slot-new{position:absolute;top:2px;right:2px;padding:2px 4px;border-radius:5px;background:#c34f40;color:#fff8dc;font-size:9px;line-height:12px;font-weight:1000;pointer-events:none}

.action-bar .gear-notification{width:auto;padding:0 5px}
.character-screen .inventory-status{font-size:15px;line-height:1.5;color:#37432c;gap:12px;padding:12px 2px;flex-wrap:wrap}
.character-screen .inventory-status.salvaging>span{font-weight:800}
.character-screen .inventory-status .purchase{font-size:15px;min-height:44px;margin-left:auto}
.leaderboard-columns,.leaderboard-player,.leaderboard-list li.leaderboard-player{grid-template-columns:30px 64px minmax(0,1fr) 80px}
.leaderboard-columns{display:grid;align-items:end;gap:8px;padding:10px 4px;border-bottom:2px solid #a6b685;color:#374b30;font-size:12px;font-weight:900;line-height:1.3}
.leaderboard-player-heading{grid-column:2 / 4}.leaderboard-score-heading{text-align:center}.leaderboard-columns+.leaderboard-list{margin-top:0}
@media(max-width:360px){.leaderboard-columns,.leaderboard-player,.leaderboard-list li.leaderboard-player{grid-template-columns:24px 52px minmax(0,1fr) 70px;gap:5px}}
.visual-guide{list-style:none;margin:0;padding:0;display:grid;gap:16px}.guide-card{overflow:hidden;background:#fff4d6;border:2px solid #acb28d;border-radius:16px}.guide-picture{height:132px;display:flex;align-items:center;justify-content:center;gap:10px;background:#ccd9a7;overflow:hidden;padding:12px}.guide-picture canvas{width:64px;height:64px;flex:none}.guide-arrow{font-size:29px;font-weight:900;color:#53623d}.guide-plot{display:block;position:relative;width:82px;height:82px;flex:none}.guide-plot>canvas{width:82px;height:82px}.guide-growing{position:absolute;inset:3px 9px 15px;display:flex;align-items:center;justify-content:center}.guide-seed{background:#fff5db;border:2px solid #8c9869;border-radius:50%;padding:5px;display:flex}.guide-barn canvas{width:110px;height:110px}.guide-ship{height:108px;width:72px;object-fit:contain}.guide-order{display:flex;align-items:center;gap:5px}.guide-order>span{font-size:14px;font-weight:900;color:#405632;background:#fff4d6;padding:5px;border:1px solid #8d9c68;border-radius:8px}.guide-chest svg,.guide-chest img{width:88px;height:88px;object-fit:contain}.guide-caption{padding:13px 15px 16px}.guide-caption h2{margin:0 0 7px;display:flex;align-items:center;gap:9px;color:#384d30;font-size:18px;line-height:1.3}.guide-caption h2>span{display:grid;place-items:center;background:#d4dfb3;border-radius:50%;width:26px;height:26px;flex:none;font-size:14px}.guide-caption p,.guide-save-note{font-size:15px;line-height:1.5;color:#45533a;margin:0}.guide-save-note{padding:14px 3px 0}.guide-picture:has(.guide-order){gap:5px}.guide-picture:has(.guide-order)>canvas{width:43px;height:54px}
.guide-gear{display:inline-flex;align-items:center;justify-content:center;flex:none}.guide-gear svg,.guide-gear img{width:64px;height:64px;object-fit:contain}.guide-bonuses{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:100%;max-width:380px}.guide-bonuses>span{display:grid;grid-template-rows:64px auto;justify-items:center;align-items:end;gap:5px;text-align:center}.guide-bonuses>span>b{align-self:start}.guide-bonuses canvas,.guide-bonuses .guide-gear svg,.guide-bonuses .guide-gear img{width:44px;height:44px}.guide-bonuses b,.guide-gear-stack b{font-size:12px;line-height:1.3;color:#354a2c}.guide-gear-stack{display:flex;flex-direction:column;align-items:center;gap:5px}
.leaderboard-character-name{text-align:center;font-size:22px;margin:16px 0 4px;color:#3d5832}.leaderboard-character .level-total{margin:0 0 12px}.leaderboard-character .character-stage:not(.customizing){min-height:188px;padding-bottom:0}.leaderboard-character .character-stage .character-stats{bottom:8px}.leaderboard-character .equipment-slot[aria-pressed=true]{outline:2px solid #52723c;outline-offset:2px}.leaderboard-gear-details{background:#fff4d6;border:1px solid #b7bf97;border-radius:12px;margin-top:12px;padding:14px;color:#3f5236;font-size:15px;line-height:1.5;min-height:70px}.leaderboard-gear-details strong,.leaderboard-gear-details small{display:block}.leaderboard-gear-details p{margin:5px 0 0}.leaderboard-gear-details small{font-size:13px}
.ship-below-indicator{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;width:76px;height:50px;padding:5px 8px;border:2px solid #78643f;border-radius:25px;background:#fff0cc;box-shadow:0 3px 0 #66553266;color:#5a653c;touch-action:manipulation}.ship-below-indicator[hidden]{display:none}.ship-below-indicator img{width:24px;height:38px;object-fit:contain}.ship-below-indicator span{font-size:26px;font-weight:900;line-height:1}.ship-below-indicator:focus-visible{outline:3px solid #fff4c7;outline-offset:3px}
/* A single, opaque treasure room carries the full opening and reveal. */
.chest-experience[open]{background:#263f35;border:2px solid #8e8054;overflow:hidden}
.chest-experience .sheet-heading{background:#183c2e;border-bottom:3px solid #60784d;color:#fff1cb;padding:14px 18px}
.chest-experience .sheet-heading h1{font-size:21px;color:#fff1cb}
.treasure-room{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:8px 22px 16px;text-align:center;color:#fff0cd;background:radial-gradient(ellipse at 50% 33%,#577354 0,#304e3e 42%,#223d33 85%);isolation:isolate}
.treasure-scene{position:relative;flex:0 0 230px;min-height:200px;max-height:250px;width:100%;display:grid;place-items:center;isolation:isolate}
.treasure-aura{position:absolute;width:280px;height:280px;max-width:100%;border-radius:50%;background:radial-gradient(circle,var(--prize-color),transparent 68%);opacity:.27;z-index:0;pointer-events:none}
.treasure-rays{position:absolute;width:300px;height:300px;max-width:100%;border-radius:50%;background:repeating-conic-gradient(from 0deg,transparent 0deg 22deg,#f5e7a314 22deg 30deg);mask-image:radial-gradient(circle,#000 0,transparent 70%);pointer-events:none;z-index:0;animation:treasure-rays 35s linear infinite}
.treasure-plinth{position:absolute;z-index:1;bottom:12%;width:210px;height:28px;background:radial-gradient(ellipse,#122c23a0,transparent 70%);pointer-events:none}
.treasure-open-art{position:relative;z-index:2;display:grid;place-items:center;width:240px;max-width:90%;padding:0;background:none;border:0;box-shadow:none;touch-action:manipulation}
.treasure-chest{position:relative;z-index:2;isolation:isolate;width:230px;height:230px;max-width:100%;transform-origin:50% 80%;filter:drop-shadow(0 8px 2px #12291d66)}
.treasure-chest svg{display:block;width:100%;height:100%;overflow:visible}
.treasure-caption{width:100%;max-width:390px;position:relative;flex:none}.treasure-caption h2{font-size:clamp(22px,4vw,29px);line-height:1.2;margin:5px 0 12px;color:#fff0cd}.treasure-caption>p{font-size:14px;line-height:1.5;color:#d4d8b5;margin:7px 0}.treasure-controls{width:100%;max-width:330px;flex:none;display:grid;gap:8px;margin-top:10px;padding-top:8px}
.treasure-primary{min-height:55px!important;width:100%;background:linear-gradient(#f4d98e,#dbb864)!important;color:#473b24!important;border:2px solid #ad8748!important;border-radius:16px!important;box-shadow:0 5px 0 #806637,inset 0 2px 0 #fff0bb;font-size:18px!important;font-weight:900}.treasure-primary span{display:block;font-size:12px;font-weight:700;margin-top:2px;color:#6a522d}
.treasure-secondary{min-height:44px;border:0;background:none;color:#e4dcba;font-size:14px;font-weight:700;box-shadow:none}.treasure-remaining{font-size:13px;color:#d4d8b5;padding-top:7px}.treasure-room .save-note{color:#ffe0b3}
.treasure-rarity{display:inline-block;padding:5px 13px;border:1px solid var(--prize-color);color:var(--prize-color);border-radius:20px;font-size:12px;letter-spacing:2px;text-transform:uppercase;font-weight:900;margin-bottom:10px}
.treasure-bonuses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:15px 0 8px}.treasure-bonuses span{border:1px solid #8f9b6d;background:#3d5742;border-radius:10px;padding:9px 7px;color:#fbefce;font-size:13px;line-height:1.35;font-weight:700}.treasure-caption .treasure-saved{font-size:12px;color:#bacbae;margin:12px 0 0}
.treasure-prize{position:relative;z-index:2;width:190px;height:190px;filter:drop-shadow(0 5px 1px #12291d80);animation:treasure-prize .65s cubic-bezier(.18,.85,.22,1.2) both}.treasure-prize svg{width:100%;height:100%}.reward .treasure-aura{opacity:.55;animation:treasure-aura .65s ease-out both}.reward .treasure-scene{flex-basis:185px;min-height:185px;max-height:240px}.reward .treasure-plinth{bottom:4%}
.treasure-sparks{position:absolute;z-index:1;inset:0;pointer-events:none;overflow:hidden}.treasure-sparks i{position:absolute;left:50%;top:50%;width:8px;height:8px;background:var(--prize-color);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);animation:treasure-spark 1.05s ease-out var(--delay) both}
.opening .treasure-chest{animation:treasure-rock .6s ease-in-out infinite}.opening .treasure-aura{background:radial-gradient(circle,currentColor,transparent 68%);opacity:.38;animation:chest-rarity-cycle 1.2s linear infinite}.opening .treasure-rays{animation:treasure-rays 8s linear infinite}.treasure-opening-dots{height:55px;display:flex;gap:8px;align-items:center;justify-content:center}.treasure-opening-dots i{width:7px;height:7px;background:#d7c27f;border-radius:50%;animation:treasure-dot .8s ease-in-out infinite alternate}.treasure-opening-dots i:nth-child(2){animation-delay:.2s}.treasure-opening-dots i:nth-child(3){animation-delay:.4s}
@keyframes treasure-rays{to{transform:rotate(360deg)}}
@keyframes treasure-dot{to{opacity:.3;transform:translateY(-4px)}}
@keyframes treasure-charge{0%{opacity:.16;transform:scale(.75)}70%{opacity:.5;transform:scale(1.1)}100%{opacity:.85;transform:scale(1.4)}}
@keyframes treasure-rock{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}
@keyframes treasure-prize{0%{opacity:0;transform:translateY(65px) scale(.35) rotate(-9deg)}65%{opacity:1;transform:translateY(-8px) scale(1.08) rotate(3deg)}100%{transform:translateY(0) scale(1)}}
@keyframes treasure-aura{from{opacity:.9;transform:scale(1.3)}to{opacity:.55;transform:scale(1)}}
@keyframes treasure-spark{from{opacity:0;transform:rotate(var(--angle)) translateY(-15px) scale(.3)}20%{opacity:1}to{opacity:0;transform:rotate(var(--angle)) translateY(-145px) scale(.5)}}
@media(max-height:700px){.treasure-room{padding:6px 16px 14px}.treasure-scene{min-height:170px;flex-basis:170px}.treasure-chest{width:185px;height:185px}.treasure-prize{width:135px;height:135px}.reward .treasure-scene{min-height:140px;flex-basis:140px}.treasure-controls{padding-top:12px}.treasure-bonuses{margin-top:8px}.treasure-caption h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){.treasure-room *{animation:none!important}.treasure-prize{transform:none}}
@media(max-height:700px){.reward .treasure-scene{min-height:110px;flex-basis:110px}.reward .treasure-prize{width:105px;height:105px}.reward .treasure-caption h2{font-size:20px;margin-bottom:8px}.reward .treasure-rarity{margin-bottom:5px;padding:3px 10px}.reward .treasure-bonuses span{padding:6px;font-size:12px}.reward .treasure-caption .treasure-saved{margin-top:8px}.reward .treasure-secondary{min-height:34px}.reward .treasure-controls{gap:4px;padding-top:10px}}
.guide-coin,.guide-coin svg{display:block;width:64px;height:64px}.guide-gear-stack>.guide-gear{border:3px solid #f5f3e8;background:#eee9d4;border-radius:13px;box-shadow:0 2px 0 #8b9366}.guide-gear-stack.rare>.guide-gear{border-color:#68ab52;background:#dce9c6}.guide-gear-stack.rare>b{color:#386d30}

.purchase .price-coin{display:inline-block;width:22px;height:22px;vertical-align:middle;margin-left:3px;flex-shrink:0;filter:drop-shadow(0 1px 0 #775a35);pointer-events:none}

.painted-chest-animation{display:block;width:100%;height:100%;object-fit:contain}

.leaderboard-heading-copy{min-width:0}.leaderboard-heading-copy .leaderboard-countdown{margin:5px 0 0;font-size:13px;line-height:1.3;color:#667b45}
.leaderboard-time-badge{position:absolute;right:5px;top:-10px;min-width:31px;padding:3px 6px;border-radius:20px;background:#435e40;border:2px solid #f8dfaa;color:#fff5dc;font-size:12px;font-weight:900;line-height:1.1;text-align:center;box-shadow:0 2px 0 #283c2d44;pointer-events:none}

.weekly-win-notice{margin:12px 18px 0;padding:14px 16px;border:2px solid #b9a36a;border-radius:14px;background:#fff0c6;color:#435b39;flex-shrink:0}
.weekly-win-notice[hidden]{display:none}
.weekly-win-notice>strong{display:block;font-size:20px}.weekly-win-notice>small{display:block;margin-top:6px;font-size:14px}
.weekly-win-prizes{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:8px}
.weekly-win-prize{display:flex;align-items:center;gap:6px;font-weight:800}
.weekly-win-prize .leaderboard-inline-chest{display:inline-block;width:34px;height:30px}
.weekly-win-prize svg{width:100%;height:100%}
.leaderboard-inline-chest img{display:block;width:100%;height:100%;object-fit:contain}

.chest-drop-rates{width:100%;max-width:440px;margin:14px 0 0;padding:10px 12px;box-sizing:border-box;border:1px solid #9daa7955;border-radius:12px;background:#162f2877}
.chest-drop-rates>strong{font-size:13px;color:#f5e7bc;display:block;margin-bottom:7px}
.chest-rate-list{display:flex;justify-content:center;flex-wrap:wrap;gap:6px 12px}
.chest-rate{display:flex;align-items:center;gap:5px;font-size:12px;color:#fff2d2;white-space:nowrap}
.chest-rate i{width:8px;height:8px;border-radius:50%;box-shadow:0 0 0 1px #ffffff44}
.chest-rate b{font-variant-numeric:tabular-nums}

/* Character inventory layout: larger worn gear, readable bonuses below the portrait. */
.character-layout .character-heading-name{min-width:0;flex:1}.character-heading-name>div{display:flex;align-items:center;gap:4px}.character-heading-name h1{overflow-wrap:anywhere;font-size:23px;line-height:1.2}.character-heading-name>small{display:block;font-size:12px;color:#60734f;margin-top:3px}.name-edit{display:grid;place-items:center;width:40px;min-height:44px;flex:none;border:0;background:transparent;color:#526b40;padding:10px}.name-edit svg{width:20px;height:20px}
.character-layout .character-stage:not(.customizing){height:267px;min-height:267px;padding-bottom:48px;border-radius:18px 18px 0 0;border-bottom:0}.character-layout .farmer-preview{width:218px;height:218px}.character-layout .character-stage:not(.customizing) .equipped-slots{inset:12px 12px auto;grid-template-columns:72px 72px;grid-template-rows:repeat(3,72px);gap:8px}.character-layout .equipment-slot{width:72px;height:72px;padding:4px;border-width:2px}.character-layout .equipment-slot img,.character-layout .equipment-slot svg{width:48px;height:48px;object-fit:contain}.character-layout .equipment-slot small{font-size:11px;line-height:13px}.character-layout .character-stage:not(.customizing) .frame-customize{bottom:8px}
.character-attributes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;background:#d2ddba;border:2px solid #b6c49d;border-top:1px solid #acba94;border-radius:0 0 18px 18px}.attribute-card{display:flex;align-items:center;gap:10px;background:#fff6dc;border:1px solid #bfcca2;border-radius:11px;padding:10px;min-width:0}.attribute-card>svg,.attribute-card>img,.attribute-card>canvas{width:28px;height:28px;object-fit:contain;flex:none}.attribute-card b{display:block;font-size:23px;line-height:1.1;color:#365431;font-weight:1000}.attribute-card small{display:block;font-size:13px;line-height:1.25;margin-top:4px;color:#4d6241}
.character-layout .inventory-section{margin-top:14px}.character-layout .inventory-grid{height:184px;grid-auto-rows:50px;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:8px;overflow-y:auto}.character-layout .inventory-item{aspect-ratio:auto;height:50px;min-height:50px;padding:3px}.character-layout .inventory-item img,.character-layout .inventory-item svg{width:38px;height:38px;max-width:100%;max-height:38px;object-fit:contain}.inventory-mode{display:inline-flex;align-items:center;justify-content:center;gap:7px}.inventory-mode svg{width:23px;height:23px;flex:none}
.character-name-dialog{width:min(350px,90vw);border:2px solid #819567;border-radius:18px;padding:22px;background:#f7edcf;color:#435b39}.character-name-dialog::backdrop{background:#142c2480}.character-name-dialog label{font-weight:900}.character-name-dialog input{width:100%;padding:12px;border:2px solid #9dae86;border-radius:9px;margin:8px 0 15px;background:#fff9e6;color:#435b39;font:inherit}.character-name-dialog form>div{display:flex;justify-content:flex-end;gap:10px}.character-name-dialog button{min-height:44px;padding:9px 14px;border:1px solid #78915c;border-radius:9px;background:#c5d69b;color:#435b39}
@media(max-width:370px){.character-layout .character-body{padding-inline:12px}.character-layout .character-stage:not(.customizing) .equipped-slots{grid-template-columns:64px 64px}.character-layout .equipment-slot{width:64px}.character-heading-name h1{font-size:20px}.attribute-card{gap:6px;padding:9px}.attribute-card small{font-size:12px}}

#upgrade-open .upgrade-symbol{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:32px;color:inherit;font-size:28px;line-height:1}#upgrade-open .upgrade-symbol svg{display:block;width:28px;height:30px}

/* Compact bonus strip keeps the inventory within the character panel on phones. */
.character-layout .character-attributes{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:7px}.character-layout .attribute-card{flex-direction:column;justify-content:center;gap:3px;padding:7px 2px;text-align:center}.character-layout .attribute-card>svg,.character-layout .attribute-card>img,.character-layout .attribute-card>canvas{width:20px;height:20px}.character-layout .attribute-card b{font-size:18px;line-height:1.1}.character-layout .attribute-card small{font-size:11px;line-height:1.2;margin-top:3px;white-space:nowrap}.character-layout .inventory-status{font-size:12px;line-height:1.4;min-height:0;padding:8px 2px}.character-layout .save-note:empty{display:none}
@media(max-width:370px){.character-layout .attribute-card small{font-size:10px}.character-layout .attribute-card b{font-size:17px}}

/* Remove spare outer spacing rather than clipping the character panel content. */
.character-layout:not(.chest-experience) .sheet-heading{padding:8px 16px 10px}.character-layout .character-body{padding:8px 14px}.character-layout .inventory-section{margin-top:10px}.character-layout .inventory-toolbar{margin-bottom:6px}.character-layout .inventory-status{padding-bottom:2px}
@media(max-height:790px){.character-layout .character-stage:not(.customizing){height:235px;min-height:235px;padding-bottom:40px}.character-layout .character-stage:not(.customizing) .equipped-slots{grid-template-rows:repeat(3,64px);gap:6px;top:10px}.character-layout .equipment-slot{height:64px}.character-layout .equipment-slot img,.character-layout .equipment-slot svg{height:41px}.character-layout .farmer-preview{width:194px;height:194px}.character-layout .character-stage:not(.customizing) .frame-customize{bottom:3px}}

.character-screen .inventory-item .slot-equipped{width:20px;height:20px;min-width:20px;padding:2px;display:grid;place-items:center}.character-screen .inventory-item .slot-equipped svg{width:15px;height:15px;max-width:15px;max-height:15px;stroke:#fff8d7;stroke-width:3.5}

/* Center the chest sequence in the available room instead of pinning it to the top. */
.treasure-room:is(.ready,.opening) .treasure-scene{margin-top:auto}.treasure-room:is(.ready,.opening) .treasure-controls{margin-bottom:auto}

/* Balance the revealed reward vertically, using the spare space below it. */
.treasure-room.reward .treasure-scene{margin-top:auto}.treasure-room.reward .treasure-controls{margin-bottom:auto}

.character-screen .inventory-item .slot-equipped{background:#69716e}.character-screen .inventory-item .slot-equipped svg{stroke:#fff;fill:none}

.character-layout .character-level{position:absolute;top:12px;left:88px;right:88px;text-align:center;color:#435d36;font-size:16px;font-weight:900;line-height:22px;pointer-events:none}@media(max-width:370px){.character-layout .character-level{left:80px;right:80px;font-size:14px}}

/* Recruit inspection uses the farmer frame, with read-only gear and a hire action. */
.recruitment-character .character-stage:not(.customizing){border-radius:18px;border-bottom:2px solid #b6c49d;padding-bottom:0;height:260px;min-height:260px}.recruitment-character .farmer-preview{margin:0}.recruitment-character .equipped-slots{justify-content:space-between}.recruitment-character .character-stats{margin:10px 0 16px}.recruitment-character .character-stats span{font-size:12px;line-height:1.4}.recruitment-character .character-stats b{font-size:20px}.recruitment-body>.primary-action{width:100%;margin-top:8px}

/* Options: quiet parchment panels and touch-friendly audio controls. */
.options-dialog{padding:0;width:min(420px,calc(100vw - 28px));max-height:88dvh;border:3px solid #667653;border-radius:22px;background:#e6e8d3;color:#435b39;box-shadow:0 6px 0 #34482f66;overflow:auto}.options-dialog .sheet-heading{padding:18px 20px;position:sticky;top:0;z-index:1}.options-dialog .sheet-heading h1{font-size:25px}.options-dialog .close-button{min-height:36px;flex:none}.options-content{padding:18px}.options-content section+section{margin-top:24px}.options-content h2{font-size:13px;text-transform:uppercase;letter-spacing:1.3px;color:#63764f;margin:0 0 10px}.options-dialog .audio-settings{gap:10px;margin:0}.options-dialog .option-toggle{display:flex;align-items:center;gap:10px;text-align:left;padding:12px;min-height:68px;background:#fff5da;border:2px solid #bdc99f;border-radius:14px;color:#435b39;box-shadow:0 2px #c7cfb1}.option-icon{width:34px;height:34px;display:grid;place-items:center;flex:none;color:#778953}.option-icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.option-toggle strong{font-size:16px;flex:1}.option-state{font-size:12px;font-weight:900;min-width:21px}.option-switch{width:42px;height:25px;border:2px solid #648445;border-radius:20px;background:#9eba70;position:relative;flex:none}.option-switch:after{content:'';position:absolute;top:2px;right:2px;width:17px;height:17px;background:#fff7db;border-radius:50%;box-shadow:0 1px 2px #40533055}.options-dialog .option-toggle[aria-pressed=false]{background:#f2ecd9;color:#66725c}.option-toggle[aria-pressed=false] .option-switch{background:#c8cbb8;border-color:#929b80}.option-toggle[aria-pressed=false] .option-switch:after{right:auto;left:2px}.option-link,.option-delete{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;text-decoration:none;text-align:left;color:#435b39;border:2px solid #bdc99f;border-radius:14px;background:#f8f0d9;padding:12px;font:inherit;min-height:62px}.option-link>strong,.option-delete>span:nth-child(2){flex:1}.option-link>span:last-child,.option-delete>span:last-child{font-size:25px}.options-dialog .option-delete{margin-top:12px;color:#87543c;background:#f0e4cf;border-color:#d1bba0;cursor:pointer}.option-delete .option-icon{color:#98694f}.option-delete strong{display:block;font-size:15px}.option-delete small{display:block;margin-top:4px;font-size:12px;line-height:1.4;color:#806b53}.options-version{text-align:center;font-size:11px;color:#788167;margin:20px 0 0}.options-dialog button:focus-visible,.options-dialog a:focus-visible{outline:3px solid #668740;outline-offset:3px}@media(max-width:350px){.options-content{padding:14px}.options-dialog .option-toggle{gap:7px;padding:10px}.option-toggle strong{font-size:14px}.option-icon{width:28px}}

.privacy-dialog{padding:0;width:min(660px,calc(100vw - 24px));height:88dvh;max-height:88dvh;border:3px solid #667653;border-radius:22px;background:#f8efd5;overflow:hidden;box-shadow:0 6px #34482f66}.privacy-dialog[open]{display:flex;flex-direction:column}.privacy-dialog .sheet-heading{flex:none;gap:14px;padding:14px 18px}.privacy-dialog .sheet-heading h1{font-size:21px}.privacy-back{border:2px solid #94a775;background:#dce5bc;border-radius:10px;min-height:44px;padding:8px 12px;font:inherit;font-weight:900;color:#435b39}.privacy-dialog iframe{display:block;width:100%;flex:1;min-height:0;border:0;background:#f8efd5}.privacy-back:focus-visible{outline:3px solid #668740;outline-offset:3px}

/* Recruitment keeps the character and primary action ahead of supporting copy. */
.recruitment-sheet{max-height:85dvh}.recruitment-sheet .sheet-heading{flex:none}.recruitment-sheet .sheet-heading h1{font-size:25px}.recruitment-body{min-height:0;padding:16px 18px 20px}.recruitment-details{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:0 0 16px}.recruitment-details span{color:#435b39;font-size:16px;line-height:1.5;font-weight:700;text-align:center}.recruitment-list{display:grid;gap:10px}.recruitment-player{gap:8px;padding:10px;border:2px solid #bbc79e;border-radius:16px;background:#fff4d8;box-shadow:0 2px #ccd3b7}.recruitment-player canvas{width:76px;height:76px;flex:none;background:#e1e7c9;border-radius:12px}.recruitment-inspect{gap:10px}.recruitment-inspect strong{font-size:16px;color:#435b39}.recruitment-player small{font-size:12px;color:#68734f}.recruitment-player>.game-button{padding:10px 14px;font-size:14px;flex:none}.recruitment-body>.leaderboard-back{margin-bottom:12px;min-height:44px}.recruitment-character .character-stats{margin:12px 0;gap:6px}.recruitment-character .character-stats span{font-size:11px}.recruitment-character .character-stats b{font-size:19px}.recruitment-body>.primary-action{min-height:52px;margin-top:4px;font-size:18px}.recruitment-sheet button:focus-visible{outline:3px solid #668740;outline-offset:3px}@media(max-width:370px){.recruitment-body{padding:12px}.recruitment-player canvas{width:60px;height:60px}.recruitment-player>.game-button{padding:9px 10px}.recruitment-inspect strong{font-size:14px}}

/* Pause menu: a forest-green logo panel and a compact parchment action tray. */
#pause-dialog{box-sizing:border-box;width:min(380px,calc(100vw - 32px));padding:0;border:3px solid #65744b;border-radius:26px;background:#f3ead1;color:#435b39;box-shadow:0 7px 0 #263e30,0 20px 65px #102b3655;max-height:90dvh;overflow:auto}#pause-dialog::backdrop{background:#193b3a99;backdrop-filter:blur(4px)}#pause-dialog .pause-hero{padding:24px 24px 20px;background:radial-gradient(ellipse at 50% 25%,#617449,#354e3c 85%);border-bottom:3px solid #b5a271;border-radius:22px 22px 0 0}#pause-dialog .pause-logo{width:240px;max-width:100%;height:auto;max-height:24dvh;object-fit:contain;margin:0 auto 12px}#pause-dialog .pause-state{display:inline-flex;align-items:center;gap:8px;color:#f2e9ca;font-size:13px;font-weight:900;letter-spacing:1px}.pause-state svg{width:14px;height:14px;stroke:currentColor;stroke-width:5;stroke-linecap:round}#pause-dialog .pause-actions{padding:22px}#pause-dialog #resume{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:10px;font-size:18px;text-transform:none;min-height:48px;padding:10px 16px;border-radius:12px}#pause-dialog #resume svg{width:24px;height:24px;fill:currentColor;flex:none}.pause-secondary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.pause-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:96px;padding:14px 8px;border:2px solid #bac59b;border-radius:15px;background:#fff4d8;color:#526841;box-shadow:0 3px #c5ccad;font:inherit;font-size:14px;font-weight:900;cursor:pointer}.pause-tile svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.pause-tile .pause-slider{stroke-width:6;stroke:#947745}.pause-tile:active{transform:translateY(2px);box-shadow:0 1px #c5ccad}#pause-dialog button:focus-visible{outline:3px solid #ad863d;outline-offset:4px}#pause-dialog>.help-button{display:block;margin:0 auto 16px;font-size:12px;min-height:44px}@media(max-height:600px){#pause-dialog .pause-hero{padding:12px 20px}#pause-dialog .pause-logo{max-height:20dvh;margin-bottom:6px}#pause-dialog .pause-actions{padding:16px}.pause-tile{min-height:76px;padding:10px}.pause-secondary{margin-top:12px}}

.hud .island-counter strong{white-space:normal;line-height:1.15;text-wrap:balance}

/* Helping rewards are centered celebrations rather than bottom sheets. */
.help-reward-dialog{inset:0;margin:auto;box-sizing:border-box;width:min(360px,calc(100vw - 32px));height:fit-content;max-width:none;max-height:88dvh;border:3px solid #66764e;border-radius:24px;background:#f3ead1;box-shadow:0 7px #263e3066,0 18px 60px #102b3655;overflow-y:auto}.help-reward-dialog[open]{animation:help-reward-enter .22s ease-out}.help-reward-dialog .sheet-heading{padding:18px 16px;background:#254535;border-bottom:2px solid #a18b56;gap:8px}.help-reward-dialog .sheet-heading h1{font-size:22px;color:#fff1cb}.help-reward-dialog .close-button{flex:none}.help-reward-dialog .recruitment-body{padding:16px 24px 24px;text-align:center;overflow:visible}.help-reward-art{width:160px;height:120px;margin:0 auto;background:radial-gradient(ellipse,#e4dba2,transparent 70%)}.help-reward-art svg{width:100%;height:100%}.help-reward-dialog .help-reward-caption{font-size:16px;font-weight:800;color:#526740;margin:4px 0 12px}.help-reward-dialog .recruitment-reward{font-size:40px;color:#88631e;line-height:1.15;font-variant-numeric:tabular-nums}.help-reward-dialog .recruitment-reward span{font-size:21px}.help-reward-dialog .help-reward-count{font-size:14px;color:#667450;margin:10px 0 22px}.help-reward-dialog [data-reward-continue]{display:block;width:100%;min-height:48px;font-size:18px;margin:0}@keyframes help-reward-enter{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}

.hud .island-counter span{display:block;margin-top:4px;font-size:12px;line-height:1.2;letter-spacing:0;text-transform:none;font-weight:700}

/* Keep the recruitment header fixed while its list and gear view scroll. */
.recruitment-sheet:not(.help-reward-dialog)[open]{display:flex;flex-direction:column}
.recruitment-sheet:not(.help-reward-dialog)>.recruitment-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding-bottom:calc(20px + env(safe-area-inset-bottom))}

/* Pocket chest: compact parchment panel with a soft green header. */
.character-screen.chest-experience[open]{inset:0;margin:auto;width:min(460px,calc(100% - 24px));height:min(700px,94dvh);max-height:94dvh;border:2px solid #79845b;border-radius:20px;background:#fff3d4;box-shadow:0 8px 0 #142a3155}
.chest-experience .sheet-heading{background:#dce5b6;color:#3c5636;border-bottom:2px solid #bcc894;padding:14px 18px;flex:none}
.chest-experience .sheet-heading h1{color:#3c5636;font-size:23px}
.chest-experience .treasure-room{padding:16px 18px calc(32px + env(safe-area-inset-bottom,0px));background:#fff3d4;color:#425436;gap:10px;overscroll-behavior:contain;touch-action:pan-y}
.chest-type-tabs{display:flex;gap:8px;width:100%;flex:none}.chest-type-tabs button{flex:1;border:1px solid #acb888;border-radius:10px;padding:10px 3px;min-height:44px;background:#e1dfc0;color:#4c603a;font-size:13px;font-weight:900}.chest-type-tabs button[aria-pressed=true]{background:#456643;color:#fff1cb;border-color:#456643}.chest-type-tabs button:disabled{opacity:.45}.chest-type-tabs button:focus-visible{outline:3px solid #668740;outline-offset:2px}
.chest-experience .treasure-room .treasure-scene{flex:1 0 140px;min-height:140px;max-height:185px;margin:0;background:#e9e7c8;border-radius:16px;overflow:hidden}
.chest-experience .treasure-chest{width:165px;height:150px}.chest-experience .treasure-open-art{width:175px}.chest-experience .treasure-prize{width:145px;height:145px}
.chest-experience .treasure-rays,.chest-experience .treasure-plinth{display:none}.chest-experience .treasure-aura{width:190px;height:190px;opacity:.14}.chest-experience .opening .treasure-aura{opacity:.3}
.chest-experience .treasure-caption h2{font-size:22px;color:#425436;margin:4px 0 6px}.chest-experience .treasure-caption>p{color:#6c7757;margin:5px 0}.chest-experience .treasure-rarity{border:0;padding:0;margin:0 0 5px;color:#4d6b3e;font-size:11px}
.chest-experience .treasure-bonuses{margin:10px 0;gap:8px}.chest-experience .treasure-bonuses span{background:#dde4bb;border:0;color:#425436;font-size:14px;padding:11px 6px}.chest-experience .treasure-caption .treasure-saved{color:#6c7757;font-size:12px}
.chest-experience .treasure-controls{margin:0!important;padding:0;max-width:none;order:3;gap:4px}.chest-experience .treasure-primary{min-height:46px!important;border:2px solid #56763e!important;border-radius:12px!important;background:#98b66a!important;color:#263e25!important;box-shadow:0 4px #4c6638;text-shadow:none;font-size:18px!important}.chest-experience .treasure-remaining{color:#6c7757;font-size:12px}.chest-experience .chest-drop-rates{order:4;margin:0;width:100%;padding:7px 0 0;background:none;border:0;color:#667052}.chest-experience .chest-drop-rates>strong{display:none}.chest-experience .chest-rate-list{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 10px}.chest-experience .chest-rate{font-size:10px;color:#667052;gap:4px}.chest-experience .save-note{color:#975536}

/* Shared gear bonus cards across profiles, item details and rewards. */
.recruitment-character .character-attributes{border-radius:14px;margin-top:10px}
.recruitment-party{position:relative;display:block;width:76px;height:76px;flex:none;overflow:hidden;border-radius:12px;background:#e1e7c9}
.recruitment-party>canvas{display:block;width:100%;height:100%;background:transparent}
.recruitment-party:has(.recruitment-party-pets)>canvas{position:absolute;left:0;top:0;width:80%;height:80%}
.recruitment-party-pets{position:absolute;inset:0;pointer-events:none}
.recruitment-party .recruitment-party-pet{position:absolute;right:0;bottom:0;display:grid;place-items:center;width:59%;height:59%;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.recruitment-party .recruitment-party-pet :is(img,svg){display:block;width:100%;height:100%!important;max-width:100%;object-fit:contain}
.recruitment-party:has([data-pet-count="2"])>canvas{left:12%;width:70%;height:70%}
.recruitment-party [data-pet-count="2"] .recruitment-party-pet{width:50%;height:50%}
.recruitment-party [data-pet-count="2"] .recruitment-party-pet:first-child{left:0;right:auto}
.recruitment-inspect>.recruitment-identity{flex:1}
@media(max-width:370px){.recruitment-party{width:60px;height:60px}.recruitment-inspect{gap:6px}}
/* Five bonuses share the same character row without squeezing item detail cards. */
.character-layout .character-attributes:has(>.attribute-card:nth-child(5)){grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:6px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(5)) .attribute-card{padding:6px 2px;gap:2px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(5)) .attribute-card>svg,.character-layout .character-attributes:has(>.attribute-card:nth-child(5)) .attribute-card>canvas{width:18px;height:18px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(5)) .attribute-card b{font-size:15px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(5)) .attribute-card small{font-size:9px;white-space:normal;line-height:1.15;min-height:21px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(6)){grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;padding:5px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(6)) .attribute-card{padding:5px 1px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(6)) .attribute-card b{font-size:13px}
.character-layout .character-attributes:has(>.attribute-card:nth-child(6)) .attribute-card small{font-size:8px}
.item-detail-dialog .character-attributes,.loot-overlay .character-attributes,.chest-experience .character-attributes{width:100%;border-radius:14px;margin:12px 0;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px;gap:8px}
.item-detail-dialog .attribute-card,.loot-overlay .attribute-card,.chest-experience .attribute-card{display:flex;flex-direction:row;text-align:center;gap:8px;padding:10px 7px;justify-content:center}
.item-detail-dialog .attribute-card b,.loot-overlay .attribute-card b,.chest-experience .attribute-card b{font-size:20px}.item-detail-dialog .attribute-card small,.loot-overlay .attribute-card small,.chest-experience .attribute-card small{font-size:11px;white-space:normal}
.item-detail-dialog .attribute-card>svg,.loot-overlay .attribute-card>svg,.chest-experience .attribute-card>svg,.item-detail-dialog .attribute-card>canvas,.loot-overlay .attribute-card>canvas,.chest-experience .attribute-card>canvas{width:25px;height:25px}

/* Reward bonuses stay on one compact row, even for multi-stat gear. */
.chest-experience .character-attributes,.loot-overlay .character-attributes{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:5px;padding:7px}
.chest-experience .attribute-card,.loot-overlay .attribute-card{flex-direction:column;gap:3px;padding:7px 2px;text-align:center;justify-content:center}
.chest-experience .attribute-card b,.loot-overlay .attribute-card b{font-size:18px}
.chest-experience .attribute-card small,.loot-overlay .attribute-card small{font-size:11px;line-height:1.2;margin-top:3px}
.chest-experience .attribute-card>svg,.chest-experience .attribute-card>canvas,.loot-overlay .attribute-card>svg,.loot-overlay .attribute-card>canvas{width:20px;height:20px}

/* Optional rewarded boost: same footprint as equipment, left of upgrades. */
.action-bar .ad-boost-open{position:relative;flex-shrink:0}.ad-boost-open svg{width:36px;height:36px}.boost-countdown{position:absolute;top:-10px;left:50%;transform:translateX(-50%);background:#365e40;color:#fff0cc;border:2px solid #b9c980;border-radius:12px;padding:1px 6px;font-size:11px;font-weight:900;white-space:nowrap}.ad-boost-open.boost-active{background:#d4e3a0}.ad-boost-dialog{padding:0;width:min(92vw,400px);max-height:88dvh;overflow:auto;border:3px solid #697b50;border-radius:24px;background:#fff4d6;color:#435c3a}.ad-boost-dialog::backdrop{background:#17382dbb}.boost-body{padding:20px;text-align:center}.boost-body>svg{width:64px;height:64px;color:#917139}.boost-body h2{font-size:21px;margin:8px 0 18px}.boost-benefits{display:grid;grid-template-columns:1fr 1fr;gap:8px}.boost-benefits>div{padding:12px 5px;background:#e0e7bd;border:1px solid #bac99d;border-radius:12px}.boost-benefits b,.boost-benefits span{display:block}.boost-benefits b{font-size:26px}.boost-benefits span{font-size:13px;font-weight:800}.boost-body p{font-size:14px;line-height:1.5}.boost-status{min-height:22px}.boost-body .primary-action{width:100%;min-height:48px}.boost-body [data-ad-privacy]{margin-top:12px}.boost-body button:disabled{opacity:.6}@media(max-width:380px){.bottom-hud .action-bar .primary-action{padding-inline:5px;font-size:14px}.bottom-hud .action-bar .primary-action .upgrade-symbol{width:22px}}

/* Active ad reward shares the recruit status treatment and stacks below it. */
.ad-boost-status>svg{width:54px;height:54px}.game-shell:has(.recruitment-status:not(.ad-boost-status):not([hidden]),.recruitment-side-tab:not([hidden])) .ad-boost-status{top:calc(var(--side-tabs-top) + 79px)}

.ad-boost-dialog [hidden]{display:none!important}

.boost-benefits .boost-benefit-label{display:flex;align-items:center;justify-content:center;gap:5px;min-height:28px}.boost-speed-icon,.boost-speed-icon>svg,.boost-speed-icon>img{display:block;width:28px;height:28px;flex:none}

/* Painted sprout with a warm halo and small gold sparks for the farm boost. */
.empowered-sprout{display:inline-block;position:relative;width:40px;height:40px;flex:none;background:radial-gradient(ellipse,#f8dc86a6 10%,#c4da8580 40%,transparent 72%)}
.empowered-sprout>canvas{position:absolute;inset:8%;width:84%;height:84%;filter:drop-shadow(0 1px 1px #54713c55)}
.empowered-sprout>svg{position:absolute;inset:0;width:100%;height:100%}
.ad-boost-status>.empowered-sprout{width:54px;height:54px}
.boost-body>.empowered-sprout{width:72px;height:72px}
.boost-benefits .boost-stat-icon,.boost-stat-icon>svg,.boost-stat-icon>canvas{display:block;width:28px;height:28px;flex:none}

/* Match left-side recruitment/boost tabs to the 62 x 67 right-side tabs. */
.chest-side-tab,.recruitment-status{box-sizing:border-box;width:62px;height:67px;min-width:62px;min-height:67px}
.recruitment-side-tab,.recruitment-status{padding:3px 0;justify-content:center;gap:0}
.recruitment-side-tab>canvas,.recruitment-status>canvas,.ad-boost-status>.empowered-sprout{width:38px;height:38px;flex-shrink:0}
.recruitment-tab-label,.recruitment-timer{line-height:17px}

.boost-status:empty{display:none}

/* Small ad label overlaps the sprout without covering its leaves or timer. */
.boost-ad-badge{position:absolute;right:4px;top:4px;z-index:1;display:grid;place-items:center;min-width:22px;height:16px;padding:0 3px;border:1.5px solid #6e7549;border-radius:5px;background:#fff1c7;color:#435c3a;box-shadow:0 1px 1px #51462b40;font-size:9px;font-weight:900;line-height:1;letter-spacing:.4px;pointer-events:none}
.ad-boost-open .boost-ad-badge{top:8px;right:3px}

.character-portrait-button.game-button{padding:0!important}
.character-portrait-button .character-button-portrait{display:block;width:56px;height:56px;flex:none}
.game-shell .bottom-hud .action-bar{height:68px;align-items:stretch}

/* Keep the clapperboard independent of the footer's generic icon sizing. */
.ad-boost-open .boost-ad-badge,.ad-boost-status .boost-ad-badge{width:22px;min-width:0;height:22px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;line-height:1}
.ad-boost-open .boost-ad-badge>svg,.ad-boost-status .boost-ad-badge>svg{display:block;width:22px;height:22px;filter:drop-shadow(0 1px 1px #51462b40)}

.item-detail-rarity{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px}
.item-rarity-badge{display:inline-block;background:var(--rarity);color:#182b20;border:1px solid #243a3055;border-radius:20px;padding:4px 12px;font-size:12px;font-weight:900;letter-spacing:.5px;line-height:1.4}
.item-detail-type{font-size:13px}

/* Chest rewards use the inventory item frame and badge, without a background glow. */
.chest-experience .reward .treasure-scene{background:transparent;box-shadow:none}
.chest-experience .reward .treasure-prize.item-detail-art{width:110px;height:110px;margin:0;filter:none;border:3px solid var(--rarity);border-radius:20px;background:#fff7df;box-shadow:0 3px 0 #75634122}
.chest-experience .reward .treasure-prize.item-detail-art svg{width:92px;height:92px}

/* Extra room for revealed item details and Continue, scoped to chest rewards. */
.character-screen.chest-experience[open]:has(.treasure-room.reward){height:min(700px,94dvh);max-height:94dvh}

.farm-tutorial{position:fixed;z-index:15;max-width:min(280px,calc(100vw - 24px));padding:10px 13px;border:2px solid #8c9562;border-radius:14px;background:#fff1ce;color:#435b36;box-shadow:0 3px 0 #42543755;font:800 14px Nunito,sans-serif;text-align:center;pointer-events:none}
.farm-tutorial[hidden]{display:none}.farm-tutorial:after{content:"";position:absolute;bottom:-8px;left:calc(50% - 6px);width:12px;height:12px;background:#fff1ce;border-right:2px solid #8c9562;border-bottom:2px solid #8c9562;transform:rotate(45deg)}


.game-shell .hud.demo-hud{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr)}
.hud.demo-hud .island-counter{grid-column:2;grid-row:1;text-align:center}
.hud.demo-hud .coin-counter{grid-column:3;grid-row:1;justify-self:end}
.hud.demo-hud #pause{grid-column:1;grid-row:1;justify-self:start}
.right-side-tabs{position:absolute;right:0;top:var(--side-tabs-top);z-index:3;display:flex;flex-direction:column;align-items:flex-end;gap:12px;pointer-events:none}
.right-side-tabs>.chest-side-tab{position:relative;inset:auto;flex:none;order:3;pointer-events:auto}
.right-side-tabs>.leaderboard-side-tab{order:1}
.right-side-tabs>.daily-side-tab{order:2}
.right-side-tabs>.chest-side-tab[hidden]{display:none}
.guide-model{object-fit:contain;max-width:100%;max-height:100%;width:64px;height:64px!important;flex:none}.guide-plot>.guide-model{width:82px;height:82px!important}.guide-barn>.guide-model{width:110px;height:110px!important}.guide-ship{height:108px!important}.guide-ready-cue{width:64px;height:64px;display:flex;align-items:center;justify-content:center;border:5px solid white;border-radius:50%;background:white;flex:none}.guide-ready-cue canvas{width:52px;height:52px}
.game-shell>.crate-side-tab{top:auto;right:0;bottom:calc(var(--map-bottom,100px) + 12px)}
/* Reserve the streak's row so it cannot cover orders on shorter phones. */
.game-shell>.shipment-streak{top:calc(var(--map-top,74px) + 8px);font-size:clamp(9px,2.25vw,12.5px);gap:clamp(5px,1.5vw,10px)}
.game-shell>.shipment-streak .gold-coin{width:clamp(14px,3.8vw,20px);height:clamp(14px,3.8vw,20px);line-height:1;font-size:clamp(11px,2.9vw,16px)}
.game-shell>.shipment-streak{background:linear-gradient(#f4dfa1,#d5b86b);border:1.5px solid #6c6143;border-radius:6px;color:#2d4649;box-shadow:inset 0 1px 0 #ffffff75,0 2px 3px #132c354d}
.game-shell>.shipment-streak .streak-income{border-left:1px solid #6c614344;padding-left:7px;color:#2d4649}
.game-shell>.shipment-streak .gold-coin{background:linear-gradient(145deg,#ffe697,#cf9e42);border-color:#947239;color:#d6a94c;box-shadow:inset 0 0 0 2px #ffedaa,0 1px 1px #30484b44}
.milestone-icon img{width:40px;height:40px;object-fit:contain}
.player-stats-open{grid-column:1/-1}.player-stats-intro{text-align:center;color:#63764f;font-size:13px;margin:0 0 16px}.player-stats-list{display:flex;flex-direction:column;gap:7px;margin:0}.player-stats-list>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto);align-items:center;gap:12px;padding:9px 12px;border:2px solid #bdc99f;border-radius:14px;background:#fff5da}.player-stats-list dt{display:flex;align-items:center;gap:10px;min-width:0;font-size:13px;line-height:1.4;color:#435b39}.player-stat-icon{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:#ece3ba;box-shadow:inset 0 0 0 1px #d7c990;font-size:23px;line-height:1}.player-stats-list dd{font-size:20px;font-weight:1000;color:#435b39;margin:0;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.player-stats-note{font-size:11px;line-height:1.5;color:#788167;margin:16px 0 0}
.character-layout .inventory-section{container-type:inline-size}.character-layout .inventory-section>.inventory-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-flow:row;grid-auto-rows:calc((100cqw - 41px)/4 + 22px);height:calc(2 * ((100cqw - 41px)/4 + 22px) + 27px);min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;gap:7px;padding:8px;overscroll-behavior:contain;touch-action:pan-y}.character-layout .inventory-section>.inventory-grid>.inventory-item{width:100%;height:100%;min-height:0;aspect-ratio:auto;min-width:0}.chest-experience .chest-batch-cell>.inventory-item{aspect-ratio:1;width:100%;height:auto;min-height:0}
.chest-experience .chest-batch-cell{display:flex;flex-direction:column;align-items:center}.chest-experience .chest-batch-cell>.inventory-item{width:100%}.chest-experience .chest-batch-cell>small{width:100%;text-align:center;margin-inline:auto}
.character-layout .character-stage:not(.customizing) .farmer-preview{transform:translateY(-16px) scale(.9);transform-origin:center}
.rotatable-character{cursor:grab;touch-action:none;user-select:none}.rotatable-character.rotating{cursor:grabbing}
.rotatable-character:focus-visible{outline:2px solid #7c7955;outline-offset:-12px;border-radius:18px}
.character-layout .inventory-grid .inventory-item,.chest-batch-cell .inventory-item{padding:2px}
.character-layout .inventory-grid .inventory-item>img,.chest-batch-cell .inventory-item>img{width:100%;height:100%!important;max-height:none;object-fit:contain;min-height:0}
.chest-batch-animations{flex:1;min-height:0;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:8px}.chest-experience .chest-batch-animations .treasure-chest{width:100px;height:100px;flex:none}.chest-batch-animations .treasure-chest svg{width:100%;height:100%}
@media(prefers-reduced-motion:reduce){.chest-batch-opening *{animation:none!important}}
.chest-experience .chest-batch{display:flex;flex-direction:column;overflow:hidden;gap:12px}.chest-experience .chest-batch-summary{flex:none;margin:0}.chest-experience .chest-batch-grid{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;grid-auto-rows:max-content;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}.chest-experience .chest-batch>.treasure-controls{flex:none;padding:12px 0 0;border-top:1px solid #d5d7b3}.chest-experience .chest-batch>.treasure-controls p{margin:0 0 8px}
.chest-batch{flex:1;min-height:0;overflow-y:auto;padding:16px;overscroll-behavior:contain;color:#435c3a}.chest-batch-summary{text-align:center;font-weight:900;margin:0 0 14px}.chest-batch-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 8px;align-content:start}.chest-batch-cell{min-width:0;text-align:center}.chest-batch-cell .inventory-item{aspect-ratio:1;display:grid;place-items:center;padding:6px}.chest-batch-cell .inventory-item svg{width:100%;height:100%;max-height:64px}.chest-batch-cell small{display:block;font-size:11px;line-height:1.3;margin-top:5px;overflow-wrap:anywhere}.chest-batch .treasure-controls{margin-top:18px}.chest-batch .treasure-controls p{text-align:center;font-size:13px}@media(max-width:360px){.chest-batch-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.chest-experience .treasure-room{overflow:hidden;gap:8px;padding:12px 18px calc(22px + env(safe-area-inset-bottom,0px))}
.chest-experience .treasure-room .treasure-scene{flex:1 1 185px;min-height:0;max-height:240px;container-type:size}
.chest-experience .treasure-scene .treasure-chest{width:min(220px,100cqh);height:min(220px,100cqh)}
.chest-experience .treasure-open-art{height:100cqh;width:min(230px,100cqh);max-height:230px}
.chest-experience .treasure-chest>img,.chest-experience .treasure-chest>canvas{display:block;width:100%;height:100%!important;object-fit:contain}
.chest-experience .chest-reward-odds{font-size:12px;margin:4px 0;flex:none}
.chest-experience .treasure-controls{flex:none}
.crop-bubble{background:#f4dfad;border-color:#786241;border-radius:10px;box-shadow:0 3px 0 #574e3655,0 8px 16px #132c3533}
.crop-bubble:after{background:#f4dfad;border-color:#786241}
.crop-bubble button{background:linear-gradient(#246c70,#0b373e);border:1px solid #bda16b;border-radius:7px;box-shadow:inset 0 1px #ffffff22,0 2px 0 #173b3866}
.crop-bubble button[aria-pressed=true]{background:linear-gradient(#246c70,#0b373e);border:2px solid #ffe19a;box-shadow:0 0 0 2px #f4cc78,0 0 0 3px #715020,inset 0 0 0 1px #ffe8af66}
.crop-bubble button:hover,.crop-bubble button:focus-visible{background:linear-gradient(#2d797c,#124750);outline:2px solid #f4cc78;outline-offset:1px}
.crop-bubble canvas{filter:drop-shadow(0 2px 2px #082d39aa)}
@media(max-height:600px){.chest-experience .sheet-heading{padding:8px 14px}.chest-experience .treasure-room{gap:5px;padding:8px 14px 14px}.chest-experience .treasure-caption h2{font-size:19px;margin:2px 0}.chest-experience .treasure-caption .treasure-saved{margin:3px 0}.chest-experience .character-attributes{margin:5px 0;padding:4px}.chest-experience .attribute-card{padding:4px 2px}.chest-experience .treasure-room .treasure-scene{max-height:140px}.chest-experience .reward .treasure-scene{max-height:110px}}

/* Treasure vault: content-sized, with a jewel-toned stage and golden actions. */
.opening .treasure-chest[data-recorded-rattle]{animation:none!important;will-change:transform}
.character-screen.chest-experience[open]:has(.treasure-room){height:fit-content;min-height:0;max-height:94dvh;border-color:#b89a59;border-radius:24px;box-shadow:0 7px 0 #172f2c88,0 18px 60px #132f3955}
.chest-experience .sheet-heading{background:linear-gradient(135deg,#254d43,#19382f);border-bottom:2px solid #bb9c56;padding:13px 18px}
.chest-experience .sheet-heading h1{color:#fff2cd;font-size:24px;letter-spacing:.2px}
.chest-experience .sheet-heading .close-button{background:#507265;border-color:#93a58a;box-shadow:0 3px #143d34;color:#fff2d2}
.chest-experience .treasure-room{flex:1 1 auto;overflow-y:auto;padding:14px 16px calc(22px + env(safe-area-inset-bottom,0px));gap:8px;background:linear-gradient(#fff4d8,#f2e4bd)}
.chest-experience .chest-type-tabs button{border:2px solid #c5b68a;background:#f4ebcf;border-radius:13px;font-size:14px;min-height:46px;box-shadow:0 2px #c5b68a44}
.chest-experience .chest-type-tabs button[aria-pressed=true]{background:linear-gradient(#4b7658,#315541);border-color:#d0ad60;color:#fff4d5;box-shadow:inset 0 1px #ffffff33,0 3px #203f32}
.chest-experience .treasure-room .treasure-scene{flex:0 0 184px;height:184px;min-height:184px;max-height:184px;margin:2px 0 0;container-type:size;border:1px solid #759275;border-radius:20px;background:radial-gradient(ellipse at 50% 60%,#a3b56b66,transparent 58%),linear-gradient(145deg,#386b55,#214638);box-shadow:inset 0 1px #e0ddb35c,inset 0 -15px 35px #102b3033;overflow:hidden}
.chest-experience .treasure-scene::before,.chest-experience .treasure-scene::after{content:"";position:absolute;width:17px;height:25px;background:#fff0b6;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);filter:drop-shadow(0 0 5px #ffe4a5);pointer-events:none;z-index:1;opacity:.8}
.chest-experience .treasure-scene::before{left:22%;top:25%}.chest-experience .treasure-scene::after{right:20%;top:55%;width:11px;height:17px;opacity:.6}
.chest-experience .treasure-room[data-chest-kind=standard] .treasure-scene{background:radial-gradient(ellipse at 50% 60%,#e8c47a66,transparent 58%),linear-gradient(145deg,#80633c,#514631);border-color:#b39965}
.chest-experience .treasure-rays{display:block;width:290px;height:290px;background:repeating-conic-gradient(from 0deg,transparent 0deg 22deg,#fff0b62b 22deg 30deg);opacity:.8}
.chest-experience .treasure-scene .treasure-chest{width:200px;height:180px;filter:drop-shadow(0 7px 5px #102b2e66)}
.chest-experience .treasure-open-art{width:210px;height:180px;max-height:180px}
.chest-experience .pet-crate-room .treasure-open-art{width:min(180px,100cqh);height:min(180px,100cqh)}
.pet-crate-rewards{display:flex;gap:12px;align-items:center;justify-content:center;width:100%;height:100%}
.pet-crate-reward-egg{width:31.5%;max-width:84cqh;flex:none}
.pet-crate-reward-biscuits{width:36%;flex:none}
.chest-experience .treasure-caption h2{font-size:23px;margin:3px 0;color:#324c3a}
.chest-experience .chest-reward-odds{font-size:11px;color:#647253;margin:0;line-height:1.5}
.chest-experience .treasure-controls{gap:8px;order:3;margin:0!important}
.chest-experience .treasure-primary{background:linear-gradient(#f5d881,#ddb658)!important;border-color:#95743b!important;color:#35482d!important;box-shadow:0 4px #866b37,inset 0 2px #fff0b6;min-height:50px!important;font-size:18px!important;text-shadow:none}
.chest-experience .treasure-controls .inventory-mode{background:#ffffff44;color:#425a3f;border:1px solid #b4b68c;border-radius:11px;min-height:44px;font-size:14px}
.chest-experience .treasure-remaining{padding:0;font-size:11px;color:#697657}
.chest-experience .chest-drop-rates{order:4;padding-top:8px;border-top:1px solid #c7bc9633}
.chest-experience .chest-rate-list{gap:5px 9px}.chest-experience .chest-rate{font-size:10px}
.chest-experience .reward .treasure-scene{flex:0 0 150px;height:150px;min-height:150px;max-height:150px}
.chest-experience .reward .treasure-scene::before,.chest-experience .reward .treasure-scene::after{display:none}
.character-screen.chest-experience[open]:has(.treasure-room.reward){height:fit-content;min-height:0;max-height:94dvh}
.character-screen.chest-experience[open]:has(.chest-batch){height:fit-content;max-height:94dvh}
.chest-experience .chest-batch-grid{max-height:calc(94dvh - 190px)}
/* Reserve the rarity rim and label row; artwork must not force equipped cards taller. */
.character-layout .character-stage{container-type:inline-size}
.character-layout .equipment-slot{grid-template-rows:minmax(0,1fr) 13px;align-content:stretch;align-items:center;min-width:0;min-height:0}
.character-layout .equipment-slot :is(img,svg){width:100%;height:100%;max-width:48px;max-height:48px;min-width:0;min-height:0;object-fit:contain}
.character-layout .equipment-slot small{white-space:nowrap}
/* Add a solid inner rarity ring without resizing tiles or shrinking their models. */
.inventory-item:not(.empty-slot):not(.inventory-biscuits){box-shadow:inset 0 0 0 2px var(--rarity),0 2px 0 #173b3833}
.character-screen .equipment-slot:not(.empty-pet-slot){border-width:3px;box-shadow:0 2px 0 #173b3833;overflow:hidden}
.item-detail-art,.chest-experience .reward .treasure-prize.item-detail-art{box-shadow:inset 0 0 0 2px var(--rarity),0 3px 0 #75634122}
.loot-item{box-shadow:inset 0 0 0 2px var(--rarity),0 0 45px var(--rarity)}
.leaderboard-gear-card,.recruitment-party-pet{box-shadow:inset 0 0 0 3px var(--rarity)}
/* Taller inventory cards make rarity, copy level and a real upgrade tap target readable. */
.character-layout .inventory-grid>.gear-inventory-card,.upgrade-material-grid>.gear-inventory-card{display:block;padding:0;overflow:hidden;background:#fffef8}
.inventory-art-button{position:relative;display:grid;grid-template-rows:minmax(0,1fr) 22px;width:100%;height:100%;min-width:0;min-height:0;padding:0;border:0;background:transparent;color:inherit}
.inventory-model{position:relative;display:grid;place-items:center;min-width:0;min-height:0;padding:4px;background:#fffef8}
.item-slot-label{position:absolute;inset:auto 0 0;display:block;height:14px;line-height:14px;font-size:10px;font-weight:900;text-align:center;color:#514d39;white-space:nowrap;pointer-events:none}
.inventory-model:has(>.item-slot-label){padding-bottom:16px}
.inventory-model:has(>.item-slot-label) .slot-new{bottom:14px}
.item-detail-art:has(>.item-slot-label),.loot-item:has(>.item-slot-label),.chest-batch-cell>.inventory-item:has(>.item-slot-label){position:relative;padding-bottom:18px}
.item-detail-art:has(>.item-slot-label)>:is(img,svg),.loot-item:has(>.item-slot-label)>:is(img,svg),.chest-batch-cell>.inventory-item:has(>.item-slot-label)>:is(img,svg){width:100%;height:100%!important;max-width:100%;max-height:100%;min-height:0;object-fit:contain}
.gear-inventory-card .inventory-art-button :is(img,svg){width:100%;height:100%!important;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain}
.inventory-rarity-name{display:grid;place-items:center;text-align:center;font-size:clamp(8px,2.5vw,10px);line-height:22px;font-weight:900;background:var(--rarity);color:#fff;white-space:nowrap;text-shadow:0 1px 2px #163c3c66}
.inventory-item-level{position:absolute;left:0;top:0;background:var(--rarity);border-radius:8px 0 6px 0;padding:1px 5px;font-size:12px;font-weight:900;line-height:17px;color:#fff;text-shadow:0 1px 2px #163c3c66}
.inventory-model :is(.slot-equipped,.slot-check){left:auto;top:0;bottom:auto;right:0;width:20px;min-width:20px;height:20px;padding:2px;line-height:16px;pointer-events:none}
.gear-inventory-card .slot-new{right:0;left:auto;top:auto;bottom:0;font-size:8px;padding:1px 2px}
.character-layout .equipment-slot{position:relative}
.equipped-item-level{position:absolute;left:0;top:0;background:var(--rarity);border-radius:8px 0 6px 0;padding:1px 5px;font-size:12px;font-weight:900;line-height:17px;color:#fff;text-shadow:0 1px 2px #163c3c66;pointer-events:none}
.item-detail-art.gear-detail-card{position:relative;display:grid;grid-template-rows:minmax(0,1fr) 22px;align-items:stretch;justify-items:stretch;width:110px;height:132px;padding:0;overflow:hidden;background:#fffef8}
.gear-inventory-card,.pet-inventory-card,.item-detail-art.gear-detail-card{border-radius:10px;box-shadow:inset 0 0 0 2px var(--rarity),0 2px 0 #173b3833}
.upgrade-material-grid>.pet-inventory-card{display:grid;grid-template-rows:minmax(0,1fr) 22px;align-items:stretch;justify-items:stretch;padding:0;overflow:hidden;background:#fffef8;aspect-ratio:auto}
.gear-detail-card .inventory-model :is(img,svg){width:100%;height:100%!important;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain}
.gear-upgrade-dialog .upgrade-target .gear-detail-card{height:94px;padding:0}
.gear-upgrade-dialog .upgrade-stat-heading{font-size:12px;font-weight:900;margin:8px 0 5px;color:#435a43}
.upgrade-xp-track{display:flex;width:100%;height:24px;overflow:hidden;border:2px solid #6c8055;border-radius:9px;background:#dce2c9;box-shadow:inset 0 2px 3px #38492933,0 2px 0 #38492922}
.upgrade-xp-track :is(.upgrade-xp-earned,.upgrade-xp-selected){display:block;height:100%;flex:none}
.upgrade-xp-earned,.xp-earned-key{background:#7a9b4e}
.upgrade-xp-selected,.xp-selected-key{background:#579bd4}
.upgrade-xp-track :is(.upgrade-xp-earned,.upgrade-xp-selected){box-shadow:inset 0 3px 0 #ffffff44,inset 0 -3px 0 #183c3c22}
.upgrade-xp-legend{display:flex;gap:12px;margin:4px 0;color:#526445}
.upgrade-xp-legend span{display:inline-flex;align-items:center;gap:4px;font-size:10px}
.upgrade-xp-legend i{display:inline-block;width:8px;height:8px;border-radius:2px}
.gear-upgrade-dialog .upgrade-stat-preview{display:block}
.gear-upgrade-dialog .upgrade-stat-preview>.character-attributes{grid-template-columns:repeat(2,minmax(0,1fr));border-radius:14px;padding:8px;gap:6px;background:#d2ddba}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card{flex-direction:column;justify-content:center;text-align:center;gap:4px;padding:8px 4px}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card :is(svg,canvas){width:24px;height:24px}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card b{font-size:16px;line-height:1.25}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card small{font-size:11px;margin-top:2px}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card .stat-upgrade-value{color:#27813b;font-weight:1000}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card .stat-upgrade-arrow{color:#65765c}
@media(max-height:740px){.gear-upgrade-dialog .upgrade-stat-preview .attribute-card{padding:5px 3px;gap:2px}.gear-upgrade-dialog .upgrade-stat-preview .attribute-card b{font-size:14px}}
@media(max-height:740px){.gear-upgrade-dialog .upgrade-target .gear-detail-card{height:78px}}
.inventory-art-button:disabled{opacity:.4}.item-detail-level{text-align:center;font-size:14px;font-weight:900;margin:4px 0 12px;color:#435a43}
.item-detail-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.item-detail-actions .purchase{min-height:48px;margin:0;font-size:15px}.item-detail-actions .item-detail-upgrade{background:linear-gradient(#f3d486,#ddb65c);border-color:#a28140;color:#3e513c}.item-detail-upgrade:disabled{opacity:.55}
.character-layout .inventory-grid>button.inventory-item:has(.inventory-rarity-name){grid-template-rows:minmax(0,1fr) 22px;align-content:stretch;padding:0;background:#fffef8;overflow:hidden}
.character-layout .inventory-grid>button.inventory-item:has(.inventory-rarity-name)>img{min-height:0;max-height:100%;height:100%!important}
.character-layout .inventory-grid>.pet-inventory-card{display:grid;grid-template-rows:minmax(0,1fr) 22px;align-items:stretch;justify-items:stretch;padding:0;overflow:hidden;background:#fffef8}
.pet-inventory-card .inventory-model :is(img,svg){width:100%;height:100%!important;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain}
.pet-inventory-card .inventory-rarity-name{width:100%;min-width:0}
.inventory-biscuit-count{display:grid;place-items:center;background:#e8d3a4;color:#59482f;font-size:10px;font-weight:900;line-height:22px;white-space:nowrap}
.gear-upgrade-dialog{width:min(600px,94vw);max-height:92dvh;padding:0;border:2px solid #8b9c72;border-radius:20px;background:#fff3d4;color:#40533d;box-shadow:0 6px #284c4780;overflow:hidden}
.gear-upgrade-dialog[open]{display:flex;flex-direction:column}.gear-upgrade-dialog::backdrop{background:#163734aa;backdrop-filter:blur(3px)}
.gear-upgrade-dialog .sheet-heading{flex:none}.gear-upgrade-dialog h2{margin:0;font-size:21px}.upgrade-body{padding:12px 14px;overflow-y:auto;min-height:0}.upgrade-target{display:flex;align-items:center;gap:12px}.upgrade-target .item-detail-art{width:72px;height:72px;flex:none;margin:0;padding:4px}.upgrade-target .item-detail-art :is(img,svg){width:100%;height:100%;object-fit:contain}.upgrade-target h3{font-size:17px;margin:0 0 7px}.upgrade-level{margin:6px 0 0;font-size:16px;font-weight:900}
.upgrade-xp{margin:12px 0}.upgrade-xp progress{display:block;width:100%;height:14px;accent-color:#7a9b4e}.upgrade-xp span{font-size:11px}.upgrade-stat-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.upgrade-stat-preview>div{padding:6px 9px;border-radius:8px;background:#e4e8c8}.upgrade-stat-preview small,.upgrade-stat-preview b{display:block}.upgrade-stat-preview small{font-size:11px}.upgrade-stat-preview b{font-size:14px}.upgrade-stat-preview b span{color:#356d42}
.upgrade-material-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:12px}.upgrade-material-heading h3{margin:0;font-size:15px}.upgrade-material-heading .inventory-mode{padding:4px 8px;font-size:11px}.upgrade-help{font-size:11px;line-height:1.4;margin:6px 0 10px}.upgrade-material-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:110px;gap:7px;max-height:255px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:4px;background:#cbd5b5;border-radius:12px}.upgrade-material-grid>.gear-inventory-card{grid-template-rows:minmax(0,1fr) 16px 16px;aspect-ratio:auto}.upgrade-material-grid .inventory-material-xp{text-align:center;font-size:11px;font-weight:900;color:#466045}.upgrade-material-grid>.selected{outline:3px solid #426b43;outline-offset:-1px;background:#f9eab6}.upgrade-material-grid>.gear-inventory-card:has(button:disabled){opacity:.4}
.upgrade-material-empty{margin-top:14px;padding:16px 18px;background:#e2e7ca;border:1px solid #a9b88d;border-radius:12px;text-align:center}.upgrade-material-empty svg{display:block;width:44px;height:44px;margin:0 auto 7px}.upgrade-material-empty h3{font-size:17px;line-height:1.3;margin:0 0 8px;color:#36523a}.upgrade-material-empty p{font-size:13px;line-height:1.45;margin:6px 0;overflow-wrap:normal}.upgrade-material-empty .upgrade-empty-next{font-weight:800;color:#466045}
.upgrade-footer{padding:10px 14px 16px;flex:none;border-top:1px solid #c6caa0;background:#f2e7be}.upgrade-footer p{font-size:11px;line-height:1.4;margin:0 0 8px}.upgrade-footer .purchase{width:100%;min-height:48px;font-size:15px}
.upgrade-material-grid .inventory-model{padding-bottom:18px}.upgrade-material-grid .inventory-material-xp{position:absolute;bottom:0;left:0;right:0;background:#fffef8;line-height:18px}
@media(max-height:740px){.gear-upgrade-dialog .sheet-heading{padding:8px 12px}.gear-upgrade-dialog h2{font-size:18px}.upgrade-body{padding:8px 10px}.upgrade-target{gap:9px}.upgrade-target .item-detail-art{width:56px;height:56px}.upgrade-target h3{font-size:14px;margin-bottom:4px}.upgrade-target .item-rarity-badge{font-size:10px;padding:3px 9px}.upgrade-level{font-size:14px;margin-top:4px}.upgrade-xp{margin:8px 0}.upgrade-stat-preview{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.upgrade-stat-preview>div{padding:5px}.upgrade-stat-preview small{font-size:10px}.upgrade-stat-preview b{font-size:11px}.upgrade-material-heading{margin-top:7px}.upgrade-material-heading h3{font-size:13px}.upgrade-help{font-size:10px;margin:4px 0 6px}.upgrade-material-grid{max-height:180px;min-height:120px;grid-auto-rows:96px}.upgrade-footer{padding:8px 10px 10px}.upgrade-footer p{font-size:10px;margin-bottom:6px}.upgrade-footer .purchase{min-height:44px;font-size:13px}}
@media(max-height:650px){.chest-experience .treasure-room{gap:5px;padding:10px 14px calc(18px + env(safe-area-inset-bottom,0px))}.chest-experience .treasure-room .treasure-scene{flex-basis:128px;height:128px;min-height:128px;max-height:128px}.chest-experience .treasure-scene .treasure-chest{width:150px;height:126px}.chest-experience .treasure-open-art{width:155px;height:126px}.chest-experience .treasure-caption h2{font-size:20px}.chest-experience .chest-type-tabs button{min-height:44px;padding:7px 3px}.chest-experience .reward .treasure-scene{flex-basis:110px;height:110px;min-height:110px;max-height:110px}}
.gear-upgrade-dialog .upgrade-body{flex:1 1 auto;overflow-y:scroll;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#87976b #ede5ca;overscroll-behavior:contain;touch-action:pan-y;padding-bottom:18px}
.gear-upgrade-dialog .upgrade-body::-webkit-scrollbar{width:7px}
.gear-upgrade-dialog .upgrade-body::-webkit-scrollbar-thumb{background:#87976b;border-radius:8px;border:1px solid #ede5ca}
.gear-upgrade-dialog .upgrade-body::-webkit-scrollbar-track{background:#ede5ca;border-radius:8px}
.gear-upgrade-dialog .upgrade-target .gear-detail-card{width:72px;height:86px;flex:none}
.gear-upgrade-dialog .upgrade-target h3{font-size:16px}
.gear-upgrade-dialog .upgrade-stat-preview>.character-attributes:has(>.attribute-card:nth-child(3)){grid-template-columns:repeat(3,minmax(0,1fr))}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card{padding:6px 3px;gap:3px}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card :is(svg,canvas){width:20px;height:20px}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card b{font-size:13px;line-height:1.4}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card small{font-size:10px}
.gear-upgrade-dialog .upgrade-material-grid{grid-auto-rows:94px;gap:6px;max-height:none;min-height:0;overflow:visible;padding:6px}
.gear-upgrade-dialog .upgrade-material-grid .inventory-art-button{grid-template-rows:minmax(0,1fr) 18px}
.gear-upgrade-dialog .upgrade-material-grid .inventory-rarity-name{font-size:9px;line-height:18px}
.gear-upgrade-dialog .upgrade-scroll-hint{margin:4px 0 7px;font-size:11px;font-weight:900;color:#526c43}
.gear-upgrade-dialog .upgrade-footer{position:relative;z-index:1;box-shadow:0 -3px 6px #66533412}
@media(max-height:740px){.gear-upgrade-dialog .upgrade-target .gear-detail-card{width:58px;height:70px}.gear-upgrade-dialog .upgrade-material-grid{grid-auto-rows:86px}.gear-upgrade-dialog .upgrade-stat-preview .attribute-card b{font-size:12px}}
.gear-upgrade-dialog .upgrade-stat-preview>.character-attributes,.gear-upgrade-dialog .upgrade-stat-preview>.character-attributes:has(>.attribute-card:nth-child(3)){display:flex;flex-direction:column;padding:5px 9px;gap:0}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card{display:grid;grid-template-columns:20px minmax(0,1fr);gap:8px;padding:5px 0;min-height:28px;background:transparent;border:0;border-radius:0;box-shadow:none;text-align:left}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card+.attribute-card{border-top:1px solid #b6c6a1}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card>div{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;width:100%}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card small{order:-1;font-size:12px;margin:0;color:#435a43}
.gear-upgrade-dialog .upgrade-stat-preview .attribute-card b{font-size:13px;white-space:nowrap;line-height:1.25}
@media(max-height:740px){.gear-upgrade-dialog .upgrade-target .gear-detail-card{width:46px;height:54px}.gear-upgrade-dialog .upgrade-target .item-rarity-badge,.gear-upgrade-dialog .upgrade-target .upgrade-level{display:none}.gear-upgrade-dialog .upgrade-stat-preview .attribute-card{min-height:24px;padding:3px 0}.gear-upgrade-dialog .upgrade-stat-preview .attribute-card :is(svg,canvas){width:18px;height:18px}.gear-upgrade-dialog .upgrade-material-grid{grid-auto-rows:76px}.gear-upgrade-dialog .upgrade-xp-track{height:18px}.gear-upgrade-dialog .upgrade-help{line-height:1.2;margin:3px 0}.gear-upgrade-dialog .upgrade-scroll-hint{margin:3px 0 5px}}
.gear-upgrade-dialog .upgrade-target .gear-detail-card:has(.item-slot-label){width:72px;height:94px}
.gear-upgrade-dialog .upgrade-material-grid:has(.item-slot-label){grid-auto-rows:94px}
.gear-upgrade-dialog .upgrade-material-grid .inventory-model:has(>.item-slot-label){padding-bottom:16px}
.gear-upgrade-dialog .inventory-model:has(>.item-slot-label) .inventory-material-xp{position:absolute;left:auto;right:2px;top:0;bottom:auto;width:auto;font-size:9px;line-height:17px;background:#fbefdbdd;border-radius:3px;padding:0 2px}

.shipment-indicators{position:absolute;z-index:4;left:50%;transform:translateX(-50%);display:flex;gap:6px;max-width:calc(100% - 16px)}.shipment-indicators[hidden]{display:none}.shipment-indicators .ship-below-indicator{flex-shrink:0}.shipment-indicators .ship-below-indicator img{width:28px;max-height:36px}.shipment-indicators [data-carrier-kind="rail"] img{width:34px}

.frontier-inventory-open{display:block;width:calc(100% - 24px);margin:12px;min-height:44px;font-size:13px}

.copper-canyon-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:2px 3px}.copper-canyon-tab>img{width:36px;height:36px;object-fit:contain}.copper-canyon-tab>small{font-size:9px;line-height:11px;font-weight:900;max-width:52px;text-align:center;color:#405b45}.copper-canyon-overview[open]{display:flex;flex-direction:column;max-height:90dvh}.copper-canyon-overview .sheet-heading{flex-shrink:0}.copper-canyon-intro{overflow:auto;padding:18px;text-align:center;color:#405b45}.copper-canyon-intro>img{display:block;width:96px;height:96px;margin:10px auto 0}.copper-canyon-intro h2{font-size:22px;margin:8px 0}.copper-canyon-intro p{font-size:13px;line-height:1.5;margin:10px 0}.copper-canyon-facts{display:flex;gap:8px;margin:16px 0}.copper-canyon-facts>span{flex:1;padding:10px 4px;background:#e1e7c7;border:1px solid #b6c193;border-radius:12px;font-size:11px}.copper-canyon-facts b{display:block;font-size:18px}.copper-canyon-intro .copper-canyon-save-note{font-size:11px;color:#687656}.copper-canyon-intro>[data-event-enter]{width:100%;min-height:48px;margin-top:8px}.copper-canyon-intro>[data-event-status]:empty{display:none}

.right-side-tabs>.copper-canyon-tab{order:3}

.copper-canyon-intro .copper-canyon-countdown{font-size:12px;font-weight:900;color:#77653f}.copper-canyon-tab [data-event-badge]{font-size:9px}

.copper-canyon-tab>img{object-fit:cover;border-radius:9px;border:1px solid #b39b6b;box-sizing:border-box}.copper-canyon-intro>.copper-canyon-hero{width:100%;height:auto;aspect-ratio:4/3;max-width:100%;object-fit:contain;object-position:center;border:2px solid #bca477;border-radius:14px;box-sizing:border-box;margin:10px auto 0}

.copper-canyon-tab>.copper-canyon-wagon-icon{width:48px;height:36px;object-fit:contain;border:0;border-radius:0}
.copper-canyon-prizes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0}.copper-canyon-prize{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;padding:10px 3px 8px;border:1px solid #c2ad7d;border-radius:14px;background:#f9edcb}.copper-canyon-prize img{width:64px;height:64px;max-width:100%;object-fit:contain}.copper-canyon-prize b{font-size:19px;line-height:1.1;color:#405b45}.copper-canyon-prize small{font-size:11px;font-weight:800;white-space:nowrap}@media(max-width:360px){.copper-canyon-prizes{gap:5px}.copper-canyon-prize img{width:48px;height:48px}.copper-canyon-prize small{font-size:10px}}

.copper-canyon-intro .copper-canyon-rewards-title{font-size:16px;margin:16px 0 0}.copper-canyon-rewards-title+.copper-canyon-prizes{margin-top:8px}

/* Reserve room for rewards and entry; let the artwork adapt to short screens. */
.copper-canyon-intro>.copper-canyon-hero{height:clamp(72px,calc(90dvh - 330px),240px);width:auto;max-width:100%;aspect-ratio:4/3;margin:0 auto;flex:none}
.copper-canyon-intro .copper-canyon-rewards-title{margin-top:8px}
@media(max-height:600px){
 .copper-canyon-intro{padding:12px}
 .copper-canyon-intro .copper-canyon-countdown{font-size:11px;line-height:1.35;margin:6px 0}
 .copper-canyon-intro .copper-canyon-rewards-title{font-size:14px}
 .copper-canyon-prizes{margin:8px 0 0;gap:6px}
 .copper-canyon-prize{padding:6px 2px;gap:2px;border-radius:11px}
 .copper-canyon-prize img{width:44px;height:44px}
 .copper-canyon-prize b{font-size:17px}
 .copper-canyon-prize small{font-size:10px}
}
