:root{--game-bg:#142b2f;--game-bg-soft:#203b40;--game-surface:#203b40;--game-surface-strong:#10262a;--game-border:#3a5558;--game-text:#f2f2da;--game-muted:#b2c4bf;--game-text-muted:var(--game-muted);--game-paper:#f2f2da;--game-paper-strong:#fffef1;--game-paper-text:#213521;--game-paper-muted:#506457;--game-gold:#d5eb90;--game-gold-dark:#8ea34b;--game-blue:#56a7a7;--game-blue-dark:#336d70;--game-green:#a9ca68;--game-green-dark:#667f35}
.home .home-brand{min-height:150px;flex-direction:column;gap:.35rem}.home .home-brand::before{inset:42% 8% auto;height:130px;background:radial-gradient(ellipse,#8ebc6945,transparent 68%)}.home .home-brand-logo{position:relative;z-index:1;width:76px;height:76px;filter:drop-shadow(0 10px 18px #0007)}.home .home-brand h1{color:#f2f2da;font-family:Tahoma,Verdana,Arial,sans-serif;font-size:clamp(2.8rem,7vw,5.5rem);font-weight:800;line-height:.95;letter-spacing:-.045em;text-transform:none;text-shadow:0 5px 0 #253f3a,0 14px 32px #0008;-webkit-text-stroke:0}.home .home-brand-badge{top:1rem;left:calc(50% + 145px);background:linear-gradient(145deg,#75b9ad,#336d70);border-color:#d8eee3;box-shadow:0 4px 0 #244e50,0 10px 25px #0005}.names h2,.about-game h2{color:#3d633e}.names label{color:#4d654e}.game-eyebrow{color:#667f35}.invitation-room strong{color:#3d633e}
@media(max-width:800px){.home .home-brand{min-height:125px}.home .home-brand-logo{width:58px;height:58px}.home .home-brand-badge{top:0;left:auto;right:0}}
.game-site{background:radial-gradient(circle at 52% -10%,rgba(86,167,167,.25),transparent 38rem),linear-gradient(180deg,var(--game-bg-soft),var(--game-bg) 36rem)}.game-site .game-navbar{background:rgba(20,43,47,.9);border-bottom-color:rgba(178,196,191,.22)}.game-site .game-status-pill{border-color:rgba(169,202,104,.3);background:rgba(169,202,104,.12);color:#d5eb90}.game-site .mode{background:linear-gradient(150deg,#294a4e,#1d3d41 75%);border-color:#48666a}.game-site .mode-online{color:#213521;background:#d5eb90;border-color:#d5eb90}.game-site .mode-online .mode-icon{color:#213521;background:#bed676;border-color:#9fbb5d}.game-site .mode-online .mode-copy strong{color:#213521}.game-site .mode-online .mode-copy>span{color:#506457}.game-site .mode-online b{color:#213521;background:#b8d36f}.game-site .mode-local{border-left-color:#78a55d}.game-site .mode-solo{border-left-color:#56a7a7}.game-site .mode-local b{background:linear-gradient(180deg,#a9ca68,#667f35)}.game-site .mode-solo b{background:linear-gradient(180deg,#75b9b1,#336d70)}.game-site .hotseat-bar{background:#203b40}.game-site .stage{background:#203b40}.game-site .waiting,.game-site .error{background:#142b2f}
.names select{min-height:44px;color:#352812;background:#fffdf8;border:2px solid #ad9b75;border-radius:.7rem}.names select:focus{color:#352812;background:#fff}.second-player{display:grid;gap:1rem}.code-join{display:grid;gap:.4rem;padding-top:1rem;border-top:1px solid #cdbd98}.code-join .input-group{display:flex;flex-wrap:nowrap}.code-join input{text-transform:uppercase;letter-spacing:.16em;font-family:ui-monospace,monospace;font-weight:800}.code-join button{min-width:7rem}
#again.rematch-alert{color:#213521;background:var(--game-gold);border-color:#f2f2da;box-shadow:0 0 0 0 rgba(213,235,144,.75);animation:rematch-pulse 1.15s ease-in-out infinite}@keyframes rematch-pulse{50%{transform:scale(1.08);box-shadow:0 0 0 .55rem rgba(213,235,144,0);filter:brightness(1.08)}}
.waiting.static .spinner{display:none}
.waiting.invite-waiting{gap:.8rem}.waiting.invite-waiting h2{margin:0;color:var(--game-muted);font-size:1rem;font-weight:700}
[hidden]{display:none!important}button,input{font:inherit}.lobby{min-height:100svh}.game-main{padding-block:clamp(1rem,2.5vw,2.5rem) 2rem}.home-brand{position:relative;display:flex;justify-content:center;align-items:center;min-height:100px;margin-bottom:1rem;text-align:center}.home-brand::before{position:absolute;inset:50% 12% auto;height:78px;content:"";transform:translateY(-50%);background:radial-gradient(ellipse,#8fca6840,transparent 70%);filter:blur(4px)}.home-brand h1{position:relative;z-index:1;margin:0;color:#f5f8dd;font-size:clamp(2.6rem,8vw,5.75rem);font-weight:1000;line-height:.86;letter-spacing:-.07em;text-transform:uppercase;text-shadow:0 4px 0 #4d6f35,0 8px 0 #294323,0 18px 36px #0009;-webkit-text-stroke:2px #7da357}.home-brand-badge{position:absolute;z-index:2;top:0;left:calc(50% + 165px);padding:.55rem .85rem;transform:rotate(6deg);color:#fff;background:linear-gradient(145deg,#2ca9f6,#0861ae);border:2px solid #dceeff;border-radius:.65rem;box-shadow:0 4px 0 #073d70,0 10px 25px #0005;font-size:.73rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}.home-intro{max-width:760px;margin:-.3rem auto 1.75rem;color:var(--game-muted);font-size:clamp(.96rem,1.5vw,1.08rem);line-height:1.65;text-align:center}.names{display:grid;gap:1rem;height:100%;padding:clamp(1rem,2.5vw,1.6rem)}.names h2,.about-game h2{margin:0;color:#70420e;font-size:.95rem;font-weight:900;letter-spacing:.055em;text-transform:uppercase}.names label{display:grid;gap:.4rem;color:#654f2b;font-size:.72rem;font-weight:900;letter-spacing:.045em;text-transform:uppercase}.names input{min-height:44px;color:#352812;background:#fffdf8;border:2px solid #ad9b75;border-radius:.7rem}.names input:focus{color:#352812;background:#fff}.modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.mode{position:relative;display:flex;flex-direction:column;min-width:0;min-height:260px;padding:1.15rem;overflow:hidden;color:var(--game-text);text-align:left;background:linear-gradient(150deg,#163654 0%,#0b223c 75%);border:1px solid #456482;border-left:5px solid;border-radius:var(--game-radius-sm);box-shadow:inset 0 1px #ffffff17,0 12px 28px #0003}.mode::after{position:absolute;right:-30px;bottom:-45px;width:120px;height:120px;content:"";background:radial-gradient(circle,var(--mode-glow,#fff2),transparent 68%);pointer-events:none}.mode-online{--mode-glow:#1878bd66;border-left-color:#1878bd}.mode-local{--mode-glow:#3d914955;border-left-color:#3d9149}.mode-solo{--mode-glow:#dd8b1555;border-left-color:#dd8b15}.mode-icon{display:grid;place-items:center;width:44px;height:44px;margin-bottom:.8rem;color:#fff5c8;background:#ffffff0c;border:1px solid #ffffff20;border-radius:50%;font-size:1.35rem}.mode-copy{display:grid;gap:.4rem}.mode-copy strong{color:#fff5c8;font-size:1.05rem;font-weight:900}.mode-copy>span{color:var(--game-muted);font-size:.82rem;line-height:1.5}.mode b{position:relative;z-index:1;display:grid;place-items:center;width:100%;min-height:44px;margin-top:auto;padding:.6rem;color:#fff;background:linear-gradient(180deg,#279bea,var(--game-blue-dark));border-radius:.7rem;font-size:.82rem;font-weight:900;text-align:center}.mode-local b{background:linear-gradient(180deg,#64bb65,var(--game-green-dark))}.mode-solo b{background:linear-gradient(180deg,#ffc74a,var(--game-gold-dark))}.mode:hover,.mode:focus-visible{transform:translateY(-2px);filter:brightness(1.06)}.about-game{margin-top:1.5rem;padding:1.3rem 1.5rem}.about-game p{margin:.6rem 0 0;color:var(--game-paper-muted);line-height:1.6}.join-card{display:grid;gap:.75rem;margin-top:.25rem;padding-top:1.1rem;border-top:1px solid #cdbd98}.join-card p{margin:0;color:var(--game-paper-muted);font-size:.86rem;line-height:1.5}.invitation-room{display:flex;justify-content:space-between;gap:.75rem;padding:.65rem .75rem;background:#eee5d2;border-radius:.55rem}.invitation-room strong{max-width:12rem;overflow:hidden;color:#70420e;font-family:ui-monospace,monospace;text-overflow:ellipsis}.invitation-actions{display:grid;gap:.55rem}.invitation-actions button{min-height:44px;border-radius:.7rem;font-weight:800}.invitation-actions button:last-child{color:#604c2e;background:transparent;border:1px solid #ad9b75}.invitation-pending .experience-column,.invitation-pending #second-name{opacity:.42;pointer-events:none}.legal-note{margin:2rem 0 0;color:var(--game-muted);font-size:.75rem;line-height:1.7;text-align:center}
.play{height:100svh;display:flex;flex-direction:column;overflow:hidden}.toolbar{min-height:4.1rem;padding:.55rem 1rem;display:flex;gap:1.35rem;align-items:center;border-bottom:1px solid var(--game-border);background:var(--game-bg)}.toolbar button,.hotseat-bar button,.error button{padding:.6rem .8rem;background:var(--game-surface);color:var(--game-text);border:1px solid var(--game-border);border-radius:.55rem}.toolbar .wordmark{display:flex;align-items:center;gap:.45rem;border:0;background:transparent;font-weight:800;padding:0}.wordmark span{color:var(--game-gold)}.game-info{display:flex;flex-direction:column;gap:.1rem;min-width:0}.game-info span{font-size:.65rem;color:var(--game-gold);letter-spacing:.12em}.game-info strong{font-size:.8rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40vw}.tools{margin-left:auto;display:flex;gap:.4rem}.tools button{font-size:.75rem;white-space:nowrap}.room-code-copy{position:relative;min-width:7.8rem}.room-code-copy b{color:var(--game-gold);font-family:ui-monospace,monospace;font-size:1rem;letter-spacing:.16em}.room-code-copy::after{position:absolute;z-index:20;right:0;bottom:calc(100% + 8px);width:max-content;max-width:min(260px,80vw);padding:.45rem .6rem;content:attr(data-tooltip);transform:translateY(4px);opacity:0;color:#fff;background:#07191cf2;border:1px solid #526d70;border-radius:.5rem;box-shadow:0 8px 20px #0007;font-size:.72rem;font-weight:700;line-height:1.25;pointer-events:none;transition:opacity .15s ease,transform .15s ease}.room-code-copy:hover::after,.room-code-copy:focus-visible::after{transform:translateY(0);opacity:1}.room-code-copy.copy-confirmed{border-color:#75d990;background:#1d4b38}.stage{position:relative;flex:1;min-height:0;background:#203538;overflow:hidden}#frames{position:absolute;inset:0}.game-frame{position:absolute;inset:0;width:100%;height:100%;border:0;opacity:0;pointer-events:none;z-index:0}.game-frame.active{opacity:1;pointer-events:auto;z-index:1}.hotseat-bar{display:flex;align-items:center;gap:1.25rem;padding:.45rem 1rem;background:#102943;font-size:.75rem}.hotseat-bar>div{display:flex;gap:.5rem}.hotseat-bar button{font-size:.75rem;padding:.35rem .75rem}.hotseat-bar button.selected{color:#332b1b;background:var(--game-gold);border-color:var(--game-gold)}.hotseat-bar small{color:var(--game-muted);margin-left:auto}.waiting{position:absolute;inset:0;z-index:3;background:var(--game-bg-soft);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:2rem;pointer-events:none}.waiting h2{font-size:1.8rem;margin:1rem 0 .4rem}.waiting p{max-width:32rem;color:var(--game-muted);line-height:1.6}.spinner{width:2.25rem;height:2.25rem;border:3px solid var(--game-border);border-top-color:var(--game-gold);border-radius:100%;animation:rotate 1s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}}.error{position:absolute;inset:0;background:var(--game-bg-soft);z-index:6;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:1.5rem;gap:.8rem}.error>span{font-size:2.5rem;color:var(--game-gold)}.error h2{font-size:1.8rem;margin:.3rem}.error p{max-width:44rem;line-height:1.7;white-space:pre-line}.connection{position:absolute;bottom:1.4rem;left:50%;transform:translateX(-50%);z-index:8;background:#f8d89a;color:#332b1b;padding:.8rem 1.4rem;border-radius:.75rem;font-size:.8rem;max-width:90vw;text-align:center}.zoo-toast{position:fixed;z-index:12;bottom:1.5rem;left:50%;transform:translateX(-50%);background:var(--game-gold);color:#332b1b;padding:.75rem 1.35rem;border-radius:99px;font-size:.8rem}.hotseat-mode .game-frame:not(.active){opacity:1;transform:scale(.18);transform-origin:bottom right;z-index:2;outline:8px solid #668174;box-shadow:0 0 0 4px #142b2f;pointer-events:none}
@media(max-width:991.98px){.home-brand-badge{left:auto;right:8%}.modes{grid-template-columns:repeat(3,minmax(180px,1fr));overflow-x:auto;padding-bottom:.5rem}}@media(max-width:800px){.home{padding-inline:1rem}.home-brand{min-height:82px}.home-brand h1{font-size:clamp(2.4rem,15vw,4.2rem)}.home-brand-badge{top:-.4rem;right:0;font-size:.6rem}.modes{grid-template-columns:1fr;overflow:visible}.mode{min-height:200px}.toolbar{flex-wrap:wrap;gap:.5rem;padding:.5rem .65rem}.game-info{flex:1}.game-info strong{max-width:58vw;font-size:.7rem}.tools{width:100%;justify-content:flex-end}.tools button{padding:.4rem .6rem}.room-code-copy{margin-right:auto}.hotseat-bar{flex-wrap:wrap;gap:.5rem;padding:.4rem .65rem}.hotseat-bar small{display:none}}@media(prefers-reduced-motion:reduce){.spinner,#again.rematch-alert{animation:none}.mode:hover{transform:none}#again.rematch-alert{outline:3px solid var(--game-paper)}}

/* Mode-specific homepage setup */
.game-site .mode-online{color:var(--game-text);background:linear-gradient(150deg,#294a4e,#1d3d41 75%);border-color:#48666a;border-left-color:var(--game-gold)}
.game-site .mode-online .mode-icon{color:#213521;background:#bed676;border-color:#9fbb5d}
.game-site .mode-online .mode-copy h2{color:#fff5c8}
.game-site .mode-online .mode-copy p{color:var(--game-muted)}
.mode{cursor:default}
.mode:hover{transform:none;filter:none}
.mode-copy{min-height:96px}
.mode-copy h2{margin:0;color:#fff5c8;font-size:1.05rem;font-weight:900}
.mode-copy p{margin:0;color:var(--game-muted);font-size:.82rem;line-height:1.5}
.mode-settings{position:relative;z-index:1;display:grid;gap:.85rem;margin:.6rem 0 1rem}
.mode-settings label{display:grid;gap:.35rem;color:#d7e2d9;font-size:.7rem;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.mode-settings input,.mode-settings select,.code-join input{min-height:44px;color:#213521;background:#fffef1;border:2px solid #819b77;border-radius:.7rem}
.mode-settings input:focus,.mode-settings select:focus,.code-join input:focus{color:#213521;background:#fff;border-color:var(--game-gold);box-shadow:0 0 0 .2rem #d5eb9033}
.mode-action,.code-join button{position:relative;z-index:1;width:100%;min-height:44px;margin-top:auto;padding:.6rem;color:#fff;background:linear-gradient(180deg,#279bea,var(--game-blue-dark));border:0;border-radius:.7rem;font-size:.82rem;font-weight:900;text-align:center}
.mode-local .mode-action{background:linear-gradient(180deg,#64bb65,var(--game-green-dark))}
.mode-solo .mode-action{background:linear-gradient(180deg,#75b9b1,#336d70)}
.mode-action:hover,.mode-action:focus-visible,.code-join button:hover,.code-join button:focus-visible{filter:brightness(1.1);transform:translateY(-1px)}
.public-toggle{position:relative;z-index:1;display:flex;align-items:center;gap:.55rem;margin:.15rem 0 .7rem;color:#d7e2d9;font-size:.76rem;font-weight:800}
.public-toggle input{width:1.1rem;height:1.1rem;accent-color:var(--game-gold)}
.code-join{padding:0;border:0}
.code-join .join-fields{display:grid;gap:.65rem;width:100%}
.code-join input{width:100%;border-radius:.7rem!important;text-transform:uppercase;letter-spacing:.12em;font-family:ui-monospace,monospace;font-weight:800;text-align:center}
.code-join button{width:100%;min-width:5.6rem;border-radius:.7rem}
.or-divider{display:flex;align-items:center;gap:.65rem;margin:.75rem 0;color:var(--game-muted);font-size:.65rem;font-weight:900;letter-spacing:.14em}
.or-divider::before,.or-divider::after{height:1px;content:"";flex:1;background:#607675}
.public-panel{margin-top:1.5rem;padding:1.3rem 1.5rem}
.public-panel h2{margin:0 0 .8rem;color:#3d633e;font-size:.95rem;font-weight:900;letter-spacing:.055em;text-transform:uppercase}
.public-game{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.65rem .75rem;color:#213521;background:#edf3dc;border:1px solid #aabf80;border-radius:.65rem;font-weight:800}
.public-game+.public-game{margin-top:.5rem}
.public-game b{font-family:ui-monospace,monospace;letter-spacing:.1em}
.join-card{border-top-color:#58716e}
.join-card h2{color:var(--game-gold)}
.join-card p{color:var(--game-muted)}
.invitation-room{color:#213521}
.invitation-actions button:last-child{color:#d7e2d9;border-color:#78908c}
.invitation-pending .experience-column{opacity:1;pointer-events:auto}
.names .join-card{border-top-color:#cdbd98}
.names .join-card h2{color:#3d633e}
.names .join-card p{color:var(--game-paper-muted)}
.names .invitation-actions button:last-child{color:#604c2e;border-color:#ad9b75}
.invitation-pending .experience-column,.invitation-pending .public-panel{display:none;opacity:1;pointer-events:auto}
.invitation-pending .setup-column{width:min(100%,620px);margin-inline:auto}
@media(max-width:800px){.mode-copy{min-height:0}.mode-settings{margin-top:1rem}}
