* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #4aa3ff; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
body { font-family: "Press Start 2P", monospace; color: #fff; }
#cv { position: fixed; inset: 0; display: block; image-rendering: pixelated; }
#stage { position: fixed; left: 0; top: 0; width: 480px; height: 960px; transform-origin: 0 0; pointer-events: none; }
#stage > * { pointer-events: auto; }
button { font-family: inherit; color: inherit; border: 0; cursor: pointer; }

/* ---------- screens ---------- */
/* glossy cartoon font for the lobby and the dog game (the mine keeps its pixel font) */
body[data-screen="lobby"], body[data-screen="dog"], body[data-screen="lobby"] button, body[data-screen="dog"] button { font-family: "Rubik", "Arial Black", sans-serif; font-weight: 900; }
body[data-screen="dog"] #winVal, body[data-screen="lobby"] .bal b, body[data-screen="dog"] .bal b { font-size: 20px; }
body[data-screen="dog"] #winLabel, body[data-screen="dog"] #bet small { font-size: 11px; }
body[data-screen="dog"] #bet b { font-size: 16px; }
body[data-screen="dog"] #gameTitle { font-size: 18px; top: 24px; }
body[data-screen="dog"] #lineInfo { font-size: 14px; }
body[data-screen="dog"] .big h1 { font-size: 46px; }
body[data-screen="dog"] .big .amount { font-size: 40px; }
body[data-screen="dog"] .big .sub { font-size: 14px; }
body[data-screen="dog"] .paw .pb { font-size: 30px; }
body[data-screen="lobby"] .neon { font-size: 56px; letter-spacing: 1px; top: 120px; }
body[data-screen="lobby"] .neon small { font-size: 14px; margin-top: 6px; letter-spacing: 4px; }
body[data-screen="lobby"] .gname { font-size: 26px; }
body[data-screen="lobby"] .gtag { font-size: 11px; }
body[data-screen="lobby"] .gplay { font-size: 18px; }
body[data-screen="lobby"] #daily { font-size: 18px; }
body[data-screen="lobby"] .ticker span { font-size: 13px; padding-top: 9px; }
body[data-screen="lobby"] .panel h2, body[data-screen="dog"] .panel h2 { font-size: 24px; }
body[data-screen="lobby"] .panel p, body[data-screen="dog"] .panel p, body[data-screen="dog"] .rules td { font-size: 13px; font-weight: 700; }

/* ---------- casino lobby ---------- */
body[data-screen="lobby"] #top { display: none; }
.lhead { position: absolute; left: 10px; top: 10px; width: 460px; height: 72px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 6px;
  background: linear-gradient(rgba(60,20,90,.88), rgba(25,8,45,.92)); border: 2px solid rgba(255,211,77,.7); border-radius: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.18); }
