/* v148: mobile-first two-tap gem socketing and unclipped action panels. */
body.rift-ui #crafting-dialog[data-category=enhancement] #enhance-now{display:block!important;width:100%;min-height:44px;visibility:visible!important}
body.rift-ui #crafting-dialog[data-category=enhancement] #enhance-now:disabled{display:block!important;opacity:.48}

body.rift-ui #viewport #clear-notice:has(#expedition-reward-summary:not([hidden])){top:30%!important;max-width:min(620px,94vw)!important;width:min(620px,94vw)!important}
#expedition-reward-summary{box-sizing:border-box;width:100%!important;max-height:min(45dvh,270px);overflow-y:auto;pointer-events:auto;overscroll-behavior:contain}
#expedition-reward-summary>div{grid-template-columns:repeat(auto-fit,minmax(128px,1fr))}

:is(#gems-content,#specialization-detail){min-height:0;overflow:hidden}
:is(#gems-content,#specialization-detail)>.utility-summary{flex:0 0 auto;margin:0 8px;border-bottom:1px solid #334956}
:is(#gems-content,#specialization-detail)>.utility-summary summary{min-height:30px;padding:5px 8px;font-size:12px}
:is(#gems-content,#specialization-detail)>.gem-tabs{flex:0 0 38px;min-height:38px}
:is(#gems-content,#specialization-detail)>.gem-tabs button{min-height:36px!important;padding:5px 7px!important;font-size:13px!important}
:is(#gems-content,#specialization-detail)>.gem-page{display:flex;flex-direction:column;min-height:0;overflow:hidden!important;padding:7px 9px!important}
.gem-quick{position:relative;display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:8px;min-height:0;height:100%}
.gem-quick-preview{position:absolute;z-index:12;left:50%;top:50%;width:min(330px,calc(100% - 18px));transform:translate(-50%,-50%);padding:12px;border:1px solid #79cdbb;border-radius:7px;background:#102532f5;box-shadow:0 12px 36px #000c;color:#eaf4f4}
.gem-quick-preview>div{display:flex;align-items:center;gap:10px}.gem-quick-preview>div>span{display:grid;gap:2px}.gem-quick-preview small{color:#9fc4c3}.gem-quick-preview p{margin:9px 0;font-size:13px;line-height:1.5;color:#c9d9df}.gem-quick-preview footer{display:grid;grid-template-columns:1fr 1.4fr;gap:7px}.gem-quick-preview footer button{min-height:38px;border:1px solid #526875;border-radius:5px;background:#243747;color:#eef5f5}.gem-quick-preview footer .gem-primary{border-color:#79cdbb;background:#2c665b}
.gem-quick-bag,.gem-quick-gears{display:flex;flex-direction:column;min-height:0;border:1px solid #344c59;border-radius:6px;background:#101f2a;overflow:hidden}
.gem-quick-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;min-height:34px;padding:5px 8px;border-bottom:1px solid #344c59;background:#172b36}
.gem-quick-head strong{font-size:13px;color:#e6edf0}.gem-quick-head small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#9fc4c3}
.gem-quick-icons{display:grid;grid-template-columns:repeat(auto-fill,44px);align-content:start;gap:5px;padding:7px;overflow-y:auto;overscroll-behavior:contain}
:is(#gems-dialog,#skills-dialog) .gem-quick-icon{position:relative;width:44px;height:44px;min-height:44px;padding:2px;border:1px solid var(--gem-tier);border-radius:5px;background:#091722}
:is(#gems-dialog,#skills-dialog) .gem-quick-icon.selected{outline:2px solid #9bf2df;outline-offset:1px;background:#20463f;box-shadow:0 0 12px #66dfc866}
.gem-quick-icon .gem-badge{width:36px;height:36px;min-width:36px;flex-basis:36px;margin:0;border-width:1px}
.gem-quick-icon .gem-badge b{right:-3px;bottom:-3px;padding:0 3px;font-size:11px}
.gem-quick-icon .new-gem-dot{top:0;right:0;width:7px;height:7px}
.gem-quick-gear-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:6px;overflow-y:auto;overscroll-behavior:contain}
.gem-quick-gear{display:grid;grid-template-columns:70px minmax(0,1fr);align-items:center;gap:5px;min-width:0;min-height:50px;padding:5px;border:1px solid #324754;border-radius:5px;background:#0b1822}
.gem-quick-gear-name{display:flex;align-items:center;gap:5px;min-width:0}.gem-quick-gear-name>img{width:28px;height:28px;object-fit:contain}.gem-quick-gear-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.gem-quick-sockets{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
:is(#gems-dialog,#skills-dialog) .gem-quick-sockets button{display:grid;place-items:center;width:38px;height:38px;min-width:38px;min-height:38px;padding:2px;border:1px solid var(--gem-tier,#526674);border-radius:5px;background:#08141d}
:is(#gems-dialog,#skills-dialog) .gem-quick-sockets button.can-place{cursor:pointer;box-shadow:inset 0 0 0 1px #78d8c266}
:is(#gems-dialog,#skills-dialog) .gem-quick-sockets button.can-place:hover,:is(#gems-dialog,#skills-dialog) .gem-quick-sockets button.can-place:focus-visible{border-color:#a5f4df;background:#173d38}
.gem-quick-sockets .gem-badge{width:31px;height:31px;min-width:31px;flex-basis:31px;margin:0;border-width:1px}.gem-quick-sockets .gem-badge b{right:-3px;bottom:-3px;padding:0 3px;font-size:10px}
.gem-quick-sockets .empty-socket{width:29px;height:29px;border-radius:4px;font-size:18px}

@media(max-width:900px){
 body.rift-ui #viewport #clear-notice:has(#expedition-reward-summary:not([hidden])){top:23%!important;max-width:94vw!important;width:94vw!important}
 #expedition-reward-summary{max-height:min(52dvh,250px);padding:6px}
 #expedition-reward-summary>div{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 #expedition-reward-summary span{grid-template-columns:23px minmax(0,1fr) auto;gap:3px;padding:3px}
 #expedition-reward-summary :is(img,.material-tile-icon,.gear-icon){width:22px;height:22px}
 #expedition-reward-summary b,#expedition-reward-summary strong{font-size:10px}
 #gems-dialog#gems-dialog{height:calc(var(--app-height,100dvh) - 10px)!important;max-height:calc(var(--app-height,100dvh) - 10px)!important}
 :is(#gems-content,#specialization-detail)>.utility-summary{display:block;max-height:104px;overflow:auto}
 :is(#gems-content,#specialization-detail)>.gem-page{padding:5px!important}
 .gem-status{flex:0 0 auto;margin:0 0 4px!important;padding:4px 7px!important;font-size:11px}
 .gem-quick{grid-template-columns:minmax(140px,34%) minmax(0,66%);gap:5px}
 .gem-quick-head{min-height:27px;padding:3px 5px}.gem-quick-head strong{font-size:11px}.gem-quick-head small{font-size:9px}
 .gem-quick-icons{grid-template-columns:repeat(auto-fill,38px);gap:3px;padding:4px}
 :is(#gems-dialog,#skills-dialog) .gem-quick-icon{width:38px;height:38px;min-height:38px;padding:1px}
 .gem-quick-icon .gem-badge{width:33px;height:33px;min-width:33px;flex-basis:33px}
 .gem-quick-gear-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;padding:4px}
 .gem-quick-gear{grid-template-columns:51px minmax(0,1fr);min-height:42px;padding:3px;gap:3px}
 .gem-quick-gear-name>img{width:22px;height:22px}.gem-quick-gear-name strong{font-size:9px}
 .gem-quick-sockets{gap:2px}
 :is(#gems-dialog,#skills-dialog) .gem-quick-sockets button{width:32px;height:32px;min-width:32px;min-height:32px;padding:1px}
 .gem-quick-sockets .gem-badge{width:28px;height:28px;min-width:28px;flex-basis:28px}.gem-quick-sockets .empty-socket{width:26px;height:26px;font-size:16px}
}
@media(max-width:600px) and (orientation:portrait){
 .gem-quick{grid-template-columns:1fr;grid-template-rows:minmax(104px,34%) minmax(0,66%)}
 .gem-quick-icons{grid-template-columns:repeat(auto-fill,38px)}
 .gem-quick-gear-list{grid-template-columns:1fr 1fr}
}
