/* ==========================================================================
   常態班報名表單 main.css  —  藍色現代語彙（重構版）
   與 MPM 數學共用同一套元件語彙（section-card / field-item / chip /
   pay-grid / :has() 驗證 / RWD），僅主色改為艾思藍。
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&display=swap');

/* ── Design Tokens ── */
:root {
    --brand:        #007a4b;   /* MPM 數學主色（綠）*/
    --brand-dark:   #00633d;
    --brand-darker: #004d2f;   /* 深文字 / modal 標題 */
    --brand-bg:     #e8f5ef;   /* section head 底色 */
    --brand-bg-2:   #fafdfa;   /* section body 底色（原本 main.css 的淡白綠，近白）*/
    --brand-bg-3:   #d9efe4;   /* 選取 chip 底色 */
    --brand-border: #bfe3d2;
    --brand-border-2:#9fd4bd;
    --ring:         rgba(0, 122, 75, 0.18);

    --ok:   #00AA00;  /* 驗證通過綠 */
    --req:  #ff256e;  /* 必填星號粉 */
    --ink:  #2b2b2b;
    --ink-soft: #555;
    --line: #e2e2e2;
}

/* ── Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans TC', sans-serif;
}

/* ── Page ── */
body {
    background: linear-gradient(90deg, #f4f9f5, #f4f9f5);  /* 原本 MPM 數學淡綠底 */
    min-height: 100vh;
    position: relative;
}

.wrapper {
    max-width: 1200px;
    margin: auto;
    background: #fff;
    box-shadow: 0 0 15px rgba(88, 168, 98, 0.18);
    padding-bottom: 40px;
    position: relative;
    min-height: 100vh;
}

/* ── Version badge（整頁右上角）── */
.version {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    color: #777777;
    z-index: 9999;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 50px 10px;
    border-bottom: 2px solid var(--brand);
    width: 90%;
    margin: 0 auto;
}

.header img {
    width: 350px;
}

.header h1 {
    color: var(--brand);
    font-size: 30px;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0;
}

/* 返回上一頁（對齊 logo 左側）*/
.prev {
    width: 90%;
    margin: 15px auto 0;
    padding: 0 50px;
}

.prev a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    font-weight: 500;
    font-size: 18px;
    text-decoration: none;
}

.prev a svg {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    transition: transform 0.4s;
}

.prev a:hover svg {
    transform: translateX(-10px);
}

/* 類別大標（置中，下邊距 30px）*/
.class_name {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    width: 90%;
    margin: 25px auto 0;
    padding: 0 50px 30px;
}

.class_name br { display: none; }
.p_inline { display: inline; }

/* ==========================================================================
   Section Card
   ========================================================================== */
form {
    padding: 10px 15px;
}

.section-card {
    margin: 0 32px 28px;
    border: 1px solid var(--brand-border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(88, 168, 98, 0.07);
}

.section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-border-2);
}

.section-head-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--brand);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-head-text h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-darker);
    letter-spacing: 1px;
    margin: 0;
}

.section-head-text p {
    font-size: 14px;
    color: #666;
    margin: 4px 0 0;
}

.section-body {
    padding: 24px 30px;
    background: var(--brand-bg-2);
}

.section-divider {
    height: 1px;
    background: var(--brand-border);
    margin: 20px 0;
}

.sub-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-darker);
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* ==========================================================================
   Field rows & items
   ========================================================================== */
.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
}

.field-row:last-child { margin-bottom: 0; }

.field-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.field-item.full  { flex: 1 1 100%; }
.field-item.third { flex: 1 1 30%; }

/* ── label ── */
.field-item label,
.field-item > label {
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    color: #444;
    display: flex;
    align-items: center;
    margin: 0;
}

/* ── 必填驗證 ok icon ── */
.ok {
    position: relative;
    display: inline-flex;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    flex-shrink: 0;
    transform: translateY(-2px);
}

.ok i:nth-child(1) {
    position: absolute;
    top: 0; left: 0;
    z-index: 10;
    color: var(--req);
    font-size: 15px;
    transition: 0.5s;
}

.ok i:nth-child(2) {
    position: absolute;
    top: 0; left: 0;
    z-index: 9;
    transform: rotate(-180deg);
    color: var(--ok);
    font-size: 15px;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
}

/* 驗證通過：欄位內 input 與 select「都」valid、且沒有任何 invalid 才轉綠勾。
   （修正：地址同時有 select 縣市/區域 + input 手寫，必須三者皆有效；
     避免只填手寫或只選縣市區域就誤判通過）*/
.field-item:has(input:valid:not(:placeholder-shown)):not(:has(input:invalid)):not(:has(select:invalid)) .ok i:nth-child(1),
.field-item:has(select:valid):not(:has(select:invalid)):not(:has(input:invalid)) .ok i:nth-child(1) {
    opacity: 0;
    visibility: hidden;
    transform: rotate(180deg);
}

.field-item:has(input:valid:not(:placeholder-shown)):not(:has(input:invalid)):not(:has(select:invalid)) .ok i:nth-child(2),
.field-item:has(select:valid):not(:has(select:invalid)):not(:has(input:invalid)) .ok i:nth-child(2) {
    opacity: 1;
    visibility: visible;
    transform: rotate(0deg);
}

/* ── input ── */
.field-item input[type="text"],
.field-item input[type="email"],
.field-item input[type="tel"],
.section-body input[type="text"] {
    width: 100%;
    height: 44px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 5px 15px;
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    transition: 0.3s;
    outline: none;
}

.field-item input[type="text"]:focus,
.field-item input[type="email"]:focus,
.field-item input[type="tel"]:focus,
.section-body input[type="text"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--ring);
}

