/* ==========================================================================
   EvoSub Arena — 官網大翻新雛型（電競化上字幕比賽）
   2026-09-11 第二版：整份重做成「數據報表」的樣子，不是卡片牆。

   使用者：「整個網站看起來都很 AI slop」「不要他媽的給我用圓角外框分隔」。
   這一版的規矩（完整研究見 memory: ai-slop-ui-research-2026-09-11）：
     - **分隔靠字級、留白、對齊與 1px 細線**，不靠一個一個圓角框。沒有卡片、沒有卡中卡。
     - 圓角最多 2px（按鈕／輸入框）。沒有漸層、沒有發光、沒有毛玻璃、沒有背景網格。
     - 不用 emoji 當圖示；頭像是上傳的圖，沒有圖就用名字第一個字。
     - 不用「全大寫＋字距拉開」的小標（eyebrow）；中文小標就是 12px 粗體。
     - 一個強調色，只用在「可以按」與「目前選中」。勝負用字，不靠整片底色。
     - 文字對比：次要文字也要 ≥ 7:1，最淡的註解 ≥ 4.5:1（他罵過很多次字太淡）。
     - 數字一律等寬數字（tabular-nums），表格右對齊。
   ⚠️ 站上規矩：不准用系統原生下拉／alert／confirm；捲軸一律自定義。
   ========================================================================== */

:root {
    --bg:       #0C0D0F;
    --bg-2:     #15171A;   /* 列 hover／選中、輸入框底 */
    --bg-3:     #1C1F23;
    --rule:     rgba(255, 255, 255, 0.10);
    --rule-2:   rgba(255, 255, 255, 0.24);

    --text:     #F2F2F2;   /* 18:1 */
    --text-2:   #C4C7CC;   /* 11:1 */
    --text-3:   #8E939B;   /* 6.2:1 */

    --accent:   #4D8FF7;
    --accent-2: #3A7BE6;
    --live:     #F0564A;
    --win:      #45BE86;
    --loss:     #F0746A;

    /* 全站同一組字體（2026-09-11 設計系統 v2）：商標／標題 IBM Plex Serif＋Noto Serif TC，內文 Inter＋Noto Sans TC */
    --serif: 'IBM Plex Serif', 'Noto Serif TC', Georgia, serif;
    --sans:  'Inter', 'Noto Sans TC', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono:  'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

    --container: 1180px;
    --r: 2px;
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --dur: 160ms;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: var(--sans); font-size: 15px; line-height: 1.65;
    -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
button { font-family: inherit; }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* ===== 自製捲軸 ===== */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border: 3px solid transparent; background-clip: padding-box; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.32); background-clip: padding-box; }

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 24px; }

/* ===== 導覽列：一條底線，沒有毛玻璃 ===== */
.nav { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--rule); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; cursor: pointer; }
.ds-brand-mark { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.brand .brand-sub { font-weight: 400; color: var(--text-2); margin-left: 6px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav-link { font-size: 14px; color: var(--text-2); cursor: pointer; padding: 17px 0 15px; border-bottom: 2px solid transparent; transition: color var(--dur) var(--ease); }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); border-bottom-color: var(--text); }
.nav-cta { font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
.nav-cta:hover { color: #7AAEFF; }

/* ===== 按鈕 ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
    font-size: 14px; font-weight: 600; border-radius: var(--r); cursor: pointer;
    border: 1px solid var(--rule-2); background: transparent; color: var(--text);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { background: var(--bg-2); border-color: rgba(255, 255, 255, 0.4); }
.btn:active { background: var(--bg-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.text { border: 0; padding: 0; height: auto; color: var(--text-2); font-weight: 500; }
.btn.text:hover { background: none; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== 自製下拉 ===== */
.dd { position: relative; display: inline-block; }
.dd-btn {
    display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; width: 100%;
    justify-content: space-between; font-size: 13.5px; color: var(--text); cursor: pointer;
    border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--bg-2);
}
.dd-btn:hover { border-color: rgba(255, 255, 255, 0.4); }
.dd-btn .caret { width: 7px; height: 7px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--dur) var(--ease); }
.dd.open .dd-btn .caret { transform: rotate(-135deg) translate(-2px, -2px); }
.dd-menu {
    position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; z-index: 50; display: none;
    background: var(--bg-2); border: 1px solid var(--rule-2); border-radius: var(--r); padding: 4px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); max-height: 300px; overflow-y: auto;
}
.dd.open .dd-menu { display: block; }
.dd-menu.right { left: auto; right: 0; }
.dd-item { padding: 7px 12px; font-size: 13.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.dd-item:hover { background: var(--bg-3); color: var(--text); }
.dd-item.sel { color: var(--text); font-weight: 600; }
.dd-item.sel::before { content: '✓'; margin-right: 8px; color: var(--accent); }

/* ===== 區塊：上面一條粗一點的線＋標題（報紙／年報的作法） ===== */
.section { padding-block: 40px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--rule-2); padding-top: 14px; margin-bottom: 18px; }
.sec-head h2 { font-size: 19px; font-weight: 700; }
.sec-head .sub { color: var(--text-3); font-size: 13.5px; }
.sec-head .spacer { flex: 1; }

