@font-face { font-family: Nun; src: url('/blup3ts/fonts/Nunito.ttf') format('truetype'); font-weight: 200 1000; font-display: swap; }
:root { --cyan:#48D8FC; --blue:#1E6FD9; --gold:#F2C94C; --card:#141B24; --card2:#1C2633; --dim:#9AA7B6; --pink:#FF5C8A; }
* { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }
html { -webkit-text-size-adjust:100%; }
html.desk body, body.desk { height:var(--vvh, 100svh); max-height:var(--vvh, 100svh); padding:calc(36px + 12px + env(safe-area-inset-top, 0px)) max(28px, 4vw) max(12px, env(safe-area-inset-bottom, 0px)); align-items:stretch; overflow:hidden; }
.boot {
  position:fixed; inset:0; z-index:9999; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px;
  background:radial-gradient(circle at 30% 10%, #12305a 0, #070b18 55%, #03040a 100%); color:#fff; font-family:Nun,-apple-system,"Segoe UI",Roboto,sans-serif;
}
.boot[hidden] { display:none !important; }
.boot__mark { font-weight:1000; font-size:42px; letter-spacing:-1px; }
.boot__mark span { color:var(--cyan); text-shadow:0 0 22px rgba(72,216,252,.5); }
.boot__bar { width:min(220px, 50vw); height:6px; border-radius:999px; background:#1c2633; overflow:hidden; }
.boot__bar i { display:block; height:100%; width:40%; border-radius:inherit; background:linear-gradient(90deg,#48D8FC,#1E6FD9); animation:bootslide 1.1s ease-in-out infinite; }
.boot__msg { font-size:14px; font-weight:800; color:var(--dim); letter-spacing:.04em; text-transform:uppercase; }
@keyframes bootslide { 0% { transform:translateX(-120%); } 100% { transform:translateX(280%); } }
html.booting body > :not(.boot) { visibility:hidden !important; }
body { min-height:100vh; min-height:var(--vvh, 100dvh); font-family:Nun,-apple-system,"Segoe UI",Roboto,sans-serif; color:#fff; -webkit-font-smoothing:antialiased;
  background:radial-gradient(circle at 30% 10%, #12305a 0, #070b18 55%, #03040a 100%) fixed; display:flex; flex-direction:column; align-items:center;
  padding:calc(36px + 12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)); overflow-x:hidden; overflow-y:auto; }
button { font:inherit; color:inherit; border:0; background:none; cursor:pointer; }
button:focus-visible, a:focus-visible { outline:3px solid var(--cyan); outline-offset:2px; }
button:disabled { cursor:default; }
.playbtn:disabled, .sbtn:disabled { opacity:.55; }
.bgfx { position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none; }
.blob { position:absolute; width:520px; height:520px; border-radius:50%; filter:blur(60px); opacity:.45; }
.blob.b1 { left:-160px; top:-120px; background:radial-gradient(circle,#1E6FD9,transparent 65%); animation:drift1 18s ease-in-out infinite alternate; }
.blob.b2 { right:-180px; top:120px; background:radial-gradient(circle,#48D8FC,transparent 65%); opacity:.28; animation:drift2 22s ease-in-out infinite alternate; }
.blob.b3 { left:20%; bottom:-260px; background:radial-gradient(circle,#9945FF,transparent 65%); opacity:.25; animation:drift1 26s ease-in-out infinite alternate-reverse; }
.stars { position:absolute; inset:-50%; background-image:radial-gradient(1.5px 1.5px at 20px 30px,rgba(255,255,255,.55),transparent 60%),radial-gradient(1px 1px at 120px 80px,rgba(185,243,255,.6),transparent 60%); background-size:240px 200px; animation:starsmove 60s linear infinite; opacity:.7; }
@keyframes drift1 { to { transform:translate(120px,80px) scale(1.15); } }
@keyframes drift2 { to { transform:translate(-100px,60px) scale(.9); } }
@keyframes starsmove { to { transform:translate(240px,200px); } }
.ticker { position:fixed; top:0; left:0; right:0; z-index:70; box-sizing:border-box; height:calc(36px + env(safe-area-inset-top, 0px)); padding-top:env(safe-area-inset-top, 0px); display:flex; align-items:center; overflow:hidden; background:#07101c; border-bottom:1px solid #2c3a52; color:var(--gold); font-size:13px; font-weight:800; }
.tickertrack { position:relative; top:0; left:0; height:36px; display:flex; align-items:center; width:max-content; white-space:nowrap; will-change:transform; animation:ticker 42s linear infinite; -webkit-animation:ticker 42s linear infinite; }
.tickertrack span { padding-left:48px; line-height:36px; }
@keyframes ticker { from { transform:translate3d(0,0,0); } to { transform:translate3d(-50%,0,0); } }
@-webkit-keyframes ticker { from { -webkit-transform:translate3d(0,0,0); } to { -webkit-transform:translate3d(-50%,0,0); } }

.homeview { width:100%; max-width:720px; flex:1 1 auto; min-height:0; display:flex; flex-direction:column; align-items:center; gap:10px; overflow:auto; }
.hhead { text-align:center; display:flex; flex-direction:column; align-items:center; padding:0 8px; flex:none; }
.hlabs { width:48px; height:48px; flex:none; object-fit:contain; filter:drop-shadow(0 0 14px rgba(72,216,252,.45)); cursor:pointer; }
.hword { display:flex; align-items:center; justify-content:center; gap:12px; margin:0; flex-wrap:wrap; }
.wmark { font-weight:1000; font-size:40px; letter-spacing:-1px; line-height:1; }
.wmark b { color:var(--cyan); font-weight:1000; text-shadow:0 0 22px rgba(72,216,252,.5); }
.beta-tag { font-style:normal; font-size:12px; letter-spacing:1.5px; background:var(--gold); color:#000; padding:3px 8px; border-radius:7px; font-weight:900; }
.htag { margin-top:14px; font-size:14px; line-height:1.45; color:#cdd6e1; font-weight:700; max-width:460px; }
.homestack { width:100%; display:flex; flex-direction:column; align-items:center; gap:8px; flex:none; }
.stats { display:flex; gap:8px; width:min(360px, 100%); }
.stat { flex:1; background:var(--card); border:1px solid #2c3a52; border-radius:16px; padding:8px 12px; text-align:center; }
.stat .k { display:block; font-size:12px; font-weight:800; color:var(--dim); letter-spacing:.4px; }
.stat b { font-size:22px; font-weight:1000; color:var(--cyan); }
.playbtn { min-width:min(360px, 100%); height:52px; border-radius:28px; padding:0 22px; background:linear-gradient(180deg,#7fe6ff,#48D8FC 50%,#1E9FE0); color:#02131f; font-size:18px; font-weight:1000;
  box-shadow:0 10px 30px rgba(72,216,252,.35), inset 0 -3px 0 rgba(0,0,0,.15); }
.playbtn.collect { background:linear-gradient(180deg,#ffe38a,#F2C94C 55%,#d7a423); box-shadow:0 10px 30px rgba(242,201,76,.28), inset 0 -3px 0 rgba(0,0,0,.15); }
.playbtn:disabled { box-shadow:none; }
.toolrow { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.acctpair { width:min(360px, 100%); display:grid; grid-template-columns:minmax(0, max-content); justify-content:center; justify-items:stretch; gap:8px; }
.discordrow { display:flex; align-items:center; justify-content:center; gap:8px; min-width:0; height:44px; min-height:44px; padding:0 14px; border-radius:14px; border:1px solid #2c3a52; background:#141b28; color:#dfe7f1; font-size:14px; font-weight:1000; text-align:center; }
.discordrow .discordmark { width:22px; height:22px; flex:none; display:flex; align-items:center; justify-content:center; }
.discordrow .discordmark svg { width:20px; height:20px; display:block; }
.discordrow.out { background:#5865F2; border-color:#5865F2; color:#fff; }
.discordrow.out .discordmark { color:#fff; }
.discordrow img { width:36px; height:36px; border-radius:50%; object-fit:cover; background:#0e141e; flex:none; }
.discordrow span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.discordmark { color:#5865F2; }
.hb { background:#141b28; border:1px solid #2c3a52; color:#dfe7f1; padding:9px 14px; border-radius:14px; font-size:14px; font-weight:900; min-height:44px; }
#connectBtn { display:inline-flex; align-items:center; justify-content:center; gap:8px; background:#F2C94C; border-color:#E0B43A; color:#1a1400; }
#connectBtn .wico { width:20px; height:20px; flex:none; display:block; }
#connectBtn.busy { opacity:.75; pointer-events:none; }
img.wlogo { width:22px; height:22px; border-radius:6px; flex:none; object-fit:contain; }
.dhead { display:flex; align-items:center; gap:12px; }
.dhead img { width:56px; height:56px; border-radius:50%; object-fit:cover; background:#0e141e; flex:none; }
.dhead b { display:block; font-weight:1000; }
.dhead small { display:block; color:var(--dim); font-weight:800; }
.dwallet { display:flex; align-items:center; gap:8px; margin-top:8px; padding:8px 10px; border-radius:14px; background:#141b28; border:1px solid #2c3a52; }
.dwallet b { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:1000; }
.dwallet button { flex:none; min-height:36px; padding:0 12px; border-radius:12px; background:#0e141e; border:1px solid #2c3a52; color:#dfe7f1; font-weight:900; }
.htoast { position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom)); transform:translateX(-50%) translateY(20px); background:rgba(28,38,51,.97); border:1px solid #2c3a52; padding:8px 16px; border-radius:20px; font-size:14px; font-weight:900; opacity:0; transition:opacity .25s, transform .25s; pointer-events:none; z-index:80; max-width:calc(100% - 24px); }
.htoast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.muted { font-size:13px; color:var(--dim); font-weight:800; margin-top:8px; }
.modenote { font-size:13px; font-weight:800; color:var(--dim); text-align:center; min-height:1.2em; padding:0 12px; }
.modenote.warn { color:var(--gold); }
a.wm2 { color:rgba(255,255,255,.66); text-decoration:underline dotted rgba(255,255,255,.35); text-underline-offset:3px; font-size:13px; font-weight:800; min-height:32px; display:inline-flex; align-items:center; }
a.wm2:hover { color:#fff; }

.board { width:100%; flex:1 1 auto; min-height:240px; display:flex; flex-direction:column; background:rgba(10,16,26,.82); border:1px solid #2c3a52; border-radius:24px; padding:10px; box-shadow:0 16px 40px rgba(0,0,0,.28); }
.boardcap { flex:none; text-align:center; font-size:13px; font-weight:800; color:var(--dim); margin-bottom:8px; }
.grid { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); grid-template-rows:repeat(4, minmax(0,1fr)); gap:6px; }
.grid.shuffle { animation:shuff .6s ease-in-out; }
@keyframes shuff { 0%,100% { transform:scale(1); } 40% { transform:scale(.98); opacity:.85; } }
.card { display:block; position:relative; min-width:0; min-height:0; height:100%; perspective:800px; padding:0; border-radius:12px; }
.card:disabled { cursor:default; }
.inner { display:block; position:absolute; inset:0; transition:transform .4s; transform-style:preserve-3d; }
.card.flip .inner, .card.matched .inner { transform:rotateY(180deg); }
.face { position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; overflow:hidden; }
.back { background:linear-gradient(180deg,#1c2633,#101820); border:1px solid #2c3a52; }
.back img { width:86%; height:86%; max-width:86%; max-height:86%; object-fit:contain; }
.front { transform:rotateY(180deg); background:#141b28; border:2px solid #2c3a52; padding:4px 2px 6px; justify-content:space-between; gap:2px; }
.card.tok .front { border-color:rgba(72,216,252,.7); }
.card.nft .front { border-color:var(--gold); }
.card.shuffle .front { border-color:var(--pink); }
.media { flex:1; min-height:0; width:100%; display:flex; align-items:center; justify-content:center; }
.media img, .media svg { max-width:78%; max-height:78%; width:auto; height:auto; object-fit:contain; }
.media svg { width:58%; color:var(--pink); }
.face b { flex:none; font-size:clamp(9px, 1.6vw, 13px); font-weight:1000; line-height:1.1; text-align:center; padding:0 2px; }
.card.tok .face b { color:var(--cyan); }
.card.nft .face b { color:var(--gold); }
.card.shuffle .face b { color:var(--pink); }
.card.matched { opacity:.55; }

.sheetbg { position:fixed; inset:0; background:rgba(2,6,14,.72); opacity:0; pointer-events:none; transition:opacity .25s; z-index:90; }
.sheetbg.show { opacity:1; pointer-events:auto; }
.sheet { position:fixed; left:50%; top:50%; width:min(480px, calc(100% - 24px)); max-height:calc(var(--vvh, 100dvh) - 24px); display:flex; flex-direction:column; overflow:hidden; transform:translate(-50%, -50%); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .25s, visibility 0s linear .25s; z-index:91;
  background:#0f1622; border:1px solid #26334a; border-radius:22px; padding:16px 18px 18px; box-shadow:0 24px 70px rgba(0,0,0,.55); }
.sheet.show { opacity:1; visibility:visible; pointer-events:auto; transition:opacity .25s, visibility 0s; }
.sheethead { display:flex; align-items:center; justify-content:space-between; flex:none; margin-bottom:8px; }
.sheethead h2 { display:flex; align-items:center; gap:8px; font-size:20px; font-weight:1000; color:var(--cyan); }
.sheethead h2 .discordmark { width:24px; height:24px; display:flex; }
.sheethead h2 .discordmark svg { width:22px; height:22px; display:block; }
.sheetbody .sbtn img.wlogo { width:26px; height:26px; border-radius:7px; }
.sheetx { background:var(--card2); border-radius:14px; padding:4px 12px; font-weight:900; min-width:44px; min-height:44px; }
.sheetbody { flex:1 1 auto; min-height:0; overflow-y:auto; }
.sheetbody p { font-size:15px; line-height:1.45; color:#d3dce7; margin:6px 0; font-weight:700; }
.sheetbody ol { padding-left:20px; font-size:15px; line-height:1.5; color:#d3dce7; font-weight:700; }
.sheetbody li { margin:6px 0; }
.sbtn { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; height:50px; border-radius:26px; font-weight:1000; font-size:17px; margin-top:10px; background:var(--card2); color:#fff; text-decoration:none; }
.sbtn.primary { background:var(--cyan); color:#02131f; }
.sbtn.gold { background:var(--gold); color:#1a1400; }
.sbtn:disabled { opacity:.45; }
.prize { display:flex; align-items:center; gap:10px; margin-top:8px; padding:8px; border-radius:16px; background:#141b28; border:1px solid #2c3a52; font-weight:900; }
.prize img, .prize svg { width:40px; height:40px; object-fit:contain; flex:none; border-radius:10px; }
.prize svg { color:var(--pink); }

body.desk { height:var(--vvh, 100svh); max-height:var(--vvh, 100svh); padding:calc(36px + 12px + env(safe-area-inset-top, 0px)) max(28px, 4vw) max(12px, env(safe-area-inset-bottom, 0px)); align-items:stretch; overflow:hidden; }
body.desk .homeview { max-width:1180px; width:100%; margin-inline:auto; display:grid; grid-template-columns:minmax(260px, 360px) minmax(0,1fr); grid-template-rows:minmax(0,1fr); column-gap:24px; row-gap:0; align-items:stretch; min-height:0; overflow:hidden; }
body.desk .leftcol { grid-column:1; grid-row:1; min-height:0; height:100%; display:flex; flex-direction:column; justify-content:space-between; gap:18px; overflow:hidden; }
body.desk .hhead { flex:none; align-self:stretch; }
body.desk .wmark { font-size:36px; }
body.desk .hlabs { width:40px; height:40px; }
body.desk .hword { gap:12px; justify-content:flex-start; }
body.desk .htag { margin-top:14px; font-size:14px; }
body.desk .homestack { flex:1 1 auto; min-height:0; width:100%; display:flex; flex-direction:column; justify-content:space-evenly; align-items:stretch; gap:10px; overflow:auto; padding:0; }
body.desk .playbtn { width:100%; min-width:0; height:48px; }
body.desk .stats, body.desk .toolrow { width:100%; }
body.desk .acctpair { display:contents; }
body.desk .discordrow, body.desk #connectBtn { width:100%; align-self:stretch; }
body.desk .board { grid-column:2; grid-row:1; min-height:0; align-self:stretch; }
body.desk a.wm2 { align-self:center; margin-top:4px; }
body.desk .face b { font-size:clamp(10px, 1.1vw, 14px); }
@media (min-width: 700px) and (max-height: 780px) {
  body.desk .htag { display:none; }
  body.desk .hlabs { width:32px; height:32px; }
  body.desk .wmark { font-size:30px; }
  body.desk .leftcol { gap:12px; }
  body.desk .hhead { padding-bottom:0; }
  body.desk .hword { gap:12px; }
  body.desk .homestack { gap:8px; }
  body.desk .playbtn { height:44px; }
  body.desk .discordrow, body.desk #connectBtn { height:40px; min-height:40px; }
}
@media (max-width: 699px), (max-height: 599px) {
  .htag { display:none; }
  .wmark { font-size:32px; }
  .hlabs { width:36px; height:36px; }
  .homeview { gap:8px; }
  .leftcol { order:1; width:100%; display:flex; flex-direction:column; align-items:center; gap:8px; }
  .board { order:2; }
  .homestack { order:unset; }
  .stats, .acctpair, .playbtn, .toolrow { width:min(360px, 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .stars, .grid.shuffle { animation:none !important; }
  .inner { transition:none; }
  .sheet, .sheetbg { transition:none !important; }
  .g-rotate__icon { animation: none; }
}

/* Phone landscape: portrait-only gate (tablets/iPads stay free) */
.g-rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1.25rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
  background: radial-gradient(circle at 30% 10%, #1a1548 0, #070b18 55%, #03040a 100%);
  text-align: center;
  box-sizing: border-box;
}
.g-rotate__icon {
  display: grid;
  place-items: center;
  width: clamp(2.6rem, 9vw, 3.4rem);
  height: clamp(2.6rem, 9vw, 3.4rem);
  color: var(--gold);
  animation: g-rotate-spin 1.6s linear infinite;
}
.g-rotate__icon svg { width: 100%; height: 100%; display: block; }
.g-rotate__msg {
  margin: 0;
  font-family: Nun, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 1000;
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
@keyframes g-rotate-spin { to { transform: rotate(360deg); } }
/* Phones only — never cover desk/tablet layouts */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
  html:not(.desk) .g-rotate { display: flex; }
  html:not(.desk) .g-rotate[hidden] { display: flex; }
  html:not(.desk),
  html:not(.desk) body {
    overflow: hidden !important;
    height: 100%;
    overscroll-behavior: none;
    touch-action: none;
  }
  html:not(.desk) body > :not(.g-rotate) {
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
