/* The game is a viewport. Menus are overlays; the campus is always home. */
.game-shell{--ink:#173e35;--gold:#ffd173;--cream:#fff8e8;--forest:#163e35;margin:0;height:100dvh;min-height:380px;overflow:hidden;background:var(--forest);color:var(--cream);display:grid;grid-template-rows:72px minmax(0,1fr) 64px 24px}
.game-shell *{box-sizing:border-box}.game-shell [hidden]{display:none!important}.game-shell button{cursor:pointer;font-family:Nunito,sans-serif}.game-shell button:disabled{cursor:wait}.game-shell h1,.game-shell h2,.game-shell h3{font-family:Bungee,sans-serif}
.game-topbar{padding:10px 28px;display:flex;align-items:center;gap:12px;margin:0;max-width:none;border-bottom:1px solid #ffffff18;z-index:3;background:#163e35}
.game-topbar .brand{width:42px;height:42px;font:22px Bungee;background:#fdd47e;color:#173e35;display:flex;align-items:center;justify-content:center;border-radius:12px;text-decoration:none;box-shadow:0 3px #0b2b24}.game-topbar .brand span{font-size:15px;color:#173e35;position:static}.wordmark{font:11px Nunito;letter-spacing:2px;line-height:1.4}.wordmark strong{font:12px Bungee;letter-spacing:.5px;display:block}.wordmark small{display:none}.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:12px}.topbar-actions>span{font-size:9px;letter-spacing:1.5px;background:#ffffff0a;border:1px solid #ffffff25;border-radius:6px;padding:7px 10px}.game-shell .music,.icon-button{color:#ffefd3;background:#ffffff0b;border:1px solid #ffffff22;border-radius:10px;padding:10px 14px;min-height:42px;font-size:12px}.icon-button{font-size:19px;width:44px;padding:6px}
.game-main{padding:0!important;margin:0!important;width:100%;max-width:none!important;min-height:0;position:relative}.game-shell .board-section{position:absolute;inset:0;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:#b9dccc}.game-shell #campusBoardContainer,.campus-stage,.campus-viewport{position:absolute;inset:0}.campus-viewport canvas{width:100%;height:100%;display:block;touch-action:none}.adventure-title{position:absolute;left:32px;top:27px;pointer-events:none}.adventure-title .eyebrow{color:#365c4d;font-size:9px;letter-spacing:1.9px}.adventure-title h1{font-size:clamp(24px,3.1vw,44px);line-height:1.15;margin:9px 0;color:#1d4c3b;letter-spacing:-1px;text-shadow:0 2px #e1f1d4}.adventure-title h1 em{font-style:normal;color:#315d42}.adventure-title p{font-size:12px;color:#3b6152;margin:10px 0}.has-session .adventure-title h1{font-size:24px}.has-session .adventure-title h1 br{display:none}
.house-hud{position:absolute;right:24px;top:24px;display:flex;gap:6px}.hud-house{min-width:70px;position:relative;display:grid;grid-template-columns:30px 1fr;gap:0 6px;align-items:center;background:#fff9e9e8;color:#244a3c;padding:8px 10px;border:1px solid #fff8df;border-radius:12px;box-shadow:0 3px 0 #3c725d20}.hud-house svg{width:30px;height:32px;grid-row:span 2;image-rendering:pixelated}.hud-house span{font:bold 10px Nunito}.hud-house b{font:10px Bungee}.hud-house.is-selected{outline:2px solid #325847;outline-offset:2px}.hud-house small{font-size:9px;font-family:Nunito}
.phase-strip{position:absolute;left:50%;bottom:142px;transform:translateX(-50%);display:flex;gap:15px;align-items:center;padding:10px 19px;border:1px solid #fff8e399;background:#eaf0dadd;border-radius:30px;color:#53745d;white-space:nowrap}.phase-strip span{font:9px Bungee;opacity:.55}.phase-strip b{font:9px Bungee;margin-left:4px}.phase-strip i{font:16px Nunito;opacity:.4}.phase-strip .active{color:#164a36;opacity:1}.phase-strip .active b{border-bottom:2px solid #e99e39;padding-bottom:3px}
.board-bottom-controls{display:none!important}.local-flow,.game-shell .round-panel{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);width:min(660px,calc(100% - 48px));margin:0;background:#fff8e8;color:#173e35;box-shadow:0 6px 0 #23544038,0 10px 35px #214c3225;border-radius:20px;border:1px solid #fffdf1;padding:18px 22px;z-index:2;max-height:38%;overflow:auto}.local-flow{display:flex;align-items:center;gap:16px;min-height:100px}.local-copy{flex:1;min-width:0}.local-copy small,.round-panel .round-phase{color:#687e65!important;font:9px Bungee;letter-spacing:1px}.local-copy h2{font-size:17px;margin:5px 0}.local-copy p{font-size:12px;color:#5c725d;margin:0}.local-avatar{width:52px;height:60px;flex-shrink:0}.local-avatar svg{width:100%;height:100%;image-rendering:pixelated}.game-shell .primary{background:#ffd173;color:#173e35;border:1px solid #eac06c;border-bottom:4px solid #d6a44d;border-radius:12px;min-height:48px;font:11px Bungee;padding:12px 20px;width:auto;margin:0;box-shadow:none}.game-shell .primary:hover{background:#ffdc91;transform:translateY(-1px)}.game-shell .primary:active{transform:translateY(2px);border-bottom-width:2px}.local-flow>.primary{white-space:nowrap;min-width:140px}.local-die{font:30px Bungee;color:#a36d22;min-width:42px;text-align:center}.game-shell .round-panel h3{color:#254b3e;font-size:19px;margin:8px 0}.game-shell .round-panel p{color:#536f5f;font-size:12px}.game-shell .round-panel .round-list{max-height:115px;overflow:auto}.game-shell .round-list li{background:#e7eddc;color:#254c3d}.game-shell .round-list li b{color:#88601b}.game-shell .round-panel .primary{margin-top:9px}.game-shell .room-secondary{color:#315946;border-color:#92ad95}.game-shell .round-roll,.game-shell .round-countdown{font:32px Bungee;color:#a86c1c}
.map-caption{position:absolute;bottom:21px;left:24px;display:flex;flex-direction:column;gap:3px;color:#365e4b;pointer-events:none}.map-caption span{font:9px Bungee;letter-spacing:1px}.map-caption small{font-size:8px;letter-spacing:2px}.map-tools{position:absolute;right:24px;top:102px;display:flex;flex-direction:column;gap:5px}.map-tools button{width:38px;height:38px;color:#2f5b45;border:1px solid #fff9;background:#fff8e8df;border-radius:10px;font-size:21px}.map-hint{position:absolute;left:24px;bottom:53px;font-size:10px;color:#3a6352;pointer-events:none}.view-controls{position:absolute;left:24px;bottom:87px;display:flex;gap:7px}.view-controls button{font-size:10px;min-height:36px;padding:7px 11px;border:1px solid #5579664d;background:#e7eedbba;border-radius:9px;color:#345a46}.space-picker{position:absolute;left:24px;bottom:129px;width:126px}.space-picker label{font-size:8px;color:#385f4c;display:block;margin-bottom:3px}.space-picker select{max-width:100%;font:10px Nunito;background:#f6f6dfcc;color:#325640;border:1px solid #718b6860;border-radius:6px;padding:5px}
.game-nav{display:flex;align-items:stretch;justify-content:center;gap:50px;background:#163e35;border-top:1px solid #fff2;padding:0 18px}.game-nav button{background:transparent;color:#a7c2ab;border:0;display:flex;gap:8px;align-items:center;padding:7px 15px;font-size:12px;font-weight:bold;min-width:80px;border-top:3px solid transparent}.game-nav button span{font-size:23px}.game-nav button[aria-current=page]{color:#ffd173;border-top-color:#ffd173}.game-status{display:flex;justify-content:space-between;padding:3px 28px;margin:0;background:#10332d;font-size:8px;color:#b3c7b4;letter-spacing:1.4px}.game-status span{display:inline!important;margin:0;font-size:8px}
.shell-dialog{background:#fff8e8;color:#173e35;width:min(720px,calc(100% - 24px));max-height:calc(100dvh - 40px);border:2px solid #fcf3d3;border-radius:24px;padding:32px;margin:auto;box-shadow:0 15px 60px #0b292a70}.shell-dialog::backdrop{background:#0b292ac4;backdrop-filter:blur(7px)}.shell-dialog h2{font-size:25px;margin:8px 30px 12px 0}.shell-dialog h3{color:#284b3d}.shell-dialog p{color:#536d59}.shell-dialog .eyebrow{color:#8d6a27;font-size:9px}.shell-dialog .close{color:#315540}.shell-dialog section{margin:0}.shell-dialog .dialog-lead{font-size:14px;margin-top:0}.shell-dialog .houses-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:20px 0}.shell-dialog .house-card{background:#e9eddb;border:2px solid transparent;padding:10px 5px;display:flex;flex-direction:column;text-align:center;gap:5px;color:#244836;border-radius:14px}.shell-dialog .house-card.selected{background:#fbe5b3;border-color:#b28b34;box-shadow:0 3px #cdb57155}.shell-dialog .house-info h3{font-size:10px;line-height:1.5}.shell-dialog .house-info .motto,.shell-dialog .house-score-badge{display:none}.shell-dialog .house-pixel-avatar{background:#fff5d5;width:55px;height:55px}.shell-dialog .house-label{font-size:9px!important;margin:0!important}.shell-dialog .room-panel{max-width:none;background:#e8eddb;border:1px solid #c9d5b6;padding:18px}.shell-dialog .room-help{color:#4f6f59}.shell-dialog .room-message,.shell-dialog .player-tag.warn{color:#ad3c2c}.shell-dialog #beginAdventure{width:100%}.alternate-version{display:block;text-align:center;font-size:11px;margin-top:18px;color:#547259}.shell-dialog .game-launch-card{background:#edf0df;color:#234e3b;border:1px solid #ccdac0;padding:22px;display:flex;flex-direction:column;text-align:left}.shell-dialog .games-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.shell-dialog .card-tag{font:8px Bungee;color:#61704b}.shell-dialog .game-launch-card h3{font-size:15px;margin:12px 0 0}.shell-dialog .game-launch-card strong{font:10px Bungee;color:#826021;margin-top:auto}.shell-dialog .game-launch-card p{font-size:12px}.shell-dialog .house-rank-item,.shell-dialog .player-rank-item{background:#e8eddb;color:#264b39;border:1px solid #d7dfc7}.shell-dialog .rank-pos,.shell-dialog .rank-score{color:#876321}.shell-dialog .rank-score{font-size:13px}.shell-dialog .player-rank-item{flex-wrap:wrap}.shell-dialog .activity-log{max-height:55dvh;color:#3f5c48}.shell-dialog .log-item{border-bottom:1px solid #c8d3b6}.result-dialog{text-align:center;width:min(430px,calc(100% - 30px))}.result-dialog h2{margin:5px 0}.result-trophy{font-size:72px;color:#e7ac3c;line-height:1.4}.result-dialog #resultScore{font:42px Bungee;color:#224e39}.result-dialog .primary{width:100%;margin-top:15px}
.game-shell .board-wrapper{height:100%;overflow:auto;padding:100px 25px 180px;background:#c5dcc1}.game-shell .board-header{display:none}.game-shell .board-track{grid-template-columns:repeat(4,minmax(110px,1fr));gap:12px}.game-shell .board-track-container{overflow:visible}.game-shell .board-tile{min-height:100px}.game-shell .board-wrapper .tile-info-panel{display:none}.game-shell .board-wrapper .board-bottom-controls{display:none!important}.game-shell .game-modal{height:min(720px,calc(100dvh - 20px))}.game-shell .game-modal-viewport{height:calc(100% - 61px)}
.challenge-intro{height:100%;padding:35px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(circle at 50% 30%,#315b48,#12382f);gap:15px;color:#fff4d5}.challenge-intro .intro-icon{font-size:64px}.challenge-intro small,.intro-duration{font:9px Bungee;letter-spacing:1px;color:#e8ca7f}.challenge-intro h2{font-size:28px;margin:0;color:#ffdc92}.challenge-intro p{max-width:320px;color:#d4e1c6;font-size:16px;margin:0}.challenge-intro .primary{margin-top:15px;min-width:200px}.intro-count{font:100px Bungee;color:#ffd173}
.campus-inspector{position:absolute;left:24px;top:210px;width:230px;padding:18px;background:#fff8e8f5;border:1px solid #fff4d7;border-radius:14px;box-shadow:0 6px 20px #173e3522;color:#254c3c;z-index:3}.campus-inspector h3{font-size:13px;margin:5px 15px 8px 0}.campus-inspector p{color:#4f6d59;font-size:12px;margin:0}.campus-inspector button{position:absolute;right:6px;top:3px;width:35px;height:35px;border:0;background:transparent;color:#315644;font-size:22px}
.has-session .adventure-title h1 em:before{content:' '}.game-shell .phase-strip{bottom:calc(var(--flow-height,110px) + 35px)}
.all-house-rolls{flex-wrap:wrap;max-height:48%}.house-dice-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;flex-basis:100%}.house-die{display:grid;grid-template-columns:27px 1fr;align-items:center;gap:3px;padding:8px 6px;background:#e6ecd9;border:1px solid #afc4a5;border-bottom:3px solid #8da580;border-radius:10px;color:#234b38;min-height:58px}.house-die svg{width:27px;height:32px;grid-row:span 2}.house-die span{font-size:10px;font-weight:bold}.house-die b{font:17px Bungee}.game-shell .house-die:disabled{opacity:1;background:#f7dfaa;border-color:#d4b66e;cursor:default}.device-round-note{font-size:10px;color:#586e57;flex-basis:100%;text-align:center}
@media(max-width:800px){.all-house-rolls .local-avatar{display:none}.house-dice-row{gap:4px}.house-die{grid-template-columns:1fr;padding:5px 3px;min-height:65px}.house-die svg{display:none}.house-die span{font-size:9px}.house-die b{font-size:20px}.device-round-note{font-size:9px}.all-house-rolls>.primary{min-width:110px;font-size:9px;padding:10px}}
@media(max-width:800px){.campus-inspector{top:auto;bottom:calc(var(--flow-height,110px) + 86px);left:14px;width:calc(100% - 28px)}.game-shell .phase-strip{bottom:calc(var(--flow-height,110px) + 27px)}.view-controls{bottom:calc(var(--flow-height,110px) + 69px)}.game-shell .local-flow{align-items:center}.game-shell .local-copy h2{font-size:12px}}
@media(min-width:1100px){.house-hud{top:26px}.game-shell .round-panel{left:auto;right:24px;bottom:23px;transform:none;width:350px;max-height:58%}.in-class .phase-strip{bottom:26px}.in-class .map-caption{bottom:24px}}
@media(max-width:800px){.game-shell{grid-template-rows:62px minmax(0,1fr) 60px 22px}.game-topbar{padding:9px 14px;gap:9px}.wordmark{font-size:9px;letter-spacing:1px}.wordmark strong{font-size:10px}.topbar-actions{gap:6px}.topbar-actions>span{display:none}.game-shell .music{font-size:10px;padding:9px}.adventure-title{top:18px;left:17px}.adventure-title h1{font-size:25px}.adventure-title .eyebrow{font-size:7px}.adventure-title p{font-size:10px;margin-top:5px}.house-hud{top:133px;left:14px;right:14px;justify-content:center;gap:5px}.hud-house{flex:1;min-width:0;padding:5px 4px;grid-template-columns:25px 1fr;gap:3px;border-radius:9px}.hud-house svg{width:25px;height:30px}.hud-house span{font-size:9px}.hud-house b{font-size:8px}.hud-house small{display:none}.map-tools{right:14px;top:18px}.map-tools button{width:32px;height:32px}.game-nav{gap:8px;justify-content:space-between;padding:0 12px}.game-nav button{min-width:0;font-size:10px;padding:6px 8px;gap:5px}.game-nav button span{font-size:21px}.game-status{padding:4px 14px;letter-spacing:.3px}.game-status span:last-child{font-size:7px}.local-flow,.game-shell .round-panel{width:calc(100% - 24px);bottom:14px;padding:14px;max-height:39%;border-radius:17px}.local-flow{gap:10px;min-height:96px}.local-avatar{width:37px;height:48px}.local-copy h2{font-size:13px}.local-copy p{font-size:11px}.local-flow>.primary{font-size:10px;min-width:100px;padding:12px}.local-copy small{font-size:8px}.phase-strip{bottom:126px;gap:8px;padding:8px 13px}.phase-strip span,.phase-strip b{font-size:8px}.view-controls{left:14px;bottom:176px}.map-hint,.map-caption,.space-picker{display:none}.shell-dialog{padding:26px 18px}.shell-dialog h2{font-size:21px}.shell-dialog .houses-grid{gap:4px}.shell-dialog .house-pixel-avatar{width:43px;height:48px}.shell-dialog .house-info h3{font-size:8px}.shell-dialog .house-label{font-size:8px!important}.shell-dialog .games-grid{grid-template-columns:1fr}.shell-dialog .game-launch-card{padding:18px}.shell-dialog .room-join{gap:6px}.shell-dialog .room-join .primary{font-size:10px;padding:8px 12px}.shell-dialog .house-rank-item{padding:10px;gap:8px;font-size:12px}.shell-dialog .rank-pos{font-size:13px;width:24px}.has-session .adventure-title h1{font-size:19px}.has-session .adventure-title p{max-width:255px}.game-shell .board-wrapper{padding:200px 12px 200px}.game-shell .board-track{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-height:620px) and (min-width:700px){.adventure-title h1{font-size:22px}.local-flow{min-height:75px;padding:10px 18px}.phase-strip{bottom:110px}.map-hint,.map-caption{display:none}.house-hud{top:15px}}
@media(prefers-reduced-motion:reduce){.game-shell *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Roulette Dialog & Card Reel */
.roulette-dialog{text-align:center;width:min(440px,calc(100% - 24px));background:radial-gradient(circle at 50% 20%,#fff9e8,#faeecd);border:3px solid #f6d177;box-shadow:0 12px 50px rgba(16,42,67,0.35);padding:30px 24px;border-radius:24px}
.roulette-dialog .eyebrow{color:#b37d14;font-size:10px;letter-spacing:2px;font-family:Bungee,sans-serif}
.roulette-dialog h2{margin:8px 0 16px;color:#1d4c3b;font-size:22px}
.roulette-box{margin:18px auto;padding:24px;background:#163e35;border-radius:20px;border:3px solid #ffd173;box-shadow:inset 0 4px 15px rgba(0,0,0,0.5),0 6px 20px rgba(253,212,126,0.3);position:relative;overflow:hidden}
.roulette-card{display:flex;flex-direction:column;align-items:center;gap:8px;color:#fff8e8;transform:scale(1);transition:transform 0.15s ease}
.roulette-card.pulse{animation:roulettePulse 0.3s ease-out}
@keyframes roulettePulse{0%{transform:scale(0.85);opacity:0.6}50%{transform:scale(1.1);opacity:1}100%{transform:scale(1);opacity:1}}
.roulette-icon{font-size:60px;filter:drop-shadow(0 4px 10px rgba(0,0,0,0.4))}
.roulette-name{font:20px Bungee,sans-serif;color:#ffd173;margin:4px 0 2px;letter-spacing:0.5px}
.roulette-tag{font:9px Bungee,sans-serif;color:#88bda8;background:#ffffff15;padding:4px 12px;border-radius:20px;letter-spacing:1px}
.roulette-hint{font-size:12px;color:#4f6f59;margin:12px 0 0}
