:root{
  --shop-bg:#08111f;
  --shop-panel:rgba(10,19,39,.86);
  --shop-panel-2:rgba(16,29,56,.84);
  --shop-line:rgba(148,163,184,.18);
  --shop-text:#f8fbff;
  --shop-muted:#b8c7de;
  --shop-cyan:#38bdf8;
  --shop-gold:#f59e0b;
  --shop-purple:#c084fc;
}
body.shop-body{
  margin:0;
  min-height:100vh;
  color:var(--shop-text);
  font-family:Manrope,system-ui,sans-serif;
  background:
    radial-gradient(1100px 420px at 0% 0%, rgba(56,189,248,.16), transparent 58%),
    radial-gradient(920px 420px at 100% 0%, rgba(245,158,11,.13), transparent 58%),
    radial-gradient(720px 280px at 50% 100%, rgba(168,85,247,.12), transparent 70%),
    linear-gradient(180deg,#07111f,#0a1730 50%, #0d1f3e 100%);
}
.shop-wrap{
  max-width:1240px;
  margin:24px auto 44px;
  padding:0 18px;
}
.shop-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.shop-topbar-links{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.shop-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color:#eef6ff;
  font-weight:900;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(15,23,42,.6);
  border:1px solid var(--shop-line);
  box-shadow:0 10px 24px rgba(2,6,23,.24);
}
.shop-back.secondary{
  background:rgba(14,165,233,.12);
  border-color:rgba(56,189,248,.16);
}
.shop-hint{
  font-size:12px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#93c5fd;
}
.shop-hero{
  margin-top:14px;
  border-radius:28px;
  padding:24px;
  border:1px solid rgba(148,163,184,.2);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(56,189,248,.16), transparent 70%),
    radial-gradient(420px 220px at 100% 0%, rgba(245,158,11,.16), transparent 70%),
    linear-gradient(145deg,rgba(8,18,36,.96),rgba(13,28,56,.94));
  box-shadow:0 28px 60px rgba(2,6,23,.32);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}
