﻿
/* =========================
   Booking Widget 外觀 & RWD
   ========================= */

/* 外層容器：跟著 tming 走，不畫外框 */
#bookingWidget {
    width: 100%;
}

    /* 內層 .shell 才是那張「卡片」 */
    #bookingWidget .shell {
        width: 100%;
        background: #fff;
        border-radius: 18px;
        padding: 24px 26px 28px;
        box-shadow: 0 18px 40px rgba(0,0,0,0.08);
    }

/* --- Mobile / 小螢幕：卡片佔滿寬度，置中 --- */
@media (max-width: 47.9375rem) {
    #bookingWidget {
        display: flex;
        justify-content: center;
        padding-inline: 1.25rem;
        margin: clamp(1.5rem, 3vw, 2.5rem) auto 0;
    }
}

/* --- Tablet：卡片寬一點但仍置中 --- */
@media (min-width: 48rem) and (max-width: 63.9375rem) {
    #bookingWidget {
        display: flex;
        justify-content: center;
        padding-inline: 2rem;
        margin: clamp(2rem, 3vw, 3rem) auto 0;
    }

        #bookingWidget .shell {
            max-width: 640px;
        }
}

/* --- Desktop：timing 左文右掛號卡 --- */
@media (min-width: 64rem) {
    /* 右邊：掛號卡欄 */
    #bookingWidget {
        flex: 0 0 60%;
        margin: 0;
    }

        #bookingWidget .shell {
            max-width: none; /* 填滿右欄寬度 */
        }
}

/* =========================
   Booking 內部元件
   ========================= */

#bookingWidget h1 {
    margin: 0 0 2px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    #bookingWidget h1 .icon {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #ffe9e1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: var(--primary);
    }

#bookingWidget .subtitle {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

#bookingWidget .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

#bookingWidget .header-query-btn {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px dashed var(--primary);
    background: #fff;
    color: var(--primary);
}

/* Panel 切換 */
#bookingWidget .panel {
    display: none;
    margin-top: 2px;
}

    #bookingWidget .panel.active {
        display: block;
    }

/* --- 表單區塊通用 --- */
.field-group {
    margin-bottom: 1rem;
}

.field-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--medical-text);
    margin-bottom: 0.5rem;
    display: block;
}

/* 輸入框標準化 - 嚴謹風格 */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--medical-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
}

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--medical-primary);
        box-shadow: 0 0 0 1px var(--medical-primary);
    }
/* 必填星號 */
.req {
    color: #d32f2f;
    margin-left: 2px;
}

#bookingWidget .inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Chips (科別) --- */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 14px;
    border: 1px solid var(--medical-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--medical-text-light);
    cursor: pointer;
    background: #fff;
}

    .chip:hover {
        border-color: var(--medical-text-light);
    }

    .chip.selected {
        background: var(--medical-primary-dark);
        color: #fff;
        border-color: var(--medical-primary-dark);
    }

/* --- Step 1: 初/複診選擇 (Tab 風格) --- */
.visit-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.visit-card {
    border: 1px solid var(--medical-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
}
    .visit-card.is-disabled {
        /* 淺灰底 */
        background-color: #f9f9f9;
        /* 斜線紋路 (Stripes) */
        background-image: repeating-linear-gradient( 45deg, #f9f9f9, #f9f9f9 10px, #f1f1f1 10px, #f1f1f1 20px );
        color: #a3a3a3;
        border-color: #eeeeee;
        cursor: not-allowed;
        pointer-events: none;
        box-shadow: none;
    }

.visit-card:focus {
    outline: none;
    border-color: var(--medical-primary);
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
}

    .visit-card h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
    }

    .visit-card .subtitle {
        display: block;
        font-size: 0.8rem;
        color: #78909c;
        margin-top: 2px;
    }

    .visit-card:hover {
        border-color: var(--medical-primary);
        background: #fafafa;
    }
    /* Selected State */
    .visit-card.selected {
        background-color: var(--medical-accent);
        border-color: var(--medical-primary);
        color: var(--medical-primary-dark);
    }

        .visit-card.selected .subtitle {
            color: var(--medical-primary);
            opacity: 0.8;
        }
/* 隱藏裝飾 Icon，只留文字排版 */
.card-icon, .check-icon {
    display: none;
}

/* --- 時段按鈕 --- */
.time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.slot-btn {
    background: #fff;
    border: 1px solid var(--medical-border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
}

    /* 按鈕被 Tab 選中或是點擊後的狀態 */
    .slot-btn:focus {
        outline: none;
        border-color: var(--medical-primary);
        box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
    }

    /* 如果按鈕已經被選中 (Active) 且又獲得焦點 */
    .slot-btn.selected:focus {
        /* 讓光暈更明顯一點，因為背景已經是深色 */
        box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.4);
        border-color: var(--medical-primary-dark);
    }

    .slot-btn span {
        display: block;
        font-weight: 600;
        font-size: 0.95rem;
    }

    .slot-btn .sub {
        font-size: 0.75rem;
        color: #90a4ae;
        font-weight: 400;
        margin-top: 4px;
    }

    .slot-btn.selected {
        background: var(--medical-primary);
        color: #fff;
        border-color: var(--medical-primary);
    }

        .slot-btn.selected .sub {
            color: rgba(255,255,255,0.8);
        }

/* Summary */
#bookingWidget .summary-box {
    border-radius: 12px;
    border: 1px dashed #ddd;
    padding: 10px;
    font-size: 13px;
    background: #fafafa;
    line-height: 1.5;
}

    #bookingWidget .summary-box strong {
        color: #333;
    }

