/* Inventory artwork frames the same selectable pieces, board and dice used in play. */
#dlgInv {
  --night: #07051c;
  --gold: #ffe4a3;
  --gold-rim: linear-gradient(160deg,#fff8c4 1%,#a54b12 11%,#ffd166 26%,#fff5d5 37%,#ae570d 54%,#fff0aa 72%,#ee9225 89%,#fff7c0);
  width: min(1440px, 94vw, 172dvh);
  max-width: calc(100vw - 8px);
  max-height: 98dvh;
  border: 0;
  margin: auto;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
  container-type: inline-size;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  color: #fff9f9;
  isolation: isolate;
}
#dlgInv[open] {display: flex; flex-direction: column;}
#dlgInv::backdrop {background: rgb(3 1 17 / 69%); backdrop-filter: blur(3px);}
#dlgInv::before {
  content: ""; position: absolute; z-index: -1;
  inset: 2.4cqw .65cqw 2.4cqw; border-radius: 4.7cqw;
  background: radial-gradient(ellipse at 63% 10%,#221047,transparent 58%), var(--night);
  box-shadow: 0 .65cqw 2.8cqw #03010f;
}
#dlgInv :is(.invMast,.invBody,.invFoot,.invCol) {box-sizing: border-box;}
#dlgInv .invMast {
  position: relative; flex: none; display: flex; align-items: center;
  justify-content: space-between; height: 10.58cqw; padding: 2.1cqw 4.05cqw 0 20.7cqw;
  background: url('mast.webp') center/100% 100% no-repeat;
}
#dlgInv .invMast h2 {
  margin: 0; padding: 0; font: bold 5.12cqw/1 Georgia,serif;
  letter-spacing: -.025em; color: #ffde8a; text-shadow: 0 1px #fff1bb,0 3px #8f430d,0 4px 7px #180410;
}
#dlgInv button {cursor: pointer; touch-action: manipulation; font-family: inherit;}
#dlgInv .invClose, #dlgInv .invEquip, #dlgInv .invSel, #dlgInv .invName {
  display: grid; place-content: center; justify-self: center; box-sizing: border-box;
  border: 2px solid transparent; border-radius: 999px;
  background: linear-gradient(#29173e,#100b28 49%,#080722 56%,#321439) padding-box, var(--gold-rim) border-box;
  text-shadow: 0 2px 3px black; color: #fff8f1; font-family: Georgia,serif;
}
#dlgInv .invClose {
  padding: .5cqw 1.65cqw; min-height: 3.9cqw; font-size: 1.9cqw; font-weight: bold;
  --button-bevel: inset 0 0 .5cqw #fbac5460, 0 0 .35cqw #ef9f31; box-shadow:var(--button-bevel);
}
#dlgInv .invScroll {min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; scrollbar-color:#986aaa #140724;}
#dlgInv .invBody {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9cqw;
  padding: .22cqw 4.25cqw .38cqw; margin:0;
  background: url('rail-left.webp') left/1.64% 100% no-repeat, url('rail-right.webp') right/1.7% 100% no-repeat;
}
#dlgInv .invCol {
  position: relative; display: grid; justify-items: center; align-items: center; min-width: 0;
  container-type: inline-size; border: 0; border-radius: 0; padding: 0; gap: 0;
  aspect-ratio: 425/487; grid-template-columns: minmax(0,1fr);
  grid-template-rows: 7% 9% 44% 11% 6.8% 4.6% 14.5% 3.1%;
  background: transparent;
  isolation: isolate;
}
#dlgInv .invCol[data-inv-kind=theme] {--trim:url('card-1.webp');}
#dlgInv .invCol[data-inv-kind=skin] {--trim:url('card-2.webp');}
#dlgInv .invCol[data-inv-kind=dice] {--trim:url('card-3.webp');}
#dlgInv .invCol::before {
  content:""; position:absolute; z-index:-1; inset:5.5% 2.3% 1.8%; border-radius:8%;
  background:
    linear-gradient(180deg,#0d0629 2%,transparent 23%,#110b3945 55%,#090523 85%),
    radial-gradient(ellipse at center,#1d154545 10%,#09032460 75%),
    url('../../DISKILAY_35_royal_home_background.webp') center 53%/200% auto;
}
#dlgInv .invCol::after {
  content:""; position:absolute; z-index:-1; inset:0; pointer-events:none; background:var(--trim) center/100% 100% no-repeat;
}
#dlgInv .invCol h3 {
  grid-row:2; margin:0; padding:0; font:bold 6.6cqw/1.05 Georgia,serif;
  color:var(--gold); text-shadow:0 2px 2px #16031b,0 0 5px #4d1f5a; text-align:center;
}
#dlgInv .invCol h3::before, #dlgInv .invCol h3::after {content:"✦"; color:#ffd16c; font-size:.72em; margin:0 .45em;}
#dlgInv .invCar {
  grid-row:3; display:grid; grid-template-columns:14% minmax(0,1fr) 14%;
  width:95%; height:100%; align-items:center; gap:0;
}
#dlgInv .invArr {
  width:100%; height: min(17cqw,100%); min-width:0; padding:0; margin:0;
  border:0; border-radius:20%; --button-bevel:none; box-shadow:none;
  background:transparent url('arrow.webp') center/contain no-repeat; appearance:none;
}
#dlgInv .invForward {transform:scaleX(-1);}
#dlgInv button:enabled:hover {filter:brightness(1.16);}
#dlgInv button:focus-visible {outline:2px solid #9cedff; outline-offset:2px;}
#dlgInv .invPrev {width:100%; min-width:0; height:100%; min-height:0; container-type:inline-size; display:grid; place-items:center;}
#dlgInv .invRealBoard,#dlgInv .invRealPieces {width:100%; height:100%; max-height:100%; max-width:none;}
#dlgInv .invRealDice {--ds:clamp(23px,29cqw,90px); gap:calc(var(--ds)*.60);}
#dlgInv .invName {
  grid-row:4; width:73%; min-height:8.7cqw; padding:.45cqw 2.2cqw;
  font-size:4.7cqw; font-weight:bold; line-height:1.04; text-align:center; overflow-wrap:anywhere;
  box-shadow:0 0 5px #d17aff7a;
}
#dlgInv .invCount {grid-row:5; color:#f8f2ff; font: bold 4.6cqw/1 Georgia,serif; text-shadow:0 1px 3px #010013;}
#dlgInv .invDots {display:flex; grid-row:6; align-items:center; justify-content:center; gap:1.3cqw;}
#dlgInv .invDots i {
  width:2.55cqw; aspect-ratio:1; border-radius:50%; border:1px solid #bc9be3;
  background:radial-gradient(circle at 42% 34%,#6224d5,#1a0739 70%); box-shadow:0 1px 2px #040010;
}
#dlgInv .invDots .current {border-color:#ffe9a1; background:radial-gradient(circle at 38% 29%,white,#ffbe12 45%,#ad4603 86%); box-shadow:0 0 5px #ffae46;}
#dlgInv .invSel,#dlgInv .invEquip {grid-row:7; width:55%; min-height:10.4cqw; padding:1cqw 2cqw; font-size:5.6cqw; font-weight:bold; line-height:1;}
#dlgInv .invSel {
  display:flex; align-items:center; justify-content:center; gap:.3em; color:#f2ffe6;
  background:linear-gradient(#163d3b,#031d1c 50%,#052a1d) padding-box,linear-gradient(165deg,#b7ffff,#15d5fe 30%,#66ff87 73%,#ecffa4) border-box;
  box-shadow:inset 0 0 8px #48f4a66b,0 0 8px #2ce3e371;
}
#dlgInv .invSel i {color:#b4ff83; font-style:normal;}
#dlgInv .invEquip {color:#fff7d9; background:linear-gradient(#ef9e22,#8a3c02 49%,#632503 52%,#cf7e12) padding-box,var(--gold-rim) border-box; box-shadow:0 0 8px #fcab4080 !important;}
#dlgInv .invFoot {height:11.3cqw; display:grid; align-items:center; padding:0 22% 3.05cqw 25.5%; background:url('foot.webp') center/100% 100% no-repeat;}
#dlgInv .invFoot p {margin:0; color:#fff9ff; text-align:center; font:500 1.45cqw/1.35 "Golos Text",Arial,sans-serif; text-shadow:0 1px 3px #100521;}
#dlgInv .invFoot strong {color:#ffdc82; font-weight:700;}
@media (max-width:680px) and (orientation:portrait), (max-width:500px){
  #dlgInv {width:min(97vw,530px); max-height:95dvh; border:2px solid #e6b96b; border-radius:18px; overflow:hidden; background:#0b0824;}
  #dlgInv::before {display:none;}
  #dlgInv .invMast {height:clamp(68px,19cqw,95px); padding:0 4% 0 21%; background-size:120% 110%; background-position:16% center; background-color:#100829;}
  #dlgInv .invMast h2 {font-size:clamp(24px,6.8cqw,35px);}
  #dlgInv .invClose {font-size:15px; min-height:37px; padding:3px 12px;}
  #dlgInv .invBody {grid-template-columns:1fr; gap:9px; padding:7px 5% 9px; background:#0c0929;}
  #dlgInv .invCol {width:min(100%,390px); justify-self:center;}
  #dlgInv .invFoot {height:auto; min-height:90px; padding:15px 9% 24px; background-size:160% 100%;}
  #dlgInv .invFoot p {font-size:13px;}
}
@media (orientation:landscape) and (max-height:520px) {
  #dlgInv {width:min(99vw,180dvh); max-height:98dvh;}
  #dlgInv .invClose {min-height:27px;font-size:max(12px,1.9cqw);}
  #dlgInv .invFoot p {font-size:max(10px,1.45cqw);}
}
