/* 版面全部按横屏排，尺寸用 em：字号由页面按画面高度给（12～17px），手机和电脑一起缩放。
 * 手机竖拿时 #app 整个转 90 度，所以里面一律用绝对定位和百分比，不用 vw、vh。
 * 配色跟着这届总决赛走：深酒红的玻璃面板、金色标题，主色是自家的橙色。 */
:root { --accent: #ef6415; --accent-hi: #ff8a3d; --gold: #f0c46a; --gold-hi: #ffe9b8; --ink: #2c070c;
  --panel: rgba(28, 9, 14, .84); --panel-solid: #1f0a10; --line: rgba(255, 224, 180, .14); --line-hi: rgba(240, 196, 106, .45); --text: #fff6ec; --muted: #c9aaa6; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #16060a; color: var(--text); font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.45; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-text-size-adjust: 100%; }
button, select, textarea, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
em, kbd { font-style: normal; font-family: inherit; }
.ic { display: block; flex: none; width: 1.5em; height: 1.5em; }
.ic svg { display: block; width: 100%; height: 100%; }

#app { position: fixed; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; transform-origin: 0 0; font-size: 14px;
  --sl: env(safe-area-inset-left); --sr: env(safe-area-inset-right); --st: env(safe-area-inset-top); --sb: env(safe-area-inset-bottom); }
#app.rot { --sl: env(safe-area-inset-top); --sr: env(safe-area-inset-bottom); --st: 0px; --sb: 0px; }