#bookingWidget .small-hint {
    font-size: 11px;
    color: #777;
}

/* Collapse 主要不適 */
#bookingWidget .simple-collapse {
    border: 1px solid #ffe1cc;
    border-left-width: 4px;
    border-radius: 10px;
    padding: 6px 10px 8px;
    font-size: 13px;
    background: #fff8f3;
}

    #bookingWidget .simple-collapse summary {
        cursor: pointer;
        list-style: none;
        font-weight: 500;
        color: #234;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        #bookingWidget .simple-collapse summary::-webkit-details-marker {
            display: none;
        }

    #bookingWidget .simple-collapse .collapse-body {
        margin-top: 8px;
    }

#bookingWidget .optional-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #ffc49c;
    color: #ff6a3e;
}

#bookingWidget .divider {
    margin: 16px 0;
    border: none;
    border-top: 1px solid #eee;
}

#bookingWidget .checkbox-line {
    font-size: 12px;
}

    #bookingWidget .checkbox-line input[type="checkbox"] {
        margin-right: 4px;
    }

/* Footer buttons */
#bookingWidget .footer {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

#bookingWidget .btn {
    border: none;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#bookingWidget .btn-primary {
    background: var(--primary);
    color: #fff;
}

#bookingWidget .btn-secondary {
    background: #eee;
    color: #444;
}

#bookingWidget .btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* 小螢幕 Modal 對話框距離（保留原本設定）*/
@media (max-width: 640px) {
    .cs-modal-dialog {
        margin: 3.5rem 0.75rem;
    }
}

/* 醫師建議小徽章 */
#bookingWidget .badge-suggest {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 10px;
    border-radius: 999px;
    background: #fff3cd;
    color: #8a6d1c;
    border: 1px solid #ffe8a1;
}

/* 驗證區塊 */
#bookingWidget .verify-box {
    border-radius: 12px;
    border: 1px solid #e2e2e2;
    padding: 10px;
    background: #fdfdfd;
    font-size: 12px;
}

#bookingWidget .verify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

#bookingWidget .verify-channel-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: #fff3ec;
    white-space: nowrap;
}

#bookingWidget .verify-timer {
    font-size: 12px;
    color: #b35b00;
    margin: 4px 0;
}

#bookingWidget .verify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

/* 日期快速選擇 + 日期盒 */
#bookingWidget .date-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    min-height: 20px;
}

#bookingWidget .date-pill {
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

    #bookingWidget .date-pill.selected {
        background: #fff3ec;
        border-color: var(--primary);
        color: var(--primary);
        font-weight: 500;
    }

#bookingWidget .date-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    border: 1px solid #ddd;
    padding: 6px 10px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    min-height: 38px;
}

#bookingWidget .date-display {
    color: #777;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#bookingWidget .date-box.filled .date-display {
    color: #222;
}

#bookingWidget .date-icon {
    font-size: 14px;
    opacity: 0.7;
    pointer-events: none;
}

/* 月曆 overlay */
#bookingWidget .calendar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.2);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#bookingWidget .calendar-box {
    width: 300px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui;
}

#bookingWidget .cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

#bookingWidget .cal-nav {
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    user-select: none;
}

    #bookingWidget .cal-nav:hover {
        background: #f2f2f2;
    }

#bookingWidget .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 13px;
}

#bookingWidget .cal-weekday {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 4px;
}

