/* =============================================
   案件預約頁（Will Writing、Divorce 等）共用樣式
   ============================================= */

main > .section.cs-section {
    padding: 72px 0;
}

.cs-alt {
    background: var(--bg-light, #f7f8fa);
}

/* ---------- 上半部：介紹 + 右邊費用卡 ---------- */
.cs-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
    max-width: 1120px;
    margin: 0 auto;
}

.cs-intro .section-title {
    text-align: left;
    margin-bottom: 18px;
}

.cs-intro .section-title[data-eyebrow]::before {
    margin-left: 0;
}

.cs-lead {
    margin: 0 0 32px;
    font-size: 1.08rem;
    line-height: 1.85;
    color: #4f5b66;
}

.cs-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.cs-lists h3 {
    margin: 0 0 14px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
}

.cs-lists ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cs-lists li {
    position: relative;
    padding: 0 0 10px 26px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

.cs-lists li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 7px;
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    transform: rotate(-45deg);
}

.cs-note {
    margin: 26px 0 0;
    padding: 14px 18px;
    border-left: 3px solid var(--secondary-color);
    background: #faf7f0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #6b5a33;
}

/* 右邊卡片 */
.cs-card {
    position: sticky;
    top: 110px;
    padding: 30px 28px;
    border-radius: 14px;
    background: linear-gradient(155deg, #1a4a75, #0f2a44);
    color: #fff;
    box-shadow: 0 30px 60px -30px rgba(15, 42, 68, 0.7);
}

.cs-card dl {
    margin: 0 0 24px;
}

.cs-card dt {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.cs-card dd {
    margin: 4px 0 18px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    color: #fff;
}

.cs-card dd small {
    display: block;
    margin-top: 2px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
}

.cs-card .cs-start {
    display: block;
    padding: 14px 20px;
    border-radius: 999px;
    background: var(--secondary-color);
    color: #1e2938;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.cs-card .cs-start:hover {
    background: #d8bd7e;
    transform: translateY(-2px);
}

.cs-card .cs-help {
    margin: 16px 0 0;
    font-size: 0.82rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
}

.cs-card .cs-help a {
    color: #fff;
}

/* ---------- 流程 ---------- */
.cs-steps-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    counter-reset: csstep;
}

.cs-steps-row li {
    counter-increment: csstep;
    padding: 26px 22px;
    border: 1px solid #ebe7de;
    border-radius: 12px;
    background: #fff;
}

.cs-steps-row li::before {
    content: counter(csstep, decimal-leading-zero);
    display: block;
    margin-bottom: 10px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    color: var(--secondary-color);
}

.cs-steps-row strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.cs-steps-row span {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #666;
}

/* ---------- 表單 ---------- */
.cs-form-wrap {
    max-width: 860px;
    margin: 0 auto;
    border: 1px solid #e3ddcf;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 60px -36px rgba(15, 42, 68, 0.45);
    overflow: hidden;
    scroll-margin-top: 100px;
}

.cs-form-head {
    padding: 26px 34px 22px;
    border-bottom: 3px double #c9a961;
    text-align: center;
}

.cs-form-head strong {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.cs-form-head span {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9c7c3c;
}

/* 步驟條 */
.cs-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid #ebe7de;
    background: #faf8f3;
}

.cs-progress li {
    position: relative;
    padding: 14px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: #a3a9b0;
}

.cs-progress li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 6px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 0.72rem;
}

.cs-progress li::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: transparent;
}

.cs-progress li.is-done {
    color: var(--primary-color);
}

.cs-progress li.is-current {
    color: #9c7c3c;
}

.cs-progress li.is-current::after {
    background: var(--secondary-color);
}

.cs-form {
    padding: 30px 34px 34px;
}

.cs-step[hidden] {
    display: none !important;
}

.cs-step h3 {
    margin: 0 0 22px;
    padding: 10px 16px;
    border-radius: 4px;
    background: var(--primary-color);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
}

