/* Coin shop (public/shop.js): manhwa look like the loading screen - purple-to-orange sky, light rays,
   halftone dots, speed lines, Luckiest Guy headings, gold coins. */
/* the painted coin (assets/ui/icons/coin.png, boss 26 Nov 2026: "icon gold n ruby") everywhere coins show */
.coin { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 4px; flex: none;
  background: url('assets/ui/icons/coin.png') center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.chip.shopchip { background: linear-gradient(135deg, #ffb52e, #e2531a); border-color: #ffe58a; color: #fff;
  font-family: 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; letter-spacing: .06em; text-shadow: 0 1px 0 #7a2a05; }
.chipsL { justify-self: start; display: flex; gap: 6px; min-width: 0; align-items: center; }
.avatar { display: inline-block; flex: none; vertical-align: middle; }
#meChip .avatar { margin: -3px 0 -3px -6px; }

/* titles: one colour per title */
.ttl { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; white-space: nowrap; vertical-align: middle; margin-left: 6px; border: 1px solid rgba(255,255,255,.25);
  background: #3a3f4b; color: #d5dae3; }
.ttl.ti-sharp { background: linear-gradient(135deg, #1f8f5f, #3ecf8e); color: #fff; }
.ttl.ti-boom { background: linear-gradient(135deg, #e2531a, #ffb52e); color: #fff; text-shadow: 0 1px 0 #7a2a05; }
.ttl.ti-legend { background: linear-gradient(135deg, #8a4e05, #ffd84f 45%, #fff4b8 55%, #f3a51b); color: #3a1d00;
  box-shadow: 0 0 8px rgba(255,210,80,.7); border-color: #fff4b8; }

/* profile / lobby / leaderboard */
#profAvatar { flex: none; }
#profName .ttl { font-size: 11px; }
.seat .seatttl { margin: 2px auto 0; }
.seat b .avatar { margin-right: 4px; }
.lbrow .nm .avatar { margin-right: 5px; vertical-align: -6px; }
.lbrow .nm .ttl { font-size: 9px; padding: 0 5px; }
#profile .profhead .shopchip { flex: none; }

/* ---------- the shop screen ---------- */
#shop { z-index: 30; }
.panel.shopp { position: relative; overflow: hidden; width: min(820px, 100%); height: min(380px, 100%); padding: 0;
  display: grid; grid-template-columns: 200px 1fr; border: 2px solid #ffe58a; background: #1b1446;
  box-shadow: 0 0 0 3px #14101f, 0 10px 30px rgba(0,0,0,.6); }
.shbg { position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 12% 100%, rgba(255,140,40,.5), transparent 70%),
    linear-gradient(170deg, #1b1446 0%, #3a2270 45%, #7a2f6a 80%, #c8466a 100%); }
.shbg .rays { position: absolute; left: 12%; top: 45%; width: 200vmax; height: 200vmax; margin: -100vmax 0 0 -100vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255,236,170,.16) 0deg 7deg, transparent 7deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 4%, transparent 22%); mask-image: radial-gradient(circle, #000 4%, transparent 22%);
  animation: bootSpin 50s linear infinite; }
.shbg .half { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,255,255,.16) 1.3px, transparent 1.5px) 0 0 / 9px 9px;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 50%); mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 50%); }
.shbg .speed { position: absolute; inset: -20%;
  background: repeating-conic-gradient(from 3deg at 12% 45%, rgba(255,255,255,.4) 0deg .3deg, transparent .3deg 5deg);
  -webkit-mask-image: radial-gradient(ellipse at 12% 45%, transparent 30%, #000 70%); mask-image: radial-gradient(ellipse at 12% 45%, transparent 30%, #000 70%);
  opacity: .25; }
.shleft { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px;
  border-right: 2px solid rgba(255,229,138,.35); background: linear-gradient(180deg, rgba(20,16,31,.15), rgba(20,16,31,.55)); }
.shtitle { font: 40px/1 'Luckiest Guy', 'Arial Black', Impact, system-ui, sans-serif; color: #ffd84f; letter-spacing: 2px;
  transform: rotate(-4deg); margin-bottom: 6px;
  text-shadow: 0 3px 0 #a9530a, 3px 5px 0 #14101f, -2px -2px 0 #14101f, 2px -2px 0 #14101f, -2px 2px 0 #14101f; }
#shPrev canvas { filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
#shPrevName { font-weight: 800; font-size: 15px; text-shadow: 0 2px 4px rgba(0,0,0,.6); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shPrevTitle .ttl { margin: 0; }
#shPrevTank { margin-top: 4px; }
.shright { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 10px 12px 8px; }
.shtop { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.shtabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.shtabs button { flex: 1; padding: 7px 4px; border-radius: 10px 10px 4px 4px; background: rgba(20,16,31,.55); border: 1px solid rgba(255,255,255,.18);
  font: 13px 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; letter-spacing: .05em; color: #d9cff5; white-space: nowrap; }
.shtabs button.on { background: linear-gradient(180deg, #ffd84f, #f3a51b); color: #3a1d00; border-color: #fff4b8; transform: translateY(-2px);
  box-shadow: 0 3px 0 #8a4e05; }
.coinpill { display: flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: rgba(20,16,31,.7); border: 2px solid #ffd84f;
  font: 17px 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; color: #ffd84f; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.shright .close { width: auto; padding: 6px 11px; }
.shgrid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-content: start;
  padding: 2px 2px 6px; touch-action: pan-y; }
.shcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 6px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(20,16,31,.6)); border: 2px solid rgba(255,255,255,.16);
  box-shadow: 3px 3px 0 #14101f; }
.shcard .art { height: 64px; display: flex; align-items: center; justify-content: center; }
.shcard > b { font-size: 12px; text-align: center; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; }
.shcard.own { border-color: rgba(62,207,142,.6); }
.shcard.eq { border-color: #ffd84f; box-shadow: 3px 3px 0 #14101f, 0 0 12px rgba(255,216,79,.45); }
.shcard.lock .art { filter: grayscale(.8) brightness(.6); }
.shcard .tag { position: absolute; top: -6px; right: -4px; padding: 1px 6px; border-radius: 6px; background: #1aa3b8; color: #fff;
  font: 10px 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; letter-spacing: .05em; transform: rotate(6deg); box-shadow: 2px 2px 0 #14101f; }
.shcard button { width: 100%; padding: 6px 4px; border-radius: 9px; font-weight: 800; font-size: 13px; display: flex; align-items: center;
  justify-content: center; gap: 2px; font-variant-numeric: tabular-nums; }
.shcard button.buy { background: linear-gradient(180deg, #ffd84f, #f3a51b); color: #3a1d00; box-shadow: 0 2px 0 #8a4e05; }
.shcard button.buy.sure { background: linear-gradient(180deg, #ff6b4a, #df2a1f); color: #fff; animation: shPulse .6s ease-in-out infinite alternate; }
.shcard button.buy.poor { background: rgba(255,255,255,.12); color: #d9a; box-shadow: none; }
.shcard button.equip { background: linear-gradient(180deg, #3ecf8e, #1f8f5f); color: #fff; }
.shcard button.eqd { background: rgba(255,216,79,.18); color: #ffd84f; border: 1px solid #ffd84f; }
.shcard button.eqd:disabled { opacity: 1; }
.shcard button.locked { background: rgba(0,0,0,.35); color: #9aa3b2; font-size: 12px; }
@keyframes shPulse { to { transform: scale(1.05); } }
.ttlbox { display: flex; align-items: center; justify-content: center; height: 64px; }
.ttlbox .ttl { font-size: 13px; padding: 4px 10px; margin: 0; }
#shToast { position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 20px); opacity: 0; transition: .25s; pointer-events: none;
  padding: 7px 16px; border-radius: 999px; background: #14101f; border: 2px solid #3ecf8e; color: #fff; font-weight: 800; font-size: 13px; white-space: nowrap; }
#shToast.show { opacity: 1; transform: translate(-50%, 0); }
#shToast.bad { border-color: #ff6a6a; background: #5a1414; color: #fff; text-shadow: 0 1px 2px #000; }   /* readable "Not enough coins" */

@media (max-height: 420px) {
  .panel.shopp { grid-template-columns: 170px 1fr; }
  .shtitle { font-size: 32px; }
  .shcard .art { height: 54px; }
}
@media (max-width: 640px) {
  html:not(.rot) .panel.shopp { grid-template-columns: 1fr; height: 100%; }
  html:not(.rot) .shleft { display: none; }
  html:not(.rot) .shgrid { grid-template-columns: repeat(2, 1fr); }
}
html.rot .panel.shopp { height: min(380px, calc(var(--appH) - 16px)); }
html.rot.short .panel.shopp { grid-template-columns: 170px 1fr; }

/* ---------- HERO SKINS tab (boss 28 Nov 2026: tiers) ----------
   Tier badge + card frame: NORMAL silver / blue, EPIC purple, LEGEND gold with a moving shine (only NORMAL is on sale now;
   the other two are ready for later). Phone first: a hero filter row on top (ALL + a face a hero), cards 4 a row. */
.shgrid.skins { grid-template-columns: repeat(4, 1fr); }
.skfilter { flex: none; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 2px 4px 7px; margin: -2px 0 2px;
  scrollbar-width: none; touch-action: pan-x; }
.skfilter[hidden] { display: none; }
.skfilter::-webkit-scrollbar { display: none; }
.skf { flex: none; position: relative; min-width: 44px; height: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20,16,31,.6); border: 2px solid var(--rc, rgba(255,255,255,.3)); opacity: .78; }
.skf img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.skf span { font: 13px 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; letter-spacing: .04em; color: #fff; padding: 0 8px; }
.skf:first-child { border-radius: 22px; border-color: #ffd84f; }
.skf em { position: absolute; right: -3px; bottom: -3px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #14101f;
  border: 1px solid #ffd84f; font: 800 10px/14px system-ui, sans-serif; font-style: normal; color: #ffd84f; text-align: center; }
.skf.on { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 12px 2px var(--rc, #ffd84f); }
.skf:first-child.on { background: linear-gradient(180deg, #ffd84f, #f3a51b); }
.skf:first-child.on span { color: #3a1d00; }

.skcard { --t1: #cfd8e6; --t2: #5a86c8; --t3: rgba(90,134,200,.35); cursor: pointer; padding-top: 14px;
  border-color: var(--t2); background: linear-gradient(180deg, var(--t3), rgba(20,16,31,.7) 70%); }
.skcard.tier-epic { --t1: #f0d2ff; --t2: #a65cff; --t3: rgba(166,92,255,.38); }
.skcard.tier-legend { --t1: #fff4b8; --t2: #f3b21b; --t3: rgba(243,178,27,.36); overflow: hidden; }
.skcard.tier-legend::after { content: ''; position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,250,220,.55) 50%, transparent 58%); animation: skShine 2.6s ease-in-out infinite; }
@keyframes skShine { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
.skcard .art { height: 70px; width: 100%; }
.skcard .art img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.55)); }
.skcard > b { min-height: 0; font-size: 12px; }
.skcard > small { font-size: 10px; font-weight: 700; color: #cfc6ea; margin-top: -4px; }
.skcard.eq { border-color: #ffd84f; }
/* EPIC / LEGEND SOON cards (plan only, design/EPIC-LEGEND-PLAN.md): dark hero silhouette in the tier glow, SET = 3 stacked */
.skcard.soon { cursor: default; }
.skcard.tier-event { --t1: #b8fff0; --t2: #19b9a0; --t3: rgba(232,72,72,.32); }   /* EVENT: limited edition, sold only during its event (teal-red) */
.skcard.soon .art { position: relative; display: flex; align-items: center; justify-content: center; }
.skcard.soon .art img { filter: brightness(0) drop-shadow(0 0 6px var(--t2)) drop-shadow(0 0 2px var(--t1)); opacity: .9; }
.skcard.soon .art.set::before, .skcard.soon .art.set::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, var(--t1), var(--t2) 60%, transparent 72%); opacity: .7; top: 8px; }
.skcard.soon .art.set::before { left: 14%; } .skcard.soon .art.set::after { right: 14%; }
.skcard.soon button.soonb { font: 13px/1 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; letter-spacing: .12em; color: var(--t1);
  background: rgba(0,0,0,.4); border: 1px solid var(--t2); opacity: 1; }
.shcard .tier, #skPv .tier { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); padding: 2px 8px 1px; border-radius: 0 0 8px 8px;
  font: 10px/1.1 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; letter-spacing: .1em; color: #14101f; white-space: nowrap;
  background: linear-gradient(180deg, var(--t1, #cfd8e6), var(--t2, #5a86c8)); box-shadow: 0 2px 0 rgba(0,0,0,.45); }
#skPv .tier { position: static; transform: none; display: inline-block; border-radius: 6px; font-size: 13px; padding: 4px 12px 3px; }

/* big preview over the shop panel */
#skPv { --t1: #cfd8e6; --t2: #5a86c8; --t3: rgba(90,134,200,.35); position: absolute; inset: 0; z-index: 5; display: grid; grid-template-columns: 55% 1fr;
  align-items: center; gap: 10px; padding: 14px 18px; background: radial-gradient(60% 80% at 30% 55%, var(--t3), transparent 70%), rgba(14,10,30,.94); }
#skPv[hidden] { display: none; }
#skPv.tier-epic { --t1: #f0d2ff; --t2: #a65cff; --t3: rgba(166,92,255,.38); }
#skPv.tier-legend { --t1: #fff4b8; --t2: #f3b21b; --t3: rgba(243,178,27,.36); }
#skPv .pv-stage { position: relative; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
#skPv .pv-glow { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--rc, #fff) 0%, transparent 65%); opacity: .25; }
#skPv .pv-side { position: relative; max-width: 100%; max-height: 92%; object-fit: contain; animation: skFloat 2.4s ease-in-out infinite;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); }
#skPv .pv-floor { position: absolute; bottom: 3%; left: 20%; right: 20%; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); }
@keyframes skFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
#skPv .pv-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
#skPv .pv-name { font: 30px/1 'Luckiest Guy', 'Arial Black', system-ui, sans-serif; letter-spacing: .03em; color: var(--t1);
  text-shadow: 0 3px 0 #14101f, 0 0 16px var(--t3); }
#skPv .pv-hero { font-weight: 800; font-size: 13px; color: #e9e2ff; letter-spacing: .04em; }
#skPv .pv-note { font-size: 11px; color: #b9b0d6; line-height: 1.3; margin: 2px 0 4px; }
#skPv .pv-btn { width: 100%; max-width: 230px; }
#skPv .pv-btn button { width: 100%; min-height: 44px; padding: 8px; border-radius: 10px; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 3px; }
#skPv .pv-btn button.buy { background: linear-gradient(180deg, #ffd84f, #f3a51b); color: #3a1d00; box-shadow: 0 3px 0 #8a4e05; }
#skPv .pv-btn button.buy.sure { background: linear-gradient(180deg, #ff6b4a, #df2a1f); color: #fff; animation: shPulse .6s ease-in-out infinite alternate; }
#skPv .pv-btn button.buy.poor { background: rgba(255,255,255,.12); color: #d9a; box-shadow: none; }
#skPv .pv-btn button.equip { background: linear-gradient(180deg, #3ecf8e, #1f8f5f); color: #fff; }
#skPv .pv-btn button.eqd { background: rgba(255,216,79,.18); color: #ffd84f; border: 1px solid #ffd84f; }
#skPv .pv-btn button.locked { background: rgba(0,0,0,.35); color: #9aa3b2; }
#skPv .pv-x { position: absolute; top: 8px; right: 8px; min-width: 44px; min-height: 44px; }
@media (max-height: 420px) {
  .shtabs button { font-size: 11px; padding: 7px 2px; letter-spacing: .02em; }
  .skcard .art { height: 58px; }
  #skPv .pv-name { font-size: 24px; }
}
@media (max-width: 640px) { html:not(.rot) .shgrid.skins { grid-template-columns: repeat(2, 1fr); } }
html.gfx-low .skcard.tier-legend::after, html.gfx-low #skPv .pv-side { animation: none; }
@media (prefers-reduced-motion: reduce) { .skcard.tier-legend::after, #skPv .pv-side { animation: none; } }
.shright { min-width: 0; }   /* the hero filter row scrolls inside, never widens the panel */