#bookingWidget .cal-day {
    text-align: center;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

    #bookingWidget .cal-day:hover:not(.disabled) {
        background: #fff3ec;
    }

    #bookingWidget .cal-day.disabled {
        color: #ccc;
        cursor: not-allowed;
    }

    #bookingWidget .cal-day.available {
        font-weight: 600;
        background: #fff8f3;
        border: 1px solid #ffd4b3;
    }

    #bookingWidget .cal-day.today {
        border: 1px solid var(--primary);
        color: var(--primary);
        font-weight: 700;
    }

    #bookingWidget .cal-day.selected {
        background: var(--primary);
        color: white;
        font-weight: 700;
    }

.slot-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- 3. 下拉選單與輸入框 (Inputs) 優化 --- */
.field-group {
    margin-bottom: 1.5rem;
}

.field-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* 自定義 Select 外觀 */
select, input[type="text"], input[type="tel"], input[type="date"], input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none; /* 移除預設樣式 */
}
/* 下拉選單加箭頭 */
.select-wrapper {
    position: relative;
}

    .select-wrapper::after {
        content: '▼';
        font-size: 0.8rem;
        color: #9ca3af;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 106, 62, 0.1);
}

/* --- 4. 日期選擇 (Date Box) --- */
.date-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 2px dashed #d1d5db; /* 虛線邊框增加層次 */
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

    .date-box:hover {
        border-color: var(--primary);
        background: #fff;
    }

    .date-box:focus {
        outline: none;
        border-color: var(--medical-primary);
        box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
    }

.date-display {
    font-size: 1.05rem;
    font-weight: 500;
    color: #111827;
}

.date-icon {
    font-size: 1.2rem;
    filter: grayscale(1);
    opacity: 0.6;
}

/* --- 6. Step 3 確認卡片 (Summary Box) --- */
.summary-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
}
/* 這裡需要您在 JS 生成 HTML 時配合這些 class */
.summary-row {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
}

    .summary-row:last-child {
        border-bottom: none;
    }

.summary-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.summary-val {
    font-weight: 600;
    color: #1f2937;
}

/* --- Step 3: 確認單 (簡約收據風) --- */
.ticket-card {
    border: 1px solid var(--medical-border);
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

.ticket-header {
    background: #f4f6f8; /* 極淺灰 */
    padding: 16px 20px;
    border-bottom: 1px solid #eceff1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-doctor {
    font-size: 1.1rem;
    font-weight: 700;
    color: #263238;
}

.ticket-dept {
    font-size: 0.85rem;
    color: #546e7a;
    background: #fff;
    padding: 2px 8px;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
}

.ticket-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-label {
    font-size: 0.8rem;
    color: #78909c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.info-value {
    font-size: 1rem;
    color: #263238;
    font-weight: 500;
    display: block;
}

    .info-value.highlight {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--medical-primary-dark);
        font-family: monospace;
    }

.ticket-footer {
    padding: 12px 20px;
    border-top: 1px dashed #cfd8dc;
    font-size: 0.85rem;
    color: #546e7a;
    display: flex;
    justify-content: space-between;
}

/* --- 底部按鈕 --- */
.footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eceff1;
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--medical-primary);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--medical-primary-dark);
    }

.btn-secondary {
    background: #eceff1;
    color: #455a64;
}

    .btn-secondary:hover:not(:disabled) {
        background: #cfd8dc;
    }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: var(--medical-primary);
    border: 1px solid transparent;
}

    .btn-ghost:hover {
        text-decoration: underline;
    }

