/* BrainrotLuck — pixel UI, Cloverat Clapat palette */
:root {
  --bg-top: #0a130d;
  --bg-bot: #030604;
  --panel: #0f1912;
  --panel-2: #131f17;
  --card-a: #16241b;
  --card-b: #0f1813;
  --edge: rgba(122, 214, 92, .16);
  --edge-strong: rgba(122, 214, 92, .45);

  --text: #ecf7ee;
  --muted: #86a08e;
  --dim: #4f6a57;
  --accent: #b5f07a;

  /* primary (green) button steps */
  --p-hi: #d4fb9e;
  --p-top: #5cc93a;
  --p-bot: #45a92c;
  --p-base: #2f7d1f;

  --gold: #ffcf3a;
  --gold-d: #b8860b;
  --red: #ff5a5a;

  --r-common: #8ba596;
  --r-rare: #4ea7ff;
  --r-epic: #b06bff;
  --r-legendary: #ffcf4a;
  --r-mythic: #ff5a5a;
  --r-god: #ff9a3c;
  --r-secret: #e6e6e6;
  --r-og: #ffd84a;

  --px4: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  --px6: polygon(0 6px, 2px 6px, 2px 4px, 4px 4px, 4px 2px, 6px 2px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 2px, calc(100% - 4px) 2px, calc(100% - 4px) 4px, calc(100% - 2px) 4px, calc(100% - 2px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 2px) calc(100% - 6px), calc(100% - 2px) calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) calc(100% - 2px), calc(100% - 6px) calc(100% - 2px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 2px), 4px calc(100% - 2px), 4px calc(100% - 4px), 2px calc(100% - 4px), 2px calc(100% - 6px), 0 calc(100% - 6px));
  --px8: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));

  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: linear-gradient(var(--bg-top) 0%, var(--bg-bot) 70%) fixed; min-height: 100%; }