.cs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.cs-field.full {
    grid-column: 1 / -1;
}

.cs-field > label,
.cs-field > legend {
    padding: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #33414e;
}

.cs-field .req {
    color: #b3261e;
}

.cs-field input[type="text"],
.cs-field input[type="email"],
.cs-field input[type="tel"],
.cs-field input[type="number"],
.cs-field input[type="date"],
.cs-field select,
.cs-field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #cfd5db;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-size: 0.95rem;
    color: #222;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cs-field textarea {
    min-height: 110px;
    resize: vertical;
}

.cs-field input:focus,
.cs-field select:focus,
.cs-field textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.2);
}

.cs-field.is-invalid input,
.cs-field.is-invalid select,
.cs-field.is-invalid textarea {
    border-color: #b3261e;
}

.cs-error {
    display: none;
    font-size: 0.78rem;
    color: #b3261e;
}

.cs-field.is-invalid .cs-error {
    display: block;
}

.cs-form-note {
    grid-column: 1 / -1;
    margin: 0;
    padding: 12px 16px;
    border-left: 3px solid var(--secondary-color);
    border-radius: 0 8px 8px 0;
    background: #faf7f0;
    font-size: 0.86rem;
    line-height: 1.6;
    color: #6b5a33;
}

.cs-field[hidden],
.cs-form-note[hidden] {
    display: none;
}

.cs-desc {
    margin: 0 0 4px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #5f6b76;
}

.cs-other {
    margin-top: 8px;
}

.cs-hint {
    font-size: 0.78rem;
    color: #7a848d;
}

.cs-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid #cfd5db;
    border-radius: 999px;
    font-size: 0.88rem;
    color: #33414e;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cs-options input {
    accent-color: var(--primary-color);
}

.cs-options label:has(input:checked) {
    border-color: var(--primary-color);
    background: #eef3f8;
}

.cs-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #4f5b66;
}

.cs-consent input {
    margin-top: 4px;
    accent-color: var(--primary-color);
}

.cs-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #ebe7de;
}