/* RWD */
@media (max-width: 600px) {
    .visit-cards {
        grid-template-columns: 1fr;
    }

    .ticket-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* --- 驗證區塊 (Action Zone) --- */
.verify-zone {
    border: 1px solid var(--primary);
    background-color: #fffbf8; /* 極淡的品牌色背景 */
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.verify-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.verify-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.verify-timer-badge {
    display: inline-block;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: #d32f2f; /* 紅色倒數 */
    margin-bottom: 16px;
    font-feature-settings: "tnum"; /* 等寬數字，避免倒數時跳動 */
}

/* 按鈕群組微調 */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.link-muted {
    font-size: 0.85rem;
    color: #999;
    text-decoration: underline;
    cursor: pointer;
    margin: 0 8px;
}

    .link-muted:hover {
        color: #666;
    }

/* RWD: 手機版調整 */
@media (max-width: 576px) {
    .ticket-body {
        grid-template-columns: 1fr; /* 改為單欄 */
        gap: 16px;
    }

    .action-grid {
        grid-template-columns: 1fr; /* 按鈕垂直排列 */
    }
}


/* ===== Slot Panel (Step2) ===== */
.slot-panel {
    margin-top: 8px;
    display: grid;
    gap: 12px;
}

.slot-summary {
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    line-height: 1.5;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

    .slot-summary .meta {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .slot-summary .date {
        font-weight: 700;
        font-size: 16px;
        white-space: nowrap;
    }

    .slot-summary .badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 999px;
        background: #616060;
        white-space: nowrap;
    }

    .slot-summary .hint {
        flex-basis: 100%; /* 直接換行 */
        margin-top: 6px;
        font-size: 13px;
        color: rgba(0,0,0,.65);
    }

.slot-list-wrap {
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.slot-list-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .slot-list-title::before {
        content: "🧾";
    }

/* Grid layout for number chips */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}

/* Chip button base */
.slot-chip {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

    .slot-chip:hover {
        box-shadow: 0 10px 22px rgba(0,0,0,.08);
        transform: translateY(-1px);
        border-color: rgba(0,0,0,.18);
    }

    .slot-chip:active {
        transform: translateY(0);
    }

    .slot-chip .no {
        text-align: center;
        font-weight: 800;
        font-size: 14px;
        letter-spacing: .2px;
    }

    .slot-chip .time {
        text-align: center;
        margin-top: 4px;
        font-size: 16px;
        color: rgba(0,0,0,.65);
    }

    /* selected state */
    .slot-chip.selected {
        border-color: rgba(0, 128, 96, .55);
        background: rgba(0, 128, 96, .08);
        box-shadow: 0 10px 22px rgba(0, 128, 96, .18);
    }

/* empty hint */
.slot-empty {
    font-size: 13px;
    color: rgba(0,0,0,.65);
    padding: 8px 0;
}

/* loading skeleton (optional) */
.slot-loading {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}

.slot-skeleton {
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.10), rgba(0,0,0,.06));
    background-size: 200% 100%;
    animation: shimmer 1.1s infinite;
}

/* =========================================
   手機版極致緊湊優化 (Mobile Compact View)
   目標：一屏可視，減少捲動
   ========================================= */
@media (max-width: 600px) {

    /* 1. 移除 timing 區塊多餘的上下留白 */
    #bookingWidget {
        margin-top: 0 !important;
        padding-inline: 0 !important;
    }

        /* 2. 卡片本體緊湊化 */
        #bookingWidget .shell {
            padding: 16px 14px !important; /* 縮減內距 */
            border-radius: 12px;
            box-shadow: none; /* 手機版移除陰影增加視覺輕量感 */
            border: 1px solid #eee;
        }

        /* 3. 標題與步驟條壓縮 */
        #bookingWidget .header-row {
            margin-bottom: 8px;
        }

        #bookingWidget h1 {
            font-size: 1.1rem; /* 標題縮小 */
        }

    /* 4. 表單欄位間距縮減 (最關鍵) */
    .field-group {
        margin-bottom: 0.6rem !important; /* 從 1.5rem 縮減到 0.6rem */
    }

    .field-label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem; /* 標題貼近輸入框 */
    }

    /* 5. 輸入框與按鈕高度縮減 */
    select,
    input[type="text"],
    input[type="tel"],
    input[type="date"],
    input[type="email"],
    .date-box {
        padding: 6px 10px !important; /* 減少內距 */
        height: 36px; /* 固定高度防止過高 */
        font-size: 0.9rem;
        border-radius: 8px;
    }

    /* 6. Step 1: 初/複診卡片強制並排 (重要) */
    .visit-cards {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 強制兩欄並排 */
        gap: 8px !important;
    }

    .visit-card {
        padding: 8px 4px !important;
        flex-direction: row !important; /* 修正原本手機版垂直排列 */
        height: 40px; /* 固定高度 */
    }

        .visit-card h3 {
            font-size: 0.9rem !important;
            margin: 0;
            line-height: 1;
        }

        /* 手機版隱藏次要說明文字，節省大量空間 */
        .visit-card .subtitle {
            display: none !important;
        }

    /* 7. 科別 Chips 縮小 */
    .chip {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    /* 8. 時段按鈕緊湊化 */
    .time-slots {
        gap: 6px;
    }

    .slot-btn {
        padding: 6px 4px !important;
    }

        .slot-btn span {
            font-size: 0.85rem;
            display: inline-block; /* 讓文字跟時間盡量靠近或同一行 */
        }

        .slot-btn .sub {
            font-size: 0.7rem;
            margin-top: 0;
            display: block;
        }

    /* 9. 底部按鈕區 */
    .footer {
        margin-top: 12px !important;
        padding-top: 10px !important;
    }

    .btn {
        padding: 8px 20px; /* 按鈕變扁 */
        font-size: 0.9rem;
    }

    /* 10. Step 2 號碼選擇區高度限制 */
    .slot-grid {
        max-height: 180px !important; /* 限制高度讓 Footer 露出來 */
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); /* 格子變小 */
        gap: 6px;
    }

    .slot-chip {
        padding: 6px;
    }

        .slot-chip .no {
            font-size: 1rem;
        }

        .slot-chip .time {
            font-size: 16px;
        }
}