/* ===== 首頁 ===== */
.hero { padding-block: 72px 36px; }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(64px, 12vw, 150px); line-height: 0.95; letter-spacing: -0.03em; }
.hero-note { margin: 22px 0 0; max-width: 560px; color: var(--text-2); font-size: 15.5px; }
.figs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 44px 0 0; border-top: 1px solid var(--rule); }
.fig { padding: 16px 20px 4px 0; }
.fig + .fig { padding-left: 20px; border-left: 1px solid var(--rule); }
.fig dd { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.fig dd small { font-size: 15px; color: var(--text-3); font-weight: 400; margin-left: 3px; }
.fig dt { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* 直播／下一場：一整條，不是卡片 */
.liveband { display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; margin-top: 36px; padding-block: 16px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.liveband .state { font-size: 13px; font-weight: 700; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; }
.liveband .state.on { color: var(--live); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.liveband .t { font-size: 17px; font-weight: 600; }
.liveband .meta { color: var(--text-2); font-size: 13.5px; }
.liveband .cd { font-family: var(--mono); font-size: 15px; color: var(--text); }
.liveband .go { margin-left: auto; display: flex; gap: 10px; }

/* ===== 表格（成績牆、排行榜、賽事成績共用） ===== */
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-3); padding: 0 12px 10px 0; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.tbl td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule); color: var(--text-2); vertical-align: middle; }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.strong { color: var(--text); font-weight: 600; }
.tbl tbody tr.row { cursor: pointer; transition: background var(--dur) var(--ease); }
.tbl tbody tr.row:hover { background: var(--bg-2); }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th.sorted { color: var(--text); }
.tbl .arrow { margin-left: 4px; }
.tbl .mono { font-family: var(--mono); font-size: 12.5px; }
.res-win { color: var(--win); font-weight: 600; }
.res-loss { color: var(--loss); font-weight: 600; }
.muted { color: var(--text-3); }

/* 準確率小長條：只當數字旁邊的輔助，不當主角 */
.acc { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.acc-bar { width: 72px; height: 4px; background: rgba(255, 255, 255, 0.10); flex: none; }
.acc-bar i { display: block; height: 100%; background: var(--text-2); }

/* 選手名 */
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who .n { color: var(--text); font-weight: 600; }
.who .h { color: var(--text-3); font-size: 12.5px; }
.ava { width: 32px; height: 32px; flex: none; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; overflow: hidden; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.lg { width: 72px; height: 72px; font-size: 30px; }
.ava.base { background: var(--bg-3); color: var(--text-2); }

/* ===== 排行榜：點一列，就在那一列底下展開（跟 FAQ 一樣） ===== */
.tbl tr.row.sel { background: var(--bg-2); }
.tbl tr.row.sel td { border-bottom-color: transparent; }
.tbl tr.row.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tbl tr.row .chev { display: inline-block; width: 7px; height: 7px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(-45deg); transition: transform var(--dur) var(--ease); }
.tbl tr.row.sel .chev { transform: rotate(45deg); border-color: var(--text); }
.tbl tr.detail td { padding: 0; border-bottom: 1px solid var(--rule); background: var(--bg-2); }
.tbl tr.detail:not(.open) td { border-bottom: 0; }
.fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms var(--ease); }
.fold > div { overflow: hidden; }
tr.detail.open .fold { grid-template-rows: 1fr; }
#lbTable th:first-child, #lbTable td:first-child { padding-left: 14px; }
.pdetail { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; padding: 4px 16px 22px 101px; }
.pdetail .persona { color: var(--text-2); margin: 0; }
.pdetail .taunt { margin: 10px 0 0; font-family: var(--serif); font-size: 17px; color: var(--text); }
.links { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.links a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(77, 143, 247, 0.45); }
.links a:hover { text-decoration-color: currentColor; }
.links .ty { color: var(--text-3); margin-right: 6px; }
.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* ===== 行事曆 ===== */
.cal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-month { font-size: 22px; font-weight: 700; min-width: 150px; font-variant-numeric: tabular-nums; }
.cal-arrow { width: 32px; height: 32px; border: 1px solid var(--rule-2); border-radius: var(--r); background: transparent; color: var(--text-2); cursor: pointer; font-size: 16px; }
.cal-arrow:hover { background: var(--bg-2); color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--rule-2); border-left: 1px solid var(--rule); }
.cal-dow { padding: 8px 10px; font-size: 12.5px; font-weight: 600; color: var(--text-3); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cal-cell { min-height: 108px; padding: 8px 10px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cal-cell.other .cal-num { color: var(--text-3); opacity: 0.45; }
.cal-num { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-num { color: #fff; background: var(--accent); padding: 1px 6px; border-radius: var(--r); font-weight: 700; }
.cal-ev { display: block; width: 100%; margin-top: 6px; padding: 0; text-align: left; background: none; border: 0; cursor: pointer; font-size: 12.5px; line-height: 1.4; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px; background: var(--text-3); }
.cal-ev.live::before { background: var(--live); }
.cal-ev.upcoming::before { background: var(--accent); }
.cal-ev.done { color: var(--text-2); }
.cal-ev:hover { text-decoration: underline; text-underline-offset: 3px; }
.cal-ev .t { color: var(--text-3); margin-right: 5px; font-variant-numeric: tabular-nums; }
.cal-legend { display: flex; gap: 20px; margin-top: 12px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.cal-legend i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 1px; }

/* ===== 賽事詳情 ===== */
.back-link { font-size: 13.5px; color: var(--text-2); cursor: pointer; background: none; border: 0; padding: 0; margin-bottom: 18px; }
.back-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.match-head { padding-bottom: 22px; }
.match-head .state { font-size: 13px; font-weight: 700; color: var(--text-3); display: inline-flex; gap: 8px; align-items: center; }
.match-head .state.on { color: var(--live); }
.match-head h1 { font-family: var(--serif); font-size: clamp(30px, 4.6vw, 46px); font-weight: 900; margin-top: 8px; letter-spacing: -0.02em; }
.match-sub { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.match-sub span + span::before { content: '·'; margin: 0 9px; color: var(--text-3); }
.match-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 48px; }
.stream { aspect-ratio: 16 / 9; background: #050506; border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13.5px; text-align: center; padding: 0 20px; }
.note { font-size: 13px; color: var(--text-3); margin: 10px 0 0; }
.recap { font-family: var(--serif); font-size: 17px; line-height: 1.7; color: var(--text); margin: 16px 0 0; }

/* 檔案難度：三條，數值帶單位，細線是歷來場次的中位數 */
.metric { display: grid; grid-template-columns: 76px 1fr 88px; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.metric .lab { color: var(--text-2); }
.metric .v { text-align: right; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.metric .v small { color: var(--text-3); font-weight: 400; margin-left: 2px; }
.mtrack { position: relative; height: 6px; background: rgba(255, 255, 255, 0.08); }
.mtrack i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--text-2); }
.mtrack b { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--text); opacity: 0.55; }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 58px 1fr; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--text-2); }
.steps li span { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ===== 建立角色 ===== */
.gate { padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; font-size: 14px; color: var(--text-2); }
.gate b { color: var(--text); }
.join-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
.field { padding-block: 20px; border-bottom: 1px solid var(--rule); }
.field:first-child { padding-top: 0; }
.flabel { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.fcount { font-weight: 400; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fcount.over { color: var(--loss); }
.fhint { font-size: 13px; color: var(--text-3); margin: 0 0 10px; }
.finput, .ftextarea {
    width: 100%; font-size: 14.5px; color: var(--text); background: var(--bg-2);
    border: 1px solid var(--rule-2); border-radius: var(--r); padding: 9px 11px; outline: none;
    font-family: inherit; transition: border-color var(--dur) var(--ease);
}
.finput:focus, .ftextarea:focus { border-color: var(--accent); }
.finput::placeholder, .ftextarea::placeholder { color: #6B7078; }
.ftextarea { resize: vertical; min-height: 76px; line-height: 1.6; }
.igroup { display: flex; align-items: stretch; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--bg-2); transition: border-color var(--dur) var(--ease); }
.igroup:focus-within { border-color: var(--accent); }
.igroup .pre { padding: 0 2px 0 11px; display: flex; align-items: center; color: var(--text-2); font-size: 14.5px; }
.igroup .finput { border: 0; background: transparent; padding-left: 2px; }
.ava-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.swatches { display: flex; gap: 6px; margin-top: 10px; }
.sw { width: 22px; height: 22px; border-radius: var(--r); cursor: pointer; border: 0; outline: 2px solid transparent; outline-offset: 2px; }
.sw.sel { outline-color: var(--text); }
.link-rows { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: grid; grid-template-columns: 140px 1fr 32px; gap: 8px; align-items: center; }
.link-del { width: 32px; height: 32px; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 18px; }
.link-del:hover { color: var(--loss); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 22px; }
.sticky-side { position: sticky; top: 80px; }
.side-title { font-size: 13px; font-weight: 700; color: var(--text-3); margin-bottom: 12px; }
.preview { border-top: 1px solid var(--rule-2); padding-top: 18px; }
.preview .top { display: flex; gap: 14px; align-items: center; }
.preview .nm { font-size: 20px; font-weight: 700; }
.preview .hd { color: var(--text-3); font-size: 13px; }
.preview .persona { color: var(--text-2); margin: 14px 0 0; }
.preview .taunt { font-family: var(--serif); font-size: 17px; margin: 10px 0 0; }
.preview .empty { color: var(--text-3); }

/* ===== toast ===== */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-3); border: 1px solid var(--rule-2); border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; max-width: 340px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); animation: toastIn 200ms var(--ease); }
.toast.ok { border-color: rgba(69, 190, 134, 0.6); }
.toast.warn { border-color: rgba(240, 180, 60, 0.6); }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }

/* ===== 頁尾 ===== */
.foot { border-top: 1px solid var(--rule); padding-block: 28px 48px; margin-top: 40px; color: var(--text-3); font-size: 13px; }
.foot-inner { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a:hover { color: var(--text); }

/* ===== 窄螢幕 ===== */
@media (max-width: 960px) {
    .match-grid, .join-grid { grid-template-columns: 1fr; }
    .sticky-side { position: static; }
    .figs { grid-template-columns: repeat(2, 1fr); }
    .fig:nth-child(3) { padding-left: 0; border-left: 0; }
    .pdetail { grid-template-columns: 1fr; gap: 16px; padding-left: 14px; }
}
@media (max-width: 640px) {
    .wrap { padding-inline: 16px; }
    .hero { padding-block: 44px 24px; }
    .nav-links { gap: 16px; }
    .liveband .go { margin-left: 0; }
    .cal-cell { min-height: 72px; padding: 5px; }
    .cal-ev { font-size: 11px; }
    .cal-ev .t { display: none; }
    .link-row { grid-template-columns: 1fr 32px; }
    .link-row .dd { grid-column: 1 / -1; }
    .metric { grid-template-columns: 64px 1fr 76px; }
    .hide-sm { display: none; }
}

/* ===== 2026-09-11 第三輪：接上後端之後的新元件 ===== */
/* YouTube 直播：播放器＋聊天室（寬螢幕並排，窄螢幕上下） */
.yt { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; }
.yt-player { aspect-ratio: 16 / 9; background: #050506; border: 1px solid var(--rule); }
.yt-player iframe, .yt-chat iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-chat { border: 1px solid var(--rule); min-height: 320px; background: var(--bg-2); }
@media (max-width: 900px) { .yt { grid-template-columns: 1fr; } .yt-chat { height: 420px; } }
/* 作答頁 */
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .play-grid { grid-template-columns: 1fr; } }
.play-clock { font-family: var(--mono); font-size: 28px; font-weight: 500; margin-top: 10px; }
.play-clock.warn { color: var(--live); }
.play-text { width: 100%; min-height: 420px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; resize: vertical; }
/* 確認框（自製，不用原生 confirm） */
.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 440px; max-width: 100%; background: var(--bg-2); border: 1px solid var(--rule-2); border-radius: 4px; padding: 22px; box-shadow: 0 18px 48px rgba(0, 0, 0, .45); }
.modal h3 { margin: 0 0 8px; font-size: 16px; }
.modal p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.modal .actions { justify-content: flex-end; margin-top: 20px; }
.btn.danger { background: var(--live); border-color: var(--live); color: #fff; }
/* 管理 */
.admin-form { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule); max-width: 720px; }
.admin-form h3 { margin: 0 0 12px; font-size: 15px; }
.admin-match { border-top: 1px solid var(--rule); padding: 16px 0; }
.am-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.am-head .spacer, .sec-head .spacer { flex: 1; }
.am-players { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; font: inherit; font-size: 13px; border-radius: 3px; border: 1px solid var(--rule-2); background: transparent; color: var(--text-2); cursor: pointer; }
.chip.on { border-color: var(--accent); color: var(--text); background: rgba(77, 143, 247, .14); }
/* 公正性：封存清單原文 */
.fold-raw { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.fold-raw summary { cursor: pointer; }
.fold-raw pre { margin: 10px 0 0; padding: 10px; background: var(--bg-2); border: 1px solid var(--rule); overflow-x: auto; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; max-height: 260px; }
.tbl.sm td, .tbl.sm th { padding: 6px 10px; font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
/* 自製音檔播放器（不用原生 <audio controls>） */
.aplayer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ap-btn { height: 32px; min-width: 44px; padding: 0 10px; font: inherit; font-size: 13px; border: 1px solid var(--rule-2); border-radius: 3px; background: transparent; color: var(--text); cursor: pointer; }
.ap-btn:hover { background: var(--bg-2); }
.ap-play { min-width: 64px; background: var(--accent); border-color: var(--accent); color: #fff; }
.ap-bar { position: relative; flex: 1 1 200px; height: 18px; cursor: pointer; touch-action: none; }
.ap-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 4px; background: var(--bg-3); border-radius: 2px; }
.ap-fill { position: absolute; left: 0; top: 7px; height: 4px; background: var(--accent); border-radius: 2px; }
.ap-thumb { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); }
.ap-time { font-family: var(--mono); font-size: 13px; color: var(--text-2); min-width: 92px; text-align: right; }
.row2 { display: flex; gap: 8px; }
.row2 .finput { flex: 1; }
.seg2 { display: flex; gap: 6px; flex-wrap: wrap; }
.yt.solo { grid-template-columns: minmax(0, 960px); }
