*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,sans-serif;background:#f5f7fb;color:#111827}button,input{font:inherit}.topbar{height:68px;background:#fff;border-bottom:1px solid #e8ebf0;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:20}.brand{font-weight:800;font-size:21px;display:flex;align-items:center;gap:9px}.brand-mark{width:34px;height:34px;border-radius:10px;background:#111827;color:#fff;display:grid;place-items:center}.top-actions{display:flex;gap:10px;align-items:center}.icon-btn,.profile-pill{border:1px solid #e5e7eb;background:#fff;border-radius:12px;height:40px;padding:0 12px;cursor:pointer}.profile-pill{display:flex;gap:8px;align-items:center}.profile-pill span:first-child{width:25px;height:25px;border-radius:50%;background:#111827;color:#fff;display:grid;place-items:center;font-size:12px}.screen{display:none;max-width:1250px;margin:auto;padding:38px 24px 60px}.screen.active{display:block}.hero{min-height:430px;background:linear-gradient(135deg,#111827,#273449);color:#fff;border-radius:28px;padding:60px;display:flex;align-items:center;justify-content:space-between;gap:40px;overflow:hidden}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;opacity:.7;margin-bottom:10px}.hero h1{font-size:58px;line-height:1;margin:0 0 18px;letter-spacing:-2px}.hero-copy{max-width:620px;color:#dbe3ef;font-size:17px;line-height:1.65}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:30px}.hero-card{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:270px}.mini-stat{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);padding:22px;border-radius:18px;display:flex;flex-direction:column}.mini-stat strong{font-size:28px}.mini-stat span{font-size:12px;color:#cbd5e1;margin-top:4px}.primary,.secondary,.ghost{border:0;border-radius:12px;padding:12px 17px;font-weight:700;cursor:pointer}.primary{background:#111827;color:#fff}.hero .primary{background:#fff;color:#111827}.secondary{background:#fff;border:1px solid #dfe4eb;color:#111827}.ghost{background:transparent;border:1px solid #dfe4eb;color:#111827}.hero .ghost{color:#fff;border-color:#64748b}.big{padding:15px 20px}.full{width:100%}.section-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:18px}.feature-card{background:#fff;border:1px solid #e7eaf0;border-radius:18px;padding:22px;display:flex;gap:15px}.feature-card>span{font-size:27px}.feature-card b{font-size:15px}.feature-card p{font-size:12px;color:#6b7280;line-height:1.5;margin:7px 0 0}.page-head,.game-head{display:flex;align-items:center;gap:20px;margin-bottom:25px}.page-head h2,.game-head h2{margin:0;font-size:32px}.back{background:none;border:0;color:#6b7280;cursor:pointer;padding:0}.lobby-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;max-width:850px}.lobby-card,.leader-card,.my-stats{background:#fff;border:1px solid #e7eaf0;border-radius:20px;padding:28px}.lobby-icon{font-size:34px}.lobby-card h3{margin:14px 0 7px}.lobby-card p{color:#6b7280;font-size:14px;line-height:1.55;min-height:44px}.lobby-card input{width:100%;border:1px solid #dfe4eb;border-radius:12px;padding:13px;margin:4px 0 10px;outline:none;text-align:center;letter-spacing:4px}.setup-note{margin-top:18px;background:#fff8e7;border:1px solid #f1dfac;border-radius:14px;padding:13px;font-size:12px;color:#725a16}.setup-note code{background:#f2e5bb;padding:2px 5px;border-radius:5px}.game-head{justify-content:space-between}.game-actions{display:flex;gap:8px}.game-layout{display:grid;grid-template-columns:minmax(0,820px) 310px;gap:20px;align-items:start}.board-wrap{background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:15px}.board{position:relative;width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(10,1fr);grid-template-rows:repeat(10,1fr);overflow:hidden;border-radius:14px;background:#fff}.cell{position:relative;border:1px solid rgba(17,24,39,.11);display:flex;align-items:flex-start;justify-content:flex-start;padding:4px;font-size:10px;font-weight:700;color:#374151}.cell:nth-child(odd){background:#fbfcfe}.cell:nth-child(even){background:#f3f6fa}.cell.special-ladder{background:#f0fdf4}.cell.special-snake{background:#fff1f2}.token{position:absolute;bottom:5px;right:5px;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:10px;font-weight:800;z-index:5;box-shadow:0 2px 5px #0003;border:2px solid #fff}.token.red{background:#ef4444}.token.blue{background:#2563eb}.route-layer{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none}.ladder-line{stroke:#15803d;stroke-width:1.5}.ladder-rung{stroke:#16a34a;stroke-width:1}.snake-line{stroke:#dc2626;stroke-width:2.8;fill:none;stroke-linecap:round}.snake-head{fill:#dc2626}.snake-eye{fill:#fff}.board-legend{display:flex;justify-content:center;gap:20px;color:#6b7280;font-size:11px;padding:11px 0 2px}.side-panel{display:flex;flex-direction:column;gap:10px}.player-card{background:#fff;border:1px solid #e5e7eb;border-radius:15px;padding:12px;display:flex;align-items:center;gap:10px}.player-card.active-player{border-color:#111827;box-shadow:0 0 0 2px #1118270b}.player-avatar{width:38px;height:38px;border-radius:12px;color:#fff;display:grid;place-items:center;font-weight:800}.player-avatar.red{background:#ef4444}.player-avatar.blue{background:#2563eb}.player-meta{display:flex;flex-direction:column;gap:4px;flex:1}.player-meta span{font-size:11px;color:#6b7280}.turn-dot{width:8px;height:8px;border-radius:50%;background:#d1d5db}.active-player .turn-dot{background:#22c55e}.dice-card{background:#111827;color:#fff;border-radius:18px;padding:20px;text-align:center;margin-top:4px}.dice-label{font-size:10px;letter-spacing:2px;opacity:.6}.dice{width:88px;height:88px;margin:15px auto;border:0;border-radius:20px;background:#fff;color:#111827;font-size:45px;display:grid;place-items:center;cursor:pointer;box-shadow:0 7px 20px #0003}.dice.rolling{animation:shake .45s ease}.dice-card #turnText{font-size:12px;color:#d1d5db;min-height:18px}.move-log{background:#fff;border:1px solid #e5e7eb;border-radius:15px;padding:15px;max-height:260px;overflow:auto}.log-title{font-size:12px;font-weight:800;margin-bottom:8px}.log-item{font-size:11px;color:#6b7280;padding:7px 0;border-bottom:1px solid #f0f1f3}.room-bar{background:#111827;color:#fff;border-radius:14px;padding:10px 14px;display:flex;align-items:center;gap:12px;margin:-10px 0 15px;font-size:12px}.room-bar button{margin-left:auto;border:0;border-radius:8px;padding:7px 10px;cursor:pointer}.hidden{display:none!important}.tabs{display:flex;gap:8px;margin-bottom:12px}.tab{border:1px solid #e1e5ea;background:#fff;padding:9px 15px;border-radius:10px;cursor:pointer}.tab.active{background:#111827;color:#fff}.leader-row{display:grid;grid-template-columns:45px 1fr 80px 70px 80px 80px;gap:8px;align-items:center;padding:13px 8px;border-bottom:1px solid #edf0f3;font-size:13px}.leader-row.header{font-size:10px;color:#9ca3af;text-transform:uppercase;letter-spacing:.7px}.leader-player{display:flex;align-items:center;gap:8px;font-weight:700}.rank-medal{font-size:18px}.my-stats{margin-top:14px;display:flex;gap:30px}.my-stat{display:flex;flex-direction:column}.my-stat b{font-size:22px}.my-stat span{font-size:11px;color:#6b7280}.modal{position:fixed;inset:0;background:#11182799;display:grid;place-items:center;z-index:50;padding:20px}.modal-card{background:#fff;border-radius:22px;padding:30px;max-width:410px;width:100%;position:relative;box-shadow:0 25px 80px #0004}.modal-card h2{margin:4px 0 8px;font-size:28px}.modal-card p{font-size:13px;color:#6b7280;line-height:1.55;margin-bottom:20px}.modal-card .secondary,.modal-card .primary,.modal-card .ghost{margin-top:8px}.modal-card small{display:block;color:#9ca3af;text-align:center;margin-top:12px}.modal-close{position:absolute;right:15px;top:12px;border:0;background:none;font-size:25px;cursor:pointer;color:#6b7280}.win-card{text-align:center}.trophy{font-size:55px}.win-stats{display:flex;justify-content:center;gap:45px;margin:20px 0}.win-stats div{display:flex;flex-direction:column}.win-stats b{font-size:25px}.win-stats span{font-size:11px;color:#6b7280}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:#111827;color:#fff;padding:11px 16px;border-radius:10px;font-size:12px;opacity:0;pointer-events:none;transition:.25s;z-index:80}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}@keyframes shake{0%,100%{transform:rotate(0)}25%{transform:rotate(-12deg) scale(1.05)}75%{transform:rotate(12deg) scale(1.05)}}@media(max-width:900px){.hero{padding:38px 28px;min-height:auto;flex-direction:column;align-items:flex-start}.hero h1{font-size:42px}.hero-card{width:100%;min-width:0}.section-grid{grid-template-columns:1fr}.game-layout{grid-template-columns:1fr}.side-panel{display:grid;grid-template-columns:1fr 1fr}.dice-card,.move-log{grid-column:1/-1}.lobby-grid{grid-template-columns:1fr}.game-head{align-items:flex-start}.game-actions{flex-wrap:wrap;justify-content:flex-end}.leader-row{grid-template-columns:35px 1fr 55px 55px 65px 60px;font-size:11px}}@media(max-width:560px){.topbar{padding:0 14px}.screen{padding:22px 12px 45px}.hero{border-radius:20px;padding:30px 20px}.hero h1{font-size:36px}.hero-copy{font-size:14px}.hero-actions{display:grid;width:100%}.hero-actions button{width:100%}.mini-stat{padding:15px}.mini-stat strong{font-size:22px}.board-wrap{padding:7px;border-radius:16px}.cell{font-size:8px;padding:2px}.token{width:20px;height:20px;font-size:8px;bottom:2px;right:2px}.board-legend{gap:8px;font-size:9px}.game-head h2{font-size:24px}.game-actions .ghost{display:none}.side-panel{grid-template-columns:1fr 1fr}.player-card{padding:8px}.player-avatar{width:32px;height:32px}.dice{width:75px;height:75px;font-size:38px}.leader-card{padding:12px;overflow:auto}.leader-row{min-width:470px}.my-stats{flex-wrap:wrap}.room-bar{flex-wrap:wrap}.room-bar button{margin-left:0}}
/* V2.3.1 visual upgrades */
.route-layer{z-index:8;overflow:visible}
.ladder-line{stroke:#16a34a;stroke-width:2.2;filter:drop-shadow(0 1px 1px rgba(0,0,0,.25))}
.ladder-rung{stroke:#15803d;stroke-width:1.35}
.snake-line{stroke:#dc2626;stroke-width:3.8;filter:drop-shadow(0 1px 1px rgba(0,0,0,.3))}
.snake-head{fill:#b91c1c;stroke:#fff;stroke-width:.06}
.cell.special-ladder{background:#dcfce7!important}
.cell.special-snake{background:#ffe4e6!important}