.shop-hero-main{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}
.shop-avatar{
  position:relative;
  width:112px;
  height:112px;
  flex:0 0 112px;
}
.shop-avatar .frame-layer{
  position:absolute;
  inset:-10px;
  background-image:var(--frame);
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  display:none;
  pointer-events:none;
  z-index:2;
}
.shop-avatar.has-frame .frame-layer{ display:block; }
.shop-avatar img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
  position:relative;
  z-index:1;
  background:#dbe7f3;
  box-shadow:0 16px 28px rgba(2,6,23,.3);
}
.shop-title{
  font-size:36px;
  font-weight:900;
  line-height:1.02;
}
.shop-subtitle{
  margin-top:8px;
  color:var(--shop-muted);
  font-size:14px;
  line-height:1.7;
  max-width:680px;
}
.shop-pills{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.shop-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(14,165,233,.12);
  border:1px solid rgba(56,189,248,.18);
  font-size:12px;
  font-weight:900;
  color:#eef6ff;
}
.shop-pill.currency-pill{
  min-height:76px;
  padding:8px 16px 8px 12px;
  gap:14px;
}
.shop-pill.currency-pill img{
  width:124px;
  height:auto;
  object-fit:contain;
  flex:0 0 124px;
  filter:drop-shadow(0 10px 18px rgba(2,6,23,.24));
}
.shop-pill.currency-pill span{
  font-size:18px;
  line-height:1;
}
.shop-pill.has-title-badge{
  min-height:50px;
  padding:6px 10px 6px 12px;
  gap:10px;
}
.shop-pill-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#93c5fd;
  font-weight:900;
}
.shop-pill-title{
  flex:0 0 auto;
}
.shop-pill.gold{
  background:rgba(245,158,11,.14);
  border-color:rgba(245,158,11,.22);
  color:#fde68a;
}
.shop-hero-side{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  min-width:min(100%,360px);
  flex:1 1 360px;
}
.shop-hero-stat{
  border-radius:18px;
  padding:14px;
  background:var(--shop-panel);
  border:1px solid var(--shop-line);
  box-shadow:0 16px 32px rgba(2,6,23,.18);
}
.shop-hero-stat-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:900;
  color:#93c5fd;
}
.shop-hero-stat-value{
  margin-top:8px;
  font-size:28px;
  font-weight:900;
}
.shop-hero-stat-sub{
  margin-top:4px;
  font-size:12px;
  color:var(--shop-muted);
}
.shop-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:16px;
  margin-top:16px;
}
.shop-panel{
  border-radius:24px;
  border:1px solid var(--shop-line);
  background:var(--shop-panel);
  box-shadow:0 18px 36px rgba(2,6,23,.22);
  padding:18px;
}
.shop-panel-title{
  margin:0;
  font-size:22px;
  font-weight:900;
}
.shop-panel-copy{
  margin-top:6px;
  color:var(--shop-muted);
  font-size:13px;
  line-height:1.7;
}
.shop-tabs{
  margin-top:16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.shop-tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:none;
  border-radius:999px;
  padding:10px 14px;
  background:rgba(15,23,42,.55);
  color:#dbeafe;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  border:1px solid rgba(148,163,184,.16);
}
.shop-tab.active{
  color:#0f172a;
  background:linear-gradient(135deg,#f59e0b,#facc15);
  border-color:transparent;
  box-shadow:0 14px 26px rgba(245,158,11,.22);
}
.shop-content{
  margin-top:16px;
}
.shop-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.shop-card{
  position:relative;
  border-radius:22px;
  padding:16px;
  background:var(--shop-panel-2);
  border:1px solid rgba(148,163,184,.14);
  box-shadow:0 14px 30px rgba(2,6,23,.2);
  overflow:hidden;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.shop-card:hover{
  transform:translateY(-4px);
}
.shop-card.rarity-rare{
  border-color:rgba(96,165,250,.26);
  box-shadow:0 18px 36px rgba(59,130,246,.1);
}
.shop-card.rarity-epic{
  border-color:rgba(192,132,252,.26);
  box-shadow:0 18px 36px rgba(168,85,247,.12);
}
.shop-card.rarity-legendary{
  border-color:rgba(251,191,36,.28);
  box-shadow:0 18px 36px rgba(251,191,36,.14);
}
.shop-card.owned{
  box-shadow:0 0 0 1px rgba(34,197,94,.18), 0 18px 36px rgba(34,197,94,.08);
}
.shop-card.equipped{
  box-shadow:0 0 0 1px rgba(245,158,11,.22), 0 18px 36px rgba(245,158,11,.1);
}
.shop-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.shop-card-kicker{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:900;
  color:#93c5fd;
}
.shop-card-title{
  font-size:17px;
  font-weight:900;
}
.shop-card-sub{
  margin-top:6px;
  color:var(--shop-muted);
  font-size:12px;
  line-height:1.6;
}
.shop-state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(15,23,42,.54);
  border:1px solid rgba(148,163,184,.16);
  color:#dbeafe;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.shop-state.owned{
  color:#d1fae5;
  border-color:rgba(34,197,94,.18);
  background:rgba(22,163,74,.12);
}
.shop-state.equipped{
  color:#fff7d6;
  border-color:rgba(245,158,11,.22);
  background:rgba(245,158,11,.14);
}
.shop-frame-preview{
  position:relative;
  width:96px;
  height:96px;
  margin-top:14px;
}
.shop-frame-preview .frame-layer{
  position:absolute;
  inset:-8px;
  background-image:var(--frame);
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  display:none;
  pointer-events:none;
  z-index:2;
}
.shop-frame-preview.has-frame .frame-layer{ display:block; }
.shop-frame-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  position:relative;
  z-index:1;
  background:#dbe7f3;
}
.shop-title-visual{
  margin-top:14px;
  display:flex;
  align-items:center;
}
.shop-title-badge{
  max-width:100%;
}
.shop-badge-visual{
  margin-top:14px;
  width:112px;
  height:112px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.shop-badge-visual.card{
  width:116px;
  height:116px;
}
.shop-badge-visual.hero{
  width:132px;
  height:132px;
}
.shop-badge-visual img{
  width:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 12px 26px rgba(2,6,23,.28));
}
.shop-badge-fallback{
  width:88px;
  height:88px;
  border-radius:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#0ea5e9,#1e293b);
  color:#f8fbff;
  font-size:28px;
  font-weight:900;
}
.shop-pack-visual{
  margin-top:14px;
  width:112px;
  height:112px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:22px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(148,163,184,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.shop-pack-visual img{
  width:90px;
  height:90px;
  object-fit:contain;
}
.shop-generic-visual.card{
  width:116px;
  height:116px;
}
.shop-generic-visual.hero{
  width:132px;
  height:132px;
}
.shop-generic-visual.hero img{
  width:104px;
  height:104px;
}
.shop-pack-fallback{
  width:90px;
  height:90px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#0ea5e9,#1e293b);
  color:#f8fbff;
  font-size:28px;
  font-weight:900;
}
.shop-pack-meta{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.shop-pack-chip{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(15,23,42,.54);
  border:1px solid rgba(148,163,184,.16);
  color:#dbeafe;
  font-size:11px;
  font-weight:900;
}
.shop-rarity{
  margin-top:14px;
  display:inline-flex;
  align-items:center;
  min-height:24px;
}
.shop-rarity img{
  width:78px;
  height:24px;
  object-fit:contain;
  object-position:left center;
}
.shop-price-row{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.shop-price{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(245,158,11,.14);
  border:1px solid rgba(245,158,11,.18);
  color:#fde68a;
  font-size:12px;
  font-weight:900;
}
.shop-price-sub{
  font-size:12px;
  color:var(--shop-muted);
  font-weight:800;
}
.shop-actions{
  margin-top:14px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.shop-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  border:none;
  border-radius:12px;
  padding:10px 14px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.shop-btn.primary{
  color:#0f172a;
  background:linear-gradient(135deg,#f59e0b,#facc15);
  box-shadow:0 14px 26px rgba(245,158,11,.2);
}
.shop-btn.secondary{
  color:#dbeafe;
  background:rgba(15,23,42,.5);
  border:1px solid rgba(148,163,184,.16);
}
.shop-btn[disabled]{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
}
.shop-placeholder{
  border-radius:20px;
  padding:26px;
  background:linear-gradient(180deg,rgba(15,23,42,.48),rgba(15,23,42,.24));
  border:1px dashed rgba(148,163,184,.22);
  text-align:center;
}
.shop-placeholder-title{
  font-size:20px;
  font-weight:900;
}
.shop-placeholder-copy{
  margin-top:8px;
  color:var(--shop-muted);
  font-size:14px;
  line-height:1.8;
}
.shop-side-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}
.shop-log-row{
  border-radius:16px;
  padding:12px 14px;
  background:rgba(15,23,42,.4);
  border:1px solid rgba(148,163,184,.12);
}
.shop-log-title{
  font-size:13px;
  font-weight:900;
}
.shop-log-meta{
  margin-top:6px;
  font-size:12px;
  color:var(--shop-muted);
}
.shop-empty{
  border-radius:18px;
  border:1px dashed rgba(148,163,184,.2);
  background:rgba(15,23,42,.32);
  padding:18px;
  text-align:center;
  font-size:13px;
  color:var(--shop-muted);
  font-weight:800;
}
.shop-modal-overlay{
  position:fixed;
  inset:0;
  z-index:16000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(2,6,23,.74);
  backdrop-filter:blur(10px);
}
.shop-modal-overlay.hidden{
  display:none;
}
.shop-modal-card{
  position:relative;
  width:min(700px,100%);
  max-height:min(88vh,920px);
  overflow:auto;
  border-radius:24px;
  padding:24px;
  background:linear-gradient(180deg,#091223,#10213f);
  border:1px solid rgba(148,163,184,.18);
  box-shadow:0 30px 80px rgba(2,6,23,.45);
}
.shop-modal-close{
  position:absolute;
  top:14px;
  right:14px;
  width:40px;
  height:40px;
  border:none;
  border-radius:999px;
  background:rgba(15,23,42,.7);
  color:#fff;
  font-size:24px;
  cursor:pointer;
}
.shop-modal-kicker{
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#93c5fd;
  font-weight:900;
}
.shop-modal-title{
  margin-top:10px;
  font-size:28px;
  font-weight:900;
}
.shop-modal-copy{
  margin-top:8px;
  color:var(--shop-muted);
  line-height:1.7;
}
.shop-modal-visual{
  margin-top:18px;
}
.shop-modal-actions{
  margin-top:18px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.shop-result{
  border-radius:16px;
  padding:14px;
  background:rgba(15,23,42,.42);
  border:1px solid rgba(148,163,184,.12);
}
.shop-result-line{
  color:var(--shop-muted);
  font-size:14px;
  line-height:1.7;
}
@media (max-width: 1100px){
  .shop-layout{ grid-template-columns:1fr; }
}
@media (max-width: 820px){
  .shop-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .shop-hero-side{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px){
  .shop-wrap{ padding:0 14px; }
  .shop-hero{ padding:18px; }
  .shop-title{ font-size:28px; }
  .shop-avatar{ width:88px; height:88px; flex-basis:88px; }
  .shop-grid,
  .shop-hero-side{ grid-template-columns:1fr; }
  .shop-card-top{ flex-direction:column; }
}
