/* ======================================================= cosmetics shop (js/cosmetics.js) */
.dia { width: 16px; height: 16px; flex: none; vertical-align: -3px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.coin { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(#ffe36e, #e9a21a); color: #5a3a00; font-size: 11px; font-weight: 900; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }

/* ---------- HUD pill next to the money ---------- */
#cos-hud { display: flex; gap: 6px; align-self: flex-end; flex-wrap: wrap; justify-content: flex-end; }
.cos-dia, .cos-lure { display: flex; align-items: center; gap: 4px; background: linear-gradient(#1d3f86, #12264d); border: 2px solid var(--border-hi); border-radius: 14px; padding: 2px 10px 2px 6px; font-size: 13px; font-weight: 900; box-shadow: 0 0 0 2px #0a1630; white-space: nowrap; }
.cos-dia:hover, .cos-lure:hover { border-color: #fff; }
.cos-lure { color: var(--gold); font-size: 12px; }
.cos-lure[hidden] { display: none; }
.cos-lure img { width: 18px; height: 18px; }

/* ---------- layout ---------- */
.cs-shop { display: flex; flex-direction: column; gap: 12px; }
.cs-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cs-tabs { margin-bottom: 0; }
.cs-wallet { display: flex; gap: 8px; margin-left: auto; }
.cs-pill { display: flex; align-items: center; gap: 6px; background: #0a1838; border: 2px solid #2d5bb3; border-radius: 20px; padding: 4px 6px 4px 10px; font-size: 16px; }
.cs-pill b { min-width: 40px; text-align: right; }
.cs-pill .dia { width: 20px; height: 20px; }
.coin-pill { padding-right: 14px; color: var(--gold); }
.cs-plus { width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; background: linear-gradient(#ffd85e, #f3a51e); color: #3a2400; font-weight: 900; font-size: 16px; line-height: 24px; }
.cs-plus:hover { filter: brightness(1.1); }

.cs-subbar { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.cs-subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-sub { background: none; border: 0; border-bottom: 3px solid transparent; padding: 4px 8px; font-weight: 900; color: var(--muted); }
.cs-sub:hover { color: var(--text); }
.cs-sub.on { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- item cards (wide, like the reference: spotlit showcase left, details right) ---------- */
.cs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 12px;
  max-height: min(60vh, 560px); overflow: auto; padding: 4px 6px 4px 4px; overscroll-behavior: contain; align-content: start;
}
.cs-sec { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin: 8px 2px -2px; font-size: 15px; color: var(--gold); }
.cs-sec:first-child { margin-top: 0; }
.cs-sec small { color: var(--muted); font-size: 12px; font-weight: 800; }
.cs-card {
  --r: #6c7cff;
  position: relative; display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 12px; padding: 10px;
  background: linear-gradient(160deg, #13306a, #0c1f47); border: 2px solid color-mix(in srgb, var(--r) 55%, #1a3a7a);
  border-radius: 14px; text-align: left; min-height: 124px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 0 #071331;
  transition: transform .12s ease, border-color .12s ease;
}
.cs-card.r-common { --r: #8aa0c8; }
.cs-card.r-rare { --r: #4fc3ff; }
.cs-card.r-epic { --r: #b27cff; }
.cs-card.r-legendary { --r: #ffcf4a; }
@media (hover: hover) { .cs-card:hover { border-color: var(--r); transform: translateY(-2px); } }
.cs-card.on { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 207, 74, .45); }
.cs-spot {
  position: relative; width: 104px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--r) 45%, #1d3c7c);
  background:
    radial-gradient(ellipse 46% 13% at 50% 86%, rgba(160, 210, 255, .38), transparent 70%),        /* floor spot */
    conic-gradient(from 180deg at 50% -10%, transparent 160deg, rgba(190, 225, 255, .22) 172deg 188deg, transparent 200deg), /* beam */
    radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--r) 40%, #2a4d96) 0%, #142f66 58%, #0a1a3c 100%);
}
.cs-spot img { position: relative; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.cs-spot.icon img { width: 62%; height: 62%; }
.cs-spot.gems { display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap; padding: 18%; }
.cs-spot.gems .dia { width: 36%; height: 36%; }
.cs-spark { position: absolute; z-index: 1; font-style: normal; color: #fff; text-shadow: 0 0 6px #bfe6ff; pointer-events: none; }
.cs-spark.a { top: 6px; right: 8px; font-size: 13px; }
.cs-spark.b { top: 20px; right: 22px; font-size: 8px; opacity: .8; }
.cs-info-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cs-name { font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.cs-type { color: var(--muted); font-size: 12px; font-weight: 800; }
.cs-desc { margin: 4px 0; font-size: 12px; color: var(--muted); }
.cs-price, .cs-act { margin-top: 8px; width: 100%; min-height: 40px; }
.cs-price {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border-radius: 10px;
  background: linear-gradient(#ffe06e, #f3a51e); border: 2px solid #fff0b8; color: #3a2400; font-weight: 900; font-size: 16px;
  box-shadow: 0 3px 0 #b8720c;
}
.cs-price .dia { width: 18px; height: 18px; }
.cs-price:hover { filter: brightness(1.08); }
.cs-price:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8720c; }
.cs-price s { opacity: .6; font-size: 11px; }
.cs-price.confirm { background: linear-gradient(#7dff9f, #2ecc71); border-color: #c9ffd9; color: #06301a; box-shadow: 0 3px 0 #1b8a4a; animation: cs-pulse .8s ease-in-out infinite alternate; }
@keyframes cs-pulse { to { box-shadow: 0 0 12px rgba(125, 255, 159, .7); } }
.cs-badge { position: absolute; top: 6px; z-index: 1; font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 6px; }
.cs-badge.sale { left: 6px; background: #ff3b3b; color: #fff; }
.cs-badge.owned { right: 6px; background: #2ecc71; color: #06301a; }
.cs-badge.premium { left: 6px; background: linear-gradient(#ffe06e, #e9a21a); color: #3a2400; }
.cs-card:has(.cs-badge.premium) { border-color: color-mix(in srgb, #ffcf4a 70%, #1a3a7a); }
.cs-badge.active { left: 6px; background: #8e44c9; color: #fff; }
.cs-badge.active i { font-style: normal; }
.cs-badge.static { position: static; font-size: 12px; padding: 4px 10px; }

/* ---------- highlights ---------- */
.cs-hl-head { display: flex; justify-content: space-between; align-items: baseline; }
.cs-hl-head h3 { margin: 0 0 8px; }
.cs-hl-head i { font-style: normal; color: var(--gold); font-weight: 900; }
.cs-hl-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 10px; align-items: stretch; }
.cs-card.big { grid-row: span 1; }
.cs-hl-grid .cs-card, .cs-grid.bundles .cs-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.cs-hl-grid .cs-spot, .cs-grid.bundles .cs-spot { width: 100%; }
.cs-hl-grid .cs-info-col { align-items: stretch; width: 100%; }
.cs-card.big .cs-name { font-size: 18px; color: var(--gold); }
.cs-hl-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; margin-top: 12px; }
.cs-info { display: flex; align-items: center; gap: 10px; background: #0f2552; border: 2px solid #2d5bb3; border-radius: 10px; padding: 8px 10px; }
.cs-info > img, .cs-info > .dia { width: 32px; height: 32px; }
.cs-info > div { flex: 1; min-width: 0; }
.cs-info small { display: block; color: var(--muted); font-size: 11px; }
.cs-info i { font-style: normal; color: var(--gold); }

/* ---------- season pass ---------- */
.sp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #0f2552; border: 2px solid #2d5bb3; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.sp-level { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(#3e6bc0, #16326b); border: 3px solid var(--gold); line-height: 1; }
.sp-level span { font-size: 10px; color: var(--muted); font-weight: 900; text-transform: uppercase; }
.sp-level b { font-size: 26px; color: var(--gold); }
.sp-prog { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.sp-title { font-weight: 900; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
/* social.css also has a .sp-title (profile title pill): undo it inside the pass */
.sp .sp-title { font-size: 15px; color: var(--text); background: none; padding: 0; border-radius: 0; white-space: normal; overflow: visible; text-overflow: clip; max-width: none; }
.sp-bar { height: 12px; background: #0a1838; border: 1px solid #2c4f96; border-radius: 6px; overflow: hidden; }
.sp-bar > div { height: 100%; background: linear-gradient(90deg, #4fc3ff, #b27cff); }
.sp-head .cs-price { width: auto; margin: 0; }
.sp-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-prem { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.sp-prem small { font-size: 10px; font-weight: 900; color: var(--gold); text-transform: uppercase; text-align: center; }
.sp-prog i { font-style: normal; color: var(--gold); font-weight: 900; }
.sp-tier.next .sp-n { outline: 2px solid var(--gold); }
.sp-track { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.sp-labels, .sp-tier { display: grid; grid-template-rows: 22px 118px 118px; gap: 6px; flex: none; }
.sp-labels { position: sticky; left: 0; z-index: 2; background: #12264d; padding-right: 4px; }
.sp-labels b { display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); background: #0f2552; border-radius: 8px; width: 28px; font-size: 12px; color: var(--muted); }
.sp-labels b.prem { color: var(--gold); }
.sp-tier { width: 96px; }
.sp-n { text-align: center; font-weight: 900; font-size: 12px; color: var(--muted); background: #0a1838; border-radius: 6px; line-height: 22px; }
.sp-tier.reached .sp-n { background: linear-gradient(#ffd85e, #f3a51e); color: #3a2400; }
.sp-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; text-align: center; background: #0f2552; border: 2px solid #2d5bb3; border-radius: 10px; }
.sp-cell.premium { background: linear-gradient(#2a2160, #17143d); border-color: #6c5bd6; }
.sp-cell.ready { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 207, 74, .45); }
.sp-cell.claimed { opacity: .55; }
.sp-cell.locked > :not(.sp-state) { filter: grayscale(.7) brightness(.75); }
.sp-cell small { font-size: 10px; font-weight: 800; line-height: 1.15; }
.sp-ico { width: 36px; height: 36px; display: grid; place-items: center; font-size: 24px; }
.sp-ico .dia { width: 30px; height: 30px; }
.sp-ico.coin { width: 30px; height: 30px; font-size: 15px; border-radius: 50%; background: linear-gradient(#ffe36e, #e9a21a); color: #5a3a00; font-weight: 900; }
.sp-ico.big { width: 52px; height: 52px; image-rendering: auto; }
.sp-state { position: absolute; top: 3px; right: 6px; font-size: 12px; font-weight: 900; color: #7dff9f; }
.sp-claim { padding: 2px 10px; font-size: 11px; }

/* ---------- comfort ---------- */
.cs-list { display: flex; flex-direction: column; gap: 8px; max-width: 720px; margin: 0 auto; width: 100%; }
.cs-row { display: grid; grid-template-columns: 48px 1fr 150px; gap: 12px; align-items: center; background: #0f2552; border: 2px solid #2d5bb3; border-radius: 10px; padding: 8px 12px; }
.cs-row img { width: 44px; height: 44px; }
.cs-row small { display: block; color: var(--muted); font-size: 12px; }
.cs-row .cs-price { margin: 0; }
.cs-row .cs-badge { justify-self: center; }
.cs-pips { display: flex; gap: 4px; margin-top: 4px; }
.cs-pips i { width: 18px; height: 6px; border-radius: 3px; background: #0a1838; border: 1px solid #2c4f96; }
.cs-pips i.on { background: var(--gold); border-color: #ffe9a8; }

/* ---------- diamonds ---------- */
.cs-demo { background: rgba(255, 207, 74, .12); border: 2px dashed var(--gold); color: var(--gold); border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: 13px; text-align: center; }
.cs-secure { background: rgba(46, 204, 113, .1); border: 2px solid rgba(46, 204, 113, .45); color: #bff5d3; border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: 13px; text-align: center; }
.cs-grid.bundles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: none; overflow: visible; }
.cs-price.money { font-size: 17px; }
.cs-checkout { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px; border-radius: 12px;
  background: linear-gradient(160deg, #1b3f86, #102a5c); border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(255, 207, 74, .25); }
.cs-checkout.ok { border-color: #2ecc71; box-shadow: 0 0 18px rgba(46, 204, 113, .3); }
.cs-checkout.bad { border-color: #ff6b6b; box-shadow: none; }
.cs-ck-row { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 900; }
.cs-ck-row .dia { width: 24px; height: 24px; }
.cs-ck-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.cs-orders { display: flex; flex-direction: column; gap: 6px; }
.cs-orders .cs-sec { margin: 4px 2px 2px; }
.cs-order { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: #0f2552; border: 2px solid #2d5bb3; border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 800; }
.cs-order .dia { width: 14px; height: 14px; }
.cs-st { font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 8px; background: #2a3f6e; white-space: nowrap; }
.cs-st.ok { background: #2ecc71; color: #06301a; }
.cs-st.bad { background: #6e2a2a; color: #ffd0d0; }
.cs-st.wait { background: #6e5a2a; color: #ffe9a8; }
.cs-help { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-weight: 800; font-size: 13px; color: var(--muted); }
.cs-fine { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }

/* ---------- status banners, busy / short / offline buttons, purchase + claim animations ---------- */
.cs-note { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; background: #0f2552; border: 2px solid #2d5bb3; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.cs-note b { color: var(--gold); }
.cs-note span:not(.spin) { flex: 1; min-width: 180px; color: var(--muted); font-weight: 700; }
.cs-note .btn { margin-left: auto; }
.cs-note.off { border-color: #6c7cff; }
.cs-note.err { border-color: #ff6b6b; }
.cs-note.err b { color: #ffb0b0; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; }
.cs-price:disabled { cursor: default; filter: none; }
.cs-price.off { background: #26365c; border-color: #3a4f80; color: #aab6d6; box-shadow: none; }
.cs-price.off .dia { filter: grayscale(.6); }
.cs-price.busy { opacity: .85; }
.cs-price.short { background: linear-gradient(#4fc3ff, #2f7fe0); border-color: #c8ecff; color: #04203f; box-shadow: 0 3px 0 #1a4f99; font-size: 13px; }
.cs-pill.neg b { color: #ff8a8a; }
.cs-lead { margin: 0 auto; max-width: 720px; width: 100%; font-size: 12px; font-weight: 800; }
.cs-lv { color: var(--muted); font-size: 11px; }
.cs-empty { grid-column: 1 / -1; text-align: center; padding: 24px 8px; }
.cs-card.flash, .cs-row.flash { animation: cs-flash 1.2s ease-out; }
@keyframes cs-flash { 0% { box-shadow: 0 0 0 0 rgba(125, 255, 159, .9); transform: scale(1.03); } 100% { box-shadow: 0 0 0 16px rgba(125, 255, 159, 0); transform: none; } }
.sp-cell.pop { animation: sp-pop .9s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes sp-pop { 0% { transform: scale(.85); box-shadow: 0 0 0 0 rgba(255, 207, 74, .9); } 50% { transform: scale(1.08); } 100% { transform: none; box-shadow: 0 0 0 14px rgba(255, 207, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .cs-card.flash, .cs-row.flash, .sp-cell.pop, .cs-price.confirm { animation: none; } }

@media (max-width: 900px) {
  .cs-hl-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-wallet { margin-left: 0; }
  .cs-row { grid-template-columns: 40px 1fr; }
  .cs-row > :last-child { grid-column: 1 / -1; }
}

/* ---------- phones: the shop is a full-screen sheet with one card per row and scrollable tabs ---------- */
@media (max-width: 640px), (max-height: 480px) {
  .cs-shop, .cs-top, .cs-subbar, .cs-tabs, .cs-subtabs, .cs-grid { min-width: 0; max-width: 100%; }
  .cs-top { flex-direction: column; align-items: stretch; gap: 8px; }
  .cs-wallet { margin-left: 0; justify-content: flex-end; }
  .cs-tabs, .cs-subtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cs-tabs::-webkit-scrollbar, .cs-subtabs::-webkit-scrollbar { display: none; }
  .cs-tabs .tab, .cs-sub { flex: none; min-height: 40px; }
  .cs-grid { grid-template-columns: 1fr; max-height: none; gap: 10px; }
  .cs-card { grid-template-columns: 88px 1fr; min-height: 108px; }
  .cs-spot { width: 88px; }
  .cs-hl-grid { grid-template-columns: 1fr 1fr; }
  .cs-grid.bundles { grid-template-columns: 1fr 1fr; }
  .cs-grid.bundles .cs-card { min-height: 0; gap: 6px; padding: 8px; }
  .cs-grid.bundles .cs-spot { aspect-ratio: 1.5; padding: 10% 18%; }
  .cs-grid.bundles .cs-name { font-size: 14px; }
  .cs-grid.bundles .cs-price { margin-top: 2px; }
  .cs-order { grid-template-columns: 1fr auto; }
  .cs-order .cs-st { grid-column: 1 / -1; justify-self: start; }
}
@media (max-height: 480px) and (min-width: 641px) { .cs-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
/* phone landscape: tabs and wallet share one row, featured / packs four across */
@media (max-height: 480px) and (min-width: 641px) {
  .cs-top { flex-direction: row; align-items: center; }
  .cs-tabs { flex: 1; }
  .cs-wallet .cs-pill { font-size: 14px; padding: 2px 4px 2px 8px; }
  .cs-hl-grid { grid-template-columns: repeat(4, 1fr); }
  .cs-hl-grid .cs-spot { aspect-ratio: 1.3; }
  .cs-hl-grid .cs-desc { display: none; }
  .cs-grid.bundles { grid-template-columns: repeat(4, 1fr); }
  .cs-grid.bundles .cs-spot { aspect-ratio: 1.6; }
}
