*,:after,:before{box-sizing:border-box;margin:0;padding:0}:root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--header-h:60px}html{font-size:16px;-webkit-text-size-adjust:100%}body,html{overscroll-behavior:none}body{background:#0f0f1a;color:#e2e2f0;font-family:Segoe UI,system-ui,-apple-system,sans-serif;min-height:100dvh;overflow-x:hidden;-webkit-font-smoothing:antialiased}button{cursor:pointer}button,input{font-family:inherit}.container{width:100%;max-width:960px;margin:0 auto;padding:0 16px}.game-layout{display:flex;flex-direction:column;gap:14px;flex:1 1;min-height:0}.game-chat-left{display:none}.game-controls{max-width:700px;margin:0 auto}.game-controls,.game-controls-inner{display:flex;flex-direction:column;width:100%}.game-controls-inner{gap:10px}@media (min-width:768px){.container{padding:0 24px}.game-layout{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px;flex-direction:unset;justify-content:unset}.board-section{grid-column:2}.game-controls{grid-column:3;grid-row:1}.game-chat-left{grid-column:1;grid-row:1;display:flex;flex-direction:column;justify-self:center;align-self:center;width:min(280px,100%);min-width:0;height:min(calc(100dvh - var(--header-h) - var(--safe-top) - 32px),calc(100vw - 760px))}.game-controls{display:flex;justify-content:flex-start;align-items:center;width:auto;max-width:none;margin:0;padding:0;gap:0;overflow-y:visible}.game-controls-inner{width:100%;max-width:360px}.ctrl-panel{padding:16px 20px;border-radius:12px}.ctrl-btn{padding:18px 24px;font-size:1.1rem;min-height:62px;border-radius:12px}.ctrl-dice{font-size:2.6rem}.ctrl-msg{font-size:.95rem}}.ctrl-panel{background:#1e1e30;border:1px solid #2d2d4a;border-radius:10px;padding:12px 14px}.ctrl-btn{background:linear-gradient(135deg,#7c3aed,#4f46e5);color:#fff;border:none;border-radius:10px;padding:14px 20px;font-weight:700;font-family:inherit;cursor:pointer;min-height:52px}.ctrl-dice{font-size:2rem;line-height:1}.ctrl-msg{font-size:.88rem;line-height:1.4}.board{display:grid;grid-template-columns:repeat(10,1fr);gap:1px;background:#2d2d4a;border:1px solid #2d2d4a;width:100%}.board-wrapper{position:relative;border-radius:10px;overflow:hidden;width:100%;margin:0 auto}@media (min-width:768px){.board-wrapper{height:min(calc(100dvh - var(--header-h) - var(--safe-top) - 32px),calc(100vw - 760px));width:auto;aspect-ratio:1;flex-shrink:0;margin:0}}.board-cell{aspect-ratio:1;background:#1a1a2e;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:clamp(6px,2.2vw,10px);position:relative;-webkit-user-select:none;user-select:none}@media (min-width:768px){.board-cell{font-size:10px}}.board-cell.snake-head{background:#2a1216}.board-cell.ladder-foot{background:#0d2318}.board-cell.win-tile{background:linear-gradient(135deg,#78350f,#92400e);box-shadow:inset 0 0 12px rgba(251,191,36,.35);animation:goldPulse 2s ease-in-out infinite}@keyframes goldPulse{0%,to{box-shadow:inset 0 0 10px rgba(251,191,36,.3)}50%{box-shadow:inset 0 0 22px rgba(251,191,36,.65)}}@keyframes snake-crawl{0%{stroke-dashoffset:0}to{stroke-dashoffset:-18}}.snake-crawl{animation:snake-crawl .9s linear infinite}@keyframes snake-tongue{0%,18%{opacity:0}22%{opacity:1}30%{opacity:1}34%{opacity:0}38%{opacity:1}46%{opacity:1}50%,to{opacity:0}}.snake-tongue{animation:snake-tongue 3.5s ease-in-out infinite}@keyframes dice-roll{0%{transform:scale(1) rotate(0deg)}25%{transform:scale(1.25) rotate(-15deg)}50%{transform:scale(1.3) rotate(12deg)}75%{transform:scale(1.2) rotate(-8deg)}to{transform:scale(1) rotate(0deg)}}.dice-rolling{animation:dice-roll .4s ease}@keyframes hop-arc-a{0%{transform:translateY(0)}40%{transform:translateY(-12px)}to{transform:translateY(0)}}@keyframes hop-arc-b{0%{transform:translateY(0)}40%{transform:translateY(-12px)}to{transform:translateY(0)}}.hop-arc-a{animation:hop-arc-a .26s ease-out both}.hop-arc-b{animation:hop-arc-b .26s ease-out both}.token-pin{transition:transform .26s ease-out}.chat-bubble-float{position:absolute;transform:translate(-50%,-100%);max-width:110px;background:rgba(244,244,255,.62);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);color:#1a1a2e;font-size:.66rem;line-height:1.3;font-weight:600;padding:5px 8px;border-radius:10px;border-left:3px solid #a78bfa;box-shadow:0 4px 14px rgba(0,0,0,.4);white-space:normal;overflow-wrap:break-word;pointer-events:none;z-index:6;animation:chat-bubble-float 3s ease-out forwards}.chat-bubble-float:after{content:"";position:absolute;bottom:-5px;left:14px;border:5px solid transparent;border-top-color:rgba(244,244,255,.62);border-bottom:0}@keyframes chat-bubble-float{0%{opacity:0;transform:translate(-50%,-100%) translateY(8px) scale(.85)}12%{opacity:1;transform:translate(-50%,-100%) translateY(0) scale(1)}70%{opacity:1;transform:translate(-50%,-100%) translateY(-44px) scale(1)}to{opacity:0;transform:translate(-50%,-100%) translateY(-60px) scale(.94)}}.home-pager-outer{flex:1 1;min-height:0;display:flex;flex-direction:column}.home-page-dots{display:none}.home-grid{flex:1 1;gap:32px;max-width:1100px;margin:0 auto;padding:24px 16px;box-sizing:border-box}.home-games,.home-grid{display:flex;flex-direction:column;align-items:center;width:100%}.home-games{order:1;max-width:400px}.home-leaderboard{order:2;width:100%;max-width:400px}.home-chat,.home-spacer{display:none}@media (min-width:900px){.home-grid{display:grid;grid-template-columns:1fr 400px 1fr;column-gap:32px;align-items:center;justify-content:center;min-height:calc(100dvh - var(--header-h) - var(--safe-top));padding:24px 16px}.home-games{width:auto;align-items:center}.home-games,.home-leaderboard{order:0;max-width:none;display:flex;flex-direction:column}.home-leaderboard{position:static;transform:none}.home-chat,.home-leaderboard{width:280px;justify-self:center;height:calc(100dvh - var(--header-h) - var(--safe-top) - 100px);overflow:hidden}.home-chat{display:flex;flex-direction:column}.home-spacer{display:none}}@media (max-width:899px){.home-pager-outer{overflow:hidden;flex:0 0 auto;height:calc(100dvh - var(--header-h) - var(--safe-top))}.home-grid{flex-direction:row;flex-wrap:nowrap;align-items:stretch;width:300%;max-width:none;margin:0;padding:0;gap:0;min-height:0;transform:translateX(calc(var(--mobile-page, 1) * -33.333%));transition:transform .3s cubic-bezier(.4,0,.2,1)}.home-chat,.home-games,.home-leaderboard{width:33.333%!important;min-width:33.333%!important;max-width:none!important;flex-shrink:0;order:0!important;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:24px 16px;box-sizing:border-box;display:flex!important;flex-direction:column;align-items:stretch;height:auto;gap:0}.home-games,.home-page-dots{align-items:center}.home-page-dots{display:flex;justify-content:center;gap:8px;padding:10px 0 calc(10px + env(safe-area-inset-bottom, 0px));flex-shrink:0}}.swipe-hint-arrow{display:inline-block;animation:swipe-hint-nudge 1.4s ease-in-out infinite}.swipe-hint-left{animation-direction:alternate}.swipe-hint-right{animation-direction:alternate-reverse}@keyframes swipe-hint-nudge{0%{transform:translateX(0);opacity:.6}50%{transform:translateX(-4px);opacity:1}to{transform:translateX(0);opacity:.6}}.board-frame{flex-direction:column;width:100%}.bfm-bottom,.bfm-top,.board-frame{display:flex;gap:4px}.bfm-board{min-width:0}.bfm-chip-h{flex:1 1;background:#1a1a2e;border:1px solid #2d2d4a;border-radius:8px;padding:5px 7px;display:flex;align-items:center;gap:6px;min-width:0}.bfm-dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}.bfm-name{flex:1 1;font-size:.66rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.bfm-pos{font-size:.66rem;color:#9ca3af;min-width:16px;text-align:right}.bfm-pos,.bfm-pos-circle{font-weight:700;flex-shrink:0}.bfm-pos-circle{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#2d2d4a;font-size:.65rem;color:#e2e2f0}@media (max-width:767px){.game-outer{padding:6px!important}.game-layout{gap:8px}.board-section{flex:1 1;min-height:0;display:flex;flex-direction:column}.bfm-board,.board-frame{flex:1 1;min-height:0}.bfm-board{container-type:size;display:flex;align-items:center;justify-content:center}.bfm-board .board-wrapper{width:min(100cqw,100cqh);height:min(100cqw,100cqh);margin:0}}.game-panel{display:contents}.game-page-dots{display:none;flex-shrink:0}@media (max-width:767px){.game-outer.has-chat{padding:0!important;overflow:hidden}.game-layout.has-chat{flex-direction:row;flex-wrap:nowrap;width:200vw;gap:0;transform:translateX(calc(var(--game-page, 1) * -100vw));transition:transform .3s cubic-bezier(.4,0,.2,1)}.has-chat .game-chat-left{display:flex!important;flex-direction:column;width:100vw;min-width:100vw;flex-shrink:0;height:100%;padding:12px 14px;box-sizing:border-box}.has-chat .game-chat-left>*{flex:1 1;min-width:0;min-height:0}.has-chat .game-panel{display:flex;flex-direction:column;width:100vw;min-width:100vw;flex-shrink:0;min-height:0;padding:6px;box-sizing:border-box;gap:8px}.game-page-dots{display:flex;justify-content:center;align-items:center;gap:8px;padding:8px 0 calc(8px + env(safe-area-inset-bottom, 0px))}}@media (min-width:768px){.board-frame{display:block}.bfm-bottom,.bfm-top{display:none}.bfm-board{display:block}.ctrl-players{display:block!important}}.ctrl-players{display:none}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:#1a1a2e}::-webkit-scrollbar-thumb{background:#2d2d4a;border-radius:3px}