/* /Components/AnnouncementPanel.razor.rz.scp.css */
/* ============================================================
   公告區面板（AnnouncementPanel.razor）
   原本這些規則在 Pages/TranslationManager.razor.css。Blazor 的 scoped CSS
   只作用在**同一個元件的標籤**上，所以標籤搬到元件裡，樣式也必須跟著搬 ——
   留在原處的話三個使用端都會變成沒有樣式。
   ============================================================ */

/* 佈局容器 - 2/3 預覽區 + 1/3 控制區 */
.hero-setup-row[b-wrkyxl9jrj] {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
    align-items: stretch;
}

.hero-left-column[b-wrkyxl9jrj] {
    flex: 0 0 66.66%;
    display: flex;
    flex-direction: column;
}

.hero-right-column[b-wrkyxl9jrj] {
    flex: 1;
    min-width: 0;
}

/* 窄螢幕改上下排（原本固定 66.66% 會把右側控制區壓到不能用） */
@media (max-width: 992px) {
    .hero-setup-row[b-wrkyxl9jrj] { flex-direction: column; }
    .hero-left-column[b-wrkyxl9jrj] { flex: 1 1 auto; }
}

.hero-preview-container[b-wrkyxl9jrj] {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 15px;
    border: 2px dashed #cbd5e1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-title[b-wrkyxl9jrj] {
    font-size: 1.1rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-preview-box[b-wrkyxl9jrj] {
    background: linear-gradient(135deg, #537D5D 0%, #43664c 100%);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 10px 25px rgba(83, 125, 93, 0.2);
    min-height: 160px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-preview-box[b-wrkyxl9jrj]::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* 入圍專區的 Banner 是藍色系（對應前台 Shortlist 頁），不是投票頁的綠色。
   原本這一段是寫在 razor 標籤的 inline style 裡，搬進元件時一併收攏到 CSS。 */
.shortlist-preview-box[b-wrkyxl9jrj] {
    background: linear-gradient(135deg, #245269 0%, #3D7E9A 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.p-hero-title[b-wrkyxl9jrj] {
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.3;
}

.p-hero-desc[b-wrkyxl9jrj] {
    font-size: clamp(1rem, 3.5vw, 1.8rem);
    opacity: 0.95;
    max-width: 900px;
    line-height: 1.5;
    margin: 0 auto;
    white-space: pre-line;
}

.p-hero-btn[b-wrkyxl9jrj] {
    margin-top: 1.5rem;
    padding: 10px 25px;
    background: white;
    color: #537D5D;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
    /* 這是預覽用的假按鈕，不該讓人以為點得動 */
    cursor: default;
    pointer-events: none;
}

.shortlist-preview-box .p-hero-btn[b-wrkyxl9jrj] {
    color: #3D7E9A;
}

/* 「預覽狀態」標籤 —— 這排按鈕不會發布任何東西，必須講清楚 */
.preview-controls-label[b-wrkyxl9jrj] {
    margin-top: 1.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}

.preview-controls-hint[b-wrkyxl9jrj] {
    font-weight: 400;
    color: #94a3b8;
}

.preview-controls[b-wrkyxl9jrj] {
    display: flex;
    gap: 8px;
    margin-top: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.p-control-btn[b-wrkyxl9jrj] {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
}

.p-control-btn.active[b-wrkyxl9jrj] {
    background: #537D5D;
    color: white;
    border-color: #537D5D;
}

/* 預覽語系切換按鈕 */
.p-lang-btn[b-wrkyxl9jrj] {
    min-width: 42px;
    height: 30px;
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    background: white;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0 8px;
}

.p-lang-btn:hover[b-wrkyxl9jrj] {
    border-color: #537D5D;
    background: #f0fdf4;
    color: #537D5D;
}

.p-lang-btn.active[b-wrkyxl9jrj] {
    background: #537D5D;
    border-color: #537D5D;
    color: white;
    box-shadow: 0 2px 8px rgba(83, 125, 93, 0.2);
}

/* ── 文案編輯（預覽下方）── */
.text-editor[b-wrkyxl9jrj] {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.text-editor-head[b-wrkyxl9jrj] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.text-editor-title[b-wrkyxl9jrj] {
    font-size: 0.95rem;
    font-weight: 800;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 「你正在編輯哪一段、哪一個語系」—— 這個編輯區一次只處理一組欄位，
   沒有這個標籤就會不確定改的是哪一個階段 */
.text-editor-scope[b-wrkyxl9jrj] {
    font-size: 0.75rem;
    font-weight: 700;
    color: #537D5D;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 2px 10px;
}

.text-editor-note[b-wrkyxl9jrj] {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
}

.unsaved-dot[b-wrkyxl9jrj] {
    font-size: 0.75rem;
    font-weight: 700;
    color: #d97706;
    white-space: nowrap;
}

.save-text-btn[b-wrkyxl9jrj] {
    background: #537D5D;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.save-text-btn:hover:not(:disabled)[b-wrkyxl9jrj] { background: #43664c; }
.save-text-btn:disabled[b-wrkyxl9jrj] { background: #cbd5e1; cursor: not-allowed; }

/* 編輯語系選擇（多選，最多 3 個）——沿用翻譯管理頁 .lang-chip 的視覺 */
.edit-lang-bar[b-wrkyxl9jrj] {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.edit-lang-label[b-wrkyxl9jrj] {
    font-size: 0.8rem;
    font-weight: 700;
    color: #537D5D;
    white-space: nowrap;
}

.edit-lang-chip[b-wrkyxl9jrj] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 目前在前台語系選單被隱藏的語系：仍然可以編輯，只是標示出來 */
.lang-hidden-mark[b-wrkyxl9jrj] {
    font-size: 0.6rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 4px;
    padding: 0 4px;
}

.edit-lang-chip.active .lang-hidden-mark[b-wrkyxl9jrj] {
    background: rgba(255, 255, 255, 0.28);
    color: white;
}

.edit-lang-chip:hover[b-wrkyxl9jrj] { border-color: #537D5D; color: #537D5D; background: #f0fdf4; }
.edit-lang-chip.active[b-wrkyxl9jrj] {
    background: #537D5D;
    color: white;
    border-color: #537D5D;
    box-shadow: 0 2px 8px rgba(83, 125, 93, 0.25);
}

.text-field[b-wrkyxl9jrj] {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.text-field label[b-wrkyxl9jrj] {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

/* 一個欄位 × N 個語系並排。欄數由 razor 以 inline style 指定
   （grid-template-columns 要跟著使用者選了幾個語系變動，寫死在 CSS 裡做不到）。 */
.text-field-cols[b-wrkyxl9jrj] {
    display: grid;
    gap: 8px;
}

.text-field-col[b-wrkyxl9jrj] {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.col-lang[b-wrkyxl9jrj] {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 語系欄位在窄螢幕改為上下排，否則三欄各剩不到 100px */
@media (max-width: 768px) {
    .text-field-cols[b-wrkyxl9jrj] { grid-template-columns: 1fr !important; }

    /* 預覽標題列：語系鈕與標題並排會把標題擠成直條，改上下兩行、標題在上。
       align-items 要 !important —— 元素上的 Bootstrap align-items-center 本身帶 !important。 */
    .preview-title[b-wrkyxl9jrj] { flex-direction: column; align-items: flex-start !important; gap: 0.5rem !important; }
    .preview-title-text[b-wrkyxl9jrj] { order: -1; }
    .preview-lang-selector[b-wrkyxl9jrj] { flex-wrap: wrap; }
}

/* 「預覽」兩個字不要被擠成直排 */
.preview-lang-label[b-wrkyxl9jrj] { white-space: nowrap; }

.text-field input[b-wrkyxl9jrj],
.text-field textarea[b-wrkyxl9jrj] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: #1e293b;
    transition: 0.2s;
    resize: vertical;
}

.text-field input:focus[b-wrkyxl9jrj],
.text-field textarea:focus[b-wrkyxl9jrj] {
    border-color: #537D5D;
    outline: none;
    box-shadow: 0 0 0 3px rgba(83, 125, 93, 0.1);
}

/* 語系 key —— 對照翻譯管理頁時要用得上。放在標籤同一行，不另外佔一列高度 */
.text-field-key[b-wrkyxl9jrj] {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.68rem;
    font-weight: 400;
    color: #94a3b8;
}

/* 預覽語系那排前面的小標，用來跟「編輯語系」區分 */
.preview-lang-label[b-wrkyxl9jrj] {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    margin-right: 2px;
}

/* ── 右側控制面板 ── */
.announcement-mode-selector[b-wrkyxl9jrj] {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* 「前台目前顯示」—— 面板上最重要的一句話，強制模式時轉為警示色 */
.live-status[b-wrkyxl9jrj] {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #537D5D;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.live-status.forced[b-wrkyxl9jrj] {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
}

.live-status-head[b-wrkyxl9jrj] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.live-status-label[b-wrkyxl9jrj] {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.live-status-badge[b-wrkyxl9jrj] {
    font-size: 0.82rem;
    font-weight: 800;
    color: #166534;
    background: white;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 2px 12px;
}

.live-status.forced .live-status-badge[b-wrkyxl9jrj] {
    color: #92400e;
    border-color: #fde68a;
}

.live-status-warn[b-wrkyxl9jrj] {
    font-size: 0.78rem;
    color: #92400e;
    line-height: 1.55;
}

.mode-select-label[b-wrkyxl9jrj] {
    font-weight: 800;
    color: #537D5D;
    font-size: 1rem;
    margin-bottom: 5px;
}

.mode-dropdown[b-wrkyxl9jrj] {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #537D5D;
    color: #537D5D;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    background: white;
}

.mode-dropdown option:disabled[b-wrkyxl9jrj] {
    color: #a1a1aa;
}

.mode-hint[b-wrkyxl9jrj] {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* 淺綠開關方塊（原本靠 razor 的 inline style，收攏到這裡） */
.tm-green-box[b-wrkyxl9jrj] {
    background: #f0fdf4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tm-green-title[b-wrkyxl9jrj] {
    font-weight: 600;
    color: #166534;
    font-size: 0.9rem;
}

.tm-green-sub[b-wrkyxl9jrj] {
    font-size: 0.8rem;
    color: #15803d;
    line-height: 1.3;
}

/* 淺灰提示方塊 */
.tm-slate-box[b-wrkyxl9jrj] {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tm-slate-box-title[b-wrkyxl9jrj] {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tm-slate-box-sub[b-wrkyxl9jrj] {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}

/* 「前往修改」—— 語意是按鈕（會切換頁面模式），外觀是連結 */
.tm-inline-link[b-wrkyxl9jrj] {
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    color: #537D5D;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* ── 模式時間軸 ── */
.mode-timeline[b-wrkyxl9jrj] {
    margin-top: 5px;
}

.timeline-section-label[b-wrkyxl9jrj] {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: inline-block;
}

.auto-label[b-wrkyxl9jrj] {
    background: #dcfce7;
    color: #166534;
}

.timeline-items[b-wrkyxl9jrj] {
    border-left: 2px solid #e2e8f0;
    padding-left: 12px;
    margin-left: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auto-zone[b-wrkyxl9jrj] {
    border-left-color: #86efac;
}

.manual-zone[b-wrkyxl9jrj] {
    border-left-color: #fcd34d;
}

.timeline-item[b-wrkyxl9jrj] {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.timeline-item.timeline-active[b-wrkyxl9jrj] {
    background: #f0fdf4;
    box-shadow: 0 0 0 1.5px #86efac;
}

.tl-dot[b-wrkyxl9jrj] {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: #86efac;
    border: 2px solid #537D5D;
    margin-top: 4px;
}

.tl-dot.manual[b-wrkyxl9jrj] {
    background: #fde68a;
    border-color: #d97706;
}

.timeline-item.timeline-active .tl-dot[b-wrkyxl9jrj] {
    background: #537D5D;
    border-color: #537D5D;
    box-shadow: 0 0 0 3px rgba(83,125,93,0.2);
}

.tl-title[b-wrkyxl9jrj] {
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    line-height: 1.3;
}

.tl-desc[b-wrkyxl9jrj] {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.3;
}

.timeline-divider[b-wrkyxl9jrj] {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 8px;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.timeline-divider[b-wrkyxl9jrj]::before,
.timeline-divider[b-wrkyxl9jrj]::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* =====================================================================
   === 暗色模式覆寫：僅在 html[data-theme="dark"] 下生效（亮色不變）===
   ===================================================================== */

html[data-theme="dark"] .hero-preview-container[b-wrkyxl9jrj] {
    background: #242b27;
    border-color: #3a443d;
}
html[data-theme="dark"] .preview-title[b-wrkyxl9jrj] {
    color: #f3e9dc;
}

html[data-theme="dark"] .p-control-btn[b-wrkyxl9jrj] {
    background: #1e2521;
    color: #9aa89c;
    border-color: #3a443d;
}
html[data-theme="dark"] .p-control-btn.active[b-wrkyxl9jrj] {
    background: #7fb389;
    color: #1e2521;
    border-color: #7fb389;
}

html[data-theme="dark"] .p-lang-btn[b-wrkyxl9jrj] {
    background: #1e2521;
    color: #9aa89c;
    border-color: #3a443d;
}
html[data-theme="dark"] .p-lang-btn:hover[b-wrkyxl9jrj] {
    background: #1e2a22;
    border-color: #7fb389;
    color: #7fb389;
}
html[data-theme="dark"] .p-lang-btn.active[b-wrkyxl9jrj] {
    background: #7fb389;
    color: #1e2521;
    border-color: #7fb389;
}

html[data-theme="dark"] .text-editor[b-wrkyxl9jrj] {
    border-top-color: #3a443d;
}
html[data-theme="dark"] .text-editor-title[b-wrkyxl9jrj] {
    color: #f3e9dc;
}
html[data-theme="dark"] .text-editor-scope[b-wrkyxl9jrj] {
    background: #1e2a22;
    border-color: #3f6b47;
    color: #7fb389;
}
html[data-theme="dark"] .text-editor-note[b-wrkyxl9jrj] {
    background: #1e2521;
    border-left-color: #3a443d;
    color: #9aa89c;
}
html[data-theme="dark"] .unsaved-dot[b-wrkyxl9jrj] {
    color: #f2c179;
}
html[data-theme="dark"] .save-text-btn[b-wrkyxl9jrj] { background: #7fb389; color: #1e2521; }
html[data-theme="dark"] .save-text-btn:hover:not(:disabled)[b-wrkyxl9jrj] { background: #6ba074; }
html[data-theme="dark"] .save-text-btn:disabled[b-wrkyxl9jrj] { background: #3a443d; color: #6b7670; }
html[data-theme="dark"] .text-field label[b-wrkyxl9jrj] { color: #9aa89c; }
html[data-theme="dark"] .col-lang[b-wrkyxl9jrj] { color: #6b7670; }
html[data-theme="dark"] .preview-lang-label[b-wrkyxl9jrj] { color: #6b7670; }
html[data-theme="dark"] .edit-lang-label[b-wrkyxl9jrj] { color: #7fb389; }
html[data-theme="dark"] .edit-lang-chip[b-wrkyxl9jrj] {
    background: #242b27;
    color: #9aa89c;
    border-color: #3a443d;
}
html[data-theme="dark"] .edit-lang-chip:hover[b-wrkyxl9jrj] {
    border-color: #7fb389;
    color: #7fb389;
    background: #1e2a22;
}
html[data-theme="dark"] .edit-lang-chip.active[b-wrkyxl9jrj] {
    background: #7fb389;
    color: #1e2521;
    border-color: #7fb389;
}
html[data-theme="dark"] .text-field input[b-wrkyxl9jrj],
html[data-theme="dark"] .text-field textarea[b-wrkyxl9jrj] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .text-field input:focus[b-wrkyxl9jrj],
html[data-theme="dark"] .text-field textarea:focus[b-wrkyxl9jrj] {
    border-color: #7fb389;
}
html[data-theme="dark"] .text-field-key[b-wrkyxl9jrj] { color: #6b7670; }

html[data-theme="dark"] .preview-controls-label[b-wrkyxl9jrj] { color: #9aa89c; }
html[data-theme="dark"] .preview-controls-hint[b-wrkyxl9jrj] { color: #6b7670; }
html[data-theme="dark"] .lang-hidden-mark[b-wrkyxl9jrj] {
    background: #3a443d;
    color: #9aa89c;
}
html[data-theme="dark"] .edit-lang-chip.active .lang-hidden-mark[b-wrkyxl9jrj] {
    background: rgba(30, 37, 33, 0.35);
    color: #1e2521;
}

html[data-theme="dark"] .live-status[b-wrkyxl9jrj] {
    background: #1e2a22;
    border-color: #3f6b47;
    border-left-color: #7fb389;
}
html[data-theme="dark"] .live-status.forced[b-wrkyxl9jrj] {
    background: #2a2416;
    border-color: #5a4f2a;
    border-left-color: #f2c179;
}
html[data-theme="dark"] .live-status-label[b-wrkyxl9jrj] { color: #cbd8cc; }
html[data-theme="dark"] .live-status-badge[b-wrkyxl9jrj] {
    background: #1e2521;
    border-color: #3f6b47;
    color: #8fd39a;
}
html[data-theme="dark"] .live-status.forced .live-status-badge[b-wrkyxl9jrj] {
    border-color: #5a4f2a;
    color: #f2c179;
}
html[data-theme="dark"] .live-status-warn[b-wrkyxl9jrj] { color: #f2d479; }

html[data-theme="dark"] .announcement-mode-selector[b-wrkyxl9jrj] {
    background: #1e2521;
    border-color: #3a443d;
}
html[data-theme="dark"] .mode-select-label[b-wrkyxl9jrj] {
    color: #7fb389;
}
html[data-theme="dark"] .mode-dropdown[b-wrkyxl9jrj] {
    background: #1e2521;
    color: #7fb389;
    border-color: #7fb389;
}
html[data-theme="dark"] .mode-hint[b-wrkyxl9jrj] {
    color: #9aa89c;
}

html[data-theme="dark"] .tm-green-box[b-wrkyxl9jrj] {
    background: #1e2a22;
    border-color: #3f6b47;
}
html[data-theme="dark"] .tm-green-title[b-wrkyxl9jrj] {
    color: #8fd39a;
}
html[data-theme="dark"] .tm-green-sub[b-wrkyxl9jrj] {
    color: #7fb389;
}

html[data-theme="dark"] .tm-slate-box[b-wrkyxl9jrj] {
    background: #242b27;
    border-color: #3a443d;
}
html[data-theme="dark"] .tm-slate-box-title[b-wrkyxl9jrj] {
    color: #f3e9dc;
}
html[data-theme="dark"] .tm-slate-box-sub[b-wrkyxl9jrj] {
    color: #9aa89c;
}
html[data-theme="dark"] .tm-inline-link[b-wrkyxl9jrj] {
    color: #7fb389;
}

html[data-theme="dark"] .auto-label[b-wrkyxl9jrj] {
    background: #1e2a22;
    color: #7fb389;
}
html[data-theme="dark"] .timeline-items[b-wrkyxl9jrj] {
    border-left-color: #3a443d;
}
html[data-theme="dark"] .timeline-item.timeline-active[b-wrkyxl9jrj] {
    background: #1e2a22;
    box-shadow: 0 0 0 1.5px #3f6b47;
}
html[data-theme="dark"] .tl-title[b-wrkyxl9jrj] {
    color: #f3e9dc;
}
html[data-theme="dark"] .tl-desc[b-wrkyxl9jrj],
html[data-theme="dark"] .timeline-divider[b-wrkyxl9jrj] {
    color: #9aa89c;
}
html[data-theme="dark"] .timeline-divider[b-wrkyxl9jrj]::before,
html[data-theme="dark"] .timeline-divider[b-wrkyxl9jrj]::after {
    background: #3a443d;
}

/* 入圍開關（Bootstrap form-switch）未勾選時是白色藥丸，在深色卡片上會變成白區塊。
   ShortlistManager.razor 已有同款覆寫，這裡是元件自己的一份（scoped CSS 不會互通）。 */
html[data-theme="dark"] .form-check-input[b-wrkyxl9jrj] {
    background-color: #242b27;
    border-color: #3a443d;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239aa89c'/%3e%3c/svg%3e");
}
html[data-theme="dark"] .form-check-input:checked[b-wrkyxl9jrj] {
    background-color: #7fb389;
    border-color: #7fb389;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23131815'/%3e%3c/svg%3e");
}
html[data-theme="dark"] .form-check-input:focus[b-wrkyxl9jrj] {
    border-color: #7fb389;
    box-shadow: 0 0 0 0.25rem rgba(127, 179, 137, 0.25);
}
/* /Components/ContestScheduleOverview.razor.rz.scp.css */
/* 本屆時程總覽（唯讀）。四個管理頁共用，見 ContestScheduleOverview.razor 檔頭。 */

.cso[b-86er3kg6tz] {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    font-size: 0.9rem;
    color: #2d3748;
}

.cso-title[b-86er3kg6tz] {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: #2d3748;
}

.cso-row[b-86er3kg6tz] {
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    border-left: 3px solid transparent;
}

.cso-row + .cso-row[b-86er3kg6tz] {
    margin-top: 0.25rem;
}

/* 本頁負責的那一組：淡底＋左側色條，一眼看得出「這一行是我在這頁設定的」 */
.cso-row.is-current[b-86er3kg6tz] {
    background: #f0f7f2;
    border-left-color: #537D5D;
}

.cso-row-head[b-86er3kg6tz] {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.cso-label[b-86er3kg6tz] {
    font-weight: 700;
}

.cso-badge[b-86er3kg6tz] {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    background: #537D5D;
    border-radius: 999px;
    padding: 1px 8px;
}

.cso-value[b-86er3kg6tz] {
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.cso-value.is-muted[b-86er3kg6tz] {
    color: #8a94a6;
}

.cso-where[b-86er3kg6tz] {
    font-size: 0.78rem;
    color: #8a94a6;
    margin-top: 2px;
}

/* 精簡版：統計格、右側窄欄 */
.cso-compact[b-86er3kg6tz] {
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
}

.cso-compact .cso-title[b-86er3kg6tz] {
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

.cso-compact .cso-row[b-86er3kg6tz] {
    padding: 0.3rem 0.45rem;
}

/* 暗色模式（僅 html[data-theme="dark"] 生效，亮色不受影響）。
   scoped CSS 只會在選擇器**最後一段**加上元件屬性，所以前面的 html[...] 照樣比對得到。 */
html[data-theme="dark"] .cso[b-86er3kg6tz] {
    background: #1e2521;
    border-color: #333d37;
    color: #e6e1d6;
}

html[data-theme="dark"] .cso-title[b-86er3kg6tz] {
    color: #e6e1d6;
}

html[data-theme="dark"] .cso-row.is-current[b-86er3kg6tz] {
    background: #24312a;
    border-left-color: #8fbf9a;
}

html[data-theme="dark"] .cso-badge[b-86er3kg6tz] {
    background: #8fbf9a;
    color: #131815;
}

html[data-theme="dark"] .cso-value.is-muted[b-86er3kg6tz],
html[data-theme="dark"] .cso-where[b-86er3kg6tz] {
    color: var(--iva-text-muted, #9aa3a0);
}
/* /Components/ErrorUserDrawer.razor.rz.scp.css */
/* 「查看異常名單」抽屜（2026-10-22 由 inline style 搬過來）。
   ⚠️ 不要再把顏色寫回 inline style —— inline 的優先權高於下面的暗色規則，
      一寫回去暗色模式就又變回亮粉色卡片。
   暗色配色沿用權限管理頁「清空搜尋」鈕的紅色系（#33232a／#f08a8a）。 */

.eud-title[b-ml43ii05mu] {
    color: #c53030;
}

.eud-desc[b-ml43ii05mu] {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.eud-list[b-ml43ii05mu] {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.eud-row[b-ml43ii05mu] {
    padding: 12px;
    background: #fff5f5;
    border-radius: 10px;
    border-left: 4px solid #feb2b2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eud-account[b-ml43ii05mu] {
    color: #c53030;
}

.eud-status[b-ml43ii05mu] {
    font-size: 0.75rem;
    color: #999;
    margin-top: 2px;
}

/* ===== 暗色模式 ===== */
html[data-theme="dark"] .eud-title[b-ml43ii05mu],
html[data-theme="dark"] .eud-account[b-ml43ii05mu] {
    color: #f08a8a;
}

html[data-theme="dark"] .eud-desc[b-ml43ii05mu],
html[data-theme="dark"] .eud-status[b-ml43ii05mu] {
    color: #9aa89c;
}

html[data-theme="dark"] .eud-row[b-ml43ii05mu] {
    background: #33232a;
    border-left-color: #7a3b3b;
}
/* /Components/ResultsPublishTimeEditor.razor.rz.scp.css */
/* 賽果公布時間設定區塊。見 ResultsPublishTimeEditor.razor 檔頭。 */

.rpe[b-9zfm5hmcof] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rpe-main[b-9zfm5hmcof] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 並排模式（SideBySide）：兩欄各半，本屆時程用 order 排到左邊 */
.rpe-split[b-9zfm5hmcof] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.rpe-split .rpe-overview[b-9zfm5hmcof] {
    order: -1;
    margin-top: 0;
}

@media (max-width: 991.98px) {
    .rpe-split[b-9zfm5hmcof] {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rpe-title[b-9zfm5hmcof] {
    font-weight: 800;
    font-size: 1rem;
}

.rpe-input-row[b-9zfm5hmcof] {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.rpe-input[b-9zfm5hmcof] {
    flex: 1 1 200px;
    min-width: 0;
    border-radius: 10px;
}

.rpe-save[b-9zfm5hmcof] {
    flex: 0 0 auto;
    border-radius: 10px;
    white-space: nowrap;
}

.rpe-hint[b-9zfm5hmcof] {
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.5;
}

.rpe-unsaved[b-9zfm5hmcof] {
    font-size: 0.82rem;
    font-weight: 700;
    color: #b7791f;
}

.rpe-result[b-9zfm5hmcof] {
    font-size: 0.85rem;
    font-weight: 600;
}

.rpe-result.is-ok[b-9zfm5hmcof] { color: #2f855a; }
.rpe-result.is-error[b-9zfm5hmcof] { color: #c53030; }

.rpe-status[b-9zfm5hmcof] {
    font-size: 0.85rem;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    line-height: 1.5;
}

.rpe-status.is-wait[b-9zfm5hmcof] { background: #fffaf0; border-color: #fbd38d; }
.rpe-status.is-ok[b-9zfm5hmcof] { background: #f0fff4; border-color: #c6f6d5; }

.rpe-public[b-9zfm5hmcof] {
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
}

.rpe-public.is-ok[b-9zfm5hmcof] { background: #f0fff4; color: #276749; }
.rpe-public.is-warn[b-9zfm5hmcof] { background: #fff5f5; color: #c53030; }

.rpe-overview[b-9zfm5hmcof] {
    margin-top: 0.4rem;
}

/* 暗色模式 */
html[data-theme="dark"] .rpe-hint[b-9zfm5hmcof] { color: var(--iva-text-muted, #9aa3a0); }
html[data-theme="dark"] .rpe-status[b-9zfm5hmcof] { background: #1e2521; border-color: #333d37; }
html[data-theme="dark"] .rpe-status.is-wait[b-9zfm5hmcof] { background: #2e2716; border-color: #6b5a2a; }
html[data-theme="dark"] .rpe-status.is-ok[b-9zfm5hmcof] { background: #1c2e22; border-color: #2f5a3b; }
html[data-theme="dark"] .rpe-public.is-ok[b-9zfm5hmcof] { background: #1c2e22; color: #9ad4a8; }
html[data-theme="dark"] .rpe-public.is-warn[b-9zfm5hmcof] { background: #3a1f1f; color: #f2a1a1; }
/* /Layout/NavMenu.razor.rz.scp.css */
/* ============================================================
   NavMenu 的隔離樣式（CSS isolation）

   原本這裡有一整套 Blazor 專案範本的預設樣式（.navbar-toggler、
   .top-row、.navbar-brand、.nav-item、.collapse、.nav-scrollable
   以及三個內嵌 SVG 的 .bi-*-nav-menu），但 NavMenu.razor 實際使用的
   class 是 .nav-menu-wrapper / .nav-menu-group / .group-header 等，
   兩邊完全對不起來，那些規則從來沒有生效過，已於整理時移除。

   ⚠️ 只有下面這條 .bi 是真的有作用的 —— NavMenu.razor 的圖示寫成
   <i class="bi bi-house-fill">，會吃到這條規則。刪掉會改變圖示的
   尺寸與右側間距，所以保留。

   NavMenu 其餘的樣式寫在 NavMenu.razor 檔案尾端的 <style> 區塊裡
   （那是全域生效的，不是隔離樣式）。詳見 Layout/README.md。
   ============================================================ */

.bi[b-6vatz623rk] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}
/* /Pages/Admin.razor.rz.scp.css */
/* 本頁自己那份彈窗樣式（.custom-modal-overlay / .custom-modal-card / .modal-confirm-btn
   與 popIn 動畫）已於 2026-09-10 移除 —— 改用 IvaModal 元件（ISSUES.md 第 66 項）。 */
.section-header-row[b-xmry7k7f5v] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    margin-bottom: 1.5rem;
}
.section-control-row[b-xmry7k7f5v] {
    height: 40px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}
.section-control-row .search-input[b-xmry7k7f5v] { height: 42px !important; margin: 0; padding: 0 15px !important; line-height: 1.2 !important; }

select.compact-search[b-xmry7k7f5v] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: center;
}

.search-box-wrapper[b-xmry7k7f5v] {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.clear-search-btn[b-xmry7k7f5v] {
    position: absolute;
    right: 10px;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    z-index: 10;
}

.clear-search-btn:hover[b-xmry7k7f5v] {
    background: #e2e8f0;
    color: #ef4444;
    transform: scale(1.1);
}

.clear-search-btn svg[b-xmry7k7f5v] {
    width: 16px;
    height: 16px;
}

.stats-title[b-xmry7k7f5v] { margin: 0; font-size: 1.2rem; font-weight: 600; color: var(--color-dark-green); }

.search-mode-toggles[b-xmry7k7f5v] { display: flex; gap: 5px; background: #eee; padding: 3px; border-radius: 8px; }
.mode-btn[b-xmry7k7f5v] { border: none; padding: 5px 12px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; background: transparent; transition: 0.2s; }
.mode-btn.active[b-xmry7k7f5v] { background: white; color: #537D5D; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* 趨勢按鈕：絕對定位以避免擠壓主要數據 */
.trend-action-btn[b-xmry7k7f5v] {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
    white-space: nowrap;
}
.trend-action-btn:hover[b-xmry7k7f5v] {
    background: #2b6cb0;
    color: white;
}

.stat-box-title[b-xmry7k7f5v] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.help-btn[b-xmry7k7f5v] {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #f9f9f9;
    color: #888;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.help-btn:hover[b-xmry7k7f5v] {
    background: #537D5D;
    color: white;
    border-color: #537D5D;
}

.control-flex-layout[b-xmry7k7f5v] {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    align-items: stretch;
}
.control-left-side[b-xmry7k7f5v] {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border-right: 1px solid #eee;
    padding-right: 2rem;
    justify-content: center;
}
.control-right-side[b-xmry7k7f5v] {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    justify-content: center;
}
.control-group[b-xmry7k7f5v] {
    display: flex;
    align-items: center;
    gap: 15px;
}
.control-group.vertical-group[b-xmry7k7f5v] {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.control-group label[b-xmry7k7f5v] {
    width: 140px;
    margin-bottom: 0 !important;
    flex-shrink: 0;
    font-weight: 600;
    color: #555;
}
.control-group.vertical-group label[b-xmry7k7f5v] {
    width: auto;
}
.time-input[b-xmry7k7f5v] {
    max-width: 230px;
    flex-grow: 1;
}
.number-input-wrapper[b-xmry7k7f5v] {
    display: flex;
    align-items: center;
    gap: 10px;
}
.number-input-wrapper .time-input[b-xmry7k7f5v] {
    width: 80px !important;
    text-align: center;
    flex-grow: 0;
}
.unit-text[b-xmry7k7f5v] {
    font-weight: 600;
    color: #666;
}

.like-details-panel.full-width[b-xmry7k7f5v] { flex: 1; }

.scrollable-area[b-xmry7k7f5v] { 
    max-height: 600px; 
    overflow-y: auto; 
    padding-bottom: 20px; 
    position: relative;
}
.scrollable-area.mini[b-xmry7k7f5v] { max-height: 600px; }

.admin-bottom-layout[b-xmry7k7f5v] {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    margin-top: 2rem;
}

.like-query-card[b-xmry7k7f5v] {
    height: auto !important;
    min-height: 500px;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem !important;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--color-beige);
    box-shadow: var(--shadow-md);
}

.works-list-compact[b-xmry7k7f5v], .like-details-panel[b-xmry7k7f5v] {
    max-height: 600px !important;
    overflow-y: auto;
}

.admin-tabs[b-xmry7k7f5v] { 
    display: none; 
    gap: 10px; 
    margin-bottom: 1.5rem; 
    flex-wrap: wrap; /* 手機版自動換行 */
}
.admin-tabs button[b-xmry7k7f5v] { 
    flex: 1 1 calc(50% - 10px); /* 手機版一行兩個 */
    min-width: 120px;
    padding: 12px 10px; 
    border-radius: 10px; 
    border: 1px solid #ddd; 
    background: #fff; 
    cursor: pointer; 
    font-size: 0.9rem;
}
.admin-tabs button.active[b-xmry7k7f5v] { background: #537D5D; color: #fff; border-color: #537D5D; font-weight: 700; }

/* --- 頂部數據區塊 --- */
/*
   【2026-09-23 改版】原本是「六格同列」：
       grid-template-columns: repeat(5, 1fr) 3fr
   五個統計方塊被壓成細長條、還鎖 min-height: 240px 去配合右邊控制面板的高度，
   而控制面板自己又把時間、票數、狀態列、說明、屆別全部由上往下堆 ——
   結果整個區塊非常高，一眼看不完。

   現在改成外層**兩塊並排**：[統計 3 欄 × 2 列] [控制面板（內部左右兩欄）]。

   用 flex 而不是 grid，是因為權限會讓其中一塊整個不渲染
   （沒有 ADMIN_VOTE_STATS 就沒有統計、沒有 ADMIN_TIME_CTRL 就沒有控制面板）——
   flex 的剩下那一塊會自然撐滿，grid 的話要為每種組合各寫一次欄位定義。
*/
.stats-grid.top-metrics[b-xmry7k7f5v] {
    display: flex !important;
    flex-wrap: wrap;
    gap: 15px !important;
    margin-bottom: 2.5rem !important;
    align-items: stretch !important;
}

/* 五個統計方塊自己的網格：3 欄 × 2 列，第 6 格留空 */
.metrics-cluster[b-xmry7k7f5v] {
    flex: 1 1 520px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    align-content: start;
}

/* 第 6 格：本屆時程總覽（2026-10-16）。高度跟同一列的統計方塊對齊，
   外框圓角與統計方塊一致。::deep 是因為 .cso 屬於子元件 ContestScheduleOverview。 */
.schedule-cell[b-xmry7k7f5v] {
    min-width: 0;
    display: flex;
}

.schedule-cell[b-xmry7k7f5v]  .cso {
    flex: 1;
    border-radius: var(--radius);
}

.stats-grid.top-metrics .stat-box:not(.control-panel-desktop)[b-xmry7k7f5v] {
    background: white;
    padding: 1.4rem 0.5rem !important;
    border-radius: var(--radius);
    border: 1px solid var(--color-beige);
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* 高度不再需要配合控制面板 —— 方塊只要裝得下自己的三行字就好 */
    min-height: 150px !important;
    margin: 0 !important;
    transition: all 0.2s;
    position: relative !important;
}

.stats-grid.top-metrics .control-panel-desktop[b-xmry7k7f5v] {
    flex: 1 1 560px;
    background: white;
    padding: 1.5rem 2rem !important;
    border-radius: var(--radius);
    border: 1px solid var(--color-beige);
    box-shadow: var(--shadow-sm);
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0 !important;
}

/* 控制面板內部的左右兩欄（2026-09-23）*/
.control-two-col[b-xmry7k7f5v] {
    align-items: stretch;
    padding: 0 !important;
    flex: 1;
}
.control-two-col .control-left-side[b-xmry7k7f5v],
.control-two-col .control-right-side[b-xmry7k7f5v] {
    justify-content: flex-start;
    gap: 1rem;
}
/* 右欄不要跟著左欄的內容拉長，說明文字貼著下拉即可 */
.control-two-col .control-right-side[b-xmry7k7f5v] {
    padding-left: 2rem;
    border-right: none;
}

.stats-grid.top-metrics .stat-box:hover[b-xmry7k7f5v] {
    box-shadow: var(--shadow-md);
    border-color: #537D5D;
}

.stats-grid.top-metrics .stat-box-title[b-xmry7k7f5v] {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-bottom: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.control-panel-desktop .stat-box-title[b-xmry7k7f5v] {
    justify-content: center !important;
    font-size: 1.2rem !important;
    color: var(--color-dark-green) !important;
}

.stats-grid.top-metrics .big-number[b-xmry7k7f5v] {
    font-size: 2.2rem !important; 
    font-weight: 800 !important;
    color: #537D5D !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.stats-grid.top-metrics .update-time[b-xmry7k7f5v] {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    margin-top: 8px !important;
}

/* 響應式佈局：1400px 以下 */
@media (max-width: 1400px) {
    .admin-tabs[b-xmry7k7f5v] { display: flex !important; }
    
    /* 核心修正：只在此寬度下隱藏，不影響全螢幕的 Grid */
    .mobile-hidden[b-xmry7k7f5v],
    .stats-grid.top-metrics.mobile-hidden[b-xmry7k7f5v],
    .admin-bottom-layout.mobile-hidden[b-xmry7k7f5v],
    .admin-content-section.mobile-hidden[b-xmry7k7f5v] { 
        display: none !important; 
    }

    /*
        2026-09-23：外層已改成 flex-wrap，控制面板放不下時會自己換行到統計區下方，
        不需要再指定 grid-column。這裡只要讓它換行後撐滿整寬即可。
        統計區維持 3 欄（.metrics-cluster 的預設），不必重寫。
    */
    .stats-grid.top-metrics .control-panel-desktop[b-xmry7k7f5v] {
        display: flex !important;
        flex: 1 1 100% !important;
        margin-top: 10px !important;
    }

    .admin-bottom-layout[b-xmry7k7f5v] { 
        display: block !important;
        grid-template-columns: 1fr !important; 
    }
}

/* 響應式佈局：768px 以下 (手機) */
@media (max-width: 768px) {
    /* 統計方塊一列兩個（2026-10-19；原本一欄到底，總覽要捲很久才到控制面板）。
       本屆時程總覽內容較多，維持獨佔整列。 */
    .metrics-cluster[b-xmry7k7f5v] {
        flex: 1 1 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .schedule-cell[b-xmry7k7f5v] { grid-column: 1 / -1; }
    .stats-grid.top-metrics .stat-box:not(.control-panel-desktop)[b-xmry7k7f5v] {
        min-height: 0 !important;
        padding: 1rem 0.5rem !important;
    }
    .stats-grid.top-metrics .stat-box-title[b-xmry7k7f5v] {
        font-size: 0.82rem !important;
        flex-wrap: wrap;
        margin-bottom: 8px !important;
    }
    .stats-grid.top-metrics .big-number[b-xmry7k7f5v] { font-size: 1.8rem !important; }
    /* 趨勢按鈕在電腦版是絕對定位貼底；方塊變窄變矮之後會壓到更新時間那行字，改回跟著內容排 */
    .trend-action-btn[b-xmry7k7f5v] {
        position: static !important;
        transform: none !important;
        align-self: center;
        margin-top: 8px;
    }

    .stats-grid.top-metrics .control-panel-desktop[b-xmry7k7f5v] {
        display: flex !important;
        flex: 1 1 100% !important;
        padding: 1.25rem 1rem !important;
    }
    /* 控制面板：「標籤 140px ＋ 輸入框 230px」同一行會超出手機寬度 → 標籤在上、輸入框佔滿 */
    .control-group[b-xmry7k7f5v] {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .control-group label[b-xmry7k7f5v] { width: auto; }
    .time-input[b-xmry7k7f5v] { max-width: none; width: 100%; }

    /* 排行／紀錄的標題列：原本鎖 40px 高、單行，標題與按鈕會擠在一起 → 允許換行 */
    .section-header-row[b-xmry7k7f5v],
    .section-control-row[b-xmry7k7f5v] {
        height: auto;
        min-height: 40px;
        flex-wrap: wrap;
        gap: 10px;
    }
    /* ⚠️ 不要在這裡把 min-height 改成 0（2026-10-19 實測踩過）：
          卡片裡的 .like-query-content／.records-list 是 flex: 1 1 0、本身高度 0，
          全靠卡片的 min-height: 500px 撐出空間 —— 拿掉之後查詢結果會被壓成 0 高度、整塊看不見。 */
    .like-query-card[b-xmry7k7f5v] {
        padding: 1.25rem 1rem !important;
    }
    .like-details-panel .details-header > div[b-xmry7k7f5v] { flex-wrap: wrap; gap: 8px; }

    /* 排行表與投票者時間軸：給最小寬度，改成左右滑動，不要把每一欄壓到一個字一行
       （外層 .scrollable-area 在下面已經是 overflow-x: auto） */
    .scrollable-area .compact-table[b-xmry7k7f5v] { min-width: 600px; }

    /* 「數據管理／公告控制台」兩顆模式鈕縮小內距，避免擠成兩行（只影響本頁） */
    .iva-mode-btn[b-xmry7k7f5v] { padding: 10px 20px; }
    /* 控制面板的左右兩欄在手機上疊成上下，並移除欄間的分隔線與內縮 */
    .control-two-col[b-xmry7k7f5v] {
        flex-direction: column;
        gap: 1.5rem;
    }
    .control-two-col .control-left-side[b-xmry7k7f5v] {
        border-right: none;
        padding-right: 0;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid #eee;
    }
    .control-two-col .control-right-side[b-xmry7k7f5v] {
        padding-left: 0;
    }

    /* 核心修正：強制內容區鎖定寬度並允許內部滾動 */
    .scrollable-area[b-xmry7k7f5v] {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===================================================================== */
/* 暗色模式覆寫 (Dark Mode Overrides)                                     */
/* 僅新增規則，不修改上方任何亮色外觀。色階統一：                          */
/* 卡片/面板 #1e2521；次層 #242b27；hover #2e3631；邊框 #3a443d          */
/* 主文字 #f3e9dc；次要文字 #9aa89c；主綠 #7fb389                         */
/* ===================================================================== */

/* --- 上排 6 張統計卡 --- */
html[data-theme="dark"] .stats-grid.top-metrics .stat-box:not(.control-panel-desktop)[b-xmry7k7f5v] {
    background: #1e2521 !important;
    border-color: #3a443d !important;
}

/* --- 右側「投票時間與票數設定」卡 --- */
html[data-theme="dark"] .stats-grid.top-metrics .control-panel-desktop[b-xmry7k7f5v] {
    background: #1e2521 !important;
    border-color: #3a443d !important;
}

/* --- 統計卡 hover 邊框 --- */
html[data-theme="dark"] .stats-grid.top-metrics .stat-box:hover[b-xmry7k7f5v] {
    border-color: #7fb389 !important;
}

/* --- 統計卡標題(說明字) --- */
html[data-theme="dark"] .stats-grid.top-metrics .stat-box-title[b-xmry7k7f5v] {
    color: #9aa89c !important;
}

/* --- 設定卡標題(主綠) --- */
html[data-theme="dark"] .control-panel-desktop .stat-box-title[b-xmry7k7f5v] {
    color: #7fb389 !important;
}

/* --- 大數字(主綠) --- */
html[data-theme="dark"] .stats-grid.top-metrics .big-number[b-xmry7k7f5v] {
    color: #7fb389 !important;
}

/* --- 更新時間次要字 --- */
html[data-theme="dark"] .stats-grid.top-metrics .update-time[b-xmry7k7f5v] {
    color: #9aa89c !important;
}

/* 彈窗卡片的暗色覆寫已移除（2026-09-10）—— 元件的暗色規則在 app.css。 */

/* --- 分頁按鈕 --- */
html[data-theme="dark"] .admin-tabs button[b-xmry7k7f5v] {
    background: #242b27 !important;
    border-color: #3a443d !important;
    color: #f3e9dc !important;
}
html[data-theme="dark"] .admin-tabs button.active[b-xmry7k7f5v] {
    background: #537D5D !important;
    border-color: #537D5D !important;
    color: #fff !important;
}

/* --- 搜尋模式切換群組 --- */
html[data-theme="dark"] .search-mode-toggles[b-xmry7k7f5v] {
    background: #242b27 !important;
}
html[data-theme="dark"] .mode-btn[b-xmry7k7f5v] {
    color: #9aa89c !important;
}
html[data-theme="dark"] .mode-btn.active[b-xmry7k7f5v] {
    background: #2e3631 !important;
    color: #7fb389 !important;
}

/* --- 說明按鈕 --- */
html[data-theme="dark"] .help-btn[b-xmry7k7f5v] {
    background: #242b27 !important;
    border-color: #3a443d !important;
    color: #9aa89c !important;
}
html[data-theme="dark"] .help-btn:hover[b-xmry7k7f5v] {
    background: #537D5D !important;
    border-color: #537D5D !important;
    color: #fff !important;
}

/* --- 左側區塊右分隔線 --- */
html[data-theme="dark"] .control-left-side[b-xmry7k7f5v] {
    border-right-color: #3a443d !important;
}
/* 手機版兩欄疊成上下時，分隔線改在下緣（2026-09-23）*/
html[data-theme="dark"] .control-two-col .control-left-side[b-xmry7k7f5v] {
    border-bottom-color: #3a443d !important;
}

/* --- 設定表單標籤與單位字 --- */
html[data-theme="dark"] .control-group label[b-xmry7k7f5v] {
    color: #c9cfc7 !important;
}
html[data-theme="dark"] .unit-text[b-xmry7k7f5v] {
    color: #c9cfc7 !important;
}

/* --- 趨勢按鈕(淺藍 -> 暗藍) --- */
html[data-theme="dark"] .trend-action-btn[b-xmry7k7f5v] {
    background: #1e2a33 !important;
    color: #8ec5ff !important;
    border-color: #2f4a5c !important;
}
html[data-theme="dark"] .trend-action-btn:hover[b-xmry7k7f5v] {
    background: #2f4a5c !important;
    color: #fff !important;
}

/* --- 輸入框(搜尋/時間/下拉) --- */
html[data-theme="dark"] .search-input[b-xmry7k7f5v],
html[data-theme="dark"] .time-input[b-xmry7k7f5v],
html[data-theme="dark"] select.compact-search[b-xmry7k7f5v] {
    background: #1e2521 !important;
    border-color: #3a443d !important;
    color: #f3e9dc !important;
}
html[data-theme="dark"] .search-input[b-xmry7k7f5v]::placeholder,
html[data-theme="dark"] .time-input[b-xmry7k7f5v]::placeholder {
    color: #6b7670 !important;
}

/* ============================================================
   說明彈窗（各數字方塊旁邊那顆「?」）的加高與內部捲動

   2026-09-10：這一組 .admin-help-* 已移除 —— 同樣的行為搬進了
   app.css 的 .iva-modal-card／.iva-modal-body，全站彈窗都適用
   （ISSUES.md 第 66 項）。這一頁不再需要自己一份。

   【原本的問題，保留供參考】卡片沒有高度上限，而外框是垂直置中的 flex ——
   內容一長，卡片就同時往上下超出畫面，「我知道了」按鈕被頂到畫面外，
   而且因為超出的是外框而不是卡片內部，捲也捲不到。
   「在線人數說明」補上三個前提之後就踩到這個情況。

   ⚠️ 搬到 app.css 時最容易漏掉的是內文的 min-height: 0 ——
      flex 子元素的預設最小高度是內容高度，不設的話 overflow 不會生效。
   ============================================================ */

/* ============================================================
   投票時段的狀態列 / 未儲存提示 / 說明（2026-09-15）

   版型比照「作品上傳限制設定」頁，但**文案語意相反** ——
   投稿留空是「不限制」，投票留空是「不會開放」。
   設計理由見 Admin.razor 裡 tempStartTime 的註解。

   ⚠️ 這是隔離樣式（.razor.css），只會套到本頁，
      所以 class 名稱不必怕與其他頁衝突。
   ============================================================ */
.vote-window-status[b-xmry7k7f5v] {
    margin: 4px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    border: 1.5px solid transparent;
    font-size: 0.95rem;
}

.vote-window-open[b-xmry7k7f5v] {
    background: #f0fff4;
    color: #276749;
    border-color: #9ae6b4;
}

.vote-window-closed[b-xmry7k7f5v] {
    background: #fff5f5;
    color: #c53030;
    border-color: #feb2b2;
}

.vote-window-unsaved[b-xmry7k7f5v] {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fffaf0;
    color: #975a16;
    border: 1.5px dashed #f6c177;
    font-size: 0.9rem;
}

.vote-window-hint[b-xmry7k7f5v] {
    margin: 10px 0 18px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.8;
}

html[data-theme="dark"] .vote-window-open[b-xmry7k7f5v] {
    background: #1e2f24;
    color: #7fd39a;
    border-color: #2f5a40;
}

html[data-theme="dark"] .vote-window-closed[b-xmry7k7f5v] {
    background: #33232a;
    color: #f0a5a5;
    border-color: #6b3a3a;
}

html[data-theme="dark"] .vote-window-unsaved[b-xmry7k7f5v] {
    background: #2e2a1e;
    color: #e8c88a;
    border-color: #6b5a33;
}

html[data-theme="dark"] .vote-window-hint[b-xmry7k7f5v] {
    background: #242b27;
    color: #9aa89c;
    border-color: #3a443d;
}
/* /Pages/Backup.razor.rz.scp.css */
/* ==========================================================================
   版面（2026-10-19 由 inline style 搬來，手機版媒體查詢才蓋得掉）
   亮色桌機外觀與搬移前相同；手機／平板規則在檔尾。
   ========================================================================== */
.bk-cards[b-suhmar1jwo] { display: flex; gap: 1.5rem; margin-top: 1rem; flex-wrap: wrap; align-items: stretch; }
.bk-card[b-suhmar1jwo] { flex: 1; min-width: 320px; margin-top: 0; display: flex; flex-direction: column; }
.bk-card-reset[b-suhmar1jwo] { border-top: 4px solid #d9534f; }
.bk-card-restore[b-suhmar1jwo] { border-top: 4px solid #f0ad4e; }

.bk-inner[b-suhmar1jwo] { padding: 20px; border-radius: 12px; flex: 1; display: flex; flex-direction: column; }
.bk-inner-green[b-suhmar1jwo] { background: #f9f9f9; border: 1px solid #eee; }
.bk-inner-pink[b-suhmar1jwo] { background: #fff5f5; border: 1px dashed #feb2b2; }
.bk-inner-yellow[b-suhmar1jwo] { background: #fcf8e3; border: 1px dashed #faebcc; }

/* 長說明的收合切換鈕：只在手機出現（見檔尾），電腦版說明一律展開 */
.bk-collapse-toggle[b-suhmar1jwo] { display: none; }

/* ==========================================================================
   數據備份與還原頁 —— 暗色模式覆寫
   僅新增 html[data-theme="dark"] 規則，不更動任何亮色外觀。
   inline 淺色底以 class + !important 覆寫（亮色仍維持原 inline 值）。
   ========================================================================== */

/* --- 三張卡片內層淺色底 --- */
html[data-theme="dark"] .bk-inner[b-suhmar1jwo] {
    color: #f3e9dc !important;
}

html[data-theme="dark"] .bk-inner-green[b-suhmar1jwo] {
    background: #1e2a22 !important;
    border-color: #3a443d !important;
}

html[data-theme="dark"] .bk-inner-pink[b-suhmar1jwo] {
    background: #33232a !important;
    border-color: #5a3a44 !important;
}

html[data-theme="dark"] .bk-inner-yellow[b-suhmar1jwo] {
    background: #2b2a1e !important;
    border-color: #5a5636 !important;
}

/* 卡片內敘述文字（亮色為 #666 / #8a6d3b） */
html[data-theme="dark"] .bk-inner p[b-suhmar1jwo] {
    color: #9aa89c !important;
}
html[data-theme="dark"] .bk-inner label[b-suhmar1jwo] {
    color: #9aa89c !important;
}
html[data-theme="dark"] .bk-inner-yellow p[b-suhmar1jwo] {
    color: #d8c98f !important;
}

/* --- 清空卡：說明小框（淺灰底） --- */
html[data-theme="dark"] .bk-note[b-suhmar1jwo] {
    background: #242b27 !important;
    color: #9aa89c !important;
}

/* --- 還原卡：內層白色半透明說明框 --- */
html[data-theme="dark"] .bk-subbox[b-suhmar1jwo] {
    background: #242b27 !important;
    color: #9aa89c !important;
}
html[data-theme="dark"] .bk-subbox div[b-suhmar1jwo] {
    color: #d8c98f !important;
}

/* --- 還原卡：檔案上傳輸入框（淺藍/白底） --- */
html[data-theme="dark"] .bk-file-input[b-suhmar1jwo] {
    background: #1e2a33 !important;
    border-color: #3a443d !important;
    color: #f3e9dc !important;
}

/* --- 備份卡：年份/名稱輸入框 --- */
html[data-theme="dark"] .bk-inner .filter-input[b-suhmar1jwo] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .bk-inner .filter-input[b-suhmar1jwo]::placeholder {
    color: #6b7670;
}

/* --- 清空卡：核取方塊列（亮色為白底） --- */
html[data-theme="dark"] .bk-inner .checkbox-container[b-suhmar1jwo] {
    background: #1e2521;
    border-color: #3a443d;
}
html[data-theme="dark"] .bk-inner .checkbox-container:hover[b-suhmar1jwo] {
    background: #2e3631;
}
/* 「必選」灰色標籤（亮色 inline #555，暗色下對比不足） */
html[data-theme="dark"] .bk-inner .checkbox-label[style*="#555"][b-suhmar1jwo] {
    color: #9aa89c !important;
}

/* ==========================================================================
   歷屆活動存檔 —— 表格區
   ========================================================================== */
html[data-theme="dark"] .table-card[b-suhmar1jwo] {
    background: #1e2521;
    border-color: #3a443d;
}
html[data-theme="dark"] .data-table[b-suhmar1jwo] {
    color: #f3e9dc;
}
html[data-theme="dark"] .data-table thead th[b-suhmar1jwo] {
    background: #242b27;
    color: #f3e9dc;
    border-color: #3a443d;
}
html[data-theme="dark"] .data-table tbody td[b-suhmar1jwo] {
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .data-table tbody tr:hover td[b-suhmar1jwo] {
    background: #2e3631;
}
/* 備份時間文字（亮色 #888） */
html[data-theme="dark"] .data-table td[style*="color: #888"][b-suhmar1jwo] {
    color: #9aa89c !important;
}

/* 表格內行內編輯輸入框（Bootstrap form-control 白底） */
html[data-theme="dark"] .data-table .form-control[b-suhmar1jwo] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .data-table .form-control[b-suhmar1jwo]::placeholder {
    color: #6b7670;
}

/* ==========================================================================
   自訂彈窗
   ========================================================================== */

/* 訊息太長時在彈窗內捲動，不要撐出畫面（2026-10-15，ISSUES.md 第 175 項實測）。
   當時是後端例外的整段 stack trace 被原封不動顯示出來，那個來源已經擋掉了，
   這裡是給「以後其他沒預料到的長訊息」的保險。
   ⚠️ 用本頁專用的 class，不要改 .modal-body —— Backup.razor 檔尾的 .modal-body
      是全域樣式，改它會連帶影響閒置逾時等其他頁的彈窗（ISSUES.md 全域樣式污染那一項）。 */
.bk-modal-scroll[b-suhmar1jwo] {
    max-height: 50vh;
    overflow-y: auto;
    overflow-wrap: anywhere;
}

html[data-theme="dark"] .backup-modal-card[b-suhmar1jwo] {
    background: #1e2521;
}
html[data-theme="dark"] .modal-title[b-suhmar1jwo] {
    color: #f3e9dc;
}
html[data-theme="dark"] .modal-body[b-suhmar1jwo] {
    color: #9aa89c;
}
html[data-theme="dark"] .modal-input[b-suhmar1jwo] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .modal-input[b-suhmar1jwo]::placeholder {
    color: #6b7670;
}
/* 取消鈕（亮色為淺灰底） */
html[data-theme="dark"] .btn-cancel[b-suhmar1jwo] {
    background: #2e3631;
    color: #9aa89c;
}

/* ==========================================================================
   手機／平板版（2026-10-19）
   ========================================================================== */

/* ── 992px 以下卡片會換行：清空排最後（備份 → 還原 → 清空） ── */
@media (max-width: 991.98px) {
    .bk-card-archive[b-suhmar1jwo] { order: 1; }
    .bk-card-restore[b-suhmar1jwo] { order: 2; }
    .bk-card-reset[b-suhmar1jwo] { order: 3; }
}

/* ── 768px 以下 ── */
@media (max-width: 767.98px) {
    /* 卡片：取消 320px 最小寬度（小手機會超出畫面），兩層內距縮小 */
    .bk-cards[b-suhmar1jwo] { gap: 1rem; }
    .bk-card[b-suhmar1jwo] { min-width: 0; flex-basis: 100%; padding: 1.25rem 1rem; }
    .bk-inner[b-suhmar1jwo] { padding: 12px; }
    .maintenance-card.table-card[b-suhmar1jwo] { padding: 1.25rem 1rem; }

    /* 長說明收合 */
    .bk-collapse-toggle[b-suhmar1jwo] {
        display: block;
        width: 100%;
        text-align: left;
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 8px;
        padding: 10px 12px;
        margin-bottom: 10px;
        font-size: 0.85rem;
        font-weight: 700;
        color: #3f6b48;
        cursor: pointer;
    }
    .bk-collapse-toggle-warn[b-suhmar1jwo] { color: #8a6d3b; }
    .bk-collapsible:not(.is-open)[b-suhmar1jwo] { display: none; }

    html[data-theme="dark"] .bk-collapse-toggle[b-suhmar1jwo] {
        background: #242b27;
        border-color: #3a443d;
        color: #7fb389;
    }
    html[data-theme="dark"] .bk-collapse-toggle-warn[b-suhmar1jwo] { color: #d8c98f; }

    /* 歷屆存檔表格 → 卡片：
         年度
         活動名稱
         作品總數：N        總票數：N
         中獎資訊：…
         備份時間：…
         [編輯]  [刪除]  [下載]
       編輯中（is-editing）時「儲存／取消」佔滿一整行，刪除與下載移到下一行 */
    .bk-archive-table thead[b-suhmar1jwo] { display: none; }
    .bk-archive-table[b-suhmar1jwo], .bk-archive-table tbody[b-suhmar1jwo] { display: block; }
    .bk-archive-table tr[b-suhmar1jwo] {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-template-areas:
            "year year year year year year"
            "name name name name name name"
            "works works works votes votes votes"
            "win win win win win win"
            "time time time time time time"
            "edit edit del del dl dl";
        gap: 4px 8px;
        padding: 14px 2px;
        border-bottom: 1px solid #eee;
    }
    .bk-archive-table tr.is-editing[b-suhmar1jwo] {
        grid-template-areas:
            "year year year year year year"
            "name name name name name name"
            "works works works votes votes votes"
            "win win win win win win"
            "time time time time time time"
            "edit edit edit edit edit edit"
            "del del del dl dl dl";
    }
    .bk-archive-table tr:last-child[b-suhmar1jwo] { border-bottom: 0; }
    .bk-archive-table td[b-suhmar1jwo] { padding: 0; border: 0; min-width: 0; }
    .bk-archive-table tbody tr:hover td[b-suhmar1jwo] { background: transparent; }

    .bk-td-year[b-suhmar1jwo] { grid-area: year; color: #537D5D; font-size: 0.9rem; }
    .bk-td-name[b-suhmar1jwo] { grid-area: name; font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
    .bk-td-works[b-suhmar1jwo] { grid-area: works; font-size: 0.9rem; }
    .bk-td-votes[b-suhmar1jwo] { grid-area: votes; font-size: 0.9rem; }
    .bk-td-win[b-suhmar1jwo] { grid-area: win; font-size: 0.9rem; white-space: normal !important; }
    .bk-td-time[b-suhmar1jwo] { grid-area: time; }
    .bk-td-edit[b-suhmar1jwo] { grid-area: edit; margin-top: 8px; }
    .bk-td-del[b-suhmar1jwo] { grid-area: del; margin-top: 8px; }
    .bk-td-dl[b-suhmar1jwo] { grid-area: dl; margin-top: 8px; }

    .bk-td-edit .btn[b-suhmar1jwo],
    .bk-td-del .btn[b-suhmar1jwo],
    .bk-td-dl .btn[b-suhmar1jwo] { width: 100%; min-height: 38px; }
    .bk-td-edit .d-flex .btn[b-suhmar1jwo] { flex: 1 1 0; }

    .bk-archive-table td[data-label][b-suhmar1jwo]::before {
        content: attr(data-label) "：";
        color: #999;
        font-weight: 600;
    }

    html[data-theme="dark"] .bk-archive-table tr[b-suhmar1jwo] { border-bottom-color: #3a443d; }
    html[data-theme="dark"] .bk-archive-table tbody tr:hover td[b-suhmar1jwo] { background: transparent; }
    html[data-theme="dark"] .bk-td-year[b-suhmar1jwo] { color: #7fb389; }
    html[data-theme="dark"] .bk-archive-table td[data-label][b-suhmar1jwo]::before { color: #6b7670; }

    /* 彈窗 */
    .backup-modal-card[b-suhmar1jwo] { width: 92%; padding: 20px; }
    .modal-icon[b-suhmar1jwo] { font-size: 2.8rem; margin-bottom: 10px; }
}

/* ── 觸控裝置 ── */
@media (pointer: coarse) {
    .bk-archive-table .btn[b-suhmar1jwo] { min-height: 38px; }
}
/* 沒有滑鼠懸停：按鈕點完不要停在「浮起」狀態 */
@media (hover: none) {
    .modal-btn:hover[b-suhmar1jwo] { opacity: 1; transform: none; }
}
/* /Pages/BrandSettings.razor.rz.scp.css */
/* 〈網站品牌設定〉的版面。
   顏色一律走 app.css 的 --iva-* token，暗色模式就會自動跟著變 ——
   行內色碼在暗色下蓋不掉，會變成深字配深底（見 WorkSettings 的同類註解）。 */

.brand-container[b-cxwvq5t60f] {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.brand-header[b-cxwvq5t60f] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.brand-title[b-cxwvq5t60f] {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--iva-text-dark);
}

.brand-loading[b-cxwvq5t60f] {
    text-align: center;
    padding: 4rem;
    color: var(--iva-text-muted);
}

/* 左右兩欄：文字在左、預覽與圖片在右。窄螢幕改成單欄堆疊。 */
.brand-grid[b-cxwvq5t60f] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.brand-right[b-cxwvq5t60f] {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brand-card[b-cxwvq5t60f] {
    background: var(--iva-card-bg);
    border-radius: var(--iva-radius);
    box-shadow: var(--shadow-md);
    padding: 1.75rem;
}

.brand-card-title[b-cxwvq5t60f] {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--iva-text-dark);
    border-bottom: 2px solid rgba(128, 128, 128, 0.18);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.brand-card-icon[b-cxwvq5t60f] {
    background: #537D5D;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ─── 中／英分頁 ─── */

.brand-tabs[b-cxwvq5t60f] {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.brand-tab[b-cxwvq5t60f] {
    border: 1.5px solid rgba(128, 128, 128, 0.35);
    background: transparent;
    color: var(--iva-text-muted);
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

.brand-tab:hover[b-cxwvq5t60f] {
    border-color: #537D5D;
    color: #537D5D;
}

.brand-tab.active[b-cxwvq5t60f] {
    background: #537D5D;
    border-color: #537D5D;
    color: #fff;
}

/* 英文分頁裡那串要貼出去的網址。可能比卡片寬，讓它自己斷行而不是撐破版面。 */
.brand-url[b-cxwvq5t60f] {
    display: inline-block;
    margin: 4px 0;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(83, 125, 93, 0.14);
    color: var(--iva-text-dark);
    word-break: break-all;
}

/* ─── 表單 ─── */

.brand-field[b-cxwvq5t60f] {
    margin-bottom: 1.5rem;
}

.brand-field label[b-cxwvq5t60f] {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--iva-text-dark);
}

.brand-input[b-cxwvq5t60f] {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(128, 128, 128, 0.35);
    background: transparent;
    color: var(--iva-text-dark);
}

.brand-input:focus[b-cxwvq5t60f] {
    outline: none;
    border-color: #537D5D;
    box-shadow: 0 0 0 3px rgba(83, 125, 93, 0.18);
}

.brand-hint[b-cxwvq5t60f] {
    margin: 8px 0 0;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--iva-text-muted);
}

.brand-note[b-cxwvq5t60f] {
    margin-top: 1.25rem;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(128, 128, 128, 0.1);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--iva-text-muted);
}

/* ─── 預覽卡 ─── */

.brand-preview-card[b-cxwvq5t60f] {
    display: flex;
    gap: 14px;
    align-items: stretch;
    border: 1.5px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(128, 128, 128, 0.06);
}

.brand-preview-img[b-cxwvq5t60f] {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: #fff;
    flex: 0 0 auto;
    padding: 8px;
}

.brand-preview-text[b-cxwvq5t60f] {
    padding: 12px 14px 12px 0;
    min-width: 0;
}

.brand-preview-title[b-cxwvq5t60f] {
    font-weight: 700;
    color: var(--iva-text-dark);
    margin-bottom: 4px;
    /* LINE 的卡片標題最多兩行就截斷，預覽也照做，才看得出真實效果 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-preview-desc[b-cxwvq5t60f] {
    font-size: 0.85rem;
    color: var(--iva-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-preview-host[b-cxwvq5t60f] {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--iva-text-muted);
}

/* ─── 圖片區 ─── */

.brand-image-row[b-cxwvq5t60f] {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 1.25rem 0;
    border-bottom: 1px dashed rgba(128, 128, 128, 0.3);
}

.brand-image-row:last-of-type[b-cxwvq5t60f] {
    border-bottom: none;
    padding-bottom: 0;
}

/* LOGO 的底色刻意與導覽列一致（深綠），否則去背 PNG 在白卡片上看不出效果 */
.brand-image-box[b-cxwvq5t60f] {
    flex: 0 0 auto;
    width: 120px;
    height: 76px;
    border-radius: 10px;
    background: #537D5D;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.brand-image-box-light[b-cxwvq5t60f] {
    background: #fff;
    border: 1px solid rgba(128, 128, 128, 0.3);
}

.brand-image-box img[b-cxwvq5t60f] {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-image-info[b-cxwvq5t60f] {
    min-width: 0;
    flex: 1;
}

.brand-image-name[b-cxwvq5t60f] {
    font-weight: 700;
    color: var(--iva-text-dark);
    margin-bottom: 4px;
}

.brand-image-actions[b-cxwvq5t60f] {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* 選檔按鈕其實是 <label>（InputFile 本體藏起來），要自己補上手指游標 */
.brand-image-actions label[b-cxwvq5t60f] {
    cursor: pointer;
    margin: 0;
}

@media (max-width: 991.98px) {
    .brand-grid[b-cxwvq5t60f] {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .brand-container[b-cxwvq5t60f] {
        padding: 1.25rem 1rem 3rem;
    }

    .brand-image-row[b-cxwvq5t60f] {
        flex-direction: column;
    }
}
/* /Pages/ContestMaintenance.razor.rz.scp.css */
/* 賽事維護頁：暗色模式覆寫。僅新增 html[data-theme="dark"] 規則，不更動亮色外觀。 */

/* 頁面標題（亮色為深綠，暗色改米白以維持易讀） */
html[data-theme="dark"] .title[b-icqks2hb5n] {
    color: #f3e9dc;
}

html[data-theme="dark"] .page-header[b-icqks2hb5n] {
    border-bottom-color: #3a443d;
}

/* 卡片容器：白底 → 暗色卡片底 */
html[data-theme="dark"] .maintenance-card[b-icqks2hb5n] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}

/* 表單欄位標籤（亮色 #555 灰字） */
html[data-theme="dark"] .form-group label[b-icqks2hb5n] {
    color: #9aa89c;
}

/* 分隔標題與線條（亮色 #ccc 字、#eee 線） */
html[data-theme="dark"] .divider[b-icqks2hb5n] {
    color: #9aa89c;
}

html[data-theme="dark"] .divider[b-icqks2hb5n]::before,
html[data-theme="dark"] .divider[b-icqks2hb5n]::after {
    background-color: #3a443d;
}

/* 輸入框：白底 → 暗色底 */
html[data-theme="dark"] .settings-form input[type="text"][b-icqks2hb5n],
html[data-theme="dark"] .settings-form input[type="number"][b-icqks2hb5n],
html[data-theme="dark"] .settings-form input[type="datetime-local"][b-icqks2hb5n] {
    background-color: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}

html[data-theme="dark"] .settings-form input[b-icqks2hb5n]::placeholder {
    color: #6b7670;
}
/* /Pages/ContestSwitch.razor.rz.scp.css */
/* ============================================================
   切換比賽頁：本屆時程總覽（2026-09-15）

   為什麼是 .razor.css 而不是頁面裡的 <style>：
   本專案的頁內 <style> 是**全域生效**的（ISSUES.md 第 46 項），
   .schedule-* / .phase-* 這種名稱放全域很容易誤傷別頁。
   隔離樣式只會套到本元件，不必為了怕撞名而把 class 取得很長。
   ============================================================ */

.schedule-card[b-ls0gwpos3f] {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.schedule-head[b-ls0gwpos3f] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.schedule-title[b-ls0gwpos3f] {
    font-weight: 800;
    font-size: 1.15rem;
    color: #2d3748;
}

.schedule-sub[b-ls0gwpos3f] {
    margin-left: 10px;
    font-size: 0.85rem;
    color: #718096;
}

/* 目前階段的徽章：顏色就是狀態，不必再讀文字 */
.phase-badge[b-ls0gwpos3f] {
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    border: 1.5px solid transparent;
    white-space: nowrap;
}

.phase-upload[b-ls0gwpos3f]  { background: #ebf8ff; color: #2b6cb0; border-color: #bee3f8; }
.phase-vote[b-ls0gwpos3f]    { background: #f0fff4; color: #276749; border-color: #9ae6b4; }
.phase-waiting[b-ls0gwpos3f] { background: #fffaf0; color: #975a16; border-color: #f6c177; }
.phase-done[b-ls0gwpos3f]    { background: #f7fafc; color: #4a5568; border-color: #e2e8f0; }
.phase-none[b-ls0gwpos3f]    { background: #fff5f5; color: #c53030; border-color: #feb2b2; }

/* 卡片住在右側窄欄裡，放不下「階段｜日期區間｜備註」三欄並排
   （光是日期區間就有 33 個字），所以一律改成一列一組、上下堆疊。 */
.schedule-table[b-ls0gwpos3f] {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table tr[b-ls0gwpos3f] {
    display: block;
    border-top: 1px solid #edf2f7;
    padding: 10px 0;
}

.schedule-table td[b-ls0gwpos3f] {
    display: block;
    padding: 1px 0;
}

.schedule-stage[b-ls0gwpos3f] {
    font-weight: 700;
    color: #2d3748;
}

.schedule-range[b-ls0gwpos3f] {
    font-variant-numeric: tabular-nums;   /* 兩列的日期數字對得齊 */
    color: #4a5568;
    font-size: 0.9rem;
}

.schedule-note[b-ls0gwpos3f] {
    font-weight: 700;
    font-size: 0.9rem;
}

/* 側欄跟著捲動：左欄比它長很多，不釘住的話捲到「開新屆」時就看不到時程了 */
@media (min-width: 992px) {
    .schedule-sticky[b-ls0gwpos3f] {
        position: sticky;
        top: 16px;
    }
}

/* 每一列依自己的狀態上色 —— 進行中的那一列要最明顯 */
.row-active .schedule-note[b-ls0gwpos3f]  { color: #276749; }
.row-active .schedule-range[b-ls0gwpos3f] { color: #2d3748; font-weight: 600; }
.row-waiting .schedule-note[b-ls0gwpos3f] { color: #975a16; }
.row-done .schedule-note[b-ls0gwpos3f]    { color: #a0aec0; }
.row-none .schedule-note[b-ls0gwpos3f],
.row-none .schedule-range[b-ls0gwpos3f]   { color: #c53030; }

.schedule-foot[b-ls0gwpos3f] {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.82rem;
    color: #718096;
    line-height: 1.7;
}

/* ===== 暗色模式 ===== */
html[data-theme="dark"] .schedule-card[b-ls0gwpos3f] {
    background: #1e2521;
    border-color: #3a443d;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .schedule-title[b-ls0gwpos3f] { color: #f3e9dc; }
html[data-theme="dark"] .schedule-sub[b-ls0gwpos3f]   { color: #9aa89c; }
html[data-theme="dark"] .schedule-table td[b-ls0gwpos3f] { border-top-color: #3a443d; }
html[data-theme="dark"] .schedule-stage[b-ls0gwpos3f] { color: #f3e9dc; }
html[data-theme="dark"] .schedule-range[b-ls0gwpos3f] { color: #9aa89c; }
html[data-theme="dark"] .schedule-foot[b-ls0gwpos3f]  { color: #9aa89c; border-top-color: #3a443d; }

html[data-theme="dark"] .phase-upload[b-ls0gwpos3f]  { background: #1e2a33; color: #8ec5e8; border-color: #2f4a5a; }
html[data-theme="dark"] .phase-vote[b-ls0gwpos3f]    { background: #1e2f24; color: #7fd39a; border-color: #2f5a40; }
html[data-theme="dark"] .phase-waiting[b-ls0gwpos3f] { background: #2e2a1e; color: #e8c88a; border-color: #6b5a33; }
html[data-theme="dark"] .phase-done[b-ls0gwpos3f]    { background: #242b27; color: #9aa89c; border-color: #3a443d; }
html[data-theme="dark"] .phase-none[b-ls0gwpos3f]    { background: #33232a; color: #f0a5a5; border-color: #6b3a3a; }

html[data-theme="dark"] .row-active .schedule-note[b-ls0gwpos3f]  { color: #7fd39a; }
html[data-theme="dark"] .row-active .schedule-range[b-ls0gwpos3f] { color: #f3e9dc; }
html[data-theme="dark"] .row-waiting .schedule-note[b-ls0gwpos3f] { color: #e8c88a; }
html[data-theme="dark"] .row-done .schedule-note[b-ls0gwpos3f]    { color: #6b736c; }
html[data-theme="dark"] .row-none .schedule-note[b-ls0gwpos3f],
html[data-theme="dark"] .row-none .schedule-range[b-ls0gwpos3f]   { color: #f0a5a5; }

html[data-theme="dark"] .schedule-table tr[b-ls0gwpos3f] { border-top-color: #3a443d; }
/* /Pages/DataUpload.razor.rz.scp.css */
.step-number[b-a62o992mvm] {
    width: 32px;
    height: 32px;
    background: #537D5D;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}
.step-item[b-a62o992mvm] { transition: transform 0.2s; }
.step-item:hover[b-a62o992mvm] { transform: translateY(-3px); }

/* 本頁自己那份 Modal 樣式（.modal-overlay / .modal-card / .m-btn ⋯）已於 2026-09-07 移除
   —— 改用 Components/IvaModal.razor 元件，樣式來自 app.css 的 .iva-modal-*。
   見 ISSUES.md 第 66 項。 */

.toast-notification[b-a62o992mvm] { 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background: rgba(83, 125, 93, 0.95); 
    color: white; 
    padding: 18px 35px; 
    border-radius: 15px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    animation: fadeInOut-b-a62o992mvm 2.5s ease-in-out forwards; 
    z-index: 9999; 
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    pointer-events: none;
}
@keyframes fadeInOut-b-a62o992mvm { 
    0% { opacity: 0; transform: translate(-50%, -45%); } 
    15% { opacity: 1; transform: translate(-50%, -50%); } 
    85% { opacity: 1; transform: translate(-50%, -50%); } 
    100% { opacity: 0; transform: translate(-50%, -55%); } 
}
.fw-600[b-a62o992mvm] { font-weight: 600; }
.table th[b-a62o992mvm] { font-weight: 600; color: #555; border-bottom: 2px solid #eee; white-space: nowrap; }
.table td[b-a62o992mvm] { border-bottom: 1px solid #f0f0f0; height: 55px; }
.btn-success[b-a62o992mvm] { background-color: #537D5D; border-color: #537D5D; }
.btn-success:hover[b-a62o992mvm] { background-color: #43654b; border-color: #43654b; }
.btn-outline-primary[b-a62o992mvm] { color: #537D5D; border-color: #537D5D; }
.btn-outline-primary:hover[b-a62o992mvm] { background-color: #537D5D; color: #fff; }
.btn-outline-success[b-a62o992mvm] { color: #537D5D; border-color: #537D5D; }
.btn-outline-success:hover[b-a62o992mvm] { background-color: #537D5D; color: #fff; }
.table .form-control-sm[b-a62o992mvm] { padding: 0.2rem 0.5rem; font-size: 0.875rem; border-radius: 4px; }

/* 檔案標籤樣式 */
.file-badge[b-a62o992mvm] {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 2px;
    max-width: 180px;
    border: 1px solid transparent;
}

.upload-btn[b-a62o992mvm] {
    height: 42px;
    border: 2px dashed #537D5D;
    background-color: #f0fdf4;
    color: #537D5D;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    padding: 0 15px;
}
.upload-btn:hover[b-a62o992mvm] {
    background-color: #537D5D;
    color: white;
    border-style: solid;
}
.video-badge[b-a62o992mvm] { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.doc-badge[b-a62o992mvm] { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/*
 * 檔名顯示（ISSUES.md 第 2 項，2026-09-04 整併）
 *
 * 這裡是 .file-name 現在唯一的定義。原本散在三個地方：
 *   · wwwroot/css/app.css      全域，max-width: 200px  → 已移除
 *   · DataUpload.razor 的 <style>  也是全域，max-width: 100px → 已移除（層疊中它勝出）
 *   · 本檔（scoped）              flex: 1
 *
 * 不再設固定的 max-width：外層 .file-badge 已經有 max-width: 180px，
 * 由 flex 決定實際可用寬度、超出才用「…」截斷，比寫死像素值合理。
 * min-width: 0 是必要的 —— flex 子元素預設 min-width: auto，
 * 沒有它 text-overflow 不會生效（內容會把容器撐開而不是截斷）。
 *
 * font-size 與 color 是從被移除的全域規則搬過來的，維持原本外觀。
 */
.file-name[b-a62o992mvm] {
    font-size: 0.9rem;
    color: var(--color-dark-green);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.preview-link[b-a62o992mvm] {
    color: inherit;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
    cursor: pointer;
}
.preview-link:hover[b-a62o992mvm] { opacity: 1; color: #000; }

/*
 * 編輯模式下唯讀的欄位（組長／組員）。2026-10-01
 *
 * 其他欄位在編輯模式會變成輸入框，這兩欄不會 —— 若外觀與「沒在編輯」時
 * 完全一樣，管理員會以為是自己沒點到編輯鈕，然後一直重試。
 * 所以給它一個明確的「這格被鎖住」的樣子：灰底、虛線框、滑鼠游標是 not-allowed。
 */
.locked-field[b-a62o992mvm] {
    display: inline-block;
    padding: 2px 6px;
    border: 1px dashed #c8cdc9;
    border-radius: 4px;
    background: #f4f5f4;
    color: #666;
    font-size: 0.86rem;
    cursor: not-allowed;
}

/* 暗色模式。上面那個 #f4f5f4 淺灰底在深色背景上會變成一塊刺眼的白，
   而 #666 文字在它上面又讀不出來。這是本檔第一條 data-theme 規則 ——
   這一頁其餘的暗色樣式在全域 app.css，新增頁面專屬樣式時記得一併補這一段。 */
html[data-theme="dark"] .locked-field[b-a62o992mvm] {
    border-color: #3a443d;
    background: #242b27;
    color: #9aa89c;
}
/* /Pages/EditSubmission.razor.rz.scp.css */
/* ──────────────────────────────────────────────────────────────
   【修改我的投稿】EditSubmission.razor 的隔離樣式
   2026-10-13

   ⚠️ 樣式一定要寫在這個檔案，**不要**放回頁內的 <style> 區塊 ——
      這個專案的頁內 <style> 是全域生效的（ISSUES.md 第 46 項），
      而這一頁用的 class 名稱（.card、.text-input、.notice⋯）非常通用，
      寫在頁內會污染其他頁面。

   ⚠️ 深色模式：原本這裡寫「顏色一律用 app.css 既有的 CSS 變數」，但實際用的 --iva-* 變數
      多數在 app.css 不存在，會掉回亮色備用值（ISSUES.md 第 204 項）。
      暗色一律寫在檔尾的 html[data-theme="dark"] 區塊；新增有顏色的 class 時，那裡要一起補。
   ────────────────────────────────────────────────────────────── */

.edit-submission-container[b-p7wpdtfot4] {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

/* ── 頁首 ───────────────────────────────────────────────────── */

.page-header[b-p7wpdtfot4] {
    margin-bottom: 20px;
}

.back-link[b-p7wpdtfot4] {
    background: none;
    border: none;
    color: var(--iva-link, #537D5D);
    cursor: pointer;
    font-size: .95rem;
    padding: 4px 0;
    margin-bottom: 8px;
}

.back-link:hover[b-p7wpdtfot4] {
    text-decoration: underline;
}

.title[b-p7wpdtfot4] {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--iva-text, #222);
}

.subtitle[b-p7wpdtfot4] {
    margin: 0;
    color: var(--iva-text-muted, #666);
    font-size: .95rem;
}

/* ── 狀態區塊（載入中／失敗）──────────────────────────────── */

.state-box[b-p7wpdtfot4] {
    text-align: center;
    padding: 56px 20px;
    color: var(--iva-text-muted, #666);
}

.state-box.error[b-p7wpdtfot4] {
    color: var(--iva-text, #222);
}

.state-icon[b-p7wpdtfot4] {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 12px;
}

.loading-ring[b-p7wpdtfot4] {
    width: 36px;
    height: 36px;
    margin: 0 auto 12px;
    border: 3px solid var(--iva-border, #ddd);
    border-top-color: var(--iva-accent, #537D5D);
    border-radius: 50%;
    animation: spin-b-p7wpdtfot4 1s linear infinite;
}

@keyframes spin-b-p7wpdtfot4 {
    to { transform: rotate(360deg); }
}

/* ── 提示條 ─────────────────────────────────────────────────── */

.notice[b-p7wpdtfot4] {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.notice strong[b-p7wpdtfot4] {
    display: block;
    margin-bottom: 2px;
}

.notice p[b-p7wpdtfot4] {
    margin: 0;
    font-size: .92rem;
}

/* 中性告知。用在「修改後會重新送審」那一條 ——
   它陳述的是流程，不是風險，所以刻意不走 .warn 的黃底驚嘆號配色
   （2026-10-13，理由見 EditSubmission.razor 那段註解）。 */
.notice.info[b-p7wpdtfot4] {
    background: var(--iva-info-bg, #EEF3F7);
    color: var(--iva-info-text, #3A5468);
}

/* 目前沒有用到，但保留 —— 這一頁日後真的要警告使用者時用這一個，
   不要把 .info 改成黃色了事，兩者的語氣分工是刻意的。 */
.notice.warn[b-p7wpdtfot4] {
    background: var(--iva-warn-bg, #FFF6E5);
    color: var(--iva-warn-text, #7A5200);
}

.notice.blocked[b-p7wpdtfot4] {
    background: var(--iva-muted-bg, #F0F0F0);
    color: var(--iva-text, #333);
}

/* 退件。這一條要顯眼 —— 它是他打開這一頁的原因。 */
.notice.reject[b-p7wpdtfot4] {
    background: var(--iva-danger-bg, #FDECEA);
    color: var(--iva-danger, #B3261E);
}

/* 原因全文照登、不截斷（pre-wrap 保留承辦人打的換行）。 */
.reject-reason[b-p7wpdtfot4] {
    margin: 2px 0 6px;
    font-weight: 700;
    white-space: pre-wrap;
    word-break: break-word;
}

.reject-note[b-p7wpdtfot4] {
    margin: 0;
    font-size: .86rem;
    opacity: .85;
}

/* 檔案格旁邊的退件原因 */
.file-slot-reject[b-p7wpdtfot4] {
    margin-top: 4px;
    font-size: .86rem;
    line-height: 1.6;
    font-weight: 600;
    color: var(--iva-danger, #B3261E);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── 卡片 ───────────────────────────────────────────────────── */

.card[b-p7wpdtfot4] {
    background: var(--iva-card-bg, #fff);
    border: 1px solid var(--iva-border, #e5e5e5);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

.card-title[b-p7wpdtfot4] {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--iva-accent, #537D5D);
}

.item-code[b-p7wpdtfot4] {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    background: var(--iva-muted-bg, #F0F0F0);
    padding: 2px 8px;
    border-radius: 6px;
}

/* ── 唯讀資訊 ───────────────────────────────────────────────── */

.info-grid[b-p7wpdtfot4] {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.info-row[b-p7wpdtfot4] {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.info-label[b-p7wpdtfot4] {
    min-width: 72px;
    color: var(--iva-text-muted, #666);
    font-size: .9rem;
}

.info-value[b-p7wpdtfot4] {
    color: var(--iva-text, #222);
    font-weight: 600;
}

.readonly-note[b-p7wpdtfot4] {
    margin: 10px 0 0;
    padding: 10px 12px;
    background: var(--iva-muted-bg, #F6F6F6);
    border-radius: 10px;
    font-size: .88rem;
    line-height: 1.6;
    color: var(--iva-text-muted, #555);
}

/* ── 表單 ───────────────────────────────────────────────────── */

.field-label[b-p7wpdtfot4] {
    display: block;
    margin: 14px 0 6px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--iva-text, #333);
}

.text-input[b-p7wpdtfot4],
.text-area[b-p7wpdtfot4] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--iva-border, #ccc);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--iva-input-bg, #fff);
    color: var(--iva-text, #222);
}

.text-area[b-p7wpdtfot4] {
    resize: vertical;
    line-height: 1.7;
}

.text-input:disabled[b-p7wpdtfot4],
.text-area:disabled[b-p7wpdtfot4] {
    background: var(--iva-muted-bg, #F2F2F2);
    color: var(--iva-text-muted, #777);
    cursor: not-allowed;
}

/* 紅框只在送出過一次之後才會出現（見頁面的 submitted 旗標）——
   一進頁面就滿江紅會讓人以為自己做錯了什麼。 */
.text-input.invalid[b-p7wpdtfot4],
.text-area.invalid[b-p7wpdtfot4] {
    border-color: var(--iva-danger, #C0392B);
    background: var(--iva-danger-bg, #FDF0EF);
}

.field-error[b-p7wpdtfot4] {
    margin: 6px 0 0;
    color: var(--iva-danger, #C0392B);
    font-size: .86rem;
}

.radio-row[b-p7wpdtfot4] {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.radio-item[b-p7wpdtfot4] {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ── 檔案格 ─────────────────────────────────────────────────── */

.file-slot[b-p7wpdtfot4] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px;
    margin-top: 14px;
    border: 1px solid var(--iva-border, #e5e5e5);
    border-radius: 12px;
    background: var(--iva-muted-bg, #FAFAFA);
}

.file-slot-info[b-p7wpdtfot4] {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.file-slot-label[b-p7wpdtfot4] {
    font-weight: 700;
    color: var(--iva-text, #222);
}

.file-slot-meta[b-p7wpdtfot4] {
    font-size: .88rem;
    color: var(--iva-text-muted, #666);
}

.file-slot-meta.missing[b-p7wpdtfot4] {
    color: var(--iva-danger, #C0392B);
}

.file-slot-hint[b-p7wpdtfot4] {
    font-size: .82rem;
    color: var(--iva-text-muted, #888);
}

/* InputFile 包在 <label> 裡，所以按鈕本身是 label。
   原生的 file input 用 .visually-hidden 藏起來（不是 display:none ——
   那會讓鍵盤操作完全點不到）。 */
.replace-btn[b-p7wpdtfot4] {
    flex-shrink: 0;
    display: inline-block;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid var(--iva-accent, #537D5D);
    color: var(--iva-accent, #537D5D);
    background: transparent;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
}

.replace-btn:hover[b-p7wpdtfot4] {
    background: var(--iva-accent, #537D5D);
    color: #fff;
}

.replace-btn.disabled[b-p7wpdtfot4] {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

.visually-hidden[b-p7wpdtfot4] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── 儲存列 ─────────────────────────────────────────────────── */

.save-bar[b-p7wpdtfot4] {
    position: sticky;
    bottom: 0;
    background: var(--iva-card-bg, #fff);
    border-top: 1px solid var(--iva-border, #e5e5e5);
    padding: 14px 0 18px;
    margin-top: 8px;
}

.save-note[b-p7wpdtfot4] {
    margin: 0 0 10px;
    font-size: .86rem;
    line-height: 1.6;
    color: var(--iva-text-muted, #666);
}

/* 儲存鈕置中。
   ⚠️ 只置中按鈕，**上面的說明文字維持靠左** —— 那兩段是完整的句子，
      置中之後每一行的起點都不一樣，讀起來比較吃力。
   📌 選擇器限定在 .save-bar 底下：.primary-btn 也用在載入失敗的 .btn-row
      與空狀態，那些地方的排列由各自的容器決定，不要被這裡波及。 */
.save-bar .primary-btn[b-p7wpdtfot4] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 截止後「只能補正一次」的警告。做成有底色的一條，不要混在灰色說明裡 ——
   按下去就不能再改了，那是他需要停一秒的地方。 */
.save-warn[b-p7wpdtfot4] {
    margin: 0 0 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--iva-warn-bg, #FFF6E5);
    color: var(--iva-warn-text, #7A5200);
    font-size: .88rem;
    line-height: 1.6;
}

/* 儲存鈕停用時的說明。
   ⚠️ 不要拿掉 —— 按鈕暗掉卻沒有任何說明，使用者不知道是哪一格有問題
      （2026-10-13 實測回報的就是這個）。 */
.save-blocked[b-p7wpdtfot4] {
    margin: 0 0 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--iva-danger-bg, #FDECEA);
    color: var(--iva-danger, #B3261E);
    font-size: .88rem;
    line-height: 1.6;
}

.btn-row[b-p7wpdtfot4] {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.primary-btn[b-p7wpdtfot4] {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    background: var(--iva-accent, #537D5D);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.primary-btn:disabled[b-p7wpdtfot4] {
    opacity: .45;
    cursor: not-allowed;
}

.ghost-btn[b-p7wpdtfot4] {
    padding: 12px 24px;
    border: 1px solid var(--iva-border, #ccc);
    border-radius: 10px;
    background: transparent;
    color: var(--iva-text, #333);
    font-size: 1rem;
    cursor: pointer;
}

/* 註：這裡原本有 .status-badge 的四條規則（審核狀態徽章）。
   2026-10-13 隨著這一頁的審核徽章移除而刪掉 ——
   審核狀態現在是**整組一個**，顯示在「我的投稿」那一頁。
   需要同樣的徽章樣式時請看 MySubmissions.razor.css，不要在這裡重建一份。 */

.last-modified[b-p7wpdtfot4] {
    margin: 10px 0 0;
    text-align: right;
    font-size: .86rem;
    color: var(--iva-text-muted, #777);
}

/* ── 手機 ───────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .edit-submission-container[b-p7wpdtfot4] {
        padding: 16px 12px 64px;
    }

    .file-slot[b-p7wpdtfot4] {
        flex-direction: column;
        align-items: stretch;
    }

    .replace-btn[b-p7wpdtfot4] {
        text-align: center;
    }
}

/* ── 暗色模式（ISSUES.md 第 204 項，2026-10-28）──────────────────
   上面用的 --iva-* 變數，app.css 只有定義 --iva-card-bg 與 --iva-text-muted，
   其餘一律掉回亮色備用值 —— 所以暗色在這裡逐條覆寫，亮色規則一行不動。
   色值與「我的投稿」（MySubmissions.razor.css 暗色區）一致，兩頁看起來是同一套。
   ⚠️ .text-area 一定要寫：app.css 全域的 `html[data-theme="dark"] textarea`
      權重比這裡的 scoped `.text-area` 低，蓋不過去（輸入框是 input[type=text]，權重較高，原本就是暗的）。 */

html[data-theme="dark"] .title[b-p7wpdtfot4],
html[data-theme="dark"] .state-box.error[b-p7wpdtfot4],
html[data-theme="dark"] .info-value[b-p7wpdtfot4],
html[data-theme="dark"] .file-slot-label[b-p7wpdtfot4],
html[data-theme="dark"] .ghost-btn[b-p7wpdtfot4] {
    color: #f3e9dc;
}

html[data-theme="dark"] .subtitle[b-p7wpdtfot4],
html[data-theme="dark"] .state-box[b-p7wpdtfot4],
html[data-theme="dark"] .info-label[b-p7wpdtfot4],
html[data-theme="dark"] .file-slot-meta[b-p7wpdtfot4],
html[data-theme="dark"] .file-slot-hint[b-p7wpdtfot4],
html[data-theme="dark"] .save-note[b-p7wpdtfot4],
html[data-theme="dark"] .last-modified[b-p7wpdtfot4] {
    color: #9aa89c;
}

html[data-theme="dark"] .card-title[b-p7wpdtfot4],
html[data-theme="dark"] .field-label[b-p7wpdtfot4] {
    color: #7fb389;
}

html[data-theme="dark"] .card[b-p7wpdtfot4] {
    border-color: #3a443d;
}

html[data-theme="dark"] .item-code[b-p7wpdtfot4] {
    background: #242b27;
    color: #7fb389;
}

html[data-theme="dark"] .loading-ring[b-p7wpdtfot4] {
    border-color: #3a443d;
    border-top-color: #7fb389;
}

/* 提示條：亮色是「淺底深字」，暗色改成「深底亮字」，色相不變 */
html[data-theme="dark"] .notice.info[b-p7wpdtfot4] {
    background: #1e2a32;
    color: #a9c4d8;
}

html[data-theme="dark"] .notice.warn[b-p7wpdtfot4],
html[data-theme="dark"] .save-warn[b-p7wpdtfot4] {
    background: #3d3018;
    color: #f5c877;
}

html[data-theme="dark"] .notice.blocked[b-p7wpdtfot4],
html[data-theme="dark"] .readonly-note[b-p7wpdtfot4] {
    background: #242b27;
    color: #9aa89c;
}

html[data-theme="dark"] .notice.reject[b-p7wpdtfot4],
html[data-theme="dark"] .save-blocked[b-p7wpdtfot4] {
    background: #2e1f20;
    color: #ef8a90;
}

html[data-theme="dark"] .file-slot-reject[b-p7wpdtfot4],
html[data-theme="dark"] .file-slot-meta.missing[b-p7wpdtfot4],
html[data-theme="dark"] .field-error[b-p7wpdtfot4] {
    color: #ef8a90;
}

/* 表單：與 app.css 全域輸入框的暗色一致 */
html[data-theme="dark"] .text-input[b-p7wpdtfot4],
html[data-theme="dark"] .text-area[b-p7wpdtfot4] {
    background: var(--iva-card-bg);
    color: #f3e9dc;
    border-color: #3a443d;
}

html[data-theme="dark"] .text-input:disabled[b-p7wpdtfot4],
html[data-theme="dark"] .text-area:disabled[b-p7wpdtfot4] {
    background: #242b27;
    color: #7c8a7f;
}

html[data-theme="dark"] .text-input.invalid[b-p7wpdtfot4],
html[data-theme="dark"] .text-area.invalid[b-p7wpdtfot4] {
    background: #2e1f20;
    border-color: #c0525a;
}

/* 檔案格 */
html[data-theme="dark"] .file-slot[b-p7wpdtfot4] {
    background: #242b27;
    border-color: #3a443d;
}

html[data-theme="dark"] .replace-btn[b-p7wpdtfot4] {
    border-color: #7fb389;
    color: #7fb389;
}

html[data-theme="dark"] .replace-btn:hover[b-p7wpdtfot4] {
    background: #4d6b54;
    border-color: #4d6b54;
    color: #fff;
}

/* 儲存列與按鈕 */
html[data-theme="dark"] .save-bar[b-p7wpdtfot4] {
    border-top-color: #3a443d;
}

html[data-theme="dark"] .primary-btn[b-p7wpdtfot4] {
    background: #4d6b54;
}

html[data-theme="dark"] .primary-btn:hover:not(:disabled)[b-p7wpdtfot4] {
    background: #5f8168;
}

html[data-theme="dark"] .ghost-btn[b-p7wpdtfot4] {
    border-color: #3a443d;
}
/* /Pages/EligibleVoters.razor.rz.scp.css */
/* =================================================================
   合格抽獎名單查詢（/eligible-voters）
   2026-10-19：原本幾乎全是 inline style ＋頁內 <style>，為了做手機版全部搬來這裡。
   亮色桌機外觀與搬移前相同；手機／平板規則在檔尾。
   ================================================================= */

.voter-page-container[b-rgrb5m28r9] { padding: 2rem 4rem; width: 100%; margin: 0; font-family: sans-serif; box-sizing: border-box; }

.ev-layout[b-rgrb5m28r9] { display: grid; grid-template-columns: 320px 1fr; gap: 3rem; align-items: start; }
.ev-aside[b-rgrb5m28r9] { position: sticky; top: 2rem; }
.ev-main[b-rgrb5m28r9] { min-width: 0; }

/* ── 規則說明卡 ── */
.ev-rule-card[b-rgrb5m28r9] {
    background: #fdfaea;
    border: 2px solid #fde68a;
    padding: 2rem;
    border-radius: 20px;
    color: #92400e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.ev-rule-title[b-rgrb5m28r9] { font-weight: 900; margin-top: 0; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; }
.ev-rule-list[b-rgrb5m28r9] { margin: 0; padding-left: 1.2rem; line-height: 1.8; font-size: 1rem; font-weight: 500; list-style-type: decimal; }
.ev-rule-note[b-rgrb5m28r9] { margin-top: 10px; color: #b45309; font-weight: 700; }
.ev-footer[b-rgrb5m28r9] { margin-top: 2rem; padding: 1rem; color: #a0aec0; font-size: 0.85rem; line-height: 1.5; }

/* ── 頁首 ── */
.ev-header[b-rgrb5m28r9] {
    margin-bottom: 2.5rem;
    border-bottom: 4px solid #f0f7f2;
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}
.ev-title[b-rgrb5m28r9] { color: #537D5D; font-weight: 900; font-size: 2.2rem; letter-spacing: 1px; margin: 0; }
.ev-subtitle[b-rgrb5m28r9] { color: #718096; margin-top: 0.5rem; font-weight: 500; }
.ev-updated[b-rgrb5m28r9] { text-align: right; flex-shrink: 0; }
.ev-updated-label[b-rgrb5m28r9] { font-size: 1rem; color: #4a5568; font-weight: 600; }
.ev-updated-time[b-rgrb5m28r9] { color: #a0aec0; font-size: 0.9rem; font-weight: 500; }

/* ── 統計與搜尋 ── */
.ev-toolbar[b-rgrb5m28r9] { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; gap: 2rem; }
.ev-stats-card[b-rgrb5m28r9] {
    background: white;
    padding: 1.2rem 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f0f4f2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.ev-stats-label[b-rgrb5m28r9] { font-size: 1.1rem; color: #4a5568; font-weight: 600; }
.ev-stats-count[b-rgrb5m28r9] { font-size: 2.2rem; color: #537D5D; font-weight: 900; margin: 0 10px; }
.ev-select-wrap[b-rgrb5m28r9] { border-left: 2px solid #edf2f7; padding-left: 1.5rem; }
.ev-select[b-rgrb5m28r9] {
    padding: 8px 15px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    outline: none;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: 0.2s;
    background: #f8fafc;
}

.ev-search[b-rgrb5m28r9] { flex: 1; max-width: 400px; position: relative; }
.ev-search-group[b-rgrb5m28r9] { position: relative; display: flex; align-items: center; width: 100%; }
.ev-search-icon[b-rgrb5m28r9] { position: absolute; left: 15px; color: #a0aec0; font-size: 1.1rem; }
.ev-search-input[b-rgrb5m28r9] {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border-radius: 12px;
    border: 2.2px solid #e2e8f0;
    font-size: 1.05rem;
    outline: none;
    transition: 0.3s;
    background: white;
    height: 46px;
}
/* 原本是 inline onfocus／onblur 改 style */
.ev-search-input:focus[b-rgrb5m28r9] { border-color: #537D5D; box-shadow: 0 4px 15px rgba(83, 125, 93, 0.1); }

.ev-clear-btn[b-rgrb5m28r9] {
    position: absolute;
    right: 10px;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
/* 原本是 inline onmouseover／onmouseout 改 style */
.ev-clear-btn:hover[b-rgrb5m28r9] { background-color: #fee2e2; color: #ef4444; transform: scale(1.1); }

/* ── 名單表格 ── */
.ev-table-card[b-rgrb5m28r9] {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid #f0f4f2;
    overflow: hidden;
}
.ev-table-scroll[b-rgrb5m28r9] { overflow-x: auto; }

.voter-full-table[b-rgrb5m28r9] { width: 100%; border-collapse: collapse; }
.voter-full-table th[b-rgrb5m28r9] { text-align: left; padding: 1.2rem; color: #537D5D; font-weight: 800; border-bottom: 2px solid #f0f7f2; }
.voter-full-table td[b-rgrb5m28r9] { padding: 1.2rem; border-bottom: 1px solid #f8fafc; transition: 0.2s; }
.voter-full-table tr:hover td[b-rgrb5m28r9] { background: #fcfdfd; }

.voter-full-table th.ev-th-no[b-rgrb5m28r9] { width: 80px; padding-left: 2rem; }
.voter-full-table th.ev-th-status[b-rgrb5m28r9] { text-align: center; }
.voter-full-table th.ev-th-win[b-rgrb5m28r9] { text-align: center; padding-right: 2rem; }

.voter-full-table td.ev-cell-empty[b-rgrb5m28r9] { text-align: center; padding: 5rem; color: #cbd5e0; }
.voter-full-table td.ev-cell-no[b-rgrb5m28r9] { color: #cbd5e0; font-weight: bold; padding-left: 2rem; }
.ev-cell-account[b-rgrb5m28r9] { font-family: 'Courier New', monospace; font-weight: 800; font-size: 1.1rem; color: #2d3748; }
.ev-cell-dept[b-rgrb5m28r9] { color: #4a5568; }
.ev-cell-name[b-rgrb5m28r9] { font-weight: 600; color: #4a5568; }
.voter-full-table td.ev-cell-status[b-rgrb5m28r9] { text-align: center; }
.voter-full-table td.ev-cell-win[b-rgrb5m28r9] { text-align: center; padding-right: 2rem; }

.ev-badge[b-rgrb5m28r9] { padding: 6px 18px; border-radius: 20px; font-size: 0.85rem; font-weight: 800; display: inline-block; }
.ev-badge-eligible[b-rgrb5m28r9] { background: #f0fff4; color: #28a745; border: 1.5px solid #c6f6d5; }
.ev-badge-won[b-rgrb5m28r9] { background: #fff5f5; color: #e53e3e; border: 1.5px solid #fed7d7; }
.ev-badge-notwon[b-rgrb5m28r9] { background: #f7fafc; color: #718096; border: 1.5px solid #e2e8f0; }

/* ===== Dark mode overrides (合格名單查詢) =====
   原本為了蓋過 inline style 都帶 !important；inline 已移除，但保留不動以免改變權重關係。 */
html[data-theme="dark"] .ev-rule-card[b-rgrb5m28r9] {
    background: #2b2a1e !important;
    border-color: #3a443d !important;
    color: #f3e9dc !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.35) !important;
}
html[data-theme="dark"] .ev-rule-title[b-rgrb5m28r9] { color: #f3e9dc; }
html[data-theme="dark"] .ev-rule-note[b-rgrb5m28r9] { color: #7fb389 !important; }

html[data-theme="dark"] .ev-stats-card[b-rgrb5m28r9] {
    background: #1e2521 !important;
    border-color: #3a443d !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.35) !important;
}
html[data-theme="dark"] .ev-select-wrap[b-rgrb5m28r9] { border-left-color: #3a443d !important; }
html[data-theme="dark"] .ev-select[b-rgrb5m28r9] {
    background: #1e2521 !important;
    border-color: #3a443d !important;
    color: #f3e9dc !important;
}
html[data-theme="dark"] .ev-select option[b-rgrb5m28r9] { background: #1e2521; color: #f3e9dc; }

html[data-theme="dark"] .ev-search-input[b-rgrb5m28r9] {
    background: #1e2521 !important;
    border-color: #3a443d !important;
    color: #f3e9dc !important;
}
html[data-theme="dark"] .ev-search-input:focus[b-rgrb5m28r9] { border-color: #7fb389 !important; }
html[data-theme="dark"] .ev-search-input[b-rgrb5m28r9]::placeholder { color: #6b7670 !important; }

html[data-theme="dark"] .ev-clear-btn[b-rgrb5m28r9] {
    background: #242b27 !important;
    color: #9aa89c !important;
}

html[data-theme="dark"] .ev-table-card[b-rgrb5m28r9] {
    background: #1e2521 !important;
    border-color: #3a443d !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.45) !important;
}
html[data-theme="dark"] .voter-full-table th[b-rgrb5m28r9] {
    color: #7fb389;
    border-bottom-color: #3a443d;
}
html[data-theme="dark"] .voter-full-table td[b-rgrb5m28r9] {
    border-bottom-color: #242b27;
}
html[data-theme="dark"] .voter-full-table tr:hover td[b-rgrb5m28r9] { background: #2e3631; }

html[data-theme="dark"] .ev-cell-account[b-rgrb5m28r9] { color: #f3e9dc !important; }
html[data-theme="dark"] .ev-cell-dept[b-rgrb5m28r9] { color: #9aa89c !important; }
html[data-theme="dark"] .ev-cell-name[b-rgrb5m28r9] { color: #f3e9dc !important; }

html[data-theme="dark"] .ev-badge-notwon[b-rgrb5m28r9] {
    background: #242b27 !important;
    color: #9aa89c !important;
    border-color: #3a443d !important;
}

/* ================================================================= */
/* 手機／平板版（2026-10-19）                                          */
/* ================================================================= */

/* ── 992px 以下：上下排，順序為 標題 → 規則說明 → 統計與搜尋 → 名單 → 頁尾 ──
   規則卡在 aside、標題與統計在 main，要穿插排序只能把兩層都用 display: contents 拆開，
   讓裡面的區塊直接成為 .ev-layout 的格線項目，再用 order 排。
   區塊間距統一交給 grid gap，所以原本各區塊的 margin 歸零，避免間距疊加。 */
@media (max-width: 991.98px) {
    .voter-page-container[b-rgrb5m28r9] { padding: 1.5rem; }
    .ev-layout[b-rgrb5m28r9] { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .ev-aside[b-rgrb5m28r9],
    .ev-main[b-rgrb5m28r9] { display: contents; }

    .ev-header[b-rgrb5m28r9] { order: 1; margin-bottom: 0; }
    .ev-rule-card[b-rgrb5m28r9] { order: 2; }
    .ev-toolbar[b-rgrb5m28r9] { order: 3; margin-bottom: 0; }
    .ev-table-card[b-rgrb5m28r9] { order: 4; }
    .ev-footer[b-rgrb5m28r9] { order: 5; margin-top: 0; padding-top: 0; }
}

/* ── 768px 以下：頁首與統計列上下排、名單改卡片 ── */
@media (max-width: 767.98px) {
    .voter-page-container[b-rgrb5m28r9] { padding: 1rem; }

    .ev-layout[b-rgrb5m28r9] { gap: 1.25rem; }
    .ev-header[b-rgrb5m28r9] { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding-bottom: 1rem; }
    .ev-title[b-rgrb5m28r9] { font-size: 1.6rem; }
    .ev-updated[b-rgrb5m28r9] { text-align: left; display: flex; flex-wrap: wrap; gap: 0 0.5rem; align-items: baseline; }
    .ev-updated-label[b-rgrb5m28r9] { font-size: 0.9rem; }
    .ev-updated-time[b-rgrb5m28r9] { font-size: 0.85rem; }

    .ev-toolbar[b-rgrb5m28r9] { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .ev-stats-card[b-rgrb5m28r9] { padding: 0.9rem 1.25rem; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
    .ev-stats-label[b-rgrb5m28r9] { font-size: 1rem; }
    .ev-stats-count[b-rgrb5m28r9] { font-size: 1.7rem; margin: 0 6px; }
    .ev-select-wrap[b-rgrb5m28r9] { padding-left: 1rem; }
    .ev-search[b-rgrb5m28r9] { max-width: none; }

    .ev-rule-card[b-rgrb5m28r9] { padding: 1.25rem; }
    .ev-rule-title[b-rgrb5m28r9] { margin-bottom: 0.75rem; font-size: 1.15rem; }
    .ev-rule-list[b-rgrb5m28r9] { font-size: 0.92rem; line-height: 1.7; }

    /* 表格 → 卡片：
         姓名                 #序號
         帳號
         單位
         [中獎狀態標籤]
       「資格狀態」每列都是「符合資格」，手機上不顯示 */
    .ev-table-card[b-rgrb5m28r9] { border-radius: 16px; }
    .ev-table-scroll[b-rgrb5m28r9] { overflow-x: visible; }
    .voter-full-table thead[b-rgrb5m28r9] { display: none; }
    .voter-full-table[b-rgrb5m28r9], .voter-full-table tbody[b-rgrb5m28r9] { display: block; }
    .voter-full-table tr[b-rgrb5m28r9] {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "name no"
            "account account"
            "dept dept"
            "win win";
        column-gap: 12px;
        row-gap: 2px;
        padding: 14px 16px;
        border-bottom: 1px solid #f0f4f2;
    }
    .voter-full-table tr:last-child[b-rgrb5m28r9] { border-bottom: 0; }
    .voter-full-table td[b-rgrb5m28r9] { padding: 0; border-bottom: 0; min-width: 0; }
    .voter-full-table tr:hover td[b-rgrb5m28r9] { background: transparent; }

    .voter-full-table td.ev-cell-no[b-rgrb5m28r9] { grid-area: no; padding-left: 0; font-size: 0.85rem; align-self: start; }
    .voter-full-table td.ev-cell-name[b-rgrb5m28r9] { grid-area: name; font-size: 1.05rem; font-weight: 800; }
    .voter-full-table td.ev-cell-account[b-rgrb5m28r9] { grid-area: account; font-size: 0.95rem; overflow-wrap: anywhere; }
    .voter-full-table td.ev-cell-dept[b-rgrb5m28r9] { grid-area: dept; font-size: 0.9rem; }
    .voter-full-table td.ev-cell-status[b-rgrb5m28r9] { display: none; }
    .voter-full-table td.ev-cell-win[b-rgrb5m28r9] { grid-area: win; text-align: left; padding-right: 0; padding-top: 8px; }
    .voter-full-table td.ev-cell-empty[b-rgrb5m28r9] { grid-column: 1 / -1; padding: 3rem 1rem; }

    .ev-badge[b-rgrb5m28r9] { padding: 4px 14px; font-size: 0.8rem; }

    html[data-theme="dark"] .voter-full-table tr[b-rgrb5m28r9] { border-bottom-color: #3a443d; }
    html[data-theme="dark"] .voter-full-table tr:hover td[b-rgrb5m28r9] { background: transparent; }
}

/* ── 觸控裝置：清除搜尋鈕放大，不留懸停狀態 ── */
@media (pointer: coarse) {
    .ev-clear-btn[b-rgrb5m28r9] { width: 32px; height: 32px; right: 8px; }
}
@media (hover: none) {
    .ev-clear-btn:hover[b-rgrb5m28r9] { background-color: #f1f5f9; color: #64748b; transform: none; }
}
/* /Pages/Home.razor.rz.scp.css */
/* 柔和的縮放效果優化 */
.thumbnail[b-zx83cvy4gy] {
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    z-index: 2;
}

.thumbnail.loaded[b-zx83cvy4gy] {
    opacity: 1;
}

/* 覆寫 hover 縮放，同步為 1.05 倍以完美填滿擴張的外框 */
.work-card:hover .thumbnail[b-zx83cvy4gy] {
    transform: scale(1.05);
}


.like-button.voted[b-zx83cvy4gy] {
    background-color: #E67E22 !important;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3) !important;
}


.voted-tag[b-zx83cvy4gy] {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #E67E22;
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* 搜尋清空按鈕懸停變色 */
.clear-search-btn:hover[b-zx83cvy4gy] {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
    transform: scale(1.1);
}

/* --- 響應式排序列修正 (精緻自定義版) --- */
.filter-dropdown-mobile[b-zx83cvy4gy] {
    display: none;
    width: 100%;
    margin-bottom: 1rem;
}

/* 自訂下拉（.home-custom-dropdown / .home-dropdown-*）的樣式已於 2026-10-08
   搬到 wwwroot/css/app.css 成為全站共用 —— 後台「人氣排行總榜」要用同一套外觀，
   而這裡是 scoped CSS，只有首頁吃得到。
   這一段刻意不留複本：留了就會變成兩份各改各的。 */

/* 投票進度條基礎樣式 */
.voting-progress-wrapper[b-zx83cvy4gy] {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 40px;
    min-width: 200px;
}

@media (max-width: 1200px) {
    .voting-progress-wrapper[b-zx83cvy4gy] {
        padding: 0 15px;
    }
}

.progress-info[b-zx83cvy4gy] {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.9rem;
    font-weight: 700;
}

.progress-label[b-zx83cvy4gy] {
    color: #64748b;
}

.progress-count[b-zx83cvy4gy] {
    color: #537D5D;
}

.progress-track[b-zx83cvy4gy] {
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill[b-zx83cvy4gy] {
    height: 100%;
    background: linear-gradient(90deg, #73946B, #537D5D);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(83, 125, 93, 0.3);
    position: relative;
    overflow: hidden;
}

/* 達成 100% 時的特殊效果 */
.is-completed .progress-fill[b-zx83cvy4gy] {
    background: linear-gradient(90deg, #F1C40F, #F39C12, #F1C40F); /* 金色漸層 */
    background-size: 200% 100%;
    animation: gold-shimmer-b-zx83cvy4gy 2s infinite linear, progress-pulse-b-zx83cvy4gy 2s infinite ease-in-out;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.6);
}

.is-completed .progress-count[b-zx83cvy4gy] {
    color: #F39C12;
    font-weight: 900;
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.3);
}

.is-completed .progress-label[b-zx83cvy4gy] {
    color: #F39C12;
    animation: label-bounce-b-zx83cvy4gy 2s infinite ease-in-out;
}

/* 金色流光動畫 */
@keyframes gold-shimmer-b-zx83cvy4gy {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 脈動效果 */
@keyframes progress-pulse-b-zx83cvy4gy {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.2); }
    100% { transform: scaleY(1); }
}

/* 文字微跳動 */
@keyframes label-bounce-b-zx83cvy4gy {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* 整合容器排版 */
.filter-bar-container[b-zx83cvy4gy] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 2rem;
    position: relative;
    padding: 10px 0;
    flex-wrap: nowrap; /* 電腦版不換行 */
}

.filter-bar[b-zx83cvy4gy] {
    flex-shrink: 0;
}

.search-box-wrapper[b-zx83cvy4gy] {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .filter-bar-container[b-zx83cvy4gy] {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 15px !important;
        align-items: stretch !important;
    }

    .filter-buttons-desktop[b-zx83cvy4gy] {
        display: none !important;
    }

    .filter-dropdown-mobile[b-zx83cvy4gy] {
        display: block !important;
        width: 100%;
        order: 0;
    }

    /* 手機版順序：進度條最上方 (置頂) */
    .voting-progress-wrapper[b-zx83cvy4gy] {
        order: -1; 
        position: sticky;
        top: 60px; /* 避開 NavBar */
        z-index: 1010; /* 高於下拉選單 */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 15px 20px;
        margin: 0 -15px 10px -15px; 
        width: calc(100% + 30px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-bottom: 1px solid #eee;
    }

    .filter-bar[b-zx83cvy4gy] {
        order: 0;
        width: 100%;
    }

    .search-box-wrapper[b-zx83cvy4gy] {
        order: 1;
        width: 100%;
        min-width: unset !important;
    }

    .progress-track[b-zx83cvy4gy] {
        height: 12px;
    }
}

/* 紙飛機分享按鈕起飛動畫 */
.share-btn:hover[b-zx83cvy4gy] {
    transform: scale(1.2);
    transition: transform 0.2s;
}
.share-btn.animating svg[b-zx83cvy4gy] {
    animation: plane-fly-b-zx83cvy4gy 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 頂部整合資訊面板樣式 */
.player-section.hero-mode[b-zx83cvy4gy] {
    background-color: #537D5D !important;
    /* 強制父層變綠色 */
    border: none;
    height: auto !important;
    min-height: unset !important;
    overflow: visible !important;
}

.placeholder-hero[b-zx83cvy4gy] {
    height: auto !important;
    width: 100%;
    min-height: 300px;
    padding: 3.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: transparent;
    /* 背景交由父層 .hero-mode 處理 */
    margin: 0;
    overflow: visible !important;
}

.hero-content[b-zx83cvy4gy] {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
    /* 內容置中對齊 */
    gap: 15px;
}

.hero-title[b-zx83cvy4gy] {
    font-size: clamp(1.5rem, 6vw, 3rem);
    /* 平滑縮放 */
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.hero-desc[b-zx83cvy4gy] {
    font-size: clamp(1rem, 3.5vw, 1.8rem);
    /* 確保最小有 1rem */
    font-weight: normal;
    color: white;
    margin-top: 0;
    white-space: pre-line;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.hero-info-panel[b-zx83cvy4gy] {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    /* 資訊條維持左對齊比較好閱讀 */
    width: fit-content;
    align-self: center;
    /* 但面板本身在容器中居中 */
}

.info-item[b-zx83cvy4gy] {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: white;
    font-size: clamp(0.9rem, 3vw, 1.4rem);
    flex-wrap: wrap;
    line-height: 1.4;
}

.info-label[b-zx83cvy4gy] {
    font-weight: bold;
    opacity: 0.9;
    white-space: nowrap;
}

.info-value[b-zx83cvy4gy] {
    font-weight: 500;
    word-break: break-all;
    /* 避免網址或長字串撐爆 */
}

.rule-highlight .info-value[b-zx83cvy4gy] {
    color: #1B3A4B;
    /* 與專案色系更融合的墨藍色 */
}

/* 飛行動畫觸發類別 */
.is-flying[b-zx83cvy4gy] {
    animation: plane-fly-b-zx83cvy4gy 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    z-index: 100;
    pointer-events: none;
    /* 動畫期間禁止重複點擊 */
}

@keyframes plane-fly-b-zx83cvy4gy {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    30% {
        transform: translate(10px, -10px) scale(1.2) rotate(-10deg);
        opacity: 0.7;
    }

    60% {
        transform: translate(30px, -30px) scale(0.5) rotate(-20deg);
        opacity: 0;
    }

    61% {
        transform: translate(-20px, 20px) scale(0.5);
        opacity: 0;
    }

    100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
}

.like-section[b-zx83cvy4gy] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.like-count[b-zx83cvy4gy] {
    font-size: 1.15rem;
    font-weight: 700;
    color: #537D5D;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1; /* 縮減行高以控制高度 */
}

/* 手機版按讚區優化 */
@media (max-width: 768px) {
    .like-section[b-zx83cvy4gy] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-top: 15px !important;
    }

    .like-count[b-zx83cvy4gy] {
        font-size: 1.25rem !important; /* 手機版再大一點點 */
        margin-left: 5px;
    }

    .like-button[b-zx83cvy4gy] {
        width: 100% !important;
        padding: 12px !important;
    }

    /* 首頁英雄區塊扁平化與間距優化 */
    .placeholder-hero[b-zx83cvy4gy] {
        padding: 1.5rem 1.2rem !important;
        min-height: auto !important;
    }

    .hero-title[b-zx83cvy4gy] {
        font-size: 1.6rem !important;
    }

    .hero-desc[b-zx83cvy4gy] {
        font-size: 1.05rem !important;
    }

    .hero-content[b-zx83cvy4gy] {
        gap: 8px !important;
    }

    .hero-info-panel[b-zx83cvy4gy] {
        margin-top: 5px !important;
        width: 100% !important;
        align-self: flex-start !important;
    }

    .info-item[b-zx83cvy4gy] {
        font-size: 0.95rem !important;
        gap: 6px !important;
        margin-bottom: 2px;
    }
}

/* ============================================================= */
/* === 展示歷屆作品時的狀態列（2026-09-23，ISSUES.md 第 153 項）=== */
/*
   後台可以在投票開始前把投票牆設定成展示某一屆的作品，這時候整面唯讀。
   用香檳金系而不是紅色：這不是錯誤狀態，是一個刻意安排的回顧展示。
*/
/* ============================================================= */
.history-wall-bar[b-zx83cvy4gy] {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto 2rem;
    padding: 18px 26px;
    border-radius: 16px;
    /* 2026-09-24 提高飽和度：原本的 #fbf8ee／#e8dcbc 幾乎與頁面底色同色，
       整塊會糊進背景，看不出這是一條狀態列。左側加一道深金色實邊，
       讓它在不變成「錯誤紅」的前提下有明確的邊界。 */
    background: #fcefc7;
    border: 1px solid #dcc27a;
    border-left: 5px solid #c9a227;
    color: #5c4a18;
}
.history-wall-icon[b-zx83cvy4gy] { font-size: 1.6rem; line-height: 1.2; flex-shrink: 0; }
.history-wall-title[b-zx83cvy4gy] { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; color: #4a3a10; }
/* 不用 opacity 壓淡 —— 那會連帶把對比度一起壓掉，改用實色 */
.history-wall-msg[b-zx83cvy4gy] { font-size: 0.92rem; line-height: 1.6; color: #6b5a28; }

@media (max-width: 768px) {
    .history-wall-bar[b-zx83cvy4gy] {
        margin: 0 1rem 1.5rem;
        padding: 14px 18px;
        gap: 12px;
    }
    .history-wall-title[b-zx83cvy4gy] { font-size: 0.98rem; }
    .history-wall-msg[b-zx83cvy4gy] { font-size: 0.86rem; }
}

html[data-theme="dark"] .history-wall-bar[b-zx83cvy4gy] {
    background: #3a3218;
    border-color: #6b5a28;
    border-left-color: #d4af37;
    color: #f0e2b0;
}
html[data-theme="dark"] .history-wall-title[b-zx83cvy4gy] { color: #ffe9a8; }
html[data-theme="dark"] .history-wall-msg[b-zx83cvy4gy] { color: #e0d0a0; }
/* /Pages/LikeLottery.razor.rz.scp.css */
/* 模式切換按鈕：已改用全域 .iva-mode-selector／.iva-mode-btn（app.css 檔尾）。
   ISSUES.md 第 80 項 —— 這裡原本抄了一份，連暗色覆寫都各一份。 */

/* ── 原本寫在 .razor inline style 的版面樣式（2026-10-19 搬來，手機版媒體查詢才蓋得掉）── */
.lottery-page-container[b-usc0jwmcrl] { padding: 2rem 4rem; width: 100%; box-sizing: border-box; }
.page-header[b-usc0jwmcrl] { text-align: center; margin-bottom: 2.5rem; }
.page-header .title[b-usc0jwmcrl] { font-size: 2.8rem; }

.config-sidebar[b-usc0jwmcrl] {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eef2f0;
    position: sticky;
    top: 2rem;
}
.action-sidebar[b-usc0jwmcrl] {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
}
.ll-instructions[b-usc0jwmcrl] {
    margin-top: 1rem;
    padding: 1.8rem;
    background: #fffaf0;
    border-radius: 15px;
    border: 1px solid #fef3c7;
    font-size: 1rem;
    color: #92400e;
    line-height: 1.8;
}
.ll-instructions-title[b-usc0jwmcrl] {
    font-weight: 800;
    margin-bottom: 1rem;
    border-bottom: 2px solid #fde68a;
    padding-bottom: 8px;
    font-size: 1.15rem;
}

.ll-preview-head[b-usc0jwmcrl] { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.ll-empty[b-usc0jwmcrl] { text-align: center; color: #cbd5e0; margin-top: 80px; }
.ll-empty-icon[b-usc0jwmcrl] { font-size: 4rem; margin-bottom: 1rem; }

.history-main[b-usc0jwmcrl] { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.history-toolbar[b-usc0jwmcrl] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eef2f0;
}
/* 原本是 overflow: hidden —— 視窗變窄時右邊幾欄（含「移除」鈕）會直接被裁掉、滑不到。改 auto 才能左右捲動 */
.history-table-wrap[b-usc0jwmcrl] {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eef2f0;
    overflow-x: auto;
}

.ll-td-group[b-usc0jwmcrl] { font-weight: 700; color: #537D5D; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ll-td-account[b-usc0jwmcrl] { font-family: 'Courier New', monospace; font-weight: 600; }
.ll-td-dept[b-usc0jwmcrl] { color: #4a5568; }
.ll-td-name[b-usc0jwmcrl] { font-weight: 500; }
.ll-td-time[b-usc0jwmcrl] { color: #718096; font-size: 0.95rem; white-space: nowrap; }
.data-table td.ll-td-action[b-usc0jwmcrl] { text-align: center; }

/* 三欄式佈局容器 (抽獎模式) */
.lottery-main-layout[b-usc0jwmcrl] {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 2rem;
    align-items: start;
    margin-top: 1rem;
}

/* 二欄式佈局容器 (歷史紀錄模式) */
.history-main-layout[b-usc0jwmcrl] {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

/* 中間舞台欄 */
.center-stage-container[b-usc0jwmcrl] {
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
}

/* 側邊欄樣式 */
.sidebar-panel[b-usc0jwmcrl] {
    background: white;
    padding: 1.8rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eef2f0;
    position: sticky;
    top: 2rem;
}

/* 組別清單樣式 */
.group-list[b-usc0jwmcrl] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1rem;
}
.group-item[b-usc0jwmcrl] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    border: 1.5px solid transparent;
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
}
.group-item:hover[b-usc0jwmcrl] { background: #edf2f7; border-color: #e2e8f0; }
.group-item.active[b-usc0jwmcrl] { 
    background: #f0f7f2; 
    color: #537D5D; 
    border-color: #537D5D; 
    box-shadow: 0 4px 10px rgba(83,125,93,0.1);
}
.delete-group-btn[b-usc0jwmcrl] {
    color: #cbd5e0;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 6px;
}
.delete-group-btn:hover[b-usc0jwmcrl] { 
    color: #e53e3e; 
    background: #fff5f5;
}

/* 抽獎舞台樣式 - 清新淺色主題 */
.lottery-stage[b-usc0jwmcrl] {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7f2 100%);
    color: #2d3748;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(83, 125, 93, 0.1);
    border: 4px solid #537D5D;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.lottery-stage[b-usc0jwmcrl]::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(83,125,93,0.05) 0%, transparent 70%);
}

.stage-title[b-usc0jwmcrl] { font-size: 1.2rem; color: #718096; font-weight: 800; letter-spacing: 3px; margin-bottom: 1rem; }
.rolling-id[b-usc0jwmcrl] { font-size: 4.5rem; font-family: 'Monaco', 'Consolas', monospace; font-weight: 900; color: #537D5D; text-shadow: 2px 2px 4px rgba(0,0,0,0.05); margin: 0.5rem 0; }

.progress-container[b-usc0jwmcrl] { width: 60%; height: 5px; background: rgba(255,255,255,0.1); border-radius: 10px; margin: 1rem auto; overflow: hidden; }
.progress-bar[b-usc0jwmcrl] { height: 100%; background: #537D5D; transition: width 0.4s ease; }

/* 中獎卡片區 */
.preview-section[b-usc0jwmcrl] {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eef2f0;
    min-height: 400px;
}
.winner-grid[b-usc0jwmcrl] { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.winner-card[b-usc0jwmcrl] { 
    background: #fcfdfd; 
    border: 2px solid #edf2f0; 
    border-radius: 15px; 
    padding: 1.2rem; 
    position: relative; 
    text-align: center; 
    animation: popIn-b-usc0jwmcrl 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes popIn-b-usc0jwmcrl { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.winner-rank[b-usc0jwmcrl] { position: absolute; top: -10px; left: -10px; background: #537D5D; color: #fff; width: 28px; height: 28px; border-radius: 50%; line-height: 28px; font-weight: bold; font-size: 0.85rem; }
.winner-id[b-usc0jwmcrl] { font-weight: 800; font-size: 1.1rem; color: #2d3748; margin-bottom: 0.3rem; }
.winner-group-label[b-usc0jwmcrl] { font-size: 0.95rem; color: #537D5D; background: #f0f7f2; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.remove-winner[b-usc0jwmcrl] { position: absolute; top: 5px; right: 5px; background: none; border: none; color: #ddd; cursor: pointer; font-size: 1.1rem; }
.remove-winner:hover[b-usc0jwmcrl] { color: #e74c3c; }

/* 按鈕樣式 */
.btn-main[b-usc0jwmcrl] { padding: 18px; border-radius: 15px; border: none; font-weight: 800; font-size: 1.15rem; cursor: pointer; transition: 0.3s; width: 100%; color: white; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-draw[b-usc0jwmcrl] { background: #537D5D; box-shadow: 0 10px 20px rgba(83,125,93,0.2); }
.btn-draw:hover:not(:disabled)[b-usc0jwmcrl] { transform: translateY(-3px); background: #44664c; }
.btn-save[b-usc0jwmcrl] { background: #f0ad4e; box-shadow: 0 10px 20px rgba(240,173,78,0.2); }
.btn-save:hover[b-usc0jwmcrl] { transform: translateY(-3px); background: #ec971f; }
.btn-discard[b-usc0jwmcrl] { background: white; border: 2px solid #e2e8f0; color: #718096; font-size: 1rem; padding: 12px; }
.btn-discard:hover[b-usc0jwmcrl] { background: #f8f9fa; color: #e53e3e; border-color: #feb2b2; }
.btn-main:disabled[b-usc0jwmcrl] { 
    background: #4a5568 !important; 
    color: #a0aec0 !important; 
    opacity: 0.6; 
    box-shadow: none !important; 
    cursor: not-allowed; 
    transform: none !important; 
}

.form-group[b-usc0jwmcrl] { margin-bottom: 1.5rem; }
.form-group label[b-usc0jwmcrl] { display: block; font-weight: 700; color: #4a5568; margin-bottom: 0.8rem; font-size: 0.95rem; }
.form-control[b-usc0jwmcrl] { width: 100%; padding: 12px 15px; border-radius: 10px; border: 1.5px solid #e2e8f0; font-size: 1rem; }
.form-control:focus[b-usc0jwmcrl] { border-color: #537D5D; outline: none; box-shadow: 0 0 0 3px rgba(83,125,93,0.1); }

.data-table[b-usc0jwmcrl] { width: 100%; border-collapse: collapse; }
.data-table th[b-usc0jwmcrl], .data-table td[b-usc0jwmcrl] { padding: 18px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.data-table th[b-usc0jwmcrl] { background: #fafafa; color: #537D5D; font-weight: 800; }

/* 下載按鈕 */
.btn-excel[b-usc0jwmcrl] { 
    background: #217346; 
    color: white; 
    padding: 10px 25px; 
    border-radius: 10px; 
    border: none; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}
.btn-excel:hover[b-usc0jwmcrl] { background: #1a5a37; transform: translateY(-1px); }

/* 搜尋框 */
.search-container[b-usc0jwmcrl] {
    position: relative;
    width: 100%;
    max-width: 500px;
}
.search-input-group[b-usc0jwmcrl] { position: relative; display: flex; align-items: center; width: 100%; }
.search-input[b-usc0jwmcrl] {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 1rem;
    transition: 0.3s;
    background: #f8fafc;
    height: 46px;
}
.search-input:focus[b-usc0jwmcrl] { border-color: #537D5D; outline: none; box-shadow: 0 0 0 3px rgba(83,125,93,0.1); background: white; }

.clear-search-btn[b-usc0jwmcrl] { 
    position: absolute; 
    right: 10px; 
    background: #f1f5f9; 
    border: none; 
    color: #64748b; 
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s; 
    padding: 0;
}
.clear-search-btn:hover[b-usc0jwmcrl] { 
    background-color: #fee2e2;
    color: #ef4444; 
    transform: scale(1.1);
}

/* 說明按鈕樣式 (參考 Admin.razor) */
.help-btn[b-usc0jwmcrl] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid #537D5D;
    background: white;
    color: #537D5D;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    margin-left: 8px;
    vertical-align: middle;
}
.help-btn:hover[b-usc0jwmcrl] { background: #537D5D; color: white; }

/* Modal 樣式（.modal-overlay / .modal-card / .m-btn ⋯）已於 2026-09-10 移除
   —— 改用 IvaModal 元件，樣式來自 app.css 的 .iva-modal-*。見 ISSUES.md 第 66 項。
   合格名單 Modal 內表格（.voter-list-scroll／.voter-table）頁面上已經沒有，2026-10-22 一併移除。 */

/* ================================================================= */
/* 暗色模式覆寫 (只新增，不改動上方任何亮色規則)                       */
/* 色階：卡片#1e2521 次層#242b27 hover#2e3631 邊框#3a443d             */
/*       主要文字#f3e9dc 次要#9aa89c 主綠#7fb389                       */
/* ================================================================= */

/* 側邊欄 / 白底容器 (含 razor inline style 容器) */
html[data-theme="dark"] .sidebar-panel[b-usc0jwmcrl],
html[data-theme="dark"] .config-sidebar[b-usc0jwmcrl],
html[data-theme="dark"] .history-toolbar[b-usc0jwmcrl],
html[data-theme="dark"] .history-table-wrap[b-usc0jwmcrl] {
    background: #1e2521 !important;   /* !important 以勝過元素上的行內 background: white */
    border-color: #3a443d !important;
}

/* 操作說明框（行內 #fffaf0 米黃底、字 #92400e）→ 暗色米黃調 */
html[data-theme="dark"] .ll-instructions[b-usc0jwmcrl] {
    background: #2b2a1e !important;
    border-color: #6b5a2a !important;
    color: #e8c98a !important;
}
/* 具抽獎資格小框（行內 #f0f7f2 淺綠底）→ 暗綠 */
html[data-theme="dark"] .ll-eligible-box[b-usc0jwmcrl] {
    background: #1e2a22 !important;
    border-color: #2f4a35 !important;
}

/* 組別清單 */
html[data-theme="dark"] .group-item[b-usc0jwmcrl] {
    background: #242b27;
    color: #c9cfc7;
}
html[data-theme="dark"] .group-item:hover[b-usc0jwmcrl] {
    background: #2e3631;
    border-color: #3a443d;
}
html[data-theme="dark"] .group-item.active[b-usc0jwmcrl] {
    background: #1e2a22;
    color: #7fb389;
    border-color: #537D5D;
}

/* 抽獎舞台 */
html[data-theme="dark"] .lottery-stage[b-usc0jwmcrl] {
    background: linear-gradient(135deg, #1e2521 0%, #232a26 100%);
    color: #f3e9dc;
    border-color: #3a6b47;
}
html[data-theme="dark"] .stage-title[b-usc0jwmcrl] { color: #9aa89c; }
html[data-theme="dark"] .rolling-id[b-usc0jwmcrl] {
    color: #7fb389;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

/* 中獎預覽區 */
html[data-theme="dark"] .preview-section[b-usc0jwmcrl] {
    background: #1e2521;
    border-color: #3a443d;
}
html[data-theme="dark"] .winner-card[b-usc0jwmcrl] {
    background: #242b27;
    border-color: #3a443d;
}
html[data-theme="dark"] .winner-id[b-usc0jwmcrl] { color: #f3e9dc; }
html[data-theme="dark"] .winner-group-label[b-usc0jwmcrl] {
    color: #7fb389;
    background: #1e2a22;
}

/* 歷史資料表 */
html[data-theme="dark"] .data-table th[b-usc0jwmcrl] {
    background: #242b27;
    color: #7fb389;
}
html[data-theme="dark"] .data-table td[b-usc0jwmcrl] { color: #c9cfc7; }
html[data-theme="dark"] .data-table td.ll-td-group[b-usc0jwmcrl] { color: #7fb389; }
html[data-theme="dark"] .data-table th[b-usc0jwmcrl],
html[data-theme="dark"] .data-table td[b-usc0jwmcrl] {
    border-bottom-color: #3a443d;
}

/* 輸入框 / 表單控制項 */
html[data-theme="dark"] .form-group label[b-usc0jwmcrl] { color: #c9cfc7; }
html[data-theme="dark"] .form-control[b-usc0jwmcrl],
html[data-theme="dark"] .search-input[b-usc0jwmcrl] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .form-control[b-usc0jwmcrl]::placeholder,
html[data-theme="dark"] .search-input[b-usc0jwmcrl]::placeholder {
    color: #6b7670;
}
html[data-theme="dark"] .form-control:focus[b-usc0jwmcrl],
html[data-theme="dark"] .search-input:focus[b-usc0jwmcrl] {
    border-color: #7fb389;
    background: #1e2521;
}

/* 提示窗 Modal 的暗色覆寫也一併移除（2026-09-10）—— 元件的暗色規則在 app.css。 */

/* ── 獲獎名單的「移除」鈕（ISSUES.md 第 121 項）──────────────────────
   原本寫在 .razor 的 inline style 裡，背景是 #fff5f5（近乎白色的粉紅）。
   ⚠️ inline style **蓋不掉** —— 深色模式的規則對它無效，所以不管切不切主題
      都是亮的，在深色卡片上非常刺眼。搬成 class 之後才有辦法分主題。
   亮色維持原本外觀，只有暗色改成深紅底淺紅字。 */
.ll-remove-btn[b-usc0jwmcrl] {
    color: #e53e3e;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    padding: 8px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.ll-remove-btn:hover[b-usc0jwmcrl] {
    background: #fed7d7;
}

html[data-theme="dark"] .ll-remove-btn[b-usc0jwmcrl] {
    color: #f0a6a4;
    background: #3a2422;
    border-color: #5c3a37;
}

html[data-theme="dark"] .ll-remove-btn:hover[b-usc0jwmcrl] {
    background: #4a2e2b;
}

/* ================================================================= */
/* 手機／平板版（2026-10-19）                                          */
/* ================================================================= */

/* ── 992px 以下：兩個分頁都改上下排 ── */
@media (max-width: 991.98px) {
    .lottery-page-container[b-usc0jwmcrl] { padding: 1.5rem; }

    /* 即時抽獎：參數設定 → 抽獎舞台 → 控制按鈕 → 中獎預覽
       中欄用 display: contents 拆開，舞台與預覽才能分別排序、把控制按鈕夾在中間 */
    .lottery-main-layout[b-usc0jwmcrl] { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .center-stage-container[b-usc0jwmcrl] { display: contents; }
    .config-sidebar[b-usc0jwmcrl] { order: 1; position: static; }
    .lottery-stage[b-usc0jwmcrl] { order: 2; }
    .action-sidebar[b-usc0jwmcrl] { order: 3; position: static; gap: 0.75rem; }
    .preview-section[b-usc0jwmcrl] { order: 4; }
    .ll-control-title[b-usc0jwmcrl] { display: none; }   /* 上下排時「控制台」標題多餘 */

    /* 獲獎數據中心：組別清單在上，改成可橫向滑動的一排標籤 */
    .history-main-layout[b-usc0jwmcrl] { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .sidebar-panel[b-usc0jwmcrl] { position: static; padding: 1.25rem; }
    .group-list[b-usc0jwmcrl] {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }
    .group-item[b-usc0jwmcrl] {
        flex: 0 0 auto;
        max-width: 70vw;
        gap: 10px;
        scroll-snap-align: start;
    }
}

/* ── 768px 以下：字級、留白縮小；獲獎表格改卡片 ── */
@media (max-width: 767.98px) {
    .lottery-page-container[b-usc0jwmcrl] { padding: 1rem; }
    .page-header[b-usc0jwmcrl] { margin-bottom: 1.25rem; }
    .page-header .title[b-usc0jwmcrl] { font-size: 1.8rem; }

    .config-sidebar[b-usc0jwmcrl] { padding: 1.25rem; }

    .lottery-stage[b-usc0jwmcrl] { min-height: 200px; padding: 1.5rem 1rem; }
    .stage-title[b-usc0jwmcrl] { font-size: 1rem; letter-spacing: 2px; }
    .rolling-id[b-usc0jwmcrl] { font-size: 2.4rem; overflow-wrap: anywhere; }
    .progress-container[b-usc0jwmcrl] { width: 80%; }

    .btn-main[b-usc0jwmcrl] { padding: 14px; font-size: 1.05rem; }

    .ll-instructions[b-usc0jwmcrl] { margin-top: 0.25rem; padding: 1rem 1.25rem; font-size: 0.9rem; line-height: 1.7; }
    .ll-instructions-title[b-usc0jwmcrl] { font-size: 1rem; margin-bottom: 0.6rem; }

    .preview-section[b-usc0jwmcrl] { min-height: 0; padding: 1.25rem; }
    .ll-preview-head[b-usc0jwmcrl] { flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 1.25rem; }
    .ll-empty[b-usc0jwmcrl] { margin-top: 1rem; margin-bottom: 1rem; }
    .ll-empty-icon[b-usc0jwmcrl] { font-size: 2.5rem; margin-bottom: 0.5rem; }
    .winner-grid[b-usc0jwmcrl] { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem 0.75rem; }

    /* 工具列：搜尋框與匯出鈕上下排 */
    .history-toolbar[b-usc0jwmcrl] { flex-direction: column; align-items: stretch; padding: 1rem; gap: 0.75rem; }
    .search-container[b-usc0jwmcrl] { max-width: none; }
    .btn-excel[b-usc0jwmcrl] { justify-content: center; }

    /* 表格 → 卡片：
         姓名        [移除]
         帳號        [移除]
         單位：xxx
         組別：xxx
         抽獎時間：xxx
       「儲存時間」手機上不顯示 */
    .history-table-wrap[b-usc0jwmcrl] { overflow-x: visible; }
    .data-table thead[b-usc0jwmcrl] { display: none; }
    .data-table[b-usc0jwmcrl], .data-table tbody[b-usc0jwmcrl] { display: block; }
    .data-table tr[b-usc0jwmcrl] {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "name action"
            "account action"
            "dept dept"
            "group group"
            "draw draw";
        column-gap: 12px;
        row-gap: 2px;
        align-items: center;
        padding: 14px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    .data-table tr:last-child[b-usc0jwmcrl] { border-bottom: 0; }
    .data-table td[b-usc0jwmcrl] { padding: 0; border-bottom: 0; min-width: 0; }

    .data-table td.ll-td-name[b-usc0jwmcrl] { grid-area: name; font-weight: 800; font-size: 1.05rem; }
    .data-table td.ll-td-account[b-usc0jwmcrl] { grid-area: account; font-size: 0.85rem; color: #718096; margin-bottom: 4px; }
    .data-table td.ll-td-dept[b-usc0jwmcrl] { grid-area: dept; font-size: 0.9rem; }
    .data-table td.ll-td-group[b-usc0jwmcrl] { grid-area: group; max-width: none; font-size: 0.9rem; }
    .data-table td.ll-td-draw[b-usc0jwmcrl] { grid-area: draw; font-size: 0.85rem; }
    .data-table td.ll-td-save[b-usc0jwmcrl] { display: none; }
    .data-table td.ll-td-action[b-usc0jwmcrl] { grid-area: action; align-self: start; }

    .data-table td[data-label][b-usc0jwmcrl]::before {
        content: attr(data-label) "：";
        color: #a0aec0;
        font-weight: 600;
        font-family: inherit;
    }

    html[data-theme="dark"] .data-table tr[b-usc0jwmcrl] { border-bottom-color: #3a443d; }
    html[data-theme="dark"] .data-table td[data-label][b-usc0jwmcrl]::before { color: #6b7670; }
}

/* ── 觸控裝置：小按鈕放大、顏色加深 ── */
@media (pointer: coarse) {
    .remove-winner[b-usc0jwmcrl] {
        width: 32px;
        height: 32px;
        top: 2px;
        right: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        color: #a0aec0;
    }
    .delete-group-btn[b-usc0jwmcrl] {
        min-width: 32px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #a0aec0;
    }
    .help-btn[b-usc0jwmcrl] { width: 28px; height: 28px; min-width: 28px; font-size: 15px; }
    .ll-remove-btn[b-usc0jwmcrl] { min-height: 38px; }
    .clear-search-btn[b-usc0jwmcrl] { width: 32px; height: 32px; }
}

/* 沒有滑鼠懸停的裝置：點完按鈕不要卡在「浮起」的 hover 狀態 */
@media (hover: none) {
    .btn-draw:hover:not(:disabled)[b-usc0jwmcrl],
    .btn-save:hover[b-usc0jwmcrl],
    .btn-excel:hover[b-usc0jwmcrl] { transform: none; }
}
/* /Pages/Login.razor.rz.scp.css */
/* Styles moved to Login.razor to avoid caching issues */
/* /Pages/MySubmissions.razor.rz.scp.css */
/* 【我的投稿】ISSUES.md 第 89 項
   隔離樣式（scoped CSS）。這一頁用的 class 名稱很通用（.status-badge、.info-row、
   .item-card⋯），**一定要寫在這個檔案**而不是頁內 <style> ——
   頁內樣式在這個專案是全域生效的（第 46 項），會污染其他頁面。

   顏色一律用 app.css 的變數（--color-dark-green 等），不要另外寫死色碼。 */

.my-submissions-container[b-70fpqkbncv] {
    padding: 2rem 4rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.subtitle[b-70fpqkbncv] {
    text-align: center;
    color: var(--iva-text-muted);
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* ── 唯讀提示 ── */
.readonly-notice[b-70fpqkbncv] {
    background: #f0f7f2;
    border: 1px solid var(--color-light-green);
    color: var(--color-dark-green);
    border-radius: var(--radius);
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* ── 載入 / 空狀態 / 錯誤 ── */
.state-box[b-70fpqkbncv] {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--iva-text-muted);
}

.state-box h2[b-70fpqkbncv] {
    color: var(--color-dark-green);
    font-weight: 700;
    margin: 1rem 0 0.8rem;
    font-size: 1.4rem;
}

.state-box p[b-70fpqkbncv] {
    line-height: 1.8;
    margin: 0.4rem 0;
}

.state-icon[b-70fpqkbncv] {
    font-size: 4rem;
    display: block;
}

.empty-note[b-70fpqkbncv] {
    font-size: 0.85rem;
    color: #94a3b8;
    max-width: 520px;
    margin: 1.2rem auto 0;
}

.state-box.error h2[b-70fpqkbncv] {
    color: #d9534f;
}

/* 這一頁自己的載入圈。
   ⚠️ 不要改成沿用 Upload.razor.css 的 .loading-ring —— 那是隔離樣式，
      只在上傳頁生效，在這裡完全沒有效果（看起來會像忘了寫樣式）。 */
.loading-ring[b-70fpqkbncv] {
    width: 44px;
    height: 44px;
    margin: 0 auto 1.2rem;
    border: 4px solid #e2e8f0;
    border-top-color: var(--color-dark-green);
    border-radius: 50%;
    animation: iva-my-spin-b-70fpqkbncv 0.9s linear infinite;
}

@keyframes iva-my-spin-b-70fpqkbncv {
    to { transform: rotate(360deg); }
}

.primary-btn[b-70fpqkbncv] {
    margin-top: 1.8rem;
    background: var(--color-dark-green);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 2.2rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.primary-btn:hover[b-70fpqkbncv] {
    background: var(--color-med-green);
}

/* ── 投稿卡片 ── */
.submission-card[b-70fpqkbncv] {
    background: var(--iva-card-bg);
    border-radius: var(--iva-radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.card-head[b-70fpqkbncv] {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.2rem;
}

.code-label[b-70fpqkbncv] {
    display: block;
    font-size: 0.8rem;
    color: var(--iva-text-muted);
    letter-spacing: 0.1rem;
}

.code-value[b-70fpqkbncv] {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-dark-green);
    line-height: 1.2;
}

.contest-block[b-70fpqkbncv] {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.contest-name[b-70fpqkbncv] {
    color: var(--iva-text-muted);
    font-size: 0.95rem;
}

.current-badge[b-70fpqkbncv] {
    background: var(--color-dark-green);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}

/* ── 修改入口（2026-10-13，ISSUES.md 第 174 項）──
   ⚠️ 不能改時顯示的是 .edit-blocked（原因文字），不是把整列拿掉。
      功能無聲消失正是第 90 項那個形狀。 */
/* 左邊是整組的審核狀態，右邊是修改入口（或不能改的原因）。
   ⚠️ 2026-10-13 起這一列不只放按鈕了，所以不要再用 justify-content: flex-end ——
      那會把審核狀態也推到右邊，和按鈕擠在一起。
      改成兩端對齊，中間留白讓兩者各據一方。 */
/* ⚠️ **不要加 border-top。** 正上方的 .card-head 已經有 border-bottom 了，
      兩條合起來會在畫面上變成兩條平行線（2026-10-13 回報）。
      這一列與上面的分隔**由 .card-head 那一條負責**，這裡只留間距。 */
.edit-row[b-70fpqkbncv] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1.1rem 0 0.2rem;
}

/* 標籤與徽章綁在一起，窄螢幕換行時兩者不會被拆散。 */
.review-block[b-70fpqkbncv] {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* 徽章本身只寫「待審核」，不一定看得出那是在講審核（2026-10-13 回報），
   所以左邊補上欄位名。樣式與卡片裡「創作理念」「影片檔案」那些標籤一致。 */
.review-label[b-70fpqkbncv] {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-dark-green);
    margin-right: 0.5rem;
}

.edit-btn[b-70fpqkbncv] {
    background: transparent;
    border: 1px solid var(--color-dark-green);
    color: var(--color-dark-green);
    border-radius: var(--radius);
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.edit-btn:hover[b-70fpqkbncv] {
    background: var(--color-dark-green);
    color: #fff;
}

.edit-blocked[b-70fpqkbncv] {
    font-size: 0.85rem;
    color: #777;
    text-align: right;
    line-height: 1.5;
    /* 原因可能是一整句（「投稿已於 2026/10/20 18:00 截止。」），
       讓它在窄螢幕上自己收斂，不要把審核狀態擠出版面。 */
    flex: 1 1 14rem;
    min-width: 0;
}

/* ── 退件清單（2026-10-14，ISSUES.md 第 174 項的終點）──
   ⚠️ 這一區要**顯眼**。它是參賽者唯一知道「哪一項、為什麼」的地方，
      做小、做淡、做成可折疊都等於把它藏起來。 */
.rejection-box[b-70fpqkbncv] {
    margin: 0.9rem 0 0.2rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    background: #fdecea;
    border-left: 4px solid #a4262c;
}

.rejection-title[b-70fpqkbncv] {
    margin: 0 0 0.6rem;
    font-weight: 700;
    color: #a4262c;
}

.rejection-list[b-70fpqkbncv] {
    margin: 0;
    padding-left: 1.2rem;
    list-style: disc;
}

.rejection-list li[b-70fpqkbncv] {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.rejection-label[b-70fpqkbncv] {
    display: block;
    font-weight: 700;
    color: var(--iva-text-dark);
}

/* 原因全文照登、不截斷 —— 那是他唯一知道要改成什麼的依據。
   pre-wrap 保留承辦人打的換行。 */
.rejection-reason[b-70fpqkbncv] {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    color: #a4262c;
}

.rejection-hint[b-70fpqkbncv] {
    margin: 0.8rem 0 0;
    font-size: 0.85rem;
    color: #7a3b40;
}

html[data-theme="dark"] .rejection-box[b-70fpqkbncv] {
    background: #2e1f20;
    border-left-color: #8c3f45;
}

html[data-theme="dark"] .rejection-title[b-70fpqkbncv],
html[data-theme="dark"] .rejection-reason[b-70fpqkbncv] { color: #ef8a90; }
html[data-theme="dark"] .rejection-label[b-70fpqkbncv] { color: #f3e9dc; }
html[data-theme="dark"] .rejection-hint[b-70fpqkbncv] { color: #c89a9d; }

/* ── 基本資料 ── */
.info-grid[b-70fpqkbncv] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 2rem;
    margin: 1.5rem 0 0.5rem;
}

.info-row[b-70fpqkbncv] {
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
    font-size: 0.95rem;
    min-width: 0;
}

.info-label[b-70fpqkbncv] {
    color: var(--iva-text-muted);
    flex-shrink: 0;
    min-width: 5.5rem;
}

.info-value[b-70fpqkbncv] {
    color: var(--iva-text-dark);
    font-weight: 600;
    word-break: break-word;
}

/* ── 區塊標題 ── */
.section-title[b-70fpqkbncv] {
    margin: 2.2rem 0 1rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-dark-green);
    border-left: 4px solid var(--color-light-green);
    padding-left: 0.7rem;
}

.none-text[b-70fpqkbncv] {
    color: var(--iva-text-muted);
    font-size: 0.9rem;
}

/* ── 影片項目 ── */
.item-card[b-70fpqkbncv] {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: #fcfcfc;
}

.item-head[b-70fpqkbncv] {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.item-code[b-70fpqkbncv] {
    font-weight: 900;
    color: var(--color-dark-green);
    font-size: 1.05rem;
}

.item-title[b-70fpqkbncv] {
    color: var(--iva-text-dark);
    font-weight: 600;
    word-break: break-word;
}

/* ── 創作理念 ──────────────────────────────────────────────
   全文照登，不設 max-height 也不截斷 —— 這一段的用途是讓參賽者核對
   自己當初寫了什麼，看不到結尾就失去意義。
   pre-wrap 是必要的：理念常常分段，照原樣換行他才認得出來。 */
.concept-block[b-70fpqkbncv] {
    margin-bottom: 0.9rem;
}

.concept-label[b-70fpqkbncv] {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-dark-green);
    margin-bottom: 0.3rem;
}

.concept-text[b-70fpqkbncv] {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--iva-text-dark);
    white-space: pre-wrap;
    word-break: break-word;
}

.concept-text.is-empty[b-70fpqkbncv] {
    font-style: italic;
    color: var(--iva-text-muted);
}

/* ── 有標籤的區塊（2026-10-13）──
   「審核狀態」與「影片檔案」共用這一套，標籤樣式沿用 .concept-label，
   三個區塊（審核狀態／創作理念／影片檔案）的標題看起來才是一致的。

   註：這裡原本是 .badge-row（兩個徽章並排在創作理念下面）。
       改版後「審核狀態」移到最上面、「已上傳」併進影片檔案那一塊，
       沒有任何地方再需要那個 class，故移除。 */
.field-block[b-70fpqkbncv] {
    margin-bottom: 0.9rem;
}

.field-label[b-70fpqkbncv] {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-dark-green);
    margin-bottom: 0.3rem;
}

/* 徽章、檔案資訊與檢視鈕排在同一行，放不下才換行。
   align-items: center 讓徽章（圓角膠囊）與旁邊的小字垂直對齊。 */
.field-body[b-70fpqkbncv] {
    display: flex;
    align-items: center;
    gap: 0.6rem 0.9rem;
    flex-wrap: wrap;
}

.status-badge[b-70fpqkbncv] {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* 顏色一律「淺底深字」，理由同 app.css 名次色階的註解：
   對比要由文字承擔，飽和底色配白字過不了 WCAG。 */
.status-badge.ok[b-70fpqkbncv] {
    background: #e7f4ea;
    color: #2f6b3f;
}

.status-badge.wait[b-70fpqkbncv] {
    background: #fff4e5;
    color: #92400e;
}

.status-badge.bad[b-70fpqkbncv] {
    background: #fdecea;
    color: #a4262c;
}

/* 格式與上傳時間。2026-10-13 起它住在 .field-body 裡面，與「已上傳」徽章
   和檢視鈕同一行，所以這裡**不再自己排版**（原本是 display:flex + margin-top，
   那會把它推成獨立的一列）。間距交給 .field-body 的 gap。 */
.file-meta[b-70fpqkbncv] {
    font-size: 0.85rem;
    color: var(--iva-text-muted);
}

.hint-text[b-70fpqkbncv] {
    margin: 0.8rem 0 0;
    font-size: 0.8rem;
    color: var(--iva-text-muted);
    line-height: 1.7;
}

/* ── 文件清單 ── */
.doc-list[b-70fpqkbncv] {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.doc-row[b-70fpqkbncv] {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    background: #fcfcfc;
}

.doc-label[b-70fpqkbncv] {
    font-weight: 700;
    color: var(--iva-text-dark);
    flex: 1;
    min-width: 8rem;
    word-break: break-word;
}

.doc-meta[b-70fpqkbncv] {
    font-size: 0.8rem;
    color: var(--iva-text-muted);
}

/* ── 檢視按鈕（ISSUES.md 第 93 項）── */
.view-btn[b-70fpqkbncv] {
    margin-top: 0.9rem;
    background: #f0f7f2;
    color: var(--color-dark-green);
    border: 1px solid var(--color-light-green);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.view-btn:hover[b-70fpqkbncv] {
    background: var(--color-dark-green);
    color: #fff;
}

/* 文件列裡的按鈕與同一列的文字水平並排，不需要上方間距 */
.doc-row .view-btn[b-70fpqkbncv] {
    margin-top: 0;
}

/* 影片的檢視鈕自 2026-10-13 起也在同一行（.field-body）裡，同樣不要上方間距。
   .view-btn 本身的 margin-top 保留給日後其他用法。 */
.field-body .view-btn[b-70fpqkbncv] {
    margin-top: 0;
}

/* ── 檢視彈窗 ── */
.preview-overlay[b-70fpqkbncv] {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    /* ⚠️ 這是**全站最高**的一層，高於手機側邊選單的所有元件
          （抽屜 100000、FAB 100001，見 MainLayout.razor），
          也高於導覽列的 10000 與浮動主題鈕的 9000（NavBar.razor）。

          取這個值是刻意的模態行為：**預覽開著時其他東西一律不能用**，
          要看別頁得先按 ✕。中間值（例如 100000）會落入最糟的狀態 ——
          選單鈕按得到、抽屜也真的開了，卻整片藏在彈窗底下，
          使用者只會覺得「按了沒反應」（2026-09-23 實測回報）。

          📌 這**推翻了第 143 項「選單鈕永遠浮在最上面」的決定**，
             於 2026-09-23 與需求方重新確認。附帶好處是第 143 項記下的
             「FAB 壓在彈窗左下角」也一併消失了。
             細節見 ISSUES.md 第 145 項。 */
    z-index: 100002;
    /* 保險絲：萬一視窗仍然比可視範圍高（置中會讓它上下各溢出一半，
       標題列連同關閉鈕就被推到畫面外），至少還能捲上去把它找回來。 */
    overflow: auto;

    /* ⚠️ 擋 iOS 長按跳出的系統選單（「儲存影片」「儲存影像」「拷貝」）。
       ISSUES.md 第 149 項。

       這**不是** oncontextmenu 的重複 —— 兩者擋的是不同的東西：
         · oncontextmenu      → 桌機的滑鼠右鍵
         · -webkit-touch-callout → iOS Safari 的長按呼出選單（不觸發 contextmenu）
       手機上沒有右鍵，所以少了這一行，真的 iPhone 上長按影片就存得走。
       這一層設了之後裡面全部繼承，同樣不用逐元素寫。 */
    -webkit-touch-callout: none;
}

.preview-box[b-70fpqkbncv] {
    background: var(--iva-card-bg);
    border-radius: var(--iva-radius);
    width: 100%;
    max-width: 960px;
    /* ⚠️ iOS Safari 的 vh 是「網址列收起來時」的高度，比實際看得到的區域還高，
       所以 90vh 的視窗會超出畫面、把標題列頂出去。dvh 會扣掉網址列。
       前一行的 vh 是給不支援 dvh 的舊瀏覽器用的保底，兩行都要留。 */
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.preview-head[b-70fpqkbncv] {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid #eee;
}

.preview-title[b-70fpqkbncv] {
    flex: 1;
    min-width: 0;
    font-weight: 800;
    color: var(--color-dark-green);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-close[b-70fpqkbncv] {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--iva-text-muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}

.preview-close:hover[b-70fpqkbncv] {
    color: #d9534f;
}

/* 內容區自己滾動，不讓整個頁面跟著滾 */
.preview-body[b-70fpqkbncv] {
    /* ⚠️ 不能留 `flex: 1`（＝ flex: 1 1 0%）—— flex-basis 0% 會蓋掉下面的 height，
       高度又變回由容器分配，等於白設。改成 basis auto、可縮不可長：
       高度以 height 為準，但視窗撞到 max-height 時仍允許被壓縮。 */
    flex: 0 1 auto;
    /* 高度的取捨（2026-09-22 兩次回報）：
         · 原本 min-height: 320px、其餘由內容決定 → 彈窗先以「載入中」的小尺寸出現，
           內容進來才被撐到 72dvh，看起來像瞬間彈大一次。
         · 改成固定 72dvh → 不跳了，但單頁的 PDF 下方留了一大片灰底，太空。
       折衷：給一個**下限**讓載入中就接近最終大小（跳動幅度小到看不太出來），
       同時保留**上限**讓多頁的 PDF 能撐滿並在內部捲動。
       單頁文件會停在 58dvh 左右，不會拖出一整段空白。
       vh／dvh 兩行的理由見 .preview-box 的說明。 */
    height: auto;
    min-height: 58vh;
    min-height: 58dvh;
    max-height: 72vh;
    max-height: 72dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: auto;
    /* .pdf-rendering-state 要絕對定位蓋在畫布容器上，定位基準就是這一層 */
    position: relative;
}

/* 以下三個 max-height / height 都是同一個理由寫兩行：
   先 vh 給舊瀏覽器保底，再 dvh 讓 iOS 扣掉網址列（見 .preview-box 的說明）。 */
.preview-video[b-70fpqkbncv] {
    width: 100%;
    max-height: 72vh;
    max-height: 72dvh;
    background: #000;
}

.preview-image[b-70fpqkbncv] {
    max-width: 100%;
    max-height: 72vh;
    max-height: 72dvh;
    object-fit: contain;
}

.preview-frame[b-70fpqkbncv] {
    width: 100%;
    height: 72vh;
    height: 72dvh;
    border: none;
    background: #fff;
}

/* ── PDF.js 的畫布容器（ISSUES.md 第 142 項）────────────────────
   捲動發生在這一層，而不是 iframe 內部 —— 這正是 iOS 能正常捲的原因。 */
.pdf-scroll[b-70fpqkbncv] {
    /* 父層 .preview-body 是置中的 flex，這裡要自己撐滿寬度，
       否則容器寬度會縮成 0、算出來的畫布寬度也跟著壞掉。 */
    align-self: stretch;
    width: 100%;
    max-height: 72vh;
    max-height: 72dvh;
    overflow-y: auto;
    /* iOS 的慣性捲動。新版 Safari 已內建，但舊版沒有這行會捲得很生硬。 */
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    /* 深灰底，與一般 PDF 檢視器的紙張襯底一致，看得出頁與頁的邊界 */
    background: #525659;
}

/* ⚠️ 一定要 ::deep：畫布是 pdf-preview.js 用 createElement 建的，沒有這一頁的 scoped 屬性，
   直接寫 .pdf-page 永遠套不到（2026-10-22 才發現這兩條從來沒生效過）。 */
.pdf-scroll[b-70fpqkbncv]  .pdf-page {
    display: block;
    margin: 0 auto 10px;
    max-width: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.pdf-scroll[b-70fpqkbncv]  .pdf-page:last-child {
    margin-bottom: 0;
}

/* 畫第一頁時，容器要留在版面上（PDF.js 靠 clientWidth 決定畫布寬度），
   但不能讓使用者看到半成品，所以用 visibility 而不是 display:none 隱藏。 */
.pdf-scroll.is-rendering[b-70fpqkbncv] {
    visibility: hidden;
}

/* 轉圈圈蓋在容器上方。.preview-body 是置中的 flex，不用絕對定位的話
   它會跟隱藏的容器並排，把畫面推歪。 */
.pdf-rendering-state[b-70fpqkbncv] {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-state[b-70fpqkbncv] {
    text-align: center;
    color: #ccc;
    padding: 3rem 1.5rem;
}

.preview-state p[b-70fpqkbncv] {
    margin: 0.8rem 0 0;
    line-height: 1.7;
}

.preview-foot[b-70fpqkbncv] {
    padding: 0.8rem 1.3rem;
    font-size: 0.8rem;
    color: var(--iva-text-muted);
    border-top: 1px solid #eee;
    text-align: center;
}

.contact-note[b-70fpqkbncv] {
    text-align: center;
    font-size: 0.85rem;
    color: var(--iva-text-muted);
    line-height: 1.8;
    margin: 2rem 0 4rem;
}

/* ── 手機版 ── */
@media (max-width: 768px) {
    .my-submissions-container[b-70fpqkbncv] {
        padding: 1rem;
    }

    .submission-card[b-70fpqkbncv] {
        padding: 1.2rem;
    }

    .info-grid[b-70fpqkbncv] {
        grid-template-columns: 1fr;
    }

    .card-head[b-70fpqkbncv] {
        align-items: flex-start;
        flex-direction: column;
    }

    .code-value[b-70fpqkbncv] {
        font-size: 1.7rem;
    }

    /* 手機寬度下讓「已上傳／格式時間／檢視鈕」垂直堆疊，不要擠成一團。
       （.file-meta 自 2026-10-13 起不再自己排版，排列由 .field-body 決定。） */
    .field-body[b-70fpqkbncv] {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ── 橫向（矮螢幕）的預覽彈窗 ──────────────────────────────
   手機轉橫向後可視高度只剩 390px 上下，而 overlay 的上下 padding（48px）
   加上彈窗的 90dvh（≈351px）就已經超過整個畫面。overlay 是垂直置中的，
   溢出的部分會上下各分一半 —— 標題列連同關閉鈕因此被推到畫面上緣外
   （2026-09-22 正式區回報）。

   ⚠️ 下面幾條要**一起改**：只放寬 .preview-box 的 max-height 沒有用，
      .preview-body 的 min-height: 58dvh 會繼續把彈窗撐高。
      同理只改 padding 也不夠。三處都是「吃高度」的來源。

   門檻用 max-height 560px：涵蓋手機橫向（約 390～430px），
   平板橫向（768px 以上）不受影響，維持原本的置中大彈窗。 */
@media (orientation: landscape) and (max-height: 560px) {
    .preview-overlay[b-70fpqkbncv] {
        padding: 0.4rem;
        /* 不再垂直置中：橫向幾乎沒有多餘高度，置中只會讓誤差往上下兩端溢出。
           改成撐滿，彈窗從上緣開始長，標題列必定看得到。 */
        align-items: stretch;
    }

    .preview-box[b-70fpqkbncv] {
        max-height: 100vh;
        max-height: 100dvh;
    }

    /* 頭尾壓扁，把高度讓給內容 */
    .preview-head[b-70fpqkbncv] {
        padding: 0.5rem 0.9rem;
    }

    .preview-foot[b-70fpqkbncv] {
        padding: 0.4rem 0.9rem;
        font-size: 0.72rem;
    }

    /* 內容區在橫向改由剩餘空間決定高度：
       取消下限（沒有多餘高度可以「先撐大」）、取消上限（改吃 flex 分配）。
       basis 維持 auto —— 理由見 .preview-body 本體的註解，
       換成 `flex: 1`（basis 0%）會再次蓋掉高度設定。 */
    .preview-body[b-70fpqkbncv] {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    /* 這四個原本各自寫死 72dvh，橫向時會超過父層能給的高度，
       一律改成「不超過父層」。 */
    .preview-video[b-70fpqkbncv],
    .preview-image[b-70fpqkbncv],
    .pdf-scroll[b-70fpqkbncv] {
        max-height: 100%;
    }

    .preview-frame[b-70fpqkbncv] {
        height: 100%;
    }
}

/* === 暗色模式覆寫：僅在 html[data-theme="dark"] 下生效（亮色不變）=== */
html[data-theme="dark"] .subtitle[b-70fpqkbncv],
html[data-theme="dark"] .state-box[b-70fpqkbncv],
html[data-theme="dark"] .contest-name[b-70fpqkbncv],
html[data-theme="dark"] .info-label[b-70fpqkbncv],
html[data-theme="dark"] .none-text[b-70fpqkbncv],
html[data-theme="dark"] .file-meta[b-70fpqkbncv],
html[data-theme="dark"] .hint-text[b-70fpqkbncv],
html[data-theme="dark"] .doc-meta[b-70fpqkbncv],
html[data-theme="dark"] .contact-note[b-70fpqkbncv],
html[data-theme="dark"] .concept-text.is-empty[b-70fpqkbncv] {
    color: #9aa89c;
}

/* 三個區塊標籤（審核狀態／創作理念／影片檔案）在暗色下用同一個綠，
   亮色那邊也是共用 var(--color-dark-green)，兩邊一起改才不會分岔。 */
html[data-theme="dark"] .concept-label[b-70fpqkbncv],
html[data-theme="dark"] .field-label[b-70fpqkbncv] {
    color: #7fb389;
}

html[data-theme="dark"] .concept-text[b-70fpqkbncv] {
    color: #f3e9dc;
}

html[data-theme="dark"] .empty-note[b-70fpqkbncv] {
    color: #7c8a7f;
}

html[data-theme="dark"] .state-box h2[b-70fpqkbncv],
html[data-theme="dark"] .code-value[b-70fpqkbncv],
html[data-theme="dark"] .item-code[b-70fpqkbncv],
html[data-theme="dark"] .section-title[b-70fpqkbncv] {
    color: #7fb389;
}

html[data-theme="dark"] .submission-card[b-70fpqkbncv] {
    background: #1e2521;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .card-head[b-70fpqkbncv] {
    border-bottom-color: #3a443d;
}

html[data-theme="dark"] .info-value[b-70fpqkbncv],
html[data-theme="dark"] .item-title[b-70fpqkbncv],
html[data-theme="dark"] .doc-label[b-70fpqkbncv] {
    color: #f3e9dc;
}

html[data-theme="dark"] .item-card[b-70fpqkbncv],
html[data-theme="dark"] .doc-row[b-70fpqkbncv] {
    background: #242b27;
    border-color: #3a443d;
}

/* 「審核狀態」四個字與卡片裡其他欄位標籤用同一個綠（亮色是 --color-dark-green）。
   註：這裡原本還有 .edit-row 的 border-top-color 覆寫，
       2026-10-13 連同那條多餘的分隔線一起移除。 */
html[data-theme="dark"] .review-label[b-70fpqkbncv] {
    color: #7fb389;
}

html[data-theme="dark"] .edit-blocked[b-70fpqkbncv] {
    color: #9aa89c;
}

html[data-theme="dark"] .readonly-notice[b-70fpqkbncv] {
    background: #242b27;
    border-color: #3a443d;
    color: #9aa89c;
}

html[data-theme="dark"] .loading-ring[b-70fpqkbncv] {
    border-color: #3a443d;
    border-top-color: #7fb389;
}

html[data-theme="dark"] .section-title[b-70fpqkbncv] {
    border-left-color: #4d6b54;
}

/* 徽章：暗色改成「深底亮字」，與亮色的「淺底深字」互為鏡像 */
html[data-theme="dark"] .status-badge.ok[b-70fpqkbncv] {
    background: #1f3a28;
    color: #8fd6a4;
}

html[data-theme="dark"] .status-badge.wait[b-70fpqkbncv] {
    background: #3d3018;
    color: #f5c877;
}

html[data-theme="dark"] .status-badge.bad[b-70fpqkbncv] {
    background: #3d1f1f;
    color: #f2a0a0;
}

html[data-theme="dark"] .primary-btn[b-70fpqkbncv] {
    background: #4d6b54;
}

html[data-theme="dark"] .primary-btn:hover[b-70fpqkbncv] {
    background: #5f8168;
}

html[data-theme="dark"] .state-box.error h2[b-70fpqkbncv] {
    color: #f2a0a0;
}

/* 檢視按鈕與彈窗的暗色覆寫 */
html[data-theme="dark"] .view-btn[b-70fpqkbncv] {
    background: #242b27;
    border-color: #4d6b54;
    color: #7fb389;
}

html[data-theme="dark"] .view-btn:hover[b-70fpqkbncv] {
    background: #4d6b54;
    color: #f3e9dc;
}

html[data-theme="dark"] .preview-box[b-70fpqkbncv] {
    background: #1e2521;
}

html[data-theme="dark"] .preview-head[b-70fpqkbncv],
html[data-theme="dark"] .preview-foot[b-70fpqkbncv] {
    border-color: #3a443d;
}

html[data-theme="dark"] .preview-title[b-70fpqkbncv] {
    color: #7fb389;
}

html[data-theme="dark"] .preview-close[b-70fpqkbncv],
html[data-theme="dark"] .preview-foot[b-70fpqkbncv] {
    color: #9aa89c;
}

/* ⚠️ .preview-frame 的白底刻意不改成深色 —— 那是 PDF 的紙張背景，
   在暗色模式下也應該是白的（PDF 內容本身是黑字白底）。 */
/* /Pages/PermissionManagement.razor.rz.scp.css */
/* 定義頁面組別專屬顏色 (明度已調低) */
.color-vote[b-5ui1vzxcjp] { color: #537D5D !important; font-weight: 600; }      /* 深綠 (Logo色) */
.color-translate[b-5ui1vzxcjp] { color: #2c5282 !important; font-weight: 600; } /* 深藍 */
.color-upload[b-5ui1vzxcjp] { color: #5f370e !important; font-weight: 600; }    /* 深咖啡 (調暗) */
.color-perm[b-5ui1vzxcjp] { color: #3b2a82 !important; font-weight: 600; }      /* 深邃紫 (調暗) */
.color-history[b-5ui1vzxcjp] { color: #2d3748 !important; font-weight: 600; }   /* 深碳黑 */

.perm-group-box[b-5ui1vzxcjp] {
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.group-title-bar[b-5ui1vzxcjp] {
    padding: 12px 15px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-items-padding[b-5ui1vzxcjp] {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.check-item-custom[b-5ui1vzxcjp] {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.check-item-custom:hover[b-5ui1vzxcjp] {
    background: #f5f5f5;
    border-color: #eee;
}

/* ⚠️ 2026-10-22 移除：稽核日誌篩選區、切換鈕、重置／刷新鈕、搜尋框、同步狀態列的樣式。
   那些元素都在子元件裡（AuditLogTab、UserPermissionSplitLayout、SyncStatusBar），
   這個 scoped CSS 碰不到；各元件已經有自己的同名樣式。要改那些外觀請到各元件的檔案裡改。 */

/* 結果彈窗樣式 */
.result-modal-overlay[b-5ui1vzxcjp] {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.result-modal-card[b-5ui1vzxcjp] {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn-b-5ui1vzxcjp 0.3s ease-out;
}
@keyframes modalFadeIn-b-5ui1vzxcjp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.result-modal-title[b-5ui1vzxcjp] {
    text-align: center;
    margin-bottom: 20px;
    color: #537D5D;
    font-weight: bold;
}
.result-section[b-5ui1vzxcjp] { margin-bottom: 15px; }
.result-label[b-5ui1vzxcjp] { font-size: 0.85rem; color: #888; margin-bottom: 8px; display: block; }
.result-tags[b-5ui1vzxcjp] { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-add[b-5ui1vzxcjp] { background: #e6fffa; color: #2c7a7b; padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; border: 1px solid #b2f5ea; }
.tag-remove[b-5ui1vzxcjp] { background: #fff5f5; color: #c53030; padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; border: 1px solid #feb2b2; }
/* 角色 Badge 樣式 */
.role-badge[b-5ui1vzxcjp] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 不同角色的顏色定義 */
.badge-admin[b-5ui1vzxcjp] {
    background-color: #fffaf0;
    color: #b8860b;
    border: 1px solid #f3e5ab;
}

.badge-staff[b-5ui1vzxcjp] {
    background-color: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
}

.badge-student[b-5ui1vzxcjp] {
    background-color: #f0fff4;
    color: #2f855a;
    border: 1px solid #c6f6d5;
}

.badge-user[b-5ui1vzxcjp] {
    background-color: #f7fafc;
    color: #4a5568;
    border: 1px solid #edf2f7;
}

.result-confirm-btn[b-5ui1vzxcjp] {
    width: 100%; margin-top: 25px; padding: 12px;
    background: #537D5D; color: white; border: none;
    border-radius: 10px; font-weight: bold; cursor: pointer;
}

/* ===================================================================== */
/* === 暗色模式覆寫：僅在 html[data-theme="dark"] 下生效（亮色不變）=== */
/* ===================================================================== */

/* 組別文字色：原本深色在暗底難讀，改為較亮版本 */
html[data-theme="dark"] .color-vote[b-5ui1vzxcjp] { color: #7fb389 !important; }
html[data-theme="dark"] .color-translate[b-5ui1vzxcjp] { color: #7ab0e0 !important; }
html[data-theme="dark"] .color-upload[b-5ui1vzxcjp] { color: #d8a878 !important; }
html[data-theme="dark"] .color-perm[b-5ui1vzxcjp] { color: #a99ce6 !important; }
html[data-theme="dark"] .color-history[b-5ui1vzxcjp] { color: #c7d0dc !important; }

/* 權限分組卡片 */
html[data-theme="dark"] .perm-group-box[b-5ui1vzxcjp] {
    background: #1e2521;
    border-color: #3a443d;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .group-title-bar[b-5ui1vzxcjp] {
    background: #242b27;
    border-bottom-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .check-item-custom:hover[b-5ui1vzxcjp] {
    background: #2e3631;
    border-color: #3a443d;
}

/* 結果彈窗卡片 */
html[data-theme="dark"] .result-modal-card[b-5ui1vzxcjp] {
    background: #1e2521;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .result-modal-title[b-5ui1vzxcjp] {
    color: #7fb389;
}
html[data-theme="dark"] .result-label[b-5ui1vzxcjp] {
    color: #9aa89c;
}

/* ── 內嵌 inline 淺底方塊（需 !important 蓋過 inline style）── */
/* 指派頁：正在設定 提示條（#fafafa） */
html[data-theme="dark"] .pm-assign-head[b-5ui1vzxcjp] {
    background: #242b27 !important;
    border-color: #3a443d !important;
    color: #f3e9dc;
}
/* 持有者抽屜的人員列（#f9f9f9） */
html[data-theme="dark"] .pm-drawer-user-row[b-5ui1vzxcjp] {
    background: #242b27 !important;
    border-left-color: #4a564d !important;
    color: #f3e9dc;
}
/* 權限更新成功彈窗的摘要方塊（#f8f9fa） */
html[data-theme="dark"] .pm-result-summary[b-5ui1vzxcjp] {
    background: #242b27 !important;
    color: #f3e9dc;
}

/* ===== 手機版（寬度小於 768px，2026-10-19）=====
   子元件（人員分欄、權限清單、稽核日誌）各自的手機版規則寫在各自的檔案裡。 */
@media (max-width: 767.98px) {
    /* 分頁籤：最多 5 個排一行放不下 → 改成可左右滑的一列，保留書籤外觀 */
    .perm-side-nav[b-5ui1vzxcjp] {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-left: 0.5rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .perm-side-nav[b-5ui1vzxcjp]::-webkit-scrollbar { display: none; }
    .bookmark-tab[b-5ui1vzxcjp] {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.55rem 0.9rem;
        font-size: 0.88rem;
    }

    .perm-main-panel[b-5ui1vzxcjp] { padding: 1rem; }

    /* 「持有者」抽屜：電腦版固定 450px，比手機寬 */
    .drawer-panel[b-5ui1vzxcjp] { width: 92vw; }

    /* 指派頁的「正在設定：某某」提示條：名字長時讓角色徽章換到下一行 */
    .pm-assign-head[b-5ui1vzxcjp] { flex-wrap: wrap; gap: 8px; }
    .pm-assign-head > div:last-child[b-5ui1vzxcjp] { margin-left: 0 !important; }
}

/* /Pages/TranslationFileManager.razor.rz.scp.css */
.translation-container[b-is3gr62u9s] { 
    padding: 2rem 4rem; 
    width: 100%; 
    box-sizing: border-box; 
}

.page-header[b-is3gr62u9s] {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header .title[b-is3gr62u9s] {
    font-size: 2.5rem;
    color: #537D5D;
    font-weight: 900;
}

/* 模式切換按鈕：已改用全域 .iva-mode-selector／.iva-mode-btn（app.css 檔尾）。
   ISSUES.md 第 80 項 —— 這一份原本連 hover 都漏抄，是三頁裡最不一致的一份。 */

/* 摺疊工具列容器 */
.collapsible-toolbar-container[b-is3gr62u9s] {
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.toolbar-toggle-btn[b-is3gr62u9s] {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    gap: 10px;
}
.toolbar-toggle-btn:hover[b-is3gr62u9s] { background: #f3f4f6; }
.toolbar-toggle-btn .icon[b-is3gr62u9s] { font-size: 1.2rem; }
.toolbar-toggle-btn .text[b-is3gr62u9s] { font-weight: 700; color: #374151; flex: 1; text-align: left; }
.toolbar-toggle-btn .arrow-icon[b-is3gr62u9s] { transition: transform 0.3s ease; color: #9ca3af; }
.toolbar-toggle-btn.expanded .arrow-icon[b-is3gr62u9s] { transform: rotate(180deg); }

.toolbar-content-wrapper[b-is3gr62u9s] {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}
.toolbar-content-wrapper.is-open[b-is3gr62u9s] { max-height: 500px; border-top: 1px solid #f3f4f6; }

.toolbar-flex-row[b-is3gr62u9s] {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    flex-wrap: wrap;
}

.manual-col[b-is3gr62u9s] { flex: 7; min-width: 350px; }
.tool-col[b-is3gr62u9s] { flex: 3; min-width: 250px; }

.panel-card[b-is3gr62u9s] {
    height: 100%;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.manual-panel[b-is3gr62u9s] { background: #f8fafc; border: 1px solid #e2e8f0; }
.tool-panel[b-is3gr62u9s] { background: #f0fdf4; border: 1px solid #dcfce7; }

.panel-title[b-is3gr62u9s] {
    font-size: 1rem;
    font-weight: 800;
    color: #537D5D;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manual-grid[b-is3gr62u9s] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #4b5563;
}
@media (max-width: 992px) { .manual-grid[b-is3gr62u9s] { grid-template-columns: 1fr; } }

.manual-note[b-is3gr62u9s] { color: #d9534f; font-size: 0.8rem; }

.tool-desc[b-is3gr62u9s] { font-size: 0.85rem; color: #666; margin-bottom: 1rem; }

.sync-btn[b-is3gr62u9s] {
    background: #537D5D;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.sync-btn:hover[b-is3gr62u9s] { background: #436a4c; transform: translateY(-1px); }
.sync-btn:disabled[b-is3gr62u9s] { background: #9ca3af; cursor: not-allowed; }

.sync-status[b-is3gr62u9s] {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #537D5D;
}

/* 緊湊卡片網格 (6個一行) */
.file-management-grid[b-is3gr62u9s] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.file-card[b-is3gr62u9s] {
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.file-card:hover[b-is3gr62u9s] { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }

/* 左上角展示開關 */
.visibility-toggle[b-is3gr62u9s] {
    position: absolute;
    top: 12px;
    left: 12px;
}

/* 右上角刪除鍵 */
.delete-lang-btn[b-is3gr62u9s] {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}
.delete-lang-btn:hover[b-is3gr62u9s] { background: #e53e3e; color: white; border-color: #e53e3e; }

.card-emoji[b-is3gr62u9s] {
    font-size: 2.5rem;
    margin-top: 0.5rem;
}

.file-card h3[b-is3gr62u9s] { 
    color: #537D5D; 
    font-weight: 800; 
    margin: 0.5rem 0; 
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-badge[b-is3gr62u9s] {
    font-size: 0.85rem;
}

.file-actions[b-is3gr62u9s] { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    margin-top: 1rem;
}

.action-icon-btn[b-is3gr62u9s] { 
    padding: 8px 12px; 
    border-radius: 8px; 
    border: 1px solid #e2e8f0; 
    background: white; 
    cursor: pointer; 
    transition: 0.2s; 
    font-size: 0.85rem; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    width: 100%;
    justify-content: center;
}
.action-icon-btn:hover[b-is3gr62u9s] { background: #f8fafc; border-color: #537D5D; color: #537D5D; }

.add-card[b-is3gr62u9s] {
    border: 2px dashed #537D5D;
    background: #f0f7f2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}
.add-card:hover[b-is3gr62u9s] { background: #e6f4ed; }
.add-card-emoji[b-is3gr62u9s] { font-size: 2.5rem; color: #537D5D; margin-bottom: 0.5rem; }
.add-card h3[b-is3gr62u9s] { color: #537D5D; }
.add-card p[b-is3gr62u9s] { color: #888; font-size: 0.85rem; }

/* Combobox */
.custom-combobox[b-is3gr62u9s] { position: relative; }
.custom-combobox input.dropdown-open[b-is3gr62u9s] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.custom-dropdown-menu[b-is3gr62u9s] {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
}
.custom-dropdown-item[b-is3gr62u9s] {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-bottom: 1px solid #f8f9fa;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}
.custom-dropdown-item:last-child[b-is3gr62u9s] {
    border-bottom: none;
}
.custom-dropdown-item:hover[b-is3gr62u9s] {
    background-color: #f0fdf4;
    color: #537D5D;
}

.form-label-custom[b-is3gr62u9s] {
    margin-bottom: 2px !important;
}

.btn-import-full[b-is3gr62u9s] {
    line-height: 1;
}

.btn-import-full i[b-is3gr62u9s] {
    font-size: 1.25rem;
}

/* ===================================================================
   暗色主題覆寫 — 僅在 html[data-theme="dark"] 生效（純疊加，不動亮色）
   =================================================================== */

/* 摺疊工具列容器（原白底 / 淺邊框） */
html[data-theme="dark"] .collapsible-toolbar-container[b-is3gr62u9s] {
    background: #1e2521;
    border-color: #3a443d;
}
html[data-theme="dark"] .toolbar-toggle-btn[b-is3gr62u9s] {
    background: #242b27;
}
html[data-theme="dark"] .toolbar-toggle-btn:hover[b-is3gr62u9s] {
    background: #2e3631;
}
html[data-theme="dark"] .toolbar-toggle-btn .text[b-is3gr62u9s] {
    color: #f3e9dc;
}
html[data-theme="dark"] .toolbar-toggle-btn .arrow-icon[b-is3gr62u9s] {
    color: #9aa89c;
}
html[data-theme="dark"] .toolbar-content-wrapper[b-is3gr62u9s] {
    background: #1e2521;
}
html[data-theme="dark"] .toolbar-content-wrapper.is-open[b-is3gr62u9s] {
    border-top-color: #3a443d;
}

/* 內層面板卡片（原淺藍 / 淺綠底） */
html[data-theme="dark"] .manual-panel[b-is3gr62u9s] {
    background: #242b27;
    border-color: #3a443d;
}
html[data-theme="dark"] .tool-panel[b-is3gr62u9s] {
    background: #1e2a22;
    border-color: #3a443d;
}
html[data-theme="dark"] .panel-title[b-is3gr62u9s] {
    color: #7fb389;
}
html[data-theme="dark"] .manual-grid[b-is3gr62u9s] {
    color: #9aa89c;
}
html[data-theme="dark"] .tool-desc[b-is3gr62u9s] {
    color: #9aa89c;
}

/* 語系檔案卡片（原白底） */
html[data-theme="dark"] .file-card[b-is3gr62u9s] {
    background: #1e2521;
    border-color: #3a443d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .file-card:hover[b-is3gr62u9s] {
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .file-card h3[b-is3gr62u9s] {
    color: #7fb389;
}

/* 刪除按鈕（原淺粉底） */
html[data-theme="dark"] .delete-lang-btn[b-is3gr62u9s] {
    background: #33232a;
    color: #e57373;
    border-color: #4a3238;
}
html[data-theme="dark"] .delete-lang-btn:hover[b-is3gr62u9s] {
    background: #e53e3e;
    color: #fff;
    border-color: #e53e3e;
}

/* 匯出 / 更新按鈕（原白底） */
html[data-theme="dark"] .action-icon-btn[b-is3gr62u9s] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .action-icon-btn:hover[b-is3gr62u9s] {
    background: #2e3631;
    border-color: #7fb389;
    color: #7fb389;
}

/* 新增語系卡片（原淺綠底） */
html[data-theme="dark"] .add-card[b-is3gr62u9s] {
    background: #1e2a22;
    border-color: #7fb389;
}
html[data-theme="dark"] .add-card:hover[b-is3gr62u9s] {
    background: #2e3631;
}
html[data-theme="dark"] .add-card h3[b-is3gr62u9s],
html[data-theme="dark"] .add-card-emoji[b-is3gr62u9s] {
    color: #7fb389;
}
html[data-theme="dark"] .add-card p[b-is3gr62u9s] {
    color: #9aa89c;
}

/* 語系下拉選單（原白底） */
html[data-theme="dark"] .custom-dropdown-menu[b-is3gr62u9s] {
    background-color: #1e2521;
    border-color: #3a443d;
}
html[data-theme="dark"] .custom-dropdown-item[b-is3gr62u9s] {
    color: #f3e9dc;
    border-bottom-color: #3a443d;
}
html[data-theme="dark"] .custom-dropdown-item:hover[b-is3gr62u9s] {
    background-color: #2e3631;
    color: #7fb389;
}

/* 表單標籤（淺底上文字，避免過黑不清） */
html[data-theme="dark"] .form-label-custom[b-is3gr62u9s] {
    color: #f3e9dc;
}

/* 卡片內 Bootstrap bg-light 淺色標籤（.json 檔名 / 下拉代碼） */
html[data-theme="dark"] .card-badge.bg-light[b-is3gr62u9s],
html[data-theme="dark"] .dd-code-badge.bg-light[b-is3gr62u9s] {
    background-color: #242b27 !important;
    color: #f3e9dc !important;
    border-color: #3a443d !important;
}

/* 提示 / 確認 Modal 的深色樣式已移到 wwwroot/css/app.css
   —— .iva-modal-* / .iva-btn-* 是全站共用的元件，樣式放在單一頁面的隔離 CSS 裡
   只會對這一頁生效，別的頁面用同一組 class 就會變成白底黑字。見 ISSUES.md 第 66 項。 */
/* /Pages/TranslationManager.razor.rz.scp.css */
.translation-container[b-tntpu9qa4x] { 
    padding: 2rem 4rem; 
    width: 100%; 
    box-sizing: border-box; 
}

/* 標題（2026-10-19 由 inline style 搬來，手機版才蓋得掉） */
.tr-page-header[b-tntpu9qa4x] { text-align: center; margin-bottom: 2rem; }
.tr-page-header .tr-title[b-tntpu9qa4x] { font-size: 2.5rem; }

/* 模式切換按鈕 (複刻抽獎頁面風格) */
/* 模式切換按鈕：已改用全域 .iva-mode-selector／.iva-mode-btn（app.css 檔尾）。
   ISSUES.md 第 80 項。 */

.translation-card[b-tntpu9qa4x] { 
    background: white; 
    border-radius: 20px; 
    padding: 2.5rem; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); 
    border: 1px solid #eef2f0;
}

.tool-bar[b-tntpu9qa4x] { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.5rem; 
    gap: 20px; 
}
.filter-toggles[b-tntpu9qa4x] { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-btn[b-tntpu9qa4x] { padding: 8px 16px; border-radius: 20px; border: 1px solid #e2e8f0; background: white; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; }
.toggle-btn.active[b-tntpu9qa4x] { background: #537D5D; color: white; border-color: #537D5D; font-weight: 600; box-shadow: 0 4px 10px rgba(83, 125, 93, 0.2); }

.search-wrapper[b-tntpu9qa4x] { flex: 0 0 400px; }

/* 分類下拉選單：只在手機版顯示（見檔尾），電腦版用上面那排標籤。
   外觀來自 app.css 的全站共用 .home-dropdown-*（含深色模式），這裡只補本頁需要的部分。 */
.tr-category-dropdown[b-tntpu9qa4x] { display: none; }
/* 16 個分類全展開會超出手機畫面，選單本身限高、內部捲動 */
.tr-category-dropdown .home-dropdown-menu-container[b-tntpu9qa4x] {
    max-height: 60vh;
    overflow-y: auto;
}
.search-input-group[b-tntpu9qa4x] { position: relative; display: flex; align-items: center; }
.search-input[b-tntpu9qa4x] { width: 100%; padding: 10px 45px 10px 15px; border-radius: 10px; border: 1px solid #e2e8f0; transition: all 0.2s; height: 45px; }
.search-input:focus[b-tntpu9qa4x] { border-color: #537D5D; box-shadow: 0 0 0 3px rgba(83, 125, 93, 0.1); outline: none; }

.clear-search-btn[b-tntpu9qa4x] { 
    position: absolute; 
    right: 10px; 
    background: #f1f5f9; 
    border: none; 
    color: #64748b; 
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s; 
    padding: 0;
}
.clear-search-btn:hover[b-tntpu9qa4x] { background-color: #fee2e2; color: #ef4444; transform: scale(1.1); }

.data-table[b-tntpu9qa4x] { width: 100%; border-collapse: collapse; }
.data-table th[b-tntpu9qa4x] { background: #f8fafc; padding: 15px; text-align: left; border-bottom: 2px solid #edf2f7; color: #64748b; font-size: 0.9rem; position: sticky; top: 0; z-index: 1; }
.data-table td[b-tntpu9qa4x] { padding: 12px 15px; border-bottom: 1px solid #f1f5f9; }
.resource-key[b-tntpu9qa4x] { font-family: 'Monaco', 'Consolas', monospace; font-size: 0.8rem; color: #94a3b8; margin-bottom: 4px; display: block; }
.edit-input[b-tntpu9qa4x] { width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; transition: all 0.2s; height: 45px; font-size: 0.95rem; }
.edit-input:focus[b-tntpu9qa4x] { border-color: #537D5D; outline: none; box-shadow: 0 0 0 3px rgba(83, 125, 93, 0.1); }
.scrollable-area[b-tntpu9qa4x] { max-height: 700px; overflow-y: auto; padding-bottom: 100px; }

.toast-notification[b-tntpu9qa4x] { 
    position: fixed !important; 
    top: 50% !important; 
    left: 50% !important; 
    transform: translate(-50%, -50%) !important; 
    background: rgba(83, 125, 93, 0.95); 
    color: white; 
    padding: 18px 35px; 
    border-radius: 15px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    z-index: 999999; 
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    pointer-events: none;
    width: fit-content !important;
    text-align: center;
    animation: centerFadeInOut-b-tntpu9qa4x 2.8s ease-in-out forwards;
}

/* 註：公告區預覽與控制面板的樣式已移至 Components/AnnouncementPanel.razor.css。
   Blazor 的 scoped CSS 綁在元件上，標籤搬走樣式就必須跟著搬。 */

/* 唯讀的公告分類：欄位要看得出來不能改，否則使用者會打了字才發現存不下去 */
.readonly-input[b-tntpu9qa4x] {
    background: #f8fafc;
    color: #64748b;
    cursor: default;
}

.readonly-bar[b-tntpu9qa4x] {
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    border-color: #cbd5e1;
    border-left-color: #94a3b8;
}

/* 表格上方的獨立提示條 */
.hero-hint-bar[b-tntpu9qa4x] {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #f0fdf4, #f8fafc);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #537D5D;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}

@keyframes centerFadeInOut-b-tntpu9qa4x {
    0% { opacity: 0; transform: translate(-50%, -45%); }
    15% { opacity: 1; transform: translate(-50%, -50%); }
    85% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -55%); }
}

/* ===================================================================== */
/* === 暗色模式覆寫：僅在 html[data-theme="dark"] 下生效（亮色不變）=== */
/* ===================================================================== */

/* 主卡片 */
html[data-theme="dark"] .translation-card[b-tntpu9qa4x] {
    background: #1e2521;
    border-color: #3a443d;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

/* 分類切換 / 語系切換小按鈕 */
html[data-theme="dark"] .toggle-btn[b-tntpu9qa4x] {
    background: #242b27;
    color: #9aa89c;
    border-color: #3a443d;
}
html[data-theme="dark"] .toggle-btn.active[b-tntpu9qa4x] {
    background: #7fb389;
    color: #1e2521;
    border-color: #7fb389;
}

/* 搜尋框 */
html[data-theme="dark"] .search-input[b-tntpu9qa4x] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .search-input[b-tntpu9qa4x]::placeholder {
    color: #6b7670;
}
html[data-theme="dark"] .search-input:focus[b-tntpu9qa4x] {
    border-color: #7fb389;
}
html[data-theme="dark"] .clear-search-btn[b-tntpu9qa4x] {
    background: #2e3631;
    color: #9aa89c;
}
html[data-theme="dark"] .clear-search-btn:hover[b-tntpu9qa4x] {
    background: #33232a;
    color: #f08a8a;
}

/* 資料表格 */
html[data-theme="dark"] .data-table th[b-tntpu9qa4x] {
    background: #242b27;
    color: #9aa89c;
    border-bottom-color: #3a443d;
}
html[data-theme="dark"] .data-table td[b-tntpu9qa4x] {
    border-bottom-color: #3a443d;
}
html[data-theme="dark"] .resource-key[b-tntpu9qa4x] {
    color: #6b7670;
}
html[data-theme="dark"] .edit-input[b-tntpu9qa4x] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .edit-input[b-tntpu9qa4x]::placeholder {
    color: #6b7670;
}
html[data-theme="dark"] .edit-input:focus[b-tntpu9qa4x] {
    border-color: #7fb389;
}

/* 表格上方提示條（淺綠漸層） */
html[data-theme="dark"] .readonly-input[b-tntpu9qa4x] {
    background: #242b27;
    color: #9aa89c;
}
html[data-theme="dark"] .readonly-bar[b-tntpu9qa4x] {
    background: #242b27;
    border-color: #3a443d;
    border-left-color: #6b7670;
    color: #9aa89c;
}

html[data-theme="dark"] .hero-hint-bar[b-tntpu9qa4x] {
    background: #1e2a22;
    border-color: #3f6b47;
    border-left-color: #7fb389;
    color: #cbd8cc;
}

/* ===================================================================== */
/* === 手機版（2026-10-19）                                           === */
/* ===================================================================== */
@media (max-width: 767.98px) {
    /* ⚠️ 全域 app.css 給 .translation-container 設了 will-change: transform，
          這會讓它變成 position: fixed 的定位基準 —— 下面固定在右下角的儲存鈕
          會黏在容器上而不是畫面上（捲動時跟著跑掉）。手機版關掉它。 */
    .translation-container[b-tntpu9qa4x] { padding: 1rem; will-change: auto; }
    .tr-page-header[b-tntpu9qa4x] { margin-bottom: 1.25rem; }
    .tr-page-header .tr-title[b-tntpu9qa4x] { font-size: 1.7rem; }

    /* 工具列：分類標籤換成下拉選單（16 個標籤會佔掉大半個畫面），搜尋框撐滿 */
    .tool-bar[b-tntpu9qa4x] { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 1.25rem; }
    .filter-toggles[b-tntpu9qa4x] { display: none; }
    .tr-category-dropdown[b-tntpu9qa4x] { display: block; }
    .search-wrapper[b-tntpu9qa4x] { flex: none; width: 100%; }

    .hero-hint-bar[b-tntpu9qa4x] { padding: 10px 12px; font-size: 0.85rem; align-items: flex-start; }

    .translation-card[b-tntpu9qa4x] { padding: 1rem; border-radius: 16px; }

    /* 取消內層捲動（頁面裡再捲一層在手機上很難操作）；
       底部留空間，最後一筆才不會被固定的儲存鈕蓋住 */
    .scrollable-area[b-tntpu9qa4x] { max-height: none; overflow-y: visible; padding-bottom: 80px; }

    /* 表格 → 每個 Key 一張卡片，語系上下排 */
    .tr-table[b-tntpu9qa4x] { min-width: 0; }   /* 蓋過頁內 <style> 的 min-width: 600px */
    .tr-table thead[b-tntpu9qa4x] { display: none; }
    .tr-table[b-tntpu9qa4x], .tr-table tbody[b-tntpu9qa4x], .tr-table tr[b-tntpu9qa4x] { display: block; }
    .tr-table tr[b-tntpu9qa4x] { padding: 14px 0; border-bottom: 1px solid #edf2f7; }
    .tr-table tr:last-child[b-tntpu9qa4x] { border-bottom: 0; }
    .tr-table td[b-tntpu9qa4x] {
        display: flex;
        flex-direction: column;
        padding: 4px 0;
        border-bottom: 0;
    }
    /* Key 只在第一個語系格顯示，排在語系名稱之前 */
    .tr-table td .resource-key[b-tntpu9qa4x] { order: -1; word-break: break-all; margin-bottom: 8px; }
    .tr-table td:not(:first-child) .resource-key[b-tntpu9qa4x] { display: none; }
    .tr-table td[data-label][b-tntpu9qa4x]::before {
        content: attr(data-label);
        font-size: 0.8rem;
        font-weight: 700;
        color: #537D5D;
        margin-bottom: 4px;
    }
    .tr-table td.tr-empty[b-tntpu9qa4x]::before { content: none; }
    .tr-table .edit-input[b-tntpu9qa4x] { height: auto; min-height: 5.5em; resize: vertical; }

    html[data-theme="dark"] .tr-table tr[b-tntpu9qa4x] { border-bottom-color: #3a443d; }
    html[data-theme="dark"] .tr-table td[data-label][b-tntpu9qa4x]::before { color: #7fb389; }

    /* 儲存鈕固定在右下角（左下角是全站選單鈕） */
    .tr-save-btn[b-tntpu9qa4x] {
        position: fixed;
        right: 16px;
        bottom: 16px;
        z-index: 1050;
        padding: 12px 20px;
        border-radius: 30px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
}

/* ── 平板（768–1199px）──
   搜尋框固定 400px 會把 16 個分類標籤擠成窄窄一欄、排成七八行。
   改成上下排：標籤在上面用滿整列，搜尋框在下面撐滿。 */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .translation-container[b-tntpu9qa4x] { padding: 2rem; }
    .tool-bar[b-tntpu9qa4x] { flex-direction: column; align-items: stretch; gap: 16px; }
    .search-wrapper[b-tntpu9qa4x] { flex: none; width: 100%; }
}

/* ── 觸控裝置 ── */
@media (pointer: coarse) {
    .clear-search-btn[b-tntpu9qa4x] { width: 32px; height: 32px; right: 8px; }
}
@media (hover: none) {
    .clear-search-btn:hover[b-tntpu9qa4x] { background-color: #f1f5f9; color: #64748b; transform: none; }
    html[data-theme="dark"] .clear-search-btn:hover[b-tntpu9qa4x] { background: #2e3631; color: #9aa89c; }
}

/* /Pages/Upload.razor.rz.scp.css */
.upload-container[b-f2eoyftp1z] { 
    padding: 2rem 4rem; 
    width: 100%; 
    box-sizing: border-box; 
}

/* 桌面版：放開寬度限制，盡量全螢幕 */
@media (min-width: 1001px) {
    .upload-container[b-f2eoyftp1z] {
        max-width: 95%; /* 留一點點邊距，但接近全寬 */
    }
}

/* 手機與平板版：維持窄版限制，避免元件拉寬變形 */
@media (max-width: 1000px) {
    .upload-container[b-f2eoyftp1z] {
        max-width: 1000px;
        padding: 1rem;
    }
    
    .form-control[b-f2eoyftp1z]::placeholder {
        font-size: 0.85rem; /* 進一步縮小以適應單行輸入框 */
        letter-spacing: -0.5px; /* 稍微縮小字距以容納更多字 */
    }
}
.page-header[b-f2eoyftp1z] { text-align: center; margin-bottom: 3rem; }
.page-header .title[b-f2eoyftp1z] { font-size: 2.8rem; color: #537D5D; font-weight: 800; letter-spacing: 2px; }
.upload-layout[b-f2eoyftp1z] { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* 恢復 1:1 比例 */
    gap: 3rem; 
    align-items: start; 
}
.upload-card[b-f2eoyftp1z] { background: white; padding: 3rem; border-radius: 20px; border: 1px solid #eef2f0; box-shadow: 0 10px 40px rgba(0,0,0,0.05); }
.form-group[b-f2eoyftp1z] { margin-bottom: 1.8rem; }
.form-group label[b-f2eoyftp1z] { display: block; margin-bottom: 0.8rem; font-weight: 700; color: #4a5568; }
.form-control[b-f2eoyftp1z] { width: 100%; padding: 12px 18px; border-radius: 12px; border: 1.5px solid #e2e8f0; background: #fcfdfd; transition: all 0.3s; }
.form-control:focus[b-f2eoyftp1z] { border-color: #537D5D; outline: none; box-shadow: 0 0 0 4px rgba(83, 125, 93, 0.1); background: white; }

.drop-zone[b-f2eoyftp1z] { border: 2px dashed #ddd; border-radius: 15px; padding: 25px; text-align: center; transition: 0.3s; cursor: pointer; position: relative; }
.drop-zone.has-file[b-f2eoyftp1z] { border-color: #537D5D; background: #f0f7f2; }
.drop-zone.is-duplicate[b-f2eoyftp1z] { border-color: #d9534f; background: #fff5f5; }
.drop-zone .icon[b-f2eoyftp1z] { font-size: 2rem; display: block; margin-bottom: 10px; }

/* ============================================================
   上傳／提交中的全螢幕遮罩（上傳中、提交中、成功彈窗三處共用）

   ⚠️ 這是 `.processing-overlay` **唯一**的定義，不要在別處再寫一份。
      2026-09-30 之前 `Upload.razor` 的頁內 <style> 也定義了一份
      （z-index: 10000），但 CSS isolation 會把這裡改寫成
      `.processing-overlay[b-xxx]`，具體性較高、永遠蓋過那一份 ——
      於是「改了頁內那條卻沒反應」。那份重複定義已經移除。

   【z-index: 100002 的由來】ISSUES.md 第 145 項定下的「全站最高模態」那一層。
      必須高於這三個，否則遮罩擋不住東西：
        · 導覽列 NavBar.razor          10000
        · 手機抽屜 MainLayout.razor   100000
        · 手機選單鈕 FAB              100001
      2026-09-30 之前是 9999，比上面每一個都低 —— 導覽列浮在遮罩上面，
      而且**上傳進行中還能拉開抽屜點走**，把提交中斷掉（第 158 項）。

      與 MySubmissions 的預覽彈窗同為 100002 是刻意的：兩者分屬不同頁面，
      不會同時存在，同層代表「都是不可穿透的模態」。

   📌 `padding: 20px` 原本是從頁內 <style> 那份繼承來的（那份有宣告、這份沒有）。
      移除重複定義時一併搬過來，避免小螢幕上白卡貼到畫面邊緣。
   ============================================================ */
.processing-overlay[b-f2eoyftp1z] { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 100002; padding: 20px; }
.processing-modal[b-f2eoyftp1z] { 
    background: white; 
    padding: 3rem 2rem; 
    border-radius: 28px; 
    text-align: center; 
    max-width: 420px; 
    width: 85%; 
    box-shadow: 0 30px 70px rgba(0,0,0,0.15); 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* 增加間距，確保文字絕對不重疊 */
}

/* 載入圓圈容器：內部文字絕對置中 */
.loading-ring-container[b-f2eoyftp1z] {
    position: relative;
    width: 150px; /* 調大至 150px */
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;
}

.loading-ring[b-f2eoyftp1z] { 
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%; 
    border: 8px solid #f0f4f0; border-top: 8px solid #537D5D; border-radius: 50%; 
    animation: spin-b-f2eoyftp1z 1s linear infinite;
    box-sizing: border-box;
}

.loading-status-text[b-f2eoyftp1z] {
    font-weight: 800; 
    color: #537D5D; 
    font-size: 1rem; /* 字體稍微放大一點點 */
    z-index: 5;
    position: relative;
    max-width: 120px; /* 同步放寬文字區塊 */
    text-align: center;
    line-height: 1.4;
    word-break: break-all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processing-modal h3[b-f2eoyftp1z] {
    margin: 0 !important;
    font-size: 1.5rem;
    font-weight: 900;
    color: #537D5D;
}

.processing-modal p[b-f2eoyftp1z] {
    margin: 0 !important;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

@keyframes spin-b-f2eoyftp1z { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* 手機版適配 */
@media (max-width: 768px) {
    .processing-modal[b-f2eoyftp1z] {
        padding: 2.5rem 1.5rem !important;
        gap: 15px !important;
    }
    .loading-ring-container[b-f2eoyftp1z] {
        width: 130px !important;
        height: 130px !important;
    }
    .loading-status-text[b-f2eoyftp1z] {
        font-size: 0.9rem !important;
        max-width: 100px !important;
    }
    .processing-modal h3[b-f2eoyftp1z] {
        font-size: 1.2rem !important;
    }
}

/* 核心修正：Sticky 預覽窗 */
.preview-card-section[b-f2eoyftp1z] {
    height: 100%;
}
.preview-card[b-f2eoyftp1z] { 
    background: white; 
    padding: 2.5rem; 
    border-radius: 20px; 
    border: 1px solid #eef2f0; 
    position: sticky; 
    top: 80px; /* 增加頂部間距，避開導航欄 */
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
    z-index: 10;
}
.preview-btn[b-f2eoyftp1z] { background: #537D5D; color: white; border: none; padding: 6px 15px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: bold; }
.remove-coauthor-btn[b-f2eoyftp1z] { 
    background: #fff5f5; 
    border: 1px solid #feb2b2; 
    color: #d9534f; 
    width: 45px; 
    height: 45px; 
    border-radius: 8px; 
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s;
    flex-shrink: 0; /* 防止被擠壓 */
}
.remove-coauthor-btn:hover[b-f2eoyftp1z] {
    background: #d9534f;
    color: white;
    border-color: #d9534f;
}
.remove-coauthor-btn:hover[b-f2eoyftp1z] {
    background: #d9534f;
    color: white;
    border-color: #d9534f;
}

/* === 亮色底色補回 (原本為 inline，改用 class 以便暗色覆寫；亮色外觀不變) === */
.expected-code-box[b-f2eoyftp1z] { background: #f9f9f2; border: 1px solid #eef2e0; }
.episode-card[b-f2eoyftp1z] { background: #fafafa; border: 1px solid #ddd; }
.preview-empty-box[b-f2eoyftp1z] { background: #fcfdfd; border: 2px dashed #eee; }

/* ============================================================= */
/* === 參賽成員名冊（2026-10-01）=== */
/*
   組長與組員共用同一種卡片，底色與邊框沿用 .episode-card ——
   刻意不另外定義一組顏色，否則暗色模式要再補一份覆寫，
   而漏補的那一份在暗色底下會是白底白字。
   （.episode-card 的暗色覆寫在本檔下方 html[data-theme="dark"] 區塊。）
*/
/* ============================================================= */
.member-card[b-f2eoyftp1z] {
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.member-card-head[b-f2eoyftp1z] {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.member-badge[b-f2eoyftp1z] {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #eef2e0;
    color: #537D5D;
}

/* 組長用實心底色，讓「誰是主要聯絡人」一眼看得出來 */
.member-badge.is-leader[b-f2eoyftp1z] {
    background: #537D5D;
    color: #fff;
}

/* 「⚠️ 尚未填完」—— 刻意用**琥珀色而不是紅色**。
   紅色代表「你填錯了」，琥珀色代表「還沒填」，是兩件不同的事。
   同色的話，剛打開的投稿頁每張卡片都掛著紅字，看起來像一進來就出了錯；
   真正的錯誤訊息（.field-error）反而會混在那片紅色裡看不出來。 */
.member-incomplete[b-f2eoyftp1z] {
    font-size: 0.85rem;
    font-weight: 600;
    color: #b26a00;
}

/* 刪除鈕推到最右邊 */
.member-card-head .remove-coauthor-btn[b-f2eoyftp1z] {
    margin-left: auto;
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

/*
   五個欄位在桌機排成兩欄，手機自動變一欄。
   用 auto-fit + minmax 而不是固定的 grid-template-columns，
   這樣不需要為手機另外寫 media query —— 欄寬不夠時自己掉成一欄。
*/
.member-fields[b-f2eoyftp1z] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px 16px;
}

.member-fields .form-group[b-f2eoyftp1z] {
    margin-bottom: 0;
}

/* 格式不正確 / 必填未填的欄位。紅框之外還有底下的 .field-error 文字說明 ——
   只有紅框的話，使用者知道「這格有問題」卻不知道問題是什麼。 */
.form-control.is-invalid[b-f2eoyftp1z] {
    border-color: #d9534f;
    background: #fff8f8;
}
.form-control.is-invalid:focus[b-f2eoyftp1z] {
    outline-color: #d9534f;
}

/* 標籤旁的「必填」標記。中性色，不是警告 —— 它從頭到尾都在，
   用紅色的話整頁一進來就像是出了錯。 */
.required-mark[b-f2eoyftp1z] {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #eef2e0;
    color: #537D5D;
    vertical-align: middle;
}

/* 欄位說明（.form-hint-text）—— 填之前要先知道的規則，例如「沒有指導老師請填無」。
   2026-10-02 補上：在此之前這個 class **完全沒有樣式**，所以提示是用瀏覽器預設
   在顯示 —— 跟內文一樣大、一樣黑，比它說明的那個欄位還搶眼。

   ⚠️ 上下用對稱的 margin 是刻意的。這個 class 在本頁兩種位置都會出現：
      指導老師與參賽成員放在欄位**上方**，作品標題的提示放在**下方**。
      對稱的 margin 在相鄰時會互相合併（margin collapsing），
      所以連續三行提示不會愈疊愈鬆，單獨一行也不會貼死在輸入框上。

   註：這是「說明」不是「警告」，所以用灰字；紅字是 .field-error 的工作，
       兩者同時用紅色的話，真正填錯時使用者分不出哪一行才是在講他。 */
.form-hint-text[b-f2eoyftp1z] {
    margin: 0.4rem 0;
    font-size: 0.85rem;
    line-height: 1.65;
    color: #718096;
}

/* 【標籤右邊的小字範例】2026-10-02
   參賽成員的五個欄位排成兩欄 grid（.member-fields）。只要其中一格在輸入框**上面**
   多一行說明，那一格的輸入框就會被往下推一行，跟隔壁欄位對不齊 ——
   實測回報的就是手機那格（原本用 .form-hint-text 放在輸入框上方）。

   把範例放進標籤同一行就沒有這個問題：標籤本來就佔一行，加字不會多佔高度。

   ⚠️ 要蓋掉 app.css 的 `.form-group label { display: block }`，所以這裡要寫 flex。
   ⚠️ 字級與粗細刻意比標籤小且不加粗 —— 它是補充說明，
      和欄位名一樣搶眼的話，使用者得多花一眼才分得出哪個是欄位名稱。 */
.label-with-example[b-f2eoyftp1z] {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
}

.label-example[b-f2eoyftp1z] {
    font-size: 0.78rem;
    font-weight: 400;
    color: #718096;
    /* 範例本身不要斷成兩截（「例：0912」+「345678」會看起來像兩個號碼）。
       擠不下時整塊換到標籤下一行，那時版面通常已經掉成單欄，不影響對齊。 */
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   【無法線上預覽的格式】2026-10-02 —— 目前只有 Word（.doc / .docx）

   瀏覽器不能渲染 Word，丟進 iframe 會是一片空白或無預警的下載，
   而使用者剛選完檔，看到空白只會覺得「我的檔案壞了」。改成講清楚。

   ⚠️ 同一組樣式用在**兩個底色完全不同**的地方：
        桌機 → 右側「檔案即時預覽」卡片（白底／暗色模式深底）
        手機 → 全螢幕預覽 overlay（**永遠是黑底**，不隨亮暗色切換）
      所以手機那一份要另外加 .preview-nopreview-mobile 把文字轉成淺色，
      否則黑底配深綠字會看不見。

   📌 亮色與暗色刻意寫在一起（不照本檔「暗色集中在下方」的慣例）——
      這三條規則是互相對照才看得懂的，拆開放兩處很容易只改到一邊。
   ════════════════════════════════════════════════════════════ */
.preview-nopreview[b-f2eoyftp1z] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.preview-nopreview-icon[b-f2eoyftp1z] {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.preview-nopreview-title[b-f2eoyftp1z] {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 800;
    color: #537D5D;
}

.preview-nopreview-desc[b-f2eoyftp1z] {
    margin: 0;
    max-width: 30em;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #718096;
}

/* 手機全螢幕預覽（黑底）要給它高度，不然那塊字會縮成一小條貼在畫面中間。 */
.preview-nopreview-mobile[b-f2eoyftp1z] {
    min-height: 50vh;
}

/* 黑底（手機）與深底（桌機暗色）共用同一組淺色文字。
   ⚠️ 兩個選擇器要寫在同一條規則裡：分開寫的話，暗色模式下手機那一份
      會被 html[data-theme="dark"] 的具體性蓋掉（它比單一 class 高）。 */
.preview-nopreview-mobile .preview-nopreview-title[b-f2eoyftp1z],
html[data-theme="dark"] .preview-nopreview-title[b-f2eoyftp1z] {
    color: #8fd6a4;
}

.preview-nopreview-mobile .preview-nopreview-desc[b-f2eoyftp1z],
html[data-theme="dark"] .preview-nopreview-desc[b-f2eoyftp1z] {
    color: #c3cac6;
}

.field-error[b-f2eoyftp1z] {
    margin-top: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #d9534f;
    line-height: 1.4;
}

/* ============================================================= */
/* === 指導老師「有／無」單選（2026-10-05）=== */
/*
   取代原本的自由輸入加一句「沒有請填無」的提示。

   ⚠️ 用 flex-wrap 是必要的，不是保險：兩個選項的文字在英文
      （"I have an advisor" / "No advisor"）比中文長不少，窄螢幕一行排不下，
      不給 wrap 的話第二個選項會被擠出容器。

   ⚠️ 整個選項（含文字）都包在 <label> 裡，所以點文字也會選中 ——
      只有那顆直徑十幾 px 的圓點可以點的話，手機上很難按。
      cursor: pointer 是在桌機上把「這裡可以點」講清楚。 */
.advisor-choice[b-f2eoyftp1z] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0.5rem 0 0.75rem;
}

.advisor-choice-option[b-f2eoyftp1z] {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.4;
    /* 要蓋掉 app.css 的 `.form-group label { display: block }`，
       否則兩個選項會各佔一行、flex 的橫排完全沒作用。 */
    margin: 0;
    font-weight: 500;
}

/* accent-color 讓圓點跟著全站主色，不必自己畫一顆假的 radio。
   flex-shrink 是防止文字換行時圓點被壓扁成橢圓。 */
.advisor-choice-option input[type="radio"][b-f2eoyftp1z] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #537D5D;
    cursor: pointer;
}

/* 暗色模式：亮色的 #537D5D 在深底上偏暗，圓點幾乎看不出有沒有被選中。
   沿用本檔其他暗色規則用的那組灰綠。 */
html[data-theme="dark"] .advisor-choice-option input[type="radio"][b-f2eoyftp1z] {
    accent-color: #a8c8a0;
}

/* ============================================================= */
/* === 投稿時段狀態列與訪客預覽提示（2026-09-23）=== */
/*
   這兩塊取代了原本時段外的整頁說明畫面與「剛截止」紅色橫幅。
   那兩者的 class（upload-closed-box / upload-closed-banner）從頭到尾
   沒有任何 CSS —— 2026-09-14 加了 markup 但樣式沒補上，所以它們一直是
   沒有排版的裸 div。這裡是重寫，不是搬移。
*/
/* ============================================================= */
.upload-window-bar[b-f2eoyftp1z] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 640px;
    margin: 1.2rem auto 0;
    padding: 14px 22px;
    border-radius: 14px;
    text-align: left;
    border: 1px solid transparent;
}
.upload-window-icon[b-f2eoyftp1z] { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.upload-window-state[b-f2eoyftp1z] { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.5px; }
.upload-window-range[b-f2eoyftp1z] { font-size: 0.9rem; margin-top: 3px; opacity: 0.85; }

/* 開放中：與全站主色一致的淺綠 */
.upload-window-bar.is-open[b-f2eoyftp1z] {
    background: #f0f7f2;
    border-color: #cfe3d6;
    color: #3f6349;
}
/* 尚未開始 / 已截止 / 尚未開放：中性灰，刻意不用紅色 ——
   「還沒開始」不是錯誤，紅色會讓人以為自己做錯了什麼。 */
.upload-window-bar.is-blocked[b-f2eoyftp1z] {
    background: #f6f7f6;
    border-color: #e0e4e1;
    color: #5f6b62;
}

.upload-guest-bar[b-f2eoyftp1z] {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 1000px;
    margin: 0 auto 2rem;
    padding: 16px 22px;
    border-radius: 14px;
    background: #fbf8ee;
    border: 1px solid #ece2c8;
    color: #6b5c33;
}
.upload-guest-icon[b-f2eoyftp1z] { font-size: 1.4rem; line-height: 1.3; flex-shrink: 0; }
.upload-guest-title[b-f2eoyftp1z] { font-weight: 800; margin-bottom: 3px; }
.upload-guest-msg[b-f2eoyftp1z] { font-size: 0.92rem; line-height: 1.6; }

/* 唯讀用的 fieldset：只借它的 disabled 行為，外觀要完全看不出來 */
.upload-fields[b-f2eoyftp1z] {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;   /* 不加的話 fieldset 會拒絕被 grid 壓縮，手機版會橫向溢出 */
}
/*
   停用時**不要**整體降透明度（最初是 opacity: 0.6，2026-09-23 當天就改掉了）——
   那會把標籤、提示文字、檔案格式與大小上限一起洗淡，而那幾行正是訪客
   進到這一頁要看的東西，等於為了表示「不能填」把「要準備什麼」也弄糊了。

   改成只動「可以填的地方」：輸入框與上傳框轉灰底、游標變 not-allowed，
   文字一律維持原本的對比。
*/
.upload-fields:disabled .form-control[b-f2eoyftp1z] {
    background: #f1f3f2;
    border-color: #dde3df;
    color: #4a5568;
}
.upload-fields:disabled .form-control[b-f2eoyftp1z]::placeholder { color: #98a2a0; }
.upload-fields:disabled .drop-zone[b-f2eoyftp1z] {
    background: #f4f6f5;
    border-color: #d5dcd7;
}

/*
   【唯讀時整片都要顯示禁止游標】2026-09-24

   這裡**只改游標外觀，不影響功能** —— 欄位本來就已經被 fieldset disabled
   真正鎖住了。純粹是讓滑鼠在點下去之前就先告訴使用者「這裡不能動」。

   ⚠️ 為什麼需要 !important，而不是去改那兩行原本的樣式：

     ① 檔案選擇框：`.drop-zone-input` 是一個 opacity:0、z-index:10 的
        <input type="file">，**整片蓋在上傳框上面**。滑鼠碰到的是它，不是
        `.drop-zone`，所以它自己的 `cursor: pointer` 會贏。
        而那個 pointer 在**正常狀態下是對的**，不能拿掉，只能在唯讀時覆蓋。

     ② 「＋ 新增組員」：`cursor: pointer` 寫在 **inline style** 上，
        一般 CSS 規則的優先權蓋不過它，只有 !important 蓋得過。

     ③ 指導老師的「有／無」單選（2026-10-05 補）：radio 與包住它的 <label>
        都有自己的 `cursor: pointer`（見本檔的 .advisor-choice 區塊）。
        ⚠️ **radio 不是 .form-control**，所以不會被上面第一條選擇器涵蓋 ——
           2026-10-05 實測回報：非投稿時段滑過去還是手指游標，看起來像可以點。
           日後再加任何**不是 .form-control 的可點元素**，都要記得回來補一行。

   ⚠️ 作用範圍刻意很窄（限定在 :disabled 的 fieldset 內），不會外溢到正常狀態。

   📌 用的是與 .form-control 同一個 `not-allowed`，所以整片的游標外觀一致 ——
      這是刻意的，不要為了「更明顯」而在某幾個元素上換成別的游標。
*/
.upload-fields:disabled .form-control[b-f2eoyftp1z],
.upload-fields:disabled .drop-zone[b-f2eoyftp1z],
.upload-fields:disabled .drop-zone-content[b-f2eoyftp1z],
.upload-fields:disabled button[b-f2eoyftp1z],
.upload-fields:disabled select[b-f2eoyftp1z],
.upload-fields:disabled textarea[b-f2eoyftp1z],
/* 指導老師的「有／無」單選：圓點與旁邊的文字都要 —— 整個 <label> 都可以點，
   只蓋圓點的話，滑過文字時游標還是手指。 */
.upload-fields:disabled .advisor-choice-option[b-f2eoyftp1z],
.upload-fields:disabled .advisor-choice-option input[type="radio"][b-f2eoyftp1z] {
    cursor: not-allowed !important;
}

/*
   ⚠️ `.drop-zone-input` **不能寫在這個檔案裡**，規則放在 Upload.razor 的
      <style> 區塊。原因見那裡的註解 —— 一句話：它是 <InputFile> 元件渲染出來的，
      拿不到本檔 scoped CSS 的 [b-xxxxx] 屬性，寫在這裡永遠比對不到。
*/

@media (max-width: 1000px) {
    .upload-window-bar[b-f2eoyftp1z], .upload-guest-bar[b-f2eoyftp1z] { margin-left: 0; margin-right: 0; }
}

/* ============================================================= */
/* === 暗色模式覆寫：僅在 html[data-theme="dark"] 下生效 === */
/* ============================================================= */
html[data-theme="dark"] .upload-card[b-f2eoyftp1z] {
    background: #1e2521;
    border-color: #3a443d;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

html[data-theme="dark"] .preview-card[b-f2eoyftp1z] {
    background: #1e2521;
    border-color: #3a443d;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
}

/* 表單輸入框 */
html[data-theme="dark"] .form-control[b-f2eoyftp1z] {
    background: #1e2521;
    border-color: #3a443d;
    color: #f3e9dc;
}
html[data-theme="dark"] .form-control:focus[b-f2eoyftp1z] {
    border-color: #7fb389;
    background: #242b27;
    box-shadow: 0 0 0 4px rgba(127, 179, 137, 0.15);
}
html[data-theme="dark"] .form-control[b-f2eoyftp1z]::placeholder {
    color: #6b7670;
}

/* 標籤文字 */
html[data-theme="dark"] .form-group label[b-f2eoyftp1z] {
    color: #f3e9dc;
}

/* 上傳拖放區 */
html[data-theme="dark"] .drop-zone[b-f2eoyftp1z] {
    background: #1e2521;
    border-color: #3a443d;
}
html[data-theme="dark"] .drop-zone:hover[b-f2eoyftp1z] {
    border-color: #7fb389;
    background: #2e3631;
}
html[data-theme="dark"] .drop-zone.has-file[b-f2eoyftp1z] {
    border-color: #7fb389;
    background: #242b27;
}
html[data-theme="dark"] .drop-zone .file-info[b-f2eoyftp1z] {
    color: #9aa89c;
}

/* 「作品預計編號」米色高亮框 → 米黃/奶油底轉暗 */
html[data-theme="dark"] .expected-code-box[b-f2eoyftp1z] {
    background: #2b2a1e;
    border-color: #3a443d;
}

/* 集數卡片 */
html[data-theme="dark"] .episode-card[b-f2eoyftp1z] {
    background: #242b27;
    border-color: #3a443d;
}

/* 成員名冊：卡片本身沿用 .episode-card 的暗色（上一條），只補標籤的底色。
   亮色的 #eef2e0 在暗底上會是一塊刺眼的淺色方塊。 */
html[data-theme="dark"] .member-badge[b-f2eoyftp1z] {
    background: #33402f;
    color: #a8c8a0;
}
html[data-theme="dark"] .member-badge.is-leader[b-f2eoyftp1z] {
    background: #537D5D;
    color: #fff;
}
/* 琥珀色在暗底上要提亮，#b26a00 在深色卡片上幾乎看不見 */
html[data-theme="dark"] .member-incomplete[b-f2eoyftp1z] {
    color: #f5b942;
}

/* 「必填」標記：與 .member-badge 同一組配色，理由相同（亮色底在暗底上是淺色方塊）。 */
html[data-theme="dark"] .required-mark[b-f2eoyftp1z] {
    background: #33402f;
    color: #a8c8a0;
}

/* 錯誤欄位：亮色的 #fff8f8 底在暗色模式下是一塊白斑，紅字也不夠亮。 */
html[data-theme="dark"] .form-control.is-invalid[b-f2eoyftp1z] {
    border-color: #e06c65;
    background: #2e2422;
}
html[data-theme="dark"] .field-error[b-f2eoyftp1z] {
    color: #ff8a80;
}

/* 欄位說明：亮色的 #718096 在暗底上偏藍且不夠亮，改用全站暗色的灰綠。
   ⚠️ .label-example 用的是同一個亮色值，所以要一起覆寫 —— 漏掉的話
      暗色下那個範例會是偏藍的灰，與旁邊的標籤看起來像兩套配色。 */
html[data-theme="dark"] .form-hint-text[b-f2eoyftp1z],
html[data-theme="dark"] .label-example[b-f2eoyftp1z] {
    color: #9aa89c;
}

/* ════════════════════════════════════════════════════════════
   區塊分隔線（.episode-divider）
   2026-10-02：這裡原本還有一條 .tab-bar 的覆寫，投稿頁改成一頁到底、
   移除「影片資料 / 必要文件」分頁之後那個元素就不存在了，一併刪除。

   ⚠️⚠️ 【border 一定要定義在這裡，不可以寫回 inline style】
      Upload.razor 原本兩處都寫成 `style="border-top: 1px solid #eee"`，
      而 **inline style 的優先序高於任何 CSS 選擇器**（除非加 !important）——
      所以底下那條暗色覆寫**從來沒有生效過**：深色模式下那條線一直是
      接近白色的 #eee，在深底上變成一條亮線，比不畫還顯眼。
      2026-10-02 實測回報才發現。

   ⚠️ 亮色也從 #eee 改成 #c8d2cb 並加粗到 2px。#eee 在白底上幾乎看不見，
      而這條線的工作是「告訴使用者文件區不屬於上面那部影片」——
      看不見就等於沒做到。

   ⚠️ 這個 class 同時用在**影片卡片之間**與**文件區上方**，改它兩邊一起動。
   ════════════════════════════════════════════════════════════ */
.episode-divider[b-f2eoyftp1z] {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #c8d2cb;
}

/* 暗色只換顏色，粗細與樣式沿用上面那條 —— 兩邊都寫一次的話，
   日後調粗細會改了一邊忘了另一邊。 */
html[data-theme="dark"] .episode-divider[b-f2eoyftp1z] {
    border-top-color: #3a443d;
}

/* 右側「檔案即時預覽」空白區 */
html[data-theme="dark"] .preview-empty-box[b-f2eoyftp1z] {
    background: #1e2521;
    border-color: #3a443d;
}

/* 格式提示小標籤 (原本淺灰底) */
html[data-theme="dark"] .format-hint[b-f2eoyftp1z] {
    background: #242b27;
    color: #9aa89c;
}

/* 處理中彈窗 / 成功彈窗 */
html[data-theme="dark"] .processing-modal[b-f2eoyftp1z] {
    background: #1e2521;
    box-shadow: 0 30px 70px rgba(0,0,0,0.6);
}
html[data-theme="dark"] .processing-modal p[b-f2eoyftp1z] {
    color: #9aa89c;
}
html[data-theme="dark"] .loading-ring[b-f2eoyftp1z] {
    border-color: #3a443d;
    border-top-color: #7fb389;
}

/* 時段狀態列與訪客預覽提示（2026-09-23）*/
html[data-theme="dark"] .upload-window-bar.is-open[b-f2eoyftp1z] {
    background: #1f2b23;
    border-color: #3a5543;
    color: #9fd0ab;
}
html[data-theme="dark"] .upload-window-bar.is-blocked[b-f2eoyftp1z] {
    background: #242b27;
    border-color: #3a443d;
    color: #9aa89c;
}
html[data-theme="dark"] .upload-guest-bar[b-f2eoyftp1z] {
    background: #2a271e;
    border-color: #4a422c;
    color: #d8c99a;
}

/* 唯讀欄位的暗色版：同樣只動輸入框與上傳框，文字不降對比 */
html[data-theme="dark"] .upload-fields:disabled .form-control[b-f2eoyftp1z] {
    background: #202622;
    border-color: #39423b;
    color: #b9c4bb;
}
html[data-theme="dark"] .upload-fields:disabled .form-control[b-f2eoyftp1z]::placeholder { color: #6d7873; }
html[data-theme="dark"] .upload-fields:disabled .drop-zone[b-f2eoyftp1z] {
    background: #202622;
    border-color: #39423b;
}

/* 通用資訊 Modal */
html[data-theme="dark"] .modal-card[b-f2eoyftp1z] {
    background: #1e2521;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .modal-title[b-f2eoyftp1z] {
    color: #f3e9dc;
}
html[data-theme="dark"] .modal-body[b-f2eoyftp1z] {
    color: #9aa89c;
}
