/* Portada y acceso */
.public-room,.portal.portal-login{background:#fbedd7;color:#391820;color-scheme:light}
.ronda-header {
 --brand-size:clamp(1.4rem,7.55vw,2.25rem);
 display:flex; justify-content:center; align-items:center;
 padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));
 background:#511820;
}
.ronda-brand {
 display:inline-flex; align-items:center; gap:.58em; padding-block:.48em;
 font:700 var(--brand-size)/1.1 Georgia,'Times New Roman',serif;
 color:#fff1de; text-decoration:none; letter-spacing:-.025em;
}
.ronda-brand .ronda-symbol { display:block; flex:none; width:2.184em; height:2.184em; }
.ronda-brand span { padding-inline-start:.64em; border-inline-start:.055em solid #dfa552; line-height:1.53; }
.ronda-brand .ronda-signature { display:grid; gap:.16em; line-height:1.08; }
.ronda-signature small { color:#f3ce95; font:italic 400 clamp(.82rem,3.15vw,1rem)/1.22 Georgia,'Times New Roman',serif; letter-spacing:normal; }
.ronda-brand:focus-visible { outline:2px solid #f2c479; outline-offset:2px; }
.portal:not(.portal-login) .ronda-header { --brand-size:clamp(1.12rem,5.4vw,1.44rem); }
.portal .ronda-header{border-bottom:1px solid #7a4c3d}
.portal.portal-login main{width:100%;max-width:none;margin:0}
.foot { justify-content:center; text-align:center; color:var(--brown-soft); border-color:var(--paper-line); }
.foot small { font:inherit; }
.public-room.in-live .foot,.public-room.in-live .ronda-header { display:none; }
.ronda-entry{display:grid;background:radial-gradient(ellipse at 30% 28%,#fff4e3,#fae9cf);color:#361820;--form-ink:#49171e;--entry-button-text:#fff6e8}
.ronda-photo{width:100%;height:auto;display:block}
#lobby > .ronda-photo, .ronda-cover-cta { grid-area:1 / 1; }
.ronda-cover-cta {
 position:relative; place-self:end; z-index:1; margin:clamp(8px,2vw,16px);
 display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-height:32px;
 padding:4px 9px; border-radius:6px; background:#511820; color:var(--entry-button-text);
 box-shadow:0 1px 4px #28101755; font:600 .8rem/1.2 system-ui,sans-serif; text-decoration:none;
}
.ronda-cover-cta::after { content:""; position:absolute; inset:-6px 0; }
.ronda-cover-cta:hover { background:#702a38; }
.ronda-cover-cta:focus-visible { outline:3px solid #fff; outline-offset:2px; }
.ronda-form{width:100%;min-width:0;padding:clamp(16px,4vw,40px) clamp(20px,6.5vw,56px) 18px}
.ronda-form h1{margin:0 0 .19em;text-align:center;color:var(--form-ink);font:700 clamp(2rem,6.8vw,3rem)/1.14 Georgia,'Times New Roman',serif;letter-spacing:-.045em}
.ronda-form form{margin:0}
.ronda-form label,.portal .ronda-form label{display:block;margin:clamp(10px,2.7vw,19px) 0 4px;font:700 clamp(1.06rem,4.1vw,1.28rem)/1.25 Georgia,serif;color:#31191c}
.ronda-form input,.portal .ronda-form input,.ronda-form .password{border:1px solid #907765;border-radius:9px;background:#fff9ef;color:#31191c;font:400 1.05rem/1.35 system-ui,sans-serif;width:100%;height:clamp(43px,9.3vw,54px);padding:8px 13px;letter-spacing:normal}
.ronda-form #code{letter-spacing:normal}
.portal .ronda-form .password{display:flex;align-items:center;padding:0}
.portal .ronda-form .password input{background:transparent;border:0;min-width:0;height:100%}
.ronda-form .entry-submit,.portal .ronda-form .entry-submit{display:block;width:100%;border-radius:8px;background:linear-gradient(105deg,#591a23,#4c1720);color:var(--entry-button-text);border:1px solid #481721;text-align:center;margin:clamp(15px,4vw,25px) 0 0;padding:9px 12px;min-height:46px;font:700 clamp(1.25rem,4.3vw,1.48rem)/1.15 system-ui,sans-serif}
.ronda-form .entry-submit:hover{background:#672330}
.ronda-form .entry-link{display:block;width:fit-content;margin:12px auto 0;color:#471820;text-decoration-color:#bd883f;text-underline-offset:5px;text-decoration-thickness:2px;text-align:center;font:700 clamp(1.05rem,3.7vw,1.3rem)/1.5 Georgia,serif;padding:4px}
.ronda-form small{display:block;text-align:center;color:#6e594c;font:.74rem/1.4 system-ui,sans-serif;margin:12px auto 0}
.ronda-form #entryError{color:#831c2a;background:#f8dace;padding:9px 12px;border-radius:7px;margin:.7em 0 0}
@media(min-width:651px){
 .ronda-entry{grid-template-columns:minmax(0,1.14fr) minmax(0,1fr);max-width:1080px;margin:clamp(24px,5vh,60px) auto;border-radius:16px;overflow:hidden;border:1px solid #d8bea4;box-shadow:0 16px 48px #58362216}
 .ronda-form{align-self:center;padding:clamp(28px,4vw,60px)}
 .ronda-photo{height:100%;object-fit:cover;min-height:430px}
 .public-room main,.portal-login main{padding-inline:clamp(18px,4vw,52px)}
}
@media(max-width:650px){
 .ronda-entry{grid-template-columns:minmax(0,1fr)}
 .ronda-photo{max-height:47svh;object-fit:cover;object-position:50% 47%}
 .ronda-form{padding-bottom:max(16px,env(safe-area-inset-bottom))}
}

/* Sala vertical */
.public-room.in-live{overflow:hidden;background:#170e10;color-scheme:dark}
#room{--thumb-w:clamp(71px,21vw,122px);--thumb-h:min(calc(var(--thumb-w)*1.24),16dvh);--gap:6px;--pad:clamp(12px,3.5vw,26px);
 position:fixed;top:var(--live-offset,0px);left:0;right:0;height:100vh;height:var(--live-height,100dvh);isolation:isolate;overflow:hidden;color:#fff;font-family:system-ui,-apple-system,sans-serif;line-height:1.32;background:#211417}
#room #stage,#room .video-shade,#room .host-feed,#room .host-feed video{position:absolute;inset:0;width:100%;height:100%}
#room #stage{background:radial-gradient(ellipse at 49% 45%,#693d3e 0%,#361f23 45%,#1c1315 93%);z-index:0}
#room .host-feed video{object-fit:cover;background:#180f12;display:block}
#room.fit .host-feed video{object-fit:contain}
.host-feed{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.feed-initial,.message-initial{border-radius:50%;display:grid;place-items:center;color:#fff6e7;background:#68434a;border:1px solid #e9be8d9c;font-weight:650}
.host-feed .feed-initial{width:clamp(60px,15vw,104px);aspect-ratio:1;font:normal 2.1rem Georgia,serif;box-shadow:0 5px 30px #0003}
.host-feed .feed-name,.host-away{font-size:.98rem;color:#fff6e7}
.host-feed.has-camera .feed-name{display:none}
.host-away{position:absolute;top:48%;left:10%;right:10%;text-align:center}
#room .video-shade{z-index:1;background:linear-gradient(180deg,#0d080da1,transparent 25%,transparent 55%,#0b080c33 72%,#0b080cb5 100%);pointer-events:none}
.live-head{z-index:3;position:absolute;inset:max(10px,env(safe-area-inset-top)) max(var(--pad),env(safe-area-inset-right)) auto max(var(--pad),env(safe-area-inset-left));display:flex;justify-content:space-between;gap:12px;align-items:flex-start;pointer-events:none}
.live-head button{pointer-events:auto}
.live-identity{min-width:0;max-width:calc(100% - var(--thumb-w) - 14px)}
.live-stats{display:flex;align-items:center;gap:9px;margin-bottom:7px}
.live-badge,.live-count{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;gap:7px;color:#fff;font-size:clamp(.77rem,2.9vw,1.02rem);font-weight:750;white-space:nowrap}
.live-badge{background:linear-gradient(110deg,#651721e6,#3a0c13df);border:1px solid #ffe4da;letter-spacing:.035em;padding:6px 11px}
.live-badge i{width:.68em;height:.68em;background:#ff3449;border-radius:50%;animation:ronda-live-pulse 1.65s ease-in-out infinite}
@keyframes ronda-live-pulse{0%,100%{opacity:1;box-shadow:0 0 0 2px #ff35432a}55%{opacity:.4;box-shadow:0 0 0 4px transparent}}
@media(prefers-reduced-motion:reduce){.live-badge i{animation:none}}
.live-count{padding:6px 10px;background:#08070793;gap:5px}
.live-count svg{width:18px;height:18px;fill:currentColor}
.live-id{font:700 clamp(.98rem,3.7vw,1.33rem)/1.32 system-ui,sans-serif;margin:2px 0;color:#fff;overflow-wrap:anywhere;text-shadow:0 1px 5px #000}
.live-id span{color:#f4c477}
#room .round-control,.send-comment{display:inline-grid;place-items:center;padding:0;background:#12101461;color:#fff;border:1.4px solid #fff;border-radius:50%;width:46px;height:46px;min-height:44px;flex:none}
#room .round-control:focus-visible,#room .send-comment:focus-visible,#people:focus-visible,#messages:focus-visible{outline:2px solid #f4c477;outline-offset:2px}
#room .round-control svg,#room .send-comment svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.75;fill:none;stroke-linecap:round;stroke-linejoin:round}
#room .round-control.more{border-color:transparent;background:#100a104f;width:44px;height:44px}
#room .more svg{fill:currentColor;stroke:none}
#room .device[aria-pressed=true]{background:#ffe0a9;color:#441b22;border-color:#ffe0a9}
#room #people{position:absolute;z-index:2;right:max(var(--pad),env(safe-area-inset-right));top:max(calc(env(safe-area-inset-top) + 50px),8dvh);width:var(--thumb-w);max-height:calc(var(--thumb-h)*3 + var(--gap)*2);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y proximity;scrollbar-width:thin;scrollbar-color:#fff8 transparent;border-radius:9px}
.guest-feed{height:var(--thumb-h);position:relative;display:grid;place-items:center;border:1.5px solid #fffffff0;border-radius:9px;overflow:hidden;background:radial-gradient(ellipse at 50% 20%,#765051,#402830);scroll-snap-align:start}
.guest-feed+.guest-feed{margin-top:var(--gap)}
.guest-feed video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.guest-feed .feed-initial{width:42%;aspect-ratio:1;font-size:clamp(.92rem,3.4vw,1.25rem)}
.guest-feed .feed-name{position:absolute;bottom:3px;left:3px;right:3px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:clamp(.72rem,2.7vw,.9rem);font-weight:650;text-shadow:0 1px 3px #000;background:linear-gradient(90deg,#120d11bd,#120d1140 80%,transparent);padding:2px 4px;border-radius:4px}
#room .guest-expand{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:8px;background:transparent;padding:0}
#room .guest-expand:focus-visible{outline-offset:-3px}
.live-bottom{position:absolute;z-index:3;bottom:max(12px,env(safe-area-inset-bottom));left:max(var(--pad),env(safe-area-inset-left));right:max(var(--pad),env(safe-area-inset-right));pointer-events:none}
.live-bottom>*{pointer-events:auto}
.live-feedback{width:fit-content;max-width:calc(100% - var(--thumb-w) - 14px)}
.live-feedback p,.live-feedback button{background:#221219ce;color:#fff5e6;font-size:.86rem;padding:6px 9px;border-radius:7px;margin:0 0 5px;overflow-wrap:anywhere}
#room #messages{max-height:min(23dvh,158px);overflow:auto;overscroll-behavior:contain;scrollbar-width:none;max-width:min(660px,100%);text-shadow:0 1px 4px #000b;padding-bottom:4px}
.live-message{display:flex;align-items:flex-start;gap:8px;margin:6px 0;color:#fff}
.message-initial{width:26px;height:26px;flex:none;font-size:.65rem;line-height:1;text-shadow:none;border-color:#ffffffb5}
.live-message p{min-width:0;margin:2px 0 0;overflow-wrap:anywhere;white-space:pre-wrap;font-size:clamp(.92rem,3.5vw,1.1rem);line-height:1.32}
.live-message strong{margin-right:5px;font-weight:750}
.live-bar{display:flex;align-items:center;gap:8px;margin-top:9px}
#room #sendChat{position:relative;flex:1;min-width:0;margin:0}
#room #chatText{background:#17101670;border:1.4px solid #fff;color:white;border-radius:100px;padding:9px 46px 9px 15px;height:46px;width:100%;font:500 16px/1.35 system-ui,sans-serif;margin:0}
#room #chatText::placeholder{color:#fff;opacity:.94}
#room #chatText:focus{outline:2px solid #f2c479;outline-offset:1px}
#room .send-comment{position:absolute;right:2px;border:0;background:transparent;width:42px;height:42px;min-height:42px}
.room-actions{display:grid;gap:9px;margin-top:18px}.room-actions>*{width:100%;justify-content:center}.public-room dialog{color-scheme:dark}
#zoom video{object-fit:contain}#removeGuest{margin-top:12px}
@media(min-width:700px){#room{--thumb-w:clamp(112px,12vw,164px)}.live-bottom{max-width:760px}.live-badge,.live-count{font-size:1.03rem}.live-message p{font-size:1.03rem}}
@media(max-height:520px){#room{--thumb-h:min(17dvh,76px)}#room #people{top:max(47px,env(safe-area-inset-top))}#room #messages{max-height:21dvh;max-width:calc(100% - var(--thumb-w) - 12px)}.live-id{font-size:.87rem}.live-stats{margin-bottom:2px}}

.supervision-flag{display:table;background:#ffe4a2;color:#401b21;border:1px solid #66352c;border-radius:7px;padding:4px 9px;margin:3px 0;font:700 .85rem/1.35 system-ui,sans-serif;max-width:100%;overflow-wrap:anywhere}
.supervision-flag[hidden]{display:none}

.observing .live-bar,.observing #roomOptions,.observing .ronda-header,.observing .foot{display:none}
#observerActions{display:flex;flex-wrap:wrap;gap:.4rem;justify-content:flex-end;pointer-events:auto;max-width:50%}
#observerActions[hidden]{display:none}
#observerActions a,#observerActions button{display:inline-flex;align-items:center;min-height:44px;padding:.4rem .65rem;border-radius:9px;border:1px solid #e8d3b8;background:#301b20ed;color:#fff6e8;text-decoration:none;font:650 .88rem/1.25 system-ui,sans-serif}
.observing .live-feedback{max-width:100%}

.observer-ended .live-identity{visibility:hidden}

#room.waiting #stage,#room.waiting #people,#room.waiting #messages{visibility:hidden}
#waitNotice{z-index:3;margin:0;padding:12px 16px;font-weight:600;pointer-events:none}
#room.waiting .live-badge{background:#4e3a2c;border-color:#caa67e}
#room.waiting .live-badge i{background:#efc481;animation:none}
#room.waiting .device:disabled,#room.waiting #sendChat{opacity:.55}

.live-identity{flex:1;min-width:0;max-width:none}
.live-identity>.live-id{max-width:calc(100vw - var(--thumb-w) - 3 * var(--pad))}
.live-stats{flex-wrap:wrap}
#balanceClock{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;background:#150e10cf;border-radius:99px;color:#ffdfaa;font:700 clamp(.74rem,3vw,.96rem)/1.3 system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
#balanceClock svg{width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.7}
#balanceClock[hidden]{display:none}
.feed-name{display:inline-flex;align-items:center;gap:3px;max-width:100%;min-width:0}
.feed-name .person-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.voice-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#120e12cf;color:#ff777c;height:18px;width:18px}
.voice-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.voice-icon .cone{fill:currentColor;stroke-width:1}
.voice-icon .wave{display:none}
.voice-icon:is([data-state=on],[data-state=speaking]){color:#82f4ab}
.voice-icon:is([data-state=on],[data-state=speaking]) .wave{display:block}
.voice-icon[data-state=speaking] .wave{animation:voice-wave .48s ease-in-out infinite alternate}
.voice-icon[data-state=speaking] .far{animation-delay:-.24s}
@keyframes voice-wave{from{opacity:.25;transform:translateX(-1px)}to{opacity:1;transform:translateX(1px)}}
@media(prefers-reduced-motion:reduce){.voice-icon[data-state=speaking] .wave{animation:none}.voice-icon[data-state=speaking]{outline:1px solid currentColor}}
#hostVoiceSlot{display:inline-flex;flex:1 0 26px;align-items:center;justify-content:center}
#hostVoiceSlot:empty{display:none}
#hostVoiceSlot .voice-icon{height:27px;width:27px}
#hostVoiceSlot .voice-icon svg{height:21px;width:21px}
.guest-feed .feed-name{display:flex;align-items:center;justify-content:space-between;gap:7px;background:#150f13b8}
.guest-feed .feed-name .person-name{flex:0 1 auto}
@media(max-width:380px){
 .live-head,.live-stats{gap:5px}
 .live-badge,.live-count{gap:4px;padding:5px 7px}
 #balanceClock{padding:4px 6px;gap:3px}
}
