:root {
  --purple: #9a49aa; --purple-d: #6f2c80; --blue: #0bc2cf; --green: #4bc22e; --red: #e8312f; --gold: #ffcd05;
  --side: #2a1440; --text: #2b2b2b; --muted: #777;
  --shadow3d: inset 0 -6px rgba(0, 0, 0, .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Nunito', system-ui, sans-serif; font-weight: 700; color: var(--text); background: var(--bgc, #4b1f63); overflow: hidden; user-select: none; }
.hidden { display: none !important; }
h1, h2, h3, .titan { font-family: 'Titan One', 'Nunito', sans-serif; font-weight: 400; margin: 0 0 8px; letter-spacing: .3px; }
.muted { color: var(--muted); }
input, select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 3px solid #ddd; outline: none; background: #fff; color: var(--text); }
input:focus, select:focus { border-color: var(--purple); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.row.center { justify-content: center; }

/* ===== animated blacket-style background ===== */
#bg-pattern { position: fixed; inset: -160px; z-index: 0; background-color: var(--bgc, #4b1f63);
  background-image: linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%),
    linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%);
  background-size: 80px 80px; background-position: 0 0, 40px 40px; animation: bgmove 12s linear infinite; }
@keyframes bgmove { to { transform: translate(80px, 80px); } }