.cs-btn {
    padding: 13px 28px;
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.cs-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.cs-btn.ghost {
    background: #fff;
    color: var(--primary-color);
}

.cs-btn.ghost:hover {
    background: #f4f1ea;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cs-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.cs-actions .cs-btn:only-child,
.cs-actions .cs-btn.next {
    margin-left: auto;
}

/* 預覽表 */
.cs-review {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.cs-review th,
.cs-review td {
    padding: 10px 12px;
    border: 1px solid #e3ddcf;
    text-align: left;
    vertical-align: top;
}

.cs-review th {
    width: 38%;
    background: #faf8f3;
    font-weight: 600;
    color: #33414e;
}

.cs-review tr.cs-review-group th {
    background: #eef3f8;
    color: var(--primary-color);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.cs-review td {
    white-space: pre-line;
    color: #222;
}

.cs-review-edit {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: #666;
}

/* 付款 */
.cs-pay {
    text-align: center;
}

.cs-pay-ref {
    display: inline-block;
    margin: 0 0 18px;
    padding: 8px 18px;
    border: 1px dashed var(--secondary-color);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--primary-color);
}

.cs-pay-box {
    max-width: 460px;
    margin: 0 auto 18px;
    padding: 22px 24px;
    border: 1px solid #e3ddcf;
    border-radius: 12px;
    background: #faf8f3;
    text-align: left;
}

.cs-pay-box div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.92rem;
}

.cs-pay-box div + div {
    border-top: 1px solid #ebe7de;
}

.cs-pay-box strong {
    color: var(--primary-color);
}

.cs-pay-how {
    text-align: left;
}

.cs-pay p {
    margin: 0 auto 10px;
    max-width: 520px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #4f5b66;
}

.cs-status {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
}

.cs-status.is-error {
    background: #fdecea;
    color: #8c1d18;
}

/* ---------- 手機 ---------- */
@media (max-width: 900px) {
    .cs-intro {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .cs-card {
        position: static;
    }

    .cs-steps-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    main > .section.cs-section {
        padding: 52px 0;
    }

    .cs-lists,
    .cs-grid {
        grid-template-columns: 1fr;
    }

    .cs-steps-row {
        grid-template-columns: 1fr;
    }

    .cs-form-head,
    .cs-form {
        padding-left: 18px;
        padding-right: 18px;
    }

    .cs-progress li {
        font-size: 0;
    }

    .cs-progress li span {
        margin: 0;
        font-size: 0.72rem;
    }

    .cs-review th,
    .cs-review td {
        display: block;
        width: auto;
    }

    .cs-review td {
        border-top: 0;
    }
}

/* 預覽模式：步驟條可以點 */
.cs-progress.is-clickable li {
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.cs-progress.is-clickable li:hover {
    background: #f1ece0;
    color: var(--primary-color);
}

/* 麵包屑、表單副標題 */
.cs-crumb {
    margin: 0 0 18px;
    font-size: 0.82rem;
    color: #7a848d;
}

.cs-crumb a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 169, 97, 0.6);
}

.cs-crumb span {
    margin: 0 6px;
    color: #c9a961;
}

.cs-form-head em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-size: 0.85rem;
    color: #7a848d;
}

/* ---------- Online Services 總覽頁 ---------- */
.os-intro {
    max-width: 680px;
    margin: -10px auto 48px;
    text-align: center;
    font-size: 1.02rem;
    line-height: 1.8;
    color: #4f5b66;
}

.os-intro a {
    color: var(--primary-color);
    font-weight: 600;
}

.os-group {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 0;
    border-top: 1px solid #ebe7de;
}

.os-group-head h3 {
    margin: 0 0 8px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    color: var(--primary-color);
}

.os-group-head p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #6b7680;
}

.os-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.os-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 22px 20px;
    border: 1px solid #ebe7de;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.os-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transition: width 0.5s ease;
}

.os-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(15, 42, 68, 0.12);
    border-color: transparent;
}

.os-card:hover::before {
    width: 100%;
}

.os-card strong {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
}

.os-sub {
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9c7c3c;
}

.os-card p {
    flex: 1;
    margin: 10px 0 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

.os-price {
    margin: -6px 0 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
}

.os-price small {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #7a848d;
}

.os-go {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

.os-go .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.os-card:hover .os-go .arrow {
    transform: translateX(4px);
}

@media (max-width: 900px) {
    .os-group {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ---------- 上傳文件 ---------- */
.cs-uploader {
    position: relative;
}

.cs-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 26px 16px;
    border: 1.5px dashed #c9bfa6;
    border-radius: 10px;
    background: #fbfaf6;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cs-drop svg {
    width: 30px;
    height: 30px;
    color: var(--secondary-color);
}

.cs-drop strong {
    font-size: 0.95rem;
    color: var(--primary-color);
}

.cs-drop span {
    font-size: 0.8rem;
    color: #7a848d;
}

.cs-drop:hover,
.cs-uploader.is-dragover .cs-drop,
.cs-uploader:focus-within .cs-drop {
    border-color: var(--secondary-color);
    background: #f6f1e4;
}

.cs-field.is-invalid .cs-drop {
    border-color: #b3261e;
}

.cs-file-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cs-file-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.cs-file-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #ebe7de;
    border-radius: 8px;
    font-size: 0.86rem;
}

.cs-file-list li + li {
    margin-top: 6px;
}

.cs-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #33414e;
}

.cs-file-size {
    color: #7a848d;
}

.cs-file-remove {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: #f1ede4;
    color: #6b5a33;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.cs-file-remove:hover {
    background: #e6dcc6;
}

.cs-file-list li.cs-file-total,
.cs-file-list li.cs-file-msg {
    border: 0;
    padding: 4px 2px 0;
    font-size: 0.78rem;
    color: #7a848d;
}

.cs-file-list li.cs-file-msg {
    color: #b3261e;
}

/* 總覽頁：卡片顏色加深，不要太淡 */
.os-section-bg {
    background: #f6f3ec;
}

.os-group {
    border-top-color: #e0d7c3;
}

.os-group-head h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 12px;
    background: var(--secondary-color);
}

