.standalone-only{display:none}
html.standalone,html.standalone body{height:auto;min-height:100%;overflow:auto;background:#101321;color:#dce3f5;font:14px/1.5 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif}
.standalone *{box-sizing:border-box}
.standalone .standalone-only{display:flex}
.standalone button,.standalone input{font:inherit}
.standalone button{cursor:pointer;color:inherit}
.standalone button:disabled{opacity:.45;cursor:not-allowed}
.standalone button:focus-visible,.standalone input:focus-visible{outline:2px solid #aaa0ff;outline-offset:2px}
.watch-header{height:68px;padding:0 5vw;align-items:center;justify-content:space-between;border-bottom:1px solid #2d344c;background:#10131e}
.watch-brand{font-size:17px;font-weight:600}.watch-brand i{font-style:normal;background:linear-gradient(135deg,#6186ff,#8a5beb);border-radius:10px;padding:8px 12px;margin-right:10px;color:white}
.watch-room{font-size:12px;color:#9caaca}
.standalone .watch-layout{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(300px,1fr);gap:20px;max-width:1360px;padding:28px;margin:auto;align-items:start}
.standalone .watch-main,.standalone .watch-interaction{border:1px solid #303b56;background:#171d2c;border-radius:18px;overflow:hidden}
.watch-title{padding:16px 20px;align-items:center;justify-content:space-between;border-bottom:1px solid #303b56}.watch-title h1{font-size:16px;margin:0}.watch-status{font-size:11px;color:#c1b4ff;background:#343453;padding:4px 10px;border-radius:20px}
.standalone .watch-stage{position:relative;aspect-ratio:4/3;isolation:isolate;background:radial-gradient(ellipse at center,#272540,#161624);overflow:hidden}
.standalone #remote-view video{object-fit:contain}
.standalone #hint{z-index:1;pointer-events:none;color:#bdc5df;font-size:15px;background:#151827ad;backdrop-filter:blur(6px)}
.watch-profile{position:absolute;left:16px;top:16px;z-index:2;align-items:center;gap:8px;background:#1a223bbb;border:1px solid #4c536b;border-radius:30px;padding:6px 12px 6px 6px;font-size:12px}.watch-avatar{display:grid;place-items:center;width:28px;height:28px;background:#b2a5f1;color:#252849;border-radius:50%}
.watch-footer{padding:14px 20px;align-items:center;justify-content:space-between;color:#96a6c6;font-size:12px}.watch-footer button,.gift-close{border:1px solid #45506f;border-radius:8px;background:#252c42;padding:6px 12px}
.standalone .watch-interaction{display:block}.watch-interaction h2{font-size:15px;margin:0}.message-heading{padding:18px;border-bottom:1px solid #303b56;display:flex;justify-content:space-between;align-items:center}.message-heading label{font-size:11px;color:#abb9d5;display:flex;align-items:center;gap:5px}.message-heading input{accent-color:#9685ff}
.watch-messages{height:340px;padding:16px;overflow-y:auto;scrollbar-width:thin}.message-empty{color:#7787a7;font-size:12px;text-align:center;margin:32px 0}.watch-message{font-size:12px;margin:0 0 14px;overflow-wrap:anywhere}.watch-message b{color:#b8a6f3;margin-right:6px}.watch-message time{float:right;color:#7c89a6;font-size:10px}.watch-message.gift{color:#e5c290}
.watch-compose{padding:16px;border-top:1px solid #303b56;display:flex;gap:8px;flex-wrap:wrap}.watch-compose input{flex:1;min-width:100px;width:0;border:1px solid #37435e;border-radius:9px;background:#20273a;color:#dce3f5;padding:10px}.watch-compose button{border:0;border-radius:9px;background:#665edb;padding:9px 12px}.watch-compose #watchGiftOpen{background:#393456;color:#c5b8ff}
.watch-feedback{min-height:24px;margin:0;padding:0 16px 12px;font-size:11px;color:#aab8d3;overflow-wrap:anywhere}
.watch-gifts{margin:0 16px 16px;padding:12px;border:1px solid #3a4563;border-radius:12px;background:#1c2335}.watch-gifts[hidden]{display:none}.gift-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:13px}.gift-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.gift-tabs button{background:none;border:0;color:#8d9abb;font-size:12px;padding:5px}.gift-tabs button[aria-pressed=true]{color:#c9bfff;border-bottom:2px solid #9c85fa}.gift-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px 6px;max-height:240px;overflow-y:auto}.gift-grid button{min-width:0;background:none;border:0;font-size:11px;padding:0;overflow-wrap:anywhere}.gift-grid img{display:block;width:40px;height:40px;object-fit:contain;margin:0 auto 6px}.gift-grid .gift-fallback{display:block;font-size:28px;height:40px;margin-bottom:6px}
.watch-overlays{position:absolute;inset:70px 0 35px;pointer-events:none;z-index:3;overflow:hidden}.watch-danmaku{position:absolute;white-space:nowrap;padding:5px 10px;border-radius:14px;background:#11182780;color:white;font-size:13px;animation:watch-fly 9s linear forwards;left:100%}
@keyframes watch-fly{to{transform:translateX(calc(-100% - 1200px))}}
@media(max-width:850px){.standalone .watch-layout{grid-template-columns:1fr;padding:14px;gap:14px;max-width:760px}.watch-header{height:58px;padding:0 16px}.watch-brand{font-size:14px}.watch-brand i{padding:5px 8px;margin-right:6px}.watch-messages{height:240px}.watch-room{font-size:10px}.watch-title{padding:12px 16px}}
@media(prefers-reduced-motion:reduce){.watch-danmaku{animation:none;left:12px}}

@media(max-width:480px){.watch-header{height:auto;min-height:64px;flex-wrap:wrap;gap:8px;padding:12px 16px}.watch-room{margin-left:36px}.message-heading{padding:14px}.watch-compose{padding:12px}.watch-title{gap:8px}.watch-layout .watch-main{min-width:0}}
/* Match the studio audience panel's waiting state, profile, composer and gifts. */
.standalone .watch-stage{border-radius:11px;margin:10px;width:calc(100% - 20px)}
.standalone #hint{color:#fff;backdrop-filter:blur(13px);background:#151628ad}
.watch-wait-icon{width:48px;height:48px;border:1px solid #ffffff28;background:#ffffff0c;display:grid;place-items:center;border-radius:50%;margin:0 auto 13px;color:#c9c4f1}
.watch-wait-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
#hint h3{font-size:16px;font-weight:550;margin:0 0 7px}#hint p{font-size:11px;color:#b6b2c8;margin:0}
.watch-profile{top:14px;left:13px;padding:5px 11px 5px 5px;gap:7px;background:#15162b55;backdrop-filter:blur(12px);border:1px solid #ffffff16}
.watch-profile .watch-avatar{width:29px;height:29px;background:#d9d3ef;color:#5c4e98;font-size:12px}
.watch-profile strong{font-size:11px;font-weight:550}.watch-profile small{display:block;color:#ffffff9b;font-size:8px}.watch-role{background:#5f619555;color:#c5c6f8;font-size:9px;border-radius:4px;padding:2px 4px;margin-left:5px}
.watch-live-badge{position:absolute;right:14px;top:20px;z-index:2;border-radius:14px;background:#ee398f;padding:4px 7px;font-size:9px;color:white;letter-spacing:1px}
.standalone #soundBtn{top:12px;right:12px}
.standalone .watch-compose{flex-wrap:nowrap;gap:7px;padding:12px 16px;border-top:0}
.standalone .watch-compose input{height:40px;min-width:0;border-radius:22px;background:#202738;border-color:#35415c;font-size:12px;padding:9px 12px}
.standalone .watch-compose #watchSend{flex-shrink:0;height:40px;background:#202738;border:1px solid #35415c;border-radius:22px;color:#a7b4d1;font-size:12px;padding:0 13px}
.standalone .watch-compose #watchGiftOpen{height:40px;display:flex;align-items:center;gap:6px;flex-shrink:0;border:1px solid #665e94;border-radius:22px;background:#343150;color:#c9bdf9;font-size:12px;padding:0 12px;box-shadow:0 0 12px #9e7cff15}
#watchGiftOpen svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.standalone .watch-compose #watchGiftOpen[aria-expanded=true]{background:#414368;border-color:#9c92d9}
#watchGiftOpen .chevron{font-size:15px;transition:transform .2s}#watchGiftOpen[aria-expanded=true] .chevron{transform:rotate(180deg)}
.watch-gifts{min-height:306px;margin:0 16px 12px;padding:14px 12px;border:1px solid #35425d;border-radius:10px;background:linear-gradient(135deg,#1e2b4355,#25213d55),#151b2a}
.gift-heading{height:26px;font-size:13px;margin-bottom:4px}.gift-close{font-size:24px;background:transparent;border:0;padding:0;color:#909cbd}
.gift-tabs{height:34px;margin:0 0 12px;border-bottom:1px solid #ffffff09;gap:18px;flex-wrap:nowrap}.gift-tabs button{padding:4px 0;font-size:12px;position:relative}.gift-tabs button[aria-pressed=true]{font-weight:600;border-bottom:0;color:#ddd7ff}.gift-tabs button[aria-pressed=true]:after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;border-radius:2px;background:linear-gradient(90deg,#648aff,#ac78ff)}
.gift-grid{gap:20px 8px;max-height:204px;padding:4px 4px 10px}.gift-grid button{font-size:12px;line-height:18px;color:#b6c2df}.gift-grid .shared-gift-art{max-width:100%}
.message-heading{height:42px;font-size:12px;padding:10px 16px}.message-heading h2{font-size:13px;display:flex;align-items:center;gap:8px}.message-heading h2 small{display:inline-grid;place-items:center;border-radius:12px;background:#2a3652;min-width:23px;color:#a9b8dc;font-size:11px}.message-heading label{font-size:10px;gap:4px}.message-heading label small{color:#a69ccc;border:1px solid #635786;border-radius:4px;padding:0 3px}
.watch-feedback:empty{display:none}
@media(max-width:480px){.message-heading label{font-size:9px}.gift-grid{gap:18px 4px}.gift-grid .shared-gift-art{transform:scale(.8);transform-origin:bottom left;margin-left:0;margin-bottom:4px}}

/* Align interaction controls with the player bottom; gifts open above them. */
.standalone .watch-sidebar{display:flex;flex-direction:column;align-self:stretch;min-width:0;gap:12px}
.standalone .watch-sidebar .watch-interaction{display:flex;flex-direction:column;flex:1;min-height:340px}
.watch-sidebar .watch-messages{flex:1;height:0;min-height:0}
.watch-actions{position:relative;flex:none;min-width:0}
.standalone .watch-sidebar .watch-compose{margin:0;padding:0;min-width:0}
.watch-sidebar .watch-feedback{padding:8px 0 0}
.watch-sidebar .watch-gifts{position:absolute;z-index:10;left:0;right:0;bottom:calc(100% + 12px);margin:0;box-shadow:0 -8px 28px #070b1838;max-height:min(420px,70vh);overflow-y:auto}
.watch-sidebar #watchGiftOpen .chevron{transform:rotate(180deg)}
.watch-sidebar #watchGiftOpen[aria-expanded=true] .chevron{transform:rotate(0)}
@media(max-width:850px){.standalone .watch-sidebar .watch-interaction{flex:none;height:360px;min-height:0}}

/* Same chat overlay layout and typography as the studio audience view. */
.standalone .watch-chat-layer{position:absolute;inset:auto auto 19px 9px;width:calc(100% - 20px);height:auto;display:flex;flex-direction:column;align-items:flex-start;gap:3px;z-index:6;pointer-events:none;overflow:hidden}
.watch-chat-pill{display:flex;align-items:center;gap:5px;max-width:88%;background:#151322a6;color:#f3f0fa;border-radius:15px;padding:3px 9px 3px 3px;font-size:12px;line-height:1.4;text-shadow:0 1px 2px #0004;box-shadow:0 1px 5px #0001;backdrop-filter:blur(5px)}
.watch-chat-pill .level-badge{flex-shrink:0;background:linear-gradient(115deg,#7559f3,#b168d8);border:1px solid #c6b0ff90;color:#fff;border-radius:10px;padding:0 5px;font-size:9px;font-weight:700;line-height:16px;box-shadow:inset 0 1px 4px #fff3}
.watch-chat-pill b{color:#7bddff;font-size:12px;font-weight:600;white-space:nowrap}
.watch-chat-pill .pill-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-height:820px){.watch-chat-pill{font-size:11px;padding:2px 8px 2px 3px}.watch-chat-pill b{font-size:11px}.watch-chat-pill .level-badge{font-size:8px;line-height:14px}}

/* Match the studio viewer gift banner, above the four chat pills. */
.standalone .watch-overlays{inset:0;z-index:6}
.watch-gift-banner{position:absolute;bottom:139px;left:12px;z-index:6;border-radius:30px;padding:7px 14px 7px 8px;display:flex;align-items:center;gap:8px;background:linear-gradient(100deg,#484891e8,#322c60db);border:1px solid #9d9dea66;color:white;box-shadow:0 4px 15px #0002;animation:watch-gift-pop .3s ease;pointer-events:none;max-width:calc(100% - 24px)}
.watch-gift-banner>span{font-size:25px;flex-shrink:0}
.watch-gift-banner img{width:26px;height:26px;object-fit:contain;border-radius:6px;display:block}
.watch-gift-banner b{font-size:11px;display:block;font-weight:600}
.watch-gift-banner small{font-size:9px;color:#ece4fc}
@keyframes watch-gift-pop{from{opacity:0;transform:translateX(-15px)}to{opacity:1;transform:translateX(0)}}
@media(max-height:820px){.watch-gift-banner{bottom:120px}}

.watch-share-actions{display:flex;align-items:center;gap:10px}.watch-share-actions button{border:0;background:transparent;padding:4px 0;color:#b9adf5;font-size:12px;white-space:nowrap}.watch-share-actions .watch-status{white-space:nowrap}

.watch-gift-banner{min-width:min(220px,calc(100% - 24px));padding:7px 14px 7px 8px}

.watch-gift-banner{background:linear-gradient(100deg,#48489180,#322c6066);backdrop-filter:blur(14px) saturate(125%);-webkit-backdrop-filter:blur(14px) saturate(125%);border:1px solid #b6b4e64d;box-shadow:0 4px 15px #0002}

/* 换轨空窗的「冻结上一帧」层。
   z-index 1：与 #hint 同级但 DOM 在它之前 → 提示仍然压在冻结层上面。
   两只 view 里被 promote 的那只（z-index 2）会盖住它，但它空掉时是透明的，冻结层就透出来。
   object-fit:cover 且画布内部分辨率取视频自身的像素尺寸 —— 这样它和 <video>
   用的是同一套「填满并裁切」规则，盖上去时不会跳一下。 */
.watch-stage > #freeze-view{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1;display:none;pointer-events:none}
.watch-stage > #freeze-view.on{display:block}