body {
  margin: 0; color: var(--text); min-height: 100vh;
  font-family: 'Exo 2', system-ui, sans-serif; font-size: 15px;
  overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { -webkit-user-drag: none; }
.hidden { display: none !important; }
.px { image-rendering: pixelated; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; font-weight: 700; font-size: 16px; color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .28);
  background: linear-gradient(var(--p-hi) 0, var(--p-hi) 2px, var(--p-top) 2px, var(--p-top) 52%, var(--p-bot) 52%, var(--p-bot) calc(100% - 4px), var(--p-base) calc(100% - 4px));
  clip-path: var(--px6);
  transition: transform .06s, filter .15s;
}
.btn:active { transform: translateY(2px); filter: brightness(.95); }
.btn[disabled] { filter: grayscale(1) brightness(.55); pointer-events: none; }
.btn.gold {
  color: #3a2500; text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
  background: linear-gradient(#fff2a8 0, #fff2a8 2px, #ffd23f 2px, #ffd23f 52%, #f2b51c 52%, #f2b51c calc(100% - 4px), #b07a06 calc(100% - 4px));
}
.btn.red { background: linear-gradient(#ffb3b3 0, #ffb3b3 2px, #ef4b4b 2px, #ef4b4b 52%, #d23636 52%, #d23636 calc(100% - 4px), #8f1f1f calc(100% - 4px)); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }

.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 14px; font-weight: 700; font-size: 14px; color: var(--accent);
  background: linear-gradient(rgba(92, 201, 58, .06), rgba(92, 201, 58, .16));
  box-shadow: inset 0 0 0 1.5px rgba(122, 214, 92, .45);
  clip-path: var(--px4);
}
.ghost.dark { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--edge); color: var(--muted); }
.ghost.on { color: #fff; background: rgba(92, 201, 58, .28); box-shadow: inset 0 0 0 1.5px var(--p-top); }
.ghost:active { transform: translateY(1px); }

/* ---------- coin ---------- */
.coin { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; image-rendering: pixelated; }
.coin.lg { width: 22px; height: 22px; }
.coin img { width: 100%; height: 100%; display: block; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .45)); }
span.coin > img { width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; position: static !important; transform: none !important; animation: none !important; border: 0 !important; background: none !important; clip-path: none !important; opacity: 1 !important; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(var(--bg-top), var(--bg-bot)); transition: opacity .35s;
}
#loader .logo { transform: scale(1.5); }
.loader-bar { width: 150px; height: 10px; background: #0d1a11; box-shadow: inset 0 0 0 2px #1d3424; padding: 2px; }
.loader-bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--p-top) 0 8px, var(--p-bot) 8px 10px); animation: load 1.4s steps(14) infinite; }
@keyframes load { to { width: 100%; } }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: rgba(8, 15, 10, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(122, 214, 92, .1);
}
.logo { display: flex; align-items: center; gap: 4px; font-family: 'Pixelify Sans', 'Exo 2', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: .02em; line-height: 1; }
.logo b { color: var(--p-top); text-shadow: 0 2px 0 #1c4a14; }
.logo i { font-style: normal; color: #fff; text-shadow: 0 2px 0 #1c3322; }
.logo img { height: 28px; margin: -4px 0; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .5)); }
.wallet { display: flex; align-items: stretch; }
.wallet .bal {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 9px; font-weight: 700; font-size: 15px;
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, 100% 0, 100% 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.wallet .bal.bump b { animation: bump .4s steps(4); }
@keyframes bump { 50% { color: var(--accent); } }
.wallet .plus {
  width: 36px; height: 36px; display: grid; place-items: center; position: relative;
  background: linear-gradient(var(--p-hi) 0, var(--p-hi) 2px, var(--p-top) 2px, var(--p-top) 52%, var(--p-bot) 52%, var(--p-bot) calc(100% - 3px), var(--p-base) calc(100% - 3px));
  clip-path: polygon(0 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 0 100%);
}
.wallet .plus.wait { background: #1a2a1f; }
.wallet .plus .dot { position: absolute; top: 3px; right: 6px; width: 6px; height: 6px; background: var(--red); box-shadow: 0 0 6px var(--red); }

/* ---------- layout ---------- */
#view { padding: 10px 12px calc(92px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.h-center { text-align: center; font-weight: 700; font-size: 19px; margin: 22px 0 12px; }
.h-label { font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 2px 10px; }
.page-in { animation: pagein .18s ease-out; }
@keyframes pagein { from { opacity: 0; transform: translateY(6px); } }

.panel { background: linear-gradient(var(--card-a), var(--card-b)); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px8); padding: 14px; }

/* ---------- top drop ---------- */
.topdrop {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; position: relative; overflow: hidden;
  background: radial-gradient(60% 120% at 12% 50%, rgba(255, 207, 58, .22), transparent 70%), linear-gradient(#1a1a0e, #0f120b);
  box-shadow: inset 0 0 0 1.5px rgba(255, 207, 58, .55);
  clip-path: var(--px6);
}
.topdrop .rays { position: absolute; left: -30px; top: 50%; width: 140px; height: 140px; transform: translateY(-50%);
  background: repeating-conic-gradient(rgba(255, 207, 58, .16) 0 10deg, transparent 10deg 20deg); animation: spin 18s linear infinite; mask-image: radial-gradient(circle, #000 20%, transparent 65%); }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.topdrop img { width: 52px; height: 52px; object-fit: contain; position: relative; }
.topdrop .t { flex: 1; min-width: 0; position: relative; }
.topdrop small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.topdrop b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topdrop span.u { font-size: 12px; color: var(--muted); }
.price-chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; font-weight: 700; font-size: 14px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(255, 207, 58, .4); clip-path: var(--px4); position: relative; white-space: nowrap; }

/* ---------- live feed ---------- */
.feed { display: flex; gap: 6px; overflow: hidden; margin: 10px -12px 0; padding: 0 12px; }
.feed .f {
  --rc: var(--r-common);
  flex: none; width: 76px; height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px 4px 6px;
  background: radial-gradient(80% 50% at 50% 100%, color-mix(in srgb, var(--rc) 40%, transparent), transparent 75%), linear-gradient(#141f18, #0d150f);
  box-shadow: inset 0 0 0 1px var(--edge), inset 0 -2px 0 color-mix(in srgb, var(--rc) 70%, transparent);
  clip-path: var(--px4); animation: feedin .35s steps(5);
}
.feed .f img { width: 56px; height: 52px; object-fit: contain; }
.feed .f span { font-size: 10px; color: var(--muted); font-weight: 600; text-align: center; line-height: 1.1; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes feedin { from { transform: translateY(-20px); opacity: 0; } }

/* ---------- bonus row / search ---------- */
.bonus-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 10px 10px 12px; background: linear-gradient(var(--card-a), var(--card-b)); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px6); }
.bonus-row img { width: 46px; height: 46px; object-fit: contain; }
.bonus-row .t { flex: 1; }
.bonus-row b { display: block; font-size: 15px; }
.bonus-row small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.bonus-row small .led { width: 7px; height: 7px; background: var(--p-top); box-shadow: 0 0 6px var(--p-top); }
.bonus-row small .led.off { background: var(--dim); box-shadow: none; }

.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; margin-top: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--dim); }

/* ---------- case cards ---------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ccard {
  --tc: var(--p-top);
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 8px 8px;
  background: radial-gradient(70% 45% at 50% 38%, color-mix(in srgb, var(--tc) 22%, transparent), transparent 70%), linear-gradient(#142019, #0c140f);
  box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px8);
}
.ccard::before { content: ''; position: absolute; top: 0; left: 50%; width: 46%; height: 3px; transform: translateX(-50%); background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.ccard:active { transform: scale(.98); }
.ccard .art { width: 100%; aspect-ratio: 400 / 330; object-fit: contain; margin-top: 4px; transition: transform .2s steps(3); }
.ccard:hover .art { transform: translateY(-3px); }
.ccard .nm { font-weight: 700; font-size: 15px; margin-top: 2px; }
.ccard .upto { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.ccard .upto img { width: 18px; height: 18px; object-fit: contain; }
.ccard .pr { width: 100%; height: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 15px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); clip-path: var(--px4); }
.ccard .tag { position: absolute; top: 8px; left: 8px; z-index: 1; font-size: 10.5px; font-weight: 700; padding: 3px 7px; color: #10240b; background: var(--accent); clip-path: var(--px4); }

/* tiers */
[data-tier=common] { --tc: var(--r-common); }
[data-tier=rare] { --tc: var(--r-rare); }
[data-tier=epic] { --tc: var(--r-epic); }
[data-tier=legendary] { --tc: var(--r-legendary); }
[data-tier=mythic] { --tc: var(--r-mythic); }
[data-tier=god] { --tc: var(--r-god); }
[data-tier=secret] { --tc: var(--r-secret); }
[data-tier=og] { --tc: var(--r-og); }
[data-tier=clover] { --tc: #a6f03c; }

/* ---------- item tiles ---------- */
.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.it {
  --rc: var(--r-common);
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 4px 7px; text-align: center;
  background: radial-gradient(75% 45% at 50% 100%, color-mix(in srgb, var(--rc) 42%, transparent), transparent 75%), linear-gradient(#162119, #101812);
  box-shadow: inset 0 0 0 1px var(--edge), inset 0 -2px 0 color-mix(in srgb, var(--rc) 65%, transparent);
  clip-path: var(--px4);
}
.it img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.it .n { font-size: 11.5px; font-weight: 600; line-height: 1.15; height: 2.3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.it .v { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; margin-top: 3px; }
.it .v .coin { width: 14px; height: 14px; vertical-align: 0; }
.it .ch { position: absolute; top: 4px; right: 4px; font-size: 10px; font-weight: 700; color: var(--muted); background: rgba(0, 0, 0, .45); padding: 1px 5px; clip-path: var(--px4); }
.it .rr { position: absolute; top: 5px; left: 5px; width: 8px; height: 8px; background: var(--rc); box-shadow: 0 0 6px var(--rc); }
.it.locked img { filter: brightness(0) opacity(.5); }
.it.locked .n, .it.locked .v { color: var(--dim); }
.it.sel { box-shadow: inset 0 0 0 2px var(--p-top), inset 0 -2px 0 var(--p-top); background: radial-gradient(75% 45% at 50% 100%, rgba(92, 201, 58, .45), transparent 75%), linear-gradient(#1b2d20, #101a13); }

.r-common { --rc: var(--r-common); }
.r-rare { --rc: var(--r-rare); }
.r-epic { --rc: var(--r-epic); }
.r-legendary { --rc: var(--r-legendary); }
.r-mythic { --rc: var(--r-mythic); }
.r-god { --rc: var(--r-god); }
.r-secret { --rc: var(--r-secret); }
.r-og { --rc: var(--r-og); }
.rtag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; color: #0a120c; background: var(--rc); clip-path: var(--px4); }
.rtag.r-god { background: linear-gradient(90deg, #ff5050, #ffea00, #00aaff, #bbbbff); }
.rtag.r-secret { background: linear-gradient(#fff, #9a9a9a); }
.rtag.r-og { background: linear-gradient(90deg, #ffe066, #b38600); }

/* ---------- case page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 14px; padding: 4px 0; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: 4px; min-height: 250px; justify-content: center; }
.stage .art { width: 78%; max-width: 330px; animation: float 3s steps(12) infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.stage h1 { margin: 2px 0 0; font-size: 24px; font-weight: 700; }
.stage .mini { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.stage .mini img { width: 34px; }

.roul { position: relative; width: 100%; height: 138px; overflow: hidden; margin-top: 2px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.roul.sm { height: 98px; }
.roul + .roul { margin-top: 6px; }
.roul .strip { display: flex; gap: 6px; height: 100%; will-change: transform; }
.roul .ri {
  --rc: var(--r-common);
  flex: none; width: 108px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 4px;
  background: radial-gradient(75% 45% at 50% 100%, color-mix(in srgb, var(--rc) 42%, transparent), transparent 75%), linear-gradient(#162119, #101812);
  box-shadow: inset 0 0 0 1px var(--edge), inset 0 -2px 0 color-mix(in srgb, var(--rc) 65%, transparent);
}
.roul.sm .ri { width: 78px; }
.roul .ri img { width: 80%; height: 62%; object-fit: contain; }
.roul .ri span { font-size: 11px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roul .ri b { display: flex; align-items: center; gap: 3px; font-size: 12px; }
.roul .ri b .coin { width: 13px; height: 13px; vertical-align: 0; }
.roul.sm .ri span, .roul.sm .ri b { display: none; }
.roul .ri.win { box-shadow: inset 0 0 0 2px var(--rc), inset 0 -4px 0 var(--rc); background: radial-gradient(85% 60% at 50% 100%, color-mix(in srgb, var(--rc) 70%, transparent), transparent 80%), linear-gradient(#1c2a20, #111a14); }
.roul .line { position: absolute; z-index: 2; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px #fff, 0 0 18px var(--p-top); }
.roul .line::before, .roul .line::after { content: ''; position: absolute; left: -5px; width: 12px; height: 4px; background: #fff; }
.roul .line::before { top: 0; } .roul .line::after { bottom: 0; }
.skip { margin-top: 8px; align-self: flex-end; }

.counts { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.counts button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 8px; font-weight: 700; color: var(--dim); position: relative; }
.counts button small { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: inherit; opacity: .9; }
.counts button small .coin { width: 13px; height: 13px; vertical-align: 0; }
.counts button.on { color: #fff; }
.counts button.on::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 3px; background: var(--p-top); box-shadow: 0 0 8px var(--p-top); }
.open-row { display: flex; gap: 8px; margin-top: 12px; }
.open-row .btn { flex: 1; }
.fast { width: 64px; height: 50px; flex-direction: column; gap: 0; font-size: 11px; }
.fast svg { width: 18px; height: 18px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(1, 4, 2, .78); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; padding: 18px 14px calc(16px + var(--safe-b));
  background: linear-gradient(#15231a, #0b130e); box-shadow: inset 0 0 0 1px var(--edge-strong);
  clip-path: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% 100%, 0 100%);
  animation: up .22s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes up { from { transform: translateY(100%); } }
.sheet .cap { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.sheet .cap::before { content: ''; display: block; width: 46px; height: 4px; margin: 0 auto 10px; background: linear-gradient(90deg, var(--p-top) 0 60%, #2a3d2f 60%); }
.sheet h2 { text-align: center; font-size: 21px; margin: 4px 0 12px; }
.win { display: flex; flex-direction: column; align-items: center; text-align: center; }
.win .glow { position: relative; width: 210px; height: 210px; display: grid; place-items: center; }
.win .glow::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(color-mix(in srgb, var(--rc) 50%, transparent) 0 12deg, transparent 12deg 24deg); mask-image: radial-gradient(circle, #000 15%, transparent 68%); animation: rot 14s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.win .glow img { position: relative; width: 180px; height: 180px; object-fit: contain; animation: pop .45s steps(6); }
@keyframes pop { from { transform: scale(.3); } }
.win h3 { margin: 8px 0 4px; font-size: 20px; }
.win .val { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 18px; margin-top: 6px; }
.win-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.btn-row { display: flex; gap: 8px; margin-top: 14px; }
.btn-row > * { flex: 1; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { display: flex; align-items: center; gap: 5px; text-align: right; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 90; max-width: 90vw; padding: 11px 16px; text-align: center; font-weight: 700; font-size: 14px;
  background: #18301f; box-shadow: inset 0 0 0 1.5px var(--p-top); clip-path: var(--px4); animation: tin .2s steps(4); }
.toast.err { background: #321414; box-shadow: inset 0 0 0 1.5px var(--red); }
@keyframes tin { from { transform: translate(-50%, -10px); opacity: 0; } }

/* ---------- upgrade ---------- */
.upg { display: grid; grid-template-columns: 1fr 140px 1fr; align-items: center; gap: 6px; margin-top: 6px; }
.slot { aspect-ratio: .8; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; text-align: center; font-size: 12px; color: var(--dim); font-weight: 600;
  background: repeating-linear-gradient(45deg, rgba(122, 214, 92, .04) 0 6px, transparent 6px 12px), var(--panel); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px6); }
.slot.f { color: var(--text); background: radial-gradient(75% 45% at 50% 100%, color-mix(in srgb, var(--rc) 45%, transparent), transparent 75%), linear-gradient(#162119, #101812); box-shadow: inset 0 0 0 1px var(--edge), inset 0 -3px 0 var(--rc); }
.slot img { width: 92%; aspect-ratio: 1; object-fit: contain; }
.slot .n { font-size: 11.5px; line-height: 1.15; }
.slot .v { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; margin-top: 3px; }
.slot .v .coin { width: 14px; height: 14px; vertical-align: 0; }
.wheel { position: relative; width: 140px; height: 140px; }
.wheel svg { width: 100%; height: 100%; }
.wheel .pct { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wheel .pct b { font-size: 26px; font-weight: 700; }
.wheel .pct small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wheel .needle { position: absolute; inset: 0; transition: transform 3.6s cubic-bezier(.15, .85, .2, 1); }
.wheel .needle::before { content: ''; position: absolute; left: 50%; top: -2px; width: 6px; height: 16px; margin-left: -3px; background: #fff; box-shadow: 0 0 8px #fff; }
.wheel.win .pct b { color: var(--accent); }
.wheel.lose .pct b { color: var(--red); }
.mults { display: flex; gap: 6px; margin-top: 12px; }
.mults button { flex: 1; height: 36px; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 10px -12px 10px; padding: 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 34px; padding: 0 12px; font-size: 13px; }

.bar { height: 14px; padding: 3px; margin: 8px 0 6px; background: #0b140e; box-shadow: inset 0 0 0 2px #1d3424; }
.bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--p-top) 0 8px, var(--p-bot) 8px 10px); }

/* ---------- profile ---------- */
.prof { display: flex; align-items: center; gap: 12px; }
.ava { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #10240b; background: var(--accent) center / cover; clip-path: var(--px4); }
.ava.sm { width: 34px; height: 34px; font-size: 14px; }
.prof h2 { margin: 0; font-size: 18px; }
.prof small { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.stat { padding: 9px 10px; background: rgba(0, 0, 0, .28); clip-path: var(--px4); }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.stat b { display: flex; align-items: center; gap: 5px; font-size: 16px; margin-top: 2px; }
.stat b .coin { width: 14px; height: 14px; vertical-align: 0; }
.trow { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.trow .pos { width: 24px; text-align: center; font-weight: 700; color: var(--dim); }
.trow .pos.p1 { color: var(--gold); } .trow .pos.p2 { color: #d3dde3; } .trow .pos.p3 { color: #d98c4e; }
.trow .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .nm small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.trow img.best { width: 34px; height: 34px; object-fit: contain; }
.trow .wv { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.trow .wv .coin { width: 14px; height: 14px; vertical-align: 0; }

.invhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.invhead small { color: var(--muted); font-size: 12px; display: block; }
.invhead b { display: flex; align-items: center; gap: 6px; font-size: 20px; }

.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty img { width: 110px; }
.empty p { margin: 8px 0 14px; }

/* ---------- nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + var(--safe-b)); background: rgba(7, 13, 9, .96); border-top: 1px solid rgba(122, 214, 92, .14); }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; font-weight: 700; font-size: 10.5px; color: #4b6a54; }
.nav button svg { width: 28px; height: 28px; filter: grayscale(.85) brightness(.7); transition: transform .12s steps(2); }
.nav button.on { color: #eaf7ec; }
.nav button.on svg { filter: none; transform: translateY(-2px); }

.confetti { position: fixed; top: -12px; z-index: 80; width: 8px; height: 8px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

@media (min-width: 560px) { .items { grid-template-columns: repeat(4, 1fr); } .cases { grid-template-columns: repeat(3, 1fr); } }

/* ---------- загрузка картинок ---------- */
.it img, .ccard .art, .roul .ri img, .stage .art, .feed .f img { opacity: 0; transition: opacity .25s ease-out, transform .25s ease-out; transform: scale(.94); }
.it img.ld, .ccard .art.ld, .roul .ri img.ld, .stage .art.ld, .feed .f img.ld { opacity: 1; transform: none; }
.feed .f img { opacity: 1; transform: none; }
.it:has(img:not(.ld))::before, .ccard:has(.art:not(.ld))::after {
  content: ''; position: absolute; inset: 8px 8px auto 8px; aspect-ratio: 1; z-index: 0;
  background: linear-gradient(100deg, rgba(122,214,92,.04) 30%, rgba(122,214,92,.14) 50%, rgba(122,214,92,.04) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.1s linear infinite; clip-path: var(--px4);
}
.ccard:has(.art:not(.ld))::after { inset: 14px 14px auto 14px; aspect-ratio: 560 / 467; }
@keyframes shimmer { to { background-position: -150% 0; } }
.ccard .art { aspect-ratio: 560 / 467; }
.more { grid-column: 1 / -1; height: 44px; margin-top: 4px; }
.spin { width: 14px; height: 14px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; display: inline-block; animation: sp .6s steps(8) infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- upgrade v2 ---------- */
.upg2 { position: relative; padding: 8px 0 2px; }
.wheel2 { --rc: var(--accent); position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 0 auto; }
.wheel2::before { content: ''; position: absolute; inset: -14%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 22%, transparent), transparent 75%); transition: background .4s; }
.wheel2 svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wheel2 .tk { fill: #22322a; transition: fill .25s; }
.wheel2 .tk.z { fill: #8ee35a; }
.wheel2 .tk.hot { fill: #fff; transition: none; }
.wheel2 .core { position: absolute; inset: 22%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 42%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 80%); }
.wheel2 .core .tg { width: 54%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); margin-top: -6px; }
.wheel2 .core .q { font: 700 46px/1 'Pixelify Sans', sans-serif; color: var(--dim); }
.wheel2 .core b { font-size: 25px; font-weight: 800; letter-spacing: -.01em; line-height: 1.05; text-shadow: 0 2px 0 #000; }
.wheel2 .core small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wheel2 .verdict { position: absolute; inset: 22%; border-radius: 50%; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 8%; }
.wheel2 .verdict b { font: 700 30px/1 'Pixelify Sans', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.wheel2 .verdict small { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 6px; line-height: 1.2; }
.wheel2.win .verdict, .wheel2.lose .verdict { display: flex; animation: vpop .45s steps(5); }
.wheel2.win .core, .wheel2.lose .core { opacity: 0; }
.wheel2.win .verdict { background: radial-gradient(closest-side, rgba(10, 30, 12, .96), rgba(10, 30, 12, .9)); }
.wheel2.win .verdict b { color: var(--accent); text-shadow: 0 0 18px rgba(181, 240, 122, .7); }
.wheel2.lose .verdict { background: radial-gradient(closest-side, rgba(40, 8, 10, .96), rgba(30, 6, 8, .9)); }
.wheel2.lose .verdict b { color: var(--red); text-shadow: 0 0 18px rgba(255, 90, 90, .6); }
.wheel2.win svg { filter: drop-shadow(0 0 22px rgba(142, 227, 90, .55)); }
.wheel2.lose { animation: shake .45s steps(6); }
@keyframes vpop { from { transform: scale(.6); opacity: 0; } }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.pair { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: stretch; gap: 6px; margin-top: 12px; }
.pair .arrow { align-self: center; width: 30px; height: 30px; transform: rotate(90deg); opacity: .8; }
.ucard { --rc: var(--dim); position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 8px 9px; min-height: 150px; text-align: center;
  background: repeating-linear-gradient(45deg, rgba(122, 214, 92, .035) 0 6px, transparent 6px 12px), var(--panel); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px6); }
.ucard.f { background: radial-gradient(80% 50% at 50% 100%, color-mix(in srgb, var(--rc) 40%, transparent), transparent 75%), linear-gradient(#162119, #0e1611);
  box-shadow: inset 0 0 0 1px var(--edge), inset 0 -3px 0 var(--rc); }
.ucard .lbl { position: absolute; top: 0; left: 50%; transform: translateX(-50%); padding: 3px 10px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #0a120c; background: var(--p-top); clip-path: var(--px4); }
.ucard:last-child .lbl { background: var(--gold); }
.ucard img { width: 72%; aspect-ratio: 1; object-fit: contain; }
.ucard .n { font-size: 12px; font-weight: 600; line-height: 1.15; margin-top: 2px; }
.ucard .v { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; margin-top: 3px; }
.ucard .v .coin { width: 14px; height: 14px; }
.ucard .ph { margin: auto; font-size: 12px; font-weight: 600; color: var(--dim); }

/* ---------- top-up ---------- */
.star { font-size: .95em; margin-right: 3px; filter: saturate(1.2); }
.star-ico { width: 44px; height: 40px; display: grid; place-items: center; font-size: 30px; filter: drop-shadow(0 0 8px rgba(255, 207, 58, .5)); }
.topup h2 { margin-bottom: 2px; }
.topup .sub { margin: 0 0 12px; color: var(--muted); font-size: 13px; text-align: center; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px 10px; color: var(--text); font: inherit; cursor: pointer; border: 0;
  background: linear-gradient(#18261d, #111b14); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px6); }
.pack b { font-size: 17px; font-weight: 800; }
.pack small { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.pack small .coin { width: 12px; height: 12px; }
.pack.on { background: linear-gradient(#3a3112, #221c09); box-shadow: inset 0 0 0 2px var(--gold), 0 0 18px rgba(255, 207, 58, .25); }
.pack.on small { color: #f3dc8a; }
.custom { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; padding: 0 12px; height: 46px; background: #0b130e; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px6); }
.custom span { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.custom input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 700 16px 'Exo 2', sans-serif; text-align: right; }
.custom i { font-style: normal; }
#payBtn { display: flex; align-items: center; justify-content: center; gap: 4px; }
#payBtn .coin { width: 16px; height: 16px; }
.fine { margin: 10px 2px 0; color: var(--dim); font-size: 11px; line-height: 1.35; text-align: center; }

/* ---------- адаптив: растягиваемся вместе с окном ---------- */
:root { --wrap: 1400px; --gut: max(12px, calc((100vw - var(--wrap)) / 2)); }
#view { max-width: none; margin: 0; padding-left: var(--gut); padding-right: var(--gut); }
.topbar { padding-left: var(--gut); padding-right: var(--gut); }
.cases { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
.items { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.win-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.stats { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
@media (min-width: 560px) { .items { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } .cases { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (min-width: 1100px) { .cases { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } .items { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); } }
.nav { padding-left: max(4px, calc((100vw - 720px) / 2)); padding-right: max(4px, calc((100vw - 720px) / 2)); }
@media (min-width: 900px) {
  .upg2 { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 560px); justify-content: center; align-items: center; gap: 28px; }
  .upg2 .wheel2 { width: 100%; }
  .upg2 .pair { margin-top: 0; }
  .ucard { min-height: 220px; }
  .mults, #upgBtn { max-width: 1008px; margin-left: auto; margin-right: auto; }
  .stage { min-height: 320px; }
  .stage .art { max-width: 400px; }
}

/* ---------- admin ---------- */
.adm-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
.adm-head b { font: 700 22px/1 'Pixelify Sans', 'Exo 2', sans-serif; color: var(--accent); }
.adm-stats { margin-top: 0; }
.stat i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 1px; }
.stat b .star { margin-right: 0; }
.adm-find { display: flex; gap: 8px; align-items: stretch; }
.adm-find .search { flex: 1; margin: 0; }
.adm-find .btn { height: auto; min-height: 44px; }
.ghost.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.ava.pend { background: #22322a; color: var(--muted); }
.adm-user { margin-top: 10px; }
.adm-user .prof h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-top { display: flex; gap: 6px; margin-top: 10px; }
.adm-top img { width: 48px; height: 48px; object-fit: contain; background: rgba(0, 0, 0, .25); clip-path: var(--px4); }
.adm-sec { margin: 16px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.adm-row { display: flex; gap: 6px; }
.adm-row input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; background: #0b130e; border: 0; outline: 0; color: var(--text); font: 700 15px 'Exo 2', sans-serif; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.adm-quick { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.adm-items { margin-top: 8px; }
.adm-items:empty { display: none; }
.adm-log { padding: 6px 12px; }
.lrow { display: flex; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.lrow:last-child { border: 0; }
.lrow .t { flex: none; color: var(--dim); font-variant-numeric: tabular-nums; }
.lrow i { color: var(--muted); font-style: normal; }
.adm-give { display: flex; flex-direction: column; gap: 8px; }
.adm-give > input { height: 42px; padding: 0 12px; background: #0b130e; border: 0; outline: 0; color: var(--text); font: 700 15px 'Exo 2', sans-serif; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.adm-give .adm-quick { margin-top: 0; }
.adm-give .adm-row .btn { flex: 1; }
.adm-give small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.adm-give small:empty { display: none; }

/* ---------- редактор кейсов ---------- */
.topbar .logo { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.topbar .logo:active { transform: translateY(1px); }
.ce-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ce-card { --tc: var(--p-top); display: flex; align-items: center; gap: 8px; padding: 8px; text-align: left; color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge), inset 3px 0 0 var(--tc); clip-path: var(--px4); }
.ce-card img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.ce-card .nm { font-weight: 700; font-size: 13px; line-height: 1.2; min-width: 0; }
.ce-card .nm small { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; color: var(--muted); font-weight: 600; font-size: 11px; margin-top: 2px; }
.ce-card.off { opacity: .5; }
.ce-card.add { justify-content: center; color: var(--p-top); font-size: 22px; box-shadow: none; border: 1.5px dashed rgba(92, 201, 58, .45); clip-path: none; min-height: 60px; }
.ce-card.add .nm { font-size: 13px; }
.ce-top { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: start; }
@media (max-width: 420px) { .ce-top { grid-template-columns: 1fr; } .ce-cover { max-width: 180px; margin: 0 auto; } }
.ce-cover { --tc: var(--p-top); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; width: 100%; cursor: pointer;
  background: radial-gradient(70% 55% at 50% 60%, color-mix(in srgb, var(--tc) 35%, transparent), transparent 75%), #0b130e; box-shadow: inset 0 0 0 1.5px var(--tc); clip-path: var(--px6); }
.ce-cover > span { display: flex; width: 78%; height: 72%; align-items: center; justify-content: center; }
.ce-cover img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ce-cover small { position: absolute; bottom: 6px; left: 6px; right: 6px; text-align: center; font-size: 10.5px; color: var(--muted); }
.ce-ph { font: 700 40px 'Pixelify Sans', sans-serif; color: var(--muted); }
.ce-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ce-fields > label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ce-fields > label > input, .ce-fields select { height: 38px; padding: 0 12px; background: #0b130e; border: 0; outline: 0; color: var(--text); font: 700 15px 'Exo 2', sans-serif; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); text-transform: none; letter-spacing: 0; }
.ce-checks { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text); }
.ce-checks label { display: flex; align-items: center; gap: 6px; }
.ce-checks input { accent-color: var(--p-top); width: 16px; height: 16px; }
.ce-fields > .ghost { align-self: flex-start; }
.ce-sum { margin-top: 10px; }
.ce-sum .kv b { display: inline-flex; align-items: center; gap: 3px; }
.ce-rtp.ok { color: var(--p-top); } .ce-rtp.warn { color: #ffd23f; } .ce-rtp.bad { color: #ff5a5a; }
.ce-warn { display: block; color: #ff8a8a; font-size: 12px; margin-top: 6px; }
.ce-hint { display: block; color: var(--muted); font-size: 12px; margin: -4px 2px 8px; }
.ce-drop { padding: 4px 10px; }
.ce-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.ce-row:last-child { border: 0; }
.ce-row > img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.ce-row .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 13px; line-height: 1.2; color: var(--rc, var(--text)); }
.ce-row .nm small { display: flex; align-items: center; gap: 3px; color: var(--muted); font-weight: 600; font-size: 11px; }
.ce-row input { width: 64px; height: 32px; padding: 0 8px; text-align: right; background: #0b130e; border: 0; outline: 0; color: var(--text); font: 700 14px 'Exo 2', sans-serif; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.ce-row .pc { color: var(--muted); font-size: 12px; margin-left: -4px; }
.ce-x { width: 30px; height: 30px; flex: none; color: var(--muted); font-size: 20px; line-height: 1; background: var(--panel-2); clip-path: var(--px4); }
.ce-tools { display: flex; gap: 6px; margin-top: 8px; }
.ce-save { margin: 18px 0 8px; }

/* ---------- апгрейд v3: ставка слева, колесо, цель справа ---------- */
.upg3 { max-width: 1008px; margin: 0 auto; }
.upg-stage { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "w w" "s t"; gap: 10px; padding-top: 8px; }
.upg-stage .wheel2 { grid-area: w; }
.upg-stage .ucard.src { grid-area: s; }
.upg-stage .ucard.tgt { grid-area: t; }
.upg-stage .ucard.tgt .lbl { background: var(--gold); }
.upg-stage .ucard.src .lbl { background: var(--p-top); }
@media (min-width: 600px) {
  .upg-stage { grid-template-columns: minmax(0, 1fr) minmax(250px, 360px) minmax(0, 1fr); grid-template-areas: "s w t"; align-items: center; gap: 18px; }
  .upg-stage .wheel2 { width: 100%; }
  .upg-stage .ucard { min-height: 230px; }
}
.wheel2.drag { touch-action: none; }
.wheel2.drag svg { cursor: grab; }
.wheel2.dragging svg { cursor: grabbing; }
.wsvg { width: 100%; height: 100%; }
.upg-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.upg-bar .hint { color: var(--muted); font-size: 12px; }
.seg { display: inline-flex; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); padding: 3px; gap: 3px; }
.seg button { height: 30px; padding: 0 14px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { color: #0a120c; background: var(--p-top); clip-path: var(--px4); }
.upg3 .mults { margin-top: 8px; }
.pct-range { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.pct-range input { flex: 1; accent-color: var(--p-top); }
.pct-range b { min-width: 44px; text-align: right; color: var(--text); }
.upg3 #upgBtn { margin-top: 10px; }

/* ---------- детали дропа ---------- */
.feed .f[data-drop], .topdrop[data-drop] { cursor: pointer; }
.feed .f[data-drop]:active { transform: translateY(1px); }
.dd { --rc: var(--r-common); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 12px; text-align: center;
  background: radial-gradient(60% 55% at 50% 45%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 75%); }
.dd .art { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.dd h3 { margin: 2px 0 0; font-size: 19px; }
.dd .price-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.dd-it { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.dd-it img { height: 30px; width: 30px; object-fit: contain; }
.dd-ch { color: var(--accent); }
.dd-player { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 12px; text-align: left; color: var(--text);
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.dd-player .nm { flex: 1; font-weight: 700; }
.dd-player .nm small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.dd-player .go { font-size: 22px; color: var(--p-top); }

/* ---------- загрузка: пиксельный клевер ---------- */
#loader .logo { transform: scale(1.35); gap: 8px; }
.ld-clover { width: 112px; height: 112px; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(142, 227, 90, .35)) drop-shadow(0 4px 0 rgba(0, 0, 0, .5)); animation: clv 1.6s steps(8) infinite; }
@keyframes clv { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-6px) rotate(-6deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-6px) rotate(6deg); } }
.logo img[src$="clover.svg"] { height: 24px; image-rendering: pixelated; margin: -2px 1px; }
img.px { image-rendering: pixelated; }

/* ---------- главная v2 ---------- */
.hero { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 12px; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(92, 201, 58, .16), transparent 60%),
    repeating-linear-gradient(0deg, rgba(122, 214, 92, .05) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(122, 214, 92, .05) 0 1px, transparent 1px 8px),
    linear-gradient(#10200f, #0a140c);
  box-shadow: inset 0 0 0 1.5px rgba(92, 201, 58, .45), inset 0 -3px 0 rgba(92, 201, 58, .35); clip-path: var(--px8); }
.hero-clover { width: 58px; height: 58px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .5)); animation: clvIdle 3s steps(6) infinite; }
@keyframes clvIdle { 50% { transform: translateY(-3px) rotate(-4deg); } }
.hero-t { flex: 1; min-width: 0; }
.hero-t b { display: block; font: 700 21px/1.05 'Pixelify Sans', 'Exo 2', sans-serif; color: #eaffd6; text-shadow: 0 2px 0 #1c4a14; letter-spacing: .02em; }
.hero-t span { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.hero .btn { flex: none; }
@media (max-width: 380px) { .hero { flex-wrap: wrap; } .hero .btn { width: 100%; } }

.live { display: flex; align-items: stretch; gap: 0; margin-top: 10px; background: #070d09; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.live-tag { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px; font: 700 12px 'Pixelify Sans', sans-serif; letter-spacing: .1em; color: #0a120c; background: var(--p-top); }
.live-tag i { width: 6px; height: 6px; background: #0a120c; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ticker { flex: 1; min-width: 0; overflow: hidden; padding: 6px 0; mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
.track { display: flex; gap: 6px; width: max-content; animation: tick var(--dur, 30s) linear infinite; }
.track .dup { display: flex; gap: 6px; }
.ticker:hover .track, .ticker:active .track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(calc(-50% - 3px)); } }
.tk { --rc: var(--r-common); flex: none; position: relative; display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 9px 0 4px; color: var(--text);
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 26%, transparent), transparent 80%), #0f1912;
  box-shadow: inset 2px 0 0 var(--rc); clip-path: var(--px4); }
.tk img { width: 38px; height: 38px; object-fit: contain; }
.tk .v { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 12.5px; }
.tk .v .coin { width: 13px; height: 13px; }
.tk.top { --rc: #ffcf3a; box-shadow: inset 0 0 0 1.5px #ffcf3a; padding-top: 8px; }
.tk .crown { position: absolute; top: 1px; left: 4px; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffcf3a; }

.toolbar { display: flex; gap: 8px; align-items: center; margin: 14px 0 10px; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 200px; margin: 0; height: 40px; }
.toolbar .seg button { padding: 0 11px; }

.ccard { padding: 0; align-items: stretch; text-align: left; background: #0c140f; box-shadow: inset 0 0 0 1px var(--edge), inset 0 -3px 0 color-mix(in srgb, var(--tc) 75%, transparent); clip-path: var(--px6); }
.ccard::before { display: none; }
.ccard .cv { position: relative; padding: 8px 8px 2px;
  background: radial-gradient(65% 60% at 50% 55%, color-mix(in srgb, var(--tc) 30%, transparent), transparent 72%),
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--tc) 7%, transparent) 0 4px, transparent 4px 8px), #101a13; }
.ccard .art { margin: 0; display: block; }
.ccard .pr { position: absolute; right: 6px; bottom: 6px; width: auto; height: 28px; padding: 0 9px; gap: 4px; font-size: 14px; font-weight: 800;
  background: rgba(5, 10, 6, .82); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 60%, transparent); }
.ccard .pr .coin { width: 15px; height: 15px; }
.ccard .tag { top: 6px; left: 6px; text-transform: uppercase; letter-spacing: .06em; font-size: 9.5px; }
.ccard .ci { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px 10px; }
.ccard .nm { margin: 0; font-size: 14px; line-height: 1.15; min-width: 0; }
.ccard .upto { margin: 0; flex: none; font-size: 11.5px; font-weight: 700; color: var(--text); }
.ccard .upto span { color: var(--muted); font-weight: 600; }
.ccard .upto img { width: 20px; height: 20px; }

.upg3 .upg-row { margin-top: 10px; }
.upg3 .upg-row #upgBtn { margin-top: 0; height: 50px; }

/* ---------- честная игра ---------- */
.fair-how p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--text); }
.fair-how p:last-child { margin: 0; }
.fair-how code, .fair-check code { font-size: 12px; color: var(--accent); }
code.hash, small.hash { display: block; font: 600 11.5px/1.35 ui-monospace, Consolas, monospace; color: var(--muted); word-break: break-all; }
.fair-seeds { display: flex; flex-direction: column; gap: 10px; }
.fs { display: flex; flex-direction: column; gap: 4px; }
.fs > span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fs input, .fair-check input { height: 38px; padding: 0 12px; background: #0b130e; border: 0; outline: 0; color: var(--text); font: 600 14px ui-monospace, Consolas, monospace; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.fair-rev { margin-top: 2px; padding: 10px; background: rgba(92, 201, 58, .08); box-shadow: inset 0 0 0 1px rgba(92, 201, 58, .35); }
.fair-rev small { display: block; color: var(--accent); font-size: 12px; margin-bottom: 4px; }
.fair-list { padding: 4px 10px; }
.frow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 0; text-align: left; color: var(--text); border-bottom: 1px solid rgba(255, 255, 255, .04); }
.frow:last-child { border: 0; }
.frow img, .frow .ph { width: 36px; height: 36px; object-fit: contain; flex: none; }
.frow .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 13px; }
.frow .nm i { font-style: normal; } .frow .nm i.w { color: var(--p-top); } .frow .nm i.l { color: var(--red); }
.frow .nm small { display: block; color: var(--muted); font: 600 11px ui-monospace, Consolas, monospace; margin-top: 1px; }
.fb { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 7px; white-space: nowrap; clip-path: var(--px4); background: #18241c; color: var(--muted); }
.fb.ok { background: rgba(92, 201, 58, .2); color: var(--p-top); }
.fb.bad { background: rgba(255, 90, 90, .2); color: var(--red); }
.fair-check { display: flex; flex-direction: column; gap: 8px; }
.fair-check label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fair-check .btn { align-self: flex-start; }
.fair-check .kv b { display: inline-flex; align-items: center; gap: 6px; }
.dd-fair { margin-top: 4px; }
.dd-fair small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.fair-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px; text-align: left; color: var(--text);
  background: linear-gradient(90deg, rgba(92, 201, 58, .12), transparent 70%), var(--panel); box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px6); }
.fair-entry .ic { width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #0a120c; background: var(--p-top); clip-path: var(--px4); }
.fair-entry .t { flex: 1; } .fair-entry b { display: block; font-size: 15px; } .fair-entry small { color: var(--muted); font-size: 12.5px; }
.fair-entry .go { font-size: 22px; color: var(--p-top); }

/* ---------- апгрейд: панели инвентаря и предметов ---------- */
.upg-panels { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 900px) { .upg-panels { grid-template-columns: 1fr 1fr; align-items: start; } }
.upanel { display: flex; flex-direction: column; background: #0b130e; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px6); min-width: 0; }
.upanel header { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; background: linear-gradient(#132017, #0f1912); border-bottom: 1px solid var(--edge); }
.upanel header b { font: 700 15px 'Pixelify Sans', 'Exo 2', sans-serif; letter-spacing: .03em; text-transform: uppercase; }
.upanel header .sum { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.upanel header .sum .coin { width: 14px; height: 14px; }
.upanel header .sortb { margin-left: auto; flex: none; }
.upanel header .sum + .sortb { margin-left: 0; }
.ufilter { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 6px; padding: 8px 10px 0; }
.ufilter .search { margin: 0; height: 36px; }
.ufilter .search input { font-size: 14px; }
.ufilter > input { min-width: 0; height: 36px; padding: 0 10px; background: var(--panel); border: 0; outline: 0; color: var(--text); font: 700 14px 'Exo 2', sans-serif; box-shadow: inset 0 0 0 1px var(--edge); clip-path: var(--px4); }
.ubody { padding: 10px; max-height: min(62vh, 640px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #24402c transparent; }
.ubody .items { margin: 0; }
.ubody .more { display: block; margin: 10px auto 0; }
.ubody .it.locked { opacity: .35; filter: grayscale(.6); }
.uempty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 10px; text-align: center; }
.uempty b { font-size: 16px; } .uempty small { color: var(--muted); margin-bottom: 6px; }
.ufilter .search { min-width: 0; }
.ufilter .search input { min-width: 0; width: 100%; }

/* ---------- апгрейд: несколько предметов ---------- */
.ucard.multi { justify-content: space-between; }
.mgrid { display: grid; gap: 4px; width: 100%; margin: 4px 0 2px; grid-template-columns: repeat(3, 1fr); }
.mgrid.n2 { grid-template-columns: repeat(2, 1fr); } .mgrid.n4 { grid-template-columns: repeat(2, 1fr); }
.mgrid span { --rc: var(--r-common); aspect-ratio: 1; display: grid; place-items: center; background: radial-gradient(70% 70% at 50% 70%, color-mix(in srgb, var(--rc) 35%, transparent), transparent 75%), rgba(0, 0, 0, .25); clip-path: var(--px4); }
.mgrid img { width: 86% !important; aspect-ratio: 1; object-fit: contain; }
.usel { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 12px 0; font-size: 12.5px; color: var(--muted); }
.usel b { color: var(--text); }
.usel .coin { width: 14px; height: 14px; }
.lnk { margin-left: auto; color: var(--p-top); font-weight: 700; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.ubody .it[data-n]::after { content: attr(data-n); position: absolute; top: 4px; left: 4px; z-index: 2; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #0a120c; background: var(--p-top); clip-path: var(--px4); }
.upg-bar .warn { color: var(--red); font-weight: 700; }