.os-group-head p {
    color: #4f5b66;
}

.os-card {
    border-color: #e0d7c3;
    box-shadow: 0 8px 24px -12px rgba(15, 42, 68, 0.18);
}

.os-card::before {
    width: 48px;
    height: 3px;
}

.os-card p {
    color: #4f5b66;
}

.os-go {
    display: inline-flex;
    align-self: flex-start;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    transition: background 0.3s ease;
}

.os-card:hover .os-go {
    background: var(--secondary-color);
}

.os-card::before {
    left: 22px;
    background: var(--secondary-color);
}

.os-card:hover::before {
    left: 0;
}

.cs-track {
    margin: 0 auto 16px !important;
    font-size: 0.88rem !important;
}

.cs-track a {
    color: var(--primary-color);
    font-weight: 600;
}

.cs-form-head .cs-form-no {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: #7a848d;
}

.cs-form-head .cs-form-no b {
    color: var(--primary-color);
}

/* ---------- 小標題、可以新增多筆的清單 ---------- */
.cs-subhead {
    grid-column: 1 / -1;
    margin: 14px 0 -4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ebe7de;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.cs-subhead:first-child {
    margin-top: 0;
}

.cs-repeat > legend {
    margin-bottom: 4px;
}

.cs-repeat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-repeat-item {
    padding: 16px 18px 18px;
    border: 1px solid #e3ddcf;
    border-radius: 12px;
    background: #fbfaf6;
}

.cs-repeat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cs-repeat-head strong {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9c7c3c;
}

.cs-repeat-remove {
    padding: 5px 12px;
    border: 1px solid #e3c9c6;
    border-radius: 999px;
    background: #fff;
    color: #a0332b;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.cs-repeat-remove:hover {
    background: #fdecea;
}

.cs-repeat-item .cs-grid {
    gap: 14px 18px;
}

.cs-repeat-add {
    align-self: flex-start;
    margin-top: 10px;
    padding: 10px 18px;
    border: 1.5px dashed var(--secondary-color);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-color);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cs-repeat-add:hover {
    background: #faf3e2;
}

.cs-field.cs-repeat.is-invalid > .cs-error {
    display: block;
}

/* 小標題下面的清單：標籤跟小標題重複，畫面上隱藏（預覽和送出的資料照樣用） */
.cs-subhead + .cs-repeat > legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ===== 表格獨立一頁（online-xxx-form.html） ===== */
.hero.hero-compact {
    min-height: 300px;
}

.cs-start-band {
    padding-top: 0;
    text-align: center;
}

.cs-start.cs-start-big {
    display: inline-block;
    padding: 16px 44px;
    border-radius: 999px;
    background: var(--secondary-color);
    color: #1e2938;
    font-weight: 600;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 26px rgba(201, 169, 97, 0.3);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-start.cs-start-big:hover {
    background: #d8bd7e;
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 14px 32px rgba(201, 169, 97, 0.4);
}

.cs-form-section {
    padding-top: 40px;
}

.cs-form-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    max-width: 860px;
    margin: 0 auto 14px;
}

.cs-back {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.cs-back:hover {
    color: #9c7c3c;
}

.cs-form-fee {
    padding: 7px 16px;
    border: 1px solid #e3ddcf;
    border-radius: 999px;
    background: #faf8f3;
    font-size: 0.85rem;
    color: #5f6b76;
}

.cs-form-fee b {
    color: var(--primary-color);
}

.cs-prep-mini {
    max-width: 860px;
    margin: 0 auto 18px;
    border: 1px solid #e3ddcf;
    border-radius: 12px;
    background: #faf8f3;
}

.cs-prep-mini summary {
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

.cs-prep-mini ul {
    margin: 0;
    padding: 0 18px 14px 38px;
    font-size: 0.88rem;
    line-height: 1.8;
    color: #4f5b66;
}

/* ===== Matter Details：每一段一張卡片 ===== */
.cs-group {
    grid-column: 1 / -1;
    min-width: 0;
    border: 1px solid #e6e0d2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 22px -14px rgba(15, 42, 68, 0.25);
    overflow: hidden;
}

.cs-group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid #ece6d8;
    background: linear-gradient(180deg, #fbf9f4, #f6f2e9);
}

.cs-group-n {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.35);
}

.cs-group-head .cs-subhead {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.12rem;
}

.cs-group-body {
    padding: 22px;
}

/* 卡片裡第一個就是清單的，清單標題和卡片標題重複，藏起來 */
.cs-group-body > .cs-repeat:first-child > legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cs-group-body .cs-form-note {
    margin: 0;
}

.cs-step > .cs-grid:has(> .cs-group) {
    gap: 18px;
}

@media (max-width: 640px) {
    .cs-group-head {
        padding: 12px 16px;
    }

    .cs-group-body {
        padding: 18px 16px;
    }
}

/* ===== 手機版精簡（線上服務、表格） ===== */
@media (max-width: 768px) {
    /* 四個步驟：每一步一行，數字在左邊 */
    html body .cs-steps-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    html body .cs-steps-row li {
        display: grid;
        grid-template-columns: 34px 1fr;
        column-gap: 10px;
        padding: 14px 16px;
    }

    html body .cs-steps-row li::before {
        grid-row: span 2;
        margin: 0;
        font-size: 1.25rem;
        line-height: 1.2;
    }

    html body .cs-steps-row strong {
        margin-bottom: 2px;
        font-size: 0.92rem;
    }

    html body .cs-steps-row span {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    /* 服務介紹頁 */
    html body .cs-lead {
        font-size: 0.92rem;
    }

    html body .cs-lists {
        gap: 18px;
    }

    html body .cs-lists h3 {
        margin-bottom: 8px;
        font-size: 1rem;
    }

    html body .cs-lists li {
        font-size: 0.86rem;
        line-height: 1.6;
    }

    html body .cs-card {
        padding: 22px 18px;
    }

    html body .cs-card dd {
        font-size: 1.15rem;
    }

    html body .cs-card dd small {
        font-size: 0.76rem;
    }

    html body .cs-note {
        margin-top: 18px;
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    html body .cs-start.cs-start-big {
        padding: 13px 34px;
        font-size: 0.92rem;
    }

    /* 線上服務總覽：卡片緊湊一點 */
    html body .os-group {
        gap: 14px;
        margin-bottom: 26px;
    }

    html body .os-group-head h3 {
        font-size: 1.3rem;
    }

    html body .os-group-head p {
        font-size: 0.85rem;
    }

    html body .os-cards {
        gap: 12px;
    }

    /* 每個服務變成一行：左邊名稱和價錢，右邊箭頭 */
    html body .os-card {
        display: block;
        padding: 14px 58px 14px 16px;
    }

    html body .os-card strong {
        display: block;
        font-size: 1rem;
        line-height: 1.3;
    }

    html body .os-sub {
        display: block;
        margin-top: 2px;
        font-size: 0.64rem;
    }

    html body .os-card p {
        display: none;
    }

    html body .os-price {
        display: block;
        margin: 6px 0 0;
        font-size: 0.88rem;
    }

    html body .os-price small {
        display: inline;
        margin-left: 6px;
        font-size: 0.7rem;
    }

    html body .os-go {
        position: absolute;
        top: 50%;
        right: 14px;
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        font-size: 0;
        transform: translateY(-50%);
    }

    html body .os-go .arrow {
        font-size: 0.95rem;
    }

    /* 表格 */
    html body .cs-form-section {
        padding-top: 22px;
    }

    html body .cs-form-head {
        padding: 18px 18px 16px;
    }

    html body .cs-form-head strong {
        font-size: 1.25rem;
    }

    html body .cs-progress li {
        font-size: 0.68rem;
    }

    html body .cs-step h3 {
        margin-bottom: 16px;
        font-size: 0.74rem;
    }

    html body .cs-grid {
        gap: 14px 16px;
    }

    html body .cs-field label,
    html body .cs-field legend {
        font-size: 0.82rem;
    }

    /* 輸入框保持 16px，iPhone 才不會自動放大畫面 */
    html body .cs-field input[type="text"],
    html body .cs-field input[type="email"],
    html body .cs-field input[type="tel"],
    html body .cs-field input[type="number"],
    html body .cs-field input[type="date"],
    html body .cs-field select,
    html body .cs-field textarea {
        padding: 9px 12px;
        font-size: 16px;
    }

    html body .cs-field textarea {
        min-height: 84px;
    }

    html body .cs-options {
        gap: 6px;
    }

    html body .cs-options label {
        gap: 6px;
        padding: 7px 12px;
        font-size: 0.82rem;
    }

    html body .cs-desc,
    html body .cs-hint {
        font-size: 0.76rem;
    }

    html body .cs-group-head {
        padding: 10px 14px;
    }

    html body .cs-group-n {
        width: 24px;
        height: 24px;
        font-size: 0.72rem;
    }

    html body .cs-group-head .cs-subhead {
        font-size: 1rem;
    }

    html body .cs-group-body {
        padding: 16px 14px;
    }

    html body .cs-repeat-item {
        padding: 14px 12px;
    }

    html body .cs-drop {
        padding: 18px 14px;
    }

    html body .cs-form-top {
        margin-bottom: 10px;
    }

    html body .cs-prep-mini {
        margin-bottom: 12px;
    }
}
/* ===== 手機版精簡結束 ===== */

/* 價錢的數字對齊（Playfair 預設的數字高低不一） */
.cs-card dd.cs-fee,
.cs-form-fee b,
.cs-pay-box strong {
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: "lnum" 1, "tnum" 1;
}

.cs-card dd.cs-fee {
    font-size: 1.45rem;
    letter-spacing: 0.01em;
}

.cs-card dd.cs-fee small {
    font-size: 0.78rem;
    letter-spacing: 0;
    line-height: 1.55;
}

/* ===== 手機：步驟條只顯示數字＋連接線，目前那一步才顯示名稱 ===== */
@media (max-width: 768px) {
    html body .cs-progress {
        display: flex;
        align-items: center;
        padding: 12px 16px;
    }

    html body .cs-progress li {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        padding: 4px 0;
        font-size: 0;
        white-space: nowrap;
    }

    html body .cs-progress li:last-child {
        flex: 0 0 auto;
    }

    html body .cs-progress li span {
        flex: 0 0 auto;
        width: 26px;
        height: 26px;
        margin: 0;
        font-size: 0.74rem;
        background: #fff;
    }

    /* 連接線 */
    html body .cs-progress li::after,
    html body .cs-progress li.is-current::after {
        position: static;
        flex: 1 1 auto;
        min-width: 10px;
        height: 1.5px;
        margin: 0 8px;
        border-radius: 2px;
        background: #e1dccf;
    }

    html body .cs-progress li:last-child::after {
        content: none;
    }

    html body .cs-progress li.is-done span {
        border-color: var(--primary-color);
        background: var(--primary-color);
        color: #fff;
    }

    html body .cs-progress li.is-done::after {
        background: var(--primary-color);
    }

    html body .cs-progress li.is-current span {
        margin-right: 7px;
        border-color: var(--secondary-color);
        background: var(--secondary-color);
        color: #fff;
        box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.2);
    }

    /* 目前那一步顯示名稱 */
    html body .cs-progress li.is-current {
        font-size: 0.8rem;
        color: var(--primary-color);
    }

    html body .cs-progress.is-clickable li:hover {
        background: none;
    }
}

/* 線上服務列表的箭頭：淺色圓圈＋細箭頭 */
@media (max-width: 768px) {
    html body .os-go {
        width: 32px;
        height: 32px;
        border: 1px solid #e3ddcf;
        background: #faf8f3;
        box-shadow: none;
    }

    html body .os-go .arrow {
        display: none;
    }

    html body .os-go::after {
        content: '';
        width: 7px;
        height: 7px;
        margin-left: -3px;
        border-top: 1.5px solid var(--primary-color);
        border-right: 1.5px solid var(--primary-color);
        transform: rotate(45deg);
        transition: border-color 0.3s ease;
    }

    html body .os-card:hover .os-go,
    html body .os-card:active .os-go {
        border-color: var(--secondary-color);
        background: var(--secondary-color);
    }

    html body .os-card:hover .os-go::after,
    html body .os-card:active .os-go::after {
        border-color: #fff;
    }
}

/* 暫時隱藏的價錢（tools/mask_prices.py）：圓點淡一點 */
.pm {
    margin-left: 0.04em;
    letter-spacing: 0.08em;
    opacity: 0.55;
}

/* 遺囑分配：每項資產一張卡，勾受益人、百分比、替補 */
.cs-alloc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-alloc-card {
    padding: 14px 18px 16px;
    border: 1px solid #e3ddcf;
    border-radius: 12px;
    background: #fbfaf6;
}

.cs-alloc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cs-alloc-head strong {
    font-size: 0.95rem;
    color: var(--primary-color);
}

.cs-alloc-split {
    flex-shrink: 0;
    padding: 4px 12px;
    border: 1px solid #d9cba6;
    border-radius: 999px;
    background: #fff;
    color: #8a6d25;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.cs-alloc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.cs-alloc-row:hover {
    background: #f4efe2;
}

.cs-alloc-row.is-on {
    background: #f6eedb;
}

.cs-field.cs-alloc .cs-alloc-row > input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--secondary-color);
}

.cs-alloc-row > span:first-of-type {
    flex: 1;
    min-width: 0;
}

.cs-alloc-pct {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #777;
    font-size: 0.85rem;
}

.cs-field.cs-alloc .cs-alloc-pct input {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid #d9d2c2;
    border-radius: 6px;
    font: inherit;
    text-align: right;
}

.cs-field.cs-alloc .cs-alloc-pct input:disabled {
    background: transparent;
    border-color: transparent;
}

.cs-alloc-foot {
    min-height: 1em;
    padding: 0 10px;
    text-align: right;
    font-size: 0.8rem;
    color: #6b8f5e;
}

.cs-alloc-total.is-off {
    color: #a0332b;
    font-weight: 600;
}

.cs-alloc-sub {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed #e3ddcf;
    font-size: 0.85rem;
    color: #555;
}

.cs-field.cs-alloc .cs-alloc-sub select {
    padding: 8px 10px;
    border: 1px solid #d9d2c2;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

.cs-alloc-empty {
    padding: 12px 14px;
    border: 1px dashed #d9cba6;
    border-radius: 10px;
    color: #8a7a55;
    font-size: 0.88rem;
}

.cs-field.cs-alloc.is-invalid > .cs-error {
    display: block;
}

/* 服務頁大標題下面的一行：寫明服務和地點（給顧客和 Google 看） */
.hero .hero-content .hero-kw { margin-top: 10px; font-size: 0.95rem; opacity: 0.85; letter-spacing: 0.02em; }