/* ===== layout ===== */
#app { position: relative; z-index: 1; display: flex; height: 100vh; height: 100dvh; } /* dvh = the part of a phone screen not covered by the browser's bars */
#sidebar { width: 230px; flex-shrink: 0; background: linear-gradient(180deg, #3b1a58, var(--side)); display: flex; flex-direction: column; box-shadow: 4px 0 18px rgba(0,0,0,.35); }
.logo { font-family: 'Titan One'; font-size: 44px; color: #fff; text-align: center; padding: 18px 0 12px; cursor: pointer; text-shadow: 0 4px 0 var(--purple-d), 0 6px 14px rgba(0,0,0,.4); transition: transform .2s; }
.logo:hover { transform: scale(1.06) rotate(-2deg); }
#nav { display: flex; flex-direction: column; gap: 4px; padding: 6px 12px; flex: 1; overflow-y: auto; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: #e9dcf1; text-decoration: none; font-family: 'Titan One'; font-size: 19px; cursor: pointer; transition: background .15s, transform .15s; }
#nav a:hover { background: rgba(255,255,255,.1); transform: translateX(4px); }
#nav a.active { background: #fff; color: var(--purple); box-shadow: var(--shadow3d); }
#nav .ico { font-size: 22px; width: 28px; text-align: center; }
.side-user { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.25); color: #fff; cursor: pointer; }
.side-user b { display: block; font-size: 15px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: #c9b3d6; }
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; } /* min-height 0 lets #page scroll on phones */
#topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; background: rgba(0,0,0,.18); backdrop-filter: blur(4px); }
#topbar h1 { color: #fff; font-size: 34px; margin: 0; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.token-pill { display: flex; align-items: center; gap: 8px; background: #fff; padding: 6px 16px 6px 8px; border-radius: 30px; font-family: 'Titan One'; font-size: 22px; color: var(--text); box-shadow: var(--shadow3d); }
.token-pill.bump { animation: bump .45s; } .token-pill.bump-down { animation: bumpd .45s; }
@keyframes bump { 40% { transform: scale(1.18); background: #fff6c4; } }
@keyframes bumpd { 40% { transform: scale(.92); background: #ffd9d9; } }
#page { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }
.page-inner { max-width: 1250px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; animation: pagein .35s ease-out; }
@keyframes pagein { from { opacity: 0; transform: translateY(12px); } }
.page-inner.quiet { animation: none; } /* background refreshes update in place, no flash */
.bz-row.seen { animation: none; } /* Bazaar listings already on screen don't replay their slide-in */

/* token icon */
.tok { display: inline-block; width: 1em; height: 1em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd21f 40%, #e69a00); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 0 0 2px #c27c00; position: relative; vertical-align: -.12em; flex-shrink: 0; }
.tok::after { content: ''; position: absolute; inset: 17%; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22%3E%3Cg transform=%22rotate%28-10 50 50%29%22%3E%3Cpath d=%22M47 8v16M47 76v16%22 stroke=%22%23a86a00%22 stroke-width=%228%22 stroke-linecap=%22round%22/%3E%3Cpath d=%22M30 22h24c11 0 18 6 18 14.5 0 5.5-3 9.5-7.5 11.5 6.5 2.3 10.5 7.4 10.5 14 0 9.5-8 16-20 16H30zM42 32.5v12h12c4.2 0 6.8-2.4 6.8-6s-2.6-6-6.8-6zM42 54.5v13h14c4.6 0 7.6-2.6 7.6-6.5s-3-6.5-7.6-6.5z%22 fill=%22%23a86a00%22 fill-rule=%22evenodd%22/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; } /* the Cash Course coin's own B (Nate 2026-11-05: every coin matches) */
.tok.big { width: 1.3em; height: 1.3em; }
.tokv { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; white-space: nowrap; }

/* cards & buttons */
.card { background: #fff; border-radius: 16px; padding: 18px; box-shadow: var(--shadow3d), 0 6px 16px rgba(0,0,0,.2); }
.card-title { color: var(--purple); }
.btn { font-family: 'Titan One'; font-size: 17px; border: none; border-radius: 12px; padding: 10px 18px 13px; color: #fff; background: var(--purple); box-shadow: inset 0 -5px rgba(0,0,0,.25); cursor: pointer; transition: transform .1s, filter .15s; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn:hover:not(:disabled) { transform: scale(1.05); filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(2px) scale(.98); box-shadow: inset 0 -2px rgba(0,0,0,.25); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.green { background: var(--green); } .btn.blue { background: #2f9bff; } .btn.red { background: var(--red); } .btn.gray { background: #8a8a9a; } .btn.gold { background: #f5a700; }
.btn.small { font-size: 14px; padding: 7px 12px 10px; }
.btn.big { font-size: 22px; padding: 14px 28px 18px; }

/* ===== Blook art ===== */
.blook { --s: 80px; --gl: transparent; width: var(--s); height: var(--s); position: relative; flex-shrink: 0; display: block; }
.blook .bimg { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 calc(var(--s) * .035) 0 rgba(0,0,0,.22)) drop-shadow(0 0 calc(var(--s) * .08) var(--gl)); }
.blook.locked .bimg { filter: brightness(0) opacity(.35) !important; }
.blook.r-Epic { --gl: rgba(232,49,47,.55); }
.blook.r-Legendary { --gl: rgba(255,145,15,.85); }
/* Chroma (red → green → blue glow) and Mystical (pulsing purple glow): like Secrets/Prismatics below, each glow is a still copy
   of the Pal and only their opacity moves. Animating the glow itself made the browser redraw the whole Pals page every frame. */
.blook.r-Chroma .ol0 .bimg { filter: drop-shadow(0 0 calc(var(--s) * .1) #ff4d4d); } .blook.r-Chroma .ol0 { animation: chroma0 2.4s linear infinite; }
.blook.r-Chroma .ol1 .bimg { filter: drop-shadow(0 0 calc(var(--s) * .1) #4dff88); } .blook.r-Chroma .ol1 { animation: chroma1 2.4s linear infinite; }
.blook.r-Chroma .ol2 .bimg { filter: drop-shadow(0 0 calc(var(--s) * .1) #4dd8ff); } .blook.r-Chroma .ol2 { animation: chroma2 2.4s linear infinite; }
@keyframes chroma0 { 0%, 100% { opacity: 1; } 33%, 66% { opacity: 0; } }
@keyframes chroma1 { 0%, 66%, 100% { opacity: 0; } 33% { opacity: 1; } }
@keyframes chroma2 { 0%, 33%, 100% { opacity: 0; } 66% { opacity: 1; } }
.blook.r-Mystical .ol0 .bimg { filter: drop-shadow(0 0 calc(var(--s) * .08) #b64cff); } .blook.r-Mystical .ol0 { animation: myst0 1.8s ease-in-out infinite; }
.blook.r-Mystical .ol1 .bimg { filter: drop-shadow(0 0 calc(var(--s) * .2) #e0a0ff); } .blook.r-Mystical .ol1 { animation: myst1 1.8s ease-in-out infinite; }
@keyframes myst0 { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes myst1 { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes fadeswap { 50% { opacity: 0; } }
/* glowing/outlined rarities are a stack of still copies of the Pal (one per glow colour) that fade into each other.
   'plus-lighter' adds the copies together, so mid-fade looks exactly like the colours blending. Only opacity moves,
   which the browser does cheaply — redrawing the glow filter every frame was what made the Pals page lag. */
.blook.bfx { isolation: isolate; }
.blook.bfx .ol { position: absolute; inset: 0; mix-blend-mode: plus-lighter; will-change: opacity; } .blook.bfx .ol0 { position: relative; display: block; width: 100%; height: 100%; }
.blook.bfx.locked .ol:not(.ol0) { display: none; } .blook.bfx.locked .ol0 { animation: none; }
@keyframes hue { to { filter: hue-rotate(360deg); } }
.b-desc { font-style: italic; color: var(--muted); margin: 2px 0 6px; }
.rv-desc { opacity: .9; font-style: italic; max-width: 420px; text-align: center; animation: rise .6s .65s backwards; }

/* rarity text */
.rt { font-family: 'Titan One'; font-size: 14px; padding: 2px 9px; border-radius: 8px; color: #fff; display: inline-block; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.rt-Common { background: #9a9aa8; } .rt-Uncommon { background: #4bc22e; } .rt-Rare { background: #2f7bff; } .rt-Epic { background: #e8312f; } .rt-Legendary { background: #ff910f; }
.rt-Chroma { background: linear-gradient(90deg, #ff4d4d, #ffb84d, #e8e000, #4dff88, #4dd8ff, #8a4dff, #ff4de1, #ff4d4d); background-size: 200% 100%; animation: slide 2s linear infinite; }
.rt-Mystical { background: linear-gradient(90deg, #5a14a8, #b64cff, #ff9cff, #b64cff, #5a14a8); background-size: 200% 100%; animation: slide 2.5s linear infinite; }
@keyframes slide { to { background-position: 200% 0; } }

/* ===== STATS ===== */
.stats-top { display: grid; grid-template-columns: 1fr; gap: 18px; }
.profile { display: flex; gap: 24px; align-items: center; background: linear-gradient(120deg, #fff 55%, #f4e8fa); }
.profile-blook { animation: float 3s ease-in-out infinite; }
.profile h2 { font-size: 36px; color: var(--purple); }
.profile-info .row { margin-top: 14px; }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg) scale(1.1); } 20%, 40% { transform: rotate(14deg) scale(1.1); } }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-box { background: #f6f1f9; border-radius: 14px; padding: 14px; text-align: center; box-shadow: inset 0 -4px rgba(0,0,0,.08); }
.sb-ico { font-size: 28px; } .sb-val { font-family: 'Titan One'; font-size: 26px; color: var(--purple); } .sb-lbl { color: var(--muted); font-size: 14px; }
.prog-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 26px; }
.prog-row { display: flex; align-items: center; gap: 10px; }
.prog-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c1), var(--c2)); font-size: 20px; }
.prog-name { width: 100px; font-size: 14px; }
.prog-bar { flex: 1; height: 14px; background: #eee; border-radius: 10px; overflow: hidden; }
.prog-bar div { height: 100%; border-radius: 10px; transition: width .6s; }
.prog-num { width: 44px; text-align: right; font-size: 14px; color: var(--muted); }

/* ===== PLAY ===== */
.play-hero { display: flex; justify-content: space-between; align-items: center; }
.play-hero h2 { color: var(--purple); font-size: 30px; }
.hero-blooks { display: flex; gap: 8px; } .hero-blooks .blook { animation: float 3s ease-in-out infinite; }
.hero-blooks .blook:nth-child(2) { animation-delay: .4s; } .hero-blooks .blook:nth-child(3) { animation-delay: .8s; } .hero-blooks .blook:nth-child(4) { animation-delay: 1.2s; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.mode-card { position: relative; border-radius: 20px; padding: 24px 20px 20px; color: #fff; cursor: pointer; overflow: hidden; background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 8px 18px rgba(0,0,0,.3); transition: transform .2s; min-height: 230px; }
.mode-card:hover { transform: translateY(-6px) scale(1.02); }
.mode-card:hover .mode-ico { transform: scale(1.2) rotate(-8deg); }
.mode-ico { font-size: 64px; transition: transform .25s; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); }
.mode-name { font-family: 'Titan One'; font-size: 28px; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.mode-desc { opacity: .95; margin: 6px 0 14px; }
.mode-tag { display: inline-block; background: rgba(0,0,0,.25); padding: 4px 12px; border-radius: 20px; font-size: 13px; }

/* ===== MARKET ===== */
.market-banner { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(110deg, #fff 60%, #fff4cf); }
.market-banner h2 { color: var(--purple); font-size: 28px; }
.banner-tok { font-family: 'Titan One'; font-size: 34px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 18px; }
.pack-card { position: relative; height: 230px; border-radius: 18px; overflow: hidden; cursor: pointer; color: #fff; text-align: center; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.3); transition: transform .2s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pack-card::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 12px, transparent 12px 24px); }
.pack-card:hover { transform: translateY(-8px) rotate(-1.5deg); }
.pack-card:hover .pc-emo { transform: scale(1.18) rotate(6deg); }
.pack-card.poor { filter: saturate(.55); }
.pc-emo { font-size: 78px; transition: transform .25s; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); position: relative; }
.pc-name { font-family: 'Titan One'; font-size: 21px; text-shadow: 0 3px 0 rgba(0,0,0,.3); position: relative; }
.pc-owned { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.3); border-radius: 10px; padding: 2px 8px; font-size: 13px; }
.pc-flag { position: absolute; top: 10px; right: -30px; transform: rotate(35deg); background: #b64cff; font-size: 11px; padding: 3px 32px; font-family: 'Titan One'; box-shadow: 0 0 12px #d58cff; z-index: 2; }
.pc-price { position: relative; margin-top: 10px; background: #fff; color: var(--text); padding: 4px 14px; border-radius: 20px; font-family: 'Titan One'; box-shadow: inset 0 -3px rgba(0,0,0,.15); }
.pc-shine { position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); animation: shinepc 4s infinite; will-change: transform; }
.pack-card:nth-child(3n) .pc-shine { animation-delay: 1.3s; } .pack-card:nth-child(3n+1) .pc-shine { animation-delay: 2.6s; }
@keyframes shine { 0%, 70% { transform: translateX(0) skewX(-20deg); } 100% { transform: translateX(525%) skewX(-20deg); } } /* .pk-shine: 40% wide, from left -70% to 140% (Nate 2026-11-11 speed-up: transform, not left) */
@keyframes shinepc { 0%, 70% { transform: translateX(0) skewX(-20deg); } 100% { transform: translateX(440%) skewX(-20deg); } } /* .pc-shine: 50% wide, from -80% to 140% */

.market-banner { position: relative; padding-right: 80px; }
.odds-btn { position: absolute; top: 12px; right: 12px; width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; font-family: 'Titan One'; font-size: 26px; color: #fff; background: linear-gradient(145deg, #b64cff, #6f2c80); box-shadow: inset 0 -5px rgba(0,0,0,.25), 0 0 0 4px #fff, 0 4px 12px rgba(0,0,0,.3); transition: transform .2s; }
.odds-btn:hover { transform: scale(1.12) rotate(-8deg); }
.market-sec { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-head h2 { color: #fff; margin: 0; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.sec-timer { background: rgba(0,0,0,.3); color: #fff; padding: 6px 14px; border-radius: 20px; font-family: 'Titan One'; font-size: 15px; }
.muted-l { color: #e5d3ef; }
.pack-card.daily-pack { box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 0 0 4px var(--sr), 0 0 24px var(--sr); }
.pc-shoprar { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 12px; z-index: 2; display: none; }
.daily-pack .pc-shoprar { display: inline-block; position: absolute; top: 10px; bottom: auto; left: auto; right: 10px; transform: none; }
.daily-pack .pc-flag { display: none; }
.odds-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.odds-row { display: grid; grid-template-columns: 44px 1fr auto 80px; grid-template-rows: auto 8px; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #f6f1f9; cursor: pointer; transition: transform .15s; }
.odds-row:hover { transform: translateX(4px); }
.odds-row.today { background: #fff6cf; box-shadow: 0 0 0 3px #ffd21f; }
.odds-ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(145deg, var(--c1), var(--c2)); }
.odds-n { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.odds-today { font-family: 'Titan One'; font-size: 11px; background: #ffd21f; color: #8a5a00; padding: 2px 8px; border-radius: 8px; }
.odds-n { grid-column: span 2; }
.odds-today.season { background: #ff910f; color: #fff; } .odds-today.off { background: #ddd; color: #777; }
.odds-pct { text-align: right; display: flex; flex-direction: column; } .odds-pct b { font-family: 'Titan One'; font-size: 20px; color: var(--purple); } .odds-pct small { color: var(--muted); }
.odds-bar { grid-column: 2 / -1; height: 8px; background: #e6dcec; border-radius: 6px; overflow: hidden; } .odds-bar div { height: 100%; border-radius: 6px; }
.odds-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* pack modal */
.pm-head { display: flex; gap: 16px; align-items: center; color: #fff; padding: 16px 20px; margin: -24px -24px 16px; border-radius: 20px 20px 0 0; background: linear-gradient(150deg, var(--c1), var(--c2)); }
.modal .pm-head h2 { margin: 0; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); } .pm-head .tokv { background: #fff; color: var(--text); padding: 2px 10px; border-radius: 14px; }
.pm-emo { font-size: 60px; }
.pm-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px; }
.pm-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: #f6f1f9; }
.pm-n { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pm-c { font-family: 'Titan One'; color: var(--purple); }
.pm-btns { margin-top: 16px; }

/* ===== BLOOKS ===== */
.blooks-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.blooks-list { display: flex; flex-direction: column; gap: 14px; }
.blooks-head { display: flex; justify-content: space-between; align-items: center; }
.pack-sec h3 { display: flex; align-items: center; gap: 10px; color: var(--purple); }
.pack-sec h3 small { color: var(--muted); font-family: 'Nunito'; font-size: 14px; }
.ps-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c1), var(--c2)); font-size: 20px; }
.bgrid { display: flex; flex-wrap: wrap; gap: 10px; }
.far-sec { content-visibility: auto; } /* off-screen pack sections skip drawing (height comes from app.js) */
/* a pack section scrolled out of view: its glows, outlines, shine and rainbow title wait (sleepOffscreen() in app.js) */
.pack-sec.asleep, .pack-sec.asleep *, .pack-sec.asleep::before { animation-play-state: paused !important; }
/* Market cards scrolled out of view stop animating too (Nate 2026-11-11 speed-up; sleepCards() in app.js) */
.mk-asleep *, .mk-asleep::before, .mk-asleep::after, .mk-asleep *::before, .mk-asleep *::after { animation-play-state: paused !important; }
.bcell { position: relative; cursor: pointer; border-radius: 18px; padding: 4px; transition: transform .15s; border: 3px solid transparent; }
.bcell:hover { transform: scale(1.08); }
.bcell.sel { border-color: var(--purple); background: #f2e4f7; }
.cnt { position: absolute; bottom: -2px; right: -2px; background: var(--purple); color: #fff; font-size: 12px; font-family: 'Titan One'; border-radius: 10px; padding: 1px 7px; border: 2px solid #fff; }
.blook-info { position: sticky; top: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bi-empty { color: var(--muted); padding: 40px 0; }
.bi-big { padding: 10px; border-radius: 30px; }
.bi-big.glow-Legendary, .bi-big.glow-Chroma, .bi-big.glow-Mystical, .bi-big.glow-Epic { background: radial-gradient(circle, var(--rc) 0%, transparent 70%); }
.bi-big .blook { animation: float 3s ease-in-out infinite; }
.bi-rows { width: 100%; display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bi-rows div { display: flex; justify-content: space-between; background: #f6f1f9; padding: 8px 12px; border-radius: 10px; }
.bi-rows span { color: var(--muted); }
.bi-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; }

/* ===== BAZAAR ===== */
.bz-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bz-top input { flex: 1; min-width: 160px; }
.tabs { display: flex; background: #eee; border-radius: 12px; padding: 4px; }
.tab { font-family: 'Titan One'; border: none; background: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 15px; }
.tab.on { background: #fff; color: var(--purple); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.bz-info { color: #e5d3ef; text-align: center; font-size: 14px; }
.bz-list { display: flex; flex-direction: column; gap: 10px; }
.bz-row { display: grid; grid-template-columns: 62px 1.4fr 1fr 150px 90px; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 10px 16px; box-shadow: inset 0 -4px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.15); animation: pagein .3s; border-left: 6px solid #bbb; }
.r-row-Uncommon { border-left-color: #4bc22e; } .r-row-Rare { border-left-color: #2f7bff; } .r-row-Epic { border-left-color: #e8312f; } .r-row-Legendary { border-left-color: #ff910f; }
.r-row-Chroma { border-left-color: #00e5ff; background: linear-gradient(90deg, #eafcff, #fff 40%); } .r-row-Mystical { border-left-color: #b64cff; background: linear-gradient(90deg, #f6e8ff, #fff 40%); }
.bz-name { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.bz-name b { font-size: 17px; }
.bz-seller { color: var(--muted); display: flex; flex-direction: column; font-size: 14px; } .bz-seller small { font-size: 12px; opacity: .8; }
.bz-price { font-family: 'Titan One'; font-size: 19px; display: flex; flex-direction: column; }
.deal { font-family: 'Nunito'; font-size: 12px; color: #e8571c; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.lm-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 36vh; overflow-y: auto; padding: 6px; background: #f6f1f9; border-radius: 12px; }
.lm-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.lm-form label { display: flex; align-items: center; gap: 10px; font-family: 'Titan One'; }
.lm-form input { width: 160px; }
#lm-sel { display: flex; align-items: center; gap: 12px; }

/* ===== SETTINGS ===== */
.settings { max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.settings h3 { color: var(--purple); margin-top: 10px; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { display: none; }
.toggle span { width: 50px; height: 28px; border-radius: 20px; background: #ccc; position: relative; transition: background .2s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle input:checked + span { background: var(--green); } .toggle input:checked + span::after { left: 25px; }
.small-note { font-size: 13px; }

/* ===== MODALS & TOASTS ===== */
#modal-root { position: relative; z-index: 400; }
.modal-bg { position: fixed; inset: 0; background: rgba(20, 5, 30, .6); display: grid; place-items: center; padding: 16px; animation: fade .2s; z-index: 400; }
.modal { position: relative; background: #fff; border-radius: 20px; padding: 24px; width: min(560px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow3d), 0 20px 50px rgba(0,0,0,.5); animation: pop .3s cubic-bezier(.2, 1.5, .4, 1); }
.modal.wide { width: min(760px, 100%); } .modal.small { width: min(440px, 100%); }
.modal h2 { color: var(--purple); }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,0,0,.15); color: #fff; font-size: 16px; cursor: pointer; }
.modal-x:hover { background: rgba(0,0,0,.3); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.welcome { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.welcome h1 { color: var(--purple); font-size: 32px; }
.welcome-blooks { display: flex; gap: 10px; } .welcome-blooks .blook { animation: float 2.5s ease-in-out infinite; } .welcome-blooks .blook:nth-child(2) { animation-delay: .5s; }
.welcome input { width: 100%; text-align: center; font-size: 20px; }
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow3d), 0 8px 20px rgba(0,0,0,.35); border-left: 6px solid var(--purple); animation: toastin .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .4s, transform .4s; max-width: 380px; }
.toast.good { border-left-color: var(--green); } .toast.bad { border-left-color: var(--red); }
.toast.out { opacity: 0; transform: translateX(40px); }
@keyframes toastin { from { transform: translateX(120%); } }

/* ===================== PACK OPENING ===================== */
#open-overlay.ov { position: fixed; inset: 0; z-index: 300; overflow: hidden; display: grid; place-items: center; color: #fff; --dim: .3; }
.ov.closing { animation: fadeout .3s forwards; }
body.ov-cover #app, body.ov-cover #bg-pattern { visibility: hidden; } /* hidden behind the opening screen: not drawn while you open packs (opening.js) */
@keyframes fadeout { to { opacity: 0; } }
.ov-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, var(--c1) 0%, var(--c2) 35%, #07020d 80%); animation: fade .4s; }
.ov-bg::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--dim); transition: opacity .2s; }
.ov-stars i { position: absolute; width: var(--sz); height: var(--sz); border-radius: 50%; background: #fff; opacity: 0; animation: mote linear infinite; box-shadow: 0 0 6px #fff; }
@keyframes mote { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(-120px); } }
.rays { position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; background: repeating-conic-gradient(from 0deg, var(--ray) 0deg 7deg, transparent 7deg 18deg); -webkit-mask: radial-gradient(circle, #000 0%, transparent 45%); mask: radial-gradient(circle, #000 0%, transparent 45%); opacity: 0; transition: opacity .6s; animation: spin 24s linear infinite; pointer-events: none; }
.rays.r2 { animation-direction: reverse; animation-duration: 36s; background: repeating-conic-gradient(from 5deg, var(--ray) 0deg 3deg, transparent 3deg 25deg); }
.rays.on { opacity: 1; }
.ov.rainbow .rays { filter: hue-rotate(0deg); animation: spin 18s linear infinite, huefil 3s linear infinite; background: repeating-conic-gradient(from 0deg, #ff4d4d88 0deg 7deg, transparent 7deg 18deg, #4dd8ff88 18deg 25deg, transparent 25deg 36deg); }
.ov.mystic .ov-bg { background: radial-gradient(circle at 50% 50%, #b64cff 0%, #3a0a6b 35%, #07020d 80%); }
@keyframes huefil { to { filter: hue-rotate(360deg); } }
@keyframes spin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.stage { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; padding: 20px; }
.flash { position: absolute; inset: 0; background: var(--flash, #fff); opacity: 0; pointer-events: none; z-index: 6; }
.flash.go { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.ov-skip { position: absolute; bottom: 20px; right: 20px; z-index: 7; background: rgba(255,255,255,.15); color: #fff; border: 2px solid rgba(255,255,255,.4); border-radius: 20px; padding: 6px 16px; font-family: 'Titan One'; cursor: pointer; }
.ov.quake { animation: quake .6s; } .ov.quake-sm { animation: quakesm .4s; }
@keyframes quake { 10%, 50%, 90% { transform: translate(-12px, 8px) rotate(-.6deg); } 30%, 70% { transform: translate(12px, -8px) rotate(.6deg); } }
@keyframes quakesm { 25%, 75% { transform: translate(-5px, 3px); } 50% { transform: translate(5px, -3px); } }

.pack-holder { position: relative; cursor: pointer; animation: packdrop .9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes packdrop { from { transform: translateY(-120vh) rotate(-25deg); } }
.pack-holder:hover .pack3d:not(.charging):not(.torn) { transform: scale(1.05) rotate(-2deg); }
.pack3d { position: relative; width: 230px; height: 330px; transition: transform .3s; filter: drop-shadow(0 0 var(--gs, 14px) var(--glow, rgba(255,255,255,.5))) drop-shadow(0 18px 20px rgba(0,0,0,.5)); animation: idlefloat 2.6s ease-in-out infinite; }
@keyframes idlefloat { 50% { transform: translateY(-10px) rotate(1.5deg); } }
.pack3d .pk-top, .pack3d .pk-body { position: absolute; left: 0; width: 100%; background: linear-gradient(160deg, var(--c1), var(--c2)); overflow: hidden; }
.pk-top { top: 0; height: 64px; border-radius: 14px 14px 0 0; transition: transform .9s cubic-bezier(.2, .7, .3, 1), opacity .9s; }
.pk-body { top: 64px; height: 266px; border-radius: 0 0 14px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform 1s cubic-bezier(.5, 0, .8, .4), opacity 1s; }
.pk-top::before, .pk-body::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 14px, transparent 14px 28px); }
.pk-body { background-position: 0 -64px; background-size: 100% 330px; } .pk-top { background-size: 100% 330px; }
.crimp { position: absolute; top: 0; left: 0; right: 0; height: 22px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 4px, rgba(0,0,0,.15) 4px 8px); }
.crimp.b { top: auto; bottom: 0; }
.tear-line { position: absolute; bottom: 4px; left: 8px; right: 8px; border-bottom: 3px dashed rgba(255,255,255,.6); }
.pk-emo { font-size: 110px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.3)); position: relative; }
.pk-name { font-family: 'Titan One'; font-size: 30px; text-shadow: 0 4px 0 rgba(0,0,0,.35); position: relative; }
.pk-sub { font-family: 'Titan One'; font-size: 13px; letter-spacing: 4px; opacity: .8; position: relative; margin-bottom: 14px; }
.pk-shine { position: absolute; top: 0; left: -70%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); animation: shine 3s infinite; will-change: transform; }
.pack3d.charging { animation: shake .09s infinite; }
@keyframes shake { 0% { transform: translate(var(--amp), 0) rotate(var(--rot)); } 25% { transform: translate(calc(var(--amp) * -1), calc(var(--amp) * .5)) rotate(calc(var(--rot) * -1)); } 50% { transform: translate(calc(var(--amp) * .6), calc(var(--amp) * -.6)) rotate(var(--rot)); } 75% { transform: translate(calc(var(--amp) * -.6), 0) rotate(calc(var(--rot) * -1)); } }
.pack3d.torn { animation: none; }
.pack3d.torn .pk-top { transform: translate(180px, -420px) rotate(70deg); opacity: 0; }
.pack3d.torn .pk-body { transform: translateY(110vh) rotate(-14deg); opacity: 0; }
.hint { font-family: 'Titan One'; font-size: 24px; text-shadow: 0 3px 0 rgba(0,0,0,.4); animation: pulse 1.2s ease-in-out infinite; transition: opacity .3s; }
.hint.gone { opacity: 0; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .75; } }
.multi-stack .ghost { position: absolute; top: 0; left: 0; filter: brightness(.7); transition: transform .4s; }
.multi-stack .g1 { transform: rotate(-6deg) translate(-14px, 6px); } .multi-stack .g2 { transform: rotate(7deg) translate(16px, 10px); }
.multi-stack .ghost.fan.g1 { transform: rotate(-16deg) translate(-70px, 10px); } .multi-stack .ghost.fan.g2 { transform: rotate(16deg) translate(70px, 10px); }
.multi-count { position: absolute; top: -18px; right: -24px; background: var(--red); font-family: 'Titan One'; font-size: 26px; padding: 4px 14px; border-radius: 20px; box-shadow: var(--shadow3d); z-index: 3; transform: rotate(10deg); }

/* particles */
.pt { position: absolute; width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); border-radius: 50%; background: var(--col); box-shadow: 0 0 10px var(--col); animation: ptfly var(--dur) cubic-bezier(.1, .8, .3, 1) forwards; }
.pt.star { border-radius: 2px; transform: rotate(45deg); }
@keyframes ptfly { to { transform: translate(var(--dx), var(--dy)) scale(0) rotate(180deg); opacity: 0; } }
.cf { position: absolute; top: -30px; background: var(--col); animation: fall var(--dur) cubic-bezier(.3, .2, .6, 1) forwards; border-radius: 2px; }
@keyframes fall { to { transform: translate(var(--rx), 112vh) rotate(900deg); } }
.shock { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; border: 8px solid var(--col); animation: shock .9s ease-out forwards; }
@keyframes shock { to { transform: scale(30); opacity: 0; border-width: 1px; } }

/* single reveal */
.reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.rv-aura { position: absolute; top: -40px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, var(--rc) 0%, transparent 65%); opacity: .55; animation: aura 2s ease-in-out infinite; pointer-events: none; }
.reveal.t0 .rv-aura { opacity: .15; }
@keyframes aura { 50% { transform: scale(1.15); opacity: .8; } }
.rv-blook { animation: blookin 1s cubic-bezier(.2, 1.4, .4, 1); position: relative; }
.rv-blook .blook { animation: float 3s ease-in-out 1s infinite; }
.reveal.t4 .rv-blook .blook, .reveal.t5 .rv-blook .blook, .reveal.t6 .rv-blook .blook { filter: drop-shadow(0 0 30px var(--rc)); }
@keyframes blookin { 0% { transform: scale(0) rotateY(0) translateY(160px); } 60% { transform: scale(1.15) rotateY(720deg) translateY(-10px); } 100% { transform: scale(1) rotateY(720deg); } }
.rv-name { font-family: 'Titan One'; font-size: 46px; text-shadow: 0 4px 0 rgba(0,0,0,.4); animation: rise .6s .4s backwards; }
.rv-rar { font-size: 26px; padding: 4px 22px; border-radius: 14px; animation: rise .6s .55s backwards, rarglow 1.5s ease-in-out 1.2s infinite; box-shadow: 0 0 20px var(--rc); }
@keyframes rarglow { 50% { box-shadow: 0 0 40px var(--rc); } }
.rv-meta { opacity: .85; animation: rise .6s .7s backwards; }
.rv-btns { display: flex; gap: 12px; margin-top: 10px; animation: rise .6s .9s backwards; flex-wrap: wrap; justify-content: center; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.new-badge { position: absolute; top: -6px; right: -50px; z-index: 3; background: #ffd21f; color: #b0004a; font-family: 'Titan One'; font-size: 26px; padding: 4px 14px; border-radius: 10px; transform: rotate(14deg); box-shadow: var(--shadow3d), 0 0 20px #ffd21f; animation: stamp .5s 1s cubic-bezier(.2, 1.8, .4, 1) backwards; }
@keyframes stamp { from { transform: rotate(14deg) scale(3); opacity: 0; } }

/* multi reveal */
.multi { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.multi-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; max-width: 900px; }
.mcard { width: 140px; height: 190px; perspective: 900px; cursor: pointer; animation: deal .55s cubic-bezier(.2, 1.3, .4, 1) backwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes deal { from { transform: translateY(70vh) rotate(30deg) scale(.4); opacity: 0; } }
.mcard-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.mcard:hover:not(.flipped) .mcard-inner { transform: translateY(-8px) rotate(-2deg); }
.mcard.pre .mcard-inner { animation: preshake .1s infinite; filter: drop-shadow(0 0 18px var(--rc)); }
@keyframes preshake { 50% { transform: translate(3px, -2px) rotate(2deg); } }
.mcard.flipped .mcard-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.face.back { background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: inset 0 -6px rgba(0,0,0,.3), 0 0 0 4px rgba(255,255,255,.7); font-size: 56px; }
.face.back em { font-family: 'Titan One'; font-style: normal; font-size: 28px; opacity: .8; }
.face.front { transform: rotateY(180deg); background: #1c1028; border: 4px solid var(--rc); box-shadow: 0 0 22px var(--rc); padding: 8px; text-align: center; }
.face.front.t5, .face.front.t6 { background: linear-gradient(160deg, #2a1040, #10061c); }
.mc-name { font-family: 'Titan One'; font-size: 15px; line-height: 1.1; }
.mc-new { position: absolute; top: -10px; right: -10px; background: #ffd21f; color: #b0004a; font-family: 'Titan One'; font-size: 13px; padding: 2px 8px; border-radius: 8px; transform: rotate(12deg); }
.multi-sum { display: flex; gap: 16px; background: rgba(0,0,0,.35); padding: 10px 20px; border-radius: 16px; font-family: 'Titan One'; animation: rise .4s; flex-wrap: wrap; justify-content: center; align-items: center; }

/* ===================== GAMES ===================== */
.g-crypto .q-box, .g-crypto .choose h2 { font-family: 'Courier New', monospace; font-weight: 900; }


.chest-wrap { text-align: center; } .chest-wrap h2 { font-size: 40px; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.chests { display: flex; gap: 30px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.chest { width: 190px; height: 210px; background: rgba(255,255,255,.15); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s; border: 4px solid rgba(255,255,255,.3); animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.chest:nth-child(2) { animation-delay: .1s; } .chest:nth-child(3) { animation-delay: .2s; }
.chest:hover:not(.open) { transform: translateY(-10px) rotate(-3deg); }
.chest:hover:not(.open) .chest-lid { animation: wiggle 1s infinite; }
.chest-lid { font-size: 100px; transition: transform .4s, opacity .4s; }
.chest-res { display: none; font-family: 'Titan One'; font-size: 22px; flex-direction: column; align-items: center; }
.chest-res span { font-size: 70px; }
.chest.open .chest-lid { display: none; } .chest.open .chest-res { display: flex; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.chest.picked { background: #fff; color: var(--text); border-color: var(--gold); box-shadow: 0 0 40px var(--gold); transform: scale(1.08); }
.chest.dim { opacity: .45; }
.cbox { width: 180px; padding: 26px 10px; background: #0f3d22; border: 3px solid #3ee87f; border-radius: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: 'Courier New', monospace; font-size: 20px; color: #3ee87f; box-shadow: 0 0 20px rgba(62,232,127,.3); transition: transform .2s; animation: pop .4s backwards; }
.cbox:hover { transform: scale(1.06); box-shadow: 0 0 40px rgba(62,232,127,.6); }
.cbox-ico { font-size: 60px; }
.muted-l { opacity: .8; }
.pw-list { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pw { font-family: 'Courier New', monospace; font-weight: 900; font-size: 22px; padding: 18px 26px; border-radius: 14px; border: 3px solid #3ee87f; background: #0f3d22; color: #3ee87f; cursor: pointer; transition: transform .15s; }
.pw:hover { transform: scale(1.06); } .pw.ok { background: #3ee87f; color: #0f3d22; } .pw.no { border-color: #ff4b4b; color: #ff4b4b; animation: quakesm .3s; }
.g-race .pw.power { font-family: 'Titan One'; background: #fff; color: var(--text); border-color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 190px; }
.pw.power span { font-size: 46px; } .pw.power small { font-family: 'Nunito'; font-size: 13px; color: var(--muted); }
.terminal h2 { color: #3ee87f; }

/* fishing */
.pond { width: 100%; max-width: 760px; height: 440px; border-radius: 24px; overflow: hidden; position: relative; background: linear-gradient(#8fd8ff 0 40%, #1b6fc0 40%); box-shadow: var(--shadow3d), 0 10px 26px rgba(0,0,0,.3); animation: pop .3s; }
.pond-sky { position: absolute; inset: 0 0 60% 0; }
.rod { position: absolute; left: 30px; top: 10px; font-size: 80px; transform: scaleX(-1); }
.line { position: absolute; left: 50%; top: 20px; width: 2px; height: 0; background: #333; animation: castline 1s .2s forwards; }
@keyframes castline { to { height: 190px; } }
.bobber { position: absolute; left: calc(50% - 12px); top: -40px; font-size: 22px; animation: bob 1s .2s forwards; }
@keyframes bob { 70% { top: 166px; } 100% { top: 160px; } }
.pond.bite .bobber { animation: bitebob .2s infinite; top: 160px; }
@keyframes bitebob { 50% { top: 172px; } }
.water { position: absolute; inset: 40% 0 0 0; overflow: hidden; }
.wave { position: absolute; top: -10px; left: -50%; width: 200%; height: 30px; background: radial-gradient(circle at 20px -5px, transparent 22px, #1b6fc0 23px); background-size: 40px 30px; animation: wave 3s linear infinite; opacity: .7; }
.wave.w2 { top: -4px; animation-duration: 5s; opacity: .4; }
@keyframes wave { to { transform: translateX(40px); } }
.swim { position: absolute; top: 60%; left: -10%; font-size: 40px; animation: swim 7s linear infinite; opacity: .6; }
.swim.s2 { top: 30%; animation-duration: 10s; animation-delay: 2s; font-size: 30px; }
@keyframes swim { to { left: 110%; } }
.pond-txt { position: absolute; top: 20px; right: 24px; font-family: 'Titan One'; font-size: 26px; color: #134; }
.pond.caught .pond-txt, .pond.frenzy .pond-txt { inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; animation: fade .3s; }
.pond.frenzy { animation: huefil 1s linear infinite; }
.catch { display: flex; flex-direction: column; align-items: center; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.catch-e { font-size: 120px; animation: float 2s ease-in-out infinite; } .catch b { font-size: 40px; } .catch small { font-size: 22px; }

/* racing */
.race { width: 100%; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.race-track { position: relative; background: rgba(0,0,0,.25); border-radius: 18px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; transition: filter .3s; }
.race-track.frozen .lane:not(.me) { filter: hue-rotate(180deg) brightness(1.3); }
.lane { position: relative; height: 46px; background: repeating-linear-gradient(90deg, #6b4a2b 0 30px, #7d5634 30px 60px); border-radius: 10px; display: flex; align-items: center; }
.lane.me { box-shadow: 0 0 0 3px #fff; }
.lane-name { position: absolute; left: 8px; font-size: 12px; opacity: .8; z-index: 1; }
.lane-run { position: absolute; transition: left .6s cubic-bezier(.3, 1.4, .5, 1); margin-left: 4px; }
.lane-n { position: absolute; right: 8px; font-family: 'Titan One'; }
.finish-line { position: absolute; top: 10px; bottom: 10px; right: 50px; width: 14px; background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.race-q { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.g-race .q-box { padding: 18px; font-size: 26px; } .g-race .ans { padding: 18px 10px; }


/* game setup modal */
.gs-head { display: flex; gap: 16px; align-items: center; color: #fff; padding: 18px 22px; margin: -24px -24px 16px; border-radius: 20px 20px 0 0; background: linear-gradient(150deg, var(--c1), var(--c2)); }
.gs-head > span { font-size: 64px; } .gs-head h2 { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); margin: 0; } .gs-head p { margin: 4px 0 0; }
.modal h3 { color: var(--purple); margin-top: 12px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.set-card { border: 4px solid transparent; background: #f6f1f9; border-radius: 14px; padding: 12px; text-align: center; cursor: pointer; transition: transform .15s; display: flex; flex-direction: column; gap: 2px; }
.set-card:hover { transform: translateY(-3px); }
.set-card.sel { border-color: var(--c); background: #fff; box-shadow: 0 0 0 3px var(--c) inset; }
.set-ico { font-size: 34px; } .set-card small { color: var(--muted); }
.seg { display: flex; gap: 8px; }
.seg-b { font-family: 'Titan One'; font-size: 16px; padding: 10px 20px; border-radius: 12px; border: none; background: #eee; color: var(--muted); cursor: pointer; }
.seg-b.on { background: var(--purple); color: #fff; box-shadow: inset 0 -4px rgba(0,0,0,.25); }


/* play page */
.play-top { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.join-card h2, .play-hero h2 { color: var(--purple); }
.join-row { display: flex; gap: 8px; margin-top: 8px; }
.join-row input { flex: 1; min-width: 0; font-family: 'Titan One'; font-size: 26px; letter-spacing: 6px; text-align: center; }
.event-banner { background: linear-gradient(90deg, #ff7b1c, #7a2bd1); color: #fff; padding: 12px 18px; border-radius: 14px; text-align: center; box-shadow: 0 0 24px rgba(255,123,28,.5); animation: pulse 2.5s ease-in-out infinite; }
.mode-card.locked { filter: grayscale(.85) brightness(.75); cursor: not-allowed; }
.mode-card.locked:hover { transform: none; }
.mode-card.event { box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 0 0 4px #ffd23f, 0 0 30px #ff910f; }
.mode-plus { position: absolute; top: 14px; right: 14px; background: #ffd23f; color: #6b3a00; font-family: 'Titan One'; font-size: 12px; padding: 3px 10px; border-radius: 10px; }
.mode-card { min-height: 210px; }


/* battle royale */
.bracket { display: flex; gap: 4px; justify-content: center; margin: 6px 0 14px; } .bracket span { opacity: .8; } .bracket span.me { opacity: 1; transform: scale(1.25); }
.vs { display: flex; align-items: center; justify-content: center; gap: 30px; font-family: 'Titan One'; font-size: 48px; }
.vs-name { margin: 10px 0 16px; }
.duel-hud { display: flex; justify-content: space-between; gap: 20px; width: 100%; max-width: 900px; margin-bottom: 14px; }
.dh { flex: 1; display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.25); padding: 8px 12px; border-radius: 14px; font-family: 'Titan One'; }
.dh.opp { flex-direction: row; }
.hpbar { flex: 1; height: 16px; background: rgba(0,0,0,.4); border-radius: 8px; overflow: hidden; } .hpbar div { height: 100%; background: linear-gradient(90deg, #4bc22e, #a6f06a); transition: width .4s; }
.dh.opp .hpbar div { background: linear-gradient(90deg, #e8312f, #ff8a6a); margin-left: auto; }
.duel-q { width: 100%; display: flex; justify-content: center; }
.g-royale .g-area { flex-direction: column; }

/* café */
.cafe { width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 16px; }
.cafe-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seat { background: #fff8ec; color: var(--text); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 210px; box-shadow: var(--shadow3d); animation: pop .3s; }
.seat.ready { box-shadow: var(--shadow3d), 0 0 0 4px #4bc22e; }
.empty-seat { justify-content: center; font-size: 60px; opacity: .4; background: rgba(255,255,255,.2); }
.cust { font-size: 60px; } .bubble { background: #fff; border: 3px solid #ddd; border-radius: 16px; padding: 4px 12px; font-size: 28px; }
.patience { width: 100%; height: 8px; background: #eee; border-radius: 6px; overflow: hidden; } .patience div { height: 100%; background: linear-gradient(90deg, #e8312f, #ffd23f, #4bc22e); background-size: 300px 100%; transition: width .25s linear; }
.cafe-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: rgba(0,0,0,.25); border-radius: 18px; padding: 12px; flex-wrap: wrap; }
.cafe-foods { display: flex; gap: 10px; flex-wrap: wrap; } .cafe-btns { display: flex; gap: 8px; }
.food { background: #fff; color: var(--text); border-radius: 12px; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.food span { font-size: 30px; } .food b { font-family: 'Titan One'; } .food small { color: var(--muted); } .food.empty { opacity: .5; background: #fdd; }
.shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shop-item { font: inherit; border: none; border-radius: 14px; background: #f6f1f9; padding: 12px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto auto; text-align: left; cursor: pointer; gap: 0 8px; }
.shop-item span { grid-row: span 3; font-size: 36px; } .shop-item small { color: var(--muted); } .shop-item em { font-style: normal; font-family: 'Titan One'; color: #2a9a1a; }
.shop-item:disabled { opacity: .45; cursor: not-allowed; } .shop-item:hover:not(:disabled) { background: #efe2f7; }

/* factory & bees & plush & santa (shared "panel + question" layouts) */
.factory, .bees, .plush, .santa { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 12px; }
.fac-head { display: flex; justify-content: space-between; font-family: 'Titan One'; font-size: 20px; }
.fac-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.fac-slot { background: rgba(255,255,255,.95); color: var(--text); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 140px; justify-content: center; box-shadow: var(--shadow3d); }
.fac-slot.empty { background: rgba(255,255,255,.12); color: #fff; font-size: 34px; box-shadow: none; border: 3px dashed rgba(255,255,255,.3); }
.fac-q, .bee-q, .pl-q, .sw-q { width: 100%; display: flex; justify-content: center; }
.fac-q .choose h2, .bee-q .choose h2, .sw-q .choose h2 { font-size: 22px; }
.hive-scene { position: relative; height: 220px; background: linear-gradient(#9de0ff, #c8f0a0); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow3d); }
.hive-row { position: absolute; top: 14px; left: 20px; font-size: 44px; letter-spacing: 4px; }
.flower-row { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 30px; white-space: nowrap; overflow: hidden; }
.bee-swarm span { position: absolute; left: var(--x); top: var(--y); font-size: 24px; animation: buzz var(--d) ease-in-out infinite alternate; }
@keyframes buzz { 0% { transform: translate(0, 0) rotate(-10deg); } 50% { transform: translate(40px, -20px) rotate(10deg); } 100% { transform: translate(-30px, 15px) scaleX(-1); } }
.bee-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; background: rgba(0,0,0,.25); padding: 8px; border-radius: 12px; }
.pl-top { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,.25); padding: 10px 16px; border-radius: 14px; font-size: 22px; }
.pl-mats { display: flex; gap: 16px; font-family: 'Titan One'; }
.pl-orders, .sw-reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; min-height: 120px; }
.pl-order, .sw-req { background: #fff; color: var(--text); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--shadow3d); animation: pop .3s; }
.pl-order.ready, .sw-req.ready { box-shadow: var(--shadow3d), 0 0 0 4px #4bc22e; }
.pl-ico, .sw-kid { font-size: 46px; } .pl-need { font-size: 18px; } .sw-wish { font-size: 28px; }
.sw-sleigh { background: rgba(0,0,0,.3); padding: 10px 16px; border-radius: 14px; font-size: 26px; text-align: center; }

/* claw */
.claw-machine { position: relative; width: 100%; max-width: 640px; background: linear-gradient(#ffe0f5, #d6c8ff); border-radius: 26px; padding: 20px; box-shadow: var(--shadow3d), 0 0 0 10px #ff5ecf; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.claw-rail { position: relative; width: 100%; height: 200px; border-top: 8px solid #666; }
.claw { position: absolute; top: 0; left: 0; width: 60px; margin-left: -30px; display: flex; flex-direction: column; align-items: center; }
.claw-rope { width: 4px; height: 20px; background: #555; transition: height .7s ease-in; }
.claw.drop .claw-rope { height: 150px; }
.claw-hand { font-size: 40px; transform: rotate(180deg); }
.claw.holding .claw-hand { transform: none; }
.claw-pit { display: grid; grid-template-columns: repeat(6, 1fr); width: 100%; gap: 6px; margin-top: -40px; }
.prize { display: flex; flex-direction: column; align-items: center; color: var(--text); font-family: 'Titan One'; } .prize span { font-size: 40px; } .prize.grabbed { opacity: 0; transition: opacity .3s; }

/* kingdom */
.kingdom { width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.kd-stats { display: flex; gap: 22px; background: rgba(0,0,0,.3); padding: 12px 22px; border-radius: 18px; }
.kd-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 26px; }
.kd-stat b { font-size: 14px; } .kd-bar { width: 22px; height: 80px; background: rgba(255,255,255,.2); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.kd-bar div { width: 100%; background: linear-gradient(#ffd23f, #4bc22e); transition: height .5s; }
.kd-stat.low .kd-bar div { background: #e8312f; } .kd-stat.low { animation: pulse .8s infinite; }
.kd-visitor { background: #fff; color: var(--text); border-radius: 22px; padding: 20px 30px; text-align: center; width: 100%; box-shadow: var(--shadow3d); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.kd-visitor h2 { color: var(--purple); } .kd-visitor p { font-size: 20px; } .kd-ico { font-size: 80px; }
.kd-btns { display: flex; gap: 16px; } .kd-btns .btn { flex-direction: column; min-width: 170px; } .kd-btns small { font-family: 'Nunito'; font-size: 14px; }
.kd-q { width: 100%; }

.td-side { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 120px); overflow-y: auto; }
.td-money { display: flex; justify-content: space-between; background: rgba(0,0,0,.3); border-radius: 12px; padding: 8px 12px; font-family: 'Titan One'; }
.td-towers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.td-tw { font: inherit; border: 3px solid transparent; border-radius: 12px; background: #fff; color: var(--text); padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.td-tw span { font-size: 28px; } .td-tw small { color: #2a9a1a; font-weight: 900; } .td-tw.sel { border-color: #ffd23f; box-shadow: 0 0 12px #ffd23f; } .td-tw:disabled { opacity: .5; }
.td-info { background: rgba(0,0,0,.25); border-radius: 12px; padding: 8px; font-size: 14px; }
.td-q .q-box { font-size: 15px; padding: 10px; } .td-q .answers { grid-template-columns: 1fr; } .td-q .ans { font-size: 14px; padding: 9px; }
.td-q .feedback { padding: 12px 20px; }

/* study */
.study-hero { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(110deg, #fff 60%, #e3f3ff); }
.study-hero h2 { color: var(--purple); font-size: 30px; } .study-hero-ico { font-size: 80px; }
.set-card.big { padding: 22px 12px; background: #fff; box-shadow: var(--shadow3d), 0 6px 16px rgba(0,0,0,.2); } .set-card.big .set-ico { font-size: 50px; } .set-card.big b { font-size: 18px; }
.study-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .study-bar h2 { margin: 0; color: var(--purple); flex: 1; }
.fc-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fc-prog { color: #fff; font-family: 'Titan One'; font-size: 18px; }
.flashcard { width: min(620px, 100%); height: 320px; perspective: 1200px; cursor: pointer; }
.fc-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, 1.3, .5, 1); }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; text-align: center; font-family: 'Titan One'; font-size: 34px; box-shadow: var(--shadow3d), 0 12px 30px rgba(0,0,0,.3); }
.fc-face small { font-family: 'Nunito'; font-size: 13px; letter-spacing: 3px; opacity: .6; }
.fc-front { background: #fff; color: var(--text); } .fc-back { background: linear-gradient(145deg, #9a49aa, #5a2bd1); color: #fff; transform: rotateY(180deg); }
.fc-hint { font-size: 13px; }
.fc-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; max-width: 600px; } .fc-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.3); } .fc-dots i.known { background: #4bc22e; } .fc-dots i.cur { box-shadow: 0 0 0 3px #fff; }
.learn { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; width: 100%; }
.learn-prog { display: flex; align-items: center; gap: 12px; color: #fff; font-family: 'Titan One'; }
.lp-bar { flex: 1; height: 16px; background: rgba(0,0,0,.3); border-radius: 10px; overflow: hidden; } .lp-bar div { height: 100%; background: linear-gradient(90deg, #4bc22e, #a6f06a); transition: width .4s; }
.ans.right { background: #4bc22e !important; box-shadow: 0 0 0 4px #fff, inset 0 -8px rgba(0,0,0,.25); } .ans.wrong { background: #e8312f !important; } .ans.fade { opacity: .35; }
.learn-fb { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 16px; font-size: 18px; color: #fff; animation: pop .3s; }
.learn-fb.good { background: #2a9a1a; } .learn-fb.bad { background: #c22; }
.learn-done, .test-start { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; }
.learn-done h2, .test-start h2 { color: var(--purple); }
.test { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.test-q.ok { box-shadow: var(--shadow3d), 0 0 0 4px #4bc22e; } .test-q.no { box-shadow: var(--shadow3d), 0 0 0 4px #e8312f; }
.test-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.test-opts label { display: flex; gap: 8px; align-items: center; background: #f6f1f9; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 3px solid transparent; }
.test-opts label.sel { border-color: var(--purple); } .test-opts label.right { background: #d9f7cf; border-color: #4bc22e; }
.test-grade { display: flex; align-items: center; gap: 24px; } .test-grade h2 { color: var(--purple); font-size: 40px; margin: 0; }
.grade { width: 110px; height: 110px; border-radius: 24px; display: grid; place-items: center; font-family: 'Titan One'; font-size: 70px; color: #fff; box-shadow: var(--shadow3d); }
.grade.gA { background: #4bc22e; } .grade.gB { background: #2f9bff; } .grade.gC { background: #ff910f; } .grade.gF { background: #e8312f; }

/* ===== SEASONAL PACKS & CHROMA SHOPS ===== */
.season-pack.live { box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 0 0 4px #ffd23f, 0 0 26px #ff910f; }
.season-pack.locked { filter: grayscale(.85) brightness(.7); }
.season-pack.locked:hover { transform: translateY(-3px); }
.pc-season { position: absolute; top: 10px; right: 10px; z-index: 2; font-family: 'Titan One'; font-size: 11px; padding: 3px 9px; border-radius: 10px; background: #ffd23f; color: #6b3a00; }
.season-pack.locked .pc-season { background: rgba(0,0,0,.45); color: #fff; }
.cs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 10px; }
.cs-item { background: #f6f1f9; border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: transform .15s; }
.cs-item:hover { transform: translateY(-3px); } .cs-item.own { background: #eafbe4; }
.cs-item b { font-size: 14px; } .cs-item small { color: var(--muted); font-size: 12px; }
.end-tk-note { font-size: 13px; color: var(--muted); margin-top: -6px; }

/* ===== FRIENDS & TRADING ===== */
.fr-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; } .fr-hero h2 { color: var(--purple); }
.fr-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; } .fr-code span { color: var(--muted); }
.fr-code b { font-family: 'Titan One'; font-size: 30px; letter-spacing: 4px; color: var(--purple); background: #f2e4f7; padding: 2px 14px; border-radius: 12px; }
.fr-st { font-style: normal; font-size: 13px; }
.fr-add { display: flex; gap: 8px; } .fr-add input { width: 150px; font-family: 'Titan One'; font-size: 20px; letter-spacing: 3px; text-align: center; text-transform: uppercase; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #f6f1f9; margin-top: 8px; flex-wrap: wrap; }
.fr-row.on { background: #eefbe9; }
.fr-n { flex: 1; min-width: 140px; display: flex; flex-direction: column; } .fr-n small { color: var(--muted); }
.fr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #bbb; } .fr-dot.on { background: #4bc22e; box-shadow: 0 0 6px #4bc22e; }
.fr-waves { display: flex; gap: 2px; } .fr-waves button { border: none; background: #fff; border-radius: 8px; padding: 4px 6px; cursor: pointer; font-size: 15px; } .fr-waves button:disabled { opacity: .35; cursor: default; }
.fr-waves button:hover:not(:disabled) { transform: scale(1.2); }
.fr-x { border: none; background: none; color: #c44; font-size: 16px; cursor: pointer; }
.trade-modal { width: min(900px, 100%) !important; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .trade-cols h3 { margin-top: 4px; }
.tb-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 52px; background: #f6f1f9; border-radius: 12px; padding: 6px; }
.tb-item { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 10px; padding: 3px 8px; font-size: 12px; }
.tr-tok { display: flex; align-items: center; gap: 6px; margin: 6px 0; } .tr-tok input { width: 120px; }
.tr-search { width: 100%; margin-bottom: 6px; }
.tr-grid { display: flex; flex-wrap: wrap; gap: 4px; max-height: 210px; overflow-y: auto; background: #f6f1f9; border-radius: 12px; padding: 6px; }
.tr-bl { position: relative; border: 2px solid transparent; background: #fff; border-radius: 10px; padding: 2px; cursor: pointer; }
.tr-bl.on { border-color: var(--purple); } .tr-bl i { position: absolute; bottom: -2px; right: -2px; font-style: normal; font-size: 10px; background: #888; color: #fff; border-radius: 6px; padding: 0 4px; }
.tr-bl em { position: absolute; top: -4px; left: -4px; font-style: normal; font-size: 11px; background: var(--purple); color: #fff; border-radius: 6px; padding: 0 5px; }
.trade-wait { background: #fff6cf; border-radius: 10px; padding: 8px 12px; font-weight: 800; margin: 6px 0; }
.trade-warn { color: #c22; font-weight: 800; }
@media (max-width: 700px) { .trade-cols { grid-template-columns: 1fr; } }

/* ===== VAULT & NEW SOLO MODES ===== */
#game-root.g-snowball { --gbg: #5a8ad6; } #game-root.g-towerdoom { --gbg: #2a1050; } #game-root.g-voyage { --gbg: #1f5a7a; }
#game-root.g-imposters { --gbg: #14142a; } #game-root.g-dive { --gbg: #0a3a6a; } #game-root.g-memory { --gbg: #a0406a; }
.hud-bar.big { width: 160px; height: 14px; }
/* snowball */
.snow { width: 100%; max-width: 920px; display: flex; flex-direction: column; gap: 12px; }
.snow-teams { display: flex; align-items: center; gap: 10px; justify-content: center; }
.snow-team { flex: 1; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.15); border: 3px solid var(--tc); border-radius: 16px; padding: 8px 14px; }
.snow-team.mine { background: rgba(255,255,255,.3); box-shadow: 0 0 18px var(--tc); }
.snow-team span { font-size: 30px; } .snow-team b { flex: 1; font-family: 'Titan One'; } .snow-team em { font-style: normal; font-family: 'Titan One'; font-size: 28px; }
.snow-vs { font-family: 'Titan One'; font-size: 22px; }
.snow-field { display: flex; justify-content: space-between; gap: 20px; background: linear-gradient(#eaf6ff, #bfe2ff); border-radius: 18px; padding: 14px; min-height: 110px; color: var(--text); }
.snow-side { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .snow-side:last-child { justify-content: flex-end; }
.snow-p { display: flex; flex-direction: column; align-items: center; font-size: 11px; } .snow-p.me small { color: var(--purple); font-weight: 900; }
.snow-q { display: flex; justify-content: center; }
/* tower of doom */
.tdoom { width: 100%; max-width: 860px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.td-hud { display: flex; gap: 20px; font-family: 'Titan One'; font-size: 20px; background: rgba(0,0,0,.3); padding: 6px 18px; border-radius: 14px; }
.td-enemy { display: flex; align-items: center; gap: 16px; background: rgba(232,49,47,.18); border: 3px solid #e8312f; border-radius: 18px; padding: 10px 20px; }
.td-enemy b { font-family: 'Titan One'; font-size: 22px; } .td-enemy small { opacity: .85; }
.td-pick { margin: 0; } .td-deck { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.td-card { width: 170px; background: #fff; color: var(--text); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px; box-shadow: var(--shadow3d), 0 8px 18px rgba(0,0,0,.3); }
.td-card b { font-size: 14px; }
.td-stat { width: 100%; border: none; border-radius: 10px; padding: 7px; font-family: 'Titan One'; font-size: 15px; background: #f2e4f7; color: var(--purple); cursor: pointer; transition: transform .1s; }
.td-stat:hover { transform: scale(1.05); background: var(--purple); color: #fff; }
.td-q { width: 100%; display: flex; justify-content: center; }
/* pirate's voyage */
.voyage { width: 100%; display: flex; justify-content: center; }
.vg-board { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); gap: 6px; width: min(720px, 100%); aspect-ratio: 1; }
.vg-tile { position: relative; background: #f0dca0; border-radius: 12px; display: grid; place-items: center; font-size: 28px; box-shadow: inset 0 -4px rgba(0,0,0,.2); }
.vg-tile.t-storm, .vg-tile.t-kraken { background: #8a9ab0; } .vg-tile.t-raid { background: #c4887a; } .vg-tile.t-port { background: #9ad0f0; } .vg-tile.t-start { background: #7ad65a; } .vg-tile.t-chest { background: #ffd23f; } .vg-tile.t-whirl { background: #6ab8e0; }
.vg-tile.here { box-shadow: 0 0 0 4px #fff, 0 0 18px #ffd23f; }
.vg-ship { position: absolute; top: -10px; right: -8px; animation: float 1.6s ease-in-out infinite; }
.vg-center { grid-row: 2 / 6; grid-column: 2 / 6; background: rgba(10,40,70,.6); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center; overflow: hidden; }
.vg-dice { font-family: 'Titan One'; font-size: 34px; min-height: 40px; } .vg-msg { font-weight: 900; } .vg-ups { font-size: 12px; opacity: .8; }
.vg-q { width: 100%; } .vg-q .q-box { font-size: 15px; padding: 8px; } .vg-q .ans { font-size: 13px; padding: 8px; } .vg-q .choose h2 { font-size: 18px; } .vg-q .opt { width: 120px; padding: 8px; } .vg-q .opt-ico { font-size: 28px; }
/* imposters */
.imp { width: 100%; max-width: 940px; display: flex; flex-direction: column; gap: 10px; }
.imp-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.imp-role { background: #2a6ad6; padding: 6px 14px; border-radius: 12px; font-weight: 900; } .imp-role.bad { background: #c4102f; }
.imp-tasks { display: flex; align-items: center; gap: 8px; } .imp-tasks i { background: #4bff7a !important; }
.imp-meet { background: rgba(232,49,47,.3); padding: 4px 12px; border-radius: 10px; font-family: 'Titan One'; }
.imp-crew { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; background: rgba(255,255,255,.06); border-radius: 16px; padding: 10px; }
.imp-c { display: flex; flex-direction: column; align-items: center; font-size: 11px; width: 74px; position: relative; } .imp-c.me small { color: #ffd23f; font-weight: 900; }
.imp-c.out { opacity: .35; } .imp-c em { font-style: normal; font-size: 10px; color: #ff9a9a; }
.imp-clues { background: rgba(0,0,0,.3); border-radius: 12px; padding: 8px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; max-height: 120px; overflow-y: auto; }
.imp-q { display: flex; justify-content: center; }
/* deep dive */
.dive { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: 10px; }
.dv-sea { position: relative; height: 200px; border-radius: 20px; overflow: hidden; background: linear-gradient(#1aa5e0, #0a3a6a); box-shadow: var(--shadow3d); }
.dv-sea::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--dark); pointer-events: none; }
.dv-diver { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); animation: float 2.4s ease-in-out infinite; z-index: 1; } .dv-diver span { position: absolute; top: 4px; right: -10px; font-size: 24px; }
.dv-depth { position: absolute; top: 10px; left: 14px; font-family: 'Titan One'; font-size: 26px; z-index: 1; }
.dv-bub { position: absolute; bottom: -10px; color: #bfeeff; animation: bubble 3.5s linear infinite; z-index: 1; } @keyframes bubble { to { transform: translateY(-230px); opacity: 0; } }
.dv-hud { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.3); padding: 8px 14px; border-radius: 14px; font-weight: 900; }
.dv-msg { text-align: center; font-weight: 900; min-height: 22px; }
.dv-q { display: flex; justify-content: center; } .dv-q .opt { width: 160px; }
/* memory match */
.memory { width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mm-head { font-family: 'Titan One'; font-size: 20px; }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.mm-card { height: 120px; perspective: 800px; cursor: pointer; }
.mm-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s; }
.mm-card.flip .mm-in, .mm-card.done .mm-in { transform: rotateY(180deg); }
.mm-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px; box-shadow: inset 0 -5px rgba(0,0,0,.2); }
.mm-back { background: linear-gradient(145deg, #ff9a3a, #c4307a); font-size: 40px; }
.mm-front { transform: rotateY(180deg); background: #fff; color: var(--text); font-weight: 900; font-size: 14px; } .mm-front.a { background: #eafbe4; }
.mm-front small { font-size: 9px; letter-spacing: 2px; color: var(--muted); }
.mm-card.done .mm-front { box-shadow: 0 0 0 4px #4bc22e; opacity: .7; }

/* ===== SECRETS ===== */
.rt-Secret { background: #111; color: #fff; box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #111; animation: secrettag 2.4s ease-in-out infinite; }
@keyframes secrettag { 50% { background: #fff; color: #111; box-shadow: inset 0 0 0 2px #111, 0 0 0 2px #fff; } }
/* Secrets: a solid two-tone outline (white inside, black outside) that slowly swaps — nothing else looks like it */
.blook.r-Secret { --o: max(1.5px, calc(var(--s) * .024)); --no: calc(var(--o) * -1); }
.blook.r-Secret .ol0 .bimg { filter: drop-shadow(var(--o) 0 0 #fff) drop-shadow(var(--no) 0 0 #fff) drop-shadow(0 var(--o) 0 #fff) drop-shadow(0 var(--no) 0 #fff) drop-shadow(var(--o) 0 0 #000) drop-shadow(var(--no) 0 0 #000) drop-shadow(0 var(--o) 0 #000) drop-shadow(0 var(--no) 0 #000) drop-shadow(0 0 calc(var(--s) * .06) rgba(255,255,255,.55)); }
.blook.r-Secret .ol1 .bimg { filter: drop-shadow(var(--o) 0 0 #000) drop-shadow(var(--no) 0 0 #000) drop-shadow(0 var(--o) 0 #000) drop-shadow(0 var(--no) 0 #000) drop-shadow(var(--o) 0 0 #fff) drop-shadow(var(--no) 0 0 #fff) drop-shadow(0 var(--o) 0 #fff) drop-shadow(0 var(--no) 0 #fff) drop-shadow(0 0 calc(var(--s) * .12) rgba(255,255,255,.8)); }
.blook.r-Secret .ol { animation: fadeswap 2.4s ease-in-out infinite; } .blook.r-Secret .ol1 { animation-delay: -1.2s; }
.secrets-sec { background: linear-gradient(135deg, #1b1424, #2a2010); color: #fff; }
.secrets-sec h3 { color: #ffd700 !important; } .secrets-sec h3 small { color: #c9b98a !important; }
.secret-hint { color: #c9b98a; font-size: 13px; margin: -4px 0 8px; }
.secret-ico { background: linear-gradient(145deg, #3a3020, #000) !important; }
.secret-odds { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #fff6c0; background: rgba(255,215,0,.08); border: 1px solid rgba(255,215,0,.25); border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; }
.secret-odds b { color: #ffd700; }
.secret-note { background: #2a2010 !important; color: #ffd700 !important; }
.secret-q { width: 70px; height: 70px; border-radius: 16px; background: #000; color: #ffd700; font-family: 'Titan One'; font-size: 38px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px #5a4a00, 0 0 12px rgba(255,215,0,.35); }
.secret-q.big { width: 150px; height: 150px; font-size: 80px; }
.secret-banner { font-family: 'Titan One'; font-size: 30px; color: #ffd700; text-shadow: 0 0 20px #ffd700, 0 3px 0 #000; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1), pulse 1.2s 1s infinite; }
.ov.secret .ov-bg { background: radial-gradient(circle at 50% 50%, #5a4a00 0%, #1b1408 40%, #000 80%); }
.ov.secret .rays { --ray: rgba(255,215,0,.5) !important; }
.res-item.t7, .face.front.t7 { background: linear-gradient(160deg, #2a2010, #000); }

/* ===== PRISMATIC (rarer than Secret; hidden until owned) ===== */
.rt-Prismatic { background: linear-gradient(90deg, #ff5ad1, #ffb84d, #fff36b, #7dff8a, #5ad8ff, #b07bff, #ff5ad1); background-size: 300% 100%; color: #fff;
  text-shadow: 1px 1px 0 #3b1652, -1px 1px 0 #3b1652, 1px -1px 0 #3b1652, -1px -1px 0 #3b1652, 0 2px 3px rgba(0,0,0,.4); box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); animation: prismtag 3s linear infinite; }
@keyframes prismtag { to { background-position: 300% 0; } }
/* a glowing outline that flows through every colour */
.blook.r-Prismatic { --o: max(1.5px, calc(var(--s) * .028)); --no: calc(var(--o) * -1); --g: calc(var(--s) * .09); }
.blook.r-Prismatic .bimg { filter: drop-shadow(var(--o) 0 0 var(--pc)) drop-shadow(var(--no) 0 0 var(--pc)) drop-shadow(0 var(--o) 0 var(--pc)) drop-shadow(0 var(--no) 0 var(--pc)) drop-shadow(0 0 var(--g) var(--pc)); }
.blook.r-Prismatic .ol { animation: prismfade 3s linear infinite; }
.blook.r-Prismatic .ol0 { --pc: #ff5ad1; }
.blook.r-Prismatic .ol1 { --pc: #ffb84d; animation-delay: -2.4s; }
.blook.r-Prismatic .ol2 { --pc: #fff36b; animation-delay: -1.8s; }
.blook.r-Prismatic .ol3 { --pc: #7dff8a; animation-delay: -1.2s; }
.blook.r-Prismatic .ol4 { --pc: #5ad8ff; animation-delay: -0.6s; }
@keyframes prismfade { 20%, 80% { opacity: 0; } }
.prism-sec { background: linear-gradient(135deg, #2a1440, #102a40 50%, #3a1030); color: #fff; position: relative; overflow: hidden; }
/* the shine that sweeps across: slides a wide strip (transform, which the graphics chip does) instead of moving a background
   (which made the browser repaint the section every frame). Same path as the old background-position 150% → -100% sweep */
.prism-sec::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 250%; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.08) 45%, transparent 60%); animation: prismsheen 4s linear infinite; pointer-events: none; }
@keyframes prismsheen { 0% { transform: translateX(-90%); } 86.666% { transform: translateX(40%); } 86.667% { transform: translateX(-60%); } 100% { transform: translateX(-40%); } }
.prism-sec h3 { background: linear-gradient(90deg, #ff5ad1, #fff36b, #5ad8ff, #ff5ad1); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: prismtag 4s linear infinite; }
.prism-sec h3 small { -webkit-text-fill-color: #d8c8f0; }
.prism-sec h3 .ps-ico { -webkit-text-fill-color: initial; }
.prism-hint { color: #d8c8f0; font-size: 13px; margin: -4px 0 8px; }
.prism-ico { background: conic-gradient(#ff5ad1, #ffb84d, #fff36b, #7dff8a, #5ad8ff, #b07bff, #ff5ad1) !important; }
.prism-banner { font-family: 'Titan One'; font-size: 30px; background: linear-gradient(90deg, #ff5ad1, #ffb84d, #fff36b, #7dff8a, #5ad8ff, #b07bff, #ff5ad1); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 14px rgba(255,255,255,.6));
  animation: pop .6s cubic-bezier(.2, 1.6, .4, 1), prismtag 2s linear infinite; }
.ov.prismatic .ov-bg { background: radial-gradient(circle at 50% 50%, #4a1a5a 0%, #12203a 45%, #000 85%); }
.ov.prismatic .rays { animation: spin 14s linear infinite, huefil 2s linear infinite; background: repeating-conic-gradient(from 0deg, #ff5ad199 0deg 6deg, transparent 6deg 12deg, #5ad8ff99 12deg 18deg, transparent 18deg 24deg, #fff36b99 24deg 30deg, transparent 30deg 36deg); }
.res-item.t8, .face.front.t8 { background: linear-gradient(160deg, #3a1450, #10304a 55%, #000); }

/* ===== HACKER Pals + the HACKED pack (dark Matrix green, green lightning) ===== */
.rt-Hacker { background: #020d06; color: #39ff14; font-family: 'Courier New', monospace; font-weight: 900; letter-spacing: 1px; text-shadow: 0 0 6px #00ff66;
  box-shadow: inset 0 0 0 2px #00ff66, 0 0 8px rgba(0,255,102,.6); animation: hkflick 3.2s steps(1) infinite; }
@keyframes hkflick { 0%, 100% { opacity: 1; } 91% { opacity: .35; transform: translateX(1px); } 93% { opacity: 1; transform: none; } 96% { opacity: .5; } 97% { opacity: 1; } }
.blook.r-Hacker { --o: max(1.5px, calc(var(--s) * .026)); --no: calc(var(--o) * -1); --g: calc(var(--s) * .09); }
.blook.r-Hacker .bimg { filter: drop-shadow(var(--o) 0 0 var(--pc)) drop-shadow(var(--no) 0 0 var(--pc)) drop-shadow(0 var(--o) 0 var(--pc)) drop-shadow(0 var(--no) 0 var(--pc)) drop-shadow(0 0 var(--g) var(--pc)); }
.blook.r-Hacker .ol { animation: hackfade 1.8s steps(6) infinite; }
.blook.r-Hacker .ol0 { --pc: #00ff66; } .blook.r-Hacker .ol1 { --pc: #0a0a0a; animation-delay: -.6s; } .blook.r-Hacker .ol2 { --pc: #b6ffcf; animation-delay: -1.2s; }
@keyframes hackfade { 30%, 70% { opacity: 0; } }
.bi-big.glow-Hacker { background: radial-gradient(circle, rgba(0,255,102,.45) 0%, transparent 70%); }
.hack-sec { background: linear-gradient(135deg, #020d06, #0b3d1c 60%, #020d06); color: #b6ffcf; position: relative; overflow: hidden; box-shadow: inset 0 0 0 2px #00ff66; }
.hack-sec::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,255,102,.07) 0 2px, transparent 2px 4px); pointer-events: none; }
.hack-sec h3 { color: #39ff14 !important; font-family: 'Courier New', monospace; text-shadow: 0 0 8px #00ff66; } .hack-sec h3 small { color: #7fd99a !important; }
.hack-hint { color: #7fd99a; font-size: 13px; margin: -4px 0 8px; font-family: 'Courier New', monospace; }
.hack-ico { background: #020d06 !important; box-shadow: 0 0 0 2px #00ff66, 0 0 10px #00ff66; }
.hack-banner { font-family: 'Courier New', monospace; font-weight: 900; font-size: 30px; color: #39ff14; text-shadow: 0 0 18px #00ff66, 0 3px 0 #000;
  animation: pop .6s cubic-bezier(.2, 1.6, .4, 1), hkglitch 1.4s 1s steps(1) infinite; }
@keyframes hkglitch { 0%, 100% { transform: none; } 20% { transform: translate(-3px, 1px) skewX(-8deg); } 24% { transform: none; } 62% { transform: translate(3px, -1px); text-shadow: -3px 0 #ff3d3d, 3px 0 #3dd8ff, 0 0 18px #00ff66; } 66% { transform: none; } }
.ov.hacker .ov-bg { background: radial-gradient(circle at 50% 50%, #0b5a28 0%, #02200c 45%, #000 85%); }
.ov.hacker .rays { background: repeating-conic-gradient(from 0deg, rgba(0,255,102,.55) 0deg 6deg, transparent 6deg 12deg); }
.res-item:has(.rt-Hacker), .face.front:has(.rt-Hacker) { background: linear-gradient(160deg, #0b3d1c, #020d06 70%); }
/* the Hacked pack: Market card, pack window, and the pack you rip open */
.hk-wrap { position: relative; z-index: 2; }
.pack-card.hacked { background: linear-gradient(160deg, #0b3d1c, #020d06); color: #b6ffcf; box-shadow: inset 0 -8px rgba(0,0,0,.4), 0 0 0 3px #00ff66, 0 0 26px rgba(0,255,102,.7); animation: hkglow 2.2s ease-in-out infinite; }
.pack-card.hacked::before { background: repeating-linear-gradient(0deg, rgba(0,255,102,.08) 0 2px, transparent 2px 5px); }
.pack-card.hacked .pc-name { color: #39ff14; text-shadow: 0 0 10px #00ff66, 0 3px 0 #000; }
.pack-card.hacked .pc-emo { filter: drop-shadow(0 0 10px #00ff66) drop-shadow(0 6px 0 rgba(0,0,0,.4)); animation: hkglitch 2.6s steps(1) infinite; }
.pack-card.hacked .pc-shine { background: linear-gradient(100deg, transparent, rgba(0,255,102,.35), transparent); }
.pack-card.hacked .pc-owned { background: rgba(0,255,102,.15); color: #b6ffcf; }
.pc-flag.hk-flag { background: #00c24e; color: #021a0a; box-shadow: 0 0 14px #00ff66; font-family: 'Courier New', monospace; font-weight: 900; }
.hk-rain { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(180deg, transparent 0 70%, rgba(57,255,20,.9) 70% 72%, transparent 72%) 8% 0 / 3px 140px repeat-y,
    linear-gradient(180deg, transparent 0 60%, rgba(57,255,20,.8) 60% 63%, transparent 63%) 30% 0 / 2px 110px repeat-y,
    linear-gradient(180deg, transparent 0 75%, rgba(57,255,20,.9) 75% 77%, transparent 77%) 55% 0 / 3px 170px repeat-y,
    linear-gradient(180deg, transparent 0 65%, rgba(57,255,20,.8) 65% 68%, transparent 68%) 78% 0 / 2px 125px repeat-y,
    linear-gradient(180deg, transparent 0 70%, rgba(57,255,20,.9) 70% 72%, transparent 72%) 94% 0 / 3px 150px repeat-y;
  animation: hkrain 2.4s linear infinite; }
@keyframes hkrain { to { background-position: 8% 140px, 30% 220px, 55% 170px, 78% 250px, 94% 300px; } }
@keyframes hkglow { 50% { box-shadow: inset 0 -8px rgba(0,0,0,.4), 0 0 0 3px #39ff14, 0 0 40px rgba(0,255,102,.95); } }
.hk-bolts { position: absolute; inset: -16px; pointer-events: none; z-index: 4; }
.hk-bolt { position: absolute; width: 26px; height: 54px; --t: rotate(0deg); fill: #39ff14; filter: drop-shadow(0 0 4px #00ff66) drop-shadow(0 0 10px #00ff66); opacity: 0; animation: hkzap 2.6s steps(1) infinite; }
.hk-bolt.b0 { top: -6px; left: 8%; --t: rotate(-25deg); transform: var(--t); }
.hk-bolt.b1 { top: -10px; left: 46%; animation-delay: -.7s; animation-duration: 2.1s; }
.hk-bolt.b2 { top: -6px; right: 8%; --t: rotate(25deg) scaleX(-1); transform: var(--t); animation-delay: -1.4s; }
.hk-bolt.b3 { top: 28%; right: -6px; --t: rotate(80deg); transform: var(--t); animation-delay: -.3s; animation-duration: 3s; }
.hk-bolt.b4 { top: 62%; right: -6px; --t: rotate(100deg) scaleX(-1); transform: var(--t); animation-delay: -1.9s; animation-duration: 2.3s; }
.hk-bolt.b5 { bottom: -6px; right: 12%; --t: rotate(155deg); transform: var(--t); animation-delay: -1.1s; }
.hk-bolt.b6 { bottom: -10px; left: 44%; --t: rotate(180deg); transform: var(--t); animation-delay: -2.2s; animation-duration: 2.8s; }
.hk-bolt.b7 { bottom: -6px; left: 10%; --t: rotate(-155deg) scaleX(-1); transform: var(--t); animation-delay: -.5s; animation-duration: 2.4s; }
.hk-bolt.b8 { top: 60%; left: -6px; --t: rotate(-95deg); transform: var(--t); animation-delay: -1.6s; }
.hk-bolt.b9 { top: 24%; left: -6px; --t: rotate(-80deg) scaleX(-1); transform: var(--t); animation-delay: -2.4s; animation-duration: 2.2s; }
@keyframes hkzap { 0% { opacity: 1; transform: var(--t) scale(1); } 6% { opacity: .25; } 10% { opacity: 1; transform: var(--t) scale(1.15); } 16% { opacity: .4; } 20% { opacity: 1; } 34%, 100% { opacity: 0; transform: var(--t) scale(.9); } }
.hk-wrap:hover .hk-bolts { transform: translateY(-8px) rotate(-1.5deg); }
.pm-head.hacked { position: relative; background: linear-gradient(150deg, #0b3d1c, #020d06); box-shadow: inset 0 0 0 2px #00ff66; }
.pm-head.hacked .hk-bolts { inset: -4px; } .pm-head.hacked .pm-emo { filter: drop-shadow(0 0 10px #00ff66); }
.modal .pm-head.hacked h2 { color: #39ff14; text-shadow: 0 0 10px #00ff66; }
.hk-tag { font-family: 'Courier New', monospace; font-size: 14px; background: #00c24e; color: #021a0a; padding: 2px 8px; border-radius: 8px; vertical-align: middle; box-shadow: 0 0 10px #00ff66; text-shadow: none; }
.boost-note.hk-pm-note { background: #021a0a; color: #7dff9e; box-shadow: inset 0 0 0 1px #00ff66; margin-bottom: 10px; }
.hk-note { margin: -4px 0 12px; padding: 8px 14px; border-radius: 12px; background: linear-gradient(90deg, #020d06, #0b3d1c); color: #b6ffcf; font-size: 14px; box-shadow: inset 0 0 0 2px #00ff66, 0 0 12px rgba(0,255,102,.35); }
.hk-note b { color: #39ff14; } .hk-note span { color: #7fd99a; }
.pack3d.hacked .pk-top, .pack3d.hacked .pk-body { background: linear-gradient(160deg, #0b3d1c, #020d06); background-size: 100% 330px; }
.pack3d.hacked .pk-body { background-position: 0 -64px; }
.pack3d.hacked .pk-top::before, .pack3d.hacked .pk-body::before { background: repeating-linear-gradient(0deg, rgba(0,255,102,.1) 0 2px, transparent 2px 5px); }
.pack3d.hacked .pk-name, .pack3d.hacked .pk-sub { color: #39ff14; text-shadow: 0 0 10px #00ff66, 0 4px 0 #000; }
.pack3d.hacked .pk-emo { filter: drop-shadow(0 0 14px #00ff66); }
.pack3d.hacked { --glow: #00ff66; }
.pack3d.hacked .hk-bolts { inset: -22px; } .pack3d.hacked .hk-bolt { width: 30px; height: 62px; }
.pack3d.torn .hk-bolts { opacity: 0; transition: opacity .2s; }
/* the Hacked pack's own opening: code rain, a hacker terminal, a glitching pack that breaks into pixels */
.hk-matrix { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; transition: opacity .6s; pointer-events: none; }
.ov.hk-ov .ov-bg { background: radial-gradient(circle at 50% 50%, #0b3d1c 0%, #020d06 45%, #000 85%); }
.ov.hacking .hk-matrix { opacity: .9; }
.ov.hk-ov .flash { background: #39ff14; }
.hk-term { position: absolute; z-index: 5; top: 5%; left: 50%; transform: translateX(-50%); width: min(440px, 92vw); background: rgba(0,10,4,.92); border-radius: 10px;
  box-shadow: 0 0 0 2px #00ff66, 0 0 30px rgba(0,255,102,.5); font-family: 'Courier New', monospace; color: #39ff14; font-size: 14px; overflow: hidden; animation: hkterm .25s steps(4); transition: opacity .3s; }
.hk-term.gone { opacity: 0; }
@keyframes hkterm { from { clip-path: inset(0 0 100% 0); } }
.hk-term-bar { background: #06331a; color: #b6ffcf; font-size: 12px; padding: 5px 10px; display: flex; gap: 5px; align-items: center; }
.hk-term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #00ff66; opacity: .55; } .hk-term-bar i:first-child { margin-right: 0; }
.hk-lines { padding: 8px 12px 2px; min-height: 92px; text-shadow: 0 0 6px #00ff66; }
.hk-lines div { white-space: nowrap; overflow: hidden; animation: hktype .25s steps(12); } .hk-lines b { color: #b6ffcf; }
@keyframes hktype { from { width: 0; } to { width: 100%; } }
.hk-ok { margin-top: 4px; font-weight: 900; font-size: 18px; color: #000; background: #39ff14; display: inline-block; padding: 1px 8px; box-shadow: 0 0 16px #39ff14; animation: hkblink .3s steps(2) 3 !important; }
@keyframes hkblink { 50% { opacity: 0; } }
.hk-prog { margin: 6px 12px 0; height: 10px; border: 1px solid #00ff66; } .hk-prog div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #39ff14 0 6px, #0bd65a 6px 8px); box-shadow: 0 0 10px #00ff66; }
.hk-pct { text-align: right; padding: 2px 12px 8px; font-size: 12px; color: #7fd99a; }
.pack3d.glitching { animation: hkjit .14s steps(2) infinite; filter: drop-shadow(var(--gl, 2px) 0 0 rgba(255,42,109,.85)) drop-shadow(calc(var(--gl, 2px) * -1) 0 0 rgba(0,229,255,.85)) drop-shadow(0 0 var(--gs, 24px) var(--glow, #00ff66)); }
@keyframes hkjit { 0% { translate: calc(var(--gl, 2px) * -.6) 1px; clip-path: inset(0); } 50% { translate: calc(var(--gl, 2px) * .6) -1px; clip-path: inset(2% 0 5% 0); } 100% { translate: none; clip-path: inset(0); } } /* translate, not transform, so the phone's smaller pack stays small */
.pack3d.hacked.torn.derez { animation: derez .6s steps(7) forwards; }
.pack3d.hacked.torn.derez .pk-top, .pack3d.hacked.torn.derez .pk-body { transform: none; opacity: 1; transition: none; }
@keyframes derez { 0% { clip-path: inset(0); transform: scale(1); filter: drop-shadow(0 0 30px #00ff66); }
  30% { clip-path: polygon(0 0, 100% 0, 100% 20%, 0 20%, 0 35%, 100% 35%, 100% 60%, 0 60%, 0 75%, 100% 75%, 100% 100%, 0 100%); transform: translateX(-14px) scale(1.06); }
  60% { clip-path: polygon(0 10%, 100% 10%, 100% 18%, 0 18%, 0 45%, 100% 45%, 100% 52%, 0 52%, 0 80%, 100% 80%, 100% 86%, 0 86%); transform: translateX(18px) scale(1.12); opacity: .8; }
  100% { clip-path: inset(50% 0 50% 0); transform: scale(1.4, .1); opacity: 0; } }
.hk-buff { margin: 8px 0 4px; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 700; text-align: left; }
.hk-buff small { display: block; font-weight: 400; font-size: 12px; margin-top: 3px; opacity: .85; }
.hk-buff.white { background: #f2fff6; color: #0b5a28; box-shadow: inset 0 0 0 2px #00c24e; }
.hk-buff.black { background: #020d06; color: #39ff14; box-shadow: inset 0 0 0 2px #00ff66; font-family: 'Courier New', monospace; }
.boost-badge.hk-badge { background: #020d06; color: #39ff14; box-shadow: inset 0 0 0 1px #00ff66; }
.hack-sec .bcell[data-hat="black"]::after, .hack-sec .bcell[data-hat="white"]::after { content: ''; width: 13px; height: 13px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2032%2032%27%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%2212.5%22%20fill%3D%22%233b3152%22%20stroke%3D%22%232a1f3d%22%20stroke-width%3D%221.8%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Cellipse%20cx%3D%2210.5%22%20cy%3D%2210.5%22%20rx%3D%223.2%22%20ry%3D%221.9%22%20fill%3D%22%23fff%22%20transform%3D%22rotate(-35%2010.5%2010.5)%22%20opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; position: absolute; left: 4px; top: 3px; } /* our own icons (Nate 2026-11-06) */
.hack-sec .bcell[data-hat="white"]::after { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2032%2032%27%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%2212.5%22%20fill%3D%22%23ffffff%22%20stroke%3D%22%232a1f3d%22%20stroke-width%3D%221.8%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Cellipse%20cx%3D%2210.5%22%20cy%3D%2210.5%22%20rx%3D%223.2%22%20ry%3D%221.9%22%20fill%3D%22%23fff%22%20transform%3D%22rotate(-35%2010.5%2010.5)%22%20opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E"); }
@media (prefers-reduced-motion: reduce) { .hk-bolt, .hk-rain, .pack-card.hacked, .pack-card.hacked .pc-emo, .rt-Hacker { animation-duration: 8s; } }

/* ===== every pack's own opening (pack-fx.js, Nate 2026-11-01) ===== */
.pack3d .pk-top, .pack3d .pk-body { filter: var(--pf, none); }
.pack3d.charging.pfx-move { animation: none; }
.ov.pfx-dark .ov-bg { filter: brightness(.55) saturate(1.2); }
.pfx-amb { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: .55; transition: opacity .6s; }
.ov.pfx-hot .pfx-amb { opacity: .95; }
.pfx-amb i { position: absolute; font-style: normal; font-size: var(--fs); line-height: 1; animation: var(--d) linear infinite; will-change: transform; }
.am-fall { top: -12% !important; animation-name: amfall !important; } @keyframes amfall { to { transform: translate(8vw, 125vh) rotate(260deg); } }
.am-leaf { top: -12% !important; animation-name: amleaf !important; } @keyframes amleaf { 25% { transform: translate(6vw, 30vh) rotate(60deg); } 50% { transform: translate(-4vw, 60vh) rotate(-30deg); } 75% { transform: translate(7vw, 90vh) rotate(80deg); } to { transform: translate(0, 125vh) rotate(0); } }
.am-tumble { top: -12% !important; animation-name: amtumble !important; } @keyframes amtumble { to { transform: translate(-10vw, 125vh) rotate(-720deg); } }
.am-rise { top: 105% !important; animation-name: amrise !important; } @keyframes amrise { 50% { transform: translate(3vw, -60vh); } to { transform: translate(-2vw, -125vh); } }
.am-bubble, .am-ember, .am-sand { font-size: calc(var(--fs) * .45) !important; } .am-bubble, .am-ember { top: 105% !important; }
.am-bubble { color: #8dff6a; text-shadow: 0 0 8px #8dff6a; animation-name: amrise !important; }
.am-ember { color: #ffb347; text-shadow: 0 0 10px #ff6a00, 0 0 3px #fff; animation-name: amember !important; } @keyframes amember { 30% { transform: translate(2vw, -35vh); opacity: 1; } to { transform: translate(-3vw, -110vh); opacity: 0; } }
.am-sand { left: -5% !important; color: #f3cf7a; animation-name: amsand !important; } @keyframes amsand { to { transform: translate(115vw, -8vh); } }
.am-drift, .am-swim, .am-flap { left: 104% !important; animation-name: amdrift !important; } @keyframes amdrift { to { transform: translateX(-125vw); } } /* right to left: most animal emojis face left */
.am-swim { animation-name: amswim !important; } @keyframes amswim { 25% { transform: translate(-30vw, -4vh); } 50% { transform: translate(-60vw, 3vh); } 75% { transform: translate(-90vw, -3vh); } to { transform: translate(-125vw, 0); } }
.am-flap { animation-name: amflap !important; } @keyframes amflap { 20% { transform: translate(-25vw, -8vh) scaleY(.7); } 40% { transform: translate(-50vw, 4vh); } 60% { transform: translate(-75vw, -6vh) scaleY(.7); } to { transform: translate(-125vw, 2vh); } }
.am-hop { top: auto !important; bottom: 4%; left: 104% !important; animation-name: amhop !important; } @keyframes amhop { 0%, 20%, 40%, 60%, 80%, 100% { translate: 0 0; } 10%, 30%, 50%, 70%, 90% { translate: 0 -16vh; } from { transform: translateX(0); } to { transform: translateX(-125vw); } }
.am-wave { top: auto !important; bottom: -2%; font-size: calc(var(--fs) * 1.5) !important; animation-name: amwave !important; } @keyframes amwave { 50% { transform: translate(-3vw, -14px) rotate(-6deg); } }
.am-twinkle { animation-name: amtwinkle !important; } @keyframes amtwinkle { 0%, 100% { transform: scale(.3); opacity: .1; } 50% { transform: scale(1.1); opacity: 1; } }
.am-whirl { animation-name: amwhirl !important; opacity: .7; } @keyframes amwhirl { to { transform: rotate(360deg); } }
.am-zoom { left: 50% !important; top: 50% !important; animation-name: amzoom !important; color: #fff; } @keyframes amzoom { from { transform: translate(-50%, -50%) scale(.1); opacity: 0; } 30% { opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.6); opacity: .8; } }
.pfx-amb i:not(.am-bubble):not(.am-ember):not(.am-sand):not(.am-zoom) { filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.pfx-e { position: absolute; font-style: normal; font-size: var(--fs); line-height: 1; animation: pfxfly var(--dur) cubic-bezier(.15, .8, .4, 1) forwards; }
@keyframes pfxfly { from { transform: translate(-50%, -50%) scale(.3); } 60% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx) * 1.1), calc(-50% + var(--dy) + 160px)) rotate(var(--rot)) scale(.8); opacity: 0; } }
.pfx-word { position: absolute; left: 50%; top: 13%; font-family: 'Titan One'; font-size: clamp(38px, 9vw, 76px); white-space: nowrap; color: #fff; -webkit-text-stroke: 3px rgba(0,0,0,.35);
  text-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 30px var(--flash, #fff); animation: pfxword 1.6s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes pfxword { from { transform: translateX(-50%) scale(0) rotate(-12deg); } 18% { transform: translateX(-50%) scale(1.15) rotate(3deg); } 28% { transform: translateX(-50%) scale(1) rotate(-2deg); }
  80% { opacity: 1; } to { transform: translate(-50%, -30px) scale(1); opacity: 0; } }
.pfx-shard { position: absolute; width: 230px; height: 330px; animation: shardfly 1.1s cubic-bezier(.2, .6, .5, 1) forwards; }
@keyframes shardfly { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.pfx-slash { position: absolute; width: 520px; height: 8px; margin: -4px 0 0 -260px; background: linear-gradient(90deg, transparent, #fff 30%, #fff 70%, transparent); box-shadow: 0 0 20px #fff;
  transform: rotate(-22deg) scaleX(0); animation: pfxslash .45s ease-out forwards; }
@keyframes pfxslash { 40% { transform: rotate(-22deg) scaleX(1); opacity: 1; } to { transform: rotate(-22deg) scaleX(1.1); opacity: 0; } }
/* how each pack breaks open (pack3d.torn.ex-*): the paper stays in one piece unless the style moves it */
.pack3d.torn[class*="ex-"] .pk-top, .pack3d.torn[class*="ex-"] .pk-body { transform: none; opacity: 1; }
.pack3d.torn.ex-split .pk-top { transform: translateY(-80vh); } .pack3d.torn.ex-split .pk-body { transform: translateY(90vh); }
.pack3d.torn.ex-gift .pk-top { transform: translate(40px, -70vh) rotate(-40deg); }
.pack3d.torn.ex-gift .pk-body { animation: expop .5s .12s ease-in forwards; }
.pack3d.torn.ex-pop { animation: expop .4s ease-in forwards; } @keyframes expop { 40% { transform: scale(1.18); } to { transform: scale(1.6); opacity: 0; filter: brightness(2.2); } }
.pack3d.torn.ex-boomerang { animation: exboom .9s ease-in-out forwards; } @keyframes exboom { 45% { transform: translate(55vw, -30vh) rotate(720deg) scale(.5); } to { transform: translate(-60vw, -12vh) rotate(1440deg) scale(.3); opacity: 0; } }
.pack3d.torn.ex-launch { animation: exlaunch .65s cubic-bezier(.6, 0, .9, .5) forwards; } @keyframes exlaunch { 15% { transform: translateY(14px) scaleY(.94); } to { transform: translateY(-130vh) scaleY(1.15); } }
.pack3d.torn.ex-erupt { animation: exerupt .6s cubic-bezier(.5, 0, .9, .6) forwards; } @keyframes exerupt { 20% { transform: translateY(10px) scale(1.05, .9); filter: brightness(1.6) sepia(.6) saturate(3); } to { transform: translateY(-140vh) rotate(28deg); filter: brightness(2) sepia(1) saturate(4); } }
.pack3d.torn.ex-shrink { animation: exshrink .55s ease-in forwards; } @keyframes exshrink { 40% { transform: scale(1.3) rotate(-12deg); } to { transform: scale(0) rotate(40deg); } }
.pack3d.torn.ex-vortex { animation: exvortex .6s ease-in forwards; } @keyframes exvortex { to { transform: rotate(1080deg) scale(0); filter: blur(6px) brightness(2); } }
.pack3d.torn.ex-kick { animation: exkick .6s cubic-bezier(.2, .6, .4, 1) forwards; } @keyframes exkick { 12% { transform: scale(.9, 1.05) rotate(-8deg); } to { transform: translate(110vw, -45vh) rotate(900deg) scale(.5); } }
.pack3d.torn.ex-blow { animation: exblow .9s ease-in forwards; } @keyframes exblow { 20% { transform: translateX(16px) rotate(6deg); } to { transform: translate(-115vw, -30vh) rotate(-560deg) scale(.6); opacity: .7; } }
.pack3d.torn.ex-sink { animation: exsink .7s cubic-bezier(.5, 0, .9, .5) forwards; } @keyframes exsink { 20% { transform: translateY(-20px) rotate(-4deg); } to { transform: translateY(115vh) rotate(18deg); filter: brightness(.3); } }
.pack3d.torn.ex-melt { transform-origin: 50% 100%; animation: exmelt .6s ease-in forwards; } @keyframes exmelt { to { transform: scale(1.3, .05); filter: blur(5px) hue-rotate(80deg) saturate(3); opacity: 0; } }
.pack3d.torn.ex-burn { animation: exburn .6s ease-in forwards; } @keyframes exburn { 40% { filter: brightness(1.8) sepia(1) saturate(4) hue-rotate(-15deg); } to { transform: translateY(-90px) scale(1.15); filter: blur(12px) brightness(3) sepia(1) saturate(4); opacity: 0; } }
.pack3d.torn.ex-splat { animation: exsplat .5s ease-out forwards; } @keyframes exsplat { 25% { transform: scale(1.3, .7); } 45% { transform: scale(1.9, .25); filter: hue-rotate(90deg) saturate(2); } to { transform: scale(2.3, .12); filter: hue-rotate(200deg) saturate(2); opacity: 0; } }
.pack3d.torn.ex-flipup { animation: exflipup .7s cubic-bezier(.3, .6, .6, 1) forwards; } @keyframes exflipup { 50% { transform: translateY(-38vh) rotate(200deg) scaleX(.6); } to { transform: translateY(-80vh) rotate(380deg) scale(.4); opacity: 0; } }
.pack3d.torn.ex-sand { animation: exsand .6s ease-in forwards; } @keyframes exsand { to { transform: translateY(70px) scale(1.06, .9); filter: blur(9px) sepia(1) saturate(2.5) brightness(1.4); opacity: 0; } }
.pack3d.torn.ex-tvoff { animation: extvoff .5s ease-in forwards; } @keyframes extvoff { 45% { transform: scale(1.15, .02); filter: brightness(4); } 80% { transform: scale(.03, .02); filter: brightness(5); } to { transform: scale(0); opacity: 0; } }
.pack3d.torn.ex-vanish { animation: exvanish .6s ease-out forwards; } @keyframes exvanish { 30% { opacity: .2; } 45% { opacity: .9; } to { transform: translateY(-60px) scale(1.3); filter: blur(14px) grayscale(1) brightness(2); opacity: 0; } }
.pack3d.torn.ex-book { animation: exbook .6s ease-in forwards; transform-origin: 0 50%; } @keyframes exbook { to { transform: perspective(700px) rotateY(-170deg); opacity: 0; } }
.pack3d.torn.ex-blip { animation: exblip .5s steps(5) forwards; } @keyframes exblip { 30% { transform: scale(1.25); filter: brightness(1.6) contrast(2); } to { transform: scale(0); filter: brightness(3) contrast(3); } }
.pack3d.torn.ex-zap { animation: exzap .55s steps(1) forwards; } @keyframes exzap { 0% { opacity: 1; } 15% { opacity: 0; transform: translateX(-20px) skewX(20deg); } 30% { opacity: 1; transform: translateX(16px); } 45% { opacity: 0; } 60% { opacity: 1; transform: scale(.4, 2.4); filter: brightness(3) hue-rotate(90deg); } 80%, 100% { opacity: 0; transform: scale(0, 3); } }
.pack3d.torn.ex-chomp { animation: exchomp .55s steps(1) forwards; }
@keyframes exchomp { 0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  22% { clip-path: polygon(0 0, 55% 0, 60% 6%, 65% 2%, 70% 9%, 76% 5%, 80% 13%, 87% 12%, 90% 20%, 97% 21%, 100% 28%, 100% 100%, 0 100%); transform: rotate(-3deg); }
  44% { clip-path: polygon(0 0, 30% 0, 36% 10%, 42% 6%, 48% 16%, 56% 14%, 62% 26%, 70% 26%, 76% 38%, 86% 38%, 92% 50%, 100% 52%, 100% 100%, 0 100%); transform: rotate(3deg); }
  66% { clip-path: polygon(0 30%, 8% 36%, 14% 32%, 22% 44%, 30% 42%, 36% 56%, 46% 56%, 52% 68%, 64% 68%, 70% 80%, 82% 80%, 88% 92%, 100% 94%, 100% 100%, 0 100%); transform: rotate(-2deg); }
  88%, 100% { clip-path: polygon(0 85%, 20% 92%, 40% 88%, 60% 96%, 80% 94%, 100% 100%, 0 100%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pfx-amb i { animation-duration: 20s !important; } }

/* ===== MY SETS ===== */
.set-card { position: relative; }
.set-mine { position: absolute; top: 6px; right: 6px; font-size: 9px; font-family: 'Titan One'; background: var(--c); color: #fff; padding: 1px 6px; border-radius: 6px; }
.set-new { border: 3px dashed #c9b3d6 !important; background: #fff !important; color: var(--purple); }
.sets-hero { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; } .sets-hero h2 { color: var(--purple); }
.myset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.myset { border-top: 8px solid var(--c); display: flex; flex-direction: column; gap: 12px; }
.ms-top { display: flex; gap: 12px; align-items: center; } .ms-top b { display: block; font-size: 18px; } .ms-top small { color: var(--muted); }
.ms-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--c); display: grid; place-items: center; font-size: 28px; flex-shrink: 0; box-shadow: inset 0 -4px rgba(0,0,0,.2); }
.ms-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.se-head { border-top: 8px solid var(--c); display: flex; flex-direction: column; gap: 10px; }
.se-title { display: flex; align-items: center; gap: 12px; } .se-big { font-size: 40px; }
.se-title input { flex: 1; font-family: 'Titan One'; font-size: 24px; }
.se-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .se-pick > span { font-family: 'Titan One'; color: var(--purple); width: 50px; }
.se-icon { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; border: 2px solid #eee; background: #fff; cursor: pointer; } .se-icon.on { border-color: var(--purple); background: #f2e4f7; }
.se-color { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); cursor: pointer; box-shadow: 0 0 0 2px #ddd; } .se-color.on { box-shadow: 0 0 0 3px var(--purple); }
.se-qs { display: flex; flex-direction: column; gap: 10px; }
.se-q { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.se-qn { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; font-family: 'Titan One'; display: grid; place-items: center; flex-shrink: 0; }
.se-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.se-qtext { font-weight: 800; font-size: 16px; }
.se-ans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .se-ans input { min-width: 0; } .se-in.ok { border-color: #4bc22e; background: #f2fbef; }
.se-opt { display: flex; align-items: center; gap: 6px; border: 3px solid #f0d6d6; border-radius: 12px; padding: 3px 3px 3px 4px; background: #fff7f7; min-width: 0; }
.se-opt.ok { border-color: #4bc22e; background: #f2fbef; }
.se-opt input { flex: 1; min-width: 0; border: none; background: transparent; padding: 7px 6px; }
.se-tick { width: 30px; height: 30px; flex-shrink: 0; border: none; border-radius: 8px; background: #e8a0a0; color: #fff; font-weight: 900; cursor: pointer; font-size: 14px; }
.se-opt.ok .se-tick { background: #4bc22e; }
.se-cnt { color: var(--muted); font-size: 12px; }
.se-del { border: none; background: none; font-size: 20px; cursor: pointer; opacity: .6; } .se-del:hover { opacity: 1; }
.se-bar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); padding: 12px 16px; border-radius: 16px; }
.se-bar .muted-l { flex: 1; font-size: 13px; }
#bulk-text { width: 100%; font: 14px 'Courier New', monospace; padding: 10px; border-radius: 10px; border: 3px solid #ddd; resize: vertical; }

/* ===== ADMIN PLAYERS ===== */
.ad-panel[data-key=players] { grid-column: 1 / -1; }
.pl-admin-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.pla-row { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 6px 8px; color: #fff; cursor: pointer; text-align: left; font: inherit; }
.pla-row:hover { background: rgba(255,255,255,.15); }
.pla-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pla-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .pla-n small, .pla-s small { font-size: 10px; opacity: .7; }
.pla-s { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; }
.pe-head { display: flex; align-items: center; gap: 10px; } .pe-head b { display: block; } .pe-head small { opacity: .7; font-size: 11px; }
.pe-tok { font-family: 'Titan One'; font-size: 18px; margin-right: 6px; }
#pe-amt { max-width: 110px; }
.pe-owned { max-height: 200px; }
.pe-bl { position: relative; display: inline-flex; flex-direction: column; align-items: center; padding: 2px; }
.pe-bl i { position: absolute; top: 0; right: 0; font-style: normal; font-size: 10px; background: #9a49aa; border-radius: 6px; padding: 0 4px; }
.pe-bl button { border: none; width: 18px; height: 16px; font-size: 11px; line-height: 1; cursor: pointer; border-radius: 4px; position: absolute; bottom: 0; }
.pe-minus1 { left: 0; background: #e8312f; color: #fff; } .pe-plus1 { right: 0; background: #4bc22e; color: #fff; }

/* ===== BACKGROUND SETTINGS ===== */
body.no-pattern #bg-pattern { background-image: none; animation: none; }
.bg-swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bg-sw { width: 42px; height: 42px; border-radius: 12px; border: 3px solid #fff; background: var(--sw); cursor: pointer; box-shadow: 0 0 0 2px #ddd, inset 0 -4px rgba(0,0,0,.25); transition: transform .15s; }
.bg-sw:hover { transform: scale(1.1); } .bg-sw.on { box-shadow: 0 0 0 3px var(--purple), inset 0 -4px rgba(0,0,0,.25); transform: scale(1.1); }
.bg-custom { display: flex; align-items: center; gap: 6px; cursor: pointer; font-family: 'Titan One'; color: var(--purple); }
.bg-custom input { width: 46px; height: 42px; padding: 2px; border-radius: 12px; cursor: pointer; }
.sec-timer.pass { background: #4bc22e; }

/* ===== BULK OPENING ===== */
.qty-quick { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; width: 100%; }
.qty-custom { display: flex; gap: 8px; align-items: center; justify-content: center; width: 100%; font-family: 'Titan One'; }
.qty-custom input { width: 90px; text-align: center; font-family: 'Titan One'; font-size: 18px; padding: 6px; }
.pm-btns { flex-direction: column; }
.boost-note { background: #eafbe4; color: #2a7a1a; border-radius: 10px; padding: 6px 12px; font-size: 13px; }
.boost-badge { display: block; font-size: 14px; background: #4bc22e; color: #fff; border-radius: 10px; padding: 2px 10px; margin-top: 4px; text-align: center; }
.stage { max-height: 100vh; overflow-y: auto; }
.batch-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; font-family: 'Titan One'; background: rgba(0,0,0,.35); padding: 8px 18px; border-radius: 16px; }
.batch-head span { font-family: 'Nunito'; opacity: .85; }
.batch-bar { width: 160px; height: 10px; background: rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; } .batch-bar div { height: 100%; background: #4bff7a; }
.multi-grid.small { gap: 10px; max-width: 980px; }
.multi-grid.small .mcard { width: 100px; height: 138px; animation-delay: calc(var(--i) * 35ms); }
.multi-grid.small .face.back { font-size: 38px; } .multi-grid.small .face.back em { font-size: 20px; }
.multi-grid.small .mc-name { font-size: 11px; } .multi-grid.small .rt { font-size: 10px; padding: 1px 6px; }
.res-title { font-size: 40px; text-shadow: 0 4px 0 rgba(0,0,0,.4); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.res-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 1000px; max-height: 52vh; overflow-y: auto; padding: 6px; }
.res-item { position: relative; width: 100px; background: #1c1028; border: 3px solid var(--rc); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 0 14px var(--rc); animation: deal .4s backwards; animation-delay: calc(var(--i) * 25ms); }
.res-item b { font-family: 'Titan One'; font-size: 18px; } .res-item small { font-size: 11px; text-align: center; line-height: 1.1; opacity: .85; }
.res-item em { position: absolute; top: -8px; right: -6px; font-style: normal; background: #ffd23f; color: #b0004a; font-family: 'Titan One'; font-size: 11px; padding: 1px 6px; border-radius: 6px; transform: rotate(10deg); }
.res-item.t0, .res-item.t1 { box-shadow: none; }

/* ===== ADMIN BAR ===== */
.top-right { display: flex; align-items: center; gap: 10px; }
.admin-toggle { width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); font-size: 20px; cursor: pointer; transition: transform .2s, background .2s; }
.admin-toggle:hover { transform: rotate(-20deg) scale(1.08); } .admin-toggle.on { background: #ffd23f; }
/* username menu, just left of the 🛠️ button */
#topbar { position: relative; z-index: 20; } /* so the menu opens over the page below */
.top-right { position: relative; } .me-wrap[hidden] { display: none; } /* the menu lines up with the right end of the top bar, so it fits on phones */
.me-btn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; overflow: hidden; transition: transform .2s, background .2s; }
.me-btn:hover { transform: scale(1.08); } .me-btn img { width: 80%; height: 80%; object-fit: contain; } .me-head span { display: block; margin-top: 2px; color: var(--text); }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: rgba(255,255,255,.28); }
.me-menu { position: absolute; z-index: 70; top: calc(100% + 8px); right: 0; width: 250px; max-width: calc(100vw - 24px); padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 6px; }
.me-menu[hidden] { display: none; }
.me-head { padding: 2px 4px 8px; font-size: 13px; color: #777; border-bottom: 1px solid #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me-head b { color: var(--text); }
.me-menu button { text-align: left; padding: 9px 12px; border: none; border-radius: 10px; background: #f3eefa; color: var(--text); font: 800 15px 'Nunito', sans-serif; cursor: pointer; }
.me-menu button:hover { background: #e6dcf5; } .me-menu button:disabled { opacity: .6; cursor: default; }
.me-msg { font-size: 13px; line-height: 1.4; color: var(--text); padding: 4px; } .me-msg small { display: block; margin-top: 4px; color: #777; }
#admin-bar { background: #1c0f2a; border-bottom: 3px solid #ffd23f; padding: 12px 26px 16px; color: #fff; animation: adin .25s ease-out; max-height: 60vh; overflow-y: auto; }
@keyframes adin { from { transform: translateY(-12px); opacity: 0; } }
.ad-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .ad-head b { font-family: 'Titan One'; font-size: 20px; color: #ffd23f; } .ad-head small { opacity: .6; flex: 1; }
.ad-x { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.ad-cmd { display: flex; align-items: center; gap: 8px; background: #0b0614; border: 2px solid #ffd23f; border-radius: 14px; padding: 6px 8px 6px 14px; box-shadow: 0 0 18px rgba(255,210,63,.25); }
.ad-cmd.shake { animation: quakesm .35s; border-color: #e8312f; }
.ad-prompt { font-family: 'Titan One'; color: #ffd23f; font-size: 22px; }
.ad-cmd input { flex: 1; min-width: 0; background: transparent; border: none; color: #fff; font-family: 'Courier New', monospace; font-weight: 900; font-size: 18px; padding: 6px 2px; }
.ad-cmd input:focus { border: none; }
.ad-eye { background: none; border: none; cursor: pointer; font-size: 16px; opacity: .7; }
.ad-log { min-height: 8px; margin: 6px 4px; font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 1px; }
.ad-log .ok { color: #8dff7a; } .ad-log .err { color: #ff8a8a; }
.ad-tools-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-tool { font-size: 12px; padding: 3px 10px; border-radius: 10px; background: rgba(255,255,255,.08); color: #aaa; display: inline-flex; align-items: center; gap: 4px; }
.ad-tool.on { background: rgba(75,194,46,.25); color: #b8ffa8; }
.ad-buffs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; background: rgba(255,255,255,.05); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; }
.ad-buffs > b { font-family: 'Titan One'; font-weight: 400; color: #ffd23f; margin-right: 4px; }
.ad-buff { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(90deg, #4bc22e, #2f9bff); padding: 4px 4px 4px 12px; border-radius: 16px; font-size: 13px; font-weight: 800; animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.ad-buff button { border: none; background: rgba(0,0,0,.3); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 10px; }
.ad-none { opacity: .55; font-size: 13px; }
.ad-help { font-size: 12px; opacity: .75; line-height: 1.6; } .ad-help code, .ad-head code { background: rgba(255,255,255,.12); padding: 0 5px; border-radius: 4px; color: #ffd23f; }
.rarity-seg { flex-wrap: wrap; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ad-season { flex-wrap: wrap; }
.ad-panel { background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ad-panel.open { border-color: #4bc22e; } .ad-panel.shake { animation: quakesm .35s; border-color: #e8312f; }
.ad-panel h4 { margin: 0; font-family: 'Titan One'; font-weight: 400; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.ad-ok { font-family: 'Nunito'; font-size: 10px; background: #4bc22e; padding: 1px 7px; border-radius: 6px; } .ad-lockico { margin-left: auto; }
.ad-lock, .ad-change { display: flex; gap: 6px; } .ad-lock input, .ad-change input { flex: 1; min-width: 0; padding: 7px 10px; border-width: 2px; }
.ad-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ad-row input, .ad-row select { flex: 1; min-width: 80px; padding: 6px 8px; border-width: 2px; }
#ad-qty { width: 64px; flex: none; min-width: 0; }
.ad-chip { border: none; border-radius: 10px; background: rgba(255,210,63,.2); color: #ffd23f; font-family: 'Titan One'; padding: 5px 10px; cursor: pointer; } .ad-chip:hover { background: rgba(255,210,63,.35); }
.ad-note { font-size: 12px; opacity: .75; display: flex; align-items: center; gap: 6px; } .ad-note input { width: 60px; padding: 4px; }
.ad-blooks { display: flex; flex-wrap: wrap; gap: 4px; max-height: 150px; overflow-y: auto; background: rgba(0,0,0,.25); border-radius: 10px; padding: 6px; }
.ad-bl { position: relative; border: none; background: none; padding: 2px; cursor: pointer; border-radius: 8px; opacity: .55; } .ad-bl.own { opacity: 1; } .ad-bl:hover { background: rgba(255,255,255,.15); opacity: 1; }
.ad-bl i { position: absolute; bottom: 0; right: 0; font-style: normal; font-size: 10px; background: #9a49aa; border-radius: 6px; padding: 0 4px; }
.ad-seasons { display: flex; flex-direction: column; gap: 6px; }
.ad-season { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .ad-season span { display: flex; flex-direction: column; font-size: 14px; } .ad-season small { opacity: .6; font-size: 11px; } .ad-season small.live { color: #4bff7a; opacity: 1; }
.ad-seg { display: flex; background: rgba(0,0,0,.3); border-radius: 8px; padding: 2px; } .ad-seg button { border: none; background: none; color: #ccc; font-size: 11px; padding: 4px 7px; border-radius: 6px; cursor: pointer; font-weight: 800; } .ad-seg button.on { background: #ffd23f; color: #3a2a00; }
.ad-foot { display: flex; gap: 12px; margin-top: auto; } .ad-link { background: none; border: none; color: #c9b3d6; font-size: 12px; cursor: pointer; padding: 0; } .ad-link:hover { color: #fff; }
@media (max-width: 1000px) { .ad-grid { grid-template-columns: 1fr; } #admin-bar { padding: 10px 16px; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .stats-top, .blooks-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .prog-list { grid-template-columns: 1fr; }
  .blook-info { position: static; order: -1; }
  .bz-row { grid-template-columns: 56px 1fr auto; } .bz-seller { display: none; } .bz-row .btn { grid-column: 3; }
  .g-main { flex-direction: column; }
  .pm-list { grid-template-columns: 1fr; }
  .play-top { grid-template-columns: 1fr; }
  .td { flex-direction: column; } .td-side { width: 100%; max-height: none; }
  .fac-grid { grid-template-columns: repeat(3, 1fr); } .cafe-seats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .seat { min-height: 160px; padding: 8px; } .cust { font-size: 40px; }
  .test-opts { grid-template-columns: 1fr; } .lc-code { font-size: 44px; }
}
@media (max-width: 700px) {
  #app { flex-direction: column-reverse; }
  #sidebar { width: 100%; flex-direction: row; } .logo, .side-user { display: none; }
  #nav { flex-direction: row; padding: 4px; overflow-x: auto; } #nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; } #nav a:hover { transform: none; }
  #topbar { padding: 10px 16px; } #topbar h1 { font-size: 24px; }
  #page { padding: 14px 16px 30px; }
  .profile { flex-direction: column; text-align: center; } .play-hero .hero-blooks { display: none; }
  .answers { grid-template-columns: 1fr; } .ans { padding: 16px; font-size: 20px; } .q-box { font-size: 22px; padding: 18px; }
  .chest { width: 100px; height: 130px; } .chest-lid { font-size: 60px; } .chest-res span { font-size: 40px; } .chest-res { font-size: 15px; }
  .pod { width: 100px; } .end h1 { font-size: 36px; }
  .pack3d { transform: scale(.85); }
  .mcard { width: 100px; height: 140px; } .mcard .blook { --s: 56px !important; }
  #nav { flex-shrink: 0; padding-bottom: max(4px, env(safe-area-inset-bottom)); } #nav a { flex-shrink: 0; }
  #page { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  /* Market: two smaller pack cards per row instead of one huge one */
  .market-banner { flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 70px; } .market-banner h2 { font-size: 22px; } .banner-tok { font-size: 26px; }
  .odds-btn { width: 44px; height: 44px; font-size: 22px; }
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .play-top { grid-template-columns: minmax(0, 1fr); } .play-top > * { min-width: 0; } .join-row input { letter-spacing: 3px; font-size: 22px; }
  /* Play: shorter game cards so the list isn't miles long */
  .mode-grid { gap: 12px; } .mode-card { min-height: 0; padding: 14px 16px 16px; } .mode-ico { font-size: 40px; } .mode-name { font-size: 21px; } .mode-desc { font-size: 14px; margin: 4px 0 10px; }
  .pack-card { height: 168px; padding: 0 6px; } .pc-emo { font-size: 52px; } .pc-name { font-size: 15px; line-height: 1.15; } .pc-price { margin-top: 6px; font-size: 14px; }
}
/* touch screens: no stuck "hover" tilt after tapping a card */
@media (hover: none) { .pack-card:hover, .pack-card:hover .pc-emo, .mode-card:hover, .mode-card:hover .mode-ico, #nav a:hover, .odds-btn:hover { transform: none; } }

/* =====================================================================
   GAME SHELL — full-screen, immersive game experience (all modes)
   ===================================================================== */
#game-root.gx { position: fixed; inset: 0; z-index: 200; color: #fff; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: #120a20; --m1: #9a49aa; --m2: #2a1450; }
#game-root.hidden { display: none; }
/* themed animated backdrop */
.gx-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--m1) 75%, transparent) 0, transparent 52%), radial-gradient(circle at 90% 95%, color-mix(in srgb, var(--m1) 45%, transparent) 0, transparent 50%), linear-gradient(165deg, color-mix(in srgb, var(--m2) 85%, #000) 0%, #0b0616 100%); }
.gx-bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%), linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%); background-size: 80px 80px; background-position: 0 0, 40px 40px; animation: bgmove 14s linear infinite; }
.gx-blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .35; background: var(--m1); animation: blobdrift 22s ease-in-out infinite alternate; }
.gx-blob.b1 { top: -18vmax; left: -12vmax; } .gx-blob.b2 { bottom: -22vmax; right: -14vmax; background: color-mix(in srgb, var(--m1) 50%, #fff); opacity: .18; animation-duration: 28s; }
@keyframes blobdrift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
.gx-floaters span { position: absolute; bottom: -80px; opacity: .16; animation: floatup linear infinite; filter: saturate(.8); }
@keyframes floatup { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(-115vh) rotate(200deg); } }
/* top HUD */
.gx-top { position: relative; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(10,5,25,.42); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.1); }
.gx-mode { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gx-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(145deg, var(--m1), var(--m2)); box-shadow: inset 0 -4px rgba(0,0,0,.25), 0 0 16px color-mix(in srgb, var(--m1) 60%, transparent); }
.gx-mode b { display: block; font-family: 'Titan One'; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gx-mode small { display: block; opacity: .7; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-clock { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gx-clock .g-timer { font-family: 'Titan One'; font-size: 26px; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.gx-clock.untimed .g-timer { font-size: 16px; opacity: .85; }
.gx-clock-bar { width: 220px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; } .gx-clock-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #4bff7a, #ffd23f); transition: width .25s linear; }
.gx-clock.low .g-timer { color: #ff6b6b; animation: pulse .5s infinite; } .gx-clock.low .gx-clock-bar i { background: #ff4b4b; }
.gx-me { justify-self: end; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border-radius: 16px; padding: 4px 10px 4px 4px; transition: background .3s; }
.gx-me small { display: block; font-size: 11px; opacity: .75; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gx-me b { font-family: 'Titan One'; font-size: 19px; white-space: nowrap; }
.gx-me.up { animation: meup .6s; } .gx-me.down { animation: medown .6s; }
@keyframes meup { 30% { background: rgba(75,194,46,.7); transform: scale(1.06); } } @keyframes medown { 30% { background: rgba(232,49,47,.7); transform: scale(.96); } }
.gx-rank { font-family: 'Titan One'; padding: 3px 10px; border-radius: 10px; background: rgba(255,255,255,.2); }
.gx-rank.r1 { background: linear-gradient(#ffe15a, #e8a800); color: #4a3000; } .gx-rank.r2 { background: linear-gradient(#eef1f6, #a8b0bd); color: #333; } .gx-rank.r3 { background: linear-gradient(#f0b07a, #b0702e); color: #3a1a00; }
.gx-btns { display: flex; gap: 6px; }
.gx-b { width: 42px; height: 42px; border: none; border-radius: 13px; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer; transition: background .2s, transform .15s; }
.gx-b:hover { background: rgba(255,255,255,.3); transform: translateY(-2px); } .gx-b.danger { background: #e8312f; }
/* stage */
.g-main { position: relative; z-index: 2; min-height: 0; display: flex; padding: clamp(10px, 2.2vh, 24px) clamp(10px, 2vw, 28px); transition: padding .3s; }
.g-area { flex: 1; display: flex; min-width: 0; min-height: 0; overflow: auto; }
.g-area > * { margin: auto; }
.g-area > .cv-col, .g-area > .td, .g-area > .race { margin: 0; }
/* leaderboard drawer */
.g-board { position: absolute; z-index: 12; top: 78px; right: 12px; bottom: 12px; width: 290px; display: flex; flex-direction: column; background: rgba(14,8,30,.78); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 12px; transform: translateX(calc(100% + 24px)); transition: transform .35s cubic-bezier(.3, 1.2, .5, 1); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.g-board.open { transform: none; }
@media (min-width: 1100px) { .gx:has(.g-board.open) .g-main { padding-right: 320px; } }
.board-title { display: flex; justify-content: space-between; align-items: center; font-family: 'Titan One'; font-size: 18px; margin-bottom: 8px; }
.board-x { border: none; background: rgba(255,255,255,.12); color: #fff; width: 28px; height: 28px; border-radius: 9px; cursor: pointer; }
.board-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.pl { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 14px; padding: 6px 8px; transition: background .3s; }
.pl.me { background: #fff; color: var(--text); box-shadow: 0 0 0 3px #ffd23f; }
.pl.done { opacity: .6; }
.pl-rank { font-family: 'Titan One'; width: 24px; text-align: center; } .pl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .pl-score { font-family: 'Titan One'; font-size: 14px; white-space: nowrap; }
.mv { font-style: normal; font-size: 10px; margin-left: 4px; } .mv.up { color: #4bff7a; } .mv.dn { color: #ff6b6b; } .pl.me .mv.up { color: #1f9a1f; }
/* event feed */
.g-feed { position: absolute; z-index: 15; top: 80px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(560px, 92vw); }
.feed-item { background: rgba(14,8,30,.85); backdrop-filter: blur(8px); padding: 9px 18px; border-radius: 16px; animation: feedin .35s cubic-bezier(.2, 1.5, .4, 1); transition: opacity .5s, transform .5s; box-shadow: 0 8px 20px rgba(0,0,0,.35); text-align: center; font-weight: 800; }
.feed-item.good { background: linear-gradient(90deg, #2a9a1a, #4bc22e); } .feed-item.bad { background: linear-gradient(90deg, #b0201f, #e8312f); }
.feed-item.out { opacity: 0; transform: translateY(-10px); }
@keyframes feedin { from { transform: translateY(-16px) scale(.9); opacity: 0; } }
/* full-screen correct/wrong flash */
.gx::after { content: ''; position: absolute; inset: 0; z-index: 40; pointer-events: none; opacity: 0; }
.gx.flash-good::after { background: radial-gradient(circle, transparent 40%, rgba(75,194,46,.55)); animation: flash .6s ease-out; }
.gx.flash-bad::after { background: radial-gradient(circle, transparent 40%, rgba(232,49,47,.55)); animation: flash .6s ease-out; }
/* intro / How to Play / menus */
.gx-intro, .gx-overlay { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(8,4,18,.6); backdrop-filter: blur(8px); animation: fade .25s; }
.gx-intro.out { animation: fadeout .35s forwards; }
.gx-intro-card, .gx-panel { width: min(640px, 100%); max-height: 100%; overflow-y: auto; background: #fff; color: var(--text); border-radius: 30px; padding: 28px clamp(18px, 4vw, 40px); text-align: center; box-shadow: inset 0 -8px rgba(0,0,0,.12), 0 30px 80px rgba(0,0,0,.5); animation: pop .45s cubic-bezier(.2, 1.5, .4, 1); }
.gx-intro-ico { width: 92px; height: 92px; margin: -6px auto 8px; border-radius: 28px; display: grid; place-items: center; font-size: 54px; background: linear-gradient(145deg, var(--m1), var(--m2)); box-shadow: inset 0 -6px rgba(0,0,0,.25), 0 12px 30px color-mix(in srgb, var(--m1) 50%, transparent); animation: float 3s ease-in-out infinite; }
.gx-intro-card h1, .gx-panel h2 { color: var(--purple); font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; }
.gx-intro-desc, .gx-sub { color: var(--muted); margin: 0 0 14px; }
.gx-help { list-style: none; counter-reset: h; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.gx-help li { counter-increment: h; display: flex; gap: 12px; align-items: center; background: #f6f1f9; border-radius: 14px; padding: 10px 14px; font-weight: 800; }
.gx-help li::before { content: counter(h); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: 'Titan One'; color: #fff; background: linear-gradient(145deg, var(--m1), var(--m2)); }
.gx-intro-foot { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 70px; }
.gx-count { font-family: 'Titan One'; font-size: 0; color: var(--purple); }
.gx-intro.counting #gx-ready { display: none; }
.gx-intro.counting .gx-count { font-size: 72px; }
.gx-count.pop { animation: cd .55s cubic-bezier(.2, 1.6, .4, 1); }
.gx-intro.go .gx-count { color: #2a9a1a; }
@keyframes cd { from { transform: scale(2.6); opacity: 0; } }
.gx-panel.menu { width: min(420px, 100%); display: flex; flex-direction: column; gap: 8px; }
.gx-mi { display: flex; align-items: center; gap: 12px; width: 100%; border: none; border-radius: 16px; padding: 14px 16px; background: #f6f1f9; color: var(--text); font: inherit; font-size: 18px; cursor: pointer; text-align: left; transition: transform .15s, background .2s; }
.gx-mi:hover { transform: translateX(4px); background: #efe2f7; } .gx-mi b { font-family: 'Titan One'; font-weight: 400; flex: 1; } .gx-mi small { color: var(--muted); font-size: 12px; }
.gx-mi.warn { background: #fff1dc; } .gx-mi.danger { background: #ffe3e3; }
/* questions */
.qwrap { width: min(1150px, 100%); display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); animation: pagein .3s; }
.q-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.q-meta span { background: rgba(255,255,255,.16); padding: 4px 14px; border-radius: 20px; font-weight: 900; font-size: 14px; }
.q-meta .q-streak { background: linear-gradient(90deg, #ff7b1c, #ff3d3d); } .q-meta .q-multi { background: #2f7bff; }
.q-title { font-family: 'Titan One'; font-size: clamp(18px, 2.4vw, 26px); text-align: center; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.q-box { background: #fff; color: var(--text); border-radius: 26px; padding: clamp(20px, 4vh, 44px) 28px; min-height: clamp(90px, 18vh, 180px); display: grid; place-items: center; text-align: center; font-family: 'Titan One'; font-size: clamp(22px, 3.2vw, 42px); line-height: 1.2; box-shadow: inset 0 -8px rgba(0,0,0,.1), 0 14px 40px rgba(0,0,0,.35); }
.q-timer { height: 12px; background: rgba(0,0,0,.3); border-radius: 8px; overflow: hidden; } .q-timer div { height: 100%; width: 100%; background: linear-gradient(90deg, #4bff7a, #ffd23f); } .q-timer div.low { background: #ff4b4b; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.6vh, 16px); }
.ans { display: flex; align-items: center; gap: 14px; text-align: left; font-family: 'Titan One'; font-size: clamp(17px, 2.1vw, 28px); color: #fff; border: none; border-radius: 22px; padding: 14px 18px; min-height: clamp(72px, 14vh, 140px); cursor: pointer; box-shadow: inset 0 -8px rgba(0,0,0,.22), 0 8px 20px rgba(0,0,0,.25); transition: transform .12s, filter .15s, opacity .3s; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.ans:hover { transform: translateY(-3px) scale(1.02); filter: brightness(1.08); } .ans:active { transform: scale(.97); }
.a0 { background: linear-gradient(160deg, #ffb340, #f58a00); } .a1 { background: linear-gradient(160deg, #2ec4ff, #0090d0); } .a2 { background: linear-gradient(160deg, #5ed63a, #36a31c); } .a3 { background: linear-gradient(160deg, #ff6a4d, #e02f1a); }
.ans-key { position: relative; flex-shrink: 0; width: clamp(38px, 5vh, 52px); height: clamp(38px, 5vh, 52px); border-radius: 14px; background: rgba(0,0,0,.18); display: grid; place-items: center; font-size: clamp(18px, 2.6vh, 26px); }
.ans-key em { position: absolute; bottom: -6px; right: -6px; font-style: normal; font-size: 11px; background: #fff; color: #333; border-radius: 6px; padding: 0 5px; text-shadow: none; }
.ans-txt { flex: 1; overflow-wrap: anywhere; }
.ans.dim { opacity: .3; transform: scale(.97); }
.feedback { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); padding: clamp(24px, 5vh, 48px) clamp(40px, 8vw, 100px); border-radius: 30px; text-align: center; }
.feedback.good { background: linear-gradient(160deg, #5ed63a, #2a9a1a); box-shadow: inset 0 -8px rgba(0,0,0,.2), 0 0 70px rgba(75,194,46,.7); }
.feedback.bad { background: linear-gradient(160deg, #ff6a4d, #c41f1f); box-shadow: inset 0 -8px rgba(0,0,0,.2), 0 0 70px rgba(232,49,47,.7); }
.fb-icon { width: clamp(70px, 12vh, 110px); height: clamp(70px, 12vh, 110px); border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: clamp(40px, 7vh, 64px); }
.fb-text { font-family: 'Titan One'; font-size: clamp(30px, 5vw, 52px); text-shadow: 0 3px 0 rgba(0,0,0,.2); } .fb-ans { font-size: clamp(15px, 2vw, 22px); }
/* compact question panels inside sims / side panels */
.qwrap.compact { gap: 8px; width: 100%; } .qwrap.compact .q-box { font-size: 17px; padding: 12px; min-height: 0; border-radius: 16px; }
.qwrap.compact .answers { gap: 8px; } .qwrap.compact .ans { font-size: 14px; padding: 8px 10px; min-height: 0; border-radius: 14px; gap: 8px; box-shadow: inset 0 -5px rgba(0,0,0,.22); }
.qwrap.compact .ans-key { width: 28px; height: 28px; font-size: 14px; border-radius: 9px; } .qwrap.compact .ans-key em { display: none; }
.feedback.compact { padding: 14px 26px; border-radius: 20px; } .feedback.compact .fb-icon { width: 46px; height: 46px; font-size: 26px; } .feedback.compact .fb-text { font-size: 22px; } .feedback.compact .fb-ans { font-size: 14px; }
/* quiz pop-up over action games */
.quiz-ov { position: absolute; inset: 0; z-index: 30; background: rgba(8,4,18,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 80px 20px 20px; animation: fade .2s; }
.quiz-ov-in { width: min(1050px, 100%); display: flex; justify-content: center; }
/* choice cards */
.choose { text-align: center; width: min(1100px, 100%); animation: pagein .3s; }
.choose h2 { font-size: clamp(24px, 3.4vw, 40px); text-shadow: 0 3px 0 rgba(0,0,0,.25); margin-bottom: 4px; }
.opt-grid { display: flex; gap: clamp(10px, 1.6vw, 18px); justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.opt { position: relative; font: inherit; width: clamp(150px, 17vw, 220px); padding: 24px 14px 18px; border: none; border-radius: 24px; background: #fff; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: inset 0 -7px rgba(0,0,0,.12), 0 12px 28px rgba(0,0,0,.3); transition: transform .18s, box-shadow .18s; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.opt:nth-child(2) { animation-delay: .06s; } .opt:nth-child(3) { animation-delay: .12s; } .opt:nth-child(4) { animation-delay: .18s; }
.opt:hover:not(:disabled) { transform: translateY(-8px) scale(1.04); box-shadow: inset 0 -7px rgba(0,0,0,.12), 0 18px 36px rgba(0,0,0,.35), 0 0 0 4px #ffd23f; }
.opt:disabled { opacity: .45; cursor: not-allowed; }
.opt-ico { font-size: clamp(42px, 6vh, 60px); line-height: 1; } .opt b { font-family: 'Titan One'; font-size: 18px; } .opt small { color: var(--muted); font-size: 13px; }
.key { position: absolute; top: 10px; left: 10px; font-style: normal; font-family: 'Titan One'; font-size: 12px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: #f2e4f7; color: var(--purple); }
.choose-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 16px; }
.choose-p { position: relative; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--text); border: none; border-radius: 18px; padding: 12px 14px 12px 38px; cursor: pointer; font: inherit; box-shadow: inset 0 -5px rgba(0,0,0,.12), 0 8px 20px rgba(0,0,0,.25); transition: transform .15s; text-align: left; animation: pop .35s backwards; }
.choose-p:hover { transform: translateY(-4px) scale(1.02); } .choose-p b { flex: 1; } .choose-p span { font-family: 'Titan One'; font-size: 14px; }
.choose-p .key { top: 50%; transform: translateY(-50%); left: 10px; }
/* run over / results */
.run-over, .solo-res { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.run-over { background: rgba(14,8,30,.6); backdrop-filter: blur(10px); border-radius: 30px; padding: 40px 50px; }
.ro-ico { font-size: 80px; } .ro-score { font-family: 'Titan One'; font-size: 40px; background: #fff; color: var(--text); padding: 6px 26px; border-radius: 18px; box-shadow: inset 0 -5px rgba(0,0,0,.12); }
.wr-dots { display: flex; gap: 8px; } .wr-dots i { width: 12px; height: 12px; border-radius: 50%; background: #fff; animation: bob2 1.2s ease-in-out infinite; } .wr-dots i:nth-child(2) { animation-delay: .15s; } .wr-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bob2 { 50% { transform: translateY(-10px); opacity: .5; } }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 7px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin2 .8s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }
/* lobby */
.gx-lobby { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; min-height: 0; grid-row: 1 / -1; }
.gx-lobby .gx-top { grid-template-columns: 1fr auto; }
.lb-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; padding: 18px clamp(14px, 3vw, 32px) 8px; }
.lb-join { background: #fff; color: var(--text); border-radius: 28px; padding: 22px 28px; text-align: center; box-shadow: inset 0 -8px rgba(0,0,0,.1), 0 16px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lb-join small { color: var(--muted); } .lb-join > b { font-size: 18px; }
.lb-id { display: flex; flex-direction: column; align-items: center; margin-top: 4px; } .lb-id span { font-family: 'Titan One'; color: var(--muted); letter-spacing: 3px; font-size: 13px; }
.lb-id strong { font-family: 'Titan One'; font-weight: 400; font-size: clamp(54px, 8vw, 96px); letter-spacing: 6px; line-height: 1; color: var(--purple); }
.lc-status { font-weight: 900; margin-top: 6px; } .lc-status.online { color: #2a9a1a; } .lc-status.error { color: #c22; }
.lb-modecard { background: rgba(14,8,30,.55); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12); border-radius: 28px; padding: 18px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.lb-mi { font-size: 50px; } .lb-modecard > b { font-family: 'Titan One'; font-size: 26px; } .lb-modecard > small { opacity: .75; margin-bottom: 10px; }
.lb-modecard .gx-help { margin: 0; width: 100%; } .lb-modecard .gx-help li { background: rgba(255,255,255,.1); color: #fff; font-size: 14px; padding: 8px 12px; }
.lobby-players { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-content: flex-start; padding: 12px clamp(14px, 3vw, 32px); }
.lp { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 112px; padding: 12px 8px; border-radius: 20px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); }
.lp.new { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); } .lp.me { background: rgba(255,210,63,.25); border-color: #ffd23f; }
.lp b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lp small { font-size: 11px; opacity: .8; }
.lobby-players.small .lp { width: 92px; padding: 8px; }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px clamp(14px, 3vw, 32px); background: rgba(10,5,25,.5); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,.1); font-family: 'Titan One'; font-size: 20px; }
.wr-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px 16px 10px; } .wr-hero h1 { font-size: clamp(30px, 4vw, 44px); } .wr-hero p { opacity: .85; }
.wr-me { animation: float 3s ease-in-out infinite; }
.wr-game { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 18px; padding: 10px 18px; font-size: 16px; }
.wr-game > span:first-child { font-size: 26px; } .wr-code b { font-family: 'Titan One'; font-size: 20px; letter-spacing: 1px; }
.wr-count { text-align: center; font-weight: 900; opacity: .8; margin-top: 6px; }
.lobby-players .lp.me { outline: 3px solid #ffd54a; }
/* end screen */
.gx-done { grid-template-rows: 1fr; }
.end { position: relative; z-index: 2; height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: clamp(20px, 4vh, 44px) 16px; }
.end-hero { text-align: center; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); } .end-ico { font-size: 76px; animation: float 3s ease-in-out infinite; }
.end-hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 0; text-shadow: 0 5px 0 rgba(0,0,0,.3); } .end-hero p { opacity: .8; margin: 4px 0 0; }
.podium { display: flex; align-items: flex-end; gap: 14px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; width: clamp(110px, 14vw, 170px); animation: rise .6s var(--d) backwards; }
.pod-blook { animation: blookin 1s var(--d) backwards; }
.pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pod small { opacity: .85; }
.pod-step { width: 100%; font-size: 40px; display: grid; place-items: center; border-radius: 16px 16px 0 0; box-shadow: inset 0 -6px rgba(0,0,0,.2); }
.pod1 .pod-step { height: 150px; background: linear-gradient(#ffe15a, #e8a800); } .pod2 .pod-step { height: 110px; background: linear-gradient(#eef1f6, #9aa3b0); } .pod3 .pod-step { height: 80px; background: linear-gradient(#f0b07a, #a8642c); }
.pod.me b { background: #fff; color: var(--purple); padding: 0 8px; border-radius: 8px; }
.end-stats { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; animation: rise .6s 1.1s backwards; }
.end-stat { width: 140px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15); border-radius: 20px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.end-stat > span { font-size: 28px; } .end-stat b { font-family: 'Titan One'; font-weight: 400; font-size: 26px; } .end-stat b small { font-size: 15px; opacity: .7; } .end-stat > small { opacity: .75; font-size: 12px; }
.end-stat.tokens { background: linear-gradient(160deg, #ffe15a, #e8a800); color: #4a3000; border-color: transparent; box-shadow: 0 0 30px rgba(255,210,63,.5); }
.end-rest { display: flex; flex-direction: column; gap: 4px; width: min(420px, 100%); animation: rise .6s 1.3s backwards; }
.er { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 12px; padding: 4px 10px; } .er.me { background: #fff; color: var(--text); }
.er > span { font-family: 'Titan One'; width: 22px; } .er b { flex: 1; font-size: 14px; } .er em { font-style: normal; font-family: 'Titan One'; font-size: 13px; }
.end-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; animation: rise .6s 1.4s backwards; }
.end .end-tk-note { color: rgba(255,255,255,.7); margin: 0; }
.end-fx { position: fixed; }
/* canvas games fill the stage */
.cv-col { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cv-wrap { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; } /* the canvas inside is sized by makeStage() (modes-art.js) */
.cv-wrap canvas { display: block; flex: none; width: 100%; height: 100%; touch-action: none; border-radius: 16px; box-shadow: 0 0 0 2px rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.45); }
.cv-hud { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; background: rgba(10,5,25,.7); backdrop-filter: blur(6px); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 800; white-space: nowrap; pointer-events: none; z-index: 2; }
.hud-bar { display: inline-block; width: 90px; height: 10px; background: rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; } .hud-bar i { display: block; height: 100%; background: #b64cff; }
.warn { color: #ff6b6b; animation: pulse .6s infinite; }
.cv-btns { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.dpad { display: none; position: absolute; left: 14px; bottom: 14px; z-index: 3; grid-template-columns: repeat(3, 60px); grid-template-rows: repeat(2, 56px); gap: 6px; }
.dpad button { border: none; border-radius: 14px; background: rgba(255,255,255,.28); backdrop-filter: blur(4px); color: #fff; font-size: 24px; touch-action: none; }
.dpad [data-k=arrowup] { grid-column: 2; } .dpad [data-k=arrowleft] { grid-column: 1; grid-row: 2; } .dpad [data-k=arrowdown] { grid-column: 2; grid-row: 2; } .dpad [data-k=arrowright] { grid-column: 3; grid-row: 2; }
@media (pointer: coarse) { .dpad { display: grid; } }
.cv-col.has-below .pool-q { flex-shrink: 0; width: min(1000px, 100%); margin: 0 auto; }
.td { display: flex; gap: 14px; width: 100%; height: 100%; min-height: 0; }
.gx:has(.td) .g-board { display: none; } .gx:has(.td) .g-main { padding-right: clamp(10px, 2vw, 28px) !important; }
.td-left { flex: 1; min-width: 0; min-height: 0; display: flex; }
.td-left .cv-wrap { height: 100%; }
.td-side { max-height: 100% !important; }
/* bigger mode stages */
.cafe, .factory, .bees, .plush, .santa, .imp, .snow { max-width: 1200px !important; }
.kingdom { max-width: 860px !important; } .tdoom, .dive { max-width: 1050px !important; } .memory { max-width: 1150px !important; }
.mm-card { height: clamp(110px, 17vh, 180px) !important; } .mm-front { font-size: clamp(13px, 1.5vw, 18px) !important; }
.pond { max-width: 1000px !important; height: min(62vh, 560px) !important; }
.claw-machine { max-width: 780px !important; }
.vg-board { width: min(76vh, 100%) !important; }
.chest { width: clamp(150px, 17vw, 230px) !important; height: clamp(170px, 26vh, 260px) !important; } .chest-lid { font-size: clamp(70px, 10vh, 120px) !important; }
.race { width: 100%; height: 100%; } .race-track { flex-shrink: 0; } .lane { height: clamp(36px, 5.5vh, 56px) !important; }
.duel-hud { max-width: 1100px !important; }
/* phones & small screens */
@media (max-width: 760px) {
  .gx-top { grid-template-columns: auto 1fr auto auto; gap: 6px; padding: 8px 10px; }
  .gx-lobby .gx-top { grid-template-columns: 1fr auto; }
  .gx-mode div { display: none; } .gx-me { padding: 3px 8px 3px 3px; gap: 5px; } .gx-me small, .gx-me > :first-child { display: none; } .gx-me b { font-size: 15px; }
  .gx-btns [data-a="help"], .gx-btns [data-a="fs"] { display: none; } .gx-clock-bar { width: 90px; } .gx-clock .g-timer { font-size: 20px; }
  .gx-b { width: 36px; height: 36px; font-size: 15px; }
  .g-board { top: auto; left: 8px; right: 8px; width: auto; height: 46vh; transform: translateY(calc(100% + 24px)); }
  .answers { grid-template-columns: 1fr; } .ans { min-height: 56px; }
  .lb-hero { grid-template-columns: 1fr; } .lb-modecard { display: none; }
  .end-stat { width: 44%; } .opt { width: 44%; }
}

/* ================= FRIEND CHAT & INVITES ================= */
.fr-badge { display: inline-block; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font: 900 12px/22px Nunito, sans-serif; font-style: normal; text-align: center; }
.toast.clickable { cursor: pointer; }
.gx-fr { position: relative; } .gx-fr .gx-dot { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #2a1450; display: none; } .gx-fr.has .gx-dot { display: block; }

#chat-dock { position: fixed; right: 20px; bottom: 20px; z-index: 350; width: 370px; height: min(580px, calc(100vh - 40px)); background: #fff; color: #2a2a3a; border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.45); display: none; flex-direction: column; overflow: hidden; animation: cdin .25s cubic-bezier(.2,1.3,.4,1); }
#chat-dock.open { display: flex; }
@keyframes cdin { from { transform: translateY(30px) scale(.95); opacity: 0; } }
.cd-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; background: linear-gradient(135deg, var(--purple), var(--purple-d)); color: #fff; }
.cd-head > b { flex: 1; font-family: 'Titan One'; font-size: 18px; font-weight: 400; }
.cd-head .cd-n { flex: 1; min-width: 0; } .cd-head .cd-n small { color: rgba(255,255,255,.8); }
.cd-x, .cd-back { border: none; background: rgba(255,255,255,.18); color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 15px; flex: none; }
.cd-x:hover, .cd-back:hover { background: rgba(255,255,255,.3); }
.cd-n b { display: flex; align-items: center; gap: 6px; font-size: 15px; } .cd-n small { display: block; font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-game { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px; background: #fff6d6; border-bottom: 1px solid #f0e2a8; font-size: 13px; font-weight: 700; }
.cd-game .btn { margin-left: auto; }
.cd-list { flex: 1; overflow-y: auto; padding: 6px; }
.cd-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; cursor: pointer; transition: background .15s; }
.cd-row:hover { background: #f3eef7; } .cd-row:not(.on) { opacity: .7; }
.cd-row .cd-n { flex: 1; min-width: 0; } .cd-row .btn { padding: 6px 10px; }
.cd-empty { text-align: center; color: #888; padding: 40px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cd-safe { font-size: 11px; color: #888; text-align: center; padding: 8px; border-top: 1px solid #eee; }
.cd-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; background: #f6f3f9; }
.cm { max-width: 80%; align-self: flex-start; display: flex; flex-direction: column; }
.cm p { margin: 0; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 700; font-size: 14px; word-break: break-word; }
.cm time { font-size: 10px; color: #aaa; margin: 2px 6px 0; }
.cm.me { align-self: flex-end; align-items: flex-end; } .cm.me p { background: var(--purple); color: #fff; border-radius: 16px 16px 4px 16px; }
.cm.inv { flex-direction: row; align-items: center; gap: 8px; background: #fff6d6; border: 1px solid #f0e2a8; border-radius: 14px; padding: 8px 10px; font-size: 13px; font-weight: 800; max-width: 92%; }
.cd-quick { display: flex; gap: 4px; padding: 6px 8px 0; overflow-x: auto; background: #fff; }
.cd-quick button { flex: none; border: 1px solid #e4dcea; background: #fff; border-radius: 12px; padding: 4px 9px; font-size: 14px; font-weight: 800; cursor: pointer; }
.cd-quick button:hover:not(:disabled) { background: #f3eef7; } .cd-quick button:disabled { opacity: .4; cursor: default; }
.cd-form { display: flex; gap: 8px; padding: 8px 10px 10px; background: #fff; }
.cd-form input { flex: 1; min-width: 0; border: 2px solid #e4dcea; border-radius: 14px; padding: 10px 12px; font: 700 14px Nunito, sans-serif; outline: none; }
.cd-form input:focus { border-color: var(--purple); }

.inv-pop { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 450; display: flex; align-items: center; gap: 12px; background: #fff; color: #2a2a3a; padding: 12px 14px; border-radius: 20px; box-shadow: 0 14px 40px rgba(0,0,0,.4); border: 3px solid var(--gold); animation: invin .4s cubic-bezier(.2,1.4,.4,1); transition: opacity .3s, transform .3s; max-width: calc(100vw - 24px); }
.inv-pop.out { opacity: 0; transform: translate(-50%, -20px); }
@keyframes invin { from { transform: translate(-50%, -40px); opacity: 0; } }
.inv-txt { display: flex; flex-direction: column; } .inv-txt small { font-size: 11px; font-weight: 900; text-transform: uppercase; color: #c48a00; } .inv-txt span { font-size: 13px; color: #666; font-weight: 700; }
.inv-btns { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) {
  #chat-dock { right: 0; bottom: 0; width: 100%; height: 85vh; border-radius: 22px 22px 0 0; }
  .inv-pop { flex-wrap: wrap; } .inv-btns { flex-direction: row; }
}

/* ===== Admin bar floating over a game (opened from the in-game ☰ menu or 🛠️) ===== */
body:has(#game-root.gx:not(.hidden)) #app { z-index: auto; } /* let the floating bar rise above the game */
body:has(#game-root.gx:not(.hidden)) #admin-bar:not(.hidden) { position: fixed; top: 74px; right: 16px; z-index: 380; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 100px); border: 3px solid #ffd23f; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.55); padding: 12px 18px 16px; }
#admin-bar .gm-cur { margin-left: 4px; }
#admin-bar #gm-who { min-width: 200px; }
#admin-bar #gm-amt { max-width: 110px; }
#admin-bar .gm-wallets { line-height: 1.7; }
@media (max-width: 760px) { body:has(#game-root.gx:not(.hidden)) #admin-bar:not(.hidden) { top: 60px; right: 8px; width: calc(100vw - 16px); } }

/* ================= SAVE DATABASE ================= */
.db-status { display: inline-block; padding: 8px 14px; border-radius: 12px; font-weight: 900; background: #eef8ea; color: #2a7a1a; }
.db-status.busy { background: #fff6d6; color: #8a6a00; } .db-status.off { background: #ffe8e8; color: #b0201e; } .db-status.warn { background: #fff0d6; color: #a05a00; }
.db-accounts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.db-acc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #f6f2f9; border: 2px solid transparent; }
.db-acc.cur { border-color: var(--purple); background: #f3eaf8; }
.db-an { flex: 1; min-width: 0; } .db-an b { display: block; } .db-an em { font-style: normal; font-size: 11px; background: var(--purple); color: #fff; padding: 2px 8px; border-radius: 8px; margin-left: 6px; vertical-align: middle; }
.db-an small { color: #777; font-weight: 700; }
.db-card .row.wrap { flex-wrap: wrap; gap: 8px; }
.db-card code { background: #f0eaf5; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
#db-conflict { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: calc(100vw - 24px);
  background: #fff4dc; color: #5a3a00; border: 3px solid #f5a700; border-radius: 16px; padding: 12px 16px; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
#db-conflict span { font-size: 13px; font-weight: 700; }

/* phones: the sidebar becomes a bottom bar — keep the toasts above it */
@media (max-width: 700px) {
  #toasts { bottom: 140px; right: 12px; left: 12px; align-items: stretch; }
}

/* save code (Settings) */
.db-code { align-items: center; gap: 8px; }
.db-code code { font-size: 14px !important; padding: 8px 12px !important; letter-spacing: .5px; user-select: all; word-break: break-all; transition: filter .2s; }
.db-code code.hidden-code { filter: blur(6px); user-select: none; }
.db-use { gap: 8px; margin-top: 8px; } .db-use input { flex: 1; min-width: 220px; border: 2px solid #e4dcea; border-radius: 12px; padding: 9px 12px; font: 700 14px Nunito, sans-serif; }

/* ================= LOG IN / SIGN UP ================= */
#auth { position: fixed; inset: 0; z-index: 900; display: grid; justify-items: center; padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at 30% 20%, #7a3a9a, transparent 60%), radial-gradient(circle at 80% 80%, #2b2f9a, transparent 55%), #2a1450; transition: opacity .35s; }
#auth.out { opacity: 0; pointer-events: none; }
.auth-card { width: min(400px, 100%); background: #fff; border-radius: 26px; padding: 26px 24px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 -6px rgba(0,0,0,.08); text-align: center; animation: authin .45s cubic-bezier(.2,1.3,.4,1); }
@keyframes authin { from { transform: translateY(30px) scale(.95); opacity: 0; } }
.auth-logo { font-family: 'Titan One', sans-serif; font-size: 46px; color: var(--purple, #9a49aa); text-shadow: 0 4px 0 rgba(0,0,0,.12); line-height: 1; }
.auth-emoji { font-size: 26px; letter-spacing: 6px; margin: 6px 0 14px; }
.auth-tabs { display: flex; background: #f1eaf6; border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; border: none; background: none; padding: 10px; border-radius: 11px; font: 900 15px Nunito, sans-serif; color: #7a6a88; cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--purple, #9a49aa); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
#auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
#auth-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 900; font-size: 13px; color: #5a4a68; }
#auth-form input[type=text], #auth-form input:not([type]), #auth-form input[type=password], #auth-form input[type=email] { width: 100%; box-sizing: border-box; border: 2px solid #e4dcea; border-radius: 13px; padding: 11px 13px; font: 700 16px Nunito, sans-serif; outline: none; }
#auth-form input:focus { border-color: var(--purple, #9a49aa); }
.au-pw { position: relative; display: block; } .au-pw input { padding-right: 46px !important; }
.au-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: none; font-size: 18px; cursor: pointer; padding: 6px; }
.au-keep { flex-direction: row !important; align-items: center; gap: 8px !important; background: #f6f2f9; border-radius: 12px; padding: 10px 12px; font-size: 14px !important; color: #3a2a4a !important; cursor: pointer; }
.au-keep input { width: 18px; height: 18px; accent-color: var(--purple, #9a49aa); flex: none; } .au-keep small { color: #888; font-weight: 700; }
.au-note { margin: 0; font-size: 12px; color: #888; font-weight: 700; }
.au-err { min-height: 18px; color: #d0302e; font-weight: 900; font-size: 14px; text-align: center; }
.au-err.shake { animation: shake .4s; }
.au-go { width: 100%; margin-top: 2px; } .au-go:disabled { opacity: .6; }
.au-switch { margin: 14px 0 0; font-size: 14px; font-weight: 700; color: #777; } .au-switch a { color: var(--purple, #9a49aa); font-weight: 900; }
.au-forgot { align-self: flex-end; margin-top: -4px; font-size: 13px; font-weight: 900; color: var(--purple, #9a49aa); }
.au-h { margin: 4px 0 12px; font-size: 20px; color: #3a2a4a; } .au-small { font-weight: 700; color: #999; }
.au-sent { margin: 0; padding: 14px; background: #eefaf0; border-radius: 14px; font-weight: 800; color: #2d6a3a; text-align: center; line-height: 1.45; }
.au-sent small { display: block; margin-top: 6px; color: #6a8a70; font-weight: 700; }
.db-pw { margin: 4px 0 10px; } .db-pw summary { cursor: pointer; font-weight: 900; color: #5a4a68; padding: 6px 0; }
.db-pw-form { display: flex; flex-direction: column; gap: 8px; max-width: 340px; margin-top: 6px; }
.db-pw-form input { border: 2px solid #e4dcea; border-radius: 12px; padding: 9px 12px; font: 700 14px Nunito, sans-serif; }

/* admin Players tool: online players stand out */
.pla-status { justify-content: space-between; align-items: center; }
.pla-row.on { box-shadow: inset 4px 0 0 #4bc22e; background: rgba(75,194,46,.12); }
.pla-n i { font-style: normal; opacity: .7; font-weight: 700; }

/* ===== BAN SCREEN (temporary bans from the admin Players tool) ===== */
#banned { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(circle at 30% 20%, #7a1a2a, transparent 60%), radial-gradient(circle at 80% 80%, #2a1450, transparent 55%), #1a0a1a; }
.ban-card { width: min(440px, 100%); background: #fff; border-radius: 26px; padding: 26px 24px 20px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: authin .45s cubic-bezier(.2,1.3,.4,1); }
.ban-ico { font-size: 58px; line-height: 1; }
.ban-card h1 { font-family: 'Titan One', sans-serif; color: #c41f3a; font-size: 30px; margin: 8px 0 6px; }
.ban-card p { color: #5a4a6a; font-size: 15px; margin: 0 0 14px; }
.ban-reason, .ban-until { background: #fbeef2; border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; color: #3b1652; font-weight: 800; }
.ban-reason small, .ban-until small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #a06a80; font-weight: 900; }
.ban-until b { display: block; font-size: 18px; } .ban-until span { display: block; color: #c41f3a; font-size: 14px; margin-top: 2px; }
.ban-msg { min-height: 1.2em; margin: 8px 0 0 !important; font-size: 13px !important; font-weight: 700; color: #a06a80 !important; }
.ban-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
/* admin: ban controls in a player's page */
.pe-ban { border: 2px solid #f3c0cc; background: #fff5f7; border-radius: 12px; padding: 8px 10px; margin: 6px 0; }
.pe-ban b { color: #c41f3a; } .pe-ban .ad-row { margin: 4px 0 0; flex-wrap: wrap; }
.pe-ban input, .pe-ban select { max-width: 120px; } .pe-ban #pe-ban-reason { max-width: none; flex: 1; min-width: 140px; }
.pla-row.banned { opacity: .75; } .pla-row.banned small { color: #c41f3a; }
.ad-daily-row { align-items: center; flex-wrap: wrap; }

/* the login box is centred, but on short screens (phones, landscape) the page scrolls so the Log In / Sign Up button can always be reached */
#auth > .auth-card { margin-block: auto; }

/* ===== PHONES: nothing is wider than the screen, so you only ever scroll up and down ===== */
@media (max-width: 700px) {
  /* bottom menu: all 9 buttons fit in two rows instead of a bar you slide sideways */
  #nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 4px; overflow: visible; }
  #nav a { min-width: 0; padding: 4px 2px; gap: 1px; font-size: 10px; border-radius: 10px; text-align: center; }
  #nav .ico { font-size: 19px; width: auto; }
  #nav .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* top bar: long page names shrink instead of pushing the token count off the screen */
  #topbar { gap: 8px; padding: 10px 12px; } #topbar h1 { min-width: 0; font-size: clamp(17px, 5.6vw, 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-right { gap: 6px; flex-shrink: 0; } .admin-toggle { width: 36px; height: 36px; font-size: 17px; }
  .me-btn { width: 36px; height: 36px; } .me-btn svg { width: 17px; height: 17px; }
  .token-pill { font-size: 18px; padding: 4px 12px 4px 6px; gap: 6px; }
  /* safety net: if anything new is ever too wide it gets cut off instead of making the page slide sideways */
  #page, .modal, .end { overflow-x: hidden; }
  .modal { padding: 20px 16px; } .pm-head, .gs-head { margin: -20px -16px 16px; padding: 14px 52px 14px 16px; gap: 12px; } .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .set-card { padding: 10px 6px; } /* coloured headers still reach the edges */
  .odds-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px 10px; } .odds-row:hover { transform: none; } .odds-n { grid-column: 2; gap: 4px 6px; } .odds-ico { width: 40px; height: 40px; } .odds-pct b { font-size: 17px; }
  /* pack window: the "Open [12] Max [Open]" row wraps */
  .qty-custom { flex-wrap: wrap; }
  /* game setup: 2/3/5/8 min and bot buttons wrap and share the width */
  .seg { flex-wrap: wrap; } .seg-b { flex: 1 1 auto; padding: 10px 8px; }
  /* set editor: the name box shrinks to fit */
  .se-title input { min-width: 0; width: 100%; font-size: 20px; }
  .db-an small { overflow-wrap: anywhere; }
  /* end-of-game podium fits three across */
  .podium { gap: 8px; } .pod { width: min(100px, 28vw); }
}
@media (max-width: 760px) {
  /* in a game the screen is one column as wide as the phone; the top bar squeezes to fit */
  #game-root.gx { grid-template-columns: minmax(0, 1fr); }
  .gx-top { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .gx-clock { min-width: 0; max-width: 100%; } .gx-clock .g-timer { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gx-clock-bar { width: min(90px, 100%); }
  .gx-me { min-width: 0; } .gx-ico { width: 36px; height: 36px; font-size: 21px; border-radius: 11px; }
  .gx-btns { gap: 4px; }
  /* the player-name strip over arena games wraps instead of running off both sides */
  .cv-hud { max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center; white-space: normal; gap: 4px 10px; padding: 5px 12px; font-size: 12px; row-gap: 2px; }
  .td-side { overflow-x: hidden; }
  .g-area { overflow-x: hidden; } /* a tapped answer button grows a little; that must not make the game slide sideways */
  /* Crazy Kingdom: Yes / No buttons share the width */
  .kd-btns { width: 100%; gap: 10px; } .kd-btns .btn { flex: 1; min-width: 0; }
  /* Snowball Fight: the two team boxes shrink to fit side by side */
  .snow-teams { gap: 6px; } .snow-team { min-width: 0; gap: 6px; padding: 6px 8px; } .snow-team span { font-size: 22px; } .snow-team b { min-width: 0; font-size: 13px; line-height: 1.1; } .snow-team em { font-size: 20px; } .snow-vs { font-size: 16px; }
}
/* small phones: drop the mode icon and shrink the buttons so the game timer always has room */
@media (max-width: 420px) {
  #game-root > .gx-top { gap: 5px; padding: 8px; grid-template-columns: minmax(0, 1fr) auto auto; } #game-root > .gx-top > .gx-mode { display: none; }
  .gx-b { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; } .gx-rank { padding: 2px 6px; font-size: 13px; } .gx-me b { font-size: 14px; }
  .gx-clock.untimed .g-timer { font-size: 12px; }
  .snow-team span { display: none; } /* team emoji makes way for the team name */
}
/* touch screens: no stuck "hover" grow on answer buttons after tapping */
@media (hover: none) { .ans:hover, .btn:hover:not(:disabled) { transform: none; filter: none; } }

/* ================= GIFT CODES (Stats page gift bar, the card reveal, the pack picker) ================= */
.gift-bar .gift-head { display: flex; gap: 12px; align-items: center; }
.gift-bar .gift-head .card-title { margin: 0; } .gift-bar .gift-head p { margin: 2px 0 0; }
.gift-ico { font-size: 34px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.2)); }
.gift-row { display: flex; gap: 8px; margin-top: 12px; }
.gift-row input { flex: 1; min-width: 0; font: 900 20px Nunito, sans-serif; letter-spacing: 2px; text-transform: uppercase; text-align: center; padding: 10px 12px; border-radius: 12px; border: 3px solid #d8cdf0; }
.gift-row input:focus { border-color: var(--purple); outline: none; }
.gift-wait { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #eef4ff; font-weight: 800; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gift-wait.boost { background: #e8ffe9; }
.modal.gift-modal { width: min(720px, 100%); background: linear-gradient(160deg, #3b2a7a, #1d1240); color: #fff; overflow: hidden; }
.gift-reveal { display: flex; gap: 22px; align-items: center; }
.gr-card { position: relative; flex: 0 0 220px; height: 220px; display: grid; place-items: center; }
.gr-box { font-size: 140px; line-height: 1; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); animation: grBox 1s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes grBox { 0% { transform: scale(.3) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); opacity: 1; } }
.gr-burst { position: absolute; left: 50%; top: 45%; pointer-events: none; }
.gr-burst span { position: absolute; left: -32px; top: -32px; opacity: 0; animation: grPal 1.6s var(--d) cubic-bezier(.15, .8, .3, 1) forwards; }
@keyframes grPal { 0% { transform: translate(0, 0) scale(.2) rotate(0); opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.05) rotate(20deg); opacity: 0; } }
.gr-out { flex: 1; text-align: center; min-width: 0; }
.gr-lbl { font: 900 15px Nunito, sans-serif; text-transform: uppercase; letter-spacing: 2px; opacity: .8; }
.gr-num { font-family: 'Titan One', sans-serif; font-size: clamp(30px, 7vw, 48px); margin: 8px 0; text-shadow: 0 4px 0 rgba(0,0,0,.35); white-space: nowrap; }
.gr-num .tokv { font-size: inherit; }
.gr-num.land { animation: grLand .6s cubic-bezier(.2, 1.8, .4, 1); color: #ffe36b; }
@keyframes grLand { from { transform: scale(1.6); } }
.gr-sub { font-weight: 800; min-height: 2.6em; opacity: .9; }
.gr-btns { margin-top: 12px; justify-content: center; }
.gr-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gift-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gift-pk { border: 0; border-radius: 16px; padding: 14px 8px; cursor: pointer; color: #fff; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); display: grid; gap: 4px; justify-items: center; font: 900 15px Nunito, sans-serif; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.gift-pk span { font-size: 38px; } .gift-pk:hover { transform: translateY(-2px); }
@media (max-width: 600px) {
  .gift-row input { font-size: 16px; letter-spacing: 1px; padding: 10px 8px; }
  .gift-reveal { flex-direction: column; gap: 10px; }
  .gr-card { flex: none; height: 170px; } .gr-box { font-size: 110px; }
}

/* ================= WEEKLY PACK EVENTS (Nate 2026-11-01): rain, slime, fire, snow, glitter, gold, meteors =================
   .ev-fx = a layer of little moving bits (evFx() in app.js). --k = size, --fall = how far they fall. Each event's own look below. */
.ev-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; --k: 1; --fall: 300px; }
.ev-fx i { position: absolute; left: var(--x); top: var(--y); font-style: normal; line-height: 1; animation: var(--d) var(--w) linear infinite; will-change: transform; }
.ev-big { position: absolute; z-index: 0; --k: 2.2; --fall: 118vh; opacity: .6; transition: opacity .5s; }
.ov.ev-hot .ev-big { opacity: .95; }
.ev-on-pack { --k: 1.3; --fall: 360px; z-index: 3; border-radius: 10px; }
.pack3d.torn .ev-on-pack, .pack3d.charging .ev-on-pack { transition: opacity .2s; } .pack3d.torn .ev-on-pack { opacity: 0; }
.ev-on-pal { --k: 1.1; --fall: 240px; z-index: 2; }
.pack-card.ev-card { box-shadow: inset 0 -8px rgba(0,0,0,.3), 0 0 0 3px var(--ec), 0 0 22px var(--ec); }
.pack-card.ev-card > .pc-emo, .pack-card.ev-card > .pc-name, .pack-card.ev-card > .pc-price, .pack-card.ev-card > .pc-owned { z-index: 2; }
.pack-card.ev-card .pc-name { text-shadow: 0 0 10px var(--ec), 0 3px 0 rgba(0,0,0,.4); }
.pc-flag.ev-flag { background: var(--ec); color: #111; box-shadow: 0 0 14px var(--ec); right: -34px; font-size: 10px; z-index: 3; }

.ev-tag { font-size: 13px; background: var(--ec); color: #111; padding: 2px 8px; border-radius: 8px; vertical-align: middle; box-shadow: 0 0 10px var(--ec); white-space: nowrap; }
.pm-head.ev-head { position: relative; overflow: hidden; box-shadow: inset 0 0 0 3px var(--ec), 0 0 18px var(--ec); }
.pm-head.ev-head > *:not(.ev-fx) { position: relative; z-index: 2; }
.boost-note.ev-pm-note, .ev-note { background: linear-gradient(90deg, var(--ec2), #1a1024); color: #fff; box-shadow: inset 0 0 0 2px var(--ec), 0 0 14px color-mix(in srgb, var(--ec) 50%, transparent); }
.boost-note.ev-pm-note { margin-bottom: 10px; }
.ev-note { margin: -4px 0 12px; padding: 8px 14px; border-radius: 12px; font-size: 14px; }
.ev-note b { color: var(--ec); } .ev-note .ev-timer { color: #ddd; }
/* this week's strip in the Market */
.ev-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: -2px 0 10px; }
.ev-day { background: rgba(0,0,0,.28); border-radius: 12px; padding: 6px 2px; text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.ev-day small { font-size: 10px; opacity: .8; font-family: 'Titan One'; letter-spacing: .5px; }
.ev-day span { font-size: 22px; line-height: 1.1; }
.ev-day b { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ev-day.past { opacity: .5; } .ev-day.soon { opacity: .75; }
.ev-day[style] { background: linear-gradient(160deg, var(--ec2), rgba(0,0,0,.35)); }
.ev-day.evd-hacked { background: linear-gradient(160deg, #0b3d1c, #020d06); color: #7dff9e; }
.ev-day.today { box-shadow: 0 0 0 3px #fff, 0 0 16px var(--ec, #00ff66); transform: translateY(-2px); opacity: 1; }
@media (max-width: 600px) { .ev-week { gap: 3px; } .ev-day span { font-size: 18px; } .ev-day b { font-size: 9px; } }
/* attribute badges and tags */
.at-tag { display: inline-block; padding: 1px 8px; border-radius: 9px; font-weight: 800; font-size: 13px; color: #111; background: var(--ac); box-shadow: 0 0 8px var(--ac); white-space: nowrap; }
.at-rain { --ac: #4fb3ff; } .at-slime { --ac: #7dff3a; } .at-fire { --ac: #ff7a1a; } .at-snow { --ac: #aee9ff; } .at-glitter { --ac: #ff8cf0; } .at-gold { --ac: #ffd23f; } .at-cosmic { --ac: #b48cff; }
.at-dot { position: absolute; top: -3px; left: -3px; background: #fff; border-radius: 10px; padding: 0 4px; font-size: 12px; font-family: 'Titan One'; color: #333; box-shadow: 0 0 0 2px var(--ac), 0 0 8px var(--ac); z-index: 2; }
.bi-attrs { margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: #f6eefa; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.bi-attr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .bi-attr span { flex: 1; font-size: 13px; } .bi-attrs small { font-size: 12px; }
.at-sum { color: var(--ac); font-weight: 800; }
.mc-attr { position: absolute; top: 4px; left: 4px; z-index: 3; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 8px; background: var(--ac); color: #111; box-shadow: 0 0 10px var(--ac); }
.ri-attr { position: absolute; left: 2px; top: 2px; font-style: normal; font-size: 16px; z-index: 2; filter: drop-shadow(0 0 4px var(--ac, #fff)); }
.at-banner { font-family: 'Titan One'; font-size: clamp(24px, 6vw, 40px); color: var(--ac); text-shadow: 0 0 18px var(--ac), 0 4px 0 rgba(0,0,0,.5); animation: atpop .7s cubic-bezier(.2, 1.6, .4, 1) backwards .3s; margin-bottom: 4px; }
.at-banner small { font-size: .5em; color: #fff; }
@keyframes atpop { from { transform: scale(0) rotate(-12deg); opacity: 0; } }
/* a Pal with an attribute looks the part (reveal, opening cards, results) */
.att { --ac: #fff; } .att.att-rain, .att .at-rain { --ac: #4fb3ff; }
.att-rain .blook { filter: saturate(1.1) brightness(1.05) drop-shadow(0 0 12px #4fb3ff) hue-rotate(-8deg); }
.att-slime .blook { filter: drop-shadow(0 0 12px #7dff3a) sepia(.25) hue-rotate(50deg) saturate(1.4); }
.att-fire .blook { filter: sepia(.55) saturate(1.6) brightness(.82) contrast(1.15) drop-shadow(0 0 14px #ff7a1a); }
.att-snow .blook { filter: saturate(.55) brightness(1.2) hue-rotate(160deg) drop-shadow(0 0 12px #aee9ff); }
.att-glitter .blook { filter: saturate(1.4) brightness(1.1) drop-shadow(0 0 12px #ff8cf0); }
.att-gold .blook { filter: sepia(1) saturate(3.2) hue-rotate(5deg) brightness(1.05) drop-shadow(0 0 14px #ffd23f); }
.att-cosmic .blook { filter: hue-rotate(230deg) saturate(1.5) drop-shadow(0 0 14px #b48cff); }
.face.front.att { border-color: var(--ac); box-shadow: 0 0 26px var(--ac), inset 0 0 18px color-mix(in srgb, var(--ac) 40%, transparent); }
.att-rain { --ac: #4fb3ff; } .att-slime { --ac: #7dff3a; } .att-fire { --ac: #ff7a1a; } .att-snow { --ac: #aee9ff; } .att-glitter { --ac: #ff8cf0; } .att-gold { --ac: #ffd23f; } .att-cosmic { --ac: #b48cff; }
.res-item.att { box-shadow: 0 0 0 2px var(--ac), 0 0 14px var(--ac); }
/* the opening screen */
.ov:where(.ev-ov) .ov-bg { background: radial-gradient(circle at 50% 45%, var(--c1) 0%, var(--ec2) 42%, #05030a 85%); }
.ev-ban { position: absolute; top: 3%; left: 50%; transform: translateX(-50%); z-index: 4; font-family: 'Titan One'; font-size: clamp(16px, 3.6vw, 28px); color: var(--ec); white-space: nowrap;
  text-shadow: 0 0 14px var(--ec), 0 3px 0 rgba(0,0,0,.5); padding: 4px 18px; border-radius: 20px; background: rgba(0,0,0,.35); animation: evban 1.6s ease-in-out infinite; pointer-events: none; }
.ov.closing .ev-ban { opacity: 0; }
@keyframes evban { 50% { transform: translateX(-50%) scale(1.06); } }
.pack3d.ev-pack { --glow: var(--ec, #fff); --gs: 22px; }
.pack3d.ev-pack .pk-sub { color: #fff; text-shadow: 0 0 10px var(--ec), 0 3px 0 rgba(0,0,0,.4); }
.ov.ev-ov .pack3d.ev-pack { --glow: var(--ec); }
/* --- rain: blue streaks, a wet shine */
.ev-rain i { top: -15%; width: calc(2px * var(--k)); height: calc(22px * var(--k) * var(--z)); background: linear-gradient(transparent, #fff); border-radius: 2px; box-shadow: 0 0 3px #4fb3ff;
  animation-name: evrain; animation-duration: calc(var(--d) * .45); }
@keyframes evrain { to { transform: translate(-12px, var(--fall)); } }
.pack-card.evc-rain { background: linear-gradient(180deg, rgba(10,40,90,.6), transparent 70%), linear-gradient(160deg, var(--c1), var(--c2)); }
.evp-rain .pk-body, .evp-rain .pk-top { background-image: linear-gradient(180deg, rgba(120,190,255,.35), transparent 50%, rgba(20,60,130,.4)), linear-gradient(160deg, var(--c1), var(--c2)); }
/* --- slime: green goo dripping from the top */
.ev-slime::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(10px * var(--k)); background: #6ee82c; border-radius: 0 0 50% 50% / 0 0 100% 100%; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.ev-slime i { top: 0; width: calc(9px * var(--k) * var(--z)); background: linear-gradient(#6ee82c, #9dff5c); border-radius: 0 0 50% 50% / 0 0 60% 60%; animation-name: evdrip; animation-duration: calc(var(--d) * 1.8); box-shadow: inset -2px 0 rgba(255,255,255,.5); }
@keyframes evdrip { 0% { height: 0; transform: none; } 55% { height: calc(30px * var(--k) * var(--z)); transform: none; } 70% { height: calc(34px * var(--k) * var(--z)); transform: none; } 100% { height: calc(34px * var(--k) * var(--z)); transform: translateY(var(--fall)); } }
.pack-card.evc-slime { background: linear-gradient(0deg, rgba(60,160,20,.45), transparent 60%), linear-gradient(160deg, var(--c1), var(--c2)); }
/* --- fire: flames along the bottom, embers, scorched edges */
.ev-fire i { top: auto; bottom: calc(-8px * var(--k)); font-size: calc(24px * var(--k) * var(--z)); animation-name: evflame; animation-duration: calc(var(--d) * .6); animation-timing-function: ease-in-out; transform-origin: 50% 100%; filter: drop-shadow(0 0 6px #ff7a1a); }
.ev-fire i:nth-child(3n) { bottom: auto; top: 100%; font-size: calc(9px * var(--k)); animation-name: evember; animation-duration: calc(var(--d) * 1.4); }
@keyframes evflame { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.85, 1.25) translateX(2px); } 60% { transform: scale(1.12, .85) translateX(-2px); } }
@keyframes evember { from { transform: translateY(0); opacity: 1; } to { transform: translate(14px, calc(var(--fall) * -1)); opacity: 0; } }
.pack-card.evc-fire { background: radial-gradient(ellipse at 50% 120%, rgba(255,90,0,.75), transparent 60%), linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 0 30px rgba(40,10,0,.8), 0 0 0 3px var(--ec), 0 0 22px var(--ec); }
.evp-fire .pk-body, .evp-fire .pk-top { background-image: radial-gradient(ellipse at 50% 120%, rgba(255,90,0,.55), transparent 60%), linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 0 40px rgba(30,8,0,.9); }
/* --- snow: drifting flakes and a frosty rim */
.ev-snow i { top: -10%; width: calc(5px * var(--k) * var(--z)); height: calc(5px * var(--k) * var(--z)); border-radius: 50%; background: #fff; box-shadow: 0 0 4px #fff; animation-name: evsnow; animation-duration: calc(var(--d) * 2.6); }
@keyframes evsnow { 25% { transform: translate(8px, calc(var(--fall) * .25)); } 50% { transform: translate(-6px, calc(var(--fall) * .5)); } 75% { transform: translate(7px, calc(var(--fall) * .75)); } 100% { transform: translate(0, var(--fall)); } }
.pack-card.evc-snow, .evp-snow .pk-body, .evp-snow .pk-top { box-shadow: inset 0 0 0 4px rgba(230,250,255,.85), inset 0 0 26px rgba(200,240,255,.9), 0 0 0 3px var(--ec), 0 0 22px var(--ec); }
.pack-card.evc-snow { background: linear-gradient(180deg, rgba(220,245,255,.35), transparent 60%), linear-gradient(160deg, var(--c1), var(--c2)); }
/* --- glitter: twinkling 4-point sparkles */
.ev-glitter i { width: calc(12px * var(--k) * var(--z)); height: calc(12px * var(--k) * var(--z)); background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation-name: evtwinkle; animation-duration: calc(var(--d) * .9); animation-timing-function: ease-in-out; }
.ev-glitter i:nth-child(3n) { background: #ff8cf0; } .ev-glitter i:nth-child(3n+1) { background: #ffe66b; }
@keyframes evtwinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }
.pack-card.evc-glitter { background: linear-gradient(135deg, rgba(255,140,240,.35), transparent 40%, rgba(255,230,107,.3)), linear-gradient(160deg, var(--c1), var(--c2)); }
/* --- gold: coins raining down, a gold sheen */
.ev-gold i { top: -15%; font-size: calc(16px * var(--k) * var(--z)); animation-name: evcoin; animation-duration: calc(var(--d) * 1.3); }
@keyframes evcoin { 0% { transform: translateY(0) rotateY(0); } 100% { transform: translateY(var(--fall)) rotateY(1080deg); } }
.pack-card.evc-gold .pc-shine, .evp-gold .pk-shine { background: linear-gradient(100deg, transparent, rgba(255,215,60,.75), transparent); }
.pack-card.evc-gold { background: linear-gradient(180deg, rgba(255,210,60,.35), transparent 60%), linear-gradient(160deg, var(--c1), var(--c2)); }
/* --- cosmic: meteors streaking across a starry sky */
.ev-cosmic { background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #e8d8ff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent), radial-gradient(1px 1px at 10% 85%, #fff, transparent); }
.ev-cosmic i { top: -10%; width: calc(46px * var(--k) * var(--z)); height: calc(2px * var(--k)); background: linear-gradient(90deg, #fff, #b48cff 40%, transparent); border-radius: 2px; box-shadow: 0 0 6px #b48cff;
  transform-origin: 0 50%; animation-name: evmeteor; animation-duration: calc(var(--d) * 1.5); animation-timing-function: ease-in; }
@keyframes evmeteor { 0% { transform: rotate(-45deg) translateX(0); opacity: 0; } 10% { opacity: 1; } 60%, 100% { transform: rotate(-45deg) translateX(calc(var(--fall) * -1.4)); opacity: 0; } }
.pack-card.evc-cosmic { background: radial-gradient(circle at 30% 20%, rgba(180,140,255,.45), transparent 55%), linear-gradient(160deg, var(--c1), #14093a); }
@media (prefers-reduced-motion: reduce) { .ev-fx i { animation-duration: 12s !important; } }

/* ---------- Merging / level-up Pals (Nate 2026-11-01) ---------- */
.lv-b { position: absolute; top: -4px; right: -4px; z-index: 2; font-family: 'Titan One'; font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 9px; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.lv-b.lv1 { background: none; border: 0; box-shadow: none; padding: 0; font-size: 12px; top: -2px; right: -2px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.lv-b.lv2 { background: linear-gradient(145deg, #9ad0ff, #4a7ad6); }
.lv-b.lv3 { background: linear-gradient(145deg, #ffe066, #f08a00); color: #5a2a00; }
.lvl-cell { background: linear-gradient(160deg, #eef6ff, #fff); }
.lvl-cell:has(.lv3) { background: linear-gradient(160deg, #fff4cc, #fff); }
.lvl-cell.lock { opacity: .7; }
.lv-tag { display: inline-block; font-family: 'Titan One'; font-size: 13px; padding: 2px 9px; border-radius: 8px; margin-left: 6px; color: #fff; background: linear-gradient(145deg, #9ad0ff, #4a7ad6); }
.lv-tag.lv3 { background: linear-gradient(145deg, #ffe066, #f08a00); color: #5a2a00; }
.bi-merge { width: 100%; box-sizing: border-box; background: linear-gradient(160deg, #f6efff, #eef6ff); border: 3px solid #d9c6f0; border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.mg-t { font-family: 'Titan One'; color: var(--purple); font-size: 17px; }
.mg-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mg-x { font-family: 'Titan One'; color: var(--purple-d); } .mg-arrow { font-size: 20px; color: var(--purple); }
.mg-to { display: flex; flex-direction: column; line-height: 1.2; } .mg-to small { color: var(--muted); }
.mg-bar { position: relative; height: 22px; border-radius: 11px; background: #e4dcef; overflow: hidden; }
.mg-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #b06bff, #ffb020); border-radius: 11px; transition: width .4s; }
.mg-bar span { position: relative; display: block; text-align: center; font-family: 'Titan One'; font-size: 13px; line-height: 22px; color: #3a1a4a; }
.mg-attr { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.mg-attr input { margin-top: 4px; width: 18px; height: 18px; flex: none; } .mg-attr small { display: block; color: var(--muted); }
.btn.lvup { background: linear-gradient(145deg, #b06bff, #7a2ad6); } .btn.lvup2 { background: linear-gradient(145deg, #ffb020, #e07a00); }
.mg-modal { text-align: center; overflow: hidden; }
.mg-show { position: relative; height: 230px; display: grid; place-items: center; }
.mg-show > * { grid-area: 1 / 1; }
.mg-rays { width: 260px; height: 260px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(176,107,255,.35) 0 12deg, transparent 12deg 30deg); animation: mgSpin 6s linear infinite, mgIn .6s .55s both; }
.mg-show.lv3 .mg-rays { background: repeating-conic-gradient(from 0deg, rgba(255,200,40,.55) 0 12deg, transparent 12deg 30deg); }
.mg-from { animation: mgShrink .7s ease-in both; }
.mg-new { animation: mgPop .7s .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.mg-new .blook { animation: float 3s 1.3s ease-in-out infinite; }
.mg-stars i { position: absolute; left: 50%; top: 50%; font-style: normal; font-size: 20px; animation: mgStar 1s calc(.6s + var(--d)) ease-out both; }
.mg-h { font-family: 'Titan One'; font-size: 34px; margin: 4px 0; background: linear-gradient(90deg, #b06bff, #ffb020); -webkit-background-clip: text; background-clip: text; color: transparent; animation: mgPop .6s .7s both; }
@keyframes mgSpin { to { transform: rotate(360deg); } }
@keyframes mgIn { from { opacity: 0; transform: scale(.3); } }
@keyframes mgShrink { 0% { transform: scale(1) rotate(0); } 60% { transform: scale(1.1) rotate(-20deg); filter: brightness(2); } 100% { transform: scale(0) rotate(360deg); opacity: 0; filter: brightness(4); } }
@keyframes mgPop { from { transform: scale(0); opacity: 0; } }
@keyframes mgStar { from { transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(.3); opacity: 1; } to { transform: translate(-50%, -50%) rotate(var(--a)) translateY(-130px) scale(1); opacity: 0; } }

/* the action-mode arrow pad on phones: pictures instead of arrow characters, so holding them can't select text */
.dpad, .dpad button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.dpad button { display: flex; align-items: center; justify-content: center; }
.dpad button::before { content: ''; width: 1em; height: 1em; background: currentColor; pointer-events: none; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
[data-ic=left] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 4L6 12l10 8z' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-ic=right] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4l10 8-10 8z' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-ic=up] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 16l8-10 8 10z' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-ic=down] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8l8 10 8-10z' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ===== 🔨 WORKSHOP (Nate 2026-11-05, workshop.js) ===== */
.ws-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; background: linear-gradient(135deg, #fff7e0, #ffe6c2); }
.ws-hero h2 { color: #a0520a; margin: 0 0 4px; } .ws-hero p { margin: 0 0 8px; }
.ws-hero .ws-builder { width: 200px; flex: none; }
.ws-stats { display: flex; flex-wrap: wrap; gap: 8px; } .ws-stats span { background: #fff; border-radius: 10px; padding: 4px 10px; font-size: 14px; }
.ws-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ws-merge h3, .ws-hack h3 { margin-top: 0; color: var(--purple); }
.ws-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; } .ws-tools input { padding: 8px 12px; border-radius: 10px; border: 2px solid #e3d6ea; font: inherit; }
.ws-list { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.ws-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: #f6f1f9; }
.ws-row.ready { background: linear-gradient(90deg, #f1e4ff, #fff1d6); box-shadow: inset 0 0 0 2px #c79aff; }
.ws-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; } .ws-mid b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-to { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); width: 64px; text-align: center; }
.ws-btns { display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 82px; text-align: center; font-size: 12px; }
/* the builder: the hammer arm swings, sparks fly when it lands */
.ws-arm { transform-origin: 72px 65px; }
.ws-builder.idle .ws-arm { animation: wsSwing 1.4s ease-in-out infinite; }
.ws-builder.idle .ws-sp { animation: wsSpark 1.4s ease-out infinite; }
.ws-builder.work .ws-arm { animation: wsSwing .45s ease-in-out 4; }
.ws-builder.hit .ws-sp { animation: wsSpark .45s ease-out; }
.ws-sp { fill: #ffd23f; opacity: 0; }
.ws-sp.s1 { --dx: -18px; --dy: -20px; } .ws-sp.s2 { --dx: 16px; --dy: -24px; } .ws-sp.s3 { --dx: 26px; --dy: -8px; } .ws-sp.s4 { --dx: -26px; --dy: -6px; } .ws-sp.s5 { --dx: 6px; --dy: -30px; } .ws-sp.s6 { --dx: -8px; --dy: -28px; } .ws-sp.s0 { --dx: 20px; --dy: -14px; }
@keyframes wsSwing { 0%, 100% { transform: rotate(-55deg); } 45% { transform: rotate(-60deg); } 62% { transform: rotate(18deg); } 70% { transform: rotate(12deg); } }
@keyframes wsSpark { 0%, 58% { opacity: 0; transform: none; } 62% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 10px), var(--dy, -20px)); } }
/* 💻 shards, the workbench and chips */
.ws-hack { background: linear-gradient(160deg, #04160a, #0b3d1c); color: #b6ffcf; box-shadow: inset 0 0 0 2px #00ff66; }
.ws-hack h3, .ws-hack h4 { color: #39ff14 !important; font-family: 'Courier New', monospace; text-shadow: 0 0 8px #00ff66; } .ws-hack h4 { margin: 14px 0 6px; }
.ws-shards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ws-shard { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 14px; border: 2px solid #00c24e; background: rgba(0,255,102,.07); color: #b6ffcf; font: inherit; font-size: 12px; cursor: pointer; }
.ws-shard:not(:disabled):hover { background: rgba(0,255,102,.18); transform: translateY(-2px); } .ws-shard:disabled { cursor: default; opacity: .75; } .ws-shard.none { opacity: .4; }
.ws-shard em { font-style: normal; font-size: 10.5px; line-height: 1.25; color: #7fd99a; } .ws-shard em.black { color: #39ff14; }
.ws-shard .secret-q { width: 54px; height: 54px; font-size: 30px; }
.ba-chip { display: inline-block; padding: 1px 8px; border-radius: 9px; font-weight: 800; font-size: 13px; color: #111; background: var(--ac, #ddd); box-shadow: 0 0 6px var(--ac, transparent); white-space: nowrap; margin: 2px; }
.ba-chip.ba-hk { --ac: #00ff66; background: #062612; color: #39ff14; font-family: 'Courier New', monospace; box-shadow: inset 0 0 0 1.5px #00ff66; }
.ws-benchbox { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.ws-slots { display: flex; align-items: center; gap: 6px; }
.ws-slot { width: 62px; height: 62px; border-radius: 14px; border: 2px dashed #00c24e; display: grid; place-items: center; color: #2c7a45; font-family: 'Courier New', monospace; background: none; padding: 0; }
.ws-slot.full { border-style: solid; cursor: pointer; box-shadow: 0 0 12px #00ff66; background: rgba(0,255,102,.1); }
.ws-plus { color: #39ff14; font-weight: 800; } .ws-prev { font-size: 12.5px; }
.btn.hk-go { background: linear-gradient(145deg, #00c24e, #0b6a2c); } .btn.hk-go:disabled { filter: grayscale(.7); opacity: .6; }
.ws-chips { display: flex; flex-direction: column; gap: 6px; }
.ws-chiprow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(0,255,102,.08); text-align: left; }
.ws-chiprow > div { flex: 1; min-width: 0; } .ws-chiprow small { display: block; font-size: 11.5px; color: #7fd99a; }
.ws-chip { flex: none; filter: drop-shadow(0 0 6px #00ff66); }
.ws-pickhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ws-pick { display: flex; flex-wrap: wrap; gap: 8px; max-height: 55vh; overflow-y: auto; margin-top: 10px; }
.ws-pick .bcell { background: #f6f1f9; display: flex; flex-direction: column; align-items: center; width: 92px; font: inherit; }
.ws-pick .bcell small { font-size: 11px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wp-q { width: 100%; padding: 8px 12px; border-radius: 10px; border: 2px solid #e3d6ea; font: inherit; box-sizing: border-box; }
.hk-b { background: #062612 !important; }
.ws-link { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 16px; }
.btn.ws-go { width: 100%; display: flex; flex-direction: column; } .btn.ws-go small { font-family: 'Nunito'; font-size: 12px; opacity: .9; }
/* the merge / forge animation: builder on the left hammers the pile, then the new thing pops out */
.ws-fx { position: relative; height: 240px; display: grid; place-items: center; }
.ws-fx > * { grid-area: 1 / 1; }
.ws-stage { position: relative; width: 264px; height: 180px; align-self: end; z-index: 2; animation: wsLeave .4s 1.6s ease-in both; }
.ws-stage .ws-builder { position: absolute; left: 0; bottom: 0; width: 264px; }
.ws-pile { position: absolute; left: 140px; bottom: 60px; width: 100px; height: 64px; transform-origin: 50% 100%; animation: wsShake .15s .45s 7 linear, mgShrink .45s 1.4s ease-in both; }
.ws-pile span { position: absolute; left: calc(var(--i) * 24px); bottom: calc(var(--i) % 2 * 14px); }
.ws-pile.shards span { animation: wsJoin .45s calc(var(--i) * .08s) ease-out both; }
.ws-flash { width: 100%; height: 100%; background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0) 60%); opacity: 0; animation: wsFlash .6s 1.55s ease-out both; pointer-events: none; z-index: 3; }
.ws-fx .mg-rays, .ws-fx .mg-stars i { animation-delay: 1.7s; }
.ws-fx .mg-rays { animation: mgSpin 6s linear infinite, mgIn .6s 1.7s both; }
.ws-fx .mg-stars i { animation: mgStar 1s calc(1.8s + var(--d)) ease-out both; }
.ws-fx.hk .mg-rays { background: repeating-conic-gradient(from 0deg, rgba(0,255,102,.35) 0 12deg, transparent 12deg 30deg); }
.ws-newpal { animation: mgPop .7s 1.7s cubic-bezier(.2, 1.6, .4, 1) both; z-index: 4; }
.ws-after { animation: mgPop .5s 1.9s both; }
.mg-h.hk { background: none !important; color: #39ff14 !important; -webkit-text-fill-color: #39ff14; text-shadow: 0 0 12px #00ff66; font-family: 'Courier New', monospace; }
@keyframes wsShake { 0%, 100% { transform: translateX(0); } 25% { transform: translate(-3px, 1px) rotate(-2deg); } 75% { transform: translate(3px, -1px) rotate(2deg); } }
@keyframes wsJoin { from { transform: translate(calc((var(--i) - 1) * 90px), -80px) rotate(40deg); opacity: 0; } }
@keyframes wsFlash { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes wsLeave { to { opacity: 0; transform: translateX(-60px); } }
/* hacking a Pal: chip flies in, the Pal glitches in green code and comes out a little green */
.hkm { background: #04160a; color: #b6ffcf; } .hkm .muted { color: #7fd99a; }
.ws-hackfx { position: relative; height: 240px; display: grid; place-items: center; border-radius: 16px; overflow: hidden; }
.ws-hackfx > * { grid-area: 1 / 1; }
.ws-rain { width: 100%; height: 100%; opacity: .55; }
.ws-hpal { animation: wsGlitch .12s .9s steps(2) 6, wsOut .2s 1.6s both; z-index: 2; }
.ws-hpal.after { animation: mgPop .5s 1.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.ws-hchip { z-index: 3; animation: wsChipIn .9s ease-in both; }
@keyframes wsChipIn { from { transform: translateY(150px) scale(.6) rotate(-30deg); opacity: 0; } 30% { opacity: 1; } 85% { transform: translateY(0) scale(.8); opacity: 1; } to { transform: scale(.1); opacity: 0; } }
@keyframes wsGlitch { 0% { transform: translate(-4px, 1px); filter: drop-shadow(3px 0 0 #00ff66) drop-shadow(-3px 0 0 #ff00aa); } 100% { transform: translate(4px, -1px); filter: drop-shadow(-3px 0 0 #00ff66) drop-shadow(3px 0 0 #00e5ff); } }
@keyframes wsOut { to { opacity: 0; transform: scale(1.1); } }
/* a Pal with a Hacker Chip on it is slightly green ("slight discoloration", Nate) with a faint green glow. Not animated */
.blook.hk-tint .bimg { filter: sepia(.35) hue-rotate(70deg) saturate(1.35); }
.blook.hk-tint::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; box-shadow: 0 0 14px 3px rgba(0,255,102,.45); pointer-events: none; }
/* the Pals info panel: attributes as Name-count chips; the panel scrolls on its own, separately from the Pal grid */
.bi-alist { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.page-blooks .blook-info { max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 900px) {
  .ws-cols { grid-template-columns: 1fr; } .ws-hero { flex-direction: column; text-align: center; } .ws-hero .ws-builder { width: 150px; } .ws-stats { justify-content: center; }
  .ws-list { max-height: none; } .page-blooks .blook-info { max-height: 55dvh; }
}
@media (max-width: 520px) { .ws-row { flex-wrap: wrap; } .ws-btns { flex-direction: row; width: 100%; } .ws-btns .btn { flex: 1; } .ws-shards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =====================================================================
   ✨ PACK MAKEOVER (Nate 2026-11-06: "make the packs look really good for the openings and shops")
   The pack is a foil booster bag (packArt() in app.js, class .foil): zigzag crimped ends, puffy sides, a brushed-foil
   texture, a spotlight, slow light rays, a glowing badge with the pack's icon, its two rarest Pals peeking out, the name
   on a ribbon, rarity gems and a holographic sheen. The shop card shows the same pack, smaller (.pc-pack), on a dark stage.
   Only transform / opacity are animated (cheap for the graphics chip, many cards at once).
   ===================================================================== */
.pack3d.foil .pk-top { -webkit-mask: conic-gradient(from 135deg at 50% 0, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 12px 7px repeat-x, linear-gradient(#000 0 0) 0 6.5px / 100% 100% no-repeat;
  mask: conic-gradient(from 135deg at 50% 0, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 12px 7px repeat-x, linear-gradient(#000 0 0) 0 6.5px / 100% 100% no-repeat; border-radius: 6px 6px 0 0; }
.pack3d.foil .pk-body { -webkit-mask: conic-gradient(from -45deg at 50% 100%, #0000, #000 1deg 89deg, #0000 90deg) 0 100% / 12px 7px repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 6.5px) no-repeat;
  mask: conic-gradient(from -45deg at 50% 100%, #0000, #000 1deg 89deg, #0000 90deg) 0 100% / 12px 7px repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 6.5px) no-repeat;
  border-radius: 0 0 6px 6px; justify-content: flex-start; padding-top: 10px; }
/* brushed foil + a spotlight on the badge, and darker puffy sides like a real sealed bag */
.pack3d.foil .pk-top::before, .pack3d.foil .pk-body::before { background: radial-gradient(ellipse 75% 45% at 50% 34%, rgba(255,255,255,.34), transparent 70%) 0 0 / 100% 330px no-repeat,
  repeating-linear-gradient(100deg, rgba(255,255,255,.07) 0 1px, transparent 1px 4px); z-index: 0; }
.pack3d.foil .pk-body::before { background-position: 0 -64px, 0 0; }
.pack3d.foil .pk-top::after, .pack3d.foil .pk-body::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(90deg, rgba(0,0,0,.34), rgba(0,0,0,0) 11%, rgba(255,255,255,.12) 16%, rgba(255,255,255,0) 24%, rgba(255,255,255,0) 76%, rgba(0,0,0,.08) 86%, rgba(0,0,0,.4)); }
.pack3d.foil .crimp { height: 20px; top: 4px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.3) 0 2px, rgba(0,0,0,.14) 2px 5px); box-shadow: 0 2px 0 rgba(0,0,0,.18), 0 -1px 0 rgba(255,255,255,.25) inset; z-index: 1; }
.pack3d.foil .crimp.b { top: auto; bottom: 4px; box-shadow: 0 -2px 0 rgba(0,0,0,.18); }
.pack3d.foil .tear-line { z-index: 1; bottom: 6px; border-bottom: 2px dashed rgba(255,255,255,.7); }
.pk-logo { position: absolute; left: 50%; top: 29px; transform: translateX(-50%); z-index: 2; font-family: 'Titan One'; font-size: 12px; letter-spacing: 3px; color: var(--c2);
  background: #fff; padding: 2px 10px 1px 13px; border-radius: 9px; box-shadow: 0 2px 0 rgba(0,0,0,.25); white-space: nowrap; }
/* slow light rays behind the badge */
.pk-rays { position: absolute; left: 50%; top: 82px; width: 420px; height: 420px; margin: -210px 0 0 -210px; z-index: 0; opacity: .3; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.75) 0 7deg, transparent 7deg 22deg); -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%);
  animation: pkrays 22s linear infinite; }
@keyframes pkrays { to { transform: rotate(360deg); } }
.pack3d.foil { color: #fff; text-align: center; }
.pk-hero { position: relative; z-index: 2; width: 100%; height: 138px; display: flex; align-items: center; justify-content: center; }
.pk-badge { position: relative; z-index: 2; width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 38% 30%, #fff, rgba(255,255,255,.82) 38%, rgba(255,255,255,.35) 72%, rgba(255,255,255,.15));
  box-shadow: 0 0 0 4px rgba(255,255,255,.95), 0 0 0 8px var(--c2), 0 7px 0 8px rgba(0,0,0,.18), 0 0 26px 6px rgba(255,255,255,.35); }
.pack3d.foil .pk-emo { font-size: 62px; line-height: 1; filter: none; text-shadow: none; }
.pack3d.foil .pk-emo .emo { filter: drop-shadow(0 4px 0 rgba(0,0,0,.22)); }
.pk-peek { position: absolute; z-index: 1; bottom: 14px; width: 88px; height: 88px; object-fit: contain; filter: drop-shadow(0 0 7px var(--rc)) drop-shadow(0 4px 0 rgba(0,0,0,.25)); pointer-events: none; }
.pk-peek.l { left: -4px; transform: rotate(-18deg); } .pk-peek.r { right: -4px; transform: rotate(18deg); }
.pk-ribbon { position: relative; z-index: 2; width: 86%; margin-top: 4px; background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(0,0,0,.18)), var(--c2);
  border-radius: 6px; box-shadow: 0 4px 0 rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.55); }
.pk-ribbon::before, .pk-ribbon::after { content: ''; position: absolute; top: 9px; width: 16px; height: 100%; background: var(--c2); filter: brightness(.7); z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.pk-ribbon::before { left: -11px; } .pk-ribbon::after { right: -11px; transform: scaleX(-1); }
.pack3d.foil .pk-name { color: #fff; line-height: 1.12; padding: 5px 6px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 3px 0 rgba(0,0,0,.32), 0 0 10px rgba(0,0,0,.2); }
.pack3d.foil .pk-sub { z-index: 2; margin: 9px 0 6px; font-size: 11px; letter-spacing: 5px; opacity: .95; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.pk-gems { position: relative; z-index: 2; display: flex; gap: 6px; justify-content: center; }
.pk-gems i { width: 11px; height: 11px; transform: rotate(45deg); border-radius: 2px; background: linear-gradient(135deg, #fff, var(--g) 45%); box-shadow: 0 0 0 1.5px rgba(0,0,0,.35), 0 0 7px var(--g); }
/* the holographic sheen: a rainbow band that drifts across (transform only) */
.pk-holo { position: absolute; top: 0; bottom: 0; left: -100%; width: 300%; z-index: 3; pointer-events: none; opacity: .55;
  background: linear-gradient(115deg, transparent 30%, rgba(255,80,220,.22) 40%, rgba(80,240,255,.24) 46%, rgba(255,250,120,.22) 52%, rgba(120,255,160,.18) 57%, transparent 66%);
  animation: pkholo 5.5s ease-in-out infinite alternate; }
@keyframes pkholo { from { transform: translateX(-18%); } to { transform: translateX(18%); } }
.pack3d.foil .pk-shine { z-index: 4; }
.pack3d.foil.ghost .pk-rays, .pack3d.foil.ghost .pk-holo { display: none; }
.pack3d.hacked.foil .pk-logo { color: #021a0a; background: #39ff14; }
.pack3d.hacked.foil .pk-ribbon, .pack3d.hacked.foil .pk-ribbon::before, .pack3d.hacked.foil .pk-ribbon::after { background: #063d18; }
.pack3d.hacked.foil .pk-badge { background: radial-gradient(circle, #0b3d1c, #020d06); box-shadow: 0 0 0 4px #39ff14, 0 0 0 8px #063d18, 0 0 30px 8px rgba(0,255,102,.5); }
.pack3d.hacked.foil .pk-rays { background: repeating-conic-gradient(rgba(0,255,102,.8) 0 7deg, transparent 7deg 22deg); }

/* ---- the shop card: the same pack on a dark spotlit stage ---- */
.pack-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.pack-card { height: 336px; padding: 0 8px; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(ellipse 80% 55% at 50% 38%, color-mix(in srgb, var(--c1) 55%, transparent), transparent 75%), linear-gradient(170deg, color-mix(in srgb, var(--c1) 45%, #170d2c), color-mix(in srgb, var(--c2) 40%, #0b0618));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c1) 60%, #fff 10%), inset 0 -6px rgba(0,0,0,.3), 0 8px 18px rgba(0,0,0,.3); transition: transform .25s, box-shadow .25s; }
.pack-card::before { background: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.6px) 0 0 / 18px 18px; opacity: .7; }
.pack-card:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c1) 70%, #fff 25%), inset 0 -6px rgba(0,0,0,.3), 0 14px 28px rgba(0,0,0,.4), 0 0 26px color-mix(in srgb, var(--c1) 70%, transparent); }
.pc-stage { position: relative; width: 100%; height: 222px; flex: none; }
.pc-spot { position: absolute; left: 12%; right: 12%; bottom: 6px; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); }
.pc-pack { position: absolute; left: 50%; top: 50%; width: 230px; height: 330px; transform: translate(-50%, -52%) scale(var(--k, .62)); pointer-events: none; }
.pc-pack .pack3d { animation: none; transform: rotate(-4deg); transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); --gs: 10px; }
.pc-pack .pk-rays, .pc-pack .pk-holo { animation: none; }
.pc-pack .pk-holo { opacity: 0; transition: opacity .3s; }
.pack-card:hover .pc-pack .pack3d { transform: translateY(-12px) rotate(3deg) scale(1.05); }
.pack-card:hover .pc-pack .pk-holo { opacity: .6; animation: pkholo 1.6s ease-in-out infinite alternate; }
.pack-card .pc-name { position: relative; z-index: 2; font-size: 18px; line-height: 1.15; margin-top: 2px; max-width: 100%; }
.pc-bar { position: relative; z-index: 2; width: 72%; height: 7px; margin: 7px auto 0; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
.pc-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ffe46b, #7dff9a); }
.pack-card .pc-price { margin-top: 9px; z-index: 2; }
.pack-card .pc-owned { z-index: 4; }
.pack-card.hacked .pc-stage, .pack-card.ev-card .pc-stage { z-index: 2; }
@media (max-width: 700px) {
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-card { height: 262px; } .pc-stage { height: 162px; } .pc-pack { --k: .46; }
  .pack-card .pc-name { font-size: 15px; } .pc-bar { margin-top: 5px; }
}
@media (hover: none) { .pack-card:hover .pc-pack .pack3d { transform: rotate(-4deg); } .pack-card:hover .pc-pack .pk-holo { opacity: 0; animation: none; } }
@media (prefers-reduced-motion: reduce) { .pk-rays, .pk-holo { animation: none !important; } }
/* the pack's pop-up window shows the pack too */
.pm-emo.pm-pack { position: relative; flex: none; width: 84px; height: 116px; font-size: 0; }
.pm-pack .pc-pack { --k: .35; transform: translate(-50%, -50%) scale(var(--k)); }
.pm-pack .pack3d { transform: rotate(-6deg); --gs: 8px; }
@media (max-width: 700px) { .pm-emo.pm-pack { width: 66px; height: 92px; } .pm-pack .pc-pack { --k: .28; } }
/* the face-down cards after an opening: foil card backs to match the pack (a framed border, the pack's badge, a ? tag) */
.face.back { overflow: hidden; color: #fff;
  background: radial-gradient(ellipse 80% 55% at 50% 40%, rgba(255,255,255,.3), transparent 70%), repeating-linear-gradient(100deg, rgba(255,255,255,.07) 0 1px, transparent 1px 4px), linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: inset 0 -6px rgba(0,0,0,.28), 0 0 0 3px rgba(255,255,255,.85), 0 6px 14px rgba(0,0,0,.35); }
.face.back::before { content: ''; position: absolute; inset: 7px; border-radius: 11px; border: 2px solid rgba(255,255,255,.55); box-shadow: inset 0 0 0 3px rgba(0,0,0,.08); pointer-events: none; }
.face.back::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-18deg); pointer-events: none; }
.mcard:hover:not(.flipped) .face.back::after { animation: cbshine .9s ease-out; }
@keyframes cbshine { to { transform: translateX(380%) skewX(-18deg); } }
.face.back span { position: relative; font-size: .78em; width: 1.75em; height: 1.75em; display: grid; place-items: center; border-radius: 50%; line-height: 1;
  background: radial-gradient(circle at 38% 30%, #fff, rgba(255,255,255,.8) 40%, rgba(255,255,255,.3)); box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 6px var(--c2), 0 5px 0 6px rgba(0,0,0,.16); }
.face.back em { position: relative; margin-top: 8px; font-size: 18px; line-height: 1; padding: 3px 12px 4px; border-radius: 10px; background: var(--c2); opacity: 1; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), 0 3px 0 rgba(0,0,0,.25); text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.multi-grid.small .face.back em { font-size: 13px; margin-top: 5px; padding: 2px 9px 3px; }
.multi-grid.small .face.back span { font-size: .95em; }

/* 🎮 Professional players trade Pals only (Nate 2026-11-07, friends.js) */
.tr-pals { margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: rgba(255, 196, 0, .14); color: inherit; font-size: 13px; font-weight: 700; }

/* ================= 🧠 MIND MATCH GAMES MAKEOVER (Nate 2026-11-08: "as high quality as the other games in the portal") ================= */
/* the background behind every game: soft coloured glows (gradients, no blur filter, so it stays smooth and cheap) + a gentle
   drifting dot grid and two slow light beams, instead of the old checkerboard */
.gx-blob { filter: none; opacity: .55; background: radial-gradient(circle, color-mix(in srgb, var(--m1) 70%, transparent) 0, transparent 66%); }
.gx-blob.b2 { opacity: .35; background: radial-gradient(circle, color-mix(in srgb, var(--m1) 45%, #fff) 0, transparent 62%); }
.gx-bg::after { background-image: radial-gradient(rgba(255,255,255,.10) 1.3px, transparent 1.8px); background-size: 30px 30px; background-position: 0 0; animation: gxDots 40s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%); }
@keyframes gxDots { to { background-position: 300px 300px; } }
.gx-bg::before { content: ''; position: absolute; inset: -30%; background: conic-gradient(from 200deg at 50% -10%, transparent 0 8%, rgba(255,255,255,.06) 10%, transparent 13% 20%, rgba(255,255,255,.05) 22%, transparent 25%); animation: gxBeams 26s ease-in-out infinite alternate; }
@keyframes gxBeams { to { transform: rotate(8deg); } }
.gx-floaters span { opacity: .12; }
@media (prefers-reduced-motion: reduce) { .gx-bg::after, .gx-bg::before { animation: none; } }
/* 💻 Cyber Hack: a hacker terminal on a dark screen with falling code */
.g-crypto .gx-bg { background: radial-gradient(ellipse at 50% 0%, #0f3b22, #02100a 70%); }
.g-crypto .gx-bg::after { background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 4px); background-size: auto; animation: none; }
.g-crypto .gx-blob, .g-crypto .gx-floaters { display: none; }
.g-crypto .gx-bg::before { content: ''; position: absolute; inset: -200px 0 0; opacity: .22; animation: hkRain 14s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='200'%3E%3Cg font-family='monospace' font-size='16' fill='%233ee87f'%3E%3Ctext x='8' y='20'%3E1%3C/text%3E%3Ctext x='8' y='40'%3E0%3C/text%3E%3Ctext x='8' y='60'%3E1%3C/text%3E%3Ctext x='48' y='110'%3Ea%3C/text%3E%3Ctext x='48' y='130'%3E7%3C/text%3E%3Ctext x='48' y='150'%3Ef%3C/text%3E%3Ctext x='98' y='40'%3E0%3C/text%3E%3Ctext x='98' y='60'%3E0%3C/text%3E%3Ctext x='148' y='150'%3E%E2%82%BF%3C/text%3E%3Ctext x='148' y='170'%3E1%3C/text%3E%3Ctext x='198' y='70'%3E9%3C/text%3E%3Ctext x='198' y='90'%3Ec%3C/text%3E%3Ctext x='198' y='110'%3E3%3C/text%3E%3C/g%3E%3C/svg%3E"); }
@keyframes hkRain { to { transform: translateY(200px); } }
.hk { width: min(760px, 100%); border-radius: 14px; overflow: hidden; background: rgba(2,14,8,.92); border: 2px solid #3ee87f; box-shadow: 0 0 0 4px rgba(62,232,127,.12), 0 0 40px rgba(62,232,127,.25), 0 20px 50px rgba(0,0,0,.5); font-family: 'Courier New', ui-monospace, monospace; color: #b8ffd2; animation: hkIn .35s cubic-bezier(.2,1.3,.5,1); }
@keyframes hkIn { from { transform: scale(.94); opacity: 0; } }
.hk-bar { display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: #0c2a18; border-bottom: 1px solid rgba(62,232,127,.4); }
.hk-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .hk-bar i:nth-child(2) { background: #febc2e; } .hk-bar i:nth-child(3) { background: #28c840; }
.hk-bar span { margin-left: 8px; font-size: 13px; color: #6fe39a; letter-spacing: .05em; }
.hk-body { padding: clamp(16px, 3vw, 28px); text-align: center; }
.hk-line { font-size: clamp(16px, 2.3vw, 21px); font-weight: 700; color: #3ee87f; text-shadow: 0 0 10px rgba(62,232,127,.6); margin: 0 0 6px; }
.hk-dim { color: #7fbf98; margin: 0 0 6px; font-size: 14px; }
.hk-cur { animation: hkBlink 1s steps(1) infinite; } @keyframes hkBlink { 50% { opacity: 0; } }
.hk .pw { position: relative; background: #082816; box-shadow: 0 4px 0 #04150b, 0 0 14px rgba(62,232,127,.2); min-width: 150px; }
.hk .pw:disabled { cursor: default; } .hk .pw.ok { box-shadow: 0 0 30px rgba(62,232,127,.8); } .hk .pw.no { background: #2a0a0a; }
.hk .pw .key, .hk-file .key { position: absolute; top: 4px; left: 6px; font-size: 11px; opacity: .6; font-style: normal; }
.hk-msg { min-height: 28px; margin: 14px 0 0; font-size: 24px; font-weight: 900; letter-spacing: .12em; }
.hk-msg.ok { color: #3ee87f; text-shadow: 0 0 16px #3ee87f; animation: hkFlash .5s 2; } .hk-msg.no { color: #ff5a5a; text-shadow: 0 0 16px #ff5a5a; animation: quakesm .3s; }
@keyframes hkFlash { 50% { opacity: .3; } }
.hk-target { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px 16px; border-radius: 12px; background: rgba(62,232,127,.08); border: 1px dashed rgba(62,232,127,.5); text-align: left; }
.hk-target b { display: block; color: #fff; font-size: 18px; } .hk-target small { color: #6fe39a; }
.hk-files { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hk-file { position: relative; width: clamp(140px, 22vw, 190px); height: 170px; border-radius: 14px; border: 2px solid #3ee87f; background: linear-gradient(180deg, #0b3220, #051a0f); color: #3ee87f; cursor: pointer; overflow: hidden; font-family: inherit; transition: transform .15s, box-shadow .15s; box-shadow: 0 5px 0 #03140a; }
.hk-file:hover:not(:disabled) { transform: translateY(-4px); box-shadow: 0 9px 0 #03140a, 0 0 28px rgba(62,232,127,.5); }
.hk-lock { font-size: 44px; display: block; margin-top: 22px; transition: transform .4s, opacity .4s; }
.hk-code { display: block; font-size: 12px; line-height: 1.35; opacity: .5; margin-top: 10px; }
.hk-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #3ee87f; color: #03140a; clip-path: inset(0 0 100% 0); transition: clip-path .7s steps(10); }
.hk-in i { font-size: 46px; font-style: normal; } .hk-in b { font-size: 26px; } .hk-in small { font-size: 12px; font-weight: 700; }
.hk-file.open .hk-in, .hk-file.peek .hk-in { clip-path: inset(0 0 0 0); } .hk-file.peek { opacity: .45; transform: scale(.92); } .hk-file.open { box-shadow: 0 0 40px rgba(62,232,127,.8); }
.hk-file.open .hk-lock { transform: scale(1.6); opacity: 0; }
.hk-q { font-family: 'Courier New', monospace; font-size: 15px; color: #3ee87f; background: rgba(2,14,8,.8); border: 1px solid rgba(62,232,127,.5); border-radius: 10px; padding: 4px 12px; text-shadow: none; }
.hk-q b { color: #fff; }
@media (prefers-reduced-motion: reduce) { .g-crypto .gx-bg::before { animation: none; } .hk-in { transition: none; } }
.cv-btns { left: auto; right: 14px; transform: none; flex-direction: column; align-items: flex-end; } /* the game's own buttons in the bottom-right corner (the arrow pad is bottom-left on phones), off the action */
/* 💰 Gold Quest / 🍬 Candy Quest / ☘️ Shamrock Quest: drawn chests (goldBox() in games.js) whose lid pops off with light rays behind */
.chest-wrap .chest { position: relative; width: clamp(150px, 24vw, 210px); height: clamp(170px, 26vw, 230px); padding: 0; border: 0; border-radius: 26px; color: inherit; font: inherit;
  background: radial-gradient(ellipse at 50% 85%, rgba(255,255,255,.22), rgba(255,255,255,.06) 60%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), 0 12px 30px rgba(0,0,0,.25); overflow: visible; }
.chest-wrap .chest .key { position: absolute; top: 8px; left: 10px; font-style: normal; font-size: 12px; opacity: .7; }
.chest-wrap .chest-lid { font-size: 0; display: block; width: 82%; margin: 14% auto 0; }
.chest-wrap .chest.open .chest-lid { display: block; }
.gb { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 6px 0 rgba(0,0,0,.18)); }
.gb-lid { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.2,1.5,.5,1), opacity .5s; }
.chest:hover:not(.open) .gb { animation: wiggle 1s infinite; }
.chest.open .gb-lid { transform: translateY(-46px) rotate(-22deg); opacity: 0; }
.gb-rays { position: absolute; left: 50%; top: 40%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,236,150,.55) 0 10deg, transparent 10deg 24deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); transition: opacity .4s; }
.chest.picked .gb-rays { opacity: 1; animation: gbSpin 6s linear infinite; }
@keyframes gbSpin { to { transform: rotate(360deg); } }
.chest-wrap .chest-res { position: absolute; left: 0; right: 0; top: 6%; z-index: 2; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.chest-wrap .chest.picked { background: radial-gradient(ellipse at 50% 70%, #fff8d0, #fff 70%); color: var(--text); box-shadow: 0 0 0 4px var(--gold), 0 0 50px var(--gold); transform: scale(1.08); }
.chest-wrap .chest.picked .chest-res { text-shadow: none; }
.chest-wrap .chest.dim { opacity: .5; transform: scale(.94); }
@media (prefers-reduced-motion: reduce) { .chest.picked .gb-rays { animation: none; } }
/* 🎣 Fishing Frenzy: a sunny lake with a dock (your Pal fishing from it), clouds, hills, light rays, seaweed and bubbles */
.pond { background: linear-gradient(#7fd3ff 0, #c9efff 40%, #2a8ad8 40%, #0f4a8f 100%); }
.pd-sun { position: absolute; right: 12%; top: 14%; width: 56px; height: 56px; border-radius: 50%; background: #fff3a0; box-shadow: 0 0 0 10px rgba(255,243,160,.35), 0 0 60px #ffe14d; }
.pd-cloud { position: absolute; left: 30%; top: 16%; width: 110px; height: 30px; border-radius: 30px; background: #fff; opacity: .9; animation: pdCloud 40s linear infinite; }
.pd-cloud::before, .pd-cloud::after { content: ''; position: absolute; border-radius: 50%; background: #fff; width: 46px; height: 46px; left: 18px; top: -22px; } .pd-cloud::after { width: 34px; height: 34px; left: 56px; top: -14px; }
.pd-cloud.c2 { left: 70%; top: 26%; transform: scale(.7); animation-duration: 55s; animation-delay: -20s; }
@keyframes pdCloud { from { translate: -60vw 0; } to { translate: 60vw 0; } }
.pd-hills { position: absolute; left: -5%; right: -5%; bottom: 0; height: 34%; background: radial-gradient(ellipse at 20% 100%, #5cb85c 0 45%, transparent 46%), radial-gradient(ellipse at 70% 100%, #4aa84a 0 50%, transparent 51%), radial-gradient(ellipse at 100% 100%, #66c266 0 40%, transparent 41%); }
.pd-dock { position: absolute; left: 0; bottom: -6px; width: 34%; height: 46px; z-index: 2; background: repeating-linear-gradient(90deg, #a8703a 0 26px, #8a5a2c 26px 28px); border-radius: 0 6px 0 0; box-shadow: 0 6px 0 #6a4220; }
.pd-dock .blook { position: absolute; right: 18%; bottom: 38px; width: 64px; height: 64px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.2)); }
.pond .rod { left: auto; right: auto; left: 22%; top: auto; bottom: 18px; font-size: 64px; z-index: 3; transform: scaleX(-1) rotate(-10deg); }
.pond .bobber { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(#ff4b4b 50%, #fff 50%); box-shadow: 0 0 0 2px #222; }
.pd-rays { position: absolute; inset: 0; background: repeating-linear-gradient(105deg, rgba(255,255,255,.08) 0 30px, transparent 30px 90px); -webkit-mask: linear-gradient(#000, transparent 80%); mask: linear-gradient(#000, transparent 80%); }
.pd-weed { position: absolute; bottom: -10px; left: 12%; width: 14px; height: 90px; border-radius: 10px 10px 0 0; background: #2f9a5a; transform-origin: bottom; animation: pdSway 3s ease-in-out infinite alternate; }
.pd-weed.w2 { left: 64%; height: 120px; background: #3aae68; animation-delay: -1s; } .pd-weed.w3 { left: 86%; height: 70px; animation-delay: -2s; }
@keyframes pdSway { from { rotate: -8deg; } to { rotate: 8deg; } }
.pd-bub { position: absolute; bottom: 0; left: 40%; width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); animation: pdBub 4s linear infinite; } .pd-bub.b2 { left: 75%; animation-delay: -2s; }
@keyframes pdBub { to { transform: translateY(-220px); opacity: 0; } }
.swim.s3 { top: 75%; animation-duration: 13s; animation-delay: 4s; font-size: 34px; }
.pond-txt { color: #0b3a66; text-shadow: 0 2px 0 rgba(255,255,255,.6); z-index: 4; }
@media (prefers-reduced-motion: reduce) { .pd-cloud, .pd-weed, .pd-bub { animation: none; } }
/* 🗼 Tower Defense on small screens: upright phones stack the map over the shop (the map gets a real height); phones on their side keep
   map + a narrow shop side by side (the stacked layout left the map 0 px tall) */
@media (max-width: 900px) { .td-left { flex: 0 0 auto; height: min(56vh, calc(100vw * .6)); } .td { overflow-y: auto; } }
@media (max-width: 900px) and (max-height: 560px) and (min-aspect-ratio: 4/3) {
  .td { flex-direction: row; overflow: hidden; } .td-left { flex: 1 1 auto; height: auto; } .td-side { width: 220px; max-height: 100% !important; overflow-y: auto; }
  .td-tw { padding: 4px; } .td-tw span { font-size: 18px; }
}
/* 📥 Import from Blooket (sets.js importSets()) */
.sets-hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.imp-tabs { display: flex; gap: 8px; margin: 6px 0 12px; flex-wrap: wrap; }
.imp-tab { font: 800 15px 'Nunito', sans-serif; padding: 9px 16px; border-radius: 12px; border: 2px solid #d9d2ea; background: #f4f0fb; color: var(--text); cursor: pointer; }
.imp-tab.on { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 3px 0 var(--purple-d); }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 3px dashed #c9bfe0; border-radius: 16px; background: #faf8ff; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.imp-drop.over, .imp-drop:hover { border-color: var(--purple); background: #f1ecff; }
.imp-drop input { display: none; } .imp-drop span { font: 900 18px 'Nunito', sans-serif; color: var(--purple); } .imp-drop small { color: var(--muted); }
.imp-help { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.5; color: var(--text); }
#imp-text { width: 100%; box-sizing: border-box; font: 14px/1.4 ui-monospace, monospace; padding: 10px; border-radius: 12px; border: 2px solid #d9d2ea; resize: vertical; }
.imp-out { margin-top: 12px; } .imp-ok { font-weight: 800; color: #1f8a3a; margin: 0 0 8px; } .imp-none { font-weight: 800; color: #c0392b; }
.imp-name { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 8px; } .imp-name input { flex: 1; padding: 8px 10px; border-radius: 10px; border: 2px solid #d9d2ea; font: inherit; }
.imp-list { margin: 0; padding-left: 22px; max-height: 220px; overflow: auto; } .imp-list li { margin-bottom: 8px; } .imp-list b { display: block; }
.imp-list span { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; } .imp-list i { font-style: normal; font-size: 13px; padding: 2px 8px; border-radius: 8px; background: #eee9f7; }
.imp-list i.ok { background: #d6f5dd; color: #1f7a35; font-weight: 800; }
/* ⚡ Market speed-up (Nate 2026-11-11: "optimize the pal locker and the market"): a live seasonal card and an event card pulse with a
   glow BEHIND them (.glow-wrap::before, only its opacity changes, which the graphics chip does for free) instead of re-drawing
   their box-shadow every frame. The card itself keeps a steady glow. */
.glow-wrap { position: relative; }
.glow-wrap > .pack-card { z-index: 1; }
.glow-wrap::before { content: ''; position: absolute; inset: 0; border-radius: 18px; box-shadow: 0 0 44px 6px var(--gc); opacity: 0; pointer-events: none;
  animation: glowpulse 2.4s ease-in-out infinite; transition: transform .2s; will-change: opacity; }
.glow-wrap:hover::before { transform: translateY(-6px); }
@keyframes glowpulse { 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .glow-wrap::before { animation: none; opacity: .5; } .pk-shine, .pc-shine { animation: none; } }
#page.scrolling .page-inner { pointer-events: none; } /* no hover work mid-scroll (scrollCalm() in app.js) */

/* 📌 the Admin Bar keeps its scroll place exactly: the browser's own scroll anchoring nudged it up a little every time the Players list changed (Nate 2026-11-11) */
#admin-bar, #admin-bar * { overflow-anchor: none; }

/* ⭐ PLAYER LEVELS (Nate 2026-11-12): the "Lv N" ribbon on a Pal picture (lvWrap in app.js); same look as the portal's (portal.css) */
.lv-av { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; }
.lv-tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); z-index: 2; pointer-events: none; white-space: nowrap; font: 800 9px/1 'Nunito', system-ui, sans-serif; letter-spacing: .02em;
  padding: 2px 7px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.45); background: linear-gradient(#3fd07a, #15934a);
  clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 50%, 100% 100%, 0 100%, 3px 50%); filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.lv-tag[data-t="2"] { background: linear-gradient(#5ab4ff, #1f6fe0); } .lv-tag[data-t="3"] { background: linear-gradient(#c58bff, #7a35d8); }
.lv-tag[data-t="4"] { background: linear-gradient(#ffe066, #f09a12); color: #3a2400; text-shadow: none; }
.lv-tag[data-t="5"] { background: linear-gradient(90deg, #ff5a7a, #ffb13d, #ffe95a, #5ae08a, #5ab4ff, #c58bff); color: #1b0f2e; text-shadow: none; }
.me-btn.has-lv { overflow: visible; position: relative; } .me-btn .lv-tag { bottom: -7px; }
.lp .lv-tag { font-size: 11px; padding: 2px 9px; bottom: -4px; }