/* =========================================
   平板與電腦版留白優化
   目標：增加呼吸感，視覺聚焦
   ========================================= */

/* --- 1. 平板 (Tablet): 寬度 577px ~ 1023px --- */
@media (min-width: 601px) {
    #bookingWidget {
        /* 平板版卡片不需要滿版，限制最大寬度讓它置中 */
        margin: 0 auto;
        max-width: 600px;
    }

    /* 稍微加大表單間距，手指操作更友善 */
    .field-group {
        margin-bottom: 1.5rem !important;
    }

    /* 恢復原本的按鈕大小 */
    .btn {
        padding: 10px 24px;
        font-size: 1rem;
    }
}

/* --- 2. 電腦 (Desktop): 寬度 1024px 以上 --- */
@media (min-width: 1024px) {
    /* 右側掛號卡區塊 */
    #bookingWidget {
        margin: 0; /* 移除置中，因為已經 flex 排列 */
        max-width: 100%;
    }

        /* 卡片加上陰影，製造懸浮層次感 */
        #bookingWidget .shell {
            box-shadow: 0 20px 40px rgba(0,0,0,0.08);
            border: 1px solid #f0f0f0;
            padding: 2.5rem !important; /* 卡片內部留白加大 */
        }

    /* 修正電腦版 Step 2 號碼區塊高度，讓它顯示更多行 */
    .slot-grid {
        max-height: 360px !important;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* 格子變寬 */
    }
}

.badge-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 0 6px;
    height: 18px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
    background: #ffe5e5;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.date-pill.full,
.cal-day.full,
.slot-btn.full {
    opacity: 0.6;
}

    .cal-day.full .badge-full {
        margin-left: 0;
        margin-top: 4px;
    }

.is-invalid {
    border-color: #d32f2f !important;
}

/* --- 極簡版：資訊條樣式 --- */
.auto-assign-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc; /* 極淺灰藍底，乾淨 */
    border: 1px solid #e2e8f0;
    border-radius: 8px; /* 圓角適中 */
    padding: 12px 16px;
    margin-bottom: 1rem;
    gap: 12px;
}

/* 左側：狀態標籤 (膠囊狀) */
.auto-status-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    flex-shrink: 0; /* 防止被擠壓 */
}

    /* 呼吸燈小圓點 (增加一點點系統活著的感覺) */
    .auto-status-icon .dot {
        width: 6px;
        height: 6px;
        background-color: var(--medical-primary); /* 吃您的主色 */
        border-radius: 50%;
    }

/* 右側：文字區 */
.auto-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 文字靠右，與標籤分開 */
    text-align: right;
}

    .auto-text-content .main-msg {
        font-size: 0.9rem;
        color: #334155;
        font-weight: 500;
    }

    .auto-text-content .sub-msg {
        font-size: 0.75rem;
        color: #94a3b8;
        margin-top: 2px;
    }

/* RWD 手機版微調：讓文字靠左比較好閱讀 */
@media (max-width: 480px) {
    .auto-assign-minimal {
        justify-content: flex-start;
    }

    .auto-text-content {
        align-items: flex-start;
        text-align: left;
    }
}

.slot-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.slot-icon {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
}

/* 早診 */
.slot-morning .slot-icon {
    color: #f59e0b; /* 溫暖晨光 */
}

/* 午診 */
.slot-afternoon .slot-icon {
    color: #facc15; /* 日照感 */
}

/* 夜診 */
.slot-night .slot-icon {
    color: #6366f1; /* 夜藍 */
}

.locked-icon {
    font-size: 2rem;
    background: #fff;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.locked-content {
    flex: 1;
}

.locked-title {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

.locked-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #0f172a;
}

/* =========================================
   新的專業簡約風元件設計
========================================= */

