/* Store, wallet, dialogs, toasts and match rewards — ink look (Splatoon-like): bright fills, chunky round pills,
   slightly tilted cards, dark ink text on light plates or white text on dark plates, never a text outline. */

/* ================= wallet (top right on title, loadout, store and results) ================= */
#wallet { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); z-index: 36; display: flex; gap: 8px; animation: walletIn .35s cubic-bezier(.34,1.56,.64,1) both; }
#wallet.passive { pointer-events: none; }
#wallet.passive .wplus { display: none; }
@keyframes walletIn { from { transform: translateY(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
.wpill { font-family: var(--font); display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 6px 0 3px; border-radius: 22px; background: #1b1033; border: 3px solid; cursor: pointer; box-shadow: 0 4px 0 rgba(27,16,51,.45); transition: transform .1s, filter .12s; outline: none; }
.wpill:hover { filter: brightness(1.15); }
.wpill:active { transform: scale(.93); }
.wpill.shell { border-color: #29e6ff; }
.wpill.pearl { border-color: #ffe23f; }
.wpill img { width: 36px; height: 36px; object-fit: contain; pointer-events: none; }
.wnum { font-size: 20px; font-weight: 900; min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.wpill.shell .wnum { color: #8ff3ff; }
.wpill.pearl .wnum { color: #ffe23f; }
.wplus { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; color: #1b1033; line-height: 1; margin-left: 2px; }
.wpill.shell .wplus { background: #29e6ff; }
.wpill.pearl .wplus { background: #ffe23f; }
.wpill.bump { animation: wbump .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes wbump { 0% { transform: scale(1); } 35% { transform: scale(1.2); } 100% { transform: scale(1); } }
.fly-coin { position: fixed; width: 30px; height: 30px; z-index: 68; pointer-events: none; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(27,16,51,.4)); }

/* currency chips used in cards and dialogs */
.cur-chip { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cur-chip img { width: 24px; height: 24px; object-fit: contain; }
.cur-chip.shell { color: #0a6f98; }
.cur-chip.pearl { color: #9a5b00; }
.cur-chip.mini img { width: 20px; height: 20px; }
.cur-chip.plus span::before { content: "+"; }

/* small icons */
.ico-lock, .ico-check, .ico-back { display: inline-block; width: 14px; height: 14px; background-size: contain; background-repeat: no-repeat; background-position: center; flex: 0 0 auto; }
.ico-lock { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'><path fill='%23fff' d='M2 0h4v1h1v2h1v5H0V3h1V1h1zM3 1v2h2V1z'/><path fill='%231b1033' d='M3 4h2v2H3z'/></svg>"); }
.ico-check { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'><path fill='%23fff' d='M6 1h2v2H7v1H6v1H5v1H4v1H2V6H1V5H0V3h2v1h1v1h1V4h1V3h1z'/></svg>"); }
.ico-back { width: 22px; height: 22px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14.5 4.5L7 12l7.5 7.5' fill='none' stroke='%231b1033' stroke-width='4.2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }

/* title: store button badge */
.btn9 { position: relative; }
.badge { position: absolute; top: -12px; right: -10px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #ff3fa4; color: #fff; border: 2px solid #1b1033; font-size: 14px; font-weight: 900; line-height: 20px; text-align: center; animation: pulse 1.2s ease-in-out infinite; pointer-events: none; }
.title-buttons .btn9 img.btn-cur { width: 30px; height: 30px; object-fit: contain; margin: -6px 0; }

/* loadout: room for the wallet, a back button, locked cards */
.lo-head { justify-content: flex-start; padding-right: 250px; padding-left: 0; align-items: center; }
.lo-back { min-width: 48px; padding: 2px 12px; font-size: 16px; }
.card .lock { position: absolute; top: 5px; right: 5px; z-index: 2; display: none; align-items: center; gap: 3px; background: #1b1033; border-radius: 999px; padding: 2px 8px 2px 4px; font-weight: 900; font-size: 14px; color: #fff; }
.card .lock img { width: 20px; height: 20px; object-fit: contain; }
.card.locked .lock { display: flex; }
.card.locked > img { filter: grayscale(.7) brightness(.9); }
.card.locked .cname::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'><path fill='%231b1033' d='M2 0h4v1h1v2h1v5H0V3h1V1h1zM3 1v2h2V1z'/></svg>") center/contain no-repeat; }
#lo-desc .desc-lock { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 900; color: #d4006e; margin-top: 2px; }


/* dialogs */
#st-modal { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(27,16,51,.62); }
.st-dialog { width: min(540px, 92vw); max-height: calc(100% - 20px); overflow-y: auto; scrollbar-width: none; padding: 6px 20px 10px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #1b1033; }
.st-dialog::-webkit-scrollbar { display: none; }
.st-dialog.pop { animation: popIn .24s cubic-bezier(.34,1.56,.64,1); }
.dlg-title { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 900; color: #fff; background: #ff3fa4; border: 3px solid #1b1033; border-radius: 999px; padding: 3px 20px; box-shadow: 0 4px 0 #1b1033; rotate: -1.5deg; }
.dlg-title img { width: 32px; height: 32px; object-fit: contain; }
.dlg-art { width: 150px; height: 100px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: radial-gradient(circle, rgba(255,226,63,.6), rgba(255,226,63,0) 70%); overflow: hidden; }
.dlg-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dlg-art.gun img { transform: scale(1.5); }
.dlg-name { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; }
.dlg-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(320px, 100%); font-size: 17px; font-weight: 900; padding: 4px 14px; border-radius: 999px; background: #efe9f8; }
.dlg-line .cur-chip { font-size: 20px; }
.dlg-line.dim { font-size: 15px; color: #4d4170; }
.dlg-note { font-size: 13px; font-weight: 800; color: #4d4170; text-align: center; }
.dlg-short { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; color: #b0005d; }
.dlg-short .cur-chip { font-size: 26px; }
.dlg-short .cur-chip img { width: 32px; height: 32px; }
.dlg-btns { display: flex; gap: 14px; justify-content: center; margin-top: 4px; }
.dlg-btns .btn9 { min-width: 120px; }
.dlg-btns .btn9:not(.alt) { background: #c6ff3a; }
.tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.tip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 900; background: #dff9ff; border: 2px solid #1b1033; border-radius: 999px; padding: 2px 10px; }
.mlist { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 12px; border-radius: 16px; background: #efe9f8; min-height: 46px; }
.mrow.done:not(.got) { background: #f4ffd0; box-shadow: inset 0 0 0 3px #c6ff3a; }
.mrow.got { opacity: .6; }
.minfo { flex: 1 1 auto; min-width: 0; }
.mname { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar { height: 9px; border-radius: 5px; background: rgba(27,16,51,.16); overflow: hidden; margin-top: 3px; }
.mbar i { display: block; height: 100%; background: linear-gradient(90deg, #29e6ff, #22b6e8); }
.mrow.done .mbar i { background: linear-gradient(90deg, #c6ff3a, #8fd16a); }
.mrew { font-size: 16px; }
.mstate { min-width: 76px; text-align: center; font-size: 14px; font-weight: 900; color: #4d4170; }
.mclaim { min-width: 76px; min-height: 44px; font-size: 15px; padding: 2px 10px; background: #c6ff3a; animation: pulse 1.1s ease-in-out infinite; }
.packs { display: flex; gap: 12px; justify-content: center; }
.pack { font-family: var(--font); position: relative; width: 128px; min-height: 104px; border-radius: 20px; cursor: pointer; outline: none; padding: 6px 4px 8px;
  background: #fff6cf; border: 4px solid #1b1033; box-shadow: 0 5px 0 #1b1033; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .12s cubic-bezier(.34,1.56,.64,1); }
.pack:nth-child(odd) { rotate: -1.5deg; }
.pack:nth-child(even) { rotate: 1.5deg; }
.pack:hover, .pack.focus { transform: translateY(-3px) scale(1.04); }
.pack.focus { outline: 4px solid #ff3fa4; outline-offset: 4px; }
.pack:active { transform: scale(.94); }
.pack.best { background: #ffe23f; }
.pk-ico { display: flex; justify-content: center; height: 40px; }
.pk-ico img { width: 38px; height: 38px; object-fit: contain; margin: 0 -9px; }
.pk-n { font-size: 24px; font-weight: 900; color: #1b1033; }
.pk-tag { font-size: 12px; font-weight: 900; color: #fff; background: #1b1033; border-radius: 999px; padding: 1px 9px; }

/* toast & sparks */
#toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 66; display: flex; align-items: center; gap: 8px; max-width: 86vw;
  background: #1b1033; border: 3px solid #c6ff3a; border-radius: 999px; padding: 7px 20px; font-size: 18px; font-weight: 900; color: #fff; pointer-events: none;
  box-shadow: 0 5px 0 rgba(27,16,51,.45); transform: translateX(-50%); }
#toast img { width: 30px; height: 30px; object-fit: contain; }
#toast.show { animation: toastIn 2.1s ease both; }
@keyframes toastIn { 0% { transform: translate(-50%, -40px) scale(.7); opacity: 0; } 12% { transform: translate(-50%, 4px) scale(1.06); opacity: 1; } 18% { transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -16px); } }
.spark { position: fixed; width: 10px; height: 10px; z-index: 67; pointer-events: none; margin: -5px 0 0 -5px; border-radius: 3px; box-shadow: 0 0 0 2px rgba(27,16,51,.6); animation: spark .75s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(220deg) scale(.3); opacity: 0; } }

/* match results: shell rewards */
.eb-rewards { margin-top: 12px; width: min(440px, 84vw); padding: 4px 18px 8px; animation: popIn .35s .45s both; }
.rw-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 900; color: #1b1033; padding: 2px 4px; animation: rwIn .3s cubic-bezier(.34,1.56,.64,1) both; }
.rw-line .cur-chip { font-size: 19px; }
.rw-line.total { border-top: 3px dashed rgba(27,16,51,.3); margin-top: 3px; padding-top: 5px; font-size: 20px; }
.rw-line.total .cur-chip { font-size: 24px; }
.rw-line.total .cur-chip img { width: 30px; height: 30px; }
.rw-line.mission { justify-content: center; font-size: 14px; color: #b0005d; }
@keyframes rwIn { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* kill popup: shells earned */
.pop.shell { color: #8ff3ff; display: flex; align-items: center; gap: 2px; }
.pop.shell::after { content: ""; display: inline-block; width: 26px; height: 26px; background: url("../assets/cur-shell.webp") center/contain no-repeat; }

/* phones (the page is about 704×396 there) */
@media (max-height: 460px) {
  #wallet { top: calc(6px + env(safe-area-inset-top, 0px)); gap: 6px; }
  .wpill img { width: 32px; height: 32px; }
  .wnum { font-size: 18px; }
  .wplus { width: 22px; height: 22px; font-size: 18px; }
  .lo-head { padding-right: 236px; }
  .st-dialog { gap: 4px; padding: 2px 16px 6px; }
  .dlg-title { font-size: 18px; }
  .dlg-title img { width: 26px; height: 26px; }
  .dlg-art { width: 120px; height: 70px; }
  .dlg-name { font-size: 17px; }
  .dlg-line { font-size: 15px; padding: 2px 12px; }
  .mrow { min-height: 44px; padding: 2px 8px; gap: 8px; }
  .mname { font-size: 13px; }
  .mlist { gap: 3px; }
  .tip { font-size: 12px; }
  .pack { min-height: 92px; width: 116px; }
  .eb-rewards { margin-top: 8px; padding: 2px 14px 6px; }
  .rw-line { font-size: 14px; padding: 1px 4px; }
  .rw-line.total { font-size: 16px; }
  #toast { font-size: 15px; top: calc(56px + env(safe-area-inset-top, 0px)); }
}