#gl, #hud, #stage3d { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#gl { display: block; touch-action: none; cursor: grab; }
#gl:active { cursor: grabbing; }
#hud { pointer-events: none; z-index: 2; }
#fp { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: none; pointer-events: none; z-index: 2; }
#stage3d { pointer-events: none; z-index: 1; overflow: hidden; }
#screen, #led { position: absolute; left: 50%; top: 50%; transform-origin: 0 0; -webkit-transform-origin: 0 0; visibility: hidden; overflow: hidden; }
#screen { background: #05060c; }
/* 大屏整块不接收点击和拖动（直播播放器里的东西点不到），手指划过去照样转视角 */
#screen, #screen * { pointer-events: none !important; }
#screen-body, #screen iframe, #screen video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; }
/* 直连播放器：画面、状态牌、开声音 */
.lv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #05060c; }
#screen .lv video { object-fit: contain; background: #05060c; }
.lv-note { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lv[data-state="playing"] .lv-note { display: none; }
.lv-words { position: relative; padding: .4em .8em; font-size: var(--scr, .85em); line-height: 1.4; }
.lv-note .idle { position: static; height: auto; flex: 0 1 auto; background: none; width: auto; }
.lv[data-state="offline"] .lv-note { background: linear-gradient(180deg, #4a0f18, #1d060b); }
#led { display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #3d0b13, #1d060b); border: 1px solid #b08434; color: var(--gold-hi); font-weight: 700; white-space: nowrap; letter-spacing: .08em; line-height: 1; }
#led-text.in { animation: led .5s ease-out; }
@keyframes led { from { transform: translateY(80%); } to { transform: none; } }
#app.big #stage3d { background: rgba(8, 3, 5, .95); pointer-events: auto; }
#app.big #hud, #app.big #fp, #app.big #led, #app.big #dock, #app.big .tray, #app.big #wave { display: none; }

/* 屏上的赛程牌 */
.idle { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: var(--scr, .8em); line-height: 1.4; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #6a1722, #2a0a11 55%, #160509); }
.idle-title { font-size: 1.7em; font-weight: 900; letter-spacing: .08em; color: var(--gold-hi); line-height: 1.25; }
.idle-sub { color: var(--muted); margin: .1em 0 .35em; padding: 0 1em; text-align: center; }
.idle-row { display: grid; grid-template-columns: 3.6em 9.5em 1.6em 9.5em; align-items: center; padding: .08em .7em; white-space: nowrap; border-radius: .4em; }
.idle-row b { font-weight: 700; }
.idle-row b:nth-of-type(1) { text-align: right; }
.idle-row i { font-style: normal; text-align: center; color: var(--muted); font-size: .85em; }
.idle-time { color: var(--gold); font-weight: 700; }
.idle-row.on { background: var(--accent); color: #fff; }
.idle-row.on .idle-time, .idle-row.on i { color: #fff; }
.credit { display: flex; align-items: center; justify-content: center; margin-top: .5em; font-size: .8em; color: var(--muted); }
.credit img { width: 1.9em; height: 2em; object-fit: contain; margin-right: .45em; }

/* ---- 通用 ---- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: .9em; box-shadow: 0 .6em 2em rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: .35em; min-height: 2.3em; padding: .25em .95em; border-radius: 2em; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); font-size: .92em; white-space: nowrap; color: inherit; text-decoration: none; }
.chip .ic { width: 1.15em; height: 1.15em; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.chip:active { filter: brightness(1.3); }
.note { font-size: .8em; color: var(--muted); }
.x { width: 2.4em; height: 2.4em; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.x .ic { width: 1.1em; height: 1.1em; }

/* ---- 顶栏：左边场馆名和人数，中间一条公告，右边三个小按钮 ---- */
#top { position: absolute; z-index: 5; display: none; align-items: center; gap: .6em; left: calc(var(--sl) + .7em); right: calc(var(--sr) + .7em); top: calc(var(--st) + .45em); height: 2.3em; pointer-events: none; }
#app.in #top { display: flex; }
#top > * { pointer-events: auto; }
#brand { flex: none; display: flex; align-items: center; height: 100%; padding: 0 .85em 0 .45em; border-radius: 2em; background: rgba(24, 8, 12, .66); line-height: 1.15; }
#brand img { width: 1.6em; height: 1.7em; object-fit: contain; margin-right: .45em; }
#brand div { display: flex; flex-direction: column; }
#brand b { font-size: .9em; font-weight: 900; letter-spacing: .04em; white-space: nowrap; }
#brand span { font-size: .68em; color: #e9d3cd; white-space: nowrap; }
#notice { flex: 0 1 auto; min-width: 0; max-width: 34em; height: 2.1em; margin: 0 auto; display: flex; align-items: center; gap: .6em; padding: 0 .35em 0 .85em; border-radius: 2em; background: rgba(24, 8, 12, .66); }
#notice::before { content: ""; flex: none; width: .45em; height: .45em; border-radius: 50%; background: var(--accent); }
#notice-clip { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
#notice-text { display: inline-block; font-size: .86em; }
#notice-text.run { animation: run linear infinite alternate; }
@keyframes run { 0%, 18% { transform: translateX(0); } 82%, 100% { transform: translateX(var(--run)); } }
#notice-more { flex: none; padding: .1em .65em; border-radius: 2em; background: rgba(255, 255, 255, .12); font-size: .74em; white-space: nowrap; }
#notice.plain { padding-right: .85em; }
#notice.plain #notice-more { display: none; }
#tools { flex: none; display: flex; gap: .35em; }
#tools button { display: flex; align-items: center; justify-content: center; gap: .35em; height: 2.3em; min-width: 2.3em; padding: 0 .75em; border-radius: 2em; background: rgba(24, 8, 12, .66); white-space: nowrap; }
#tools .ic { width: 1.15em; height: 1.15em; }
#tools em { font-size: .8em; max-width: 6em; overflow: hidden; text-overflow: ellipsis; }
#tools button.on { background: var(--accent); }
#tools #btn-more { padding: 0; }
#app.big #top { z-index: 6; }

/* 顶栏下面弹出的小菜单：本场支持、直播线路、更多 */
.drop { position: absolute; z-index: 7; display: none; top: calc(var(--st) + 3.1em); max-height: calc(100% - 4em - var(--st)); overflow-y: auto; touch-action: pan-x pan-y; background: var(--panel-solid); }
.drop.show { display: block; animation: rise .2s ease-out; }
#lines, #more { right: calc(var(--sr) + .7em); min-width: 10.5em; padding: .3em; }
#lines button, #more button { display: flex; align-items: center; gap: .6em; width: 100%; min-height: 2.4em; padding: 0 .9em 0 .65em; border-radius: .6em; text-align: left; font-size: .9em; white-space: nowrap; }
#lines button:hover, #more button:hover { background: rgba(255, 255, 255, .08); }
#lines button.on { background: var(--accent); font-weight: 800; }
#lines button.dim { color: var(--muted); font-size: .8em; }
.quality { display: grid; grid-template-columns: 1fr 1fr; gap: .35em; }
#lines .quality { margin: .25em 0; padding: .35em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#lines .quality button { width: auto; justify-content: center; min-height: 2.2em; padding: .2em .6em; border-radius: 2em; text-align: center; font-size: .8em; }
#lines .quality button.on { background: var(--accent); }
#more .ic { width: 1.15em; height: 1.15em; color: var(--gold-hi); }
#match { left: 50%; transform: translateX(-50%); width: 18em; max-width: 94%; padding: .65em .75em .75em; text-align: center; }
#match.show { animation: none; }
#match-head { display: flex; flex-direction: column; margin-bottom: .45em; line-height: 1.3; }
#match-time { font-size: .86em; font-weight: 800; color: var(--gold-hi); }
#match-count { font-size: .7em; color: var(--muted); }
.match-sides { display: flex; gap: .4em; }
.team { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; min-height: 3em; padding: .35em .2em; border: 1px solid var(--line); border-radius: .6em; line-height: 1.25; }
.team b { font-size: .8em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team span { font-size: .72em; color: var(--muted); }
.team.on { background: rgba(255, 255, 255, .13); border-width: 2px; }
.team.on span { color: var(--text); }
.bar { height: .3em; margin-top: .55em; border-radius: 1em; overflow: hidden; background: rgba(255, 255, 255, .14); }
.bar i { display: block; height: 100%; width: 50%; transition: width .5s; }

/* ---- 下方互动栏 ---- */
#dock { position: absolute; z-index: 3; display: none; align-items: center; gap: .3em; left: 50%; bottom: calc(var(--sb) + .5em); transform: translateX(-50%); padding: .2em .5em; background: rgba(24, 8, 12, .66); border-radius: 2em; white-space: nowrap; }
#app.in #dock { display: flex; }
#dock button { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.6em; height: 3em; border-radius: 1.2em; }
#dock .ic { width: 1.4em; height: 1.4em; }
#dock em { font-size: .66em; line-height: 1.2; }
#dock button:hover { background: rgba(255, 255, 255, .08); }
#dock button.on { background: var(--accent); }
#dock #btn-cheer { width: 4.1em; height: 4.1em; margin: -1em .2em .05em; border-radius: 50%; background: var(--accent); box-shadow: 0 .3em .9em rgba(239, 100, 21, .45); }
#dock #btn-cheer .ic { width: 1.55em; height: 1.55em; }
#dock #btn-cheer em { font-weight: 800; }
#btn-cheer:active { transform: scale(.93); }
#btn-cheer.pop { animation: pop .5s ease-out; }
@keyframes pop { 30% { transform: scale(1.16); } }

/* ---- 动作、表情、快捷语：从互动栏上面弹出一条，可左右滑 ---- */
.tray { position: absolute; z-index: 4; display: none; left: 50%; bottom: calc(var(--sb) + 4.5em); transform: translateX(-50%); width: max-content; max-width: min(42em, 96%); padding: .35em; gap: .2em; overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tray.show { display: flex; animation: rise .22s ease-out; }
@keyframes rise { from { margin-bottom: -.8em; opacity: 0; } }
.gesture, .sticker { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; width: 4.3em; padding: .2em 0; border-radius: .7em; }
.gesture:hover, .sticker:hover { background: rgba(255, 255, 255, .09); }
.gesture canvas { width: 4em; height: 4em; }
.gesture span, .sticker span { font-size: .7em; white-space: nowrap; }
.gesture kbd { position: absolute; left: .25em; top: .2em; font-size: .62em; color: var(--muted); }
.sticker i { width: 3.5em; height: 3.5em; background-image: var(--stickers); background-size: 400% 300%; }
#tray-sticker { flex-direction: column; align-items: stretch; width: min(34em, 94%); overflow: hidden; }
.tray-tabs { display: flex; justify-content: center; gap: .25em; }
.tray-tabs button { padding: .2em 1.1em; border-radius: 2em; font-size: .84em; color: var(--muted); }
.tray-tabs button.on { background: rgba(255, 255, 255, .13); color: var(--text); font-weight: 800; }
#stickers, #phrases { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; height: 9.4em; overflow-y: auto; touch-action: pan-x pan-y; }
#phrases { gap: .3em; padding-top: .2em; }
#stickers { gap: .1em; }
#tray-sticker.talk #stickers, #tray-sticker:not(.talk) #phrases { display: none; }
.tool { color: var(--text); }
.tool .ic { width: 1.7em; height: 1.7em; margin: 1.15em 0; }
.tool.on { background: var(--accent); }
#app.rot .tray { touch-action: pan-x pan-y; }

/* ---- 点人、被打招呼、人浪 ---- */
#person { position: absolute; z-index: 5; display: none; width: 15.5em; padding: .6em; }
#person.show { display: block; }
#person-close { position: absolute; right: .2em; top: .2em; }
.who-line { display: flex; align-items: center; margin-bottom: .35em; }
.who-line canvas { width: 4.4em; height: 4.4em; margin-right: .5em; border-radius: .6em; background: rgba(255, 255, 255, .06); }
.who-line b, .who-line span { display: block; }
.who-line span { font-size: .8em; color: var(--muted); }
#person-actions { display: flex; flex-wrap: wrap; gap: .3em; }
#person-actions .chip { flex: 1 0 auto; }
#poked { position: absolute; z-index: 6; display: none; left: 50%; bottom: calc(var(--sb) + 5em); transform: translateX(-50%); align-items: center; padding: .4em .8em .4em .4em; white-space: nowrap; }
#poked.show { display: flex; animation: rise .3s ease-out; }
#poked canvas { width: 4.4em; height: 4.4em; margin-right: .5em; }
#poked b { display: block; margin: 0 0 .3em .2em; font-size: .94em; }
.poked-actions { display: flex; gap: .3em; }
#wave { position: absolute; z-index: 6; display: none; left: 50%; top: var(--below, 4.2em); transform: translateX(-50%); align-items: center; padding: .45em .9em .45em .6em; white-space: nowrap; }
#wave.show { display: flex; }
#wave-count { width: 1.6em; font-size: 2.1em; font-weight: 900; color: var(--gold); text-align: center; margin-right: .25em; }
#wave b { display: block; margin-bottom: .25em; font-size: .86em; }

/* ---- 自拍 ---- */
#selfie-ui { position: absolute; z-index: 4; display: none; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
#app.selfie #selfie-ui { display: block; }
#app.selfie #top, #app.selfie .drop, #app.selfie #dock, #app.selfie #wave { display: none; }
.selfie-top { position: absolute; left: calc(var(--sl) + .8em); right: calc(var(--sr) + .8em); top: calc(var(--st) + .6em); display: flex; justify-content: space-between; align-items: center; gap: .8em; }
.selfie-top span { font-size: .82em; padding: .3em .9em; border-radius: 2em; background: rgba(15, 4, 8, .6); animation: gone .6s ease 3.5s forwards; }
@keyframes gone { to { opacity: 0; visibility: hidden; } }
.selfie-top button { pointer-events: auto; background: var(--panel); }
.selfie-bottom { position: absolute; left: calc(var(--sl) + .8em); right: calc(var(--sr) + .8em); bottom: calc(var(--sb) + .6em); display: flex; align-items: center; gap: .7em; }
#selfie-poses { flex: 1; min-width: 0; display: flex; gap: .3em; overflow-x: auto; touch-action: pan-x pan-y; pointer-events: auto; scrollbar-width: none; }
#selfie-poses .chip, #selfie-face, #selfie-back { flex: none; background: var(--panel); pointer-events: auto; }
#app.behind #gl { z-index: 1; }
#app.behind #stage3d { z-index: 0; }
#app.behind #led { display: none; }
#selfie-poses .chip.on { background: var(--accent); }
#selfie-flip { flex: none; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.4em; height: 3.4em; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); }
#selfie-flip em { font-size: .64em; }
#selfie-shot { flex: none; pointer-events: auto; width: 4.6em; height: 4.6em; border-radius: 50%; background: #fff; border: .3em solid #fff; box-shadow: 0 0 0 .22em rgba(255, 255, 255, .45), inset 0 0 0 .16em #2c070c; }
#selfie-shot:active { transform: scale(.92); }
#flash { position: absolute; z-index: 9; left: 0; top: 0; width: 100%; height: 100%; background: #fff; opacity: 0; pointer-events: none; }
#flash.go { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }

#live-ask { position: absolute; z-index: 3; display: none; left: 50%; bottom: calc(var(--sb) + 4.6em); transform: translateX(-50%); padding: .45em 1.3em; border-radius: 2em; background: var(--accent); font-size: .9em; font-weight: 800; white-space: nowrap; box-shadow: 0 .3em 1em rgba(0, 0, 0, .4); }
#app.in #live-ask.show { display: block; }
#app.player-touch #screen, #app.player-touch #screen * { pointer-events: auto !important; }
#app.player-touch #live-ask { top: calc(var(--st) + 3.2em); bottom: auto; }
#app.player-touch.big #toast { top: calc(var(--st) + 6.4em); }
#channels .operate { margin-top: .5em; align-self: flex-start; }
#app.big #live-ask { z-index: 6; }
#app.selfie #live-ask, #app.admin #live-ask { display: none; }

/* 有新版本：弹出来让用户自己点，点了才换。放在下方，别挡大屏 */
#update { position: absolute; z-index: 10; display: none; left: 50%; bottom: calc(var(--sb) + 5em); transform: translateX(-50%); width: 24em; max-width: 92%; padding: .8em 1em .75em; text-align: center; background: var(--panel-solid); border-color: var(--line-hi); }
#update.show { display: block; animation: rise .3s ease-out; }
#update b { font-size: 1.1em; font-weight: 900; color: var(--gold-hi); }
#update p { margin: .3em 0 .6em; font-size: .84em; line-height: 1.5; }
.update-actions { display: flex; justify-content: center; gap: .5em; }
#update-go { padding: .35em 1.8em; }
#update-pill { position: absolute; z-index: 7; display: none; left: 50%; top: calc(var(--st) + 3.3em); transform: translateX(-50%); padding: .35em 1em; border-radius: 2em; background: var(--accent); font-size: .84em; white-space: nowrap; }
#update-pill.show { display: block; }

/* ---- 弹层 ---- */
.sheet { position: absolute; z-index: 8; display: none; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 26em; max-width: 94%; max-height: 94%; overflow-y: auto; padding: .7em .95em 1em; background: var(--panel-solid); border: 1px solid var(--line-hi); border-radius: 1em; box-shadow: 0 0 0 100em rgba(8, 2, 4, .45), 0 1em 3em rgba(0, 0, 0, .5); touch-action: pan-x pan-y; }
.sheet.show { display: block; }
.sheet header { display: flex; align-items: center; gap: .6em; margin-bottom: .4em; }
.sheet h2 { flex: 1; font-size: 1.1em; font-weight: 900; color: var(--gold-hi); }
.sheet h3 { font-size: .8em; color: var(--muted); font-weight: 600; margin: .8em 0 .2em; }
.sheet p { margin: .5em 0; font-size: .9em; }
.sheet p.note { font-size: .76em; }
.row { display: block; width: 100%; text-align: left; margin: .3em 0; padding: .5em .75em; border-radius: .6em; border: 1px solid var(--line); color: inherit; text-decoration: none; position: relative; }
.row b { font-size: .9em; font-weight: 600; }
.row span { display: block; font-size: .74em; color: var(--muted); }
.row.on { border-color: var(--accent); background: rgba(239, 100, 21, .2); }
.row.link::after { content: "打开"; position: absolute; right: .8em; top: 50%; transform: translateY(-50%); font-size: .8em; color: var(--accent-hi); }
.row.link b { display: block; padding-right: 2.6em; }
#sheet-photo { width: 38em; text-align: center; }
#photo { display: block; width: 100%; max-height: 18em; object-fit: contain; border-radius: .6em; -webkit-user-select: auto; user-select: auto; -webkit-touch-callout: default; }

/* 选座 */
#sheet-seat { width: 62em; height: 94%; padding-bottom: .5em; }
#sheet-seat.show { display: flex; flex-direction: column; }
.seat-body { flex: 1; min-height: 0; display: flex; gap: .8em; }
.seat-map { flex: 0 0 42%; min-width: 0; display: flex; flex-direction: column; }
#seat-map { flex: 1; min-height: 0; width: 100%; cursor: pointer; }
.seat-map p, .seat-pick p { text-align: center; margin: .2em 0 0; }
.seat-pick { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stage-mark { align-self: center; width: 60%; text-align: center; font-size: .72em; color: var(--gold); border-bottom: .25em solid var(--gold); border-radius: .2em; }
#seat-grid-wrap { flex: 1; min-height: 0; overflow: auto; margin-top: .45em; touch-action: pan-x pan-y; }
#seat-grid { display: flex; flex-direction: column; align-items: center; width: max-content; min-width: 100%; gap: .3em; }
.seat-row { position: relative; display: flex; gap: .25em; padding-left: 3em; padding-right: 3em; }
.seat-row > span { position: absolute; left: .2em; top: 50%; transform: translateY(-50%); font-size: .68em; color: var(--muted); white-space: nowrap; }
.seat { flex: none; width: 2.1em; height: 2.1em; border-radius: .55em .55em .3em .3em; background: rgba(255, 255, 255, .11); font-size: .86em; color: var(--muted); }
.seat:hover:not(:disabled) { background: rgba(240, 196, 106, .35); color: #fff; }
.seat.taken { opacity: 1; box-shadow: inset 0 0 0 .14em rgba(0, 0, 0, .35); }
.seat.me { background: var(--accent); color: #fff; font-weight: 800; }

/* ---- 进场页 ---- */
#join { position: absolute; z-index: 4; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none;
  background: linear-gradient(270deg, rgba(18, 5, 9, .88) 0, rgba(18, 5, 9, .6) 30%, rgba(18, 5, 9, 0) 56%), linear-gradient(180deg, rgba(18, 5, 9, .7) 0, rgba(18, 5, 9, 0) 26%); }
#app.in #join { display: none; }
.join-head { position: absolute; left: calc(var(--sl) + 1.2em); top: calc(var(--st) + .8em); display: flex; align-items: center; gap: .7em; }
.join-head img { width: 3.1em; height: 3.3em; object-fit: contain; }
.join-head h1 { font-size: 2.1em; font-weight: 900; letter-spacing: .1em; line-height: 1.15; background: linear-gradient(180deg, #fff3d6, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .06em .2em rgba(0, 0, 0, .6)); }
.join-head p { font-size: .84em; color: var(--text); text-shadow: 0 1px 4px #000; }
#join-schedule { position: absolute; left: calc(var(--sl) + 1.2em); bottom: calc(var(--sb) + 2.3em); display: flex; flex-direction: column; font-size: .86em; text-shadow: 0 1px 4px #000; }
#join-schedule span { font-size: .86em; color: var(--gold-hi); }
#join-schedule b { font-weight: 800; }
.join-panel { position: absolute; pointer-events: auto; right: calc(var(--sr) + 1.2em); top: 50%; transform: translateY(-50%); width: 23em; max-width: 46%; max-height: 94%; display: flex; flex-direction: column; gap: .6em; padding: .9em 1em 1em; }
.join-name { display: flex; align-items: center; justify-content: space-between; gap: .6em; }
.join-name span { display: block; font-size: .7em; color: var(--muted); }
.join-name b { display: block; font-size: 1.35em; font-weight: 900; white-space: nowrap; }
#join-tabs { display: flex; gap: .2em; padding: .18em; border-radius: 2em; background: rgba(255, 255, 255, .06); }
#join-tabs button { flex: 1; min-height: 2.2em; border-radius: 2em; font-size: .86em; color: var(--muted); }
#join-tabs button.on { background: var(--text); color: var(--ink); font-weight: 800; }
#join-options { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .4em; height: 7.4em; overflow-y: auto; touch-action: pan-x pan-y; }
.swatch { width: 2.5em; height: 2.5em; border-radius: 50%; border: .16em solid rgba(255, 255, 255, .14); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 .16em var(--accent); }
#join-options .chip i { width: .7em; height: .7em; border-radius: 50%; }
#enter { flex: none; height: 2.8em; border-radius: 2em; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: #fff; font-size: 1.15em; font-weight: 900; letter-spacing: .3em; text-indent: .3em; box-shadow: 0 .4em 1.2em rgba(239, 100, 21, .4); }
#enter:active { transform: scale(.98); }
.join-credit { position: absolute; left: calc(var(--sl) + 1.2em); bottom: calc(var(--sb) + .6em); font-size: .74em; color: var(--muted); letter-spacing: .06em; }

/* ---- 管理员观战 ---- */
#app.admin #join, #app.admin .drop, #app.admin #dock, #app.admin #tools, #app.admin #notice-more, #app.admin #led, #app.admin #update { display: none; }
#admin-login { position: absolute; z-index: 9; display: none; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 24em; max-width: 92%; padding: 1em 1.2em; text-align: center; background: var(--panel-solid); }
#admin-login.show { display: block; }
#admin-login b { font-size: 1.15em; color: var(--gold-hi); }
#admin-login p { margin: .5em 0; font-size: .84em; }
#admin-key, #adm-notice, #adm-room { width: 100%; padding: .45em .7em; border-radius: .6em; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, .35); -webkit-user-select: text; user-select: text; }
#admin-key { margin-bottom: .6em; text-align: center; }
#admin { position: absolute; z-index: 5; display: none; flex-direction: column; right: calc(var(--sr) + .5em); top: calc(var(--st) + 3.3em); bottom: calc(var(--sb) + .5em); width: 21em; max-width: 46%; padding: .55em .7em; }
#admin.show { display: flex; }
#admin.fold { bottom: auto; }
#admin.fold .adm-body { display: none; }
#admin header { display: flex; align-items: center; gap: .35em; }
#admin header b { flex: 1; color: var(--gold-hi); }
.adm-body { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-x pan-y; padding-right: .2em; }
.adm-body h3 { margin: .8em 0 .3em; font-size: .78em; color: var(--muted); }
.adm-line { display: flex; flex-wrap: wrap; align-items: center; gap: .35em; margin-top: .35em; }
#adm-notice { resize: vertical; }
#adm-room option { color: #000; }
#adm-sections { display: flex; flex-wrap: wrap; gap: .25em; margin-top: .35em; }
#adm-sections .chip { min-height: 1.9em; padding: .1em .55em; font-size: .76em; color: var(--muted); }
#adm-sections .chip.has { color: var(--text); border-color: var(--line-hi); }
#adm-sections .chip.on { color: #fff; }
#adm-people { max-height: 13em; overflow-y: auto; }
.adm-row { display: flex; align-items: center; gap: .5em; width: 100%; min-height: 2.1em; padding: .1em .4em; border-radius: .5em; text-align: left; font-size: .84em; }
.adm-row i { flex: none; width: .8em; height: .8em; border-radius: 50%; }
.adm-row b { font-weight: 700; white-space: nowrap; }
.adm-row span { flex: 1; min-width: 0; text-align: right; font-size: .84em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-row.on { background: rgba(239, 100, 21, .3); }
#adm-log { font-size: .76em; color: var(--muted); }
#adm-ch { display: flex; flex-direction: column; gap: .4em; }
.adm-ch { border: 1px solid var(--line-hi); border-radius: .6em; padding: .4em .45em; }
.adm-ch.off { opacity: .55; }
.adm-ch-top { display: flex; align-items: center; gap: .3em; }
.adm-ch input[type=text] { width: 100%; min-width: 0; padding: .3em .55em; border-radius: .5em; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, .35); font-size: .82em; -webkit-user-select: text; user-select: text; }
.adm-ch-top input[type=text] { flex: 1; font-weight: 700; }
.adm-ch .addr { margin-top: .3em; }
.adm-ch .note { margin: .3em 0 0; }
.adm-ch .chip { flex: none; min-height: 1.9em; padding: .1em .55em; font-size: .74em; }

/* ---- 鼠标视角 ---- */
#cross, #keys { display: none; position: absolute; pointer-events: none; left: 50%; z-index: 4; }
#cross { top: 50%; width: .55em; height: .55em; margin: -.275em 0 0 -.275em; border-radius: 50%; background: rgba(255, 246, 233, .9); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
#cross.hit { width: 1.2em; height: 1.2em; margin: -.6em 0 0 -.6em; background: none; border: .18em solid var(--accent); }
#keys { bottom: calc(var(--sb) + 5.2em); transform: translateX(-50%); padding: .25em .9em; border-radius: 2em; background: var(--panel); font-size: .76em; white-space: nowrap; }
#app.locked #cross, #app.locked #keys { display: block; }
#app.locked #keys { animation: gone .6s ease 4.5s forwards; }
#app.locked #gl { cursor: none; }

#toast { position: absolute; z-index: 9; left: 50%; top: var(--below, 4.2em); transform: translateX(-50%); width: max-content; max-width: 90%; padding: .45em 1.1em; border-radius: 2em; background: var(--panel); border: 1px solid var(--line-hi); font-size: .86em; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
#app.big #toast, #app.big #wave, #app.selfie #toast, #app.admin #toast { top: calc(var(--st) + 3.3em); }
#toast.show { opacity: 1; }

/* 线上关掉的功能（data/live.json 的 off） */
#app.off-gesture #tab-gesture, #app.off-sticker.off-phrase #tab-sticker, #app.off-sticker #face-tab, #app.off-phrase #talk-tab, #app.off-stick #btn-stick, #app.off-wave #btn-wave, #app.off-wave #wave,
#app.off-poke #person, #app.off-poke #poked, #app.off-vote #match, #app.off-vote #notice-more, #app.off-photo #btn-selfie,
#app.off-invite #btn-invite, #app.off-seat #btn-seat, #app.off-cheer #btn-cheer { display: none; }
#nogl { display: none; position: absolute; left: 1em; right: 1em; top: 40%; text-align: center; z-index: 9; }
#app.nogl #nogl { display: block; }
#app.nogl #join { display: none; }

/* 矮屏（手机横屏）收紧一点 */
@media (max-height: 460px), (max-width: 460px) {
  #app .join-panel { gap: .45em; padding: .65em .8em .75em; }
  #app #join-options { height: 6.4em; }
  #app .swatch { width: 2.25em; height: 2.25em; }
}