/* --- 1. 重選時段按鈕 (膠囊幽靈按鈕) --- */
.btn-reselect {
    /* 排版與間距 */
    display: inline-flex;
    align-items: center;
    padding: 6px 12px; /* 上下窄，左右寬 */
    margin-left: auto; /* 自動推到最右邊 */
    /* 字體設定 */
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none; /* 移除底線 */
    /* 顏色與邊框 (專業的藍灰色調 Slate) */
    color: #64748b;
    background-color: transparent;
    border: 1px solid #cbd5e1; /* 細緻的邊框 */
    border-radius: 20px; /* 膠囊狀圓角 */
    /* 動畫過渡 */
    transition: all 0.2s ease-in-out;
}

    /* 滑鼠懸停效果 */
    .btn-reselect:hover {
        color: #334155; /* 文字變深 */
        background-color: #f1f5f9; /* 極淺的背景色 */
        border-color: #94a3b8; /* 邊框變深一點 */
        box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* 微微浮起 */
    }

    /* 點擊效果 */
    .btn-reselect:active {
        background-color: #e2e8f0;
        transform: translateY(0); /* 按下去的感覺 */
    }


/* --- 2. 時段標籤 (Info Badge) --- */
.slot-badge {
    /* 排版 */
    display: inline-block;
    margin-left: 10px; /* 與日期的距離 */
    padding: 3px 10px; /* 標籤內距 */
    /* 字體設定 */
    font-size: 0.8rem;
    font-weight: 600; /* 字體加粗一點，增加份量感 */
    letter-spacing: 0.02em; /* 微微增加字距，提升質感 */
    /* 顏色設計 (使用專業的海洋藍/天藍色系) */
    /* 背景：淺藍色，文字：深藍色，形成舒適對比 */
    color: #0369a1; /* Sky 700 */
    background-color: #e0f2fe; /* Sky 100 */
    /* 邊框設計 */
    border-radius: 6px; /* 柔和的方圓角 */
    /* border: 1px solid #bae6fd; 如果想要更強調邊框，可以取消註解這行 */
    /* 垂直對齊調整 */
    vertical-align: middle;
    position: relative;
    top: -1px; /* 微調向上，視覺上更平衡 */
}

/* (選項) 如果您希望這個標籤是暖色系(例如橘紅色)，可以替換上面的顏色設定：
.slot-badge.warm {
    color: #c2410c; 
    background-color: #ffedd5;
}
*/

.locked-info-card {
    /* 原本的背景可能太藍，改用更淡雅的灰藍色，或者純白色加一點邊框 */
    background: #f8fafc; /* 改用極淡的灰藍色背景 */
    border: 1px solid #e2e8f0; /* 邊框也變淡 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); /* 極輕微的陰影增加層次 */
    /* 其他保持不變 */
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* =========================================
   Index2 手機版專屬優化 (Mobile Refine)
   目標：降低資訊密度，增加閱讀舒適度
   ========================================= */

@media (max-width: 600px) {

    /* 1. 全局容器調整：讓左右留白稍微多一點，不要貼邊 */
    #bookingWidget .shell {
        padding: 20px 16px !important;
        border-radius: 0 0 12px 12px; /* 上方貼頂，下方圓角 */
        border: none;
        background: #fff;
    }

    /* 2. 確認資訊卡 (Locked Info) 改為垂直堆疊 */
    .locked-info-card {
        flex-direction: column; /* 垂直排列 */
        align-items: flex-start; /* 靠左對齊 */
        gap: 12px; /* 區塊間距 */
        padding: 16px;
        background: #f8fafc;
        border: 1px solid #eef2f6;
    }

        /* 隱藏原本的中間分隔線 */
        .locked-info-card > div[style*="width:1px"] {
            display: none;
        }

    /* 醫師與時間區塊寬度滿版 */
    .locked-content {
        width: 100%;
        display: flex;
        flex-direction: column; /* 讓標題和內容上下排 */
    }

    /* 調整標題與內容的間距 */
    .locked-title {
        font-size: 0.8rem;
        margin-bottom: 2px;
        color: #64748b;
    }

    .locked-value {
        font-size: 1rem; /* 字體稍微縮小一點點，避免換行 */
        display: flex;
        align-items: center;
        justify-content: space-between; /* 讓 badge 靠右 */
        width: 100%;
    }

    /* Icon 調整 */
    .locked-icon {
        display: none; /* 手機版隱藏大 Icon，節省空間 */
    }

    /* 3. 標題列優化 */
    #bookingWidget .header-row {
        flex-direction: column; /* 標題與重選按鈕換行 */
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    #bookingWidget h1 {
        font-size: 1.2rem;
    }

    /* 重選按鈕：改為寬版按鈕，方便手指點擊 */
    .btn-reselect {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        background-color: #fff;
        padding: 8px;
    }

    /* 4. 表單欄位優化 */
    .field-group {
        margin-bottom: 16px !important; /* 統一間距 */
    }

    .field-label {
        font-size: 0.9rem;
        color: #475569;
        margin-bottom: 6px;
    }

    /* 輸入框加大點擊區域 */
    input[type="text"],
    input[type="tel"],
    input[type="email"] {
        height: 44px; /* 手指友善高度 */
        font-size: 1rem;
        background-color: #fff;
        border: 1px solid #cbd5e1;
    }

    /* 5. 身分選擇卡片 (Visit Cards) */
    .visit-cards {
        gap: 10px !important;
    }

    .visit-card {
        padding: 10px !important;
        height: auto !important; /* 自動高度 */
    }

        .visit-card h3 {
            font-size: 0.95rem !important;
        }

    /* 6. 底部按鈕懸浮 (選用：讓確認按鈕固定在底部) */
    /* .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 12px 16px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
        z-index: 100;
        border-top: 1px solid #eee;
    }
    #bookingWidget { padding-bottom: 60px; } 
    */
}