/* ── select ── */
.field-item select,
.section-body select {
    width: 100%;
    height: 44px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: 0.3s;
    appearance: auto;
}

.field-item select:focus,
.section-body select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--ring);
}

/* ── 生日 / 地址三欄橫排 ── */
.date-selects {
    display: flex;
    gap: 15px;
}

.date-selects select { flex: 1; }

/* ── Radio & Checkbox 基本 ── */
.field-item input[type="radio"],
.field-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--brand);
    cursor: pointer;
}

/* ==========================================================================
   Chip 選擇器（性別 / 校區 / 得知消息 / 加報 / 是否）
   ========================================================================== */
.yn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.yn-row.wrap-chips {
    gap: 8px;
}

.yn-row.wrap-chips .yn-card {
    flex: 0 0 auto;
    width: auto;
    border-radius: 10px;
    padding: 10px 18px;
}

.yn-card {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
    min-width: 120px;
}

.yn-card:hover {
    border-color: var(--brand-border-2);
    box-shadow: 0 3px 8px rgba(88, 168, 98, 0.08);
}

.yn-card input[type="radio"],
.yn-card input[type="checkbox"] {
    display: none;
}

.yn-card p {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    margin: 0;
}

/* Checked（一般 chip）*/
.yn-card:has(input:checked) {
    border: 2px solid var(--brand);
    background: var(--brand-bg-3);
    box-shadow: 0 4px 10px rgba(88, 168, 98, 0.12);
}
.yn-card:has(input:checked) p {
    color: var(--brand-darker);
}

/* 校區 chip（選取後套用各校區代表色，由 render 以 --campus-color 帶入）*/
.yn-card.campus {
    text-align: center;
    justify-content: center;
}
.yn-card.campus p {
    font-size: 18px;
    letter-spacing: 1px;
}
.yn-card.campus:has(input:checked) {
    background: var(--campus-color, var(--brand));
    border-color: var(--campus-color, var(--brand));
}
.yn-card.campus:has(input:checked) p {
    color: #fff;
}

/* ==========================================================================
   開課狀態表圖片（courseIntro，預設隱藏，toggle.js 顯示）
   ========================================================================== */
.courseIntro {
    display: none;
    width: 100%;
    max-width: 900px;
    margin: 20px auto 0;
    text-align: center;
}
.courseIntro p {
    font-size: 20px;
    font-weight: 600;
    color: var(--brand-darker);
    margin: 10px auto;
}
.courseIntro img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   選課區塊（chooseCourse，預設隱藏，toggle.js 顯示為 block）
   ========================================================================== */
.chooseCourse {
    display: none;
    width: 100%;
    margin-top: 15px;
}

.chooseCourse .item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 40px 20px 44px;
    margin: 15px 0;
    text-align: center;
    position: relative;
    transition: 0.3s;
}

/* 週六 / 週日 交替淡色底 */
.chooseCourse .item:nth-child(odd) {
    background: #eef5ff;
    border-color: #d3e4ff;
}
.chooseCourse .item:nth-child(even) {
    background: #f2fbff;
    border-color: #d0eefb;
}

.chooseCourse .item p {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--brand-darker);
}

.chooseCourse .inline {
    display: inline-flex;
    align-items: center;
    margin: 8px 15px;
    cursor: pointer;
}

.chooseCourse .inline input[type="radio"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

.chooseCourse .inline label {
    font-size: 20px;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
    margin: 0;
}

/* 清除按鈕（右上角，預設隱藏，勾選任一選項後顯示）*/
.chooseCourse .clearRadio {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    color: #666;
}
.chooseCourse .item:has(input:checked) .clearRadio {
    display: block;
}
.chooseCourse .clearRadio:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* 「請勾選欲參加課程」小標 */
.choose-hint {
    width: 100%;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-soft);
    margin: 25px auto 0;
}

/* ==========================================================================
   硬體教材（materialGroup — 保留 app.js 依賴的 class，僅重新美化）
   ========================================================================== */
.material-card {
    width: 100%;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    background: #fff;
    padding: 20px 22px;
}
.material-card > label:first-child {
    font-size: 18px;
    font-weight: 700;
    color: #444;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}
.material-card .inline {
    display: inline-flex;
    align-items: center;
    margin: 8px 0;
    cursor: pointer;
}
.material-card .inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--brand);
    cursor: pointer;
}
.material-card .inline label {
    font-size: 17px;
    color: var(--ink);
    cursor: pointer;
    margin: 0;
}
.material-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.material-box .item {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--brand-bg-2);
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0;
}
img.material-img {
    width: 120px;
    margin: 0;
}
.system-remark {
    font-size: 0.8em;
    color: #888;
    font-weight: 400;
}

/* 免加購選項（無 / 已有）— 兩個 50% 並排滿版卡片 */
.material-optout {
    display: flex;
    gap: 12px;
    width: 100%;
    margin: 12px 0 4px;
    flex-wrap: wrap;
}
.optout-card {
    flex: 1 1 calc(50% - 6px);
    min-width: 200px;
    border: 1px dashed #bcbcbc;
    border-radius: 10px;
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    cursor: pointer;
    background: #fff;
    transition: 0.3s;
}
.optout-card:hover {
    border-color: var(--brand-border-2);
    box-shadow: 0 3px 8px rgba(88, 168, 98, 0.08);
}
.optout-card input[type="checkbox"] { display: none; }
.optout-card p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-soft);
}
.optout-card:has(input:checked) {
    border: 2px solid var(--brand);
    border-style: solid;
    background: var(--brand-bg-3);
}
.optout-card:has(input:checked) p { color: var(--brand-darker); }

