/* ============================================================
   chatToolIdCardDoc.css
   身分證掃描 + 文件產製 Modal 樣式
   依賴：Avatar.cshtml 已有的 .modal-overlay / .step-panel 等基礎樣式
   ============================================================ */

/* ── 共用 overlay（與原 scanModal 同層） ── */
/* 若頁面已有 .modal-overlay 定義（如 Avatar.cshtml），此處的定義不衝突 */
#scanModal2,
#reviewModal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 55; /* 比 scanModal(z-index:50) 高一層，避免堆疊問題 */
}

/* ── Modal 外框 ── */
#scan-modal2-box,
#review-modal-box {
    width: 100%;
    max-width: 560px;
    max-height: 92vh;         /* 最多佔 92% 視窗高，避免超出螢幕 */
    margin: 1rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
    overflow: hidden;
    display: flex;
    flex-direction: column;   /* header / body / footer 垂直排列 */
    animation: idcModalIn .3s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes idcModalIn {
    from { transform: scale(.95); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ── Header ── */
#scanModal2 .idc-modal-header,
#reviewModal .idc-modal-header {
    background: linear-gradient(to right, #0d9488, #14b8a6);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    text-align: center;
}

#scanModal2 .idc-modal-header h2,
#reviewModal .idc-modal-header h2 {
    color: #fff;
    font-weight: 700;
    margin: 0;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
}

/* 動態副標題（「第 1 位權利人」等） */
.idc-subtitle {
    color: #ccfbf1;
    font-size: clamp(.85rem, 2.5vw, 1rem);
    font-weight: 600;
    margin: .2rem 0 0;
}

/* ── Body ── */
.idc-modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;          /* 撐滿 modal 剩餘空間 */
    min-height: 0;    /* 讓 flex child 可以正確 overflow */
    overflow-y: auto; /* body 整體可捲動，不靠 wrap 自己捲 */
}

/* ── Step panels（複用 Avatar.cshtml 的 .step-panel 動畫） ── */
.idc-step {
    display: none;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: idcStepIn .3s ease both;
}

.idc-step.active { display: flex; }