/* =========================================
   現代化號碼摘要卡片 (Modern Slot Summary)
   ========================================= */
.slot-summary-modern {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--medical-primary); /* 左側色條強調 */
    border-radius: 8px;
    padding: 10px 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    margin-bottom: 3px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 上半部：日期 + 標籤 */
.summary-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* RWD 關鍵：空間不夠時自動換行 */
    gap: 12px;
}

/* 日期文字 */
.sum-date {
    font-size: 1.25rem; /* 加大字體 */
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

/* 標籤群組 */
.sum-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 通用標籤樣式 */
.sum-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1;
}

    /* 時段標籤 (藍/灰色系) */
    .sum-tag.time {
        background-color: #f1f5f9;
        color: #475569;
        border: 1px solid #cbd5e1;
    }

    /* 數量標籤 (綠色系，強調可選) */
    .sum-tag.count {
        background-color: #ecfdf5;
        color: #059669;
        border: 1px solid #a7f3d0;
    }

/* 下半部：提示文字 */
.sum-hint {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

    .sum-hint .info-icon {
        font-size: 1rem;
        opacity: 0.8;
    }

/* --- RWD 手機版微調 --- */
@media (max-width: 480px) {
    .slot-summary-modern {
        padding: 12px 16px;
    }

    .sum-date {
        font-size: 1.1rem;
    }

    .sum-tag {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
}

/* =========================================
   Global Loading Overlay (UI/UX Optimized)
   ========================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* 高亮度的半透明白底 */
    backdrop-filter: blur(5px); /* 毛玻璃特效 (現代感關鍵) */
    z-index: 10000; /* 確保在最上層 */
    /* Flex 置中 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 預設隱藏 (透過 opacity + visibility 做淡入淡出) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

    .loading-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--medical-primary); /* 使用您的主色 */
    letter-spacing: 1px;
    animation: pulseText 1.5s infinite ease-in-out;
}

/* --- Medical Spinner Animation (律動長條) --- */
.spinner-medical {
    display: flex;
    gap: 6px;
    height: 40px;
}

    .spinner-medical .rect {
        background-color: var(--medical-primary); /* 使用您的主色 */
        height: 100%;
        width: 6px;
        border-radius: 4px;
        animation: stretchDelay 1.2s infinite ease-in-out;
    }

    .spinner-medical .rect2 {
        animation-delay: -1.1s;
    }

    .spinner-medical .rect3 {
        animation-delay: -1.0s;
    }

    .spinner-medical .rect4 {
        animation-delay: -0.9s;
    }

    .spinner-medical .rect5 {
        animation-delay: -0.8s;
    }

@keyframes stretchDelay {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.6;
    }

    20% {
        transform: scaleY(1.0);
        opacity: 1;
    }
}

@keyframes pulseText {
    0%, 100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* =========================================
   Global Loading Overlay (UI/UX Optimized)
   ========================================= */

/* 遮罩本體：全螢幕、置中、毛玻璃 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 使用高亮度的半透明白底，營造乾淨醫療感 */
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px); /* ✅ 關鍵：毛玻璃特效 */
    z-index: 99999; /* 確保蓋在所有 Modal 之上 */

    display: flex;
    justify-content: center;
    align-items: center;
    /* 預設隱藏 (使用 opacity 做漸變) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

    /* 顯示狀態 */
    .loading-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--medical-primary); /* 跟隨主色 */
    letter-spacing: 1px;
    animation: pulseText 1.5s infinite ease-in-out;
}

