.watch-layout { max-width:1220px; margin:auto; padding:24px; }
.watch-heading,.watch-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.watch-heading { justify-content:space-between; margin-bottom:10px; }
.watch-heading h1 { color:var(--gold); }
.watch-page:has(#room:not([hidden])) .watch-heading h1 { color:#a36235; background:linear-gradient(100deg,#9f5a30,#e4b784); background-clip:text; -webkit-text-fill-color:transparent; }
#viewers,#notice,#player-status { color:var(--muted); }
#notice:not(:empty),#player-status:not(:empty) { margin-block:8px; }
#entry-panel { display:grid; justify-items:center; gap:18px; max-width:450px; margin:45px auto; padding:28px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }
#entry-panel img,#empty-screen img { border-radius:25%; }
#entry { width:100%; }
.watch-room { display:grid; grid-template-columns:minmax(0,1fr) minmax(255px,330px); align-items:start; gap:24px; }
.watch-stage,.watch-chat { min-width:0; }
#screen { min-height:200px; aspect-ratio:16/9; position:relative; background:#17141e; border-radius:8px; overflow:hidden; }
#screen.twitch-screen { min-height:300px; }
#empty-screen,#video-slot { position:absolute; inset:0; }
#empty-screen { display:grid; place-content:center; justify-items:center; gap:10px; color:#dec5ff; }
#video-slot iframe { width:100%; height:100%; border:0; display:block; }
.player-actions { margin-block:10px; }
.player-actions #theatre { margin-inline-start:auto; flex:none; }
#seek-label { flex:1; min-width:110px; display:flex; align-items:center; }
#seek { padding:0; accent-color:var(--gold); }
#external { color:var(--gold); font-size:13px; }
.watch-queue,.watch-chat { border-top:1px solid var(--line); padding-top:12px; }
.watch-room h2 { font-size:18px; color:var(--gold); margin-bottom:10px; }
#queue-form,#message-form { grid-template-columns:minmax(0,1fr) auto; }
#queue { margin:8px 0 0; padding-left:24px; }
#queue li { padding:6px 0; overflow-wrap:anywhere; }
#queue li a { color:var(--gold); }
#queue li button { margin-left:8px; }
#watch-log { height:clamp(165px,42vh,450px); overflow:auto; overflow-wrap:anywhere; scrollbar-gutter:stable; }
#watch-log:empty::after { content:'No messages yet.'; color:var(--muted); }
#watch-log p { padding:4px 0; }
#watch-log strong { color:var(--gold); }
#reaction-layer { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
#reaction-layer span { position:absolute; left:var(--reaction-x); bottom:10%; max-width:30%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:6px 9px; color:#fff; background:#21191bd9; border-radius:8px; animation:watch-reaction 2.6s ease-out forwards; }
@keyframes watch-reaction { 0% { opacity:0; transform:translateY(8px) scale(.85); } 15% { opacity:1; transform:translateY(-10px) scale(1); } 75% { opacity:1; } 100% { opacity:0; transform:translateY(-115px); } }
@media (prefers-reduced-motion: reduce) { #reaction-layer span { animation:none; } }
#watch-time { font-size:13px; font-variant-numeric:tabular-nums; }
#watch-live-status { display:flex; justify-content:flex-end; min-height:30px; margin-bottom:6px; }
#watch-live { align-self:center; background:#b42433; color:white; padding:4px 10px; border-radius:4px; font-size:15px; font-weight:750; opacity:0; transition:opacity 150ms ease; }
#watch-live.is-visible { opacity:1; }
@media (prefers-reduced-motion: reduce) { #watch-live { transition:none; } }
#room.theatre { position:fixed; inset:0; z-index:100; overflow:auto; background:var(--panel); padding:18px; grid-template-columns:minmax(0,1fr) minmax(220px,28vw); }
#room.theatre #screen { max-height:calc(100dvh - 105px); }
#room.theatre #watch-log { height:clamp(120px,65dvh,78dvh); }
#reactions { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
#reactions button { min-width:40px; padding-inline:5px; }
@media (max-width:780px) {
  .watch-layout { padding:16px; }
  .watch-room { grid-template-columns:minmax(0,1fr); }
  #room.theatre { grid-template-columns:minmax(0,1fr); }
  #room.theatre #watch-log { height:200px; }
  #watch-log { height:200px; }
  .watch-page input { font-size:16px; }
  .watch-page button { min-height:44px; }
}