/* ==========================================================================
   報名方案（sales — 直式卡片）
   ========================================================================== */
.plan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.plan-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
}
.plan-card:hover {
    border-color: var(--brand-border-2);
    box-shadow: 0 3px 8px rgba(88, 168, 98, 0.08);
}
.plan-card input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
    flex-shrink: 0;
    cursor: pointer;
}
.plan-card p {
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
    cursor: pointer;
}
.plan-card:has(input:checked) {
    border: 2px solid var(--brand);
    background: var(--brand-bg-3);
    box-shadow: 0 4px 10px rgba(88, 168, 98, 0.12);
}
.plan-card:has(input:checked) p {
    color: var(--brand-darker);
    font-weight: 700;
}

/* ==========================================================================
   圖片區塊（加報數學 banner 等）
   ========================================================================== */
.imgbox {
    max-width: 800px;
    width: 100%;
    margin: 15px 0;
    text-align: left;
}
.imgbox img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   繳費方式 — 2x2 Grid
   ========================================================================== */
.pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}
.pay-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
}
.pay-card:hover {
    border-color: var(--brand-border-2);
    box-shadow: 0 3px 8px rgba(88, 168, 98, 0.08);
}
.pay-card:has(input:checked) {
    border: 2px solid var(--brand);
    background: var(--brand-bg-3);
    box-shadow: 0 5px 15px rgba(88, 168, 98, 0.15);
}
.pay-card input[type="radio"] {
    display: none;
}
.pay-card > i {
    font-size: 20px;
    color: #888;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #f3f3f3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}
.pay-card:has(input:checked) > i {
    background: var(--brand);
    color: #fff;
}
.pay-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
}
.pay-sub {
    font-size: 14px;
    color: #777;
    margin-top: 2px;
}

/* ==========================================================================
   送出按鈕
   ========================================================================== */
.sent {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
}
.sent #checkBtn {
    color: #fff;
    width: auto;
    min-width: 240px;
    background: linear-gradient(135deg, #2f74ff, var(--brand));
    padding: 12px 100px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    border: 0;
    cursor: pointer;
    transition: 0.4s;
    box-shadow: 0 8px 16px rgba(88, 168, 98, 0.25);
}
.sent #checkBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(88, 168, 98, 0.35);
}
.sent p {
    color: var(--req);
    font-weight: 500;
    font-size: 15px;
    margin-top: 15px;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-header {
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-border-2);
}
.modal-title {
    color: var(--brand-darker);
    font-weight: 700;
    font-size: 20px;
}
.layout_title {
    font-size: 20px;
    text-align: center;
    letter-spacing: 2px;
    color: var(--brand-darker);
    background: var(--brand-bg);
    border: 1px solid var(--brand-border-2);
    padding: 10px;
    border-radius: 8px;
    margin: 25px auto 15px;
    font-weight: 700;
}
.layout_title::before,
.layout_title::after { content: ""; }
.information {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}
.information h5 {
    font-weight: 600;
    color: #444;
    font-size: 18px;
    margin: 0;
    width: 35%;
}
.information p {
    font-size: 18px;
    color: var(--brand-darker);
    font-weight: 400;
    margin: 0;
    width: 65%;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .pay-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    body { background: #fff; }
    .wrapper {
        margin: 0;
        border-radius: 0;
        padding-bottom: 20px;
        box-shadow: none;
    }
    .header {
        flex-direction: column;
        text-align: center;
        padding: 30px 15px 15px;
        gap: 10px;
    }
    .header img { margin: 0 auto; width: 250px; }
    .header h1 { font-size: 24px; }
    .prev { padding: 0 15px; }
    .class_name { padding: 0 15px 20px; font-size: 20px; }
    .section-card { margin: 0 5px 15px; border-radius: 10px; }
    .section-body { padding: 15px 12px; }
    .field-row { gap: 12px; }
    .field-item { flex: 1 1 100% !important; }
    .date-selects { flex-direction: row; gap: 8px; }
    .yn-row { flex-direction: column; }
    .yn-row.wrap-chips { flex-direction: row; }
    .yn-row.wrap-chips .yn-card {
        width: calc(50% - 4px);
        box-sizing: border-box;
    }
    .yn-card { width: 100%; }
    .chooseCourse .inline label { font-size: 18px; }
    .material-box .item { gap: 12px; }
    .information h5 { width: 45%; font-size: 16px; }
    .information p { width: 55%; font-size: 16px; }
    .prev a{
        font-size: 16px;
    }
    .lang-toggle {
        font-size: 10px !important;
    }
    .section-head-text h3 {
        font-size: 20px;
        font-weight: 600;
    }
}

@media (max-width: 450px) {
    .sent #checkBtn { padding: 12px 40px; min-width: 200px; }
    .chooseCourse .inline { margin: 8px; }
}

/* ==========================================================================
   中／英切換按鈕
   ========================================================================== */
.lang-toggle {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 9999;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--ring);
    transition: 0.3s;
}
.lang-toggle:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(88, 168, 98, 0.35); }
.lang-toggle.is-en { background: var(--brand-darker); }

/* ==========================================================================
   ↓↓↓ 以下由 camp 版移植：偽表格 / 預覽 / 加購 / 購物車 / 4 步精靈 ↓↓↓
   （常態班每時段課程數不固定，camp-row/camp-cell 於最後改為 flex 覆寫）
   ========================================================================== */
.campCourse {
    display: none;
}
.week-addon[hidden] {
    display: none !important;
}

