/* TERRABITS beta 2.1: contrast, spacing and mobile usability; zero dependencies. */
html,body{max-width:100%;}
button:focus-visible,.beta21-dialog input:focus-visible,.beta21-dialog textarea:focus-visible{outline:3px solid #bdf87d!important;outline-offset:3px}
.beta21-open,.beta21-quest{border:1px solid #a2e3c1;border-radius:11px;background:linear-gradient(135deg,#286f61,#234d6b);color:#f6fff8;padding:8px 12px;font-size:11px;font-weight:850;min-height:36px;flex:none;white-space:nowrap;box-shadow:0 2px 0 #142c40}
.beta21-open{border-color:#ffdc91;background:linear-gradient(130deg,#77532a,#604065);color:#fff2c4}
.beta21-open:hover,.beta21-quest:hover{filter:brightness(1.15)}
.beta21-quest{min-width:0;max-width:250px;overflow:hidden;text-overflow:ellipsis;text-align:left}
.beta21-dialog[hidden]{display:none!important}
.beta21-dialog{position:fixed;inset:0;z-index:9999;background:rgba(6,14,30,.84);display:grid;place-items:center;padding:16px;overflow-y:auto;overscroll-behavior:contain}
.beta21-card{width:min(100%,540px);max-height:calc(100dvh - 32px);overflow-y:auto;color:#f6f7ff;background:linear-gradient(155deg,#283054,#171f3b);border:1px solid #92bcce;border-radius:20px;padding:22px;box-shadow:0 20px 50px #030816c7}
.beta21-head{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}
.beta21-head h2{margin:6px 0 0;font-size:clamp(19px,3vw,26px);line-height:1.25}
.beta21-kicker{font-size:10px;color:#bff5ce;font-weight:900;letter-spacing:.08em}
#beta21Close{flex:none;min-width:42px;min-height:42px;border-radius:12px;background:#3c466b;color:white;border:1px solid #8ba7c2;font-weight:900}
.beta21-intro{color:#d4dcee;font-size:13px;line-height:1.55}
.beta21-tasks{display:grid;gap:8px;margin:15px 0}
.beta21-tasks label{display:flex;align-items:center;gap:12px;padding:12px;border-radius:10px;background:#283d53;border:1px solid #567386;font-size:13px;line-height:1.4;cursor:pointer}
.beta21-tasks input{width:19px;height:19px;flex:none;accent-color:#c6fc80}
.beta21-comment-label{display:block;color:#fff4b9;font-size:13px;font-weight:800;margin:16px 0 7px}
#beta21Comment{width:100%;box-sizing:border-box;background:#121d33;color:#fff;border:1px solid #8193b7;border-radius:12px;padding:12px;font:inherit;font-size:13px;resize:vertical;min-height:80px}
.beta21-footer{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:13px}
#beta21Progress{font-size:12px;color:#bcf3c7}
#beta21Copy{border:0;border-radius:11px;background:#c9f78d;color:#17311e;padding:12px;font-weight:900;min-height:44px}
.beta21-privacy{color:#bbc5d8;font-size:11px;line-height:1.4;margin-bottom:0}
/* Desktop: prevent clipping/overflow while keeping the forest the visual focus. */
@media(min-width:761px){
 .site-header{min-width:0;flex-wrap:wrap;gap:12px;padding:8px 0}.header-name{min-width:150px}.header-right{flex-wrap:wrap;justify-content:flex-end}
 .headline{min-width:0}.headline>div:first-child{min-width:0}.headline h1{overflow-wrap:anywhere}
 .dashboard{grid-template-columns:minmax(218px,260px) minmax(0,1fr) minmax(215px,268px);gap:12px}
 .game-frame{min-width:0}.frame-top{flex-wrap:wrap;line-height:1.3}
 .party-hud{flex-wrap:wrap;gap:7px;padding:9px}
 .party-hud button{max-width:100%}
 .beta21-quest{max-width:min(240px,100%)}
}
@media(min-width:761px) and (max-width:1140px){
 .dashboard{grid-template-columns:minmax(200px,235px) minmax(0,1fr)}
 .right-col{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .headline-stats{gap:6px}.headline-stats>div{min-width:78px;padding-left:8px}
}
@media(min-width:761px) and (max-width:900px){.dashboard{grid-template-columns:minmax(0,1fr)}.left-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.right-col{grid-column:auto}.middle-col{order:-1}}
/* Mobile: compact header and keep game map + touch controls visible. */
@media(max-width:760px){
 html,body{width:100%;height:100%;overflow:hidden}
 .site-header{gap:5px!important;padding:4px 7px!important;min-width:0}
 .site-header .logo{width:clamp(54px,17vw,82px)!important;height:52px!important;overflow:hidden!important}
 .site-header .logo img{width:100%!important;max-height:50px!important}
 .header-name{min-width:0!important;flex:1!important}
 .header-name strong{display:flex!important;flex-wrap:wrap!important;align-items:center;column-gap:6px;white-space:normal!important;overflow:visible!important;font-size:clamp(10px,2.85vw,13px)!important;letter-spacing:.02em!important;line-height:1.25!important}
 .header-name .beta{display:inline-flex!important;margin:0!important;padding:3px 6px!important;font-size:9px!important}
 .header-right{gap:4px!important}.header-right .header-btn{width:34px!important;min-width:34px!important;max-width:34px!important;height:37px!important}
 .party-hud .beta21-open,.party-hud .beta21-quest{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:none!important;height:30px!important;min-height:30px!important;padding:4px 9px!important;font-size:10px!important;max-width:200px!important}
 .party-hud .beta21-quest{justify-content:flex-start!important;max-width:178px!important}
 .mobile-voice-copy{min-width:0!important}.mobile-voice-copy strong,.mobile-voice-copy span{overflow-wrap:anywhere!important}
 .game-frame .mobile-voice{max-width:calc(100vw - 12px)!important;box-sizing:border-box!important}
 .map19-controls{z-index:7!important}
 .beta21-dialog{padding:8px;align-items:center}
 .beta21-card{padding:14px;border-radius:15px;max-height:calc(100dvh - 16px)}
 .beta21-tasks{gap:5px}.beta21-tasks label{font-size:12px;padding:9px}
 .beta21-head h2{font-size:20px}
 .beta21-footer{flex-wrap:wrap}#beta21Copy{width:100%}
}
@media(max-width:360px){.party-hud .beta21-quest{max-width:145px!important}.header-name strong{font-size:10px!important}}
@media(max-height:590px) and (max-width:760px){
 .site-header{height:52px!important;min-height:52px!important;max-height:52px!important}
 .party-hud{min-height:35px!important;max-height:35px!important}
 .village-ticker{display:none!important}
 .beta21-card{max-height:calc(100dvh - 8px)}
}
@media(prefers-reduced-motion:reduce){.beta21-open,.beta21-quest{animation:none!important;transition:none!important}}
/* Ajuste de la tarjeta de conversación: priorizar el escenario y sus controles */
@media(max-width:760px){
 .game-frame .mobile-voice{bottom:7px!important;padding:8px 10px!important;grid-template-columns:43px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:5px 9px!important;border-radius:14px!important}
 .game-frame .mobile-voice-icon{width:43px!important;height:43px!important;min-width:43px!important}
 .game-frame .mobile-voice-copy{padding-right:32px!important;gap:2px!important}
 .game-frame .mobile-voice-copy strong{font-size:11px!important;white-space:normal!important;max-height:2.3em}
 .game-frame .mobile-voice-copy>span{font-size:10px!important;-webkit-line-clamp:2!important}
 .game-frame .mobile-voice .voice-ctas{grid-column:1/-1!important;grid-row:2!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
 .game-frame .mobile-voice .voice-ctas #mobileVoiceClose{position:absolute!important;right:7px!important;top:7px!important;width:30px!important;min-width:30px!important;max-width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;font-size:13px!important;z-index:3}
 .game-frame .mobile-voice .voice-ctas #mobileVoiceClose::after{content:''!important;display:none!important}
 .game-frame .mobile-voice .voice-ctas button:not(#mobileVoiceClose){height:33px!important;min-height:33px!important;max-height:33px!important;font-size:10px!important}
 .game-frame .mobile-voice:has(#mobileFeed:not([hidden])) .voice-ctas{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .viewport .touch-pad{bottom:130px!important}
}
@media(max-width:760px) and (max-height:690px){.viewport .touch-pad{bottom:117px!important}}
.beta21-ambient{pointer-events:none;position:absolute;inset:0;overflow:hidden;z-index:2;opacity:.65}
.beta21-ambient i{position:absolute;width:3px;height:3px;border-radius:50%;background:#e7ffab;box-shadow:0 0 8px 3px #c9f86c88;animation:beta21-fly 8s ease-in-out infinite alternate}
.beta21-ambient i:nth-child(1){top:18%;left:16%;animation-delay:-1s}.beta21-ambient i:nth-child(2){top:35%;left:73%;animation-delay:-4s}.beta21-ambient i:nth-child(3){top:62%;left:40%;animation-delay:-2s}.beta21-ambient i:nth-child(4){top:79%;left:84%;animation-delay:-6s}
@keyframes beta21-fly{0%{transform:translate(0,0);opacity:.15}45%{opacity:.85}100%{transform:translate(15px,-24px);opacity:.28}}
@media(max-width:760px){.beta21-ambient i:nth-child(n+3){display:none}}
@media(prefers-reduced-motion:reduce){.beta21-ambient{display:none}}
