:root{color-scheme:dark;--bg:#14151b;--surface:#1c1e26;--raised:#252832;--border:#30333e;--text:#f4f2ef;--muted:#9b9eac;--accent:#ff8065;--accent-hover:#ff9b86;--ink:#211714;--green:#97cdb2;--danger:#ff9d9d;font-family:Inter,"Segoe UI",Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);line-height:1.5}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.38;cursor:not-allowed}button, input,select{transition:background .16s,border-color .16s,color .16s}a{color:inherit}button{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:4px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.sprite{position:absolute;width:0;height:0;overflow:hidden}input:not([type=range]):not([type=checkbox]),select{width:100%;height:50px;padding:0 15px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);min-width:0;font-size:16px}input::placeholder{color:#8b8e9d}input:not([type=range]):focus,select:focus{border-color:var(--accent)}label{display:block;font-size:13px;font-weight:600;margin-bottom:9px}button{border:0}button svg{pointer-events:none}.site-header{height:88px;margin:0 auto;padding:0 4.5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #292b35;max-width:1800px}.brand{display:flex;gap:11px;align-items:center;text-decoration:none;font-size:20px;letter-spacing:-.7px;font-weight:400}.brand strong{font-weight:700}.header-actions{display:flex;align-items:center;gap:10px}.icon-button{background:transparent;min-width:42px;height:42px;padding:10px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;color:var(--muted)}.icon-button:hover{background:var(--raised);color:var(--text)}.button{min-height:48px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:12px 20px;font-weight:650;font-size:14px;white-space:nowrap}.primary{background:var(--accent);color:var(--ink)}.primary:hover{background:var(--accent-hover)}.secondary{background:var(--raised);color:var(--text);border:1px solid var(--border)}.secondary:hover{background:#323642}.text-button{background:transparent;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 0;font-size:13px;color:var(--muted)}.text-button:hover{color:var(--text)}.text-button svg{width:17px;height:17px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:var(--muted)}.live-dot{display:inline-block;width:6px;height:6px;background:var(--accent);border-radius:50%;margin-right:7px;vertical-align:2px}.home{max-width:1240px;margin:0 auto;padding:80px 56px 30px;display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:calc(100svh - 88px)}.welcome{position:relative;z-index:1}.welcome h1{font-size:clamp(44px,4.5vw,66px);line-height:1.08;letter-spacing:-3px;font-weight:650;margin:24px 0}.welcome h1 span{color:var(--accent)}.welcome>p:not(.privacy-note){color:var(--muted);font-size:16px;line-height:1.75}.entry-form{margin-top:34px;max-width:330px}.entry-form input{height:54px}.entry-form .button{width:100%;justify-content:space-between;margin-top:12px;height:52px}.welcome>.text-button{margin-top:13px}.privacy-note{font-size:12px;color:#818593;margin-top:16px}.home-footer{grid-column:1/-1;align-self:end;display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--border);margin-top:60px;padding-top:20px;color:var(--muted);font-size:12px}.welcome-art{height:390px;position:relative;isolation:isolate}.art-grid{position:absolute;inset:-40px;background-image:radial-gradient(#575665 1px,transparent 1px);background-size:22px 22px;mask-image:radial-gradient(ellipse,#0005,transparent 70%)}.art-screen{position:absolute;width:310px;height:193px;border:1px solid #5c5154;border-radius:17px;padding:15px 18px;background:linear-gradient(130deg,#3a2c2e,#22222b 70%);box-shadow:0 20px 60px #0003}.screen-back{top:17px;left:27px;transform:rotate(-7deg);opacity:.6}.screen-front{top:134px;right:-12px;transform:rotate(6deg);background:linear-gradient(130deg,#51362f,#2c2427 60%,#23232d)}.art-screen>span{display:inline-block;width:5px;height:5px;border-radius:50%;background:#c2a69b;margin-right:4px;vertical-align:top}.art-play{width:0;height:0;border-top:21px solid transparent;border-bottom:21px solid transparent;border-left:31px solid var(--accent);position:absolute;top:65px;left:141px;filter:drop-shadow(0 0 20px #ff806526)}.art-progress{position:absolute;bottom:22px;height:3px;left:20px;right:20px;background:#6b514a;border-radius:3px}.art-progress:before{content:"";display:block;width:42%;height:100%;background:var(--accent)}.art-connection{position:absolute;top:121px;left:162px;width:52px;height:52px;border:1px solid #805746;border-radius:50%;background:#32251f;display:grid;place-items:center;color:var(--accent);box-shadow:0 0 0 8px var(--bg);z-index:2}.art-connection svg{width:23px;height:23px}.art-label{position:absolute;bottom:0;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:9px;letter-spacing:2px;color:#777987}.connection{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted);margin-right:13px}.connection i{display:block;width:6px;height:6px;border-radius:50%;background:var(--accent)}.connection.connected i{background:var(--green)}.room{max-width:1520px;margin:auto;padding:32px 4.5% 60px}.room-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:27px}.room-heading h1{font-size:26px;letter-spacing:-.8px;line-height:1.3;margin-top:7px;overflow-wrap:anywhere}.room-heading-actions{display:flex;align-items:center;gap:10px}.room-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:36px}.watch-area{min-width:0}.player-frame{aspect-ratio:16/9;min-height:210px;position:relative;background:#090a0e;border-radius:13px;overflow:hidden;border:1px solid #292c36}#player,#player iframe,.player-frame>iframe{width:100%;height:100%;position:absolute;inset:0;border:0}.player-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 85%,#23202b,#0e1016 75%);text-align:center;padding:20px}.empty-play{width:64px;height:64px;border-radius:20px;background:#25242d;display:grid;place-items:center;color:var(--accent);border:1px solid #40333a;margin-bottom:18px}.empty-play svg{width:26px;height:26px;margin-left:3px;fill:var(--accent);stroke-width:0}.player-empty h2{font-size:19px;font-weight:550;letter-spacing:-.4px}.player-empty p{font-size:13px;color:var(--muted);margin-top:7px}.player-empty .button{font-size:12px;min-height:38px;margin-top:19px;padding:8px 15px}.activation{display:flex;justify-content:space-between;align-items:center;gap:15px;background:#30251f;border:1px solid #624137;border-radius:10px;padding:13px 15px;margin-top:12px}.activation strong,.activation span{display:block}.activation strong{font-size:13px}.activation>div>span{color:#c1a79d;font-size:11px;margin-top:3px}.activation .button{font-size:12px;padding:9px 13px;min-height:42px}.timeline{padding-top:20px}input[type=range]{width:100%;accent-color:var(--accent);cursor:pointer;height:16px;margin:0}input[type=range]:disabled{cursor:default;opacity:.3}.time-labels{display:flex;justify-content:space-between;font-variant-numeric:tabular-nums;color:var(--muted);font-size:11px;margin-top:2px}.playback-toolbar{display:flex;justify-content:space-between;align-items:center;margin:7px 0 22px}.transport{display:flex;align-items:center;gap:8px}.seconds{font-size:12px;font-weight:650;letter-spacing:-.5px}.play-button{border-radius:50%;background:var(--text);color:var(--bg);width:46px;height:46px;display:grid;place-items:center}.play-button:hover{background:var(--accent)}.play-button svg{width:22px;height:22px}.video-info{padding-bottom:25px;border-bottom:1px solid var(--border)}.video-info h2{font-size:18px;font-weight:600;letter-spacing:-.3px;line-height:1.5;overflow-wrap:anywhere}.video-meta{color:var(--muted);font-size:12px;display:flex;align-items:center;gap:10px;margin-top:7px;flex-wrap:wrap}.meta-dot{color:#616574}.people-heading{display:flex;justify-content:space-between;align-items:center;margin:23px 0 16px;gap:10px}.people-heading h2,.queue-heading h2{font-size:14px;font-weight:600}.people-heading h2 span,.queue-heading h2 span{font-size:11px;margin-left:7px;background:var(--raised);color:var(--muted);padding:2px 6px;border-radius:5px}.people-heading>span{font-size:11px;color:var(--muted)}.members{display:flex;flex-wrap:wrap;gap:16px 25px}.member{display:flex;align-items:center;gap:10px;min-width:0}.avatar{display:grid;place-items:center;width:37px;height:37px;border-radius:50%;background:#38303b;color:#e0b7cf;border:1px solid #514052;font-size:13px;font-weight:650;flex-shrink:0}.member:nth-child(2n) .avatar{background:#253a36;color:#9dcebe;border-color:#36514a}.member-name{font-size:12px;font-weight:600;display:flex;align-items:center;gap:6px;overflow-wrap:anywhere}.member-name svg{width:13px;height:13px;color:var(--accent)}.member-role{font-size:10px;color:var(--muted);margin-top:1px}.member-role.ready{color:var(--green)}.muted{color:var(--muted)}.small{font-size:12px}#waiting-hint{margin-top:16px}.queue-area{border-left:1px solid var(--border);padding-left:28px;min-width:0}.video-form label{font-size:13px;margin-bottom:11px}.input-action{display:flex;gap:7px;align-items:center}.input-action input{flex:1;width:0}.video-form .input-action{gap:0;background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden}.video-form input{border:0!important;background:transparent!important;border-radius:0!important;padding-left:12px!important;font-size:13px!important;height:48px!important;outline-offset:-3px!important}.add-button{display:grid;place-items:center;background:var(--accent);color:var(--ink);width:35px;height:35px;border-radius:8px;flex-shrink:0;margin-right:6px}.add-button:hover{background:var(--accent-hover)}.queue-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);margin-top:25px;padding-bottom:10px}.queue-heading .icon-button{width:32px;height:32px;min-width:32px}.video-list{display:flex;flex-direction:column}.video-row{display:flex;align-items:center;gap:11px;padding:15px 0;border-bottom:1px solid #2b2d37;min-width:0}.video-thumb{width:82px;height:49px;border-radius:6px;object-fit:cover;flex-shrink:0;background:var(--surface)}.video-row-main{flex:1;min-width:0;background:transparent;text-align:left;padding:0;display:flex;gap:11px;align-items:center}.video-row-main:disabled{opacity:1;cursor:default}.video-row-main:hover:not(:disabled) .row-title{color:var(--accent)}.video-row-copy{min-width:0;flex:1}.row-title{font-size:12px;font-weight:550;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45;overflow-wrap:anywhere}.row-subtitle{font-size:10px;color:var(--muted);margin-top:4px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.video-row .icon-button{min-width:28px;width:28px;height:36px;padding:5px}.video-row .icon-button svg{width:16px;height:16px}.queue-empty{text-align:center;padding:58px 0 65px}.queue-empty p{font-size:13px;margin-top:20px}.queue-empty span{display:block;color:var(--muted);font-size:11px;line-height:1.8;margin-top:7px}.queue-empty-lines{display:grid;gap:7px;width:46px;margin:0 auto}.queue-empty-lines i{display:block;height:5px;border-radius:3px;background:#363945}.queue-empty-lines i:last-child{width:60%}.queue-footnote{border-top:1px solid var(--border);padding-top:18px;display:flex;gap:9px;align-items:flex-start;color:#858998;font-size:10px}.queue-footnote svg{width:15px;height:15px}.drawer,.small-dialog{border:1px solid var(--border);background:var(--bg);color:var(--text);padding:28px;box-shadow:0 20px 90px #0007;max-height:100dvh;overflow-y:auto}.drawer{margin:0 0 0 auto;min-height:100dvh;width:min(460px,100%);max-width:100%;border-top:0;border-bottom:0;border-right:0;border-radius:16px 0 0 16px}.small-dialog{width:min(460px,calc(100% - 30px));border-radius:16px;max-height:calc(100dvh - 30px)}dialog::backdrop{background:#080910a8;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:27px}.dialog-heading h2{font-size:25px;letter-spacing:-.7px;margin-top:4px}.dialog-heading .eyebrow{font-size:9px;letter-spacing:1.5px}.dialog-heading .icon-button{margin-right:-8px}.small-dialog>.dialog-heading{margin-bottom:17px}.small-dialog>p{font-size:13px;color:var(--muted);margin:16px 0}.dialog-actions{display:flex;gap:10px;margin:16px 0}.dialog-actions .button{flex:1}.tabs{display:flex;border-bottom:1px solid var(--border);gap:22px;margin-bottom:16px}.tabs button{padding:10px 0;font-size:13px;color:var(--muted);background:transparent;border-bottom:2px solid transparent;margin-bottom:-1px}.tabs button[aria-selected=true]{color:var(--accent);border-color:var(--accent)}.history-list{margin-top:13px}.history-list .video-thumb{width:94px;height:58px}.history-list .row-title{font-size:13px}.history-list .row-subtitle{font-size:11px}.history-list .icon-button{width:32px;min-width:32px}.empty-message{text-align:center;padding:60px 10px;color:var(--muted);font-size:13px}.danger{color:var(--danger);margin-top:20px}.settings-section{border-bottom:1px solid var(--border);padding:0 0 25px;margin-bottom:25px}.settings-section h3{font-size:14px;font-weight:600;margin-bottom:18px}.settings-section h3 span{font-size:10px;color:var(--muted);font-weight:400;float:right;margin-top:3px}.small-button{background:var(--raised);border:1px solid var(--border);border-radius:9px;padding:0 12px;height:50px;font-size:12px;font-weight:600;white-space:nowrap}.small-button:hover{background:#343844}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:22px;margin:23px 0 0;cursor:pointer}.setting-row strong{font-size:12px;font-weight:550;display:block}.setting-row small{font-weight:400;font-size:11px;color:var(--muted);display:block;margin-top:4px;line-height:1.5}.setting-row input{appearance:none;width:36px;height:21px;flex-shrink:0;border-radius:20px;background:#3d414e;cursor:pointer;margin:0;position:relative;border:1px solid #525664}.setting-row input:before{content:"";width:13px;height:13px;position:absolute;left:3px;top:3px;border-radius:50%;background:#bbbfc9;transition:transform .16s}.setting-row input:checked{background:var(--accent);border-color:var(--accent)}.setting-row input:checked:before{background:var(--ink);transform:translateX(15px)}.setting-row input:disabled{opacity:.35;cursor:not-allowed}.volume-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:13px}.volume-label span{display:flex;align-items:center;gap:8px}.volume-label svg{width:15px;height:15px}.volume-label output{color:var(--muted)}#transfer-section{margin-top:22px}.ad-info p{color:var(--muted);font-size:12px;line-height:1.75;margin-top:10px}.ad-info strong{color:#c1c4ce;font-weight:500}.settings-footer{font-size:10px;color:#828695;line-height:1.8}.toast{position:fixed;bottom:max(25px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#e9e6e1;color:#24242a;padding:13px 20px;border-radius:11px;font-size:13px;box-shadow:0 6px 30px #0005;z-index:20;max-width:min(500px,calc(100% - 32px));width:max-content}.form-error{color:var(--danger);font-size:12px;margin-top:10px;line-height:1.6}.notice{padding:13px 15px;border-radius:9px;margin-top:12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:12px;background:#38252b;color:#edbac7}.notice span{flex:1;min-width:160px}.notice a{font-size:11px}.notice .text-button{color:inherit}#join-form>.button{margin-top:18px;width:100%}
@media(min-width:1600px){.room{padding-top:40px}.room-layout{gap:45px;grid-template-columns:minmax(0,1fr) 350px}.queue-area{padding-left:35px}}
@media(max-width:1000px){.room-layout{grid-template-columns:minmax(0,1fr) 280px;gap:24px}.queue-area{padding-left:20px}.home{padding:65px 40px 25px}.welcome-art{transform:scale(.83);transform-origin:center right}.screen-front{right:-10px}.video-thumb{width:64px;height:42px}}
@media(max-width:760px){.site-header{height:70px;padding:0 22px}.brand{font-size:18px}.brand img{width:28px;height:28px}.header-actions{gap:4px}.home{padding:52px 26px 24px;grid-template-columns:1fr;min-height:calc(100svh - 70px);max-width:520px}.welcome h1{font-size:56px;letter-spacing:-2.5px;margin:20px 0}.welcome-art{display:none}.welcome>p:not(.privacy-note){font-size:15px}.entry-form{max-width:none;margin-top:30px}.home-footer{margin-top:44px;align-items:flex-start;gap:10px;flex-direction:column;padding-top:15px;font-size:11px}.home-footer .text-button{font-size:12px}.room{padding:24px 20px 35px}.room-heading{margin-bottom:22px;gap:10px}.room-heading h1{font-size:22px;letter-spacing:-.5px}.room-heading .eyebrow{font-size:8px;letter-spacing:1.2px}.room-heading-actions{gap:4px}.room-heading-actions .button{padding:10px 13px;min-height:42px;font-size:12px;gap:7px}.room-heading-actions .icon-button{width:32px;min-width:32px;padding:7px}.room-heading-actions svg{width:17px;height:17px}.room-layout{display:flex;flex-direction:column;gap:28px}.queue-area{border-left:0;padding-left:0;border-top:1px solid var(--border);padding-top:24px}.player-frame{border-radius:11px;min-height:210px}.player-empty h2{font-size:16px}.player-empty p{font-size:11px}.empty-play{width:45px;height:45px;border-radius:13px;margin-bottom:12px}.empty-play svg{width:20px;height:20px}.player-empty .button{margin-top:13px;font-size:11px;min-height:34px}.activation{padding:12px;gap:10px}.activation strong{font-size:12px}.activation>div>span{font-size:10px}.activation .button{padding:9px 11px;font-size:11px}.activation .button svg{width:15px;height:15px}.connection{margin-right:6px;font-size:10px}.connection span{display:none}.timeline{padding-top:17px}.playback-toolbar{margin-bottom:17px}.transport{gap:3px}.transport .icon-button{min-width:36px;width:36px;padding:7px}.play-button{width:42px;height:42px}.resync{font-size:11px;gap:5px}.resync svg{width:14px;height:14px}.video-info h2{font-size:16px}.video-info{padding-bottom:19px}.video-meta{font-size:11px;gap:7px}.people-heading{margin:20px 0 13px}.people-heading>span{font-size:10px}.queue-heading{margin-top:20px}.queue-empty{padding:30px 0 37px}.queue-empty-lines{width:36px;gap:5px}.queue-empty-lines i{height:4px}.queue-empty p{margin-top:15px}.queue-footnote{font-size:10px}.video-thumb{width:92px;height:56px}.row-title{font-size:13px}.row-subtitle{font-size:11px}.queue-area .video-form input{font-size:16px!important}.drawer{padding:25px 24px max(30px,env(safe-area-inset-bottom));border-radius:0}.small-dialog{padding:24px}.members{gap:15px}.member-role{font-size:10px}.member-name{font-size:12px}.settings-section h3{font-size:14px}.setting-row strong{font-size:13px}.setting-row small{font-size:12px}.ad-info p{font-size:12px}}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.search-drawer{width:min(520px,100%)}.search-drawer .dialog-heading h2{font-size:23px}.search-status{font-size:12px;color:var(--muted);margin:18px 0 4px;min-height:22px}.search-status.error{color:var(--danger)}.search-status.loading:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;margin-right:9px;vertical-align:-2px;animation:search-spin .8s linear infinite}.search-results{display:flex;flex-direction:column}.search-result{display:grid;grid-template-columns:110px minmax(0,1fr);gap:13px;padding:18px 0;border-bottom:1px solid var(--border)}.search-thumbnail{position:relative;align-self:start}.search-thumbnail img{display:block;width:110px;height:66px;border-radius:7px;object-fit:cover;background:var(--surface)}.search-duration{position:absolute;right:4px;bottom:4px;background:#000c;border-radius:3px;padding:0 4px;font-size:10px;font-variant-numeric:tabular-nums;line-height:1.6}.search-result h3{font-size:13px;line-height:1.45;font-weight:550;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.search-author{font-size:11px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.search-add{display:inline-flex;gap:5px;align-items:center;padding:7px 9px;background:var(--raised);border:1px solid var(--border);border-radius:6px;font-size:11px;margin-top:9px;min-height:34px}.search-add svg{width:14px;height:14px}.search-add:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}.search-add.added{opacity:1;color:var(--green);background:transparent;border-color:transparent}.search-back{width:100%;margin-top:22px;position:sticky;bottom:0;box-shadow:0 10px 0 10px var(--bg)}.search-drawer .video-form input{font-size:16px!important}@keyframes search-spin{to{transform:rotate(360deg)}}
@media(max-width:420px){.search-result{grid-template-columns:96px minmax(0,1fr);gap:11px}.search-thumbnail img{width:96px;height:60px}.search-drawer .dialog-heading h2{font-size:22px}.search-drawer{padding-left:20px;padding-right:20px}}
.player-frame{width:100%;min-width:0;max-width:100%}
@media(max-width:760px){.player-frame{min-height:200px}.room-heading>div:first-child{min-width:0}.room-heading-actions{flex-shrink:0}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.room-tabs{margin-top:-9px;margin-bottom:23px;gap:26px}.room-tabs button{min-height:44px;display:flex;align-items:center;gap:8px;font-weight:600}.chat-shortcut{position:relative}.unread-badge{background:var(--accent);color:var(--ink);font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:10px;padding:1px 5px;line-height:16px;text-align:center}.chat-shortcut .unread-badge{position:absolute;right:-3px;top:0}.chat-note{font-size:10px;color:var(--muted);margin-bottom:12px}.chat-messages{height:400px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:8px;overflow-anchor:none}.chat-empty{font-size:13px;line-height:1.8;color:var(--muted);text-align:center;padding:70px 20px}.chat-message{padding:13px 0;border-bottom:1px solid var(--border)}.chat-message-meta{display:flex;gap:12px;justify-content:space-between;align-items:baseline}.chat-message-meta strong{font-size:12px;font-weight:600;overflow-wrap:anywhere;min-width:0}.chat-message.own .chat-message-meta strong{color:var(--accent)}.chat-message time{font-size:10px;color:var(--muted);flex-shrink:0}.chat-message p{font-size:13px;line-height:1.6;margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere;unicode-bidi:plaintext}.chat-form{padding-top:16px;border-top:1px solid var(--border);margin-top:12px}.chat-compose{display:flex;gap:8px;align-items:flex-end}.chat-compose textarea{display:block;flex:1;min-width:0;resize:vertical;max-height:150px;min-height:64px;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:12px;color:var(--text);font:inherit;font-size:14px;line-height:1.45}.chat-compose textarea:focus{outline:2px solid var(--accent);outline-offset:2px}.chat-compose .add-button{position:static;flex-shrink:0;width:44px;height:44px;border-radius:10px}.chat-compose-meta{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;margin-top:8px}.chat-latest{margin:12px auto 0;color:var(--accent)}#room-sidebar{scroll-margin-top:20px}@media(max-width:760px){.chat-messages{height:330px}.chat-compose textarea{font-size:16px}.chat-message p{font-size:14px}.chat-note{font-size:11px}}
/* Immersive room: player above, conversation below. */
body.in-room{background:#08080c;overflow:hidden;--accent:#ee77ac;--accent-hover:#f797bf;--ink:#21101b;--bg:#121017;--surface:#211c29;--raised:#2b2433;--border:#38303e}
body.in-room>.site-header{display:none}
.room.room-stage{padding:0;margin:0 auto;max-width:1024px;width:100%;height:var(--app-height,100dvh);display:flex;flex-direction:column;overflow:hidden;background:#141019}
.watch-stage{flex:0 0 auto;height:clamp(200px,min(56.25vw,576px),calc(var(--app-height,100dvh)*.54));min-height:200px;background:#000;position:relative}
.room-stage .player-frame{height:100%;width:100%;min-height:200px;aspect-ratio:auto;border:0;border-radius:0;background:#000}
.room-stage .player-empty{background:radial-gradient(ellipse at 50% 100%,#251725,#09090c 80%);padding:0}
.room-stage .player-empty .button{border:1px solid #ffffff26;background:#ffffff0c;color:#eee9f0;min-height:46px;margin:0;border-radius:24px;padding:10px 20px;font-size:13px}
.room-stage .activation{position:absolute;inset:0;border:0;border-radius:0;margin:0;padding:0;display:grid;place-content:center;background:#0005;pointer-events:none}
.room-stage .activation>div{display:none}
.room-stage .activation .button{pointer-events:auto;border-radius:26px;padding:12px 22px;background:#f5edf4;color:#211921;box-shadow:0 4px 25px #0006;min-height:48px;font-size:14px}
.room-stage .error-notice{position:absolute;inset:auto 12px 12px;z-index:3;background:#22131ff2;font-size:12px;max-height:calc(100% - 24px);overflow:auto;margin:0}
.room-stage .conversation{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;background:radial-gradient(ellipse at 95% 0%,#4b294039,transparent 65%),linear-gradient(165deg,#1f1621,#151319 75%);padding:0 max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
.conversation-toolbar{height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #ffffff08}
.conversation-actions{display:flex;align-items:center;gap:2px}
.conversation-toolbar .icon-button{min-width:40px;width:40px;height:40px;padding:10px;color:#b8acba}
.conversation-toolbar .icon-button:hover{background:#ffffff0a;color:#fff}
.people-pill{display:flex;align-items:center;gap:8px;min-height:42px;padding:0 6px 0 0;background:transparent;color:#bfb0c2;font-size:11px;border-radius:20px}
.room-avatars{display:flex;padding-right:3px}
.chat-avatar{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:hsl(var(--avatar-hue,300) 21% 27%);color:hsl(var(--avatar-hue,300) 45% 83%);border:1px solid hsl(var(--avatar-hue,300) 20% 42%);font-size:11px;font-weight:650;flex-shrink:0}
.room-avatars .chat-avatar{width:25px;height:25px;font-size:10px;margin-right:-4px;box-shadow:0 0 0 2px #211722}
.room-stage .chat-messages{height:auto;min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:10px 2px 8px;display:flex;flex-direction:column;gap:14px;scrollbar-color:#544256 transparent;overflow-anchor:none}
.room-stage .chat-messages:before{content:"";flex:1}
.room-stage .chat-empty{padding:0;margin:auto;text-align:center;color:#89788e;font-size:13px}
.room-stage .chat-message{display:flex;gap:9px;align-items:flex-start;padding:0;border:0;flex-shrink:0;max-width:85%;align-self:flex-start;min-width:0}
.room-stage .chat-message-copy{min-width:0;flex:1}
.room-stage .chat-message-meta{display:flex;align-items:baseline;justify-content:flex-start;gap:7px;line-height:1.3}
.room-stage .chat-message-meta strong{font-size:11px;font-weight:600;color:#bbaaC3}
.room-stage .chat-message time{font-size:9px;color:#776a7e;white-space:nowrap}
.room-stage .chat-message p{font-size:14px;color:#efe8ef;line-height:1.5;margin-top:3px;overflow-wrap:anywhere;white-space:pre-wrap}
.room-stage .chat-message.own{align-self:flex-end;flex-direction:row-reverse;text-align:right}
.room-stage .chat-message.own .chat-message-meta{justify-content:flex-end}
.room-stage .chat-message.own .chat-message-meta strong{color:#dda1bf}
.room-stage .chat-form{flex:0 0 auto;margin:0;padding:10px 0 0;border:0}
.room-stage .chat-compose{display:flex;gap:8px;align-items:center;padding:5px 6px;background:#ffffff08;border:1px solid #ffffff0a;border-radius:26px}
.room-stage .chat-compose .icon-button{color:#b6a5bb;min-width:36px;width:36px;height:36px;padding:8px;border-radius:50%}
.room-stage .chat-compose textarea{flex:1;resize:none;border:0;border-radius:0;background:transparent;padding:7px 0;min-height:36px;max-height:96px;height:36px;font-size:16px;line-height:22px;color:#f4eaf2;outline-offset:0}
.room-stage .chat-compose textarea:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-radius:6px}
.room-stage .chat-compose:focus-within{border-color:#a16b8d}
.room-stage .chat-compose textarea::placeholder{color:#94829b}
.room-stage .chat-compose .add-button{width:36px;height:36px;border-radius:50%;margin:0;background:#f4edf4;color:#251928}
.room-stage .chat-compose .add-button:disabled{background:transparent;color:#94829b;opacity:.5}
.room-stage .chat-compose-meta{font-size:10px;line-height:14px;margin-top:4px;padding:0 14px;color:#baa6be}
.room-stage .chat-latest{position:absolute;bottom:74px;left:50%;transform:translateX(-50%);padding:7px 12px;margin:0;background:#382c40;color:#f3daed;border:1px solid #5b4360;border-radius:20px;font-size:11px;box-shadow:0 4px 15px #0003;white-space:nowrap;z-index:2}
.room-stage .form-error{font-size:11px;margin:5px 12px 0;line-height:1.35}
.room-sheet .dialog-heading{margin-bottom:20px}.room-sheet .dialog-heading h2{font-size:21px;overflow-wrap:anywhere}.room-sheet .video-info{border:0;padding:0;margin:8px 0 20px}.room-sheet .video-info h2{font-size:15px}.room-sheet .playback-toolbar{margin-bottom:10px}.room-sheet .people-heading{margin-top:0}.room-sheet .members{flex-direction:column;gap:20px}.room-sheet .queue-empty{padding:40px 0}.room-menu{display:flex;flex-direction:column;border-top:1px solid var(--border);padding-top:10px;margin-top:10px}.room-menu button{display:flex;align-items:center;gap:14px;background:transparent;text-align:left;border-radius:10px;padding:14px 8px;font-size:14px;min-height:48px}.room-menu button:hover{background:var(--raised)}.room-menu button svg{color:var(--muted);width:20px;height:20px}.room-menu .leave-room{color:var(--danger)}
body.in-room .drawer{background:#19151e}
body.in-room .toast{bottom:85px;font-size:12px;background:#eee3ed}
@media(min-width:761px){.room-stage .conversation{padding-left:28px;padding-right:28px}.room-stage .chat-messages{padding-left:8px;padding-right:8px}.room-stage .conversation-toolbar{height:50px;flex-basis:50px}.room-stage .chat-form{padding-bottom:8px}}
@media(max-width:760px){body.in-room .drawer{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;min-height:0;max-height:85dvh;border:1px solid #443348;border-bottom:0;border-radius:22px 22px 0 0;padding:24px 22px max(24px,env(safe-area-inset-bottom))}.room-stage .chat-message{max-width:91%}.room-stage .conversation-toolbar{height:44px;flex-basis:44px}.room-stage .chat-form{padding-top:6px}.room-stage .conversation{padding-left:12px;padding-right:12px}.watch-stage{max-height:max(200px,calc(var(--app-height,100dvh)*.54))}.room-sheet .dialog-heading{margin-bottom:17px}}

/* La conversación y el compositor ocupan el área visible sobre el teclado. */
html:has(body.in-room){height:100%;overflow:hidden;overscroll-behavior:none}
body.in-room{position:relative;height:100%;width:100%;overscroll-behavior:none}
body.in-room .room-stage{position:absolute;top:var(--stage-offset,0px);left:0;right:0;height:var(--stage-height,100dvh)}
body.in-room .room-stage *{overscroll-behavior:contain}
.room-stage .chat-form{position:relative;z-index:3}
body.chat-keyboard .room-stage .conversation{padding-bottom:8px}
/* En horizontal, deja espacio para escribir aunque el teclado cubra casi todo. */
body.chat-keyboard .watch-stage{min-height:0;max-height:max(0px,calc(var(--stage-height,100dvh) - 150px));overflow:hidden}
.tvgo-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.room-stage .activation>div{display:block;text-align:center}
.room-stage .activation>div.tvgo-actions{display:flex;margin-top:12px}
.room-stage .activation>div>span{color:#d2bfc9}
.episode-thumb{display:grid;place-items:center;background:#30263a;color:#e9b3d0;font-weight:650}
.extension-help summary{cursor:pointer}
.extension-help ol{margin:8px 0 0;padding-left:18px;line-height:1.6}
body.tvgo-docked:not(.tvgo-dock-blocked):not(.tvgo-dock-waiting) .watch-stage{display:none}
body.tvgo-docked .room-stage{display:flex;flex-direction:column}
body.tvgo-docked .room-stage .conversation{flex:1;min-height:0;padding:0 12px 8px}
body.tvgo-docked .watch-stage{min-height:0;max-height:92px;flex:0 0 92px}
body.tvgo-docked .player-frame{height:100%;min-height:0;aspect-ratio:auto}
body.tvgo-docked .activation{padding:8px;gap:6px}
body.tvgo-docked .activation strong{font-size:13px}
body.tvgo-docked .activation span{font-size:11px}
#home-catalog{margin-top:10px}
#continue-watch{margin-top:8px;text-align:left}
.catalog-open{width:100%;margin-bottom:14px}
.catalog-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.catalog-filters input,.catalog-filters select{width:100%;margin-top:5px}
.catalog-row{width:100%;border-bottom:1px solid var(--border);padding:8px 0;min-height:58px}
.catalog-row .row-title{flex:1}
.catalog-row .episode-thumb{width:46px;min-width:46px;height:38px}
.catalog-progress{font-size:10px;color:var(--accent);white-space:nowrap}
#catalog-status{margin:8px 0}
.room-stage .conversation-toolbar:has(.chapter-bar:not([hidden])){flex-wrap:wrap;height:auto;flex-basis:auto;row-gap:2px;padding-bottom:4px}
.chapter-bar{flex:0 0 100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0}
.chapter-progress{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e6d0df;font-size:12px;font-variant-numeric:tabular-nums}
.chapter-next{display:inline-flex;align-items:center;gap:6px;height:36px;min-width:max-content;padding:0 10px}
.chapter-next svg{width:15px;height:15px}
:root{--bg:#101019;--text:#fcf6ee;--muted:#b5abc6;--raised:#242036;--border:#39304b;--accent:#ffc486;--ink:#20142b}
body:not(.in-room){background:radial-gradient(ellipse at 87% 18%,#432650 0,transparent 40%),radial-gradient(ellipse at 12% 90%,#232754 0,transparent 45%),#101019}
.welcome h1 span{color:var(--accent)}
body:not(.in-room) .site-header{border-color:#57457060}
.room.room-stage{background:#151220}
.room-stage .conversation {
  background-color: #0b141a;
  background-image: radial-gradient(circle, #48616a30 1px, transparent 1.5px), radial-gradient(circle, #48616a22 1px, transparent 1.5px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  color: #e9edef;
}
.room-stage .player-empty{background:radial-gradient(ellipse at 50% 100%,#332345,#0c0b11 80%)}
.room-stage .conversation-toolbar{background:#0b141a;border-color:#233138;gap:6px}
.room-stage .conversation-toolbar .icon-button{color:#aebac1}
.room-stage .conversation-toolbar:has(.chapter-bar:not([hidden])){padding-bottom:5px}
.chapter-bar{margin-top:8px;padding:4px 6px 4px 12px;background:#202c33;border:1px solid #35464f;border-radius:13px}
.chapter-progress{color:#e9edef;font-weight:600}
.chapter-next{background:#25d366;border-color:#25d366;color:#0b2721;border-radius:9px;font-size:12px}
.chapter-next:hover:not(:disabled){background:#54de88}
.room-stage .chat-message-copy{padding:6px 10px;background:#202c33;border-radius:4px 10px 10px}
.room-stage .chat-message.own .chat-message-copy{background:#005c4b;border-radius:10px 4px 10px 10px}
.room-stage .chat-message-media .chat-message-copy,
.room-stage .chat-message-media.own .chat-message-copy{padding:0;background:none}
.room-stage .chat-message-media .chat-media-caption{width:fit-content;padding:5px 8px;background:#202c33;border-radius:8px}
.room-stage .chat-message-media.own .chat-media-caption{margin-inline-start:auto;background:#005c4b}
.room-stage .chat-message p{color:#e9edef;margin-top:3px;text-align:left}
.room-stage .chat-message-meta strong,.room-stage .chat-message.own .chat-message-meta strong{color:#9ce8cc}
.room-stage .chat-message time{color:#b5c6c4}
.room-stage .chat-messages{scrollbar-color:#46575f transparent}
.room-stage .chat-empty,.room-stage .chat-compose-meta{color:#aebac1}
.room-stage .chat-compose{background:#202c33;border-color:#34444b;border-radius:24px;gap:4px}
.room-stage .chat-compose:focus-within{border-color:#4d8171}
.room-stage .chat-compose textarea{min-width:0;color:#e9edef}
.room-stage .chat-compose textarea::placeholder,.room-stage .chat-compose .icon-button{color:#aebac1}
.room-stage .chat-compose .add-button:not(:disabled){background:#25d366;color:#0b2721}
.room-stage .chat-latest{background:#202c33;color:#e9edef;border-color:#42535b}
.chat-notice{display:flex;justify-content:center;flex-shrink:0;padding:0 10px}
.chat-notice-label{display:inline-flex;align-items:center;gap:5px;max-width:100%;border-radius:8px;padding:5px 9px;background:#1d2b32;color:#c6d4db;font-size:12px;overflow-wrap:anywhere}
.chat-notice-label strong{color:#e9edef;font-variant-numeric:tabular-nums;white-space:nowrap}
.chat-notice-label svg{width:12px;height:12px;flex:none;color:#9ce8cc}
.chat-image-link{display:inline-block;margin-top:5px}
.chat-tenor{display:block;width:min(224px,62vw);height:180px;margin-top:5px;border:0;border-radius:8px}
.chat-image{display:block;width:auto;max-width:min(230px,56vw);max-height:195px;object-fit:contain;border-radius:10px}
.sticker-image{max-width:min(130px,38vw);max-height:130px}
.chat-sticker{display:block;font-size:46px;line-height:1.2;padding:3px}
.chat-favorite-gif {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  touch-action: manipulation;
}
.chat-message.own .chat-favorite-gif { margin-inline-start: auto; }
.chat-favorite-gif > :is(.chat-image, .chat-tenor) { min-width: 0; margin: 0; }
.chat-favorite-gif .chat-tenor, .gif-favorite-preview .chat-tenor { pointer-events: none; }
.gif-favorite-star {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: #ecdfc5;
  background: #24232d;
  border-radius: 50%;
}
.gif-favorite-star[aria-pressed="true"], .room-stage #open-gif-favorites { color: #ffd481; }
.gif-favorite-star[aria-pressed="true"] svg { fill: currentColor; }
#gif-favorites-empty { margin-top: 4px; color: var(--muted); }
.gif-favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  max-height: 55dvh;
  overflow: auto;
  padding: 4px;
}
.gif-favorites-list:empty { display: none; }
.gif-favorite-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  border-radius: 12px;
  background: var(--raised);
  overflow: hidden;
}
.gif-favorite-preview, .gif-favorite-send { position: absolute; inset: 0; }
.gif-favorite-preview :is(img, .chat-tenor) {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}
.gif-favorite-send { width: 100%; background: transparent; }
.gif-favorite-send:focus-visible { outline-offset: -4px; }
.gif-favorite-tile .gif-favorite-star { position: absolute; inset: auto 5px 5px auto; }
.attachment-draft{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:1px 7px 1px 11px;border:1px solid #35464f;border-radius:10px;background:#202c33;margin-bottom:6px;font-size:12px}
.attachment-draft span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attachment-draft button{width:32px;height:32px;min-width:32px;padding:7px}
@media(max-width:360px){.room-stage .conversation-toolbar .icon-button{min-width:35px;width:35px}.chapter-next{font-size:11px}}
.gif-suggestions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  padding: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}
.gif-suggestions[hidden] { display: none; }
.gif-suggestions button {
  flex: 0 0 clamp(72px, 21vw, 113px);
  height: clamp(53px, 15vw, 72px);
  padding: 0;
  border-radius: 11px;
  background: #202c33;
  overflow: hidden;
}
.gif-suggestions button:focus-visible { outline-offset: -3px; }
.gif-suggestions img { display: block; width: 100%; height: 100%; object-fit: contain; }

@font-face {
  font-family: Geist;
  src: url("./geist.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("./instrument-serif.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #151714;
  --surface: #1e221d;
  --raised: #262b24;
  --border: #383e34;
  --text: #f5f1e6;
  --muted: #b9beb1;
  --accent: #f6c886;
  --accent-hover: #ffe0af;
  --ink: #221a0f;
  --page-gutter: clamp(20px, 5vw, 72px);
  --gutter: 24px;
  --header-height: 72px;
  font-family: Geist, "Segoe UI", sans-serif;
}

body:not(.in-room) {
  background: var(--bg);
}

body:not(.in-room) .site-header {
  position: fixed;
  z-index: 4;
  inset: 0 0 auto;
  max-width: none;
  height: var(--header-height);
  padding: 0;
  border-color: var(--border);
  background: var(--bg);
}

.header-grid,
.home-grid {
  width: min(100% - 2 * var(--page-gutter), 1392px);
  margin-inline: auto;
}

.header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .brand {
  min-height: 44px;
}

.site-header .icon-button {
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--border);
}

.skip-to-main {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: var(--page-gutter);
  translate: 0 -150%;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--accent);
}

.skip-to-main:focus {
  translate: 0;
}

body.in-room .skip-to-main {
  display: none;
}

.home {
  display: block;
  max-width: none;
  min-height: 0;
  padding: 0;
}

.home-grid {
  display: grid;
  align-content: center;
  gap: clamp(26px, 5vw, 72px);
  min-height: 100svh;
  padding-block: calc(var(--header-height) + clamp(26px, 5vh, 64px)) 20px;
}

.home-split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 18px var(--gutter);
}

.home-grid .welcome {
  grid-column: span 5;
}

.welcome h1 {
  margin: 0;
  font: 400 clamp(56px, 6vw, 94px)/.91 "Instrument Serif", Georgia, serif;
  letter-spacing: -.035em;
}

.welcome h1 span {
  display: block;
}

.welcome > p:not(.privacy-note) {
  max-width: 33ch;
  margin-top: 24px;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
}

.entry-form {
  max-width: 355px;
  margin-top: 25px;
}

.entry-form .button {
  min-height: 52px;
  margin-top: 10px;
}

.welcome > .text-button {
  min-height: 44px;
  margin-top: 4px;
}

.home-photo {
  display: block;
  grid-column: span 7;
  height: clamp(430px, 63vh, 600px);
  overflow: hidden;
  border: 1px solid #6b644a;
  border-radius: 17px;
  background: #252320;
}

.home-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.home-library {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 25px;
  padding-block: 5px;
  border-top: 1px solid var(--border);
}

.home-library .text-button {
  justify-content: flex-start;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

#home-catalog,
#continue-watch {
  margin-top: 0;
}

.home-library #continue-watch {
  margin-left: auto;
  color: var(--accent);
}

.m-enter .home-hero[data-enter] {
  animation: watch-entrance 450ms ease-out both;
}

@keyframes watch-entrance {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .home .primary,
  .home-photo img {
    transition: transform 200ms ease-out, background 160ms ease-out;
  }
  .home .primary:not(:disabled):hover { transform: translateY(-2px); }
  .home .primary:not(:disabled):active { transform: translateY(1px); }
  .home-photo:hover img { transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
  .m-enter .home-hero[data-enter] { animation: none; }
}

body.in-room {
  background: #111612;
  --bg: #111b21;
  --surface: #151f24;
  --raised: #202c33;
  --border: #36454c;
  --text: #edf3ef;
  --muted: #b8c7cb;
  --accent: #72e2a0;
  --accent-hover: #9df0bc;
  --ink: #0c261a;
}

.room.room-stage {
  background: #111612;
}

.room-stage .player-empty {
  background: #171d19;
  padding: 12px;
}

.player-empty-content {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.player-empty-content .empty-play {
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid #3a4b3c;
  border-radius: 12px;
  background: #232d24;
}

.room-stage .player-empty h2 {
  font-size: 18px;
  font-weight: 600;
}

.room-stage .player-empty .button {
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
}

.room-stage .player-empty .button:hover { background: var(--accent-hover); }

.room-stage .conversation {
  background-color: #0b1717;
  background-image: radial-gradient(#63827a20 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0;
}

.room-stage .conversation-toolbar,
.room-stage .conversation-toolbar:has(.chapter-bar:not([hidden])) {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0 5px;
  height: auto;
  padding-block: 4px;
}

.conversation-title {
  margin-inline: 3px 4px;
  font-size: 15px;
  font-weight: 650;
}

.conversation-actions {
  margin-left: auto;
}

.room-stage .conversation-toolbar .icon-button,
.room-stage .chat-compose .icon-button,
.room-stage .chat-compose .add-button {
  min-width: 44px;
  width: 44px;
  height: 44px;
}

.people-pill {
  min-height: 44px;
}

.chapter-bar {
  order: 1;
  margin-top: 2px;
  padding: 3px 4px 3px 11px;
}

.chapter-next {
  min-height: 44px;
  padding-inline: 9px;
}

body.in-room .drawer,
body.in-room .small-dialog {
  background: var(--bg);
  border-color: var(--border);
}

.episode-thumb {
  background: var(--raised);
  color: var(--accent);
}

#catalog-dialog .catalog-row {
  min-height: 63px;
}


@media (max-width: 820px) {
  :root { --header-height: 64px; }
  .home-grid {
    row-gap: 18px;
    padding-top: calc(var(--header-height) + 24px);
  }
  .home-split { grid-template-columns: minmax(0, 1fr); }
  .welcome h1 { font-size: clamp(50px, 12vw, 76px); }
  .home-grid .welcome, .home-photo { grid-column: 1 / -1; }
  .welcome > p:not(.privacy-note) { margin-top: 14px; }
  .entry-form { max-width: none; margin-top: 18px; }
  .home-photo { height: clamp(142px, 25svh, 275px); border-radius: 12px; }
  .home-library { gap: 0 16px; }
  .home-library .text-button { font-size: 13px; }
  .home-library #continue-watch { margin-left: 0; }
}

@media (max-width: 360px) {
  .home-grid { row-gap: 12px; padding-top: calc(var(--header-height) + 16px); padding-bottom: 12px; }
  .home-split { row-gap: 12px; }
  .home-photo { height: clamp(120px, 19svh, 160px); }
  .welcome > p:not(.privacy-note) { margin-top: 12px; }
  .entry-form { margin-top: 14px; }
  .room-stage .conversation { padding-inline: 8px; }
  .room-stage .conversation-toolbar { gap: 0 2px; }
  .conversation-title { margin-inline: 2px 1px; }
  .conversation-actions { gap: 0; }
}

@media (max-height: 470px) {
  body.chat-keyboard .player-empty-content .empty-play,
  body.chat-keyboard .player-empty-content h2 { display: none; }
}

@media (min-width: 1050px) and (min-height: 580px) {
  body.in-room:not(.chat-keyboard):not(.tvgo-docked) .room-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(345px, 28%);
    align-items: center;
    gap: clamp(16px, 2.1vw, 34px);
    max-width: 1660px;
    padding: 24px clamp(20px, 3.2vw, 48px);
  }
  body.in-room:not(.chat-keyboard):not(.tvgo-docked) .watch-stage {
    height: auto;
    min-height: 0;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid #354137;
    border-radius: 16px;
    overflow: hidden;
  }
  body.in-room:not(.chat-keyboard):not(.tvgo-docked) .conversation {
    height: 100%;
    min-width: 0;
    padding-inline: 13px;
    border: 1px solid #35474a;
    border-radius: 16px;
  }
}

/* Screening room */
@font-face {
  font-family: Inter;
  src: url("./inter.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #0c0c10;
  --surface: #14141c;
  --raised: #20202a;
  --border: #383845;
  --text: #f8fafc;
  --muted: #aab2c4;
  --accent: #ff6886;
  --accent-hover: #ff90a7;
  --ink: #200810;
  --screen-gutter: clamp(16px, 2.1vw, 32px);
  --action: #c91f46;
  --action-hover: #ab193b;
  --focus: #fff;
  --motion-fast: 160ms;
  font-family: Inter, "Segoe UI", sans-serif;
}

body:not(.in-room) .site-header {
  border-color: #fff2;
  background: #0c0c10ed;
}

.site-header .icon-button {
  border: 0;
}

.home-hero {
  position: relative;
  isolation: isolate;
}

.home-grid {
  align-content: end;
  row-gap: clamp(20px, 4vh, 38px);
  padding-bottom: clamp(12px, 3vh, 32px);
}

.home-split {
  display: block;
}

.home-grid .welcome {
  max-width: 740px;
}

.home-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  pointer-events: none;
}

.home-photo img {
  object-position: 64% 48%;
}

.home-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #070711 0%, #0d0b19dd 31%, #0e0b1919 76%),
    linear-gradient(0deg, #0a0a13 4%, #0a0a13ce 23%, transparent 67%);
  content: "";
}

.welcome h1 {
  font: 800 clamp(53px, 7.6vw, 116px)/.94 Inter, "Segoe UI", sans-serif;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.welcome > p:not(.privacy-note) {
  max-width: 43ch;
  color: #e0e4ed;
}

.entry-form {
  display: grid;
  grid-template-columns: minmax(0, 260px) auto;
  align-items: center;
  gap: 8px 10px;
  max-width: 485px;
}

.entry-form label, .entry-form .form-error {
  grid-column: 1 / -1;
  margin: 0;
}

.entry-form input:not([type=range]):not([type=checkbox]), .entry-form .button {
  min-height: 50px;
  height: auto;
  margin: 0;
}

.entry-form .button {
  justify-content: center;
}

.entry-form .primary {
  background: var(--action);
  color: var(--text);
}

.entry-form .primary:hover:not(:disabled) {
  background: var(--action-hover);
}

.home-library {
  padding-top: 8px;
  border-color: #fff3;
}

body.in-room {
  --bg: #0c0c10;
  --surface: #14141c;
  --raised: #20202a;
  --border: #383845;
  --text: #f8fafc;
  --muted: #aab2c4;
  background: var(--bg);
  --accent: #ff6886;
  --accent-hover: #ff90a7;
  --ink: #200810;
}

body.in-room .room.room-stage {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: none;
  padding: 0;
  background: var(--bg);
}

.screening-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: env(safe-area-inset-top) var(--screen-gutter) 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.screening-identity, .screening-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.screening-identity {
  min-width: 0;
  margin-right: auto;
}

.screening-identity h1 {
  overflow: hidden;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screening-actions {
  flex-shrink: 0;
  gap: 8px;
}

.screening-header .text-button {
  min-height: 50px;
  padding-inline: 8px;
  color: var(--accent);
}

.screening-header .icon-button {
  min-width: 44px;
  height: 44px;
}

.screening-header .room-avatars .chat-avatar {
  box-shadow: 0 0 0 2px var(--bg);
}

.participants-icon {
  display: none;
  width: 16px;
  height: 16px;
}

.room.room-stage .watch-stage {
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
}

.room.room-stage .player-frame {
  min-height: 0;
  height: 100%;
}

.room.room-stage .player-empty {
  justify-content: end;
  padding: 0 var(--screen-gutter) clamp(14px, 3vh, 30px);
  text-align: left;
  background: linear-gradient(0deg, #080813f5, #10102578 51%, #0f0f2338),
    url("./watch-room-small.webp") center 46% / cover;
}

.player-empty-content {
  justify-items: start;
  align-self: stretch;
  gap: 2px;
}

.room.room-stage .player-empty h2 {
  color: var(--text);
  font: 750 clamp(26px, 4.1vw, 56px)/1.02 Inter, "Segoe UI", sans-serif;
  letter-spacing: -.055em;
}

.room.room-stage .player-empty .primary {
  justify-content: start;
  gap: 7px;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
}

.room.room-stage .player-empty .primary:hover {
  background: transparent;
  color: var(--accent-hover);
}

.room.room-stage .activation:has(#activate-youtube:not([hidden])) > div:first-child {
  display: none;
}

.room.room-stage .activation:has(#activate-youtube:not([hidden])) .tvgo-actions {
  margin-top: 0;
}

.screening-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 7px var(--screen-gutter) 5px;
  background: var(--bg);
}

.screening-chapter, .screening-transport, .queue-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.screening-chapter-copy {
  flex: 1;
  min-width: 0;
}

.screening-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
}

#chapter-progress {
  color: var(--muted);
  font-size: 11px;
}

#playback-state {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

#playback-state::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-inline: 1px 5px;
  border-radius: 50%;
  vertical-align: .14em;
  background: currentColor;
  content: "";
}

#playback-state.playing {
  color: #89d9b5;
}

.screening-chapter h2 {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screening-controls .chapter-next {
  flex: 0 0 auto;
  min-height: 44px;
  height: auto;
  padding: 0 0 0 6px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 650;
}

.screening-controls .chapter-next:hover:not(:disabled) {
  color: var(--accent-hover);
  background: transparent;
}

.screening-transport > button {
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 7px;
}

.screening-transport .play-button {
  background: var(--action);
  color: var(--text);
}

.screening-transport .play-button:hover:not(:disabled) {
  background: var(--action-hover);
}

.screening-timeline {
  display: grid;
  flex: 1;
  min-width: 0;
  grid-template-columns: auto auto;
  justify-content: stretch;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.screening-timeline input {
  grid-column: 1 / -1;
  height: 23px;
  min-width: 0;
}

#duration {
  justify-self: end;
}

.screening-side {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-top: 1px solid var(--border);
}

.screening-panel-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: var(--screen-gutter);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.screening-panel-header .text-button {
  min-height: 44px;
  color: var(--accent);
}

.screening-panel-header svg {
  transform: rotate(180deg);
}

.screening-panel-header h2 {
  font-size: 14px;
}

#queue-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.screening-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px var(--screen-gutter) max(20px, env(safe-area-inset-bottom));
  scrollbar-width: thin;
}

.room.room-stage .conversation {
  height: auto;
  padding: 0 var(--screen-gutter) max(8px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: #101818;
}

.room.room-stage .conversation.has-chat-background {
  background-image: linear-gradient(#081113a8, #081113c7), var(--chat-image);
  background-position: center;
  background-size: cover;
}

#chat-background-file {
  width: 100%;
  height: auto;
  min-height: 48px;
  padding: 7px;
}

#chat-background-file::file-selector-button {
  min-height: 36px;
  margin-right: 8px;
  border: 0;
  border-radius: 5px;
  background: var(--raised);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

#chat-background-status:empty {
  display: none;
}

#clear-chat-background {
  min-height: 44px;
}

.room.room-stage .chat-form {
  padding-bottom: 0;
}

.room.room-stage .chat-compose {
  margin-inline: -2px;
  padding-inline: 12px 5px;
  border-color: #394847;
  border-radius: 12px;
  background: #1b2a2a;
}

.room.room-stage .chat-compose .add-button:not(:disabled) {
  color: #103126;
  background: #85daa6;
}

.room.room-stage .gif-suggestions button {
  border-radius: 6px;
}

.screening-queue .video-form {
  margin: 0;
}

.queue-tools {
  justify-content: space-between;
  margin-top: 16px;
  border-bottom: 1px solid var(--border);
}

.queue-tools h2 {
  font-size: 15px;
}

.queue-tools .text-button {
  min-height: 44px;
}

#queue-empty {
  margin-top: 12px;
}

.catalog-dialog .dialog-heading h2 {
  font: 750 clamp(25px, 5vw, 35px)/1.1 Inter, "Segoe UI", sans-serif;
  letter-spacing: -.045em;
}

.catalog-filters {
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
}

.screening-panel .catalog-filters {
  position: sticky;
  z-index: 1;
  top: -14px;
  padding-block: 10px 6px;
  background: var(--bg);
}

.catalog-filters select, .catalog-filters input {
  padding-inline: 8px !important;
}

.screening-panel .video-list, .catalog-dialog .video-list {
  border-top: 1px solid var(--border);
}

.room .video-row, .history-list .video-row {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
}

#catalog-list .catalog-row, .video-row .video-row-main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  justify-items: start;
  gap: 9px;
  min-height: 61px;
  padding: 8px 0;
  border-radius: 0;
}

#catalog-list .catalog-row {
  grid-template-columns: 38px minmax(0, 1fr) 18px;
}

#catalog-list .catalog-row:hover, .video-row .video-row-main:hover:not(:disabled) {
  background: var(--raised);
}

.episode-number {
  width: 100%;
  color: var(--accent);
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.catalog-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#catalog-list .row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-copy .catalog-progress {
  color: var(--muted);
  font-size: 11px;
}

#catalog-list .catalog-row > svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

#youtube-search-status {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

#youtube-search-status:empty { margin: 0; }

#youtube-search-results .catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  text-align: left;
}

#youtube-search-results .catalog-row:hover { background: var(--raised); }
#youtube-search-results .catalog-row > svg { color: var(--muted); }

body.in-room .drawer,
body.in-room .small-dialog {
  background: var(--surface);
}

.screening-panel-header button:focus-visible,
.screening-header button:focus-visible,
.screening-controls button:focus-visible,
.screening-controls input:focus-visible,
.screening-panel button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.screening-header button:active,
.screening-controls button:not(:disabled):active {
  opacity: .78;
}

@media (max-width: 820px) {
  .home-photo img { object-position: 58% 30%; }
  .home-hero::before {
    background: linear-gradient(0deg, #0b0b14 8%, #0b0b14f0 35%, #10102555 64%, transparent 88%);
  }
  .welcome h1 { font-size: clamp(44px, 11.2vw, 77px); }
  .entry-form { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .entry-form .button { justify-content: space-between; }
  .home-library { column-gap: 18px; }
}

@media (max-width: 380px) {
  .screening-header .room-avatars { display: none; }
  .screening-header .people-pill { min-width: 44px; justify-content: center; padding-inline: 4px; }
  .participants-icon { display: block; }
  .screening-transport { gap: 4px; }
}

@media (max-width: 1049px) and (max-height: 530px) {
  .room.room-stage .watch-stage { max-height: 31dvh; }
}

body.chat-keyboard .room.room-stage .watch-stage {
  max-height: max(0px, min(calc(var(--stage-height, 100dvh) - 205px), 26vh));
  overflow: hidden;
}

body.chat-keyboard .screening-header,
body.chat-keyboard .screening-controls {
  display: none;
}

body.tvgo-docked .room.room-stage .watch-stage {
  flex-basis: 92px;
  max-height: 92px;
  aspect-ratio: auto;
}

@media (min-width: 1050px) and (min-height: 580px), (min-width: 640px) and (min-height: 320px) and (orientation: landscape) {
  body.in-room:not(.chat-keyboard):not(.tvgo-docked) .room.room-stage {
    display: grid;
    gap: 0;
    max-width: none;
    padding: 0;
    grid-template:
      "heading heading" auto
      "watch side" minmax(0, 1fr)
      "controls side" auto
      / minmax(0, 1fr) minmax(330px, 29%);
    align-items: stretch;
  }

  .screening-header { grid-area: heading; }
  .screening-side { grid-area: side; border-top: 0; border-left: 1px solid var(--border); }
  .screening-controls { grid-area: controls; padding-block: 10px 13px; }
  body.in-room:not(.chat-keyboard):not(.tvgo-docked) .room.room-stage .watch-stage {
    grid-area: watch;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
  }
  .room.room-stage .player-empty { background-image: linear-gradient(0deg, #080813f5, #0f0f2338 68%), url("./watch-room.webp"); }

  body.in-room:not(.chat-keyboard):not(.tvgo-docked) .room-stage .conversation {
    height: auto;
    padding-inline: var(--screen-gutter);
    border: 0;
    border-radius: 0;
  }
}

/* Motion for pointer-driven navigation and dialogs */
:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --motion-dialog: 250ms;
}

:root[data-pointer-motion] .screening-panel:not([hidden]) {
  animation: panel-enter var(--motion-fast) var(--ease-out) both;
}

@keyframes panel-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-pointer-motion] :is(.screening-header, .screening-transport, .chat-compose) button {
    transition: transform  var(--motion-fast) var(--ease-out);
  }

  :root[data-pointer-motion] :is(.screening-header, .screening-transport, .chat-compose) button:not(:disabled):active {
    transform: scale(.96);
  }
}

@supports (transition-behavior: allow-discrete) {
  :root[data-pointer-motion] dialog {
    --dialog-enter: scale(.96);
    --dialog-ease: var(--ease-out);
    opacity: 0;
    transform: var(--dialog-enter);
    transition:
      opacity var(--motion-dialog) var(--ease-out),
      transform var(--motion-dialog) var(--dialog-ease),
      display var(--motion-dialog) allow-discrete,
      overlay var(--motion-dialog) allow-discrete;
  }

  :root[data-pointer-motion] .drawer {
    --dialog-enter: translateX(100%);
    --dialog-ease: var(--ease-drawer);
  }

  :root[data-pointer-motion] dialog::backdrop {
    opacity: 0;
    transition: opacity var(--motion-dialog) var(--ease-out), display var(--motion-dialog) allow-discrete, overlay var(--motion-dialog) allow-discrete;
  }

  :root[data-pointer-motion] dialog[open],
  :root[data-pointer-motion] dialog[open]::backdrop {
    opacity: 1;
  }

  :root[data-pointer-motion] dialog[open] {
    transform: none;
  }

  :root[data-pointer-motion] dialog:not([open]),
  :root[data-pointer-motion] dialog:not([open])::backdrop {
    pointer-events: none;
  }

  @starting-style {
    :root[data-pointer-motion] dialog[open] {
      opacity: 0;
      transform: var(--dialog-enter);
    }

    :root[data-pointer-motion] dialog[open]::backdrop {
      opacity: 0;
    }
  }

  @media (max-width: 760px) {
    :root[data-pointer-motion] body.in-room .drawer {
      --dialog-enter: translateY(100%);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    :root[data-pointer-motion] dialog,
    :root[data-pointer-motion] body.in-room .drawer {
      --dialog-enter: none;
    }

    /* The shared reduced-motion rule disables transitions; this fade has no movement. */
    :root[data-pointer-motion] dialog,
    :root[data-pointer-motion] dialog::backdrop {
      transition: opacity var(--motion-fast) var(--ease-out), display var(--motion-fast) allow-discrete, overlay var(--motion-fast) allow-discrete !important;
    }
  }
}
