/* UPGRADE_PANELS_V3. Ordinary themes only; seasonal layouts keep their presentation. */
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels{--up-panel:var(--md-card,#0e1317);--up-frame:#30383f}
.md-upgrade-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-bottom-panel,.bottom-panel-header,.bottom-panel-body,.upgrade-choice-window,.upgrade-balance-add){background:var(--up-panel)!important;background-image:none!important;box-shadow:none!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-header{height:48px!important;min-height:48px!important;max-height:48px;padding:7px 9px!important;gap:6px!important;flex-wrap:nowrap!important;border-bottom:1px solid #ffffff0c}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .panel-title{display:inline-flex!important;align-items:center;gap:6px!important;font-size:12px!important;line-height:18px;letter-spacing:0;flex-shrink:0}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .panel-title .upgrade-panel-title-icon{display:block;width:17px!important;height:19px!important;margin:0!important;object-fit:contain;flex:0 0 17px}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.bottom-panel-controls,.bottom-panel-filters){display:flex;align-items:center;gap:5px!important;min-width:0;flex:1 1 auto!important;justify-content:flex-end;flex-wrap:nowrap!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom :is(.view-btn,.md-price-order,.search-btn){display:grid;place-items:center;flex:0 0 28px;width:28px!important;min-width:28px!important;height:30px!important;padding:5px!important;border:1px solid #30383f!important;border-radius:7px;background:#171e24!important;color:#83909a;box-shadow:none!important;transition:color .2s,border-color .2s,box-shadow .2s}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom :is(.view-btn,.md-price-order) svg{width:17px;height:19px}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .view-btn.active{background:rgba(var(--accent-rgb),.055)!important;color:var(--accent)!important;border-color:rgba(var(--accent-rgb),.45)!important;box-shadow:inset 0 0 8px rgba(var(--accent-rgb),.06),0 0 8px rgba(var(--accent-rgb),.09)!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .md-price-order[data-order="desc"] svg{transform:rotate(180deg)}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom :is(.view-btn,.md-price-order):hover{color:var(--accent);border-color:rgba(var(--accent-rgb),.5)!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .md-inventory-total{height:30px;display:flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;border:1px solid #30383f;border-radius:7px;padding:4px 8px;background:#171e24;font-size:10px;color:#7f8b95}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .md-inventory-total b{color:var(--text-white,#edf1f3);font-size:11px;font-variant-numeric:tabular-nums}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .md-inventory-total img{width:14px;height:14px;object-fit:contain}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-filters :is(input,select){height:30px!important;min-height:30px;padding:4px 5px!important;font-size:10px!important;border:1px solid #30383f!important;background:#141a20!important;border-radius:6px;min-width:0}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-filters select{width:62px;max-width:62px;flex:0 0 62px}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-filters input{width:48px;max-width:58px;flex:1 1 48px}
/* Persistent price captions remain beside the values, including after typing. */
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .bottom-panel-filters .md-price-bound{display:flex;align-items:center;gap:4px;height:30px;min-width:44px;max-width:72px;flex:1 1 60px;padding:3px 5px;box-sizing:border-box;border:1px solid #30383f;border-radius:6px;background:#141a20;color:#8c98a3;font-size:10px;cursor:text}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .bottom-panel-filters .md-price-bound:focus-within{border-color:rgba(var(--accent-rgb),.55)}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .bottom-panel-filters .md-price-bound span{flex:0 0 auto;line-height:18px}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-filters .md-price-bound input{width:100%;min-width:0;max-width:none;flex:1 1 0;height:22px!important;min-height:0;padding:0!important;border:0!important;border-radius:0;background:transparent!important;outline:0;text-align:center;color:#d8e0e7;box-shadow:none}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .bottom-panel-header .panel-title{min-width:0;max-width:38%;flex-shrink:1}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .bottom-panel-header .panel-title>span:not(.md-upgrade-sr){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .upgrade-item-card{background:var(--up-panel)!important;background-image:none!important;border:1px solid #30383f!important;box-shadow:none!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .upgrade-item-card::before{display:none!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .upgrade-item-card:is(.selected,.target){border-color:rgba(var(--accent-rgb),.65)!important;box-shadow:inset 0 0 10px rgba(var(--accent-rgb),.04)!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .ui-source{font-size:9px;line-height:12px;color:#8995a0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .ui-source b{color:#8995a0;font-size:12px}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-panel-title{height:48px;flex:0 0 48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;margin:0 0 8px!important;padding:0;line-height:1.3;text-align:center}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-panel-title strong{font-size:16px;font-weight:800;color:#f1f3f5}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-panel-title small{font-size:10px;color:#7f8a95;font-weight:400;max-width:100%}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-selected-area,.upgrade-target-area){overflow:hidden!important;scrollbar-gutter:auto!important;min-height:0!important;padding:0!important;align-content:stretch;position:relative}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-selected-area.is-single,.upgrade-target-area.has-item){display:flex!important;align-items:center;justify-content:center}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-selected-area.is-single,.upgrade-target-area.has-item) .upgrade-item-card.large{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:min(100%,240px)!important;height:100%;max-height:100%;padding:10px!important;margin:0!important;border:1px solid var(--up-frame)!important;border-radius:10px;background:var(--up-panel)!important;box-shadow:none!important;overflow:hidden!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-selected-area.is-single,.upgrade-target-area.has-item) .upgrade-item-card.large .ui-icon{width:105px!important;height:105px!important;flex:0 1 105px;min-height:0;margin:0 auto 6px!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-selected-area.is-single,.upgrade-target-area.has-item) .upgrade-item-card.large :is(.ui-name,.ui-price){font-size:13px!important;line-height:17px;margin:2px 0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items:not(.is-single):has(.upgrade-item-card){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr) 18px;gap:5px!important;align-items:stretch!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items[data-count="2"]:not(.is-single):has(.upgrade-item-card){grid-template-rows:minmax(0,1fr) 18px!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items:is([data-count="5"],[data-count="6"]):not(.is-single):has(.upgrade-item-card){grid-template-columns:repeat(3,minmax(0,1fr))!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items:not(.is-single) .upgrade-item-card{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%!important;height:100%!important;min-height:0!important;margin:0;padding:5px!important;border:1px solid var(--up-frame)!important;border-radius:8px;background:var(--up-panel)!important;box-shadow:none!important;overflow:hidden!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(#selected-items,#target-item) .upgrade-item-card::after,html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(#selected-items,#target-item) .upgrade-item-card::before{display:none!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items:not(.is-single) .ui-icon{width:44px!important;height:44px!important;min-height:0;flex:0 1 44px;margin:0 auto 2px!important}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items:not(.is-single) :is(.ui-name,.ui-price){font-size:9px;line-height:12px;margin:1px 0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items:not(.is-single) .ui-source{font-size:8px;line-height:10px}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #selected-items .selected-total{grid-column:1/-1;align-self:end;border:0!important;margin:0!important;padding:0!important;font-size:10px;line-height:18px;height:18px;color:#a7b3bd}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(#selected-items,#target-item) .remove-btn{display:grid!important;place-items:center;position:absolute!important;top:3px!important;right:3px!important;left:auto!important;width:21px!important;height:21px!important;padding:0!important;border:0!important;border-radius:5px;background:#252c32!important;color:#aab2ba!important;opacity:0;transform:none!important;transition:opacity .18s,color .18s;z-index:3;font-size:12px}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(#selected-items,#target-item) .upgrade-item-card:is(:hover,:focus-within) .remove-btn{opacity:1}
html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels #chance-arc{transform-origin:130px 130px;transition:stroke-dasharray .32s ease,transform .32s ease,opacity .24s ease}
/* Roomier settings with a single scrollbar when the viewport is short. */
.md-compact-settings{padding:12px!important}
.md-compact-settings .upgrade-settings-modal{width:min(640px,100%)!important;max-width:100%!important;max-height:calc(100dvh - 24px)!important;margin:0!important;padding:0!important;overflow:auto!important;scrollbar-width:thin;scrollbar-color:var(--accent) #151b20;background:var(--md-card,#0e1317)!important;border:1px solid #30383f!important;border-radius:14px}
.md-compact-settings .upgrade-settings-modal::-webkit-scrollbar{width:5px}.md-compact-settings .upgrade-settings-modal::-webkit-scrollbar-thumb{background:var(--accent);border-radius:5px}
.md-compact-settings .upgrade-modal-header{padding:20px 26px!important;margin:0!important;min-height:0!important;border-bottom:1px solid #ffffff0d}
.md-compact-settings .upgrade-modal-header h3{font-size:18px!important;line-height:26px;letter-spacing:.3px;margin:0}
.md-compact-settings .modal-close{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;padding:0;font-size:28px}
.md-compact-settings .upgrade-settings-body{display:grid!important;gap:18px;padding:22px 26px!important;margin:0!important;max-height:none!important;height:auto!important;overflow:visible!important;scrollbar-gutter:auto!important}
.md-compact-settings :is(.upgrade-modal-header,.upgrade-settings-body){background:var(--md-card,#0e1317)!important;background-image:none!important}
.md-compact-settings section{padding:0;margin:0;min-width:0}.md-compact-settings h4{font-size:14px;line-height:20px;margin:0 0 8px;color:#909da8;font-weight:600}
.md-compact-settings .md-settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;min-height:32px;color:#d4dce3}
.md-compact-settings .md-settings-options{display:flex;gap:10px}.md-compact-settings .md-settings-options label{position:relative;flex:1;min-width:0;cursor:pointer}
.md-compact-settings .md-settings-options input{position:absolute;opacity:0;width:1px;height:1px}
.md-compact-settings .md-settings-options span{display:flex;justify-content:center;align-items:center;min-height:44px;height:100%;border:1px solid #30383f;border-radius:9px;background:#141b21;color:#a3adb7;font-size:14px;line-height:1.4;text-align:center;padding:8px}
.md-compact-settings .md-settings-options input:checked+span{border-color:rgba(var(--accent-rgb),.5);color:var(--accent);background:rgba(var(--accent-rgb),.05)}
.md-compact-settings .md-arrow-choices img{width:40px;height:52px;object-fit:contain}
.md-compact-settings .md-settings-options input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.md-compact-settings .md-setting-toggle{position:relative;display:block;width:44px;height:24px;flex:0 0 44px}.md-compact-settings .md-setting-toggle input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.md-compact-settings .md-setting-toggle i{display:block;border-radius:15px;background:#37414b;width:44px;height:24px;pointer-events:none}.md-compact-settings .md-setting-toggle i::after{content:'';display:block;position:absolute;top:3px;left:3px;width:18px;height:18px;background:#adb6be;border-radius:50%;transition:transform .2s}
.md-compact-settings .md-setting-toggle input:checked+i{background:rgba(var(--accent-rgb),.25)}.md-compact-settings .md-setting-toggle input:checked+i::after{background:var(--accent);transform:translateX(20px)}
.md-compact-settings .md-settings-volume{display:flex;align-items:center;gap:10px;width:220px;max-width:60%;min-width:0}.md-compact-settings .md-settings-volume input{width:170px;min-width:0;flex:1;accent-color:var(--accent);height:6px}.md-compact-settings .md-settings-volume output{font-size:13px;color:#9ba6b0;min-width:36px}
.md-compact-settings .upgrade-settings-save{width:100%;min-height:48px;padding:12px;border-radius:9px;background:rgba(var(--accent-rgb),.06)!important;border:1px solid rgba(var(--accent-rgb),.2)!important;color:#d4dedb;font-size:14px;font-weight:650;box-shadow:none!important;transition:color .2s,box-shadow .3s,border-color .2s}
.md-compact-settings .upgrade-settings-save:hover{border-color:rgba(var(--accent-rgb),.6)!important;color:var(--accent);box-shadow:0 0 14px rgba(var(--accent-rgb),.15)!important}
.sound-volume-popover.md-upgrade-volume{width:156px;padding:10px 12px;display:flex;align-items:center;gap:8px;border:1px solid #34383e;background:#1c2127!important;border-radius:8px;box-shadow:0 8px 25px #0006;font-size:10px}
.md-upgrade-volume .sound-volume-heading{display:contents}.md-upgrade-volume .sound-volume-heading>span{display:none}.md-upgrade-volume output{order:2;width:27px;flex:0 0 27px;font-size:10px;color:#a7b1b9}
.md-upgrade-volume input[type=range]{width:100px;flex:1;margin:0!important;height:4px}
.md-upgrade-volume input[type=range]::-webkit-slider-thumb{width:10px;height:10px;border-width:1px;box-shadow:none}
.md-upgrade-volume input[type=range]::-moz-range-thumb{width:8px;height:8px;border-width:1px;box-shadow:none}
@media(max-height:600px) and (min-width:600px){
 .md-compact-settings .upgrade-settings-modal{width:min(760px,100%)!important}
 .md-compact-settings .upgrade-settings-body{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;padding:10px 20px!important}
 .md-compact-settings .upgrade-settings-body>section:first-child{grid-column:1/-1;min-height:24px}
 .md-compact-settings h4{font-size:13px;line-height:18px;margin-bottom:6px}
 .md-compact-settings .md-settings-options span{min-height:36px;padding:4px;font-size:13px}
 .md-compact-settings .upgrade-settings-save{grid-column:1/-1;min-height:40px;padding:8px}
 .md-compact-settings .upgrade-modal-header{padding:10px 20px!important}
 .md-compact-settings .md-arrow-choices img{height:28px;width:24px}
}
@media(max-width:480px){
 .md-compact-settings .upgrade-modal-header{padding:16px 18px!important}
 .md-compact-settings .upgrade-modal-header h3{font-size:17px!important;line-height:24px}
 .md-compact-settings .upgrade-settings-body{gap:16px;padding:18px!important}
 .md-compact-settings .md-settings-row{font-size:14px}
 .md-compact-settings .md-settings-options{gap:8px}
 .md-compact-settings .md-settings-options span{font-size:13px;padding:6px}
 .md-compact-settings .md-arrow-choices img{width:36px;height:48px}
}
@media(max-width:420px){html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-header{padding:7px!important;gap:4px!important}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .panel-title{font-size:11px!important;gap:5px!important}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-filters select{width:53px;max-width:53px;flex-basis:53px}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-bottom .bottom-panel-filters input{width:35px;flex-basis:35px}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .md-inventory-total{padding:4px;gap:3px}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .md-inventory-total>span{display:none}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-panel-title strong{font-size:12px}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .upgrade-panel-title small{font-size:8px}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-selected-area.is-single,.upgrade-target-area.has-item) .upgrade-item-card.large .ui-icon{width:74px!important;height:74px!important;flex-basis:74px}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels :is(.upgrade-selected-area.is-single,.upgrade-target-area.has-item) .upgrade-item-card.large :is(.ui-name,.ui-price){font-size:11px!important}}
@media(hover:none){.md-upgrade-panels :is(#selected-items,#target-item) .remove-btn{opacity:1!important}}
@media(prefers-reduced-motion:reduce){.md-upgrade-panels #chance-arc{transition:none!important}}
@media(max-width:420px){html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .bottom-panel-filters .md-price-bound{width:47px;max-width:47px;min-width:42px;flex:1 1 47px;gap:3px;padding-inline:4px}html:not([data-halloween]):not([data-theme="orange"]) .md-upgrade-panels .bottom-panel-header .panel-title{max-width:30%}}