/* ── 偽表格容器 ── */
.camp-thead,
.camp-row {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr 1fr;
}
.camp-th {
    padding: 14px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
}
.camp-week {
    border-top: 1px solid var(--line, #e3e8f0);
    position: relative;
}
.camp-row {
    position: relative;
}

/* ── 日期格 ── */
.camp-date {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    text-align: center;
    font-weight: 700;
    color: #4a5a78;
    background: #f6f9fc;
    font-size: 16px;
}

/* ── 課程格（可點選）── */
.camp-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 150px;
    padding: 24px 12px 20px;
    border-left: 1px solid var(--line, #eef1f7);
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}
.camp-cell input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.camp-cell:hover {
    background: #f2f7ff;
}
.camp-cell:has(input:checked) {
    background: #eaf3f8;
    box-shadow: inset 0 0 0 3px var(--campus-color, #008141);
}

/* 角標（代號）— 電腦版放大 */
.cell-badge {
    position: absolute;
    top: 7px;
    right: 9px;
    font-size: 16px;
    font-weight: 800;
    color: var(--campus-color, #008141);
}
.cell-logo {
    max-width: 152px;
    max-height: 66px;
    object-fit: contain;
}

/* 名額狀態徽章 */
.cell-status {
    position: absolute;
    top: 7px;
    left: 9px;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
}
.camp-cell.is-soon .cell-status {
    background: #fff3cd;
    color: #9a6a12;
}
.camp-cell.is-last .cell-status {
    background: #ffe0e0;
    color: #c0392b;
}

/* 額滿：不可點 + 校區標準色覆蓋(opacity 0.4) + 「額滿」字壓在覆蓋層之上 */
.camp-cell.is-full {
    cursor: not-allowed;
}
.camp-cell.is-full .cell-status {
    display: none;
}
.camp-cell.is-full::before {
    /* 覆蓋色＝校區標準色，透明度 0.4（可自行調整數字）*/
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--campus-color, #008141);
    opacity: 0.4;
}
.camp-cell.is-full::after {
    content: "額滿";
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* 清除選項鈕：絕對定位於日期格左上，選了該列才出現 */

/* ── 每週加購區 ── */
.week-addon {
    padding: 16px 18px;
    background: #f5f9ff;
    border-top: 2px dashed var(--campus-color, #008141);
}
.addon-head {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink, #202d4a);
}
.addon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 4px 0 10px;
    color: #5a6a85;
    font-weight: 600;
    font-size: 14px;
}
.addon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.addon-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--line, #e3e8f0);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}
.addon-item:has(input:checked) {
    border: 2px solid var(--ink, #202d4a);
    background: #eef2f9;
}
.addon-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ink, #202d4a);
    flex-shrink: 0;
}

/* 本週小計 */
.addon-week-total {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #cfd8e8;
    text-align: right;
    font-weight: 700;
    color: var(--ink, #202d4a);
}
.addon-week-total-num {
    font-size: 20px;
    font-weight: 800;
    color: #e0002c;
}

/* ── 套票方案加購視窗（深藍色票，教材圖文比照 member）── */

/* 單報方案動態檔期字 */
.single-plan-text .salesname,
.single-plan-text .salesdate {
    font-weight: 800;
    color: #c0392b;
}

/* ── Modal 應繳金額（紅字放大）+ 計算備註（灰字）── */

/* ── RWD：≤768 改直列排版 ── */
@media (max-width: 768px) {
    .camp-thead {
        display: none;
    }
    .camp-row {
        grid-template-columns: 1fr;
    }
    /* 手機版縮小 logo 與課名，避免遮住右上角代號 */
    .camp-cell .cell-logo {
        max-width: 76px;
        max-height: 44px;
    }
    .camp-cell .cell-name {
        font-size: 15px;
    }
    .cell-badge {
        top: 8px;
        right: 12px;
        font-size: 13px;
    }
    .cell-status {
        position: static;
        margin-left: auto;
    }
    /* 清除鈕壓在最上方日期色條右側，不覆蓋下方課程訊息 */
}

/* ==========================================================================
   RWD 微調（平板 / 手機）— 本區為後補覆寫，勝過上方同名規則
   ========================================================================== */
/* 平板：偽表格 logo 與課名縮小，代號(角標)維持不變 */
@media (min-width: 769px) and (max-width: 1024px) {
    .cell-logo {
        max-width: 112px;
        max-height: 52px;
    }
    .cell-name {
        font-size: 20px;
    }
}

/* 手機微調 */
@media (max-width: 768px) {
    /* 地址：第三格(手寫)斷行至下一列，避免被擠成一小塊 */
    .date-selects {
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
    }
    #connection-address {
        flex: 1 1 100%;
        margin-top: 8px;
    }
    /* 偽表格每格上下 padding 拉大，減少壅擠 */
    .camp-cell {
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        min-height: auto;
        padding: 14px 56px 14px 12px;
        border-left: none;
        border-top: 1px solid var(--line, #eef1f7);
        padding-top: 20px;
        padding-bottom: 20px;
    }
    /* 本週小計 / 金額文字縮小 */
    .addon-week-total {
        font-size: 14px;
    }
    .addon-week-total-num {
        font-size: 16px;
    }
    /* 教材選擇：圖在上、文字在下，圖縮小約 80px */
    .material-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .material-row .addon-mini-img {
        width: 72px;
        height: auto;
    }
}

/* Modal 總計金額縮小（各裝置一致）*/

/* 教材列文字群組（checkbox+文字）：桌機與圖並排，手機時位於圖下方 */
.material-row .mat-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   購物車式流程：方案閘門 / 兩段式預覽 / 報名鈕 / 購物車（大改版）
   ========================================================================== */
/* 方案未選前鎖住校區 */
.plan-gate-hint {
    color: #c0392b;
    font-weight: 600;
    font-size: 15px;
    margin: 4px 0 10px;
}
#campusMount.is-locked {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.4);
}

/* 格子預覽 / 已報名 高亮 */
.camp-cell.is-preview {
    background: #fff8e6;
    box-shadow: inset 0 0 0 3px #f0b429;
}
.camp-cell.is-committed,
.camp-cell:has(input:checked) {
    background: #eaf3f8;
    box-shadow: inset 0 0 0 3px var(--campus-color, #008141);
}

/* 每週預覽區（點格子後出現） */
.week-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 16px 18px;
    background: #fffdf5;
    border-top: 2px dashed var(--campus-color, #008141);
}
.week-preview .wp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
}
.week-preview .wp-course {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink, #202d4a);
}
.week-preview .wp-date {
    font-size: 14px;
    color: #5a6a85;
}
.week-preview .wp-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.commitBtn {
    margin-left: auto;
    border: none;
    cursor: pointer;
    background: var(--campus-color, #16233f);
    color: #fff;
    border-radius: 24px;
    padding: 10px 26px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: 0.2s;
}
.commitBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* 移除此梯 */
.removeWeek {
    margin-top: 12px;
    border: 1px solid #f0b4b4;
    background: #fff;
    color: #c0392b;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.removeWeek:hover {
    background: #fff0f0;
}

/* 購物車固定按鈕（右下）+ 價格色塊 */
.cart-fab {
    position: fixed;
    right: 50px;
    bottom: 50px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}
.cart-fab:hover {
    transform: translateY(-2px);
}
.cart-fab img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.cart-fab.has-items .cart-total {
    background: #e0002c;
}

/* 購物車 modal 內容 */
.cart-empty {
    color: #5a6a85;
    text-align: center;
    padding: 20px 0;
}
.cart-planline {
    font-weight: 800;
    color: var(--ink, #202d4a);
    background: #eef2f9;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.cart-week {
    border: 1px solid #e3e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.cart-week-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    color: var(--ink, #202d4a);
    margin-bottom: 8px;
}
.cart-del-week {
    border: 1px solid #f0b4b4;
    background: #fff;
    color: #c0392b;
    border-radius: 16px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.cart-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cart-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    color: #33405a;
}
.cart-line .cart-del-line,
.cart-line .cart-del-slot {
    margin-right: 8px;
    border: none;
    background: #f3f5f9;
    color: #c0392b;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 1;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    text-align: center;
}
.cart-line .cart-del-slot:hover,
.cart-line .cart-del-line:hover { background: #ffe0e0; }
.cart-week-sub {
    text-align: right;
    margin-top: 8px;
    color: var(--ink, #202d4a);
}
.cart-grandtotal {
    text-align: right;
    font-size: 20px;
    font-weight: 800;
    color: #e0002c;
    border-top: 2px solid #e3e8f0;
    padding-top: 12px;
    margin-top: 6px;
}

/* 手機：購物車按鈕縮小、靠邊 */
@media (max-width: 768px) {
    .cart-fab img {
        width: 52px;
        height: 52px;
    }
    .week-preview .wp-sale {
        font-size: 20px;
    }
}

/* ==========================================================================
   需求修改 v2：預覽價字級 / 取消選取 / 購物車色塊 / 跨校區鎖 / 教材圖 / 折扣區
   （本區為最後覆寫，勝過上方同名規則）
   ========================================================================== */
/* 預覽：原價劃線、優惠價字級縮小 */
.week-preview .wp-orig {
    font-size: 15px;
    color: #9aa4b5;
    text-decoration: line-through;
}
.week-preview .wp-sale {
    font-size: 20px;
    font-weight: 800;
    color: #e0002c;
}

/* 取消選取（次要按鈕） */
.cancelPreview {
    border: 1px solid #cfd8e8;
    background: #fff;
    color: #5a6a85;
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.cancelPreview:hover {
    background: #f3f5f9;
}

/* 購物車價格色塊：電腦大一些 */

/* 跨校區防重：已在他校報名的該週整列鎖住 */
.camp-row.week-locked {
    opacity: 0.5;
    filter: grayscale(0.5);
}
.camp-row.week-locked .camp-cell {
    pointer-events: none;
    cursor: not-allowed;
}
.camp-row.week-locked .camp-date::after {
    content: "已於其他校區選取";
    display: block;
    font-size: 12px;
    color: #c0392b;
    margin-top: 4px;
}

/* 套票 / member 加購區教材圖（比照 member 尺寸，避免原圖過大） */
.week-addon .material-row .addon-mini-img {
    width: 110px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* 購物車折扣區 */
.cart-discounts {
    border-top: 1px dashed #e3e8f0;
    margin-top: 10px;
    padding-top: 10px;
}
.cart-discounts-title {
    font-weight: 800;
    color: var(--ink, #202d4a);
    margin-bottom: 6px;
}
.cart-discount-line span:last-child {
    color: #e0002c;
    font-weight: 700;
}

/* 手機微調：購物車色塊縮小、報名鈕不滿版、教材圖再小 */
@media (max-width: 768px) {
    .commitBtn {
        margin-left: 0;
        width: auto;
        padding: 10px 20px;
    }
    .week-addon .material-row .addon-mini-img {
        width: 72px;
    }
}

/* ==========================================================================
   點數制套票：預覽動作列 / 套票扣點+單價購買 按鈕 / 剩餘點數
   ========================================================================== */
.wp-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
    align-items: center;
}
.wp-actions .commitBtn {
    margin-left: 0;
}
/* 套票扣點：實心；單價購買：外框 */
/* 套票剩餘點數提示 */
@media (max-width: 768px) {
    .wp-actions {
        width: 100%;
        margin-left: 0;
    }
    .wp-actions .commitBtn,
    .wp-actions .cancelPreview {
        flex: 1;
    }
}

/* ==========================================================================
   購物車 open/close 圖切換 + 電腦版加大 + 加購問號 tooltip
   ========================================================================== */
/* 兩張圖：預設(0元)顯示 close，有課程(has-items)顯示 open */
.cart-fab .cart-ico-open {
    display: none;
}
.cart-fab.has-items .cart-ico-close {
    display: none;
}
.cart-fab.has-items .cart-ico-open {
    display: block;
}
/* 電腦版價格色塊字放大 */
.cart-fab .cart-total {
    margin-top: -6px;
    min-width: 96px;
    text-align: center;
    background: var(--ink, #202d4a);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    border-radius: 14px;
    padding: 4px 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* 加購「?」說明 icon + tooltip（hover 逾 1 秒才顯示）*/
.addon-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    color: var(--formSubTitleColor, #0387bf);
    cursor: help;
}
.addon-help > i {
    font-size: 16px;
}
.addon-help:hover .addon-tip,
.addon-help:focus .addon-tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease 1s, visibility 0s linear 1s, transform 0.2s ease 1s;
}

@media (max-width: 768px) {
    .cart-fab .cart-total {
        font-size: 13px;
        min-width: 78px;
    }
}

/* ==========================================================================
   v3 微調：tooltip 不被裁切 / 購物車圖加大 / 點數字級 / 移除全部
   ========================================================================== */
/* tooltip 被 .camp-table 的 overflow:hidden 裁掉 → 改為 visible，
   並把圓角改標在表頭，維持外觀 */
.camp-table {
    width: 100%;
    background: #fff;
    border: 1px solid var(--line, #e3e8f0);
    border-radius: 14px;
    overflow: visible;
    margin-top: 6px;
    box-shadow: 0 6px 18px rgba(32, 45, 74, 0.06);
}
.camp-thead {
    background: var(--campus-color, #008141);
    color: #fff;
    border-radius: 14px 14px 0 0;
}
.addon-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 280px;
    max-width: min(320px, 88vw);
    background: #202d4a;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, visibility 0s linear 0.2s, transform 0.2s ease;
    z-index: 30;
    pointer-events: none;
    white-space: normal;
}

/* 購物車書包圖：電腦版加大（原本 .cart-fab img 被更具體的 .cart-fab .cart-ico 蓋過，
   所以你改 img 沒反應；這裡直接改 .cart-ico）*/

/* 套票剩餘點數：字小、細 */
.plan-points {
    display: inline-block;
    font-weight: 300;
    color: var(--ink, #202d4a);
    background: #eef2f9;
    border: 1px solid #d7deea;
    border-radius: 10px;
    padding: 8px 14px;
    margin: 0 0 12px;
    font-size: 13px;
}

/* 購物車「移除全部」：紅框紅字、無色塊（放 footer 左下）*/
.cart-clear-all:hover {
    background: #fff0f2;
}

@media (max-width: 768px) {
    /* 手機 tooltip：置中、限制寬度，避免超出畫面被切 */
    .addon-tip {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(4px);
        width: min(300px, 90vw);
    }
    .addon-help:hover .addon-tip,
    .addon-help:focus .addon-tip {
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================================================
   v4 微調：時時學語言 radio / 課名粗細 / 移除全部粗細 / 購物車圖尺寸收尾
   ========================================================================== */
/* 時時學：勾選後彈出的語言選擇（Scratch / Minecraft 擇一）*/

/* 表格課名：粗細 500 */
.cell-name {
    font-weight: 500;
    font-size: 20px;
    color: var(--ink, #202d4a);
    line-height: 1.35;
}

/* 移除全部：字重 400 */
.cart-clear-all {
    background: none;
    border: 1.5px solid #e0002c;
    color: #e0002c;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: 0.2s;
}

/* 購物車書包圖：電腦版 110（此為最終規則）；手機維持較小，放在最後才不會被上面的桌機規則蓋到 */
.cart-fab .cart-ico {
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
@media (max-width: 768px) {
    .cart-fab .cart-ico {
        width: 58px;
        height: 58px;
    }
}

/* ==========================================================================
   v5：電腦版梯次格子間距內縮（logo↔課名 更近、上下 padding 更小）
   ========================================================================== */
@media (min-width: 769px) {
    .camp-cell {
        gap: 5px;
        padding-top: 14px;
        padding-bottom: 12px;
        min-height: 118px;
    }
}

/* ==========================================================================
   Wizard 4 步驟：步驟樹 / panel 切換 / 底部按鈕 / 付款直列 / step2 優惠 / 鎖列
   ========================================================================== */
.wizard-step[hidden] {
    display: none !important;
}

/* 步驟樹 */
.step-tree {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 760px;
    margin: 22px auto 8px;
    padding: 0 20px;
}
.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.step-node.is-clickable {
    cursor: pointer;
}
.step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d7deea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    transition: 0.2s;
}
.step-name {
    font-size: 13px;
    color: #8a93a6;
    white-space: nowrap;
}
.step-node.is-done .step-dot {
    background: #2e9b5b;
}
.step-node.is-active .step-dot {
    background: var(--ink, #202d4a);
    box-shadow: 0 0 0 4px rgba(32, 45, 74, 0.15);
}
.step-node.is-active .step-name {
    color: var(--ink, #202d4a);
    font-weight: 800;
}
.step-line {
    flex: 1;
    height: 3px;
    background: #d7deea;
    margin: 20px 6px 0;
    min-width: 24px;
}

/* 底部導覽按鈕 */
.wizard-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 6px 32px 30px;
}
.wizard-foot-left {
    display: inline-block;
}
.wiz-btn {
    border: none;
    border-radius: 26px;
    padding: 12px 26px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.wiz-next {
    background: var(--ink, #202d4a);
    color: #fff;
}
.wiz-next:hover {
    filter: brightness(1.1);
}
.wiz-back {
    background: #fff;
    color: #5a6a85;
    border: 1.5px solid #cfd8e8;
}
.wiz-back:hover {
    background: #f3f5f9;
}
.wiz-submit {
    background: #2e9b5b;
    color: #fff;
    font-size: 18px;
    padding: 14px 34px;
}
.wiz-submit:hover {
    filter: brightness(1.08);
}

/* 付款方式：直列 */
.pay-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pay-list .pay-card {
    width: 100%;
}

/* step2 優惠列 + 總計 */
.discount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 0;
}
.discount-input {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.discount-input label {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
/* 團報 / 舊生推薦：勾勾放大 */
.discount-input input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--ink, #202d4a);
    cursor: pointer;
    flex: 0 0 auto;
}
.discount-input input[type="text"] {
    width: 200px;
}
/* 套票方案時：整列（文字＋輸入框＋勾勾）一起變灰＝刻意不能按 */
.discount-row.is-disabled {
    opacity: 0.45;
}
.discount-row.is-disabled,
.discount-row.is-disabled label,
.discount-row.is-disabled input {
    color: #8a93a6;
    cursor: not-allowed;
}
.discount-amt {
    font-weight: 800;
    color: #e0002c;
    min-width: 64px;
    text-align: right;
    font-size: 18px;
}
.step2-grandtotal {
    text-align: right;
    font-size: 22px;
    font-weight: 800;
    color: #e0002c;
    border-top: 2px solid #e3e8f0;
    padding-top: 14px;
    margin-top: 14px;
}

/* 報名後：同一週其他兩格灰掉鎖住（沿用滿班色，但無「額滿」字）*/
.camp-row.week-committed .camp-cell:not(.is-committed) {
    pointer-events: none;
}
.camp-row.week-committed .camp-cell:not(.is-committed)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--campus-color, #008141);
    opacity: 0.4;
}

/* 驗證未填：閃紅框 */
.field-item.field-invalid {
    outline: 2px solid #e0002c;
    outline-offset: 4px;
    border-radius: 8px;
}

/* 手機：日期列可點收合 + wizard 各項微調 */
@media (max-width: 768px) {
    .camp-date {
        background: var(--campus-color, #008141);
        color: #fff;
        font-size: 17px;
        padding: 12px;
        cursor: pointer;
        position: relative;
    }
    .camp-date::after {
        content: "▾";
        margin-left: 8px;
        font-size: 14px;
    }
    .camp-date.collapsed::after {
        content: "▸";
    }
    /* 報名後另外兩格直接隱藏 */
    .camp-row.week-committed .camp-cell:not(.is-committed) {
        display: none;
    }

    /* 4. 步驟圈圈縮小 */
    .step-tree {
        padding: 0 8px;
    }
    .step-dot {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .step-node.is-active .step-dot {
        box-shadow: 0 0 0 3px rgba(32, 45, 74, 0.15);
    }
    .step-line {
        margin-top: 14px;
    }
    .step-name {
        font-size: 11px;
    }

    /* 5. 購物車移到左下角（避免擋住 step1 的「確認購物車」按鈕）*/
    .cart-fab {
        right: auto;
        bottom: 50px;
        left: 50px;
    }

    /* 6. step2 總金額字體縮小 */
    .step2-grandtotal {
        font-size: 16px;
        padding-top: 10px;
        margin-top: 10px;
    }
    .step2-total {
        font-size: 18px;
    }

    /* 7. 底部按鈕全部置中直排（文字長會斷行，故不再一左一右）*/
    .wizard-foot {
        margin: 6px 16px 24px;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .wizard-foot-left {
        display: none;
    }
    .wiz-btn {
        padding: 11px 18px;
        font-size: 15px;
        width: auto;
        text-align: center;
        justify-content: center;
    }
}
/* ==========================================================================
   Minecraft 共享帳號 modal（時時學無 Minecraft 梯次時，於「確認購物車」跳出）
   ========================================================================== */
.mc-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 28, 46, 0.55);
    padding: 20px;
}
.mc-modal[hidden] {
    display: none;
}
.mc-modal-box {
    background: #fff;
    border-radius: 16px;
    max-width: 460px;
    width: 100%;
    padding: 26px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.mc-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink, #202d4a);
    margin: 0 0 12px;
}
.mc-modal-text {
    font-size: 15px;
    line-height: 1.7;
    color: #42506a;
    margin: 0 0 18px;
}
.mc-modal-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.mc-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #cfd8e8;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.15s;
    margin: 0;
}
.mc-opt:hover {
    background: #f3f6fb;
}
.mc-opt input {
    width: 20px;
    height: 20px;
    accent-color: var(--ink, #202d4a);
    flex: 0 0 auto;
}
.mc-opt:has(input:checked) {
    border-color: var(--ink, #202d4a);
    background: #eef2f9;
}
.mc-modal-foot {
    text-align: right;
}
.mc-confirm {
    background: var(--ink, #202d4a);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 11px 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.mc-confirm:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
/* 購物車 Minecraft 帳號項目的刪除鈕（沿用刪除梯次樣式）*/
.cart-del-mc {
    border: 1px solid #f0b4b4;
    background: #fff;
    color: #c0392b;
    border-radius: 16px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* ── 常態班覆寫：時段列改 flex（每列課程數 1~4 不固定）── */
.camp-row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
}
.camp-date {
    flex: 0 0 160px;
    min-width: 160px;
}
.camp-cell {
    flex: 1 1 160px;
    min-width: 150px;
}
@media (max-width: 768px) {
    .camp-row { flex-direction: column; }
    .camp-date { flex-basis: auto; width: 100%; }
    .camp-cell { flex-basis: auto; width: 100%; border-left: none; border-top: 1px solid var(--line, #eef1f7); }
}

/* ==========================================================================
   常態班：週六/週日 兩表格表頭（標準藍底＋黃字）＋表格間距
   ========================================================================== */
.day-table {
    margin-bottom: 15px;
    border: 1px solid var(--line, #e2e2e2);
    border-radius: 12px;
    overflow: hidden;
}
.day-table:last-child { margin-bottom: 0; }
.camp-day-th {
    background: var(--campus-color, var(--brand, #007a4b));
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    padding: 10px 12px;
}
@media (max-width: 768px) {
    .camp-day-th {
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.5px;
        padding: 8px 10px;
    }
}
/* step2 合報優惠（自動）標籤 */
.disc-auto-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink, #2b2b2b);
}

/* ==========================================================================
   MPM 數學專屬：金額(原價劃線+優惠價紅)、方案閘門提示、時段
   ========================================================================== */
.math-price {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin: 14px 0 4px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--brand-border, #dbe7ff);
    border-radius: 12px;
}
.math-orig {
    color: #8a93a6;
    text-decoration: line-through;
    font-size: 16px;
}
.math-sale {
    color: #e0002c;
    font-weight: 800;
    font-size: 22px;
}
.math-validity {
    color: var(--ink, #2b2b2b);
    font-size: 15px;
    font-weight: 600;
}
.math-gate-hint {
    color: var(--brand-dark, #0040d0);
    font-size: 15px;
    margin: 6px 0 0;
}
.time-slot {
    padding: 10px 0;
}
.slot-hint {
    font-size: 13px;
    color: #8a93a6;
    margin: 6px 0 0;
}
.slot-error {
    font-size: 13px;
    color: #e0002c;
    font-weight: 600;
    margin: 6px 0 0;
}
.time-slot.has-end-error select[name^="chooseEndTime"] {
    outline: 2px solid #e0002c;
    outline-offset: 2px;
}
/* 購物車：原價劃線小字、時段子列 */
.cart-orig {
    color: #8a93a6;
    text-decoration: line-through;
    font-size: 13px;
    margin-left: 8px;
}
.cart-subline span:first-child {
    color: #5a6a85;
    font-size: 14px;
}

/* 教材版本下方的金額（原價劃線 + 優惠價紅字，字重細一點）*/
.plan-card .ed-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-top: 8px;
}
.plan-card .ed-price:empty { display: none; }
.ed-orig {
    color: #8a93a6;
    text-decoration: line-through;
    font-size: 14px;
}
.ed-sale {
    color: #e0002c;
    font-weight: 500;   /* 優惠價字重再細一點 */
    font-size: 18px;
}
.ed-validity {
    color: var(--ink, #2b2b2b);
    font-size: 14px;
    font-weight: 500;
}

/* 時數方案：左右水平（30 / 60）*/
.plan-list.hours-list {
    flex-direction: row;
    gap: 14px;
}
.plan-list.hours-list .plan-card {
    flex: 1 1 0;
    text-align: center;
    justify-content: center;
}
/* 教材版本金額：整塊置於「版本名稱」下一行（版本與金額之間斷行）；
   但金額三項（原價 / 優惠價 / 效期）維持同一列並排，不各自斷行 */
#editionBlock .plan-card { flex-wrap: wrap; align-items: center; }
#editionBlock .plan-card .ed-price {
    flex-basis: 100%;        /* 佔滿整列 → 自動換到版本名稱的下一行 */
    flex-direction: row;     /* 三項並排 */
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-top: 6px;
    padding-left: 32px;      /* 對齊版本名稱（略過前方 radio 寬度）*/
}
.ed-sale { font-weight: 600; }  /* 優惠價字重 600 */
@media (max-width: 480px) {
    .plan-list.hours-list { flex-direction: row; }
}

/* ── 購物車 FAB RWD 修正：平板起移到左邊、手機貼近左緣（避免擋到下一步/送出）── */
@media (min-width: 769px) and (max-width: 1024px) {
    .cart-fab { right: auto; left: 40px; }
}
@media (max-width: 768px) {
    .cart-fab { right: auto; left: 10px; bottom: 16px; }
}

/* ── 手機：時段選擇（星期/開始/結束）改垂直排列，避免水平太擠 ── */
@media (max-width: 768px) {
    .time-slot .date-selects { flex-direction: column; align-items: stretch; gap: 8px; }
    .time-slot .date-selects select { width: 100%; }
}

/* ── 手機：底部按鈕改成與產品頁一致（滿版、字 18px、直排置中）── */
@media (max-width: 768px) {
    .wizard-foot { flex-direction: column; align-items: center; gap: 10px; margin: 6px 16px 24px; }
    .wizard-foot .wiz-btn { width: 100%; font-size: 18px; padding: 14px 18px; justify-content: center; text-align: center; }
}