.lava { position: relative; width: 60px; height: 60px; border-radius: 50%; padding: 0; background: radial-gradient(circle at 40% 35%, #ffe9a0, #f2a91b 60%, #a85a00); border: 3px solid #fff3c0; box-shadow: 0 0 14px rgba(255,200,60,.6); flex: none; }
.lava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.lvlbadge { position: absolute; right: -6px; bottom: -4px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; font-style: normal; font-size: 13px; line-height: 20px; color: #fff; background: linear-gradient(#ff6b8a, #c4185a); border: 2px solid #fff; }
.lwho { flex: 1; min-width: 0; }
.lwho b { display: block; font-size: 18px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 #000; }
.lxp { position: relative; margin-top: 6px; height: 16px; border-radius: 8px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25); overflow: hidden; }
.lxp i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #7dfcff, #4d7cff, #c77dff); transition: width .8s cubic-bezier(.3,1.4,.5,1); }
.lxp span { position: absolute; inset: 0; text-align: center; font-size: 10px; line-height: 15px; color: #fff; text-shadow: 0 1px 0 #000; }
.lbal { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 16px; background: rgba(0,0,0,.45); border: 2px solid #ffd34d; }
.lbal b { font-size: 17px; color: #ffe14a; text-shadow: 0 2px 0 #7a3d00; white-space: nowrap; }
.lbal.pop { animation: bump .35s ease-out; }
.lcoin { width: 22px; height: 22px; border-radius: 50%; background: url(../img/dog/scatter.png) center/contain no-repeat; }
#lPlus { width: 30px; height: 30px; border-radius: 10px; font-size: 22px; line-height: 24px; color: #04300f; background: linear-gradient(#8dffaa, #18b24a); border: 2px solid #fff; box-shadow: 0 3px 0 #063d16; }
.hero { position: absolute; left: 14px; top: 94px; width: 452px; height: 214px; border-radius: 24px; overflow: hidden; border: 3px solid #ffd34d; box-shadow: 0 10px 24px rgba(0,0,0,.5), 0 0 26px rgba(255,200,60,.35); }
.hslide { position: absolute; inset: 0; display: flex; transition: transform .6s cubic-bezier(.6,0,.3,1), opacity .6s; cursor: pointer; }
.hslide.dog { background: radial-gradient(circle at 75% 40%, #4fb6ff, #1a4fa8 60%, #0d2a66); }
.hslide.mine { background: radial-gradient(circle at 75% 40%, #c77dff, #5a2a9a 60%, #24104a); }
.hslide.off { transform: translateX(105%); opacity: 0; }
.hslide.gone { transform: translateX(-105%); opacity: 0; }
.htext { flex: 1; padding: 18px 0 0 20px; z-index: 2; }
.htag { display: inline-block; padding: 5px 10px; border-radius: 10px; font-size: 11px; color: #fff; background: linear-gradient(#ff6b4a, #c4281c); box-shadow: 0 3px 0 #6a1208; }
.htext h3 { margin: 10px 0 6px; font-size: 32px; line-height: 1; color: #fff; text-shadow: 0 3px 0 #000, 0 0 18px rgba(255,220,120,.6); }
.htext p { margin: 0; font-size: 12px; line-height: 1.5; font-weight: 700; color: #e6eaff; text-shadow: 0 1px 0 #000; }
.hplay { margin-top: 12px; padding: 10px 26px; border-radius: 14px; font-size: 16px; color: #3a1d00; background: linear-gradient(#fff07a, #f2a91b); border: 3px solid #fff3c0; box-shadow: 0 4px 0 #7a3d00, 0 0 16px rgba(255,210,60,.7); animation: pulse 1.4s ease-in-out infinite; }
.hart { width: 200px; margin: 10px 10px 10px 0; border-radius: 18px; background-size: cover; background-position: center; box-shadow: 0 8px 16px rgba(0,0,0,.45); transform: rotate(3deg); }
.hslide.mine .hart { image-rendering: pixelated; transform: rotate(-3deg); }
.hdots { position: absolute; left: 20px; bottom: 10px; display: flex; gap: 6px; z-index: 3; }
.hdots i { width: 9px; height: 9px; border-radius: 5px; background: rgba(255,255,255,.4); transition: width .3s; }
.hdots i.on { width: 22px; background: #ffd34d; }
.lsec { position: absolute; left: 18px; width: 444px; display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; color: #fff; text-shadow: 0 2px 0 #000; }
.lsec em { font-style: normal; font-size: 11px; color: #ffe14a; font-weight: 700; }
#secGames { top: 318px; }
#secDaily { top: 726px; }
.ggrid { position: absolute; left: 14px; top: 346px; width: 452px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gtile { position: relative; height: 176px; border-radius: 20px; overflow: hidden; cursor: pointer; border: 3px solid #ffd34d; box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 16px rgba(255,200,60,.35); transition: transform .15s; }
.gtile:active { transform: scale(.95); }
.gtile .gimg { position: absolute; inset: 0; background-size: cover; background-position: center 35%; transition: transform .5s; }
.gtile .gimg.pix { image-rendering: pixelated; }
.gtile:hover .gimg { transform: scale(1.07); }
.gtile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(10,4,30,.9)); }
.gtile b { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; text-align: center; font-size: 17px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255,220,120,.6); }
.gtile.soon { cursor: default; border-color: #8a6ad8; box-shadow: 0 6px 0 rgba(0,0,0,.35); filter: saturate(.85); }
.gbadge { position: absolute; top: 10px; left: 10px; z-index: 3; padding: 4px 9px; border-radius: 9px; font-size: 11px; color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.gbadge.hot { background: linear-gradient(#ff6b4a, #c4281c); }
.gbadge.new { background: linear-gradient(#5ce1ff, #1a74e0); }
.gbadge.soon { background: linear-gradient(#b28cff, #5a2fb5); }
.gtile .shine { animation-duration: 4.2s; }
.dstrip { position: absolute; left: 14px; top: 752px; width: 452px; height: 98px; display: flex; gap: 5px; padding: 6px; border-radius: 20px; background: linear-gradient(rgba(60,20,90,.85), rgba(25,8,45,.9)); border: 2px solid rgba(255,211,77,.6); }
.dday { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 4px 0; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 9px; color: #c9b8ff; cursor: pointer; }
.dday img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.5)); }
.dday b { font-size: 11px; color: #ffe14a; text-shadow: 0 1px 0 #000; }
.dday.done { opacity: .45; }
.dday.done::after { content: "✓"; position: absolute; top: 18px; font-size: 26px; color: #8dffaa; text-shadow: 0 2px 0 #000; }
.dday.now { background: linear-gradient(#fff07a33, #f2a91b55); outline: 2px solid #ffd34d; animation: pulse 1.1s ease-in-out infinite; }
.dday.big { flex: 1.25; }
#bnav { position: absolute; left: 0; top: 866px; width: 480px; height: 94px; display: flex; padding: 6px 10px 10px; gap: 6px;
  background: linear-gradient(rgba(40,12,70,.96), rgba(16,4,34,.98)); border-top: 2px solid rgba(255,211,77,.7); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 20px rgba(0,0,0,.45); }
#bnav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 16px; background: transparent; color: #b9a6e8; font-size: 11px; transition: transform .15s, background .2s; }
#bnav button img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.5)); transition: transform .2s; }
#bnav button.on { color: #ffe14a; background: rgba(255,211,77,.12); }
#bnav button.on img { transform: scale(1.12) translateY(-3px); }
#bnav button:active { transform: scale(.92); }
#bnav .dot { position: absolute; top: 6px; right: 26px; width: 14px; height: 14px; border-radius: 50%; background: #ff3b5c; border: 2px solid #fff; display: none; animation: pulse 1s infinite; }
#bnav .dot.on { display: block; }

/* glossy modals (lobby + dog game) */
body[data-screen="lobby"] .panel, body[data-screen="dog"] .panel {
  font-family: "Rubik", sans-serif; background: linear-gradient(160deg, #3a1670, #1c0a3c 70%); border: 3px solid #ffd34d; border-radius: 26px;
  box-shadow: 0 10px 0 #0c0420, 0 0 40px rgba(180,120,255,.35), inset 0 1px 0 rgba(255,255,255,.2); }
body[data-screen="lobby"] .panel .btn, body[data-screen="dog"] .panel .btn { font-family: "Rubik", sans-serif; font-weight: 900; font-size: 18px; padding: 14px 34px; border-radius: 16px;
  background: linear-gradient(#fff07a, #f2a91b); color: #3a1d00; border: 3px solid #fff3c0; box-shadow: 0 5px 0 #7a3d00, 0 0 18px rgba(255,210,60,.6); }
.avas { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.avas button { width: 70px; height: 70px; border-radius: 50%; padding: 0; background: radial-gradient(circle at 40% 35%, #6a3fb5, #2c1470); border: 3px solid rgba(255,255,255,.3); transition: transform .15s; }
.avas button img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avas button.sel { border-color: #ffd34d; box-shadow: 0 0 16px rgba(255,210,60,.9); transform: scale(1.1); }
input.gname2 { width: 100%; padding: 14px 16px; font-family: "Rubik", sans-serif; font-weight: 800; font-size: 20px; text-align: center; color: #fff; border-radius: 16px; border: 3px solid #ffd34d; background: rgba(0,0,0,.4); outline: none; }
input.gname2:focus { box-shadow: 0 0 18px rgba(255,210,60,.6); }
.welcome h2 { font-size: 30px !important; }
.welcome .sub2 { font-size: 14px; color: #c9b8ff; font-weight: 700; margin: 4px 0 10px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.stats div { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.07); font-size: 11px; color: #c9b8ff; font-weight: 700; }
.stats b { display: block; margin-top: 4px; font-size: 18px; color: #ffe14a; }
.wheelbox { position: relative; width: 320px; height: 330px; margin: 6px auto 0; }
.wheelbox canvas { position: absolute; left: 0; top: 10px; width: 320px; height: 320px; transition: transform 5s cubic-bezier(.12,.75,.12,1); }
.wheelbox .ptr { position: absolute; left: 50%; top: -14px; width: 56px; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 4px 3px rgba(0,0,0,.5)); }
.bonusrow { display: flex; gap: 10px; align-items: center; margin: 10px 0; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.07); text-align: left; }
.bonusrow img { width: 64px; height: 64px; object-fit: contain; }
.bonusrow div { flex: 1; font-size: 13px; font-weight: 700; color: #e6dcff; }
.bonusrow div b { display: block; font-size: 18px; color: #fff; }
.bonusrow button { padding: 12px 14px; border-radius: 14px; font-size: 14px; color: #3a1d00; background: linear-gradient(#fff07a, #f2a91b); border: 2px solid #fff3c0; box-shadow: 0 4px 0 #7a3d00; }
.bonusrow button:disabled { background: #4a3a6a; color: #b9a6e8; box-shadow: none; border-color: #6a5a8a; filter: none; }

/* ---------- dog game: glossy blue & gold UI ---------- */
body[data-screen="dog"] #controls .sq, body[data-screen="dog"] #btnBack, body[data-screen="dog"] .topbtns button, body[data-screen="lobby"] .topbtns button {
  color: #fff; text-shadow: 0 2px 0 #0b2d6b; background: linear-gradient(#7cc4ff, #2b7be0 55%, #1a4fa8); border: 3px solid #ffe08a; box-shadow: 0 4px 0 #0b2d6b, inset 0 2px 0 rgba(255,255,255,.5); border-radius: 14px; }
body[data-screen="dog"] #turbo.on { background: linear-gradient(#fff07a, #f2a91b); color: #4a2500; text-shadow: none; }
body[data-screen="dog"] #auto.on { background: linear-gradient(#8dffaa, #18b24a); color: #04300f; text-shadow: none; }
body[data-screen="dog"] #bet, body[data-screen="dog"] #winbar, body[data-screen="dog"] .bal, body[data-screen="lobby"] .bal {
  background: linear-gradient(rgba(16,28,74,.92), rgba(8,14,40,.92)); border: 3px solid #ffd34d; border-radius: 16px; box-shadow: 0 5px 0 rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.15); }
body[data-screen="dog"] #winLabel, body[data-screen="dog"] #bet small { color: #9fd0ff; }
body[data-screen="dog"] #winVal { color: #ffe14a; text-shadow: 0 2px 0 #7a3d00, 0 0 12px rgba(255,200,60,.6); }
body[data-screen="dog"] #spin { width: 104px; height: 104px; left: 188px; top: -6px; font-size: 52px;
  background: radial-gradient(circle at 38% 30%, #fff7b0 0 8%, #ffd23f 30%, #f29a12 70%, #b85d00); border: 5px solid #fff3c0; box-shadow: 0 7px 0 #7a3d00, 0 0 34px rgba(255,200,60,.8); }
body[data-screen="dog"] #spin span { text-shadow: 0 3px 0 #7a3d00; color: #fff; }
body[data-screen="dog"] #fsbar { font-family: "Rubik", sans-serif; font-weight: 900; font-size: 18px; top: 104px; background: linear-gradient(#6a3fb5, #2c1470); border: 3px solid #ffd34d; border-radius: 16px; }
body[data-screen="dog"] .panel { background: linear-gradient(#1f3a8a, #0f1d4a); border-color: #ffd34d; box-shadow: 0 8px 0 #07102a, 0 20px 40px rgba(0,0,0,.6); }
.paw .pf { background: radial-gradient(circle, #5a2fb5, #2c1470) !important; }
.paw .pf img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
.banner { position: relative; width: 460px; margin: 0 auto; }
.banner img { width: 100%; display: block; filter: drop-shadow(0 8px 12px rgba(0,0,0,.5)); animation: popIn .5s cubic-bezier(.3,1.8,.6,1); }
.banner h1 { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-58%); font-size: 34px !important; color: #fff6c8 !important;
  text-shadow: 0 3px 0 #7a1208, 0 0 14px rgba(255,220,120,.8) !important; animation: none !important; }
body[data-screen="lobby"] .gameonly { display: none !important; }
body:not([data-screen="lobby"]) .lobbyonly { display: none !important; }
body[data-screen="lobby"] { background: #1a0b2e; }
body[data-screen="dog"] #btnBuy { display: none; }
body[data-screen="dog"] #winbar { left: 90px; width: 300px; }
#btnBack { position: absolute; left: 12px; top: 14px; width: 48px; height: 44px; font-size: 18px; color: #ffe14a; background: #2c1a0c; border: 3px solid #c9a25a; border-radius: 10px; box-shadow: 0 4px 0 #6b4a1c; }
#btnBack:active { transform: translateY(3px); box-shadow: 0 1px 0 #6b4a1c; }
#gameTitle { position: absolute; left: 70px; top: 26px; font-size: 13px; color: #ffe14a; text-shadow: 2px 2px 0 #000, 0 0 10px rgba(255,200,60,.6); white-space: nowrap; }
#lineInfo { position: absolute; left: 0; width: 480px; top: 770px; text-align: center; font-size: 9px; color: #fff; text-shadow: 2px 2px 0 #000, 0 0 6px #000; pointer-events: none; }

/* ---------- lobby ---------- */
#lobbyUI { position: absolute; inset: 0; pointer-events: none; }
#lobbyUI > * { pointer-events: auto; }
.neon { position: absolute; left: 0; width: 480px; top: 128px; text-align: center; font-size: 38px; color: #fff6c8; letter-spacing: 2px;
  text-shadow: 0 0 6px #ffd34d, 0 0 14px #ff9f1c, 0 0 28px #ff4d8d, 4px 4px 0 #6a1b3a; animation: neon 3.2s infinite; }
.neon small { display: block; margin-top: 12px; font-size: 10px; color: #7dfcff; letter-spacing: 3px; text-shadow: 0 0 8px #2ee6ff, 2px 2px 0 #000; }
.gcards { position: absolute; left: 14px; top: 248px; width: 452px; display: flex; gap: 14px; }
.gcard { position: relative; flex: 1; height: 420px; border-radius: 16px; overflow: hidden; cursor: pointer; border: 4px solid #ffd34d;
  background: #20102e; box-shadow: 0 8px 0 #7a4a00, 0 0 24px rgba(255,200,60,.55); animation: floaty 3s ease-in-out infinite; transition: transform .15s; }
.gcard.dog { border-color: #7dfcff; box-shadow: 0 8px 0 #0b3a7a, 0 0 24px rgba(80,220,255,.55); animation-delay: -1.5s; }
.gcard:active { transform: scale(.96); }
.gart { position: absolute; inset: 0; background-size: cover; background-position: center; image-rendering: pixelated; transition: transform .4s; }
.gcard:hover .gart { transform: scale(1.06); }
.gcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(10,4,24,.92) 78%); }
.gname, .gtag, .gplay { position: absolute; left: 0; width: 100%; text-align: center; z-index: 2; }
.gname { bottom: 104px; font-size: 18px; line-height: 1.35; color: #ffe14a; text-shadow: 3px 3px 0 #000, 0 0 12px rgba(255,200,60,.7); }
.gcard.dog .gname { color: #fff; text-shadow: 3px 3px 0 #000, 0 0 12px rgba(80,220,255,.9); }
.gtag { bottom: 76px; font-size: 7px; color: #f0e6d0; text-shadow: 1px 1px 0 #000; padding: 0 8px; line-height: 1.6; }
.gplay { bottom: 18px; left: 18px; width: calc(100% - 36px); padding: 14px 0; font-size: 13px; color: #04300f; border-radius: 12px;
  background: linear-gradient(#8dffaa, #18b24a); border: 3px solid #063d16; box-shadow: 0 4px 0 #063d16; animation: pulse 1.4s ease-in-out infinite; }
.gcard.dog .gplay { color: #062a4a; background: linear-gradient(#a6f0ff, #2a9df0); border-color: #0b3a7a; box-shadow: 0 4px 0 #0b3a7a; }
.shine { position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; z-index: 3; pointer-events: none; transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: shine 3.6s ease-in-out infinite; }
.gcard.dog .shine { animation-delay: -1.8s; }
.ribbon { position: absolute; top: 14px; right: -34px; z-index: 4; width: 130px; padding: 6px 0; text-align: center; font-size: 9px; transform: rotate(40deg); color: #fff; text-shadow: 1px 1px 0 #000; box-shadow: 0 3px 6px rgba(0,0,0,.4); }
.ribbon.hot { background: linear-gradient(#ff6b4a, #c4281c); }
.ribbon.new { background: linear-gradient(#5ce1ff, #1a74e0); }
#daily { position: absolute; left: 60px; top: 700px; width: 360px; height: 62px; font-size: 13px; line-height: 1.6; color: #fff; text-shadow: 2px 2px 0 #000;
  background: linear-gradient(#6a3fb5, #3d1f7a); border: 3px solid #b28cff; border-radius: 14px; box-shadow: 0 5px 0 #20104a; }
#daily b { color: #ffe14a; }
#daily.ready { color: #3a1d00; text-shadow: none; background: linear-gradient(#fff07a, #f2a91b); border-color: #7a4a00; box-shadow: 0 5px 0 #7a4a00, 0 0 30px rgba(255,210,60,.9); animation: wobble 1s ease-in-out infinite; }
#daily:active { transform: translateY(3px); }
.ticker { position: absolute; left: 0; top: 800px; width: 480px; height: 34px; overflow: hidden; background: rgba(10,4,24,.75); border-top: 2px solid #ffd34d; border-bottom: 2px solid #ffd34d; }
.ticker span { display: inline-block; white-space: nowrap; padding-top: 11px; font-size: 10px; color: #ffe14a; animation: marquee 18s linear infinite; }
.chestbig img { width: 140px; image-rendering: pixelated; margin-top: 18px; animation: bump .8s ease-out; }

/* dog free-spin paws */
.paws { display: grid; grid-template-columns: repeat(3, 84px); gap: 12px; justify-content: center; margin-top: 22px; perspective: 600px; }
.paw { position: relative; width: 84px; height: 84px; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3,1.5,.6,1); }
.paw > div { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 14px; backface-visibility: hidden; border: 3px solid #ffd34d; }
.paw .pf { font-size: 34px; background: linear-gradient(#6a3fb5, #3d1f7a); }
.paw .pb { transform: rotateY(180deg); font-size: 20px; color: #3a1d00; background: linear-gradient(#fff07a, #f2a91b); }
.paw .pb.v2 { background: linear-gradient(#a6f0ff, #2a9df0); color: #062a4a; }
.paw .pb.v3 { background: linear-gradient(#ff9a8a, #e0304a); color: #fff; text-shadow: 2px 2px 0 #000; }
.paw.open { transform: rotateY(180deg) scale(1.05); }

/* ---------- top bar ---------- */
#top { position: absolute; left: 0; top: 0; width: 480px; height: 120px; pointer-events: none; }
#top > * { pointer-events: auto; }
.logo { position: absolute; left: 14px; top: 14px; font-size: 24px; color: #ffe14a; letter-spacing: 1px;
  text-shadow: 3px 3px 0 #8a4b00, -2px -2px 0 #3a1d00, 2px -2px 0 #3a1d00, -2px 2px 0 #3a1d00, 0 6px 12px rgba(0,0,0,.4); }
.logo span { display: block; font-size: 8px; color: #fff; margin-top: 8px; text-shadow: 2px 2px 0 #000; letter-spacing: 2px; }
.bal { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px;
  background: linear-gradient(#2c1a0c, #1a0f06); border: 3px solid #c9a25a; border-radius: 10px; box-shadow: 0 4px 0 #6b4a1c, 0 6px 14px rgba(0,0,0,.4); }
.bal b { font-size: 16px; color: #ffe14a; text-shadow: 2px 2px 0 #000; min-width: 90px; text-align: right; }
.bal.bump { animation: bump .35s ease-out; }
.coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3a0, #f5bb1c 55%, #b97a06); border: 2px solid #3a2400; display: inline-block; position: relative; }
.coin::after { content: "₴"; position: absolute; inset: 0; font: 11px/18px Arial, sans-serif; font-weight: 900; color: #8a5300; text-align: center; }
.topbtns { position: absolute; right: 12px; top: 64px; display: flex; gap: 6px; }
.topbtns button { width: 40px; height: 36px; font-size: 16px; background: #2c1a0c; border: 2px solid #c9a25a; border-radius: 8px; box-shadow: 0 3px 0 #6b4a1c; }
.topbtns button:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b4a1c; }
#player { position: absolute; left: 16px; top: 72px; font-size: 9px; color: #fff; text-shadow: 2px 2px 0 #000; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- bottom ---------- */
#btnBuy { position: absolute; left: 10px; top: 808px; width: 150px; height: 42px; font-size: 10px; line-height: 14px; color: #3a1d00;
  background: linear-gradient(#ffe36b, #f2a91b); border: 3px solid #7a4a00; border-radius: 10px; box-shadow: 0 4px 0 #7a4a00, 0 0 18px rgba(255,210,60,.6);
  animation: glowPulse 1.6s ease-in-out infinite; }
#btnBuy:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a4a00; }
#winbar { position: absolute; left: 168px; top: 808px; width: 302px; height: 42px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(20,10,4,.82); border: 3px solid #c9a25a; border-radius: 10px; }
#winLabel { font-size: 9px; color: #c9a25a; }
#winVal { font-size: 15px; color: #ffe14a; text-shadow: 2px 2px 0 #000; }
#winVal.pop { animation: bump .25s ease-out; }
#multChip { font-style: normal; font-size: 12px; color: #3a1d00; background: #ffe14a; border-radius: 6px; padding: 4px 6px; display: none; }
#multChip.on { display: inline-block; animation: bump .3s ease-out; }
#fsbar { position: absolute; left: 140px; top: 96px; width: 200px; text-align: center; font-size: 12px; padding: 8px 0; color: #fff;
  background: rgba(40,20,90,.85); border: 3px solid #b28cff; border-radius: 10px; text-shadow: 2px 2px 0 #000; }
#fsbar b { color: #7ffcff; }
#chanceTag { position: absolute; left: 10px; top: 784px; font-size: 8px; padding: 4px 8px; color: #062; background: #7dffb0; border-radius: 6px; border: 2px solid #0a5; }

#controls { position: absolute; left: 0; top: 858px; width: 480px; height: 96px; }
#controls .sq { position: absolute; top: 24px; height: 50px; font-size: 22px; background: linear-gradient(#5a3c22, #3b2716); border: 3px solid #c9a25a; border-radius: 10px; box-shadow: 0 4px 0 #2a1a0b; }
#controls .sq:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #2a1a0b; }
#betMinus { left: 10px; width: 46px; }
#betPlus { left: 140px; width: 46px; }
#bet { position: absolute; left: 58px; top: 24px; width: 80px; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(20,10,4,.82); border: 3px solid #c9a25a; border-radius: 10px; }
#bet small { font-size: 7px; color: #c9a25a; }
#bet b { font-size: 12px; color: #fff; }
#spin { position: absolute; left: 192px; top: 0; width: 96px; height: 96px; border-radius: 50%; font-size: 46px; color: #fff;
  background: radial-gradient(circle at 40% 35%, #6dff8f, #18b24a 60%, #0b7a2e); border: 4px solid #063d16; box-shadow: 0 6px 0 #063d16, 0 0 24px rgba(80,255,120,.45); }
#spin span { display: inline-block; text-shadow: 3px 3px 0 #063d16; }
#spin:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #063d16; }
#spin.busy span { animation: spinIcon .6s linear infinite; }
#spin.stop { background: radial-gradient(circle at 40% 35%, #ff8a7a, #d63a2a 60%, #8a1a10); border-color: #4a0b05; box-shadow: 0 6px 0 #4a0b05; }
#turbo { left: 300px; width: 52px; }
#turbo.on { background: linear-gradient(#ffe36b, #f2a91b); color: #3a1d00; border-color: #7a4a00; }
#auto { left: 360px; width: 108px; font-size: 11px !important; }
#auto.on { background: linear-gradient(#7dffb0, #18b24a); color: #04300f; border-color: #063d16; }
button:disabled { filter: grayscale(.7) brightness(.7); cursor: default; }

/* ---------- overlays ---------- */
#overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5,3,15,.72); z-index: 10; animation: fadeIn .2s; }
#overlay[hidden] { display: none; }
.panel { width: 440px; max-height: 860px; overflow-y: auto; padding: 22px 18px; background: linear-gradient(#3b2716, #24170c); border: 4px solid #c9a25a; border-radius: 14px;
  box-shadow: 0 8px 0 #1a0f06, 0 20px 40px rgba(0,0,0,.6); animation: popIn .35s cubic-bezier(.3,1.6,.6,1); text-align: center; }
.panel h2 { margin: 0 0 16px; font-size: 18px; color: #ffe14a; text-shadow: 3px 3px 0 #000; line-height: 1.5; }
.panel p { font-size: 10px; line-height: 1.8; color: #f0e6d0; margin: 8px 0; text-align: left; }
.panel .btn { display: inline-block; margin-top: 14px; padding: 14px 22px; font-size: 12px; background: linear-gradient(#6dff8f, #18b24a); color: #04300f; border: 3px solid #063d16; border-radius: 10px; box-shadow: 0 4px 0 #063d16; }
.panel .btn.gray { background: linear-gradient(#777, #444); color: #fff; border-color: #222; box-shadow: 0 4px 0 #222; }
.panel .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #063d16; }
.cards { display: flex; gap: 12px; }
.card { flex: 1; padding: 14px 8px; border-radius: 12px; background: linear-gradient(#f4ecd8, #d8c9a4); color: #2a1500; border: 3px solid #fff; }
.card h3 { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: #fff; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000; }
.card .art { height: 92px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 10px; }
.card .art img { width: 48px; height: 48px; image-rendering: pixelated; }
.card.chance .art { background: linear-gradient(#2fd0c8, #1a7f9a); }
.card.buy .art { background: linear-gradient(#5aa0ff, #2a4fa0); }
.card .risk { font-size: 8px; margin-bottom: 10px; }
.card p { color: #4a2c10 !important; text-align: center; font-size: 8px !important; }
.card .risk i { display: inline-block; width: 10px; height: 10px; margin: 0 2px; background: #c4c4c4; transform: rotate(45deg); }
.card .risk i.on { background: #e0304a; }
.card button { width: 100%; padding: 12px 4px; font-size: 11px; line-height: 1.6; border-radius: 10px; color: #fff; text-shadow: 2px 2px 0 #000; }
.card.chance button { background: linear-gradient(#6dff8f, #18b24a); border: 3px solid #063d16; box-shadow: 0 4px 0 #063d16; }
.card.chance button.active { background: linear-gradient(#ff8a7a, #d63a2a); border-color: #4a0b05; }
.card.buy button { background: linear-gradient(#6fc0ff, #1a74e0); border: 3px solid #0b3a7a; box-shadow: 0 4px 0 #0b3a7a; }
.card button b { color: #fff36b; }
.betrow { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 11px; }
.betrow button { width: 40px; height: 36px; font-size: 18px; background: #2c1a0c; border: 2px solid #c9a25a; border-radius: 8px; }

.big { text-align: center; animation: popIn .5s cubic-bezier(.3,1.8,.6,1); }
.big h1 { margin: 0; font-size: 34px; line-height: 1.4; color: #ffe14a; text-shadow: 4px 4px 0 #8a4b00, -3px -3px 0 #3a1d00, 3px -3px 0 #3a1d00, -3px 3px 0 #3a1d00; animation: wobble 1.2s ease-in-out infinite; }
.big h1.epic { color: #7ffcff; text-shadow: 4px 4px 0 #134a8a, -3px -3px 0 #071a33, 3px -3px 0 #071a33, -3px 3px 0 #071a33; }
.big h1.night { color: #d8c2ff; text-shadow: 4px 4px 0 #3d1f7a, -3px -3px 0 #120830, 3px -3px 0 #120830, -3px 3px 0 #120830; }
.big .amount { margin-top: 22px; font-size: 30px; color: #fff; text-shadow: 3px 3px 0 #000; }
.big .sub { margin-top: 18px; font-size: 10px; color: #fff; text-shadow: 2px 2px 0 #000; line-height: 1.8; }
.big .tap { margin-top: 30px; font-size: 8px; color: #ccc; animation: blink 1s steps(2) infinite; }

.rules table { width: 100%; border-collapse: collapse; font-size: 9px; margin: 8px 0; }
.rules td { padding: 5px 4px; border-bottom: 1px solid rgba(201,162,90,.3); text-align: left; }
.rules td img { width: 28px; height: 28px; image-rendering: pixelated; vertical-align: middle; }
.lb { width: 100%; font-size: 10px; border-collapse: collapse; }
.lb td { padding: 10px 6px; border-bottom: 1px solid rgba(201,162,90,.3); text-align: left; }
.lb tr.me td { color: #ffe14a; }
.lb td.r { text-align: right; }
.autogrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.autogrid button { padding: 14px 0; font-size: 13px; background: #2c1a0c; border: 3px solid #c9a25a; border-radius: 10px; }
input.name { width: 100%; padding: 12px; font-family: inherit; font-size: 12px; border-radius: 8px; border: 3px solid #c9a25a; background: #1a0f06; color: #fff; }

#toast { position: absolute; left: 50%; top: 340px; transform: translateX(-50%); padding: 12px 16px; font-size: 10px; background: rgba(0,0,0,.85); border: 2px solid #ffe14a; border-radius: 8px; z-index: 20; white-space: nowrap; }

@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wobble { 0%,100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.08); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spinIcon { to { transform: rotate(360deg); } }
@keyframes neon { 0%, 18%, 22%, 62%, 66%, 100% { opacity: 1; } 20%, 64% { opacity: .55; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 4px 0 #7a4a00, 0 0 10px rgba(255,210,60,.4); } 50% { box-shadow: 0 4px 0 #7a4a00, 0 0 24px rgba(255,210,60,.9); } }
