/* Progress, reward and status are separate visual groups, never a dotted number string. */
.quest-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px;}
.quest-heading h3{flex:1;min-width:120px;margin:0!important;line-height:1.35;}
.quest-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;line-height:1.3;padding:4px 7px;border:1px solid #64748b;border-radius:6px;color:#c9d3df;background:#17212c;}
.quest-status i{display:inline-block;flex:none;width:11px;height:11px;box-sizing:border-box;border:2px solid currentColor;border-radius:50%;}
.quest-status-ready{background:#153b26;color:#9bf4b4;border-color:#59c580;}
.quest-status-ready i{background:currentColor;box-shadow:0 0 5px #6bef9980;}
.quest-status-claimed{color:#95c8a2;background:#16271d;border-color:#466d50;}
.quest-status-claimed i{border:0;border-radius:0;width:10px;height:6px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin-top:-3px;}
.journey-quest.quest-ready{border:2px solid #5ad681;background:linear-gradient(120deg,#173d29,#10221a);box-shadow:inset 4px 0 #5ad681;}
.journey-quest.quest-claimed{border:2px solid #41694b;background:#142219;box-shadow:inset 4px 0 #41694b;}
.journey-quest.quest-claimed h3{color:#a6b6aa;}
.journey-quest.quest-pending{border-color:#4c5b70;background:#111b26;}
.quest-metrics{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,auto);gap:18px;align-items:center;margin:12px 0;}
.quest-progress>div{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;color:#a9b8c9;margin-bottom:5px;}
.quest-progress b{color:#edf4fc;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap;}
#journey-content .quest-progress progress{height:8px;border:0;border-radius:5px;overflow:hidden;display:block;background:#080f18;accent-color:#eec144;}
.quest-progress progress::-webkit-progress-bar{background:#080f18;border-radius:5px;}.quest-progress progress::-webkit-progress-value{background:#eec144;border-radius:5px;}
.quest-ready .quest-progress progress::-webkit-progress-value,.quest-claimed .quest-progress progress::-webkit-progress-value{background:#59c580;}
.quest-reward{display:flex;flex-direction:column;align-items:center;gap:4px;padding-left:14px;border-left:1px solid #ffffff25;}
.quest-reward>span{font-size:10px;color:#b6c4d2;}.quest-reward>strong{display:flex;align-items:center;gap:5px;font-size:17px;color:#ffdd64;}
.quest-reward img,.quest-reward .journey-currency-reward img{width:25px!important;height:27px!important;object-fit:contain;vertical-align:middle;}
.quest-reward .journey-currency-reward{display:inline-flex;align-items:center;gap:6px;}
/* Compact max-HP reduction badge; CSS icon keeps localized text intact. */
#hp-container #weakness-indicator{position:relative!important;inset:auto!important;transform:none!important;justify-self:center;box-sizing:border-box;width:max-content;max-width:100%;border:1px solid #ec7568;border-bottom:3px solid #601b1b;border-radius:7px;padding:4px 8px 4px 28px!important;background:linear-gradient(#71302e,#3a161b);color:#ffe7d9;line-height:1.2;font-weight:900;font-size:11px;letter-spacing:0;white-space:normal;box-shadow:inset 0 1px #f8ba922b,0 2px 2px #0005;}
#hp-container #weakness-indicator::before{content:'';position:absolute;left:6px;top:50%;transform:translateY(-50%);width:16px;height:16px;background:url('/assets/ui/weakness-heart.svg') center/contain no-repeat;pointer-events:none;}
body.mobile-landscape #hp-container #weakness-indicator{padding:3px 7px 3px 24px!important;font-size:10px!important;}
body.mobile-landscape #hp-container #weakness-indicator::before{left:5px;width:14px;height:14px;}
.settings-emblem{display:inline-block;width:20px;height:20px;object-fit:contain;vertical-align:middle;flex-shrink:0;}
/* Content-based widths reserve space for translated labels instead of five equal cells. */
#right-tab-bar{justify-content:stretch!important;flex-shrink:0;}
#right-tab-bar .hud-panel-tab{flex:1 1 auto;min-width:0;padding:12px 5px!important;gap:4px;font-size:clamp(9px,.76vw,11px);}
#right-tab-bar #rbtn-evolution{flex:0 0 auto;min-width:48px;padding:12px 7px!important;}
#right-tab-bar .hud-panel-tab>span{overflow-wrap:normal;word-break:normal;white-space:normal;line-height:1.15;}
body.mobile-slide-mode #right-tab-bar .hud-panel-tab{font-size:11px;}
@media(min-width:741px){body.mobile-landscape #right-tab-bar .hud-panel-tab{font-size:12px;}body.mobile-landscape #right-tab-bar #rbtn-evolution{min-width:64px;}}
@media(max-width:480px){body.mobile-slide-mode #right-tab-bar .hud-panel-tab{font-size:10px;padding:8px 3px!important;gap:3px;}body.mobile-slide-mode #right-tab-bar .hud-panel-tab>img{width:14px;height:16px;}body.mobile-slide-mode #right-tab-bar #rbtn-evolution{min-width:42px;padding:8px 3px!important;}}
body.mobile-landscape .clarity-dialog[data-journal="1"]{width:min(840px,calc(100vw - 24px));max-width:calc(100vw - 24px);}
body.mobile-landscape #journey-content:has(.journey-daily-summary){display:grid;grid-template-columns:210px minmax(0,1fr);gap:14px;align-items:start;}
body.mobile-landscape .journey-daily-summary .journey-quest{margin-top:0;}
body.mobile-landscape .journey-daily-list .journey-quest:first-child{margin-top:0;}
body.mobile-landscape .journey-daily-summary .quest-heading h3{min-width:0;flex-basis:100%;}
body.mobile-landscape .journey-daily-summary .quest-metrics{gap:8px;grid-template-columns:minmax(0,1fr) 64px;}
body.mobile-landscape .journey-daily-summary .quest-reward{padding-left:8px;}
body.mobile-landscape .journey-daily-summary .clarity-note{font-size:11px;}
/* Compact side panels stack the icon above its caption, leaving room for long locales. */
#right-tab-bar .hud-panel-tab{flex-direction:column;gap:2px;padding:7px 4px!important;font-size:10px;}
#right-tab-bar .hud-panel-tab>img{width:16px;height:17px;}
#right-tab-bar .hud-panel-tab>span{overflow-wrap:anywhere;hyphens:auto;}
#right-tab-bar #rbtn-evolution{min-width:42px;padding:7px 4px!important;}
body.mobile-slide-mode #right-tab-bar .hud-panel-tab{font-size:10px;}
body.mobile-landscape #right-tab-bar .hud-panel-tab{flex-direction:row;font-size:12px;padding:9px 6px!important;gap:5px;}
body.mobile-landscape #right-tab-bar .hud-panel-tab>span{overflow-wrap:normal;}
.journey-quest.quest-pending .clarity-primary:disabled,.journey-quest.quest-claimed .clarity-primary:disabled{background:#1d2b30!important;border-color:#465661!important;color:#9dafb9!important;box-shadow:none;}
.journey-quest.quest-claimed .clarity-primary:disabled{color:#a5c9ae!important;}
/* Evolution remains compact without looking squeezed next to the other tabs. */
#right-tab-bar #rbtn-evolution,body.mobile-slide-mode #right-tab-bar #rbtn-evolution{min-width:54px;flex:0.8 1 auto;padding:7px 6px!important;}
@media(max-width:360px){body.mobile-slide-mode #right-tab-bar #rbtn-evolution{min-width:50px;}}

body:not(.mobile-slide-mode) #item-tooltip:has(.quick-stat-eggs){width:300px;max-width:calc(100vw - 16px);white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}

/* Available evolutions stay legible without a continuous animation. */
.evolution-action-ready{box-shadow:0 0 10px #2ecc7166,inset 0 0 8px #baffcb22!important;border-color:#78efa1!important;transition:filter .12s,box-shadow .12s;}
.evolution-action-ready:hover{filter:brightness(1.18);box-shadow:0 0 15px #2ecc7199,inset 0 0 10px #baffcb33!important;}
.evolution-action-ready:focus-visible{outline:2px solid #ffe18a;outline-offset:2px;}

/* Compact return receipt on normal browser/native mobile; portal keeps its UI. */
body.non-crazygames-ui.mobile-slide-mode #offline-modal .modal-box{max-width:320px!important;width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;padding:10px!important;overflow-y:auto!important;}
body.non-crazygames-ui.mobile-slide-mode #offline-modal .modal-box>img{width:68px!important;height:68px!important;margin-bottom:4px!important;}
body.non-crazygames-ui.mobile-slide-mode #offline-modal .modal-box h3{font-size:16px!important;margin-bottom:7px!important;}
body.non-crazygames-ui.mobile-slide-mode #offline-modal-content>div{gap:5px!important;}
body.non-crazygames-ui.mobile-slide-mode #offline-modal-content :is(.offline-summary-row,.offline-reward-row){padding:6px 8px!important;font-size:11px!important;}
body.non-crazygames-ui.mobile-slide-mode #offline-modal-content :is(.offline-summary-row,.offline-reward-row)>b{font-size:14px!important;}
body.non-crazygames-ui.mobile-slide-mode #offline-modal .offline-return-button{padding:9px 12px!important;font-size:13px!important;}
body.non-crazygames-ui.mobile-landscape #journey-launcher.quest-floating-button.gameplay-floating-button{top:var(--gameplay-buttons-top,98px)!important;}
body.non-crazygames-ui.mobile-landscape #sanctuary-launcher{top:calc(var(--gameplay-buttons-top,98px) + 54px)!important;}
body.non-crazygames-ui.mobile-landscape #familiar-launcher{top:calc(var(--gameplay-buttons-top,98px) + 108px)!important;}

/* Combat modifiers share a centered row beneath health. */
#hp-container #combat-bonuses{align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;width:100%;min-width:0;}
#hp-container #enemy-evolution-bonus{position:relative;box-sizing:border-box;align-items:center;justify-content:center;max-width:100%;border:1px solid #e5bb65;border-bottom:3px solid #624719;border-radius:7px;padding:4px 8px 4px 28px;background:linear-gradient(#665022,#302615);color:#ffe7ad;line-height:1.2;font-weight:900;font-size:11px;letter-spacing:0;text-align:center;box-shadow:inset 0 1px #f8da922b,0 2px 2px #0005;}
#hp-container #enemy-evolution-bonus::before{content:'';position:absolute;left:6px;top:50%;transform:translateY(-50%);width:16px;height:16px;background:url('../ui/evolution-emblem-v576.webp') center/contain no-repeat;pointer-events:none;}
body.mobile-landscape #hp-container{grid-template-areas:'name name name' 'bar bar bar' 'modifiers modifiers modifiers' 'weak timer relic'!important;}
body.mobile-landscape #hp-container #combat-bonuses{grid-area:modifiers;}
body.mobile-landscape #hp-container #enemy-evolution-bonus{font-size:10px;padding:3px 7px 3px 24px;}
body.mobile-landscape #hp-container #enemy-evolution-bonus::before{left:5px;width:14px;height:14px;}
/* Lightweight fantasy nameplate; stays inside the viewport. */
#game-button-tooltip{position:fixed;z-index:2147483000;pointer-events:none;box-sizing:border-box;max-width:calc(100vw - 16px);padding:7px 12px;border:2px solid #d4a83e;border-radius:6px;background:linear-gradient(#252a32,#10151d);box-shadow:inset 0 1px #ffe7a533,0 3px 8px #0009;color:#ffe4a1;font:700 13px/1.25 Arial,sans-serif;text-align:center;overflow-wrap:anywhere;}
#game-button-tooltip[hidden]{display:none!important;}

#game-button-tooltip{max-width:min(340px,calc(100vw - 16px));white-space:normal;}
/* Counter follows the painted capsule, independently of the button's scale. */
.ads-floating-button{container-type:inline-size;}
html body .ads-floating-button #wheel-ad-counter{left:50%!important;top:calc(73.5% + 1.5px)!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:55%!important;min-width:0!important;height:18%!important;padding:0!important;margin:0!important;border:0!important;display:flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:clamp(6px,15cqw,12px)!important;line-height:1!important;white-space:nowrap;}
/* Both mobile columns end just above the navigation, in the combat panel. */
html body.mobile-slide-mode #combat-area :is(#journey-launcher,#sanctuary-launcher,#arena-launcher,#familiar-launcher){position:absolute!important;right:8px!important;left:auto!important;bottom:auto!important;}
html body.mobile-slide-mode #combat-area #journey-launcher{top:calc(var(--mobile-controls-bottom,calc(100% - 80px)) - 208px)!important;}
html body.mobile-slide-mode #combat-area #sanctuary-launcher{top:calc(var(--mobile-controls-bottom,calc(100% - 80px)) - 154px)!important;}
html body.mobile-slide-mode #combat-area #arena-launcher{top:calc(var(--mobile-controls-bottom,calc(100% - 80px)) - 100px)!important;}
html body.mobile-slide-mode #combat-area #familiar-launcher{top:calc(var(--mobile-controls-bottom,calc(100% - 80px)) - 46px)!important;}
html body.mobile-slide-mode #combat-area :is(#autoclicker-shelf,#mobileAscensionBtn){position:absolute!important;left:6px!important;right:auto!important;bottom:auto!important;transform:none!important;}
html body.mobile-slide-mode #combat-area #autoclicker-shelf{top:calc(var(--mobile-controls-bottom,calc(100% - 80px)) - 108px)!important;}
html body.mobile-slide-mode #combat-area #mobileAscensionBtn{top:calc(var(--mobile-controls-bottom,calc(100% - 80px)) - 50px)!important;}
/* Scale the whole desktop pick-up control, including its frame and counter. */
body:not(.mobile-slide-mode) #autoclicker-shelf{scale:.9;}
/* Keep the translated desktop control centered when shrinking it. The portal
   anchors its control by its left edge and retains the independent scale. */
html:not(.cg-desktop) body:not(.mobile-slide-mode) #autoclicker-shelf{scale:none;transform:translate(-50%,-50%) scale(.9);}
html:not(.cg-desktop) body:not(.mobile-slide-mode) #autoclicker-shelf:hover{transform:translate(-50%,-50%) scale(.99);}
/* Success filters occupy two rows: three choices, then two wider choices. */
.achievement-track-filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-bottom:12px;}
.achievement-track-filters [data-achievement-track]{grid-column:span 2;min-height:40px;padding:9px 5px!important;font-size:12px!important;font-weight:800;}
.achievement-track-filters [data-achievement-track="gold"],.achievement-track-filters [data-achievement-track="scrolls"]{grid-column:span 3;}
#rbtn-talents{position:relative;}
.talent-points-dot{position:absolute;right:3px;top:3px;width:9px;height:9px;background:#f22;border:2px solid #fff;border-radius:50%;z-index:6;pointer-events:none;}
.talent-points-dot[hidden]{display:none!important;}
.hero-stats-line .hero-dps-share{flex-basis:100%;}
#stat-dps{color:#7dd3fc;}
/* Reserve the expanded upgrade layout before the first purchase. */
.ancien-name{line-height:1.35;min-height:2.7em;}
.ancien-name>span{display:block;white-space:nowrap;}
.ancien-card{display:grid;grid-template-columns:64px minmax(0,1fr) 112px;gap:8px 10px;}
.ancien-card>.ancien-icon{grid-column:1;grid-row:1;width:64px;}
.ancien-card>.ancien-info{display:contents;}
.ancien-card .ancien-name{grid-column:2;grid-row:1;}
.ancien-card .ancien-desc{grid-column:1/3;grid-row:2;margin-bottom:0;}
.ancien-card>.upgrade-purchase-actions{grid-column:3;grid-row:1/4;align-self:center;justify-self:end;width:112px;min-width:0;}
.ancien-card>.upgrade-purchase-actions>[data-hold-repeat]{box-sizing:border-box;max-width:100%;width:112px!important;}
.ancien-stats{grid-column:1/3;grid-row:3;display:flex;flex-direction:column;gap:4px;line-height:1.3;min-height:calc(5.2em + 4px);}
.ancien-stats>.upgrade-current-effect,.ancien-stats>.upgrade-next-effect{display:block;min-height:0;overflow-wrap:anywhere;margin-left:0!important;}
.ancien-stats>.upgrade-next-effect{color:#ffd700;}
.ancien-card[data-upgrade-id="renaissance"] .ancien-stats{min-height:calc(10.4em + 4px);}
@media(max-width:360px){
  .ancien-stats{min-height:calc(7.8em + 4px);}
  .ancien-card[data-upgrade-id="renaissance"] .ancien-stats{min-height:calc(15.6em + 4px);}
}
.hero-name{min-height:4.2em;display:flex;flex-direction:column;justify-content:flex-end;}
.hero-name-label{display:block;min-height:1.4em;}
.hero-level{display:block;white-space:nowrap;}
.hero-stats-line>.hero-gain,.hero-stats-line>.total-power,.hero-stats-line>.hero-dps-share{flex-basis:100%;}
.hero-stats-line{min-height:calc(4.2em - 1.4px);}
.hero-stats-line .hero-gain,.hero-stats-line .total-power,.hero-stats-line .hero-dps-share,.hero-stats-line .hero-click-marker{line-height:1.2;}
