/* Item loadout picker (menu + room ITEMS chip). The match HUD skill buttons and the BAG tray: hud.css (battle HUD v3). Logic: skills.js
   Look v3 (boss 29 Nov 2026: "slot ni..buat tiles slot ...dan bg ui nmpak menarik lagi"), same look as the lobby (lobby.css Look v3)
   and the daily panels: dark see-through glass, thin gold trim, Cinzel labels, Luckiest Guy title, painted icons. The 6 SLOT
   TILES sit in the title row and stay put; only the item list scrolls. Checked at 844x390 and 667x375 (design/items/). */
#itemsBox { z-index: 30; background: radial-gradient(ellipse at top, rgba(40,30,70,.42), rgba(6,3,16,.84)); }
.panel.items { --gold: #ffd36b; --serif: 'Cinzel', Georgia, 'Times New Roman', serif; --rimg: linear-gradient(180deg, #fff0b8, #e2aa45 45%, #9a6416);
  position: relative; display: flex; flex-direction: column; overflow: hidden; width: min(720px, 100%); padding: 0 14px 10px;
  border-radius: 18px; border: 1.5px solid transparent; color: #f3e6c4;
  background: radial-gradient(70% 55% at 50% 0%, rgba(150,100,230,.28), transparent 70%) padding-box,
    radial-gradient(60% 50% at 100% 100%, rgba(255,150,60,.10), transparent 70%) padding-box,
    linear-gradient(180deg, rgba(34,24,70,.93), rgba(14,9,30,.95)) padding-box,
    linear-gradient(180deg, rgba(255,226,150,.92), rgba(160,100,24,.72)) border-box;
  box-shadow: 0 18px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,240,200,.18), inset 0 0 0 3px rgba(8,5,18,.35); }