@keyframes idcStepIn {
    from { transform: translateX(30px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ── Footer ── */
.idc-modal-footer {
    padding: .75rem 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 進度點 */
.idc-dots { display: flex; gap: 8px; }
.idc-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: background .3s;
}
.idc-dot.done   { background: #5eead4; }
.idc-dot.active { background: #14b8a6; }

/* 取消按鈕 */
.idc-cancel-btn {
    display: flex; align-items: center; gap: .4rem;
    background: transparent; border: none;
    color: #9ca3af; font-size: .9rem; font-weight: 500;
    cursor: pointer; padding: .5rem .75rem;
    border-radius: .75rem; transition: all .15s;
}
.idc-cancel-btn:hover { background: #f3f4f6; color: #374151; }

/* ── 掃描 Modal 繼續/完成按鈕列 ── */
.idc-continue-row {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── OCR 進度條（reviewModal step-1） ── */
.idc-ocr-progress-wrap {
    width: 100%;
    max-width: 360px;
    margin: 1.25rem auto 0;
}

.idc-ocr-bar-bg {
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    height: 12px;
    overflow: hidden;
    border: 1px solid rgba(20, 184, 166, .3);
}

.idc-ocr-bar {
    height: 100%;
    background: linear-gradient(to right, #0d9488, #14b8a6);
    border-radius: 9999px;
    width: 0%;
    transition: width .4s ease;
}

.idc-ocr-label {
    font-size: 1rem;
    font-weight: 600;
    color: #0d9488;
    margin-top: .6rem;
    text-align: center;
}

/* 即時顯示已完成的人 */
.idc-ocr-partial {
    width: 100%;
    margin-top: 1rem;
}

.idc-partial-person {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .75rem;
    border-radius: .5rem;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    margin-bottom: .4rem;
    font-size: .9rem;
    color: #134e4a;
}

.idc-partial-person i { color: #14b8a6; }

/* ── OCR 結果卡片（reviewModal step-2） ── */
.idc-result-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    /* 移除固定 max-height，由外層 modal body 捲動 */
    padding-right: 4px;
}

.idc-result-card {
    border: 1.5px solid #99f6e4;
    border-radius: 12px;
    margin-bottom: .6rem;
    overflow: hidden;
}

.idc-result-card-title {
    font-size: 1rem;
    padding: .5rem .75rem;
    font-weight: 700;
    color: #0d9488;
    background: #f0fdfa;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.idc-result-card-title .idc-agent-badge {
    font-size: .85rem;
    padding: .15rem .5rem;
    background: #f97316;
    color: #fff;
    border-radius: 9999px;
    font-weight: 700;
}

.idc-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1rem;
}

.idc-result-table td {
    padding: .4rem .6rem;
    vertical-align: top;
}

.idc-result-table td:first-child {
    color: #6b7280;
    white-space: nowrap;
    width: 4em;
}

.idc-result-table td:last-child {
    color: #134e4a;
    font-weight: 600;
    word-break: break-all;
}

/* ── inline 編輯欄位 ── */

.idc-field-value:hover .idc-edit-icon,
.idc-field-value.editing .idc-edit-icon { opacity: 1; }

.idc-edit-icon {
    font-size: 1rem;
    color: #0d9488;
    opacity: 0.5;           /* 永遠顯示，不再靠 hover */
    transition: opacity .15s;
    flex-shrink: 0;
    padding: .25rem;
}

/* hover / 觸控時加亮 */
.idc-field-value:hover .idc-edit-icon,
.idc-field-value:active .idc-edit-icon {
    opacity: 1;
}

/* 欄位底部加一條虛線，提示可點擊編輯 */
.idc-field-value {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: .4rem;
    border-bottom: 1.5px dashed #99f6e4;
    padding-bottom: .15rem;
    transition: background .15s;
}

.idc-field-value:hover,
.idc-field-value:active {
    background: #f0fdfa;
    border-radius: 4px;
}

.idc-field-input {
    flex: 1;
    border: 1.5px solid #14b8a6;
    border-radius: 6px;
    padding: .4rem .65rem;
    font-size: 1.05rem;
    color: #134e4a;
    outline: none;
    min-width: 0;
}

.idc-field-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13,148,136,.2);
}

.idc-field-save {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: #0d9488;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    padding: 0;
}

.idc-field-save:hover { background: #0f766e; }

/* ── 文件預覽（reviewModal step-4） ── */
.idc-preview-wrap {
    width: 100%;
    /* 移除固定 max-height，讓圖片自然展開，由外層 modal body 控制捲動 */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 4px;
}

.idc-preview-wrap img {
    width: 100%;
    max-width: 480px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

/* 身分證 / 文件 分區塊 */
.idc-preview-section {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.idc-preview-section-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 700;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .2rem .1rem;
    border-bottom: 1.5px solid #99f6e4;
}

.idc-preview-section-title i {
    font-size: .9rem;
}

/* 兩者都無時的提示文字 */
.idc-preview-empty {
    text-align: center;
    color: #9ca3af;
    font-size: .9rem;
    padding: 1rem 0;
    margin: 0;
}

/* ── 共用 loading spinner ── */
.idc-spinner {
    width: 48px; height: 48px;
    border: 4px solid #ccfbf1;
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: idcSpin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes idcSpin { to { transform: rotate(360deg); } }

/* ── 成功圓圈（review step-5） ── */
.idc-success-circle {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 24px rgba(20, 184, 166, .35);
    animation: idcPopIn .5s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes idcPopIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.idc-success-circle i { font-size: 2.2rem; color: #fff; }

/* ── 文字 ── */
.idc-step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #134e4a;
    margin-bottom: .6rem;
}

.idc-step-desc {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.idc-step-desc .hl {
    background: #fef08a;
    color: #78350f;
    font-weight: 800;
    padding: 0 5px 1px;
    border-radius: 5px;
}

/* ── 錯誤訊息 ── */
.idc-error-msg {
    color: #dc2626;
    font-size: .9rem;
    margin-top: .5rem;
    display: none;
}

/* ============================================================
   以下為 Index.cshtml 環境補丁
   Avatar.cshtml 已內建這些樣式，Index.cshtml 沒有，所以在這裡補上
   class 名稱與 Avatar.cshtml 一致，不影響 Avatar 頁面
   ============================================================ */

/* 確認按鈕 */
.btn-scan-confirm {
    padding: .875rem 1.75rem;
    background: linear-gradient(to right, #f97316, #fb923c);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 10px !important;
    box-shadow: 5px 8px 20px rgba(0,0,0,.2);
    transition: all .2s;
    cursor: pointer;
    font-size: 1rem;
}
.btn-scan-confirm:hover {
    background: linear-gradient(to right, #ea6c0a, #f97316);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    transform: scale(1.03);
}
.btn-scan-confirm:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Outline teal 按鈕 */
.btn-outline-teal {
    padding: .875rem 1rem;
    background: #fff;
    color: #0d9488;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid #14b8a6;
    border-radius: 10px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: background .15s;
}
.btn-outline-teal:hover { background: #f0fdfa; }

/* ID card box */
.id-box {
    width: 180px; height: 120px;
    background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
    border-radius: 1rem;
    margin-bottom: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 2px 8px rgba(0,0,0,.08);
    border: 2px dashed #5eead4;
    position: relative;
}
.id-box i { font-size: 3.2rem; color: #5eead4; }
.bounce-bar {
    position: absolute; bottom: 8px; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 4px;
    background: #fb923c; border-radius: 9999px;
    animation: idcBounce 1.5s ease-in-out infinite;
}
@keyframes idcBounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-6px); }
}

/* Scan box */
.scan-box {
    width: 210px; height: 136px;
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    border-radius: 1rem; margin-bottom: 1.25rem;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.scan-box .inner-blur { position: absolute; inset: 14px; background: linear-gradient(135deg, #f0fdfa, #ccfbf1); border-radius: 8px; filter: blur(2px); }
.scan-box .photo-block { position: absolute; top: 18px; left: 18px; width: 40px; height: 40px; background: rgba(94,234,212,.5); border-radius: 6px; filter: blur(2px); }
.scan-box .line1 { position: absolute; bottom: 18px; right: 18px; width: 68px; height: 7px; background: rgba(94,234,212,.5); border-radius: 4px; filter: blur(2px); }
.scan-box .line2 { position: absolute; bottom: 32px; right: 18px; width: 52px; height: 7px; background: rgba(94,234,212,.5); border-radius: 4px; filter: blur(2px); }
.scan-box .stripe { position: absolute; top: 18px; left: 14px; right: 14px; height: 26px; background: rgba(94,234,212,.3); border-radius: 4px; filter: blur(2px); }
.scan-box .bline1,
.scan-box .bline2 { position: absolute; left: 14px; right: 14px; height: 6px; background: rgba(94,234,212,.3); border-radius: 4px; filter: blur(2px); }
.scan-box .bline1 { bottom: 18px; }
.scan-box .bline2 { bottom: 30px; width: 70%; }
.laser {
    position: absolute; left: 0; right: 0; height: 3px;
    background: linear-gradient(to right, transparent, #f97316, transparent);
    box-shadow: 0 0 10px rgba(249,115,22,.8);
    animation: idcLaser 2s ease-in-out infinite;
}
@keyframes idcLaser {
    0%   { top: 0; }
    50%  { top: calc(100% - 3px); }
    100% { top: 0; }
}

/* Spin ring */
.spin-ring {
    width: 32px; height: 32px;
    border: 3px solid #ccfbf1; border-top-color: #14b8a6;
    border-radius: 50%;
    animation: idcSpinRing 1s linear infinite;
    margin-top: 1rem;
}
@keyframes idcSpinRing { to { transform: rotate(360deg); } }

/* Flip card */
.flip-wrap { width: 180px; height: 120px; position: relative; margin-bottom: 1.25rem; }
.flip-card {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    display: flex; align-items: center; justify-content: center;
    animation: idcFlipCard 1s ease-in-out 1 forwards;
}
.flip-card i { font-size: 2.8rem; color: #0d9488; }
@keyframes idcFlipCard {
    0%,100% { transform: perspective(400px) rotateY(0deg); }
    50%      { transform: perspective(400px) rotateY(180deg); opacity: .4; }
}
.flip-badge {
    position: absolute; top: -8px; right: -8px;
    width: 34px; height: 34px; background: #f97316;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
    animation: idcBadgePulse 1s ease-in-out infinite;
}
.flip-badge i { color: #fff; font-size: .85rem; }
@keyframes idcBadgePulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}

/* Flash alert */
.flash-alert {
    display: flex; align-items: center; gap: .75rem;
    padding: .875rem 1.25rem; border-radius: 1rem;
    animation: idcFlashBg 1s ease-in-out infinite;
}
@keyframes idcFlashBg {
    0%,100% { background: #d1fae5; }
    50%      { background: #fed7aa; }
}
.flash-alert i { font-size: 1.3rem; color: #ea580c; }
.flash-alert span { font-size: 1.1rem; font-weight: 700; color: #134e4a; }

/* ============================================================
   GuiShan 確認資訊卡片樣式
   Index 和 Avatar 頁面共用
   ============================================================ */

.message-bubble.ai:has(.guishan-confirm-card) {
    width: 70%;
}

.guishan-confirm-card {
    background: #f0fdfa;
    border: 1.5px solid #99f6e4;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    width: 100%
}

.guishan-title {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: #0d9488;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.guishan-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
}

.guishan-table td {
    padding: 0.25rem 0.4rem;
    vertical-align: top;
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    line-height: 1.5;
}

.guishan-label {
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
    width: 110px;
}

.guishan-value {
    color: #134e4a;
    font-weight: 500;
    word-break: break-all;
}

.guishan-note {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: #374151;
    border-top: 1px solid #d1fae5;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    line-height: 1.6;
}

/* 分組標題行（【地號】共 X 筆、第1筆 等） */
.guishan-section-heading td {
    padding: 0.4rem 0.35rem 0.15rem !important;
    font-size: clamp(0.88rem, 2.2vw, 1.05rem) !important;
    font-weight: 700 !important;
    color: #0d9488 !important;
    border-top: 1px solid #d1fae5;
}
.guishan-table tr:first-child.guishan-section-heading td {
    border-top: none;
}

/* Avatar 頁面：GuiShan 卡片直接顯示在 chat-container 裡 */
.chat-container .msg-outside {
    display: flex;
    margin-bottom: 0.75rem;
}

.chat-container .msg-outside .msg {
    background: #fff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    max-width: 90%;
}

/* ── 分組 checkbox 標籤 ── */
.idc-check-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    color: #0d9488;
    user-select: none;
}

.idc-group-check {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #0d9488;
    cursor: pointer;
    flex-shrink: 0;
}

/* 取消勾選時卡片變灰 */
.idc-result-card:has(.idc-group-check:not(:checked)) {
    opacity: 0.45;
}

/* ── step-0 身分選擇按鈕 ── */
.idc-role-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
    width: 100%;
}

.idc-role-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.75rem;
    background: #fff;
    border: 2px solid #99f6e4;
    border-radius: 14px !important;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: #0d9488;
    transition: all 0.15s;
    min-width: 100px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.idc-role-btn i {
    font-size: 1.75rem;
    color: #14b8a6;
}

.idc-role-btn:hover {
    background: #f0fdfa;
    border-color: #14b8a6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20,184,166,0.2);
}

.idc-role-btn.selected {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    border-color: #0d9488;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20,184,166,0.35);
}

.idc-role-btn.selected i {
    color: #fff;
}

/* ── Lightbox（文件預覽點擊放大） ── */
#idc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: idcLbFadeIn 0.2s ease both;
}

@keyframes idcLbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.idc-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.idc-lb-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
    max-height: 92vh;
    animation: idcLbScaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes idcLbScaleIn {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.idc-lb-content img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.idc-lb-page {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    letter-spacing: 0.04em;
}

.idc-lb-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50% !important;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.idc-lb-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* 預覽圖 touch/hover 提示可點擊 */
#idc-preview-wrap img:hover,
#idc-preview-wrap img:active {
    opacity: 0.88;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 預覽圖 wrapper（觸控點擊放大） */
.idc-preview-img-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent; /* 移除 iOS 觸控藍框 */
}

.idc-preview-img-wrap img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    display: block;
    transition: opacity 0.15s;
}

.idc-preview-img-wrap:active img {
    opacity: 0.82;
}

/* 右下角放大圖示提示 */
.idc-preview-zoom-hint {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    pointer-events: none; /* 不攔截點擊 */
    opacity: 0.85;
}

/* Lightbox 關閉按鈕在觸控時加大點擊區域 */
.idc-lb-close {
    min-width: 2.75rem;
    min-height: 2.75rem;
}