/* --- Medical Spinner Animation (律動長條) --- */
.spinner-medical {
    display: flex;
    gap: 6px;
    height: 40px;
    align-items: center;
}

    .spinner-medical .rect {
        background-color: var(--medical-primary); /* 跟隨主色 */
        height: 100%;
        width: 6px;
        border-radius: 4px;
        animation: stretchDelay 1.2s infinite ease-in-out;
    }

    /* 錯開動畫時間，製造波浪感 */
    .spinner-medical .rect1 {
        animation-delay: -1.2s;
    }

    .spinner-medical .rect2 {
        animation-delay: -1.1s;
    }

    .spinner-medical .rect3 {
        animation-delay: -1.0s;
    }

    .spinner-medical .rect4 {
        animation-delay: -0.9s;
    }

    .spinner-medical .rect5 {
        animation-delay: -0.8s;
    }

@keyframes stretchDelay {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.6;
    }

    20% {
        transform: scaleY(1.0);
        opacity: 1;
    }
}

@keyframes pulseText {
    0%, 100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Step 3 額外資訊美化 */
.ticket-extra {
    border-top: 1px dashed #e2e8f0; /* 虛線分隔 */
    background-color: #fafbfc; /* 極淡灰底，增加層次 */
    padding: 16px 20px; /* 內距 */
}

/* 網格排版：讓身分、生日、手機整齊排列 */
.extra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 電腦版並排 */
    gap: 12px 24px;
}

.extra-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.9rem;
}

.extra-label {
    color: #64748b;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.extra-value {
    color: #334155;
    font-weight: 500;
    font-family: Roboto, Helvetica, Arial, sans-serif;
}

/* 手機版改為單欄，避免擁擠 */
@media (max-width: 600px) {
    .extra-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Step 3 醫師稱謂優化 */
.suffix-title {
    font-size: 0.85rem; /* 字體縮小 (相對於父層) */
    color: #64748b; /* 使用淡灰色 (Slate-500) */
    font-weight: 400; /* 轉為細體 (若父層是粗體) */
    margin-left: 6px; /* 與名字保持一點距離 */
    background: #f1f5f9; /* (選用) 加個淡底色像標籤 */
    padding: 2px 6px; /* (選用) 標籤內距 */
    border-radius: 4px; /* (選用) 圓角 */
}

/* --- 1. 標題與印章細節 --- */
#bookingWidget h1 .icon {
    background-color: var(--medical-highlight) !important; /* 硃砂紅印章 */
    color: #fff !important;
    border-radius: 4px; /* 方形印章質感 */
    width: 26px;
    height: 26px;
    font-size: 14px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* --- 3. 輸入框聚焦狀態 (不改大色塊，只改線條) --- */
input:focus, select:focus, textarea:focus {
    border-color: var(--medical-primary) !important;
    box-shadow: 0 0 0 2px rgba(45, 90, 39, 0.1) !important;
}

/* --- 4. 選擇卡片 (Visit Card) 的邊框微調 --- */
.visit-card.selected {
    border-color: var(--medical-primary) !important;
    border-width: 2px;
    background-color: var(--medical-accent) !important; /* 淡淡的宣紙底色 */
}

    .visit-card.selected h3 {
        color: var(--medical-primary) !important;
    }

/* --- 5. 科別與時段按鈕 (Chips) --- */
.chip.selected, .slot-btn.selected {
    background-color: var(--medical-primary) !important;
    border-color: var(--medical-primary) !important;
}

/* --- 6. 確認收據卡 (Ticket) 的硃砂紅重點 --- */
.ticket-card {
    border-top: 3px solid var(--medical-primary) !important; /* 頂部粗線條增加質感 */
}

.info-value.highlight {
    color: var(--medical-highlight) !important; /* 硃砂紅字體 */
    font-family: "Georgia", serif; /* 數字使用襯線體更有古典味 */
}

/* --- 7. 下一步按鈕 --- */
.btn-primary {
    background-color: var(--medical-primary) !important;
    background-image: none !important; /* 移除原本可能的橘色漸層 */
}

/* --- 標題組件容器 --- */
.widget-main-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

/* --- 疊加圖示包裝器 --- */
.stamp-icon-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 底層線條圖示：使用墨綠色 */
.base-icon {
    width: 26px;
    height: 26px;
    color: var(--medical-primary);
    opacity: 0.8;
}

/* 浮動小印章：硃砂紅 */
.floating-stamp {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at center, var(--medical-highlight) 0%, #8e3235 100%);
    color: #fff;
    font-size: 10px;
    font-family: "標楷體", serif;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px; /* 微圓角方形 */
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    line-height: 1;
    transform: rotate(-5deg); /* 微微傾斜更有手動蓋章的真實感 */
}

/* 標題文字細節 */
.title-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--medical-primary);
    letter-spacing: 0.5px;
}