/* the title row: ITEMS + slots count | the 6 tiles | X */
.itp .ith { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 0 4px; background: transparent; }
.itp .itt { flex: none; min-width: 0; }
.itp h2 { display: flex; align-items: center; gap: 6px; margin: 0; font: 400 24px/1 'Luckiest Guy', system-ui, sans-serif; letter-spacing: .05em;
  color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.itp h2 img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.itp .itsub { margin-top: 4px; font: 700 10.5px/1 var(--serif); letter-spacing: .1em; text-transform: uppercase; color: #d9cdee; white-space: nowrap; }
.itp .itsub.full { color: var(--gold); }
.itp .close { border-color: rgba(255,214,120,.5); background: rgba(12,8,26,.5); color: #ffe7a6; }
/* gold rule with diamond ends under the title row */
.itp .itrule { flex: none; position: relative; height: 1px; margin: 4px 6px 8px;
  background: linear-gradient(90deg, transparent, rgba(255,214,120,.75) 12%, #ffe9a8 50%, rgba(255,214,120,.75) 88%, transparent); }
.itp .itrule::before, .itp .itrule::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; transform: rotate(45deg);
  background: linear-gradient(135deg, #fff0b8, #c98a26); box-shadow: 0 0 4px rgba(255,200,90,.6); }
.itp .itrule::before { left: 8%; } .itp .itrule::after { right: 8%; }

/* ---------- the 6 slot tiles ---------- */
.itslots { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.itslot { position: relative; min-width: 0; height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px;
  border-radius: 11px; border: 1.5px solid transparent; color: #fff3d2; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 30%, rgba(255,200,90,.30), transparent 75%) padding-box,
    linear-gradient(180deg, rgba(70,46,120,.9), rgba(24,14,48,.94)) padding-box, var(--rimg) border-box;
  box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,240,200,.2); }
.itslot .ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 22px; }
.itslot .ic img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.itslot .tn { min-width: 0; font: 700 10.5px/1.15 var(--serif); color: #f8dc94; text-align: left; text-shadow: 0 1px 2px #000;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* the small x in the corner: a tap on the tile takes that copy out */
.itslot > i { position: absolute; top: 3px; right: 4px; font: 900 8px/1 system-ui, sans-serif; font-style: normal; color: rgba(255,231,166,.75); }
button.itslot { cursor: pointer; }
button.itslot:active { transform: scale(.96); }
@media (hover: hover) { button.itslot:hover > i { color: #ff8a7a; } }
.itslot:disabled { cursor: default; } .itslot:disabled > i { display: none; }
.itslot.pop { animation: itPop .32s ease-out; }
@keyframes itPop { 0% { transform: scale(.6); opacity: .2; } 70% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
.itslot.empty { background: rgba(12,8,26,.35); border: 1.5px dashed rgba(255,214,120,.45); box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
.itslot.empty b { font: 700 13px/1 var(--serif); color: rgba(255,214,120,.35); }

/* ---------- PRESETS: 3 tabs (preset 1 free; 2-3 open with level + coins; the one in use can be renamed) ---------- */
.itpre { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 7px; }
.itpre .pt { position: relative; min-width: 0; display: flex; align-items: stretch; height: 44px; border-radius: 11px; border: 1px solid transparent; overflow: hidden;
  background: linear-gradient(180deg, rgba(40,28,80,.6), rgba(16,10,34,.7)) padding-box, linear-gradient(180deg, rgba(255,226,150,.4), rgba(140,90,20,.3)) border-box; }
.itpre .pt.on { border-width: 1.5px; background: radial-gradient(80% 100% at 50% 0%, rgba(255,200,90,.32), transparent 75%) padding-box,
    linear-gradient(180deg, rgba(96,62,140,.85), rgba(34,18,56,.9)) padding-box, var(--rimg) border-box; box-shadow: 0 0 12px rgba(255,200,80,.3); }
.itpre .pt.lk { background: rgba(10,6,22,.45) padding-box, linear-gradient(180deg, rgba(255,226,150,.28), rgba(140,90,20,.2)) border-box; }
.itpre .pt.arm { box-shadow: 0 0 0 1.5px #ffd36b, 0 0 14px rgba(255,200,80,.45); }
.itpre .ptb { flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 6px;
  background: none; border: 0; color: inherit; cursor: pointer; }
.itpre .ptb b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 12px/1.05 var(--serif); color: #e9dcc0; text-shadow: 0 1px 2px #000; }
.itpre .pt.on .ptb b { color: var(--gold); }
.itpre .ptb small { display: inline-flex; align-items: center; gap: 3px; font: 700 9px/1 var(--serif); letter-spacing: .06em; text-transform: uppercase; color: #b9aed0; white-space: nowrap; }
.itpre .ptb small img { width: 12px; height: 12px; object-fit: contain; }
.itpre .pt.lk .ptb b { color: #c9bda2; }
.itpre .pt.lk .ptb small.pr { color: #f8dc94; }
.itpre .lock { display: inline-block; width: 9px; height: 8px; margin: 0 5px 0 0; border-radius: 2px; background: #c9a35a; position: relative; top: -1px; }
.itpre .lock::before { content: ""; position: absolute; left: 1.5px; top: -5px; width: 6px; height: 6px; border: 1.5px solid #c9a35a; border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }
.itpre .ped { flex: none; width: 44px; min-height: 44px; display: grid; place-items: center; padding: 0; background: none; border: 0; border-left: 1px solid rgba(255,214,120,.25);
  color: #ffe7a6; font: 800 16px/1 system-ui, sans-serif; cursor: pointer; }
.itpre .ped svg { width: 16px; height: 16px; }
.itpre .ptin { flex: 1; min-width: 0; margin: 6px 0 6px 8px; padding: 0 8px; border-radius: 8px; border: 1px solid rgba(255,214,120,.55); background: rgba(8,5,18,.7);
  color: #fff3d2; font: 700 13px/1 var(--serif); outline: none; }
.itpre .ptin:focus { border-color: #ffd36b; box-shadow: 0 0 0 2px rgba(255,211,107,.25); }
.itpre button:disabled { cursor: default; opacity: .7; }

/* ---------- the item list (scrolls) ---------- */
#itList { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 6px; padding: 2px 4px 2px 0; align-content: start; }
.itpick { position: relative; display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto; column-gap: 9px; row-gap: 1px; text-align: left;
  min-height: 56px; padding: 6px 10px 6px 7px; border-radius: 12px; border: 1px solid transparent; color: #f3e6c4;
  background: linear-gradient(180deg, rgba(40,28,80,.62), rgba(16,10,34,.72)) padding-box,
    linear-gradient(180deg, rgba(255,226,150,.38), rgba(140,90,20,.3)) border-box; }
.itpick .ic { grid-row: span 2; align-self: center; width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(90,60,140,.7), rgba(10,6,22,.9) 70%); box-shadow: inset 0 0 0 1px rgba(255,214,120,.45), 0 2px 5px rgba(0,0,0,.45); }
.itpick .ic img { width: 36px; height: 36px; object-fit: contain; display: block; border-radius: 7px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); }
.itpick .nm { align-self: end; font: 700 13px/1.15 var(--serif); color: #f8e4b0; text-shadow: 0 1px 2px #000; }
.itpick .sl { grid-column: 3; grid-row: 1; align-self: end; display: inline-flex; align-items: center; gap: 3px; font: 700 9px/1 var(--serif); letter-spacing: .06em; text-transform: uppercase; color: #cbb98f; white-space: nowrap; }
.itpick .sl i { width: 6px; height: 6px; transform: rotate(45deg); background: linear-gradient(135deg, #fff0b8, #c98a26); }
.itpick .sl i:last-of-type { margin-right: 2px; }
.itpick .nm { grid-column: 2; grid-row: 1; }
.itpick .ds { grid-column: 2 / 4; grid-row: 2; font-size: 11px; line-height: 1.3; color: #cdbfe0; }
.itpick.on { background: radial-gradient(80% 90% at 0% 50%, rgba(255,190,80,.32), transparent 70%) padding-box,
    linear-gradient(180deg, rgba(90,60,130,.82), rgba(34,18,56,.88)) padding-box, var(--rimg) border-box;
  border-width: 1.5px; box-shadow: 0 0 14px rgba(255,200,80,.35); }
.itpick.on .nm { color: var(--gold); }
.itpick.on .ic { box-shadow: inset 0 0 0 1.5px #ffd36b, 0 0 10px rgba(255,200,80,.5); }
.itpick.full { opacity: .42; }
.itpick.full .ic img { filter: grayscale(.6); }
@media (hover: hover) { .itpick:not(:disabled):not(.full):hover { filter: brightness(1.12); } }
.itnote { flex: none; font: 600 10px/1.3 var(--serif); color: #b9aed0; text-align: center; }
#itemsBox .itlock { flex: none; }
/* phone landscape: still 44 px touch targets (Apple / Google minimum), only tighter gaps */
@media (max-height: 420px) {
  .panel.items { padding: 0 12px 8px; }
  .itp .ith { padding-top: 8px; gap: 10px; }
  #itList { gap: 5px; }
  .itpick { padding: 5px 8px 5px 6px; min-height: 52px; }
  .itnote { font-size: 9.5px; }
}
@media (max-width: 700px) {
  .itp h2 { font-size: 21px; } .itp h2 img { width: 26px; height: 26px; }
  .itslot .ic { width: 34px; height: 34px; }
  .itslot .tn { font-size: 9.5px; }
}

/* a stackable item (Double Shot x3): the − takes one copy out (44 px target round a small round face) */
.itpick .minus { position: absolute; bottom: 0; right: 2px; width: 44px; height: 44px; display: grid; place-items: center; font: 800 20px/1 sans-serif; color: var(--gold); cursor: pointer; z-index: 1; }
.itpick .minus::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(0,0,0,.35); z-index: -1; }
.itpick:has(.minus) .ds { padding-right: 40px; }
/* the round − sits low in its 44 px target so it never covers the "2 SLOTS" label above it */
.itpick .minus { place-items: end center; padding-bottom: 7px; box-sizing: border-box; bottom: -2px; }
.itpick .minus::before { top: auto; bottom: 2px; }
