@font-face { font-family: "Luckiest Guy"; src: url(../fonts/luckiest.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(../fonts/fredoka-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(../fonts/fredoka-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(../fonts/fredoka-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0c1236 url(../assets/bg.jpg) center / cover no-repeat fixed; font-family: Fredoka, "Trebuchet MS", Arial, sans-serif;
  color: #1d2a44; user-select: none; -webkit-user-select: none; touch-action: none; }
#wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stage { position: relative; width: 800px; height: 600px; flex: none; transform-origin: center; border-radius: 10px; overflow: hidden;
  background: #fff; box-shadow: 0 12px 50px rgba(0,0,0,.6), 0 0 0 4px #fff, 0 0 0 7px #222; }
canvas { display: block; }
.screen { position: absolute; inset: 0; display: none; }
.screen.on { display: block; }
button { font-family: inherit; cursor: pointer; }
.lk { font-family: "Luckiest Guy", Impact, sans-serif; letter-spacing: .5px; font-weight: 400; }

/* ---------- generic buttons ---------- */
.btn { border: 0; border-radius: 14px; padding: 9px 16px; color: #fff; font: 18px "Luckiest Guy", Impact; letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(0,0,0,.35); background: linear-gradient(#5aa9ff, #1f6fd6); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 #0b3c80, 0 6px 10px rgba(0,0,0,.25); }
.btn:hover { filter: brightness(1.1); } .btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 1px 0 #0b3c80; }
.btn.green { background: linear-gradient(#93ea3c, #3ea514); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 #22660a, 0 6px 10px rgba(0,0,0,.25); }
.btn.red { background: linear-gradient(#ff6b6b, #d11a1a); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 #7a0d0d, 0 6px 10px rgba(0,0,0,.25); }
.btn.orange { background: linear-gradient(#ffc34d, #ee7a00); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 #8a4600, 0 6px 10px rgba(0,0,0,.25); }
.btn.gray { background: linear-gradient(#c3cad6, #8892a3); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 #555e6e; }
.btn.small { font-size: 14px; padding: 6px 10px; border-radius: 10px; }
.row { display: flex; gap: 10px; justify-content: center; }

/* ---------- lobby ---------- */
#lobby { background: linear-gradient(#fff6e3, #ffe2b0); }
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 8px;
  background: linear-gradient(#4ea0ff, #1d62c9); border-bottom: 3px solid #0d3d8a; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.me { display: flex; align-items: center; gap: 6px; cursor: pointer; background: rgba(0,0,0,.18); padding: 3px 10px 3px 4px; border-radius: 12px; min-width: 160px; }
.me canvas { border-radius: 8px; }
.mename { display: flex; flex-direction: column; line-height: 1.05; color: #fff; }
.mename b { font: 16px "Luckiest Guy", Impact; letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.mename small { font-size: 10px; font-weight: 600; color: #cfe5ff; white-space: nowrap; }
.pill { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 4px; border-radius: 15px; background: linear-gradient(#fff, #dfe8f5);
  border: 2px solid #0d3d8a; min-width: 100px; }
.pill b { font: 16px "Luckiest Guy", Impact; color: #1d2a44; flex: 1; text-align: right; letter-spacing: .5px; }
.coin { width: 26px; height: 26px; flex: none; display: inline-block; vertical-align: middle; background: url(../assets/ui/coin.svg?v=1) center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); position: relative; }
.bill { width: 34px; height: 24px; flex: none; display: inline-block; vertical-align: middle; background: url(../assets/ui/cash.svg?v=1) center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); position: relative; }
.plus { font-style: normal; width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(#93ea3c, #3ea514); color: #fff; font: 18px/20px "Luckiest Guy"; text-align: center; cursor: pointer; }
.lvl { display: flex; align-items: center; flex: 1; min-width: 150px; }
.lstar { width: 42px; height: 42px; position: relative; z-index: 2; margin-right: -10px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3));
  background: #ffc61a; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); display: grid; place-items: center; }
.lstar b { font: 14px "Luckiest Guy"; color: #5a3a00; margin-top: 4px; }
.xpbar { position: relative; flex: 1; height: 22px; border-radius: 11px; background: #0d3d8a; border: 2px solid #0a2f6b; overflow: hidden; }
#xpfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(#ffe36b, #ff9d00); transition: width .8s; }
#xptxt { position: absolute; inset: 0; text-align: center; font: 13px/19px "Luckiest Guy"; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: .5px; }
.icons { display: flex; gap: 4px; }
.icons button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #0d3d8a; background: linear-gradient(#fff, #cfd9e8); font: 16px "Luckiest Guy"; color: #0d3d8a; }

.banner { position: absolute; left: 8px; right: 8px; top: 54px; height: 268px; border-radius: 14px; overflow: hidden; border: 3px solid #b34a00;
  box-shadow: inset 0 0 0 3px #ffd27a, 0 4px 0 #7a3000; background: #ff9d1f; }
.sunburst { position: absolute; left: 50%; top: 50%; width: 1400px; height: 1400px; margin: -700px 0 0 -700px;
  background: repeating-conic-gradient(#ffb43a 0 10deg, #ff9416 10deg 20deg); }
.banner::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(255,240,180,.55), transparent 60%); pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
#b3d { position: absolute; right: 10px; top: 0; width: 420px; height: 262px; z-index: 1; }
.bleft { position: absolute; left: 22px; top: 14px; width: 360px; z-index: 2; }
.btitle { font: 58px/1 "Luckiest Guy", Impact; color: #ffe24a; letter-spacing: 1px; -webkit-text-stroke: 3px #7a2e00; paint-order: stroke fill;
  text-shadow: 0 5px 0 #7a2e00, 0 8px 10px rgba(0,0,0,.3); transform: rotate(-3deg); transform-origin: left; animation: wob 3s ease-in-out infinite; }
.btitle sup { font-size: 34px; color: #fff; }
@keyframes wob { 50% { transform: rotate(-1deg) scale(1.03); } }
.bsub { margin: 6px 0 8px; font-weight: 700; font-size: 13px; color: #fff; text-shadow: 0 1px 0 #7a2e00, 0 0 6px #b34a00; text-transform: uppercase; max-width: 330px; }
.bbtns { display: flex; gap: 10px; }
.playnow { border: 0; border-radius: 30px; padding: 10px 40px; font: 30px "Luckiest Guy", Impact; color: #fff; letter-spacing: 1px;
  background: linear-gradient(#a6f04a, #3fa514); box-shadow: inset 0 3px 0 rgba(255,255,255,.5), 0 6px 0 #1f5a0a, 0 8px 16px rgba(0,0,0,.3);
  text-shadow: 0 3px 0 rgba(0,0,0,.35); border: 3px solid #fff; animation: pulse 1.6s ease-in-out infinite; }
.playnow.small { font-size: 20px; padding: 8px 18px; animation: none; }
.playnow.blue { background: linear-gradient(#5aa9ff, #1f6fd6); box-shadow: inset 0 3px 0 rgba(255,255,255,.5), 0 6px 0 #0b3c80, 0 8px 16px rgba(0,0,0,.3); }
.playnow:active { transform: translateY(4px); }
@keyframes pulse { 50% { transform: scale(1.05); } }
.extra { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 2px solid #7a2e00; background: #fff3d6; color: #7a2e00; border-radius: 10px; padding: 2px 8px; font: 12px "Luckiest Guy"; letter-spacing: .5px; }
.chip.on { background: #7a2e00; color: #ffe24a; }
.yourrank { position: absolute; top: 218px; display: flex; align-items: center; gap: 8px; background: rgba(90,30,0,.7); color: #fff; padding: 5px 14px 5px 6px;
  border-radius: 14px; font: 15px "Luckiest Guy"; letter-spacing: .5px; border: 2px solid #ffd27a; white-space: nowrap; }
.yourrank .stars { color: #ffc61a; letter-spacing: 1px; font-family: Arial; font-size: 14px; }
.yourrank .stars .off { color: #8a6a50; }
.arrow { position: absolute; top: 112px; z-index: 3; width: 28px; height: 44px; border: 0; border-radius: 8px; background: rgba(90,30,0,.45); color: #fff; font-size: 16px; }
.arrow.l { left: 4px; } .arrow.r { right: 4px; }
.dots { position: absolute; bottom: 8px; right: 16px; display: flex; gap: 6px; z-index: 3; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); border: 2px solid #7a2e00; cursor: pointer; }
.dots i.on { background: #ffe24a; }

.modes { position: absolute; left: 8px; right: 8px; top: 328px; height: 70px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mode { position: relative; border: 3px solid #333; border-radius: 12px; overflow: hidden; cursor: pointer; color: #fff; text-align: center;
  font: 17px/1 "Luckiest Guy", Impact; letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.45); padding-top: 14px; box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .12s; }
.mode small { display: block; font: 600 10px Fredoka, Arial; margin-top: 6px; text-shadow: none; opacity: .95; }
.mode:hover { transform: translateY(-2px); } .mode.on { outline: 4px solid #ffe24a; outline-offset: -1px; transform: translateY(-3px); }
.mode::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.35), transparent 50%); }
.m-battle2p { background: linear-gradient(#ffd34d, #ff8a00); border-color: #8a4600; }
.m-battle2pp, .m-team2v2 { background: linear-gradient(#ff7ad0, #b0129a); border-color: #5c0a52; }
.m-friends { background: linear-gradient(#6ac7ff, #1f6fd6); border-color: #0b3c80; }
.m-cpu { background: linear-gradient(#a6f04a, #3fa514); border-color: #1f5a0a; }
.m-sprint { background: linear-gradient(#5af0f0, #0aa0c8); border-color: #05506a; }
.m-marathon { background: linear-gradient(#ff8a8a, #d11a1a); border-color: #6a0a0a; }

.bottom { position: absolute; left: 8px; right: 8px; top: 404px; bottom: 8px; display: flex; gap: 8px; }
.lbbox { flex: 1; border-radius: 12px; background: linear-gradient(#5aa9ff, #1f6fd6); border: 3px solid #0b3c80; padding: 4px 6px; min-width: 0; }
.lbhead { font: 16px "Luckiest Guy"; color: #fff; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0,0,0,.3); padding: 0 2px 4px; }
.lbhead span { font: 600 11px Fredoka; color: #cfe5ff; letter-spacing: 0; text-shadow: none; }
.lbrow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.lbcard { flex: none; width: 84px; height: 140px; border-radius: 10px; background: linear-gradient(#fff, #dde8f7); border: 2px solid #0b3c80; text-align: center;
  padding: 4px 3px; position: relative; }
.lbcard.mine { background: linear-gradient(#fff6c2, #ffd76a); }
.lbcard canvas { margin: 2px auto 2px; border-radius: 8px; }
.lbcard b { display: block; font: 12px "Luckiest Guy"; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbcard small { display: block; font-size: 10px; font-weight: 600; color: #4a5a78; line-height: 1.15; }
.lbcard .pos { position: absolute; left: -2px; top: -2px; background: #ff8a00; color: #fff; font: 12px/18px "Luckiest Guy"; width: 22px; height: 20px; border-radius: 8px 0 8px 0; }
.lbcard .w { font: 13px "Luckiest Guy"; color: #1f6fd6; }
.lbempty { color: #fff; font-weight: 600; font-size: 13px; padding: 30px 10px; }
.side-btns { width: 168px; display: flex; flex-direction: column; gap: 6px; }
.sb { flex: 1; border: 3px solid #333; border-radius: 12px; color: #fff; font: 19px "Luckiest Guy"; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0,0,0,.4); position: relative; }
.sb.daily { background: linear-gradient(#ffd34d, #ff8a00); border-color: #8a4600; }
.sb.shop { background: linear-gradient(#ff7ad0, #b0129a); border-color: #5c0a52; }
.sb.prof { background: linear-gradient(#a6f04a, #3fa514); border-color: #1f5a0a; }
.sb:active { transform: translateY(2px); }
#dailyDot { position: absolute; right: -6px; top: -8px; width: 22px; height: 22px; border-radius: 50%; background: #e8212e; border: 2px solid #fff; font: 14px/18px "Luckiest Guy"; font-style: normal; animation: pulse 1s infinite; }

/* ---------- maps ---------- */
#maps { background: url(../assets/mainsetmap.png); }
.hot { position: absolute; width: 200px; height: 200px; cursor: pointer; border-radius: 6px; }
.hot:hover { outline: 5px solid #ffe14d; box-shadow: 0 0 20px #ffe14d; }

/* ---------- matchmaking ---------- */
#wait { background: #0c1236 url(../assets/bg.jpg) center / cover no-repeat; }
.waitpanel, .mpanel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: linear-gradient(#fffaf0, #ffe9c2); border: 4px solid #7a2e00;
  border-radius: 18px; box-shadow: 0 8px 0 #4a1a00, 0 14px 30px rgba(0,0,0,.45); padding: 40px 24px 20px; text-align: center; min-width: 360px; }
.waitpanel { width: 520px; }
.ribbon { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); background: linear-gradient(#ffd34d, #ff8a00); border: 4px solid #7a2e00; border-radius: 14px;
  padding: 6px 28px; font: 26px "Luckiest Guy"; color: #fff; letter-spacing: 1px; text-shadow: 0 3px 0 #7a2e00; white-space: nowrap; }
.vs { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 6px 0 10px; }
.vsp { display: flex; flex-direction: column; align-items: center; width: 150px; }
.vsp canvas, .qmark { width: 84px; height: 84px; border-radius: 14px; }
.vsp b { font: 18px "Luckiest Guy"; margin-top: 6px; } .vsp small { font-size: 11px; font-weight: 600; color: #6a5a48; }
.qmark { background: linear-gradient(#c3cad6, #8892a3); border: 3px solid #555; display: grid; place-items: center; font: 52px "Luckiest Guy"; color: #fff; animation: qm 1s ease-in-out infinite; }
@keyframes qm { 50% { transform: scale(1.08) rotate(5deg); } }
.vstxt { font: 52px "Luckiest Guy"; color: #ff8a00; -webkit-text-stroke: 3px #7a2e00; paint-order: stroke fill; }
.code { font: 46px "Luckiest Guy"; letter-spacing: 8px; color: #1f6fd6; -webkit-text-stroke: 2px #0b3c80; paint-order: stroke fill; margin: 2px 0; }
.status { min-height: 22px; font-weight: 600; margin: 8px 0 12px; color: #6a3a00; }
input.txt { padding: 8px 10px; border-radius: 10px; border: 3px solid #7a2e00; background: #fff; font: 600 16px Fredoka; text-align: center; outline: none; width: 220px; }
input.txt:focus { border-color: #1f6fd6; }

/* ---------- game ---------- */
#hud { position: absolute; right: 8px; top: 64px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
#hud button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #0d3d8a; background: #fff; color: #0d3d8a; font: 14px "Luckiest Guy"; }
#chat { position: absolute; left: 14px; bottom: 8px; width: 380px; display: none; z-index: 3; }
#chatLog { background: rgba(0,0,0,.45); border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px #000; max-height: 46px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
#chatLog .me { color: #ffe24a; } #chatLog .them { color: #9fe0ff; }
.chatin { display: flex; gap: 3px; margin-top: 2px; }
.chatin input { flex: 1; border-radius: 8px; border: 2px solid #0d3d8a; padding: 3px 6px; font: 600 12px Fredoka; outline: none; }
.chatin button { border-radius: 8px; border: 2px solid #0d3d8a; background: #fff; font: 12px "Luckiest Guy"; color: #0d3d8a; padding: 0 6px; }
#pausebox { position: absolute; inset: 0; background: #0c1236 url(../assets/bg.jpg) center / cover; display: none; z-index: 5; }
.ctl { text-align: left; font-size: 13px; line-height: 1.75; margin-bottom: 12px; }
.ctl b { color: #b34a00; white-space: nowrap; font-family: "Luckiest Guy"; font-weight: 400; letter-spacing: .5px; }

/* ---------- modal ---------- */
#modal { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: none; z-index: 20; }
#modal.on { display: block; animation: fadein .15s; }
#modal .mpanel { animation: popin .3s cubic-bezier(.2,1.6,.4,1); max-height: 560px; }
@keyframes popin { from { transform: translate(-50%, -50%) scale(.6); } }
@keyframes fadein { from { opacity: 0; } }
.mclose { position: absolute; right: -14px; top: -14px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; background: linear-gradient(#ff6b6b, #d11a1a);
  color: #fff; font: 20px "Luckiest Guy"; box-shadow: 0 3px 0 #7a0d0d; }
#mbody { overflow-y: auto; max-height: 470px; }

/* daily bonus */
.cards { display: flex; gap: 10px; justify-content: center; margin: 6px 0 12px; perspective: 600px; }
.dcard { width: 100px; height: 138px; position: relative; transform-style: preserve-3d; transition: transform .6s; }
.dcard.flip { transform: rotateY(180deg); }
.dface { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; border: 3px solid #7a2e00; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; }
.dface.back { background: linear-gradient(#c3cad6, #8892a3); font: 52px "Luckiest Guy"; color: #fff; text-shadow: 0 3px 0 #555; }
.dface.front { background: linear-gradient(#fff, #ffeab8); transform: rotateY(180deg); }
.dface .dico { font-size: 38px; line-height: 1; }
.dface b { font: 15px "Luckiest Guy"; margin-top: 6px; color: #7a2e00; }
.dwrap { position: relative; padding-bottom: 26px; }
.dlabel { position: absolute; left: 0; right: 0; bottom: 0; font: 11px "Luckiest Guy"; color: #7a2e00; letter-spacing: .3px; }
.dlabel.today { color: #e8212e; }
.congrats { font: 30px "Luckiest Guy"; color: #ffe24a; -webkit-text-stroke: 2px #7a2e00; paint-order: stroke fill; text-shadow: 0 4px 0 #7a2e00; margin: 26px 0 6px; animation: pulse 1s infinite; }

/* results */
.res-title { font: 54px "Luckiest Guy"; color: #ffe24a; -webkit-text-stroke: 3px #7a2e00; paint-order: stroke fill; text-shadow: 0 5px 0 #7a2e00; margin: 0 0 6px; }
.res-title.lose { color: #9fc4ff; -webkit-text-stroke-color: #0b3c80; text-shadow: 0 5px 0 #0b3c80; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.stat { background: #fff; border: 2px solid #e5c690; border-radius: 10px; padding: 4px; }
.stat b { display: block; font: 22px "Luckiest Guy"; color: #1f6fd6; } .stat small { font-size: 10px; font-weight: 700; color: #8a6a40; text-transform: uppercase; }
.rewards { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 8px 0; font: 18px "Luckiest Guy"; }
.rewards .rw { background: #fff; border: 2px solid #e5c690; border-radius: 12px; padding: 4px 12px; display: flex; align-items: center; gap: 6px; }
.rankbox { background: #2a1a0a; color: #fff; border-radius: 12px; padding: 8px; margin: 8px 0; font: 16px "Luckiest Guy"; letter-spacing: .5px; }
.rankbox .bigstars { font-size: 26px; letter-spacing: 3px; font-family: Arial; }
.bigstars i { font-style: normal; color: #5a4a3a; display: inline-block; transition: color .3s, transform .3s; }
.bigstars i.on { color: #ffc61a; } .bigstars i.pop { transform: scale(1.6); }
.rankup { font: 34px "Luckiest Guy"; color: #ffe24a; -webkit-text-stroke: 2px #7a2e00; paint-order: stroke fill; animation: pulse .8s infinite; }
.xpwrap { position: relative; height: 22px; border-radius: 11px; background: #0d3d8a; overflow: hidden; margin: 6px 20px; }
.xpwrap div { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#ffe36b, #ff9d00); transition: width 1.2s ease-out; }
.xpwrap span { position: absolute; inset: 0; color: #fff; font: 13px/22px "Luckiest Guy"; text-shadow: 0 1px 2px #000; }

/* shop / profile */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.skin { background: #fff; border: 3px solid #e5c690; border-radius: 12px; padding: 6px; }
.skin.eq { border-color: #3fa514; box-shadow: 0 0 0 2px #a6f04a; }
.skin b { display: block; font: 16px "Luckiest Guy"; } .skin small { display: block; font-size: 11px; color: #8a6a40; font-weight: 600; min-height: 26px; }
.skin canvas { margin: 4px auto; border-radius: 6px; }
.avs { display: flex; gap: 6px; justify-content: center; margin: 6px 0; }
.avs canvas { border-radius: 10px; cursor: pointer; opacity: .55; } .avs canvas.on { opacity: 1; outline: 3px solid #ff8a00; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; text-align: left; font-size: 13px; margin: 8px 0; }
.kv span { color: #8a6a40; font-weight: 600; } .kv b { font-family: "Luckiest Guy"; font-weight: 400; letter-spacing: .5px; text-align: right; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; } .tbl td { border-bottom: 1px solid #e5c690; padding: 3px 6px; text-align: left; }
.tbl td:last-child { text-align: right; font-weight: 700; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; font-weight: 600; }
.setrow input[type=range] { width: 180px; }

#toast { position: absolute; left: 50%; top: 60px; transform: translateX(-50%); background: #1d2a44; color: #fff; padding: 8px 18px; border-radius: 12px; font-weight: 600;
  display: none; z-index: 30; border: 2px solid #ffe24a; white-space: nowrap; }
.levelup { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(circle, rgba(255,220,100,.55), rgba(0,0,0,.6) 70%); animation: fadein .2s; }
.levelup .lu { position: relative; text-align: center; animation: popin2 .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes popin2 { from { transform: scale(.3); } }
.levelup .lu .big { font: 64px "Luckiest Guy"; color: #ffe24a; -webkit-text-stroke: 3px #7a2e00; paint-order: stroke fill; text-shadow: 0 6px 0 #7a2e00; }
.levelup .lu .sm { font: 22px "Luckiest Guy"; color: #fff; text-shadow: 0 3px 0 #000; margin-top: 6px; }
.levelup .rays { position: absolute; left: 50%; top: 50%; margin: -350px 0 0 -350px; width: 700px; height: 700px; background: repeating-conic-gradient(rgba(255,240,150,.35) 0 8deg, transparent 8deg 20deg); border-radius: 50%; animation: spin 8s linear infinite; z-index: -1; }

/* touch controls */
#touch { position: fixed; left: 0; right: 0; bottom: 0; height: 130px; display: none; padding: 8px; gap: 6px; pointer-events: none; z-index: 50; }
#touch .grp { display: flex; gap: 8px; align-items: flex-end; pointer-events: auto; }
#touch button { width: 64px; height: 56px; border-radius: 14px; border: 2px solid rgba(255,255,255,.6); background: rgba(0,0,0,.55); color: #fff; font: bold 20px Arial; touch-action: none; }
#touch button.down { background: rgba(255,180,0,.75); }
body.touch.ingame #touch { display: flex; justify-content: space-between; }
@media (orientation: landscape) { #touch { height: auto; top: 0; align-items: flex-end; } #touch .grp { flex-wrap: wrap; width: 146px; justify-content: center; padding-bottom: 10px; } }

#signin { background: #0c1236 url(../assets/bg.jpg) center / cover no-repeat; }
.spinner { width: 44px; height: 44px; margin: 6px auto 4px; border: 5px solid #e5c690; border-top-color: #ff8a00; border-radius: 50%; animation: spin 1s linear infinite; }
.lbtab { border: 2px solid #0b3c80; background: #cfe5ff; color: #0b3c80; border-radius: 8px; font: 11px "Luckiest Guy"; padding: 1px 7px; margin-right: 3px; letter-spacing: .5px; }
.lbtab.on { background: #ffe24a; color: #7a2e00; border-color: #7a2e00; }

.xbox { background: #fff; border: 3px solid #e5c690; border-radius: 14px; padding: 10px 14px; }
.xhead { font: 20px "Luckiest Guy"; letter-spacing: .5px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #1d2a44; }
.xhead b { color: #ff8a00; }
.rc { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffb3f0, #ff2bd6 55%, #8a0a70); border: 2px solid #5a0848; color: #fff; font: 14px/22px "Luckiest Guy"; text-align: center; display: inline-block; }
.xrate { font: 15px "Luckiest Guy"; color: #3ea514; letter-spacing: .5px; margin: 4px 0; }
.xbal { font-weight: 600; margin-bottom: 8px; }
.xmsg { min-height: 18px; font-weight: 700; color: #d11a1a; margin-top: 6px; font-size: 13px; }
.xlink { font-weight: 700; color: #1f6fd6; font-size: 13px; }

/* ---------- MATCH FOUND! celebration ---------- */
#mfx { position: absolute; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; display: none; }
#mfx.on { display: block; }
#mfx .flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: mfFlash .55s ease-out forwards; }
#mfx .dim { position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, rgba(40,10,0,.15), rgba(10,5,30,.78) 70%); opacity: 0; animation: mfIn .3s .05s forwards; }
#mfx .rays { position: absolute; left: 50%; top: 46%; width: 1500px; height: 1500px; margin: -750px 0 0 -750px; opacity: 0;
  background: repeating-conic-gradient(rgba(255,214,60,.55) 0 9deg, rgba(255,140,0,0) 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 62%); mask: radial-gradient(circle, #000 8%, transparent 62%);
  animation: mfIn .35s .1s forwards, mfSpin 9s linear infinite; }
#mfx .title { position: absolute; left: 0; right: 0; top: 36%; text-align: center; font: 92px/1 "Luckiest Guy", Impact, sans-serif; letter-spacing: 3px; white-space: nowrap;
  color: #ffe23a; -webkit-text-stroke: 4px #7a2e00; paint-order: stroke fill;
  text-shadow: 0 6px 0 #c24a00, 0 10px 0 #7a2e00, 0 16px 28px rgba(0,0,0,.55), 0 0 40px rgba(255,220,60,.8); }
#mfx .title span { display: inline-block; opacity: 0; transform: translateY(-260px) scale(1.6) rotate(-12deg); animation: mfDrop .5s cubic-bezier(.2,1.6,.4,1) forwards; }
#mfx .title span.sp { width: 26px; }
#mfx .title.pulse { animation: mfPulse .5s ease-in-out infinite alternate; }
#mfx .sub { position: absolute; left: 50%; top: calc(27% + 118px); translate: -50% 0; white-space: nowrap; padding: 8px 26px 4px; border-radius: 40px; background: linear-gradient(#2a3f9e, #16205c);
  border: 3px solid #ffe23a; box-shadow: 0 6px 18px rgba(0,0,0,.5); font: 30px "Luckiest Guy", Impact; color: #fff; letter-spacing: 2px;
  -webkit-text-stroke: 2px #1b2a6b; paint-order: stroke fill; text-shadow: 0 4px 0 #1b2a6b; opacity: 0; animation: mfPop .45s 1.05s cubic-bezier(.2,1.5,.4,1) forwards; }
#mfx .sub b { color: #ffe23a; font-weight: 400; }
#mfx .blk { position: absolute; width: 22px; height: 22px; border-radius: 4px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.25), inset 0 4px 0 rgba(255,255,255,.45);
  animation: mfBurst var(--d) cubic-bezier(.15,.7,.4,1) forwards; }
#wait.shake .waitpanel { animation: mfShake .45s linear; }
@keyframes mfFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes mfIn { to { opacity: 1; } }
@keyframes mfSpin { to { transform: rotate(360deg); } }
@keyframes mfDrop { 70% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes mfPop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes mfPulse { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes mfBurst { 0% { transform: translate(0,0) rotate(0) scale(.4); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); opacity: 0; } }
@keyframes mfShake { 0%,100% { transform: translate(-50%,-50%); } 20% { transform: translate(calc(-50% - 9px), calc(-50% + 5px)); } 40% { transform: translate(calc(-50% + 8px), calc(-50% - 6px)); }
  60% { transform: translate(calc(-50% - 5px), calc(-50% + 3px)); } 80% { transform: translate(calc(-50% + 3px), -50%); } }

/* ---------- custom controls ---------- */
.keyhead { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 6px; font: 20px "Luckiest Guy"; color: #b34a00; letter-spacing: 1px; }
.keytbl { display: grid; grid-template-columns: 1fr 108px 108px; gap: 5px 8px; align-items: center; font-weight: 700; font-size: 14px; text-align: left; }
.keybtn { font: 15px "Luckiest Guy"; letter-spacing: .5px; color: #3a2400; background: linear-gradient(#fff, #ffe9b8); border: 2px solid #c88a2c; border-bottom-width: 4px; border-radius: 8px; padding: 6px 4px 3px; cursor: pointer; min-height: 34px; }
.keybtn:hover { background: linear-gradient(#fffbe8, #ffd77a); }
.keybtn.wait { background: linear-gradient(#ffe36b, #ffb400); animation: kblink .7s ease-in-out infinite alternate; }
@keyframes kblink { to { filter: brightness(1.15); transform: scale(1.04); } }
.keyhint { font-size: 12px; color: #8a6a40; margin-top: 8px; font-weight: 600; }

/* currency icons: a light shine every few seconds, and a bounce when the amount goes up */
.pill .coin, .pill .bill { animation: curShine 4.5s ease-in-out infinite; }
.pill .bill { animation-delay: 2.2s; }
@keyframes curShine { 0%, 86%, 100% { transform: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
  91% { transform: scale(1.12) rotate(-6deg); filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)) brightness(1.35); } 95% { transform: scale(1.05) rotate(3deg); } }
.pill.gain .coin, .pill.gain .bill { animation: curGain .6s cubic-bezier(.2,1.6,.4,1); }
.pill.gain b { animation: curNum .6s ease-out; }
@keyframes curGain { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-12deg); } 100% { transform: none; } }
@keyframes curNum { 0% { color: #1d2a44; } 30% { color: #1f9a2a; transform: scale(1.15); } 100% { color: #1d2a44; transform: none; } }

/* ---------- 2 VS 2 rooms ---------- */
.rtypes { display: flex; gap: 14px; justify-content: center; margin: 6px 0 4px; }
.rtype { flex: 1; max-width: 220px; cursor: pointer; border: 3px solid #1b5e0d; border-bottom-width: 7px; border-radius: 18px; padding: 16px 10px 12px; color: #fff;
  background: linear-gradient(#7df05a, #2f9a1a); font-family: "Luckiest Guy", Impact; text-shadow: 0 2px 0 rgba(0,0,0,.35); transition: transform .1s; }
.rtype.pink { background: linear-gradient(#ff7ad0, #b0129a); border-color: #5c0a52; }
.rtype:hover { transform: translateY(-3px) scale(1.03); }
.rtype b { display: block; font-size: 34px; font-weight: 400; letter-spacing: 1px; }
.rtype small { display: block; font: 600 12px Fredoka, Arial; text-shadow: none; opacity: .95; margin-top: 4px; }
.tlobby { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; justify-content: center; }
.tteam { flex: 1; max-width: 210px; border-radius: 14px; padding: 8px; color: #fff; }
.tteam.blue { background: linear-gradient(#3a8cff, #1a4fb0); border: 3px solid #0d2e6e; }
.tteam.red { background: linear-gradient(#ff6a5a, #b02a1a); border: 3px solid #6e140d; }
.tteam > b { display: block; font: 16px "Luckiest Guy", Impact; letter-spacing: 1px; margin-bottom: 6px; }
.tseat { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); color: #1d2a44; border-radius: 10px; padding: 4px 8px; margin: 5px 0; font-weight: 700; font-size: 14px; min-height: 48px; }
.tseat canvas { width: 36px; height: 36px; border-radius: 8px; }
.tseat.empty { background: rgba(255,255,255,.25); color: #fff; font-weight: 600; font-size: 12px; }
.tseat.empty i { font-style: normal; font-size: 22px; width: 36px; text-align: center; }
.tseat.left { opacity: .5; text-decoration: line-through; }
.tvs { font: 30px "Luckiest Guy", Impact; color: #ff8a00; text-shadow: 0 2px 0 #7a3a00; }

/* ---------- live chat dock ---------- */
#chatDock { position: fixed; right: 10px; top: 10px; bottom: 10px; width: 300px; z-index: 50; display: none; flex-direction: column;
  background: linear-gradient(#fff8e6, #ffecc2); border: 4px solid #7a3a00; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.45); overflow: hidden; font-family: Fredoka, Arial; }
body.chat-on #chatDock { display: flex; }
.chhead { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 6px; background: linear-gradient(#ffb43a, #ff8a00); border-bottom: 3px solid #7a3a00; }
.chhead b { font: 20px "Luckiest Guy", Impact; color: #fff; letter-spacing: 1px; text-shadow: 0 2px 0 #7a3a00; }
.chhead button { border: 2px solid #7a3a00; background: #fff3d6; border-radius: 8px; font-weight: 800; cursor: pointer; width: 30px; height: 26px; }
.chtabs { display: flex; gap: 6px; padding: 8px 8px 4px; }
.chtabs button { flex: 1; font: 15px "Luckiest Guy", Impact; letter-spacing: .5px; border-radius: 10px; border: 2px solid #c88a2c; background: #fff; color: #8a5a00; padding: 6px 0 3px; cursor: pointer; position: relative; }
.chtabs button.on { background: linear-gradient(#3a8cff, #1a4fb0); color: #fff; border-color: #0d2e6e; }
.chtabs button i, #chatBtn i { font-style: normal; position: absolute; top: -6px; right: -4px; background: #ff2a4a; color: #fff; font: 700 11px Fredoka, Arial; border-radius: 10px; padding: 1px 6px; border: 2px solid #fff; }
.chtabs button i:empty, #chatBtn i:empty { display: none; }
.chlist { flex: 1; overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
.chmsg { display: flex; gap: 7px; align-items: flex-start; background: #fff; border-radius: 10px; padding: 6px 8px; box-shadow: 0 1px 0 rgba(122,58,0,.2); }
.chmsg.me { background: #e5f4ff; }
.chmsg canvas { width: 26px; height: 26px; border-radius: 6px; flex: none; margin-top: 2px; }
.chmsg > div { min-width: 0; flex: 1; }
.chtop { display: flex; align-items: baseline; gap: 6px; }
.chtop b { font-size: 13px; color: #1a4fb0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.chmsg.me .chtop b { color: #b34a00; }
.chlv { font-size: 10px; font-weight: 700; color: #fff; background: #ff8a00; border-radius: 6px; padding: 0 5px; }
.chtime { font-size: 10px; color: #a08060; margin-left: auto; }
.chtext { font-size: 14px; color: #2a1d10; word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.25; }
.chempty { text-align: center; color: #a08060; font-weight: 600; font-size: 13px; margin-top: 30px; padding: 0 14px; }
.chnote { font-size: 12px; color: #c0392b; font-weight: 700; padding: 0 10px; min-height: 2px; }
.chform { display: flex; gap: 6px; padding: 8px; border-top: 2px solid #e8c88a; }
.chform input { flex: 1; min-width: 0; border: 2px solid #c88a2c; border-radius: 10px; padding: 8px 10px; font: 600 14px Fredoka, Arial; outline: none; }
.chform input:focus { border-color: #1a4fb0; }
.chform button { font: 15px "Luckiest Guy", Impact; color: #fff; background: linear-gradient(#7df05a, #2f9a1a); border: 2px solid #1b5e0d; border-radius: 10px; padding: 0 12px; cursor: pointer; }
#chatBtn { position: fixed; right: 14px; bottom: 14px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; border: 4px solid #fff; font-size: 26px; cursor: pointer; display: none;
  background: linear-gradient(#ffb43a, #ff8a00); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
body.chat-off #chatBtn { display: block; }
@media (max-width: 899px) { #chatDock { left: 10px; width: auto; top: auto; height: 60vh; } }
/* chat: player menu + friend requests */
.chtop b.chname:hover { text-decoration: underline; }
canvas.chname { cursor: pointer; }
#chMenu { position: fixed; z-index: 9999; min-width: 190px; background: #fffaf0; border: 3px solid #b8620a; border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.35); padding: 6px; font-family: Fredoka, Arial; animation: cmIn .12s ease-out; }
@keyframes cmIn { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
#chMenu .cmhead { display: flex; align-items: center; gap: 6px; padding: 4px 6px 7px; border-bottom: 2px dashed #f0c98a; margin-bottom: 5px; }
#chMenu .cmhead b { color: #1a4fb0; font-size: 14px; }
#chMenu button { display: block; width: 100%; text-align: left; border: 0; border-radius: 8px; padding: 8px 10px; margin: 2px 0; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; background: transparent; color: #5a3200; }
#chMenu button:hover:not(:disabled) { background: #ffe2b0; }
#chMenu button.add { background: linear-gradient(#6fd34f, #3aa524); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
#chMenu button.add:hover:not(:disabled) { background: linear-gradient(#7fe25f, #45b52d); }
#chMenu button.done { color: #2e8b20; cursor: default; }
#chMenu button:disabled { opacity: .85; }
.chreq:empty { display: none; }
.chreq { padding: 4px 8px 0; }
.chreqrow { display: flex; align-items: center; gap: 5px; background: #e9f9e0; border: 2px solid #6fc24f; border-radius: 10px; padding: 5px 7px; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: #2c5a12; }
.chreqrow span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chreqrow button { border: 0; border-radius: 7px; width: 26px; height: 24px; font-weight: 900; color: #fff; cursor: pointer; }
.chreqrow .yes { background: #3aa524; } .chreqrow .no { background: #d9534f; }
.chreqmore { font-size: 11px; color: #2c5a12; text-align: center; padding-bottom: 3px; }
/* shop: extra NEXT windows */
.nextshop { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px 12px; background: #fff; border: 3px solid #f0c98a; border-radius: 12px; }
.nsboxes { display: flex; flex-direction: column; gap: 3px; background: #2b2b2b; padding: 5px; border-radius: 8px; }
.nsboxes i { display: block; width: 26px; height: 16px; border-radius: 4px; background: #555; font-style: normal; font-size: 10px; text-align: center; line-height: 16px; }
.nsboxes i.on { background: #000; box-shadow: inset 0 0 0 2px #777; }
.nsboxes i.buy { background: #ff9a1a; }
.nstext { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.nstext b { font: 17px "Luckiest Guy", Impact; color: #5a3200; letter-spacing: .5px; }
.nstext small { font-size: 12px; font-weight: 600; color: #8a6a40; }
/* in-game stickers */
#stkBtn { position: absolute; right: 22px; bottom: 22px; z-index: 4; width: 50px; height: 50px; border-radius: 50%; display: none; align-items: center; justify-content: center;
  font-size: 28px; border: 3px solid #7a3a00; background: linear-gradient(#ffe27a, #ffb43a); box-shadow: 0 4px 0 #7a3a00, 0 6px 14px rgba(0,0,0,.35); cursor: pointer; padding: 0; }
#stkBtn:hover { transform: scale(1.08); } #stkBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a3a00; }
#stkPick { position: absolute; right: 18px; bottom: 82px; z-index: 5; width: 300px; display: none; flex-wrap: wrap; gap: 5px; padding: 8px;
  background: #fff8e6; border: 4px solid #7a3a00; border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.45); }
#stkPick.on { display: flex; animation: cmIn .12s ease-out; }
#stkPick button { width: calc(25% - 4px); border: 2px solid #f0c98a; background: #fff; border-radius: 10px; padding: 4px 0 3px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
#stkPick button:hover { background: #ffe2b0; transform: scale(1.06); }
#stkPick button span { font-size: 26px; line-height: 1.1; }
#stkPick button small { font: 9px "Luckiest Guy", Impact; color: #7a3a00; white-space: nowrap; overflow: hidden; max-width: 64px; }
#stkPick .stkmore { width: 100%; text-align: center; font: 600 11px Fredoka, Arial; color: #8a6a40; padding-top: 2px; }
/* shop tabs + items */
.shoptabs { display: flex; gap: 6px; margin-bottom: 10px; }
.shoptabs button { flex: 1; font: 16px "Luckiest Guy", Impact; letter-spacing: .5px; border-radius: 10px; border: 2px solid #c88a2c; background: #fff; color: #8a5a00; padding: 7px 0 4px; cursor: pointer; }
.shoptabs button.on { background: linear-gradient(#3a8cff, #1a4fb0); color: #fff; border-color: #0d2e6e; }
.packs { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.pack { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid #f0c98a; border-radius: 12px; padding: 8px 10px; }
.pack.own { border-color: #8fd36f; background: #f4fff0; }
.pack .pinfo { flex: 1; min-width: 0; text-align: left; }
.pack .pinfo b { font: 16px "Luckiest Guy", Impact; color: #5a3200; letter-spacing: .5px; }
.pack .pinfo small { display: block; font-size: 11px; font-weight: 600; color: #8a6a40; }
.pack .pemo { display: flex; gap: 4px; margin-top: 3px; }
.pack .pemo span { font-size: 22px; background: #fff3d6; border-radius: 8px; padding: 1px 4px; }
.colors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.ccard { background: #fff; border: 3px solid #f0c98a; border-radius: 12px; padding: 6px 4px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ccard.eq { border-color: #3a8cff; }
.ccard b { font: 15px "Luckiest Guy", Impact; letter-spacing: .5px; }
.shead { font: 17px "Luckiest Guy", Impact; color: #5a3200; letter-spacing: .5px; margin-top: 10px; }
.rainbow { background: linear-gradient(90deg, #ff3b3b, #ff9a1a, #e6c400, #2fbf3a, #2f8cff, #9a3aff); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
/* ---------- profile ---------- */
.pfload { padding: 40px 0; font-weight: 700; color: #8a6a40; }
.pfhero { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; color: #fff; text-align: left; position: relative; overflow: hidden;
  border: 3px solid rgba(0,0,0,.35); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 4px 10px rgba(0,0,0,.2); }
.pfhero::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px); pointer-events: none; }
.tb-green { background: linear-gradient(135deg, #43c06b, #157a3c); }
.tb-blue { background: linear-gradient(135deg, #3a8cff, #1a3f9e); }
.tb-gold { background: linear-gradient(135deg, #ffb52e, #c25a00); }
.tb-legend { background: linear-gradient(135deg, #a64dff, #3b0d7a 60%, #e0379a); }
.pfav { position: relative; flex: none; z-index: 1; }
.pfav canvas { border-radius: 18px; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.35); display: block; }
.pflv { position: absolute; right: -8px; bottom: -8px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(#ffe06a, #f5a400); border: 3px solid #fff;
  color: #6a3a00; font: 15px "Luckiest Guy", Impact; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pfid { flex: 1; min-width: 0; z-index: 1; }
.pfname { font: 28px "Luckiest Guy", Impact; letter-spacing: .5px; line-height: 1.1; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfname.rainbow { text-shadow: none; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.pfrank { font-weight: 700; font-size: 14px; margin-top: 2px; } .pfrank b { font-family: "Luckiest Guy"; font-weight: 400; letter-spacing: .5px; font-size: 16px; }
.pfstars i { font-style: normal; color: rgba(255,255,255,.35); font-size: 15px; } .pfstars i.on { color: #ffd21f; text-shadow: 0 1px 0 #8a5a00; }
.pfsub { font-size: 12px; font-weight: 600; opacity: .9; margin-top: 3px; }
.pfshow { display: flex; flex-wrap: wrap; gap: 6px; width: 182px; justify-content: center; z-index: 1; background: rgba(0,0,0,.22); border-radius: 14px; padding: 8px 6px 4px; }
.pfshow small { width: 100%; text-align: center; font: 11px "Luckiest Guy", Impact; letter-spacing: .5px; opacity: .85; }
.avs canvas { border-radius: 10px; }
.pftabs { margin-top: 10px; }
.pfranks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pfrc { border-radius: 14px; padding: 8px 10px; color: #fff; display: flex; flex-direction: column; align-items: center; border: 3px solid rgba(0,0,0,.25); }
.pfrc.solo { background: linear-gradient(#3a8cff, #1a4fb0); } .pfrc.team { background: linear-gradient(#ff7a45, #c8400a); }
.pfrc small { font: 13px "Luckiest Guy", Impact; letter-spacing: .5px; opacity: .9; } .pfrc b { font: 24px "Luckiest Guy", Impact; letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.pfrc em { font-style: normal; font-size: 12px; font-weight: 700; opacity: .95; }
.pftiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pftile { background: #fff; border: 3px solid #f0c98a; border-radius: 12px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; }
.pftile span { font-size: 20px; } .pftile b { font: 18px "Luckiest Guy", Impact; color: #16264a; letter-spacing: .5px; } .pftile small { font-size: 11px; font-weight: 700; color: #8a6a40; }
.pfnote { font-size: 11px; color: #8a6a40; font-weight: 600; margin-top: 8px; }
.pfbtns { margin-top: 10px; display: flex; justify-content: center; gap: 8px; }
/* medals */
.medal { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; flex: none;
  background: radial-gradient(circle at 35% 30%, #f2f2f2, #9a9a9a); border: 3px solid #6d6d6d; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2), 0 2px 4px rgba(0,0,0,.3); }
.medal span { font-size: 22px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.3)); }
.medal.big { width: 52px; height: 52px; } .medal.big span { font-size: 25px; }
.medal.none { filter: grayscale(1); opacity: .45; }
.medal.empty { background: rgba(255,255,255,.15); border: 3px dashed rgba(255,255,255,.5); box-shadow: none; }
.medal.bronze { background: radial-gradient(circle at 35% 30%, #ffd2a6, #b8651e); border-color: #7a3d0a; }
.medal.silver { background: radial-gradient(circle at 35% 30%, #ffffff, #a9b6c6); border-color: #5f6d80; }
.medal.gold { background: radial-gradient(circle at 35% 30%, #fff6b0, #f0b400); border-color: #9a6a00; box-shadow: 0 0 10px rgba(255,200,0,.6), inset 0 -3px 0 rgba(0,0,0,.15); }
.medal.diamond { background: radial-gradient(circle at 35% 30%, #ffffff, #5fd8ff 55%, #7a5cff); border-color: #2d4fb0; box-shadow: 0 0 14px rgba(110,200,255,.85), inset 0 -3px 0 rgba(0,0,0,.15); animation: dshine 2.4s infinite; }
@keyframes dshine { 50% { box-shadow: 0 0 22px rgba(170,120,255,.95), inset 0 -3px 0 rgba(0,0,0,.15); } }
.achgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.achc { display: flex; align-items: center; gap: 9px; background: #fff; border: 3px solid #e8d4b0; border-radius: 12px; padding: 7px 8px; text-align: left; position: relative; }
.achc.bronze { border-color: #d59a62; } .achc.silver { border-color: #a9b6c6; } .achc.gold { border-color: #f0b400; background: #fffbea; } .achc.diamond { border-color: #6fbcff; background: #f1f8ff; }
.achi { flex: 1; min-width: 0; } .achi b { font: 15px "Luckiest Guy", Impact; color: #5a3200; letter-spacing: .5px; }
.achi small { display: block; font-size: 11px; font-weight: 600; color: #8a6a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.achi em { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: #b06a00; margin-top: 2px; }
.achbar { position: relative; height: 14px; background: #eadbc1; border-radius: 7px; overflow: hidden; margin-top: 3px; }
.achbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#7fe25f, #3aa524); border-radius: 7px; }
.achbar span { position: relative; display: block; text-align: center; font-size: 10px; font-weight: 800; line-height: 14px; color: #2c3a12; }
.pin { position: absolute; top: 4px; right: 4px; border: 0; background: none; font-size: 15px; cursor: pointer; opacity: .3; padding: 0; }
.pin.on { opacity: 1; } .pin:hover { opacity: .8; transform: scale(1.15); }
.lbcard { cursor: pointer; } .lbcard:hover { transform: translateY(-2px); }
/* achievement unlocked banner */
.achpop { position: absolute; left: 50%; top: 18px; z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px;
  background: linear-gradient(#2a2f5e, #141734); border: 3px solid #ffd21f; border-radius: 40px; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: achin .5s cubic-bezier(.2,1.6,.4,1); cursor: pointer; text-align: left; }
.achpop.diamond { border-color: #6fd8ff; } .achpop.silver { border-color: #cfd8e3; } .achpop.bronze { border-color: #d9873e; }
.achpop small { display: block; font: 12px "Luckiest Guy", Impact; letter-spacing: 1px; color: #ffd21f; }
.achpop b { display: block; font: 19px "Luckiest Guy", Impact; letter-spacing: .5px; } .achpop em { font-style: normal; font-weight: 800; font-size: 13px; color: #9dff7a; }
.achpop.out { transition: .4s; opacity: 0; transform: translate(-50%, -30px); }
@keyframes achin { from { transform: translate(-50%, -60px) scale(.6); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
#chMenu button.view { color: #1a4fb0; }
