/* 揪你活動 通用版示範平台 — 樣式
   品牌權杖與畫面語言沿用 deliverables/event-system-intro（通用版簡報）：
   珊瑚橘 #FF6A4D／藍紫 #4D5BFF／奶油黃 #FFE89A／暖米白 #FFF8EC／深炭紫 #29273A；粗圓字、圓角、交疊、無漸層、少陰影。 */
:root {
  --coral: #ff6a4d; --coral-deep: #e4533a; --coral-soft: #ffe3dc;
  --blue: #4d5bff; --blue-deep: #3744d6; --blue-soft: #e4e7ff;
  --yellow: #ffe89a; --yellow-soft: #fff4cc;
  --ivory: #fff8ec; --ivory-2: #fbf0dc;
  --dark: #29273a; --ink: #29273a; --ink-2: #5d5a70; --muted: #8a879b;
  --line: #efe4cf; --line-strong: #dccfb3; --green: #06c755; --ok: #1f8a5b;
  --round: "Huninn", "Noto Sans TC", sans-serif;
  --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --pz: 1;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ivory); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
img { max-width: none; }
.ic { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.125em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.center { text-align: center; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ═════════ 示範工具列 ═════════ */
.demobar { position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 20px; padding: 0 24px;
  background: rgba(255, 248, 236, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 2px solid var(--line); }
.db-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.db-brand img { height: 30px; width: auto; display: block; }
.db-brand span { font: 700 13px var(--body); letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: var(--dark); color: #fff; }
.db-views { display: flex; gap: 4px; background: var(--ivory-2); padding: 4px; border-radius: 999px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.db-views a { display: flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 15px; white-space: nowrap; min-height: 40px; }
.db-views a svg { width: 18px; height: 18px; }
.db-views a:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.db-views a.on { background: var(--dark); color: #fff; }
.db-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.db-sim { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line-strong); cursor: pointer; min-height: 40px; background: #fff; }
.db-sim input { accent-color: var(--coral); width: 16px; height: 16px; margin: 0; }
.db-sim:has(input:checked) { border-color: var(--coral); background: var(--coral-soft); color: var(--coral-deep); }
.db-btn { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line-strong); background: #fff; min-height: 40px; }
.db-btn svg { width: 16px; height: 16px; }
.db-btn:hover, .db-sim:hover { border-color: var(--dark); }
@media (max-width: 1100px) { .db-views a span { display: none; } .db-views a { padding: 8px 12px; } }
@media (max-width: 640px) {
  .demobar { gap: 6px; padding: 0 8px; }
  .db-brand img { height: 22px; }
  .db-brand span, .db-btn span, .db-sim { display: none; }
  .db-views a { padding: 8px 10px; }
  .db-btn { padding: 8px 10px; }
}

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 80; background: var(--dark); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 共用標題語言（簡報 .label／h2 em） */
.label { display: flex; align-items: center; gap: 10px; font: 700 14px var(--body); letter-spacing: .1em; color: var(--blue); }
.label i { font-style: normal; display: inline-grid; place-items: center; min-width: 40px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--blue); color: #fff; font: 500 13px var(--mono); letter-spacing: .04em; }
h1, h2 { margin: 0; font-weight: 900; letter-spacing: -.01em; text-wrap: balance; }
h1 em, h2 em { font-style: normal; color: var(--coral); }

/* ═════════ 總覽 ═════════ */
.ov { padding: 26px 32px 56px; max-width: 1880px; margin: 0 auto; }
.ov-hd { display: flex; gap: 40px; justify-content: space-between; align-items: flex-start; }
.ov-hd > div { max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.ov-hd h1 { font-size: clamp(28px, 3vw, 44px); line-height: 1.15; }
.ov-hd p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.ov-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 6px 14px; }
.ov-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 10px 6px 6px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.ov-steps li > span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 500 12px var(--mono); border: 2px solid var(--line-strong); color: var(--muted); background: #fff; }
.ov-steps li > span svg { width: 13px; height: 13px; }
.ov-steps b { display: block; font-weight: 700; }
.ov-steps small { color: var(--muted); }
.ov-steps li.done { opacity: .55; }
.ov-steps li.done > span { background: var(--ok); border-color: var(--ok); color: #fff; }
.ov-steps li.next { background: #fff; box-shadow: 0 0 0 2px var(--coral); }
.ov-steps li.next > span { background: var(--coral); border-color: var(--coral); color: #fff; }
.ov-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: start; margin-top: 26px; }
.ov-grid > .cell { position: sticky; top: 84px; }
.ov-mid { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.cell { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.ov-mid .cell { align-items: stretch; }
.cell figcaption { text-align: center; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.cell figcaption b { display: block; font-size: 16px; color: var(--ink); font-weight: 900; }
@media (max-width: 1320px) {
  .ov-grid { grid-template-columns: auto auto; justify-content: center; }
  .ov-mid { grid-column: 1 / -1; order: 3; }
  .ov-grid > .cell { position: static; }
}
@media (max-width: 900px) {
  .ov { padding: 18px 14px 40px; }
  .ov-hd { flex-direction: column; gap: 18px; }
  .ov-steps { grid-template-columns: 1fr; }
  .ov-grid { grid-template-columns: 1fr; }
}

/* 裝置外框 */
.phone { zoom: var(--pz); width: 408px; height: 862px; border-radius: 46px; padding: 9px; background: var(--dark); flex: none; box-shadow: 0 18px 40px rgba(41, 39, 58, .16); }
.phone > .scr { width: 390px; height: 844px; border-radius: 37px; overflow: hidden; position: relative; background: #fff; }
.tv { border-radius: 16px; padding: 10px; background: var(--dark); box-shadow: 0 18px 40px rgba(41, 39, 58, .14); }
.tv > .bs-fit { border-radius: 7px; }
.bs-fit { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; position: relative; background: #1c1a28; }
.desk { border-radius: 14px; overflow: hidden; background: #fff; border: 2px solid var(--dark); container-type: inline-size; box-shadow: 0 18px 40px rgba(41, 39, 58, .1); }
.desk::before { content: ""; display: block; height: 24px; background-color: var(--dark); background-image: radial-gradient(circle at 16px 12px, var(--coral) 5px, transparent 6px), radial-gradient(circle at 34px 12px, var(--yellow) 5px, transparent 6px), radial-gradient(circle at 52px 12px, var(--blue) 5px, transparent 6px); }
.desk #v-console { height: 720px; }

/* 單一畫面頁 */
.solo-phone { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; gap: 64px; padding: 24px; }
.solo-side { max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.solo-side h2 { font-size: 40px; line-height: 1.2; }
.feat { list-style: none; margin: 0; padding: 0; }
.feat li { padding: 13px 0 13px 30px; border-top: 2px solid var(--line); position: relative; font-size: 16px; font-weight: 700; line-height: 1.45; }
.feat li:last-child { border-bottom: 2px solid var(--line); }
.feat li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--coral); }
.feat li:nth-child(even)::before { border-color: var(--blue); }
.solo-side p { margin: 0; font-size: 14px; }
@media (max-width: 900px) { .solo-side { display: none; } }
@media (max-width: 520px) {
  body[data-route="guest"] .solo-phone, body[data-route="staff"] .solo-phone { padding: 0; min-height: 0; display: block; }
  body[data-route="guest"] .cell, body[data-route="staff"] .cell { display: block; }
  body[data-route="guest"] .cell figcaption, body[data-route="staff"] .cell figcaption { display: none; }
  body[data-route="guest"] .phone, body[data-route="staff"] .phone { zoom: 1; width: 100%; height: calc(100dvh - 64px); border-radius: 0; padding: 0; box-shadow: none; }
  body[data-route="guest"] .phone > .scr, body[data-route="staff"] .phone > .scr { width: 100%; height: 100%; border-radius: 0; }
}
.solo-screen { height: calc(100vh - 64px); background: #1c1a28; position: relative; }
.solo-screen .bs-fit { aspect-ratio: auto; width: 100%; height: 100%; display: grid; place-items: center; }
.fs-btn { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; background: rgba(41, 39, 58, .85); color: #fff; font-weight: 700; font-size: 14px; opacity: .35; transition: opacity .2s; }
.fs-btn:hover, .fs-btn:focus-visible { opacity: 1; }
.fs-btn svg { width: 18px; height: 18px; }
:fullscreen .demobar { display: none; }
:fullscreen .solo-screen { height: 100vh; }
.solo-console { padding: 20px; max-width: 1500px; margin: 0 auto; }
.solo-console #v-console { height: calc(100vh - 64px - 40px); min-height: 640px; border-radius: 18px; overflow: hidden; border: 2px solid var(--line); container-type: inline-size; }

/* ═════════ 手機介面（原生 390×844） ═════════ */
.ui { width: 100%; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--body); display: flex; flex-direction: column; overflow: hidden; font-size: 15px; position: relative;
  --bg: var(--ivory); --fg: var(--ink); --c1: var(--coral); --c2: var(--blue); --c3: var(--yellow); --cardbg: #fff; --cardline: var(--line); --soft: var(--ink-2); --dk: var(--dark); --navbg: #fff; }
.th-night { --bg: #141833; --fg: #f4ead0; --c1: #f2b84b; --c2: #7f8cff; --c3: #f2b84b; --cardbg: #1e2347; --cardline: #2c3360; --soft: #a9b0d6; --dk: #0b0e22; --navbg: #1a1f40; }
.th-red { --bg: #fbf3e4; --c1: #b4232a; --c2: #c58d2c; --c3: #f1c76a; --cardline: #ecdcbc; --dk: #4a1517; }
.th-jade { --bg: #f3f1e8; --c1: #2e6b5e; --c2: #c09a52; --c3: #e8d6a6; --cardline: #e1dccb; --dk: #1f3b35; }
.ui .sb { height: 44px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 28px; font: 700 15px var(--body); position: relative; z-index: 6; }
.ui .sb.dk { color: #fff; }
.ui .sb-r { display: flex; align-items: flex-end; gap: 2px; }
.ui .sb-r i { width: 4px; border-radius: 1px; background: currentColor; }
.ui .sb-r i:nth-child(1) { height: 6px; } .ui .sb-r i:nth-child(2) { height: 9px; } .ui .sb-r i:nth-child(3) { height: 12px; }
.ui .sb-r b { font-size: 12px; margin-left: 5px; }
.ui .scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; scrollbar-width: none; }
.ui .scroll::-webkit-scrollbar { display: none; }
.ui .scroll.flush { overflow: hidden; display: flex; flex-direction: column; }
.ui .main { display: flex; flex-direction: column; gap: 12px; padding: 10px 16px 20px; position: relative; z-index: 2; }
.ui .card { background: var(--cardbg); border: 2px solid var(--cardline); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.ui .ttl { font-weight: 900; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ui .ttl small { font-weight: 700; font-size: 13px; color: var(--soft); }
.ui .ttl.pad { padding: 6px 4px 0; }
.ui .muted { color: var(--soft); font-size: 13px; line-height: 1.55; margin: 0; }
.ui .btn { flex: none; min-height: 52px; border-radius: 999px; background: var(--c1); color: #fff; font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 2.5px solid transparent; padding: 0 18px; text-align: center; transition: transform .12s; }
.ui .btn:active:not(:disabled) { transform: translateY(2px); }
.ui .btn .ic { width: 22px; height: 22px; }
.ui .btn.line { background: var(--green); }
.th-night .btn:not(.ghost):not(.line):not(.yel) { color: #141833; }
.ui .btn.blue { background: var(--c2); }
.ui .btn.yel { background: var(--yellow); color: var(--ink); border-color: var(--dark); box-shadow: 0 5px 0 var(--dark); }
.ui .btn.ghost { background: var(--cardbg); color: var(--fg); border-color: var(--fg); }
.ui .btn.sm { min-height: 36px; font-size: 14px; padding: 0 14px; }
.ui .btn.sm .ic { width: 16px; height: 16px; }
.ui .btn:disabled { opacity: .45; }
.ui .pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; background: var(--yellow); color: var(--ink); white-space: nowrap; }
.ui .pill .ic { width: 14px; height: 14px; }
.ui .pill.d { background: var(--dk); color: #fff; }
.ui .pill.team { background: var(--tc); color: var(--tf); }
.ui .avi { border-radius: 50%; display: block; object-fit: cover; flex: none; background: var(--ivory-2); }
.ui .avi.ini, .bs .avi.ini, .adm .avi.ini { display: grid; place-items: center; font-weight: 900; font-family: var(--round); }
.ui .avi.ring { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tc); }
.ui .row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 2px dashed var(--cardline); font-size: 14px; }
.ui .card > .row:nth-child(2), .ui .ttl + .row { border-top: 0; }
.ui .row > div { display: flex; flex-direction: column; min-width: 0; }
.ui .row b { font-size: 15px; }
.ui .row b.mono { font-size: 14px; color: var(--c1); width: 48px; }
.ui .row .r { margin-left: auto; font-weight: 900; color: var(--c1); white-space: nowrap; font-size: 13px; }
.ui .row .btn { margin-left: auto; }
.ui .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.ui .tick .ic { width: 15px; height: 15px; }
.ui .tick.no { background: transparent; border: 2.5px solid var(--line-strong); }

/* 登入 */
.ui .hero1 { flex: none; min-height: 340px; margin-top: -44px; padding: 76px 22px 24px; background: var(--c1); color: #fff; position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; }
.th-night .hero1 { color: #141833; }
.ui .hero1 > * { position: relative; z-index: 2; }
.ui .hero1 .hero-motif { position: absolute; width: 190px; right: -40px; top: 40px; opacity: .35; z-index: 1; }
.ui .hero1 .k { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .22); font: 900 13px var(--body); letter-spacing: .08em; }
.ui .hero1 .h { font-family: var(--round); -webkit-text-stroke: 1.6px currentColor; font-size: 54px; line-height: 1.05; max-width: 250px; word-break: keep-all; }
.ui .hero1 .d { display: flex; gap: 8px; flex-wrap: wrap; max-width: 250px; }
.ui .hero1 .d span { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 13px; font-weight: 900; }
.ui .hero1 .masc { position: absolute; right: 2px; bottom: -6px; width: 140px; z-index: 3; }
.ui .langsw { position: absolute; top: 52px; right: 16px; z-index: 7; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 900; border: 2px solid var(--dark); }
.ui .langsw .ic { width: 16px; height: 16px; }
.ui .fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--soft); }
.ui .fld input { height: 48px; border-radius: 14px; border: 2px solid var(--cardline); padding: 0 14px; font-size: 16px; background: var(--bg); color: var(--fg); font-weight: 700; }

/* 首頁 */
.ui .ghead { display: flex; align-items: center; gap: 12px; padding: 6px 18px 12px; position: relative; z-index: 3; }
.ui .ghead > div { display: flex; flex-direction: column; min-width: 0; }
.ui .ghead small { font-size: 12px; font-weight: 700; color: var(--soft); }
.ui .ghead b { font-size: 21px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui .ghead .pill { margin-left: auto; }
.ui .stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ui .stat3.two { grid-template-columns: 1fr 1fr; }
.ui .stat3 > div { border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 2px; color: #fff; }
.th-night .ui .stat3 > div, .th-night.ui .stat3 > div { color: #141833; }
.ui .stat3 > div.y { background: var(--yellow); color: var(--ink); border: 2px solid var(--dark); }
.ui .stat3 b { font-family: var(--round); -webkit-text-stroke: 1px currentColor; font-size: 32px; line-height: 1.05; }
.ui .stat3 b i { font-style: normal; font-size: 16px; -webkit-text-stroke: 0; opacity: .7; }
.ui .stat3 small { font-size: 12px; font-weight: 700; opacity: .9; }
.ui .steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ui .steps4 button { display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 900; text-align: center; color: var(--fg); }
.ui .steps4 b { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; }
.ui .steps4 b.y { background: var(--yellow); color: var(--ink); border: 2px solid var(--dark); }
.ui .steps4 b .ic { width: 26px; height: 26px; }
.ui .livecard { background: var(--c2); color: #fff; border-color: var(--dark); box-shadow: 0 5px 0 var(--dark); text-align: left; align-items: flex-start; }
.ui .livecard b { font-size: 18px; line-height: 1.35; }
.ui .livecard .btn { background: var(--yellow); color: var(--ink); }
.ui .win { flex-direction: row; align-items: center; background: var(--yellow); border-color: var(--dark); color: var(--ink); box-shadow: 0 5px 0 var(--dark); }
.ui .win img { width: 82px; flex: none; }
.ui .win > div { display: flex; flex-direction: column; gap: 2px; }
.ui .win b { font-size: 19px; font-weight: 900; color: var(--coral-deep); }
.ui .win span { font-weight: 900; }
.ui .win small { font-size: 12px; color: var(--ink-2); }
.ui .bonusbar, .ui .livebar { flex: none; display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 14px; font-weight: 900; position: relative; z-index: 5; }
.ui .bonusbar { background: var(--yellow); color: var(--ink); border-top: 2px solid var(--dark); border-bottom: 2px solid var(--dark); }
.ui .bonusbar span { margin-left: auto; font-family: var(--mono); font-weight: 500; }
.ui .livebar { background: var(--c2); color: #fff; width: 100%; text-align: left; animation: pulse 1.6s ease-in-out infinite; }
.ui .livebar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui .livebar b { padding: 4px 12px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 13px; }
.ui .bonusbar .ic, .ui .livebar .ic { width: 18px; height: 18px; }
@keyframes pulse { 50% { filter: brightness(1.12); } }

/* 護照 */
.ui .prog { height: 12px; border-radius: 6px; background: var(--ivory-2); overflow: hidden; }
.th-night .prog { background: #2c3360; }
.ui .prog i { display: block; height: 100%; background: var(--c1); border-radius: 6px; transition: width .4s; }
.ui .stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ui .stp { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 900; text-align: center; color: var(--fg); }
.ui .stp img { width: 86px; height: 86px; object-fit: contain; }
.ui .stp.no i { width: 86px; height: 86px; border-radius: 50%; border: 3px dashed var(--line-strong); display: grid; place-items: center; font-style: normal; font-family: var(--round); font-size: 32px; color: #cdbf9f; transition: border-color .15s, color .15s; }
.ui .stp.no:hover i { border-color: var(--c1); color: var(--c1); }
.ui .stp span { color: var(--soft); }
@keyframes stampIn { from { transform: scale(1.6) rotate(-12deg); opacity: 0; } }
.ui .demo-tip { margin: 0; font-size: 12px; font-weight: 700; color: var(--c2); background: var(--blue-soft); border-radius: 12px; padding: 8px 12px; }
.th-night .demo-tip { background: #2c3360; }

/* 掃描／相機 */
.ui .cam { flex: 1; position: relative; background: #2a2838; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.ui .cam.full { position: absolute; inset: 0; z-index: 8; padding-top: 44px; }
.ui .cam-hd { display: flex; align-items: center; gap: 12px; padding: 6px 16px; color: #fff; font-size: 17px; position: relative; z-index: 3; }
.ui .cam-hd .bk { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; color: #fff; }
.ui .cam-hd .bk .ic { width: 20px; height: 20px; }
.ui .scanbox { position: absolute; left: 50%; top: 30%; width: 220px; height: 220px; transform: translate(-50%, -50%); }
.ui .cam.full .scanbox { top: 36%; }
.ui .scanbox.sm { width: 170px; height: 170px; top: 22%; }
.ui .scanbox > i { position: absolute; width: 46px; height: 46px; border: 7px solid var(--yellow); z-index: 2; }
.ui .scanbox > i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 20px 0 0 0; }
.ui .scanbox > i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 20px 0 0; }
.ui .scanbox > i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 20px; }
.ui .scanbox > i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 20px 0; }
.ui .scanbox .tgt { position: absolute; inset: 34px; border-radius: 14px; background: #fff; display: grid; place-items: center; transform: rotate(-6deg); }
.ui .scanbox .tgt .qr { width: 80%; height: auto; }
.ui .scanbox .ln { position: absolute; left: 14px; right: 14px; top: 20%; height: 4px; border-radius: 2px; background: var(--coral); z-index: 3; box-shadow: 0 0 0 4px rgba(255, 106, 77, .25); animation: scanln 2.2s ease-in-out infinite alternate; }
@keyframes scanln { to { top: 78%; } }
.ui .modes { position: relative; z-index: 3; display: flex; justify-content: center; gap: 6px; padding: 10px 0; }
.ui .modes button { padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 900; background: rgba(255, 255, 255, .14); color: #fff; min-height: 36px; }
.ui .modes button.on { background: var(--yellow); color: var(--ink); }
.ui .cam > .sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--cardbg); color: var(--fg); border-radius: 28px 28px 0 0; padding: 20px 18px 22px; display: flex; flex-direction: column; gap: 12px; z-index: 4; }
.ui .stlist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ui .stlist button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--cardline); background: var(--bg); font-weight: 900; font-size: 14px; color: var(--fg); min-height: 48px; }
.ui .stlist button:hover { border-color: var(--c1); }
.ui .stlist i { font-style: normal; font: 500 12px var(--mono); color: var(--c2); }
.ui .stlist em { margin-left: auto; font-style: normal; color: var(--c1); font-size: 13px; }
.ui .cam.ar { background: #1c1a28; }
.ui .ar-ph { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 40px 200px; }
.ui .ar-ph .ph { width: 100%; max-width: 280px; }
.ui .frames { display: flex; gap: 6px; }
.ui .frames button { flex: 1; padding: 9px 0; border-radius: 999px; border: 2px solid var(--cardline); font-weight: 900; font-size: 13px; text-align: center; min-height: 40px; color: var(--fg); }
.ui .frames button.on { background: var(--dk); color: #fff; border-color: var(--dk); }
.ui .ar-btns { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.ui .ar-btns .btn { font-size: 15px; cursor: pointer; }

/* 照片＋AR 相框（手機與大螢幕共用） */
.ph { position: relative; aspect-ratio: 4 / 5; background: var(--pbg); overflow: hidden; }
.ph-in { position: absolute; inset: 0; display: grid; place-items: end center; }
.ph-in img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.f0 { border-radius: 22px; border: 8px solid var(--coral); }
.ph.f0 .ph-tag { position: absolute; left: 10px; top: 12px; padding: 5px 12px; border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 900; font-size: 15px; border: 2.5px solid var(--dark); box-shadow: 3px 3px 0 var(--dark); transform: rotate(-6deg); font-family: var(--body); }
.ph.f0 .ph-dots { position: absolute; right: -16px; bottom: -10px; width: 90px; opacity: .9; }
.ph.f1 { border-radius: 26px; border: 8px solid var(--yellow); box-shadow: inset 0 0 0 3px var(--dark); }
.ph.f1 .ph-masc { position: absolute; right: -8px; bottom: -8px; width: 42%; }
.ph.f1 .ph-star { position: absolute; left: 12px; top: 10px; color: var(--yellow); font-size: 34px; filter: drop-shadow(2px 2px 0 var(--dark)); }
.ph.f2 { background: #fff; padding: 10px 10px 44px; border-radius: 6px; }
.ph.f2 .ph-in { inset: 10px 10px 44px; background: var(--pbg); }
.ph.f2 .ph-cap { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-family: var(--round); font-size: 16px; color: var(--ink); -webkit-text-stroke: .4px currentColor; }

/* 互動 */
.ui .live .qcard .q { font-size: 21px; line-height: 1.4; font-weight: 900; }
.ui .cd { font: 500 16px var(--mono); padding: 4px 12px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-deep); }
.ui .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ui .opt { min-height: 132px; border-radius: 24px; color: #fff; font-weight: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 12px 8px; position: relative; border: 3px solid var(--dark); box-shadow: 0 6px 0 var(--dark); transition: transform .12s, opacity .2s; }
.ui .opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--dark); }
.ui .opt .ic { width: 36px; height: 36px; }
.ui .opt .l { font-family: var(--round); font-size: 28px; -webkit-text-stroke: 1px currentColor; line-height: 1; }
.ui .opt small { font-size: 14px; line-height: 1.3; }
.ui .opt.sel { outline: 5px solid var(--yellow); outline-offset: 3px; }
.ui .opt.dim { opacity: .4; }
.ui .opt.right { opacity: 1; outline: 5px solid var(--ok); outline-offset: 3px; }
.o1 { background: var(--coral); } .o2 { background: var(--blue); } .o3 { background: #f2c94c; color: var(--ink) !important; } .o4 { background: var(--dark); }
.ui .res { text-align: center; font-weight: 900; font-size: 16px; padding: 14px; border-radius: 18px; background: var(--cardbg); border: 2px solid var(--cardline); display: flex; justify-content: center; gap: 8px; align-items: center; }
.ui .res.ok { background: #dff4e8; color: var(--ok); border-color: #bfe6cf; }
.ui .res.no { background: var(--coral-soft); color: var(--coral-deep); border-color: #ffc9bb; }
.ui .res .ic { width: 20px; height: 20px; }
.ui .empty { align-items: center; text-align: center; padding: 28px 20px; }
.ui .empty img { width: 130px; }

/* 票券 */
.ui .lot { flex-direction: row; align-items: center; justify-content: space-between; background: var(--c2); color: #fff; border-color: var(--dark); }
.ui .lot > div { display: flex; flex-direction: column; gap: 2px; }
.ui .lot small { font-weight: 900; font-size: 13px; opacity: .9; }
.ui .lot .big { font-family: var(--round); -webkit-text-stroke: 1.5px currentColor; font-size: 52px; line-height: 1; }
.ui .lot .muted { color: rgba(255, 255, 255, .85); }
.ui .lot img { width: 96px; }
.ui .cpn { display: flex; border-radius: 22px; background: var(--cardbg); border: 2px solid var(--cardline); flex: none; position: relative; min-height: 92px; align-items: stretch; }
.ui .cpn .l { width: 84px; flex: none; display: grid; place-items: center; color: #fff; border-radius: 20px 0 0 20px; position: relative; }
.ui .cpn .l .ic { width: 36px; height: 36px; }
.ui .cpn .l::after { content: ""; position: absolute; right: -2px; top: 10px; bottom: 10px; border-right: 4px dotted var(--cardbg); }
.ui .cpn .rr { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; justify-content: center; min-width: 0; }
.ui .cpn .rr b { font-size: 17px; font-weight: 900; }
.ui .cpn .rr span { font-size: 12px; color: var(--soft); }
.ui .cpn .go { align-self: center; margin-right: 12px; }
.ui .cpn.used .l, .ui .cpn.used .rr, .ui .cpn.locked { opacity: .45; }
.used-st { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(-12deg); border: 3px solid var(--coral); color: var(--coral); border-radius: 12px; padding: 3px 10px; font-family: var(--round); font-size: 20px; background: rgba(255, 255, 255, .8); white-space: nowrap; }
.used-st.anim { animation: stampIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.used-st.big { right: 50%; transform: translate(50%, -50%) rotate(-12deg); font-size: 34px; padding: 6px 18px; border-width: 4px; }
.ui .vsheet .vqr { position: relative; padding: 12px; border-radius: 22px; border: 3px solid var(--dark); background: #fff; }
.ui .vsheet .vqr .qr { display: block; }
.ui .vsheet .vqr.used .qr { opacity: .25; }
.ui .vsheet .code { font-size: 22px; letter-spacing: .12em; }

/* 排行 */
.ui .seg { display: flex; background: var(--ivory-2); border-radius: 999px; padding: 4px; flex: none; }
.th-night .seg { background: #2c3360; }
.ui .seg button { flex: 1; text-align: center; padding: 8px 0; border-radius: 999px; font-weight: 900; font-size: 14px; color: var(--soft); min-height: 38px; }
.ui .seg button.on { background: var(--dk); color: #fff; }
.ui .podium { display: grid; grid-template-columns: 1fr 1.1fr 1fr; align-items: end; gap: 8px; padding-top: 6px; flex: none; }
.ui .podium > div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.ui .podium .avi { border: 4px solid #fff; box-shadow: 0 0 0 3px var(--dark); }
.ui .podium b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ui .podium .sc2 { font: 900 12px var(--body); color: var(--soft); }
.ui .podium .blk { width: 100%; border-radius: 18px 18px 0 0; display: grid; place-items: start center; padding-top: 8px; color: #fff; font-family: var(--round); -webkit-text-stroke: 1.2px #fff; font-size: 32px; border: 3px solid var(--dark); border-bottom: 0; }
.ui .lr { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 18px; background: var(--cardbg); border: 2px solid var(--cardline); font-size: 14px; font-weight: 700; flex: none; }
.ui .lr i { font-style: normal; font: 500 15px var(--mono); width: 22px; color: var(--muted); }
.ui .lr .r { margin-left: auto; font-weight: 900; }
.ui .lr.me { background: var(--c2); color: #fff; border-color: var(--dark); box-shadow: 0 4px 0 var(--dark); }
.ui .lr.me i { color: #c9ceff; }
.ui .tbar { display: grid; grid-template-columns: 20px 64px 1fr 48px; align-items: center; gap: 8px; padding: 10px 0; font-size: 14px; }
.ui .tbar.me b { color: var(--c1); }
.ui .tbar .bar { height: 18px; border-radius: 9px; background: var(--ivory-2); overflow: hidden; }
.ui .tbar .bar i { display: block; height: 100%; border-radius: 9px; transition: width .5s; }
.ui .tbar em { font-style: normal; font-weight: 900; text-align: right; }

/* 底部導覽 */
.ui .nav { flex: none; height: 80px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: var(--navbg); border-top: 2px solid var(--cardline); padding: 0 8px 14px; position: relative; z-index: 6; }
.ui .nav.three { grid-template-columns: repeat(3, 1fr); }
.ui .nav > button { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 900; color: var(--muted); min-height: 48px; align-content: end; }
.ui .nav > button .ic { width: 24px; height: 24px; }
.ui .nav > button.on { color: var(--c1); }
.ui .nav .fab { width: 62px; height: 62px; margin: -30px auto 0; border-radius: 50%; background: var(--c1); color: #fff; display: grid; place-items: center; border: 4px solid var(--navbg); box-shadow: 0 0 0 2px var(--cardline); align-self: start; }
.ui .nav .fab .ic { width: 28px; height: 28px; }
.ui .nav .fab.on { background: var(--dk); }

/* 底部彈出 */
.ui .sheet-wrap { position: absolute; inset: 0; z-index: 20; background: rgba(28, 26, 40, .5); display: flex; align-items: flex-end; }
.ui .sheet-wrap.anim { animation: fadeIn .2s; }
.ui .sheet-wrap.anim > .sheet { animation: sheetUp .3s cubic-bezier(.2, .9, .3, 1); }
.ui .sheet-wrap > .sheet { width: 100%; background: var(--cardbg); color: var(--fg); border-radius: 30px 30px 0 0; padding: 26px 22px 30px; display: flex; flex-direction: column; gap: 12px; }
.ui .sheet.center { align-items: center; text-align: center; }
.ui .sheet.center .btn { align-self: stretch; }
.ui .sheet-h { font-size: 24px; font-weight: 900; }
.ui .sheet-masc { width: 120px; margin-top: -80px; }
.ui .sheet-stamp { width: 120px; }
.ui .anim .sheet-stamp { animation: stampIn .45s .1s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.ui .hl { color: var(--c1); }
.ui .okc { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.ui .okc .ic { width: 32px; height: 32px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } }

/* 工作人員手機 */
.ui.staff { --bg: #201e2e; --fg: #f4f2fa; --cardbg: #2c2a3e; --cardline: #3c3953; --soft: #aaa6c0; --navbg: #26243a; --c1: var(--coral); --c2: var(--blue); }
.ui.staff .shead { display: flex; align-items: center; gap: 12px; padding: 4px 18px 12px; }
.ui.staff .shead > div { display: flex; flex-direction: column; }
.ui.staff .shead small { font-size: 12px; color: var(--soft); font-weight: 700; }
.ui.staff .shead b { font-size: 18px; }
.ui.staff .shead .pill { margin-left: auto; }
.ui.staff .staffcam { background: #15141f; }
.ui.staff .cam > .sheet { max-height: 62%; overflow-y: auto; }
.ui.staff .row { border-top-color: var(--cardline); }
.ui .codeform { display: flex; gap: 8px; }
.ui .codeform input, .ui .search { flex: 1; min-width: 0; height: 44px; border-radius: 14px; border: 2px solid var(--cardline); background: var(--bg); color: var(--fg); padding: 0 14px; font-size: 15px; font-family: var(--mono); }
.ui .search { flex: none; width: 100%; font-family: var(--body); }
.ui .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ui .chips button { padding: 8px 12px; border-radius: 999px; border: 2px solid var(--cardline); font-size: 13px; font-weight: 900; color: var(--soft); min-height: 38px; }
.ui .chips button.on { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.ui .stqr { align-items: center; }
.ui .stqr .qr { border-radius: 16px; border: 3px solid var(--yellow); }

/* ═════════ 大螢幕（原生 1600×900） ═════════ */
.bs { width: 1600px; height: 900px; flex: none; position: relative; overflow: hidden; font-family: var(--body);
  --bg: var(--ivory); --fg: var(--ink); --c1: var(--coral); --c2: var(--blue); --c3: var(--yellow); --cardbg: #fff; --cardline: var(--line); --soft: var(--ink-2); --dk: var(--dark);
  background: var(--bg); color: var(--fg); }
.bs.th-night { --bg: #141833; --fg: #f4ead0; --c1: #f2b84b; --c2: #7f8cff; --cardbg: #1e2347; --cardline: #2c3360; --soft: #a9b0d6; --dk: #0b0e22; }
.bs.th-red { --bg: #fbf3e4; --c1: #b4232a; --c2: #c58d2c; --cardline: #ecdcbc; --dk: #4a1517; }
.bs.th-jade { --bg: #f3f1e8; --c1: #2e6b5e; --c2: #c09a52; --cardline: #e1dccb; --dk: #1f3b35; }
.bs .avi { border-radius: 50%; object-fit: cover; flex: none; background: var(--ivory-2); }
.bs .big { font-family: var(--round); -webkit-text-stroke: 3px currentColor; line-height: 1; }
.bs-top { position: absolute; left: 56px; right: 56px; top: 40px; display: flex; align-items: center; gap: 22px; z-index: 5; }
.bs-logo { height: 56px; width: auto; }
.bs.th-night .bs-logo { background: #fff8ec; border-radius: 14px; padding: 6px 12px; }
.bs-ev { font-size: 26px; font-weight: 900; padding: 8px 20px; border-radius: 999px; background: var(--cardbg); border: 3px solid var(--cardline); }
.bs-bonus { display: flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 900; padding: 10px 26px; border-radius: 999px; background: var(--yellow); color: var(--ink); border: 4px solid var(--dark); box-shadow: 6px 6px 0 var(--dark); animation: wob 1.2s ease-in-out infinite; }
.bs-bonus .ic { width: 30px; height: 30px; }
.bs-bonus span { font-family: var(--mono); }
@keyframes wob { 50% { transform: rotate(-2deg) scale(1.03); } }
.bs-pill { display: inline-block; padding: 10px 24px; border-radius: 999px; background: var(--c2); color: #fff; font-size: 24px; font-weight: 900; letter-spacing: .06em; }
.bs h2 { font-size: 56px; line-height: 1.2; }
.bs-kick { font: 500 26px var(--mono); letter-spacing: .3em; color: var(--c2); }
.bs-toast { position: absolute; right: 56px; top: 30px; z-index: 6; display: flex; align-items: center; gap: 16px; padding: 12px 30px 12px 12px; border-radius: 999px; background: #fff; color: var(--ink); border: 4px solid var(--dark); box-shadow: 8px 8px 0 var(--dark); font-size: 28px; }
.bs-toast.anim { animation: toastIn .5s cubic-bezier(.3, 1.5, .5, 1); }
.bs-toast > .ic { width: 40px; height: 40px; margin-left: 12px; color: var(--coral); }
.bs-toast em { font-style: normal; padding: 4px 14px; border-radius: 999px; font-weight: 900; }
.bs-toast .avi { border-radius: 50%; }
@keyframes toastIn { from { transform: translateY(-140%) rotate(-4deg); } }

/* 歡迎＋報到人數 */
.bs-welcome { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; padding: 150px 56px 60px; gap: 40px; }
.bw-l { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.bw-l h1 { font-size: 130px; color: var(--c1); word-break: keep-all; }
.bw-l p { margin: 0; font-size: 28px; color: var(--soft); font-weight: 700; }
.bw-qr { display: flex; align-items: center; gap: 26px; margin-top: 14px; padding: 18px 30px 18px 18px; border-radius: 30px; background: var(--cardbg); border: 3px solid var(--cardline); align-self: flex-start; }
.bw-qr .qr { border-radius: 14px; }
.bw-qr div { display: flex; flex-direction: column; gap: 8px; }
.bw-qr b { font-size: 34px; font-weight: 900; }
.bw-qr span { font-size: 22px; color: var(--soft); line-height: 1.5; }
.bw-r { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 40px 50px; border-radius: 48px; background: var(--c2); color: #fff; }
.bw-motif { position: absolute; right: -60px; top: -70px; width: 300px; opacity: .25; }
.bw-count { display: flex; align-items: flex-end; gap: 20px; }
.bw-count .big { font-size: 220px; -webkit-text-stroke: 5px currentColor; }
.bw-count span { font-size: 40px; font-weight: 900; line-height: 1.2; padding-bottom: 26px; white-space: nowrap; }
.bw-count small { font: 500 34px var(--mono); opacity: .7; }
.bw-prog { height: 26px; border-radius: 13px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.bw-prog i { display: block; height: 100%; background: var(--yellow); border-radius: 13px; transition: width .6s; }
.bs .avs { display: flex; }
.bs .avs .avi { border: 6px solid var(--c2); margin-left: -22px; border-radius: 50%; background: var(--ivory-2); }
.bs .avs .avi:first-child { margin-left: 0; }
.bs .avs .avi.new { animation: popIn .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes popIn { from { transform: scale(0); } }
.bw-masc { position: absolute; right: 30px; bottom: -20px; width: 230px; }

/* 排行榜 */
.bs-rank { position: absolute; inset: 0; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; padding: 150px 56px 56px; }
.bs-rank h2 { font-size: 40px; margin-bottom: 20px; }
.br-teams, .br-top { background: var(--cardbg); border: 3px solid var(--cardline); border-radius: 40px; padding: 36px 40px; display: flex; flex-direction: column; }
.br-t { display: grid; grid-template-columns: 40px 140px 1fr 80px; gap: 18px; align-items: center; padding: 18px 0; font-size: 30px; }
.br-t .mono { font-size: 30px; color: var(--muted); }
.br-t b { font-weight: 900; }
.br-t small { font-size: 22px; color: var(--soft); text-align: right; }
.br-bar { height: 72px; border-radius: 22px; background: var(--ivory-2); overflow: hidden; }
.bs.th-night .br-bar { background: #2c3360; }
.br-bar i { display: flex; align-items: center; justify-content: flex-end; height: 100%; border-radius: 22px; transition: width .6s; padding-right: 20px; }
.br-bar em { font-style: normal; font-family: var(--round); font-size: 34px; -webkit-text-stroke: 1px currentColor; }
.br-p { display: flex; align-items: center; gap: 18px; padding: 10px 16px; border-radius: 22px; font-size: 26px; }
.br-p .mono { width: 36px; color: var(--muted); font-size: 26px; }
.br-p b { font-weight: 900; }
.br-p em { margin-left: auto; font-style: normal; font-family: var(--round); font-size: 34px; color: var(--c1); -webkit-text-stroke: .8px currentColor; }
.br-p:nth-of-type(1) { background: var(--yellow); color: var(--ink); }
.br-p.me { background: var(--c2); color: #fff; }
.br-p.me em { color: var(--yellow); }

/* 問答投票 */
.bs-live { position: absolute; inset: 0; padding: 140px 56px 56px; display: flex; flex-direction: column; gap: 30px; }
.bl-hd { display: grid; grid-template-columns: 1fr 230px; grid-template-rows: auto auto; gap: 14px 30px; align-items: start; }
.bl-hd .bs-pill { justify-self: start; }
.bl-hd h2 { grid-column: 1; font-size: 64px; }
.bl-cd { grid-column: 2; grid-row: 1 / 3; width: 220px; height: 220px; border-radius: 50%; background: var(--c1); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-size: 54px; border: 6px solid var(--dark); }
.bl-cd.off { background: var(--dk); font-family: var(--body); font-weight: 900; font-size: 50px; }
.bl-cd small { font: 700 20px var(--body); margin-top: 6px; opacity: .9; }
.bl-opts { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; min-height: 0; }
.bl-o { position: relative; border-radius: 36px; border: 5px solid var(--dark); box-shadow: 0 10px 0 var(--dark); overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; transition: opacity .3s; }
.bl-o.o3 { color: var(--ink); }
.bl-fill { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .28); transition: height .5s; }
.bl-tx { position: relative; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.bl-tx .ic { width: 56px; height: 56px; }
.bl-tx b { font-family: var(--round); font-size: 60px; -webkit-text-stroke: 2px currentColor; line-height: 1; }
.bl-tx span { font-size: 32px; font-weight: 900; line-height: 1.25; }
.bl-tx em { font-style: normal; font-family: var(--round); font-size: 56px; -webkit-text-stroke: 1.5px currentColor; }
.bl-o.dim { opacity: .3; }
.bl-o.right { outline: 10px solid var(--yellow); outline-offset: -5px; }
.bl-ok { position: absolute; top: 24px; right: 24px; display: flex; gap: 8px; align-items: center; background: var(--yellow); color: var(--ink); padding: 10px 20px; border-radius: 999px; font-size: 26px; font-weight: 900; border: 4px solid var(--dark); }
.bl-ok .ic { width: 28px; height: 28px; }

/* 抽獎 */
.bs-lot { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 440px; gap: 40px; padding: 140px 56px 56px; }
.bt-main { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.bt-main h2 { font-size: 64px; color: var(--c1); }
.slot { width: 720px; border-radius: 44px; background: var(--c2); border: 6px solid var(--dark); box-shadow: 12px 12px 0 var(--dark); padding: 18px 30px 30px; }
.slot-top { font: 500 26px var(--mono); letter-spacing: .4em; color: var(--yellow); margin-bottom: 14px; }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.reel { height: 170px; border-radius: 26px; background: #fff; border: 5px solid var(--dark); overflow: hidden; display: grid; place-items: center; color: var(--coral); }
.reel .rs { display: flex; flex-direction: column; align-items: center; }
.reel .rs .ic { width: 110px; height: 110px; flex: none; }
.reel .rs.spin { gap: 30px; animation: reel linear infinite; align-self: start; padding-top: 30px; }
.reel:nth-child(2) { color: var(--blue); } .reel:nth-child(3) { color: #f2b84b; }
@keyframes reel { to { transform: translateY(-50%); } }
.ticker { height: 92px; width: 720px; overflow: hidden; border-radius: 999px; background: var(--cardbg); border: 4px solid var(--dark); }
.tk-strip { display: flex; flex-direction: column; animation: reel .9s linear infinite; }
.tk-strip span { height: 84px; flex: none; display: grid; place-items: center; font-size: 40px; font-weight: 900; }
.winner { display: flex; align-items: center; gap: 26px; padding: 18px 44px 18px 18px; border-radius: 999px; background: var(--yellow); color: var(--ink); border: 5px solid var(--dark); box-shadow: 10px 10px 0 var(--dark); }
.winner.anim { animation: popIn .6s cubic-bezier(.3, 1.6, .5, 1); }
.winner .avi { border: 5px solid #fff; }
.winner div { display: flex; flex-direction: column; align-items: flex-start; }
.winner b { font-size: 60px; font-weight: 900; line-height: 1.1; }
.winner span { font-size: 24px; font-weight: 700; color: var(--ink-2); }
.bt-hint { font-size: 26px; color: var(--soft); margin: 0; max-width: 700px; line-height: 1.5; }
.bt-side { background: var(--cardbg); border: 3px solid var(--cardline); border-radius: 40px; padding: 34px; display: flex; flex-direction: column; gap: 14px; }
.bt-side h3 { margin: 0 0 4px; font-size: 32px; }
.bt-p { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px 0; border-top: 3px dashed var(--cardline); }
.bt-p b { font-size: 24px; }
.bt-p > span { font: 500 22px var(--mono); color: var(--muted); }
.bt-p div { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.bt-p em { font-style: normal; font-size: 20px; font-weight: 700; padding: 4px 14px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-deep); }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.confetti i { position: absolute; top: -30px; width: 16px; height: 26px; border-radius: 4px; animation: fall 2.6s ease-in forwards; }
@keyframes fall { to { top: 110%; transform: rotate(540deg); } }

/* 照片牆 */
.bs-photos { position: absolute; inset: 0; padding: 140px 56px 50px; display: flex; flex-direction: column; gap: 26px; }
.bp-hd { display: flex; align-items: baseline; gap: 24px; }
.bp-hd span { font-size: 24px; color: var(--soft); font-weight: 700; }
.bp-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 30px 40px; min-height: 0; }
.bp-it { position: relative; transform: rotate(var(--r)); display: flex; justify-content: center; min-height: 0; }
.bp-it .ph { height: 100%; aspect-ratio: 4 / 5; box-shadow: 8px 8px 0 rgba(41, 39, 58, .25); }
.bp-it .ph.f0 .ph-tag { font-size: 14px; }
.bp-by { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 4px 14px; border-radius: 999px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.bp-new { position: absolute; top: -12px; right: 6px; background: var(--coral); color: #fff; padding: 4px 14px; border-radius: 999px; font: 500 18px var(--mono); border: 3px solid var(--dark); }
.bp-it.new { animation: popIn .6s cubic-bezier(.3, 1.6, .5, 1); }

/* ═════════ 主控台 ═════════ */
.adm { height: 100%; display: grid; grid-template-columns: 216px minmax(0, 1fr); background: var(--ivory); color: var(--ink); font-family: var(--body); }
.adm-nav { background: var(--dark); color: #d9d6e6; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; overflow-y: auto; }
.adm-brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 10px 18px; }
.adm-brand img { width: 128px; background: var(--ivory); border-radius: 12px; padding: 6px 10px; }
.adm-brand small { font: 500 12px var(--mono); letter-spacing: .2em; color: #8a879b; }
.adm-nav button { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; min-height: 42px; text-align: left; }
.adm-nav button:hover { background: rgba(255, 255, 255, .08); }
.adm-nav button i { font-style: normal; font: 500 11px var(--mono); padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #b9b6c9; }
.adm-nav button.on { background: var(--coral); color: #fff; font-weight: 700; }
.adm-nav button.on i { background: rgba(255, 255, 255, .25); color: #fff; }
.adm-main { padding: 22px 26px 30px; display: flex; flex-direction: column; gap: 16px; min-width: 0; overflow-y: auto; }
.adm-hd { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.adm h4 { margin: 0; font-size: 24px; font-weight: 900; }
.adm h4 small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 12px; }
.adm .st { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.adm .st.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.adm .st .ic { width: 16px; height: 16px; }
.adm .st span { font-family: var(--mono); }
.adm .kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.adm .kpi > div { border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; color: #fff; }
.adm .kpi small { font-size: 13px; opacity: .9; font-weight: 700; }
.adm .kpi b { font-family: var(--round); -webkit-text-stroke: 1px currentColor; font-size: 38px; line-height: 1.1; }
.adm .kpi b i { font-style: normal; font-size: 18px; -webkit-text-stroke: 0; opacity: .7; }
.adm .kpi span { font-size: 12px; opacity: .8; }
.adm .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.adm .cols.stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.adm .pane { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.adm .pane > b { font-size: 17px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.adm .pane > b small { font-size: 13px; font-weight: 400; }
.adm .muted { font-size: 13px; line-height: 1.6; margin: 4px 0 0; }
.adm .sub-h { font-size: 15px; margin-top: 12px; }
.adm .ck { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 2px dashed var(--ivory-2); font-size: 15px; }
.adm .pane > b + .ck { border-top: 0; }
.adm .ck > span:not(.d):not(.tag):not(.see) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.adm .ck small { color: var(--muted); font-size: 12px; }
.adm .ck .d { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.adm .ck .d.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.adm .ck .d .ic { width: 13px; height: 13px; }
.adm .go { margin-left: auto; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: var(--coral); color: #fff; flex: none; min-height: 32px; }
.adm .go:disabled { background: var(--line-strong); }
.adm .see { margin-left: auto; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--line-strong); flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.adm .see .ic { width: 14px; height: 14px; }
.adm button.see:hover { border-color: var(--dark); }
.adm .tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; flex: none; white-space: nowrap; }
.adm .tag.quiz { background: var(--coral-soft); color: var(--coral-deep); }
.adm .tag.vote { background: var(--blue-soft); color: var(--blue-deep); }
.adm .feed .lg { display: flex; gap: 12px; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--ivory-2); line-height: 1.5; }
.adm .feed .lg .mono { color: var(--muted); flex: none; }
.adm .feed .lg.k-ci .mono { color: var(--ok); }
.adm .feed .lg.k-live .mono, .adm .feed .lg.k-draw .mono { color: var(--coral); }
.adm .feed .lg.k-v .mono, .adm .feed .lg.k-st .mono { color: var(--blue); }
.adm .ctl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adm .ctl button { height: 76px; border-radius: 16px; background: var(--ivory); border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 900; font-size: 14px; text-align: center; transition: transform .1s; }
.adm .ctl button .ic { width: 24px; height: 24px; color: var(--coral); }
.adm .ctl button:hover { border-color: var(--dark); }
.adm .ctl button.on { background: var(--blue); color: #fff; border-color: var(--dark); box-shadow: 0 4px 0 var(--dark); }
.adm .ctl button.on .ic { color: var(--yellow); }
.adm .qa { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm .qa button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--dark); color: #fff; font-weight: 700; font-size: 14px; min-height: 40px; }
.adm .qa button .ic { width: 16px; height: 16px; color: var(--yellow); }
.adm .qa button.pri, .adm .pri { background: var(--coral); color: #fff; border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 14px; min-height: 40px; }
.adm .pill-live { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--yellow); font-weight: 900; font-size: 14px; border: 2px solid var(--dark); }
.adm .pill-live .ic { width: 16px; height: 16px; }
.adm .link { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; color: var(--blue); font-size: 14px; }
.adm .link .ic { width: 18px; height: 18px; }
.adm .bs-fit { border-radius: 12px; border: 3px solid var(--dark); }
.adm .live-now { border-color: var(--blue); }
.adm .live-now .q { font-size: 19px; font-weight: 900; margin-bottom: 4px; }
.adm .vb { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 64px; gap: 12px; align-items: center; padding: 7px 0; font-size: 14px; }
.adm .vb > span { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.adm .vb > span small { color: var(--muted); font-size: 12px; width: 100%; }
.adm .vb.big > span { font-weight: 900; font-size: 15px; }
.adm .vb .ic { width: 18px; height: 18px; color: var(--coral); }
.adm .vb .bar { height: 14px; border-radius: 7px; background: var(--ivory-2); overflow: hidden; }
.adm .vb .bar i { display: block; height: 100%; border-radius: 7px; transition: width .4s; }
.adm .vb em { font-style: normal; font-weight: 900; text-align: right; font-family: var(--mono); font-size: 13px; }
.adm .stp-i { width: 28px; height: 28px; }
.adm .prz { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); font-weight: 700; margin-bottom: 4px; min-height: 48px; }
.adm .prz em { font-style: normal; font: 500 13px var(--mono); color: var(--muted); }
.adm .prz.on { border-color: var(--dark); background: var(--yellow); }
.adm .bigbtn { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 18px; font-weight: 900; border: 3px solid var(--dark); box-shadow: 0 5px 0 var(--dark); transition: transform .1s; }
.adm .bigbtn .ic { width: 22px; height: 22px; }
.adm .bigbtn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--dark); }
.adm .bigbtn:disabled { background: var(--line-strong); box-shadow: none; border-color: var(--line-strong); }
.adm .tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.adm .search { flex: 1; min-width: 160px; height: 40px; border-radius: 12px; border: 2px solid var(--line); padding: 0 14px; font-size: 14px; background: var(--ivory); }
.adm .segs { display: flex; background: var(--ivory-2); border-radius: 999px; padding: 3px; }
.adm .segs button { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink-2); min-height: 34px; }
.adm .segs button.on { background: var(--dark); color: #fff; }
.adm .tbl-wrap { overflow-x: auto; }
.adm .tbl { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.adm .tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--line); }
.adm .tbl td { padding: 7px 10px; border-bottom: 1px solid var(--ivory-2); }
.adm .tbl .n { text-align: right; font-family: var(--mono); }
.adm .tbl tr.me td { background: var(--blue-soft); }
.adm .tbl .who { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.adm .tbl .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.adm .tbl small { font-size: 12px; }
.adm .avi { border-radius: 50%; object-fit: cover; flex: none; background: var(--ivory-2); }
.adm .pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.adm .pager .muted { margin: 0 auto 0 0; }
.adm .pager button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.adm .pager button .ic { width: 16px; height: 16px; }
.adm .pager button.nx .ic { transform: rotate(180deg); }
.adm .pager button:disabled { opacity: .35; }
.adm .themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.adm .th { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; border: 2px solid var(--line); text-align: left; }
.adm .th.on { border-color: var(--dark); box-shadow: 0 4px 0 var(--dark); }
.adm .th .sw { display: flex; height: 40px; border-radius: 10px; overflow: hidden; margin-bottom: 4px; }
.adm .th .sw i { flex: 1; }
.adm .th small { font-size: 12px; color: var(--muted); }
.adm .codeform { display: flex; gap: 8px; }
.adm .codeform input { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 2px solid var(--line); padding: 0 14px; font-size: 16px; font-weight: 700; }
@container (max-width: 860px) {
  .adm { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .adm-nav { flex-direction: row; overflow-x: auto; padding: 10px; gap: 4px; align-items: center; }
  .adm-brand { padding: 0 8px 0 4px; flex: none; }
  .adm-brand img { width: 96px; }
  .adm-brand small { display: none; }
  .adm-nav button { flex: none; white-space: nowrap; }
  .adm-main { padding: 16px; }
  .adm .cols, .adm .cols.stage { grid-template-columns: 1fr; }
  .adm .kpi { grid-template-columns: 1fr 1fr; }
  .adm .themes { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reel .rs.spin, .tk-strip { animation: none !important; }
}
