/* Jelly button kit. Layers: ::before base / DOM icon + font / ::after gloss. */
body.jelly-ui{--button-radius:15px;--button-gloss:.42;--button-motion:120ms;--button-ink:#485564;--button-edge:#aabdad}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button{
 --button-base:url('../assets/ui/buttons/backgrounds/cream.svg');
 position:relative!important;isolation:isolate;z-index:0;box-sizing:border-box!important;
 background:transparent!important;background-image:none!important;border:0!important;
 border-radius:var(--button-radius)!important;color:var(--button-ink)!important;
 box-shadow:0 3px 0 var(--button-edge),0 5px 9px #45645213!important;
 text-shadow:none!important;cursor:pointer;touch-action:manipulation;
 transition:translate var(--button-motion) ease,filter var(--button-motion) ease,box-shadow var(--button-motion) ease!important;
 -webkit-tap-highlight-color:transparent;overflow:visible!important;
}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button::before,body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button::after{
 content:''!important;position:absolute!important;inset:0!important;left:0!important;top:0!important;right:0!important;bottom:0!important;
 width:auto!important;height:auto!important;margin:0!important;translate:none!important;transform:none!important;
 border:15px solid transparent!important;border-image:var(--button-base) 18 fill stretch!important;
 border-radius:inherit!important;box-shadow:none!important;background:none!important;
 pointer-events:none!important;animation:none!important;filter:none!important;
}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button::before{z-index:-1!important;opacity:1!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button::after{z-index:3!important;opacity:var(--button-gloss)!important;border-image-source:url('../assets/ui/buttons/foregrounds/jelly.svg')!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-tone='mint']{--button-base:url('../assets/ui/buttons/backgrounds/mint.svg');--button-edge:#8fad8b;--button-ink:#315940}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-tone='lavender']{--button-base:url('../assets/ui/buttons/backgrounds/lavender.svg');--button-edge:#b2a0cd;--button-ink:#604580}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-tone='gold']{--button-base:url('../assets/ui/buttons/backgrounds/gold.svg');--button-edge:#cda351;--button-ink:#6a4718}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-tone='coral']{--button-base:url('../assets/ui/buttons/backgrounds/coral.svg');--button-edge:#c18781;--button-ink:#6b3734}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button:disabled,body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[aria-disabled='true']{--button-base:url('../assets/ui/buttons/backgrounds/disabled.svg');--button-edge:#c2c9bf;--button-ink:#6b746e;--button-gloss:.12;opacity:1!important;filter:saturate(.35)!important;cursor:not-allowed;box-shadow:0 2px 0 var(--button-edge)!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button:active:not(:disabled){translate:0 2px;box-shadow:0 1px 0 var(--button-edge)!important;filter:brightness(.97)!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button:focus-visible{outline:3px solid #7450a9!important;outline-offset:3px!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[aria-pressed='true'],body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button.current{outline:3px solid #9873bf!important;outline-offset:2px!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[aria-busy='true']{cursor:progress;filter:saturate(.65)!important}
@media(hover:hover){body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button:hover:not(:disabled){filter:brightness(1.045)!important}}
body.jelly-ui .jelly-icon{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;pointer-events:none!important;user-select:none;filter:drop-shadow(0 1px 1px #70575424);border:0!important;background:none!important}
body.jelly-ui .jelly-icon-slot{display:inline-block;width:30px;height:30px;flex:none;pointer-events:none}
body.jelly-ui .jelly-label{position:relative;z-index:1;line-height:1.35}
body.jelly-ui .game .head-actions button.jelly-button{display:grid!important;grid-template-rows:minmax(0,1fr) auto!important;justify-items:center!important;align-items:center!important;gap:2px!important;padding:5px!important}
body.jelly-ui .game .head-actions button.jelly-button>i{display:block!important;position:static!important;width:38px!important;height:38px!important;font-size:0!important;line-height:0!important;filter:none!important;pointer-events:none}
body.jelly-ui .game .head-actions button.jelly-button small{color:var(--button-ink)!important;font-weight:800!important;font-size:11px!important;z-index:1;text-shadow:0 1px #fff7}
body.jelly-ui .game .head-actions button.jelly-button#eraProjectButton{background:none!important;box-shadow:0 3px 0 var(--button-edge),0 5px 9px #45645213!important}
body.jelly-ui .game .head-actions #eraProjectButton>span{z-index:4!important;background:#fff7d8!important;color:#735698!important;box-shadow:0 1px 3px #82649935!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='primary'],body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='secondary'],body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='success'],body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='danger']{min-height:40px!important;padding:8px 14px!important;font-size:13px!important;font-weight:800!important;line-height:1.35!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='close']{width:40px!important;height:40px!important;min-height:40px!important;padding:10px!important;display:grid!important;place-items:center!important;--button-radius:50%;box-shadow:0 2px 0 #bdcec0!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='close']::before{border:0!important;border-image:none!important;background:url('../assets/ui/buttons/backgrounds/circle.svg') center/100% 100% no-repeat!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='close']::after{border:0!important;border-image:none!important;background:url('../assets/ui/buttons/foregrounds/circle.svg') center/100% 100% no-repeat!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='close'] .jelly-icon-slot{width:20px!important;height:20px!important}
body.jelly-ui dialog button.jelly-button small,body.jelly-ui dialog button.jelly-button b{color:inherit!important;text-shadow:none!important}
body.jelly-ui dialog button.jelly-button small{font-size:12px!important;line-height:1.45!important}
body.jelly-ui dialog .close{z-index:10!important}
body.jelly-ui .mission-footer #claimLevel.jelly-button{background:transparent!important;box-shadow:0 3px 0 var(--button-edge)!important;color:var(--button-ink)!important}
body.jelly-ui .mission-footer #claimLevel.jelly-button:disabled{background:none!important;box-shadow:0 2px 0 var(--button-edge)!important}
body.jelly-ui .mission-details.jelly-button{min-height:32px!important;padding:5px 8px!important;font-size:11px!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button.visual-order{--button-base:url('../assets/ui/buttons/backgrounds/cream.svg');--button-radius:18px;--button-gloss:.2}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button.visual-order.ready{--button-base:url('../assets/ui/buttons/backgrounds/mint.svg');--button-edge:#8eae72}
/* Ready text is a real label; the foreground remains strictly decorative. */
body.jelly-ui .order-status{display:none}
body.jelly-ui .visual-order.ready .order-status{display:block;grid-column:1/-1;color:#fff;background:#638b4e;padding:3px 10px;border-radius:8px;font-size:11px;font-weight:800;z-index:4}
body.jelly-ui #levelMap button.jelly-button{min-height:65px!important;--button-radius:18px;font-size:13px!important}
body.jelly-ui #levelMap button.jelly-button.done{--button-base:url('../assets/ui/buttons/backgrounds/mint.svg');--button-edge:#92b392;filter:none!important;opacity:1!important}
body.jelly-ui #levelMap button.jelly-button.locked{--button-base:url('../assets/ui/buttons/backgrounds/disabled.svg')}
body.jelly-ui #evolutionButton.jelly-button{box-shadow:0 2px 0 #c3b2d8!important;--button-gloss:.2}
body.jelly-ui .cheat-resource-grid button.jelly-button i{width:44px!important;height:44px!important;display:block!important;font-size:0!important}
body.jelly-ui .evolution-choices button.jelly-button{display:grid!important;grid-template-columns:36px 1fr;gap:6px!important;align-items:center!important;padding:12px!important;color:var(--button-ink)!important}
body.jelly-ui .evolution-choices button.jelly-button small{grid-column:1/-1}
body.jelly-ui .evolution-choices button[data-evolution-choice='charge']{grid-template-columns:1fr!important}
body.jelly-ui .project-send-button.jelly-button{min-height:44px!important;padding:4px!important;font-size:12px!important}
body.jelly-ui #settingsDialog .jelly-button{margin-top:7px}
body.jelly-ui .expanded-settings{gap:10px}
@media(max-width:899px) and (min-height:521px){
 body.jelly-ui .game .head-actions button.jelly-button{padding:4px 1px!important;--button-radius:12px}
 body.jelly-ui .game .head-actions button.jelly-button>i{width:29px!important;height:29px!important}
 body.jelly-ui .game .head-actions button.jelly-button small{font-size:9px!important;line-height:1.2!important}
 body.jelly-ui .mission-footer #claimLevel.jelly-button{min-height:34px!important;height:34px!important;padding:4px!important;font-size:10px!important}
 body.jelly-ui .mission-details.jelly-button{min-height:32px!important;padding:3px 5px!important;font-size:10px!important}
 body.jelly-ui .visual-order.ready .order-status{position:absolute;top:2px;left:2px;padding:1px 4px;font-size:9px}
 body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button::before,body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button::after{border-width:11px!important}
 body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='close']::before,body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='close']::after{border-width:0!important}
}
@media(max-height:520px){body.jelly-ui .game .head-actions button.jelly-button>i{width:24px!important;height:24px!important}body.jelly-ui .game .head-actions button.jelly-button{padding:2px!important}body.jelly-ui .game .head-actions button.jelly-button small{font-size:10px!important}}
@media(prefers-reduced-motion:reduce){body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button{transition:none!important;animation:none!important}body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button:active:not(:disabled){translate:none}}

/* Legacy order spans used fixed icon geometry; text badges need their own box. */
body.jelly-ui .game.ui-refresh .visual-order.ready .order-status{position:static!important;display:block!important;width:max-content!important;height:auto!important;min-width:0!important;max-width:100%!important;margin:0!important;padding:3px 10px!important;border:0!important;border-radius:8px!important;transform:none!important;translate:none!important;white-space:nowrap!important;line-height:1.4!important;font-size:11px!important;box-shadow:none!important}
body.jelly-ui .jelly-factory{display:inline-flex;align-items:center;justify-content:center;gap:8px}
body.jelly-ui .jelly-factory.nav-demo{display:grid}
body.jelly-ui .button-gallery .nav-demo .jelly-icon-slot{width:56px;height:56px}
body.jelly-ui .game.ui-refresh .head-actions button.jelly-button{animation:none!important;transform:none!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button[data-button-kind='close']{min-width:40px!important;max-width:40px!important;flex:none!important}
body.jelly-ui :is(.game.ui-refresh,dialog,.button-gallery) button.jelly-button.close{position:absolute!important;top:12px!important;right:12px!important;left:auto!important;bottom:auto!important;margin:0!important}
body.jelly-ui button[data-button-kind='close'] .jelly-label{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
body.jelly-ui .game.ui-refresh button.jelly-button.mission-details{min-height:32px!important;padding:4px 7px!important;font-size:11px!important}
@media(max-width:899px) and (min-height:521px){
 body.jelly-ui .game.ui-refresh .visual-order.ready .order-status{position:absolute!important;top:2px!important;left:2px!important;padding:1px 4px!important;font-size:9px!important}
 body.jelly-ui .game.ui-refresh .mission-footer button.jelly-button#claimLevel{min-height:34px!important;height:34px!important;padding:4px!important;font-size:10px!important}
 body.jelly-ui .game.ui-refresh button.jelly-button.mission-details{min-height:32px!important;padding:3px 5px!important;font-size:10px!important}
}
