/* COSTA FPS — item shop screen. Uses the game's tokens (--panel, --line, --hf, --premium, --gold…). */
#item-shop { position: fixed; inset: 0; z-index: 55; display: none; flex-direction: column; align-items: stretch; justify-content: flex-start; background: radial-gradient(120rem 70rem at 50% -10%, #182538, #0b0f14 70%); color: var(--ink); font-family: var(--bf); }
#item-shop.in { animation: sh-fade 0.25s ease-out; }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sh-in { from { opacity: 0; transform: translateY(0.8rem); } to { opacity: 1; transform: none; } }
@keyframes sh-slide { from { opacity: 0; transform: translateX(2rem); } to { opacity: 1; transform: none; } }
@keyframes sh-pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes sh-shimmer { from { background-position: -40rem 0; } to { background-position: 40rem 0; } }

/* header */
.sh-head { display: flex; align-items: center; gap: 1.6rem; padding: 1.2rem 2.4rem 0.8rem; flex-wrap: wrap; }
.sh-title { display: flex; align-items: baseline; gap: 1.4rem; flex-wrap: wrap; }
.sh-title h1 { margin: 0; font-size: 3.4rem; font-weight: 900; letter-spacing: 0.12em; line-height: 1; }
.sh-mock { font-family: var(--hf); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.16em; color: #ffb020; border: 1px solid rgba(255,176,32,0.4); padding: 0.25rem 0.6rem; border-radius: 0.3rem; }
.sh-wallet { margin-left: auto; display: flex; gap: 0.8rem; }
.sh-cur { display: flex; align-items: center; gap: 0.6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.55rem 0.9rem; font-family: var(--hf); font-weight: 800; font-size: 1.7rem; letter-spacing: 0.04em; }
.cur-ic { width: 1em; height: 1em; vertical-align: -0.12em; display: inline-block; }
.sh-cur .ic { font-size: 1.6rem; line-height: 0; } .sh-cur.premium .ic, .sh-cur.premium .amt { color: var(--premium); } .sh-cur.gold .ic, .sh-cur.gold .amt { color: var(--gold); }
.sh-cur .nm { font-size: 1rem; letter-spacing: 0.18em; color: var(--muted); }
.sh-cur .plus { width: 2.4rem; height: 2.4rem; border-radius: 0.3rem; background: var(--premium); color: #140a26; font-weight: 900; font-size: 1.6rem; line-height: 1; }
.sh-close { width: 3.6rem; height: 3.6rem; border-radius: 0.4rem; background: rgba(255,255,255,0.08); border: 1px solid var(--line); font-size: 1.7rem; }
.sh-close:hover { background: rgba(255,255,255,0.16); }
.sh-cd { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--hf); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-size: 1.25rem; color: #c7d1de; }
.sh-cd .lb { color: var(--muted); } .sh-cd .tm { font-variant-numeric: tabular-nums; color: #fff; }
.sh-cd.mini { position: absolute; left: 0.6rem; bottom: 0.6rem; font-size: 1rem; background: rgba(8,11,16,0.75); padding: 0.25rem 0.55rem; border-radius: 0.3rem; }

/* navigation */
.sh-nav { display: flex; gap: 0.4rem; padding: 0.4rem 2.4rem 0.9rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.sh-nav::-webkit-scrollbar { display: none; }
.sh-tab { flex: 0 0 auto; position: relative; background: rgba(255,255,255,0.05); border: 1px solid transparent; padding: 0.75rem 1.3rem; border-radius: 0.4rem; font-family: var(--hf); font-weight: 800; font-size: 1.35rem; letter-spacing: 0.12em; text-transform: uppercase; color: #c7d1de; transition: background 0.15s, color 0.15s, transform 0.15s; }
.sh-tab i { font-style: normal; margin-left: 0.5rem; font-size: 1rem; color: var(--muted); }
.sh-tab:hover { background: rgba(255,255,255,0.12); color: #fff; }
.sh-tab.on { background: var(--blue); color: #fff; box-shadow: 0 0.4rem 1.4rem rgba(63,169,245,0.35); } .sh-tab.on i { color: rgba(255,255,255,0.8); }

/* body: scrolling main + optional detail column */
.sh-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.sh-body.has-detail { grid-template-columns: minmax(0, 1fr) min(44rem, 40vw); }
.sh-main { overflow: auto; padding: 1.4rem 2.4rem 3rem; }
.sh-tools { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 1rem; color: var(--muted); font-size: 1.15rem; flex-wrap: wrap; }
.sh-sel select { margin-left: 0.5rem; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 0.35rem; padding: 0.4rem 0.6rem; font-family: var(--bf); font-size: 1.1rem; }
.sh-chk { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.sh-sh { display: flex; align-items: baseline; gap: 1rem; margin: 0.4rem 0 1rem; }
.sh-sh h2 { margin: 0; font-size: 2.2rem; font-weight: 900; letter-spacing: 0.1em; } .sh-sh .n { color: var(--muted); font-size: 1.1rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* grids */
.sh-grid.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 44vw), 1fr)); gap: 1.1rem; }
.sh-grid.featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 44vw), 1fr)); grid-auto-rows: 15rem; grid-auto-flow: dense; gap: 1.1rem; }
.sh-grid.featured .sh-card.sz-lg { grid-column: span 2; grid-row: span 2; }
.sh-grid.featured .sh-card.sz-md { grid-row: span 2; }
.sh-grid.featured .sh-card.sz-sm { grid-row: span 2; }
.sh-grid.featured .sh-card.sz-lg .sh-name { font-size: 2.3rem; }

/* card */
.sh-card { --rc: #9aa3ad; --rg: rgba(154,163,173,0.25); position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; overflow: hidden; cursor: pointer; outline: none; animation: sh-in 0.35s both; animation-delay: calc(var(--i, 0) * 28ms); transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s; }
.sh-card:hover, .sh-card:focus-visible { transform: translateY(-0.3rem); border-color: var(--rc); box-shadow: 0 1rem 2.4rem rgba(0,0,0,0.45), 0 0 0 1px var(--rc), 0 0 2.4rem var(--rg); }
.sh-card.bought { animation: sh-pop 0.5s ease-out; }
.sh-art { position: relative; flex: 1; min-height: 11rem; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 28%, #1a2230), #0f1520 72%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sh-art:after { content: ""; position: absolute; inset: auto 0 0 0; height: 0.25rem; background: var(--rc); opacity: 0.9; }
.sh-art > img { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 0.6rem; transition: transform 0.25s; }
.sh-card:hover .sh-art > img { transform: scale(1.06); }
.sh-collage { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem; padding: 0.4rem; }
.sh-collage.n1 { grid-template-columns: 1fr; } .sh-collage.n3 img:first-child { grid-row: span 2; }
.sh-collage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: radial-gradient(circle at 50% 40%, #2a3448, #141b26 75%); border-radius: 0.3rem; }
.sh-badges { position: absolute; top: 0.6rem; left: 0.6rem; right: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem; pointer-events: none; }
.bd { font-family: var(--hf); font-weight: 900; font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.22rem 0.5rem; border-radius: 0.25rem; background: rgba(8,11,16,0.8); color: #dfe7f1; }
.bd.new { background: var(--yellow); color: #1a1400; } .bd.off { background: #ff4d6d; color: #fff; } .bd.lot { background: var(--blue); color: #fff; } .bd.soon { background: #ffb020; color: #1a1400; } .bd.pack { background: rgba(185,140,255,0.22); color: #d7c3ff; }
.sh-owned { position: absolute; right: 0.6rem; bottom: 0.6rem; font-family: var(--hf); font-weight: 900; font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); background: rgba(8,11,16,0.8); border: 1px solid rgba(79,227,143,0.4); padding: 0.25rem 0.6rem; border-radius: 0.3rem; }
.sh-card.owned .sh-art > img, .sh-card.owned .sh-collage { filter: saturate(0.6) brightness(0.85); }
.sh-card.soon .sh-art > img { filter: grayscale(0.4) brightness(0.8); }
.sh-info { padding: 0.7rem 0.85rem 0.85rem; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.sh-rar { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--hf); font-weight: 800; font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rc); }
.sh-rar .st { letter-spacing: 0; font-size: 0.95rem; }
.sh-name { font-family: var(--hf); font-weight: 800; font-size: 1.65rem; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.1; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.3rem; flex-wrap: wrap; }
.sh-part { font-size: 1rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.sh-price { font-family: var(--hf); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.04em; white-space: nowrap; display: inline-flex; align-items: baseline; gap: 0.5rem; margin-left: auto; }
.sh-price s { color: var(--muted); font-size: 1.1rem; font-weight: 600; } .sh-price.premium b { color: var(--premium); } .sh-price.gold b { color: var(--gold); } .sh-price.big b { font-size: 2.6rem; }

/* showcase renders (studio background baked in): no padding, background matched to the render */
.sh-card.photo .sh-art, .sh-dart.photo, .sh-mart.photo { background: #0d141e; }
.sh-card.photo .sh-art > img, .sh-dart.photo > img, .sh-mart.photo img { padding: 0; object-fit: cover; object-position: 50% 12%; }
.sh-grid.featured .sh-card.photo.sz-lg .sh-art > img, .sh-dart.photo > img { object-fit: contain; }
.sh-collage img { object-fit: cover; object-position: 50% 10%; }

/* skeleton / states */
.sh-card.sk { cursor: default; pointer-events: none; border-color: var(--line); min-height: 20rem; }
.sh-card.sk .sh-art, .sh-card.sk .ln { background: linear-gradient(90deg, #141b26 0%, #1d2736 50%, #141b26 100%); background-size: 80rem 100%; animation: sh-shimmer 1.4s linear infinite; }
.sh-card.sk .ln { height: 1rem; border-radius: 0.3rem; margin: 0.35rem 0; } .ln.w40 { width: 40%; } .ln.w80 { width: 80%; } .ln.w30 { width: 30%; }
.sh-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 5rem 2rem; color: var(--muted); font-size: 1.4rem; text-align: center; }
.sh-state .ic { width: 5rem; height: 5rem; border-radius: 50%; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; font-family: var(--hf); font-size: 2.4rem; font-weight: 900; }
.sh-state.err .ic { color: #ff4d6d; border-color: rgba(255,77,109,0.5); }

/* buttons */
.sh-btn { background: var(--blue); color: #fff; padding: 0.9rem 1.8rem; border-radius: 0.4rem; font-family: var(--hf); font-weight: 900; font-size: 1.4rem; letter-spacing: 0.12em; transition: filter 0.12s, transform 0.12s; }
.sh-btn:hover { filter: brightness(1.1); } .sh-btn:active { transform: scale(0.97); }
.sh-btn.y { background: var(--yellow); color: #1a1400; } .sh-btn.ghost { background: rgba(255,255,255,0.08); }
.sh-buy { width: 100%; background: var(--yellow); color: #1a1400; padding: 1.1rem 1.6rem; border-radius: 0.45rem; font-family: var(--hf); font-weight: 900; font-size: 1.7rem; letter-spacing: 0.12em; box-shadow: 0 0.6rem 1.8rem rgba(255,208,51,0.25); transition: transform 0.12s, filter 0.12s, box-shadow 0.12s; }
.sh-buy:hover { filter: brightness(1.08); box-shadow: 0 0.8rem 2.2rem rgba(255,208,51,0.4); } .sh-buy:active { transform: scale(0.98); }
.sh-buy.cant { background: #2a3140; color: #8a97a8; box-shadow: none; }
button.busy { opacity: 0.6; cursor: wait; }

/* detail */
.sh-detail { --rc: #9aa3ad; --rg: rgba(154,163,173,0.25); border-left: 1px solid var(--line); background: var(--panel2); overflow: auto; display: flex; flex-direction: column; animation: sh-slide 0.25s ease-out; }
.sh-back { align-self: flex-start; margin: 1rem 1.4rem 0; background: rgba(255,255,255,0.08); border-radius: 0.35rem; padding: 0.5rem 0.9rem; font-family: var(--hf); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.1em; text-transform: uppercase; }
.sh-dart { position: relative; margin: 1rem 1.4rem 0; height: 28rem; flex: 0 0 auto; border-radius: 0.6rem; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 32%, #1a2230), #0f1520 72%); box-shadow: inset 0 0 0 1px var(--rc), 0 0 3rem var(--rg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sh-dart > img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.sh-dinfo { padding: 1.2rem 1.4rem 2rem; display: flex; flex-direction: column; gap: 0.7rem; }
.sh-dinfo h2 { margin: 0; font-size: 2.6rem; font-weight: 900; letter-spacing: 0.04em; line-height: 1.05; overflow-wrap: anywhere; }
.sh-pack { font-family: var(--hf); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.16em; text-transform: uppercase; color: #d7c3ff; }
.sh-desc { margin: 0; color: #c7d1de; font-size: 1.25rem; line-height: 1.45; }
.sh-incl h4 { margin: 0.4rem 0 0.5rem; font-size: 1.1rem; letter-spacing: 0.16em; color: var(--muted); }
.sh-incl ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.sh-incl li { display: flex; align-items: center; gap: 0.7rem; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-left: 3px solid var(--rc); border-radius: 0.35rem; padding: 0.4rem 0.6rem; font-size: 1.15rem; }
.sh-incl li img { width: 3.2rem; height: 3.2rem; object-fit: contain; border-radius: 0.3rem; background: rgba(0,0,0,0.3); }
.sh-incl li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sh-incl li .pr { color: var(--muted); font-family: var(--hf); font-weight: 800; letter-spacing: 0.05em; }
.sh-incl li.own { opacity: 0.75; } .sh-incl li.own .pr { color: var(--green); }
.sh-sav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 0.6rem; font-size: 1.1rem; color: var(--muted); }
.sh-sav b { color: var(--ink); font-family: var(--hf); font-size: 1.3rem; } .sh-sav .save b { color: var(--green); }
.sh-dprice { margin-top: 0.4rem; }
.sh-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.sh-have { text-align: center; font-family: var(--hf); font-weight: 900; font-size: 1.5rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); background: rgba(79,227,143,0.1); border: 1px solid rgba(79,227,143,0.35); padding: 1rem; border-radius: 0.45rem; }
.sh-have.soon { color: #ffb020; background: rgba(255,176,32,0.08); border-color: rgba(255,176,32,0.35); }
.sh-warn { color: #ff4d6d; font-family: var(--hf); font-weight: 800; letter-spacing: 0.08em; font-size: 1.2rem; }
.sh-hint { color: var(--muted); font-size: 1.1rem; }

/* purchase modal */
.sh-modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.72); z-index: 5; animation: sh-fade 0.18s; }
.sh-mbox { --rc: #9aa3ad; width: min(40rem, 92vw); background: var(--panel2); border: 1px solid var(--line2); border-radius: 0.7rem; padding: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; text-align: center; box-shadow: var(--sh); animation: sh-in 0.22s ease-out; }
.sh-mbox h3 { margin: 0; font-size: 1.9rem; font-weight: 900; letter-spacing: 0.12em; }
.sh-mart { height: 16rem; border-radius: 0.5rem; background: radial-gradient(circle at 50% 40%, #223047, #0f1520 70%); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.sh-mart img { width: 100%; height: 100%; object-fit: contain; padding: 0.8rem; }
.sh-mname { font-family: var(--hf); font-weight: 900; font-size: 2rem; letter-spacing: 0.04em; text-transform: uppercase; overflow-wrap: anywhere; }
.sh-mprice { font-family: var(--hf); font-weight: 900; font-size: 2.4rem; } .sh-mprice.premium { color: var(--premium); } .sh-mprice.gold { color: var(--gold); }
.sh-mbal { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; color: var(--muted); font-size: 1.15rem; }
.sh-mbal b { display: block; font-family: var(--hf); font-size: 1.6rem; } .sh-mbal b.premium { color: var(--premium); } .sh-mbal b.gold { color: var(--gold); } .sh-mbal b.neg { color: #ff4d6d; }
.sh-mbtns { display: flex; gap: 0.8rem; justify-content: center; margin-top: 0.4rem; } .sh-mbtns .sh-btn { flex: 1; }

/* toast */
.sh-toast { position: absolute; left: 50%; bottom: 2.6rem; transform: translate(-50%, 1.6rem); background: #1b2740; border: 1px solid var(--line2); padding: 0.9rem 1.6rem; border-radius: 0.5rem; font-family: var(--hf); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.06em; opacity: 0; transition: 0.2s; pointer-events: none; z-index: 6; }
.sh-toast.show { opacity: 1; transform: translate(-50%, 0); } .sh-toast.ok { border-color: rgba(79,227,143,0.5); color: var(--green); } .sh-toast.bad { border-color: rgba(255,77,109,0.5); color: #ff8ea1; }

/* responsive */
@media (max-width: 1100px) { .sh-body.has-detail { grid-template-columns: minmax(0, 1fr) min(36rem, 46vw); } .sh-dart { height: 22rem; } }
@media (max-width: 760px) {
  .sh-head { padding: 1rem 1.2rem 0.6rem; gap: 0.8rem; } .sh-title h1 { font-size: 2.6rem; } .sh-nav, .sh-main { padding-left: 1.2rem; padding-right: 1.2rem; }
  .sh-cur { font-size: 1.4rem; padding: 0.45rem 0.7rem; } .sh-cur .nm { display: none; }
  .sh-grid.grid, .sh-grid.featured { grid-template-columns: repeat(auto-fill, minmax(min(15rem, 46vw), 1fr)); } .sh-grid.featured { grid-auto-rows: 13rem; }
  .sh-grid.featured .sh-card.sz-lg .sh-name { font-size: 1.7rem; }
  .sh-body.has-detail { grid-template-columns: minmax(0, 1fr); } .sh-body.has-detail .sh-main { display: none; }
  .sh-detail { border-left: 0; }
}
@media (max-width: 480px) { .sh-grid.grid, .sh-grid.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sh-grid.featured .sh-card.sz-lg { grid-column: span 2; } }
