/* QA 修改列表（2026-09-27）新增元件樣式 */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* P0-1 載入骨架與錯誤 */
.qa-skeleton{display:grid;gap:16px}
.qa-skeleton>div,.qa-sk-stats>div{background:linear-gradient(90deg,#eceee9 0%,#f6f7f4 50%,#eceee9 100%);background-size:200% 100%;animation:qa-shimmer 1.3s linear infinite;border-radius:16px}
.qa-sk-head{height:64px;width:min(420px,70%)}
.qa-sk-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;background:none!important;animation:none!important}
.qa-sk-stats>div{height:96px}
.qa-sk-panel{height:220px}
.qa-sk-panel.short{height:140px}
@keyframes qa-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.qa-skeleton>div,.qa-sk-stats>div{animation:none}}
@media(max-width:900px){.qa-sk-stats{grid-template-columns:1fr 1fr}}
.qa-load-error{padding:28px 24px;display:grid;gap:10px;justify-items:start}
.qa-load-error h2{margin:0;font-size:19px}
.qa-load-error p{margin:0;color:var(--muted);line-height:1.6}
.cloud-sync-warning.syncing{background:var(--mint);color:var(--green2)}

/* P2-1 共用確認視窗 */
.ui-confirm-back{z-index:95;place-items:center}
.ui-confirm{width:min(440px,100%);border-radius:18px}
.ui-confirm .modal-head{position:static}
.ui-confirm #ui-confirm-body{margin:0 0 18px;line-height:1.65;white-space:pre-line;color:var(--ink)}
.ui-confirm-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.danger-btn{border:0;background:var(--red);color:#fff;border-radius:12px;padding:12px 17px;font-weight:800}
@media(hover:hover) and (pointer:fine){.danger-btn:hover{background:#9c3a32}}

/* P0-2 處理中按鈕 */
button.is-busy{cursor:progress;opacity:.75;position:relative}
button.is-busy::before{content:"";display:inline-block;width:12px;height:12px;margin-right:7px;vertical-align:-1px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:qa-spin .8s linear infinite}
@keyframes qa-spin{to{transform:rotate(360deg)}}

/* 欄位錯誤（P1-5、P1-7） */
.field-error{display:block;color:var(--red);font-size:13px;font-weight:700;margin-top:6px}
.form-field input[aria-invalid="true"],.form-field select[aria-invalid="true"],.form-field textarea[aria-invalid="true"]{border-color:var(--red);box-shadow:0 0 0 3px #b4473e1f}

/* P0-4 規格預覽 */
.note-specs{white-space:pre-line}
.variant-preview{border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin:0 0 14px;background:#fff}
.variant-preview h4{margin:0 0 8px;font-size:14px}
.variant-preview p{margin:0 0 8px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.variant-preview p b{margin-right:4px;font-size:13px}
.variant-preview small{color:var(--muted)}
.option-chip{display:inline-block;padding:4px 9px;border-radius:99px;background:var(--mint);color:var(--green2);font-size:12px;font-weight:800}
.variant-warning{display:block!important;background:#fde9e6;color:var(--red);border-radius:10px;padding:9px 11px;font-size:13px;font-weight:700;line-height:1.5}
.note-progress-two{grid-template-columns:auto 1fr auto!important}

/* P0-5 鎖定原因 */
.cloud-fulfillment-row.is-locked{opacity:.78}
.row-lock-reason{display:block;grid-column:1/-1;color:#84511d;font-size:12px;font-weight:700;line-height:1.5}
.notice.warn{background:#fde9e6;color:var(--red)}

/* P2-2 危險操作區 */
.danger-zone{margin-top:22px;padding-top:16px;border-top:1px dashed #e6c7c2;display:flex;align-items:center;justify-content:space-between;gap:12px}
.danger-zone b{display:block;font-size:14px}
.danger-zone small{color:var(--muted);font-size:12px}
.danger-zone .danger-outline{flex:none;width:auto;padding:10px 14px}
.admin-note-lists{margin:6px 0 10px;color:var(--muted);font-size:13px}
.badge.green{background:var(--mint);color:var(--green2)}

/* P1-1 加入清單 */
.qa-list-choice{width:100%;text-align:left;border:1px solid var(--line);border-radius:12px;background:#fff;margin-bottom:8px;padding:12px 14px;display:flex;align-items:center;gap:12px}
.qa-list-choice:disabled{opacity:.6;cursor:default}

/* P1-4 筆記詳情操作 */
.admin-note-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.admin-note-actions>button{width:auto;flex:1 1 120px;margin:0}
.switch-row{display:flex;align-items:center;gap:10px;margin-top:14px;font-weight:700}
.switch-row .switch{display:inline-block;flex:none}
.saved-flag{color:var(--green2);font-weight:800}

/* P1-9 電話 */
.order-contact a{color:var(--green2);font-weight:800}
.link-btn{border:0;background:none;padding:0 2px;color:var(--green2);font-weight:800;text-decoration:underline;cursor:pointer;font-size:inherit}

/* P1-10 請款預覽 */
.billing-preview-total{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:var(--cream);font-weight:800}
.notice.ok{background:var(--mint);color:var(--green2)}
.checkout-summary{margin-top:12px}

/* P1-12 待聯絡事件 */
.qa-events-panel .qa-event-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 20px;border-bottom:1px solid var(--line)}
.qa-events-panel .qa-event-row>div{min-width:0}
.qa-events-panel .qa-event-row small{display:block;color:var(--muted);margin-top:3px;line-height:1.5}
.qa-events-panel .qa-event-row.done{opacity:.65}
.qa-events-done summary{padding:12px 20px;cursor:pointer;color:var(--muted);font-weight:700}

/* P2-10 設定頁欄位與卡片標題對齊 */
.settings-section>.settings-fields,.settings-section>.connection-row{margin-left:20px;margin-right:20px}
.settings-section>.settings-fields{padding-top:16px}

/* P2-11 數字字型一致；按鈕依內容寬度 */
.metric-card strong,.stat strong,.battle-hero b,.order-money strong{font-family:Inter,"Noto Sans TC","PingFang TC",system-ui,sans-serif;font-variant-numeric:tabular-nums}
[data-refreshinventory]{width:auto;margin-top:0;flex:none}

/* P2-12 toast 在底部導覽上方，不蓋住頁首按鈕 */
.toast{top:auto;bottom:88px;transform:translate(-50%,20px)}
.toast.show{transform:translate(-50%,0)}

/* ---------- 手機版版面（M-1～M-6） ---------- */
.main,.main>*{min-width:0}
.tabs{max-width:100%}
.note-category-toolbar{display:block}
.note-category-toolbar .tabs{flex-wrap:wrap;overflow:visible;margin-bottom:0}
.add-category-tab{min-width:42px;color:var(--green);font-size:20px;line-height:1;padding:8px 12px}
.add-category-form{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0 16px}
.add-category-form label{font-size:13px;font-weight:800}
.add-category-form input{width:min(230px,100%);border:1px solid var(--line);border-radius:10px;background:#fff;padding:9px 11px}
.add-category-form .small-btn{white-space:nowrap}
.admin-note-card .library-meta{grid-template-columns:minmax(0,1fr)}
@media(max-width:560px){
 /* M-1 訂單篩選列只在自己那一列橫向捲動 */
 .main .tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .batch-shipping-entry{flex-wrap:wrap;gap:8px}
 .order-card{grid-template-columns:minmax(0,1fr)}
 .order-money{text-align:left}
 .empty{padding:28px 12px;overflow-wrap:anywhere}
 /* M-2 清單頁標題區兩列堆疊 */
 .list-page-head{flex-direction:column;align-items:stretch}
 .list-head-actions .primary,.list-head-actions .month-filter,.list-head-actions select{width:100%}
 .list-row{grid-template-columns:auto minmax(0,1fr)!important;flex-wrap:wrap}
 .list-row>*{min-width:0}
 .list-row .badge{justify-self:start}
 /* M-3 訂單明細：金額換到品名下方 */
 .detail-modal .cart-line{grid-template-columns:minmax(0,1fr)}
 .detail-modal .cart-line>b{justify-self:start}
 .detail-modal .cart-line b,.detail-modal .cart-line small{overflow-wrap:anywhere}
 .modal{overflow-x:hidden}
 .cloud-billing-line,.cloud-invoice-row{flex-wrap:wrap}
 /* M-4 新增筆記：標題不折行，下一步移到底部固定列 */
 .note-flow-head{flex-direction:column}
 .note-flow-head h1{white-space:nowrap;font-size:24px}
 .note-flow-head .text-back{white-space:nowrap}
 .note-flow-head>.primary{display:none}
 .flow-actions{position:sticky;bottom:64px;z-index:5;background:var(--paper);padding:10px 0;margin:0;display:flex;gap:8px;border-top:1px solid var(--line)}
 .flow-actions>*{flex:1}
 /* M-5 筆記列表：新增按鈕不折行 */
 .page-head .primary,.page-head [data-newnote]{white-space:nowrap}
 .page-head{gap:12px}
 .page-head>div{min-width:0}
 .danger-zone{flex-direction:column;align-items:stretch}
 .admin-note-actions>button{flex:1 1 100%}
 .ui-confirm-actions>button{flex:1}
}

/* 顧客視角預覽 */
.customer-preview-back{place-items:center}
.customer-preview-modal{width:min(510px,100%);height:min(94vh,900px);max-height:none;position:relative;overflow:hidden;padding:0;border-radius:22px;background:#fff}
.customer-preview-frame{display:block;width:100%;height:100%;border:0;background:#fff}
.customer-preview-close{position:absolute;top:10px;right:10px;z-index:3;width:38px;height:38px;box-shadow:0 2px 12px #0002}
.preview-banner{position:sticky;top:0;z-index:40;background:#fff3de;color:#84511d;font-size:13px;font-weight:800;text-align:center;padding:8px 55px 8px 12px;border-bottom:1px solid #f0d9b5}
@media(max-width:560px){.customer-preview-back{padding:0}.customer-preview-modal{width:100%;height:100dvh;border-radius:0}.customer-preview-close{top:8px;right:8px}}

/* 示範商品載入按鈕 */
.demo-import-btn{width:auto;margin:0 8px 0 0;padding:11px 15px}
.page-head>.demo-import-btn+.primary{margin-left:0}
@media(max-width:560px){.demo-import-btn{padding:10px 12px;font-size:14px}}

/* 分類管理 */
.tab-count{display:inline-block;margin-left:6px;min-width:18px;padding:0 6px;border-radius:99px;background:#0000000f;font-size:12px;line-height:18px;text-align:center}
.tab.active .tab-count{background:#ffffff33}
.manage-category-tab{color:var(--green)}
.category-manager{width:min(520px,100%)}
.category-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}
.category-row>div:first-child{min-width:0;display:grid;gap:3px}
.category-row small{color:var(--muted);font-size:12px}
.category-row select,.category-row input{border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:#fff;font:inherit;min-width:0}
.category-row.editing input,.category-row.adding input{flex:1}
.category-row.deleting{background:#fdf2f0;margin:0 -12px;padding:12px;border-radius:12px;border-bottom:0}
.category-row.adding{border-bottom:0;padding-top:16px}
.category-actions{display:flex;gap:6px;flex:none;flex-wrap:wrap;justify-content:flex-end}
.small-btn.icon-only{width:34px;padding:7px 0;text-align:center}
.small-btn:disabled{opacity:.4;cursor:not-allowed}
.small-btn.danger-text{color:var(--red);border-color:#ecc7c1}
.small-btn.danger-fill{background:var(--red);color:#fff;border-color:var(--red)}
@media(max-width:560px){.category-row{flex-wrap:wrap}.category-actions{width:100%;justify-content:flex-start}}

/* 筆記庫月份檢索 */
.note-month-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.note-month-filter select{appearance:none;-webkit-appearance:none;border:1px solid var(--line);border-radius:12px;background:#fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317211d' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;padding:10px 40px 10px 14px;font:inherit;font-weight:800;min-width:190px;cursor:pointer}
.note-month-bar small{color:var(--muted);font-size:13px}
@media(max-width:560px){.note-month-filter,.note-month-filter select{width:100%}}

/* 月份選單移到頁首「＋ 新增筆記」左邊 */
.note-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.note-head-actions .demo-import-btn{margin:0}
.note-head-actions .note-month-filter select{min-width:0;padding-top:11px;padding-bottom:11px}
@media(max-width:560px){.page-head:has(.note-head-actions){flex-direction:column;align-items:stretch}.note-head-actions{justify-content:stretch}.note-head-actions>*{flex:1 1 auto}.note-head-actions .note-month-filter{flex-basis:100%}}
.note-head-actions .note-month-filter{padding:0;border:0;background:none;box-shadow:none;margin:0}
.note-head-actions .note-month-filter select{height:47px;padding-top:0;padding-bottom:0}

/* 清單詳情商品列：縮圖＋品名＋分類與批發價＋已銷售 */
.demand-row.list-product-row{grid-template-columns:72px minmax(0,1fr) auto;gap:16px;padding:14px 0}
.list-product-thumb{width:72px;height:72px;border-radius:12px;object-fit:cover;background:#eeece6;display:block}
.list-product-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.list-product-copy b{font-size:17px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.list-product-copy small{color:var(--muted);font-size:14px}
.list-product-copy .list-product-variants{font-size:13px;color:var(--green2)}
.list-product-sold{display:flex;align-items:baseline;gap:8px;white-space:nowrap;padding-right:6px}
.list-product-sold small{color:var(--ink);font-size:14px}
.list-product-sold strong{font-size:20px;font-variant-numeric:tabular-nums}
@media(max-width:560px){.demand-row.list-product-row{grid-template-columns:60px minmax(0,1fr) auto;gap:12px}.list-product-thumb{width:60px;height:60px}.list-product-sold{flex-direction:column;align-items:flex-end;gap:2px}.list-product-sold strong{font-size:17px}}

/* 清單「添加商品筆記」：大圖格狀選擇 */
.note-pick-modal{width:min(880px,100%)}
.note-pick-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.note-pick-toolbar input{flex:1;border:1px solid var(--line);border-radius:12px;padding:11px 14px;font:inherit;background:#fff}
.note-pick-toolbar small{color:var(--muted);white-space:nowrap}
.note-pick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.note-pick-card{position:relative;display:flex;flex-direction:column;border:2px solid transparent;border-radius:16px;background:#fff;box-shadow:0 2px 10px #17211d10;overflow:hidden;cursor:pointer;transition:border-color .15s,box-shadow .15s}
@media(hover:hover) and (pointer:fine){.note-pick-card:hover{box-shadow:0 6px 18px #17211d1c}}
.note-pick-card input{position:absolute;opacity:0;pointer-events:none}
.note-pick-card img{width:100%;aspect-ratio:1/1;object-fit:cover;object-position:center 25%;background:#eeece6;display:block}
.note-pick-copy{display:flex;flex-direction:column;gap:6px;padding:12px 14px 14px}
.note-pick-copy small{color:var(--muted);font-size:12px;font-weight:700}
.note-pick-copy b{font-size:15px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.8em}
.note-pick-copy strong{font-size:17px;font-variant-numeric:tabular-nums}
.note-pick-check{position:absolute;top:10px;right:10px;width:28px;height:28px;border-radius:8px;background:#ffffffd9;border:2px solid #ffffff;box-shadow:0 1px 6px #0003}
.note-pick-card:has(input:checked){border-color:var(--green)}
.note-pick-card:has(input:checked) .note-pick-check{background:var(--green) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M1.5 6l4.5 4.5L14.5 1.5' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") no-repeat center;border-color:var(--green)}
.note-pick-card:has(input:focus-visible){outline:3px solid #245844aa;outline-offset:2px}
.note-pick-footer{position:sticky;bottom:-17px;background:#fff;padding:12px 0 4px;margin-top:14px;border-top:1px solid var(--line)}
.note-pick-footer .notice{margin:0 0 10px}
.note-pick-footer .add{margin-top:0}
.note-pick-footer .add:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:560px){.note-pick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.note-pick-copy{padding:10px}.note-pick-copy b{font-size:14px}}

/* 清單預覽：只展示版頭與清單商品 */
.qa-preview .topbar,.qa-preview .cartbar,.qa-preview .client-list-switcher,.qa-preview .preview-banner{display:none!important}
.qa-preview .phone-wrap{min-height:100vh;padding:12px 12px 24px}
.qa-preview .phone-page{min-height:0}

/* 客戶端商品筆記：參考社群雜誌式版面 */
.lucide{display:inline-block;width:1.25em;height:1.25em;vertical-align:-.2em;pointer-events:none}
.note-reference-page{background:#fff}
.note-reference-top{height:82px;top:68px;padding:0 24px;border-bottom:0;gap:14px}
.note-reference-top .note-back,.note-reference-top .note-share{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;padding:0;border:0;background:transparent;color:#303332;cursor:pointer}
.note-reference-top .note-back{font-size:28px;line-height:1;border-radius:0}
.note-reference-top .note-share .lucide{width:28px;height:28px}
.note-reference-top .note-back .lucide{width:30px;height:30px}
.note-reference-top .shop-home-link{display:flex;align-items:center;gap:12px;flex:1;min-width:0}
.note-reference-top .store-logo{width:48px;height:48px;border-radius:50%;font-size:15px;background:#f1f1ef;color:#28332f;box-shadow:none}
.note-reference-top .shop-home-link b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;font-weight:650;letter-spacing:.01em}
.note-reference-gallery{position:relative;background:#eceeea}
.note-reference-gallery{overflow:hidden}
.note-reference-gallery .note-main-image{height:auto;aspect-ratio:4/5;background-position:center;background-size:cover;touch-action:pan-y;cursor:grab;transition:background-image .2s ease,transform .18s ease}
.note-reference-gallery .note-main-image:active{cursor:grabbing}
.note-reference-gallery .note-main-image:focus-visible{outline:3px solid #ef3151;outline-offset:-3px}
.note-reference-dots{position:static;transform:none;justify-content:center;gap:7px;padding:13px 0 11px;background:#fff;border-radius:0}
.note-reference-dots button{width:7px;height:7px;background:#c8c8c8}
.note-reference-dots button.active{width:7px;background:#ef3151;border-radius:50%}
.note-reference-content{padding:7px 25px 190px}
.note-reference-content .note-reference-meta{color:#858987;font-size:12px;font-weight:700;letter-spacing:.04em;margin:0 0 8px}
.note-reference-content h1{font-family:inherit;font-size:25px;line-height:1.25;font-weight:750;letter-spacing:-.02em;margin:0 0 12px}
.note-reference-copy p{font-size:15px;line-height:1.55;margin:0 0 11px;color:#373a39;white-space:pre-line}
.note-reference-content .note-transaction-bar{position:fixed;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:24;width:min(462px,calc(100% - 32px));min-height:112px;margin:0;padding:20px 22px;border-radius:22px;box-shadow:0 16px 42px #17211d26;background:#f8f4eb}
.note-transaction-bar h2{font-size:25px;margin:0 0 6px}
.note-transaction-bar p{font-size:15px;margin:0;color:#6f7a75}
.note-transaction-bar>.primary{flex:none;min-width:132px;min-height:58px;font-size:18px;border-radius:14px}
.note-transaction-bar .note-buy-actions{flex-direction:row;align-items:center}
.note-transaction-bar .note-buy-actions .primary{min-height:46px;white-space:nowrap}
.note-reference-shell>.cartbar{bottom:calc(144px + env(safe-area-inset-bottom));z-index:25}
@media(max-width:560px){
 .note-reference-shell>.topbar{display:none}
 .note-reference-top{top:0;height:76px;padding:0 18px}
 .note-reference-top .store-logo{width:44px;height:44px}
 .note-reference-gallery .note-main-image{max-height:none;height:auto;aspect-ratio:4/5}
 .note-reference-content{padding:6px 20px 190px}
 .note-reference-content h1{font-size:24px}
 .note-reference-copy p{font-size:14px;line-height:1.55}
 .note-reference-content .note-transaction-bar{width:calc(100% - 24px);min-height:104px;bottom:max(10px,env(safe-area-inset-bottom));padding:17px 18px;align-items:center;flex-direction:row}
 .note-transaction-bar h2{font-size:23px}
 .note-transaction-bar>.primary{min-width:120px;min-height:56px}
 .note-transaction-bar .note-buy-actions{flex-direction:column;align-items:stretch;gap:5px}
 .note-transaction-bar .note-buy-actions .qty{align-self:flex-end}
 .note-transaction-bar .note-buy-actions .primary{min-height:40px;padding:9px 12px}
 .note-reference-shell>.cartbar{bottom:calc(126px + env(safe-area-inset-bottom))}
}

/* 全站字體：統一使用黑體／無襯線字族 */
:root{font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body,button,input,textarea,select{font-family:inherit}
h1,h2,h3,h4,h5,h6,.page-head h1,.hero h1,.note-content h1{font-family:inherit}

/* 客戶端商品卡：精簡資訊與高度 */
.customer-list-page .product,.client-store-home .product{margin-bottom:10px;border-radius:15px}
.customer-list-page .product-image,.client-store-home .product-image{height:280px}
.customer-list-page .product-thumbs,.client-store-home .product-thumbs{gap:6px;padding:7px 11px 0}
.customer-list-page .product-thumb,.client-store-home .product-thumb{width:40px;height:40px;border-radius:8px}
.customer-list-page .product-body,.client-store-home .product-body{padding:11px 13px 13px}
.customer-list-page .product h3,.client-store-home .product h3{font-size:17px;line-height:1.35;margin:3px 0 5px}
.customer-list-page .product .desc,.client-store-home .product .desc{display:none}
.customer-list-page .product .read-note,.client-store-home .product .read-note{display:none}
.customer-list-page .product .price-row,.client-store-home .product .price-row{align-items:center;margin-top:10px}
.customer-list-page .product .price strong,.client-store-home .product .price strong{font-size:18px}
.customer-list-page .product .price small,.client-store-home .product .price small{display:none}
.customer-list-page .product .add,.customer-list-page .product .variant,.client-store-home .product .add,.client-store-home .product .variant{margin-top:8px;padding:9px}
@media(max-width:560px){.customer-list-page .product-image,.client-store-home .product-image{height:245px}}

/* 客戶端「我的」帳號與訂單管理 */
.my-account-button{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.my-account-button .lucide{width:21px;height:21px}
.my-account-modal{width:min(620px,100%)}
.line-account-card{display:flex;align-items:center;gap:13px;padding:15px;border-radius:16px;background:#f3f7f4;margin-bottom:18px}
.line-account-card>.lucide{width:40px;height:40px;color:var(--green)}
.line-account-card>div{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0}
.line-account-card small,.my-order-row small{color:var(--muted)}
.my-profile-form{padding-bottom:20px;border-bottom:1px solid var(--line)}
.my-profile-form .add{margin-top:4px}
.my-order-management{padding-top:8px}
.my-order-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 2px;border-bottom:1px solid var(--line)}
.my-order-row>div{display:flex;flex-direction:column;gap:4px}
.my-order-row strong{white-space:nowrap}
.my-summary-card{overflow:hidden;border-radius:22px;border:1px solid #dce2de;background:#fff;box-shadow:0 10px 30px #17211d12}
.my-summary-card>header{padding:24px;background:#0d3b2e;color:#fff}
.my-summary-card>header span{display:block;color:#ff942f;font-weight:800;margin-bottom:10px}
.my-summary-card>header h3{font-size:27px;line-height:1.25;margin:0 0 8px}
.my-summary-card>header p{margin:0;color:#d9e5e0;font-size:17px}
.my-summary-orders{padding:0 20px}
.remittance-notice{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px;background:#fff7e6;border-top:1px solid #f0dfbb}
.remittance-notice>div{display:flex;flex-direction:column;gap:5px}
.remittance-notice b{font-size:18px}
.remittance-notice p{margin:0;color:#6c4a18;line-height:1.5}
.remittance-notice small{color:#31705b}
.remittance-notice .primary{flex:none;white-space:nowrap}
.remittance-notice .primary:disabled{background:#8ca197;cursor:default}
@media(max-width:560px){.my-summary-card>header{padding:20px}.my-summary-card>header h3{font-size:24px}.remittance-notice{align-items:stretch;flex-direction:column}.remittance-notice .primary{width:100%}}

/* 筆記圖片輪播：圖片跟手橫移，放開後整頁吸附 */
.note-gallery-track{display:flex;width:100%;aspect-ratio:4/5;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;touch-action:auto;cursor:grab;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.note-gallery-track::-webkit-scrollbar{display:none}
.note-gallery-track.dragging{cursor:grabbing;scroll-behavior:auto;scroll-snap-type:none;user-select:none}
.note-gallery-track img{display:block;flex:0 0 100%;width:100%;height:100%;object-fit:cover;object-position:center;scroll-snap-align:start;scroll-snap-stop:always;user-select:none}
.note-gallery-track:focus-visible{outline:3px solid #ef3151;outline-offset:-3px}
.note-image-counter{position:absolute;top:12px;right:12px;z-index:2;padding:5px 9px;border-radius:999px;background:#17211db8;color:#fff;font-size:12px;font-weight:800;font-variant-numeric:tabular-nums}
@media(max-width:560px){.note-gallery-track{aspect-ratio:4/5}}

/* 清單頁標頭（Figma 13:456）：滿版深綠、收單時間置頂、標題與介紹 */
.customer-list-page{padding-top:0}
.customer-list-page .list-campaign-hero{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;gap:14px;margin:0 0 14px;padding:55px 38px 64px;border:0;border-radius:0;background:#003f2f;color:#fff;box-shadow:0 1px 0 #dfe4df}
.customer-list-page .list-campaign-hero::before{content:"";position:absolute;z-index:-1;width:180px;height:180px;right:-26px;top:-42px;border:30px solid rgba(255,255,255,.03);border-radius:90px;box-sizing:border-box}
.customer-list-page .list-campaign-hero::after{content:none}
.list-deadline-pill{display:inline-flex;align-items:center;min-height:38px;padding:7px 13px;border-radius:10px;background:rgba(255,255,255,.07);color:#fff;font-size:14px;font-weight:800;line-height:normal;white-space:nowrap;font-variant-numeric:tabular-nums}
.customer-list-page .list-campaign-hero h1{max-width:432px;margin:0;color:#fff;font-size:42px;font-weight:900;line-height:50.4px;letter-spacing:.42px}
.customer-list-page .list-campaign-hero p{max-width:432px;margin:0;color:#f0f6f3;font-size:15px;font-weight:400;line-height:24px}
.phone-page>.list-campaign-hero+.product{margin-top:0}
@media(max-width:560px){
 .customer-list-page .list-campaign-hero{padding:40px 22px 44px}
 .customer-list-page .list-campaign-hero h1{font-size:clamp(30px,8.6vw,42px);line-height:1.2}
}

/* Figma 11:410：清單商品卡片 */
.customer-list-page .product-figma-card,.client-store-home .product-figma-card{overflow:hidden;margin-bottom:10px;border:1px solid #e3e5df;border-radius:15px;background:#fff;box-shadow:none}
@media(hover:hover) and (pointer:fine){.customer-list-page .product-figma-card:hover,.client-store-home .product-figma-card:hover{transform:none;box-shadow:0 8px 24px rgba(23,33,29,.08)}}
.customer-list-page .product-figma-card .product-image,.client-store-home .product-figma-card .product-image{height:280px;background-color:#e8eae5;background-position:center;background-size:cover}
.customer-list-page .product-figma-card .flag,.client-store-home .product-figma-card .flag{top:12px;left:12px;padding:5px 9px;border-radius:8px;background:#ffdfa4;color:#000;font-size:12px;font-weight:600;line-height:1.5}
.customer-list-page .product-figma-card .image-count,.client-store-home .product-figma-card .image-count{right:16px;bottom:12px;padding:4px 8px;border-radius:99px;background:rgba(23,33,29,.3);font-size:10px;font-weight:600;line-height:1.5}
.customer-list-page .product-figma-card .product-thumbs,.client-store-home .product-figma-card .product-thumbs{height:47px;gap:6px;padding:7px 11px 0;overflow-x:auto}
.customer-list-page .product-figma-card .product-thumb,.client-store-home .product-figma-card .product-thumb{width:40px;height:40px;flex:0 0 40px;padding:0;border:2px solid transparent;border-radius:8px;background:#edf0ec}
.customer-list-page .product-figma-card .product-thumb.active,.client-store-home .product-figma-card .product-thumb.active{border-color:#000}
.customer-list-page .product-figma-card .product-thumb img,.client-store-home .product-figma-card .product-thumb img{width:100%;height:100%;object-fit:cover}
.customer-list-page .product-figma-card .product-body,.client-store-home .product-figma-card .product-body{padding:11px 13px 20px}
.product-figma-card .product-card-row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.product-figma-card .product-card-copy{min-width:0;flex:1}
.product-figma-card .sku{margin:0 0 8px;color:#797979;font-size:12px;font-weight:400;line-height:1.5}
.customer-list-page .product-figma-card h3,.client-store-home .product-figma-card h3{margin:0 0 8px;color:#17211d;font-size:20px;font-weight:600;line-height:1.15;letter-spacing:0}
.customer-list-page .product-figma-card .price strong,.client-store-home .product-figma-card .price strong{display:block;color:#17211d;font-size:14px;font-weight:600;line-height:1.5}
.product-card-add{flex:0 0 127px;width:127px;min-height:44px;margin:0;padding:10px;border:1px solid #000;border-radius:10px;background:#fff;color:#000;font-size:16px;font-weight:600;line-height:1.45;text-align:center}
@media(hover:hover) and (pointer:fine){.product-card-add:hover{background:#f7f7f4}}
.product-card-add:focus-visible{outline:3px solid #24584488;outline-offset:2px}
@media(max-width:560px){
 .customer-list-page .product-figma-card .product-image,.client-store-home .product-figma-card .product-image{height:280px}
}
@media(max-width:380px){
 .product-figma-card .product-card-row{gap:10px}
 .product-card-add{flex-basis:112px;width:112px;padding-inline:7px;font-size:15px}
 .customer-list-page .product-figma-card h3,.client-store-home .product-figma-card h3{font-size:18px}
}

/* 商品卡「加入購物車」已加入件數小氣泡 */
.product-card-add{position:relative;overflow:visible}
.cart-count-badge{position:absolute;top:-14px;right:-12px;display:inline-grid;place-items:center;min-width:32px;height:32px;padding:0 8px;border:2px solid #fff;border-radius:999px;background:#000;color:#fff;font-size:15px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;box-sizing:border-box;animation:cart-badge-pop .22s ease-out}
@keyframes cart-badge-pop{from{transform:scale(.6)}to{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.cart-count-badge{animation:none}}
@media(max-width:560px){.cart-count-badge{top:-12px;right:-10px;min-width:28px;height:28px;font-size:14px}}

/* 購物車（Figma 17:10） */
.cart-modal .modal-body{padding:6px 20px 20px}
.cart-modal .cart-edit-line-variants{display:flex;flex-direction:column;gap:10px;padding:16px 0;border-bottom:1px solid var(--line)}
.cart-modal .cart-edit-line>.cart-variant-heading{display:flex;justify-content:space-between;align-items:center;margin:0;gap:12px;font-size:16px;line-height:1.45}
.cart-modal .cart-variant-heading b{flex:1;min-width:0;font-weight:700}
.cart-modal .cart-variant-heading strong{font-weight:700}
.cart-modal .cart-variant-lines{gap:10px}
.cart-modal .cart-variant-line{flex-direction:row;align-items:center;gap:10px;padding:10px 10px 10px 12px;border:0;border-radius:12px;background:#f6f7f4}
.cart-modal .cart-variant-line>span{min-width:0;gap:2px}
.cart-modal .cart-variant-line>span b{font-size:15px;font-weight:500;line-height:1.45}
.cart-modal .cart-variant-line small{font-size:13px;line-height:1.45}
.cart-modal .cart-edit-actions{gap:6px;flex:none}
.cart-modal .cart-edit-actions button{min-width:34px;height:34px;padding:0;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:18px;font-weight:500;line-height:1}
.cart-modal .cart-edit-actions>b{width:24px;text-align:center;font-size:17px;font-weight:700}
.cart-modal .cart-edit-actions .cart-remove{width:50px;color:var(--red);font-size:15px}
.cart-modal .cart-variant-footer{flex-direction:row;align-items:center;padding:0;border:0}
.cart-modal .cart-variant-footer small{font-size:13px}
.cart-modal .cart-variant-footer>div{width:auto}
.cart-modal .cart-variant-footer .small-btn{padding:0;border:0;background:transparent;color:var(--green);font-size:14px;font-weight:500;line-height:1.45}
@media(hover:hover) and (pointer:fine){.cart-modal .cart-variant-footer .small-btn:hover{text-decoration:underline}}
.cart-modal .summary{display:grid;gap:10px;padding:16px 0;line-height:1.45}
.cart-modal .summary div{align-items:center;font-size:14px}
.cart-modal .summary div span{color:var(--muted)}
.cart-modal .summary div b{color:var(--ink);font-weight:500}
.cart-modal .summary .total{padding-top:10px;border-top:1px solid var(--line);font-weight:700}
.cart-modal .summary .total span{color:var(--ink);font-size:16px}
.cart-modal .summary .total span+span{font-size:20px}
.cart-modal .notice{margin:0;padding:12px 14px;border-radius:12px;font-size:14px;font-weight:500}
.cart-modal .add{margin-top:16px;padding:14px;border-radius:14px;font-size:16px;font-weight:700}
.cart-modal .variant{margin-top:10px;padding:13px;border-width:1.5px;border-radius:14px;font-size:16px;font-weight:700}

/* 我的訂單：可展開的商品明細 */
.my-order-details{display:block;padding:0}
.my-order-details>summary{display:flex;align-items:center;gap:12px;padding:14px 2px;cursor:pointer;list-style:none}
.my-order-details>summary::-webkit-details-marker{display:none}
.my-order-details>summary>div{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.my-order-details>summary strong{white-space:nowrap}
.my-order-details>summary:focus-visible{outline:3px solid #24584466;outline-offset:2px;border-radius:8px}
.my-order-chevron{flex:none;width:20px;height:20px;color:var(--muted);transition:transform .18s ease}
.my-order-details[open] .my-order-chevron{transform:rotate(180deg)}
.my-order-items{display:grid;gap:8px;margin:0 0 14px;padding:0;list-style:none}
.my-order-items li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:12px;background:#f6f7f4}
.my-order-items li>div{display:flex;min-width:0;flex-direction:column;gap:2px}
.my-order-items b{font-size:15px;font-weight:600}
.my-order-items small{color:var(--muted);font-size:13px}
.my-order-items strong{white-space:nowrap;font-size:15px}
@media(prefers-reduced-motion:reduce){.my-order-chevron{transition:none}}

/* 「我的」獨立頁面 */
.my-account-page{padding:0 0 40px;background:#fff}
.my-account-head{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}
.my-account-head h2{margin:0;font-size:22px;line-height:1.3}
.my-account-head small{color:var(--muted);font-size:13px}
.my-account-back{display:inline-grid;flex:none;place-items:center;width:38px;height:38px;padding:0;border:0;border-radius:50%;background:#eef0ed;color:var(--ink);cursor:pointer}
.my-account-back .lucide{width:22px;height:22px}
.my-account-back:focus-visible{outline:3px solid #24584466;outline-offset:2px}
.my-account-body{padding:20px}
.my-order-items li:has(.my-order-item-link){padding:0}
.my-order-item-link{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:0;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
@media(hover:hover) and (pointer:fine){.my-order-item-link:hover{background:#eef0ed}}
.my-order-item-link:focus-visible{outline:3px solid #24584466;outline-offset:2px}
.my-order-item-link>div{display:flex;min-width:0;flex-direction:column;gap:2px}

/* 商品筆記（Figma 21:30） */
.note-reference-top .note-cart{display:grid;flex:0 0 40px;place-items:center;width:40px;height:40px;padding:0;border:0;background:transparent;cursor:pointer}
.note-reference-top .note-cart img{width:28px;height:28px}
.note-reference-top .note-cart+.note-share{margin-left:-6px}
.note-reference-gallery .note-image-counter{background:#17211d80;font-weight:500}
.note-reference-dots button.active{background:#1e1e1e}
.note-reference-content .note-reference-meta{font-weight:500;letter-spacing:0}
.note-reference-copy p{margin:0 0 6px}
.note-tag-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.note-tag-chips span{padding:6px 10px;border-radius:10px;background:#f0f0f0;color:#000;font-size:13px;line-height:21.45px}
.note-tag-chips span.featured{background:#f8f4eb}
.note-reference-content .note-transaction-bar{min-height:0;align-items:center;padding:22px 23px;border:1px solid #eae3d4;box-shadow:none}
.note-reference-content .note-transaction-bar h2{font-size:16px;font-weight:700;margin:0 0 6px}
.note-reference-content .note-transaction-bar p{font-size:14px}
.note-reference-content .note-transaction-bar .primary{background:#282828;font-weight:500}
.note-reference-content .note-transaction-bar>.primary{min-width:0;min-height:58px;padding:0 20px;border-radius:14px;font-size:18px}
@media(max-width:560px){.note-reference-content .note-transaction-bar{min-height:0;padding:18px}.note-reference-content .note-transaction-bar h2{font-size:16px}.note-reference-content .note-transaction-bar>.primary{min-height:56px}}

/* 我的：過往批次（與本批匯總單相同的卡片，訂單預設收合） */
.my-past-batches{display:grid;gap:14px;margin-top:22px}
.my-past-batches>h3{margin:0;font-size:17px}
.my-past-card>header{background:#3f5a50}
.my-past-card>header span{color:#ffd29a}
.my-past-footer{padding:14px 20px;border-top:1px solid var(--line);background:#f6f7f4;color:#31705b;font-size:13px}

/* 我的：底部分頁 */
.my-account-page{padding-bottom:110px}
.my-account-page[data-accounttabview="orders"] .line-account-card,
.my-account-page[data-accounttabview="orders"] .my-profile-form,
.my-account-page[data-accounttabview="orders"] .my-past-batches,
.my-account-page[data-accounttabview="history"] .line-account-card,
.my-account-page[data-accounttabview="history"] .my-profile-form,
.my-account-page[data-accounttabview="history"] .my-order-management>:not(.my-past-batches),
.my-account-page[data-accounttabview="account"] .my-order-management{display:none}
.my-account-page[data-accounttabview="orders"] .my-order-management,
.my-account-page[data-accounttabview="history"] .my-order-management{padding-top:0}
.my-account-page[data-accounttabview="account"] .my-profile-form{border-bottom:0}
.my-account-page[data-accounttabview="history"] .my-past-batches{margin-top:0}
.my-past-batches .empty{margin:0;padding:28px 16px;border:1px dashed var(--line);border-radius:14px;color:var(--muted);text-align:center}
.my-account-tabs{position:fixed;left:50%;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(3,1fr);width:min(510px,100%);padding:8px 12px calc(8px + env(safe-area-inset-bottom));transform:translateX(-50%);border-top:1px solid var(--line);background:#fff;box-shadow:0 -8px 24px #17211d0f}
.my-account-tabs button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 4px;border:0;border-radius:12px;background:transparent;color:#858987;font-size:12px;font-weight:600;cursor:pointer}
.my-account-tabs button .lucide{width:22px;height:22px}
.my-account-tabs button.active{color:var(--green)}
.my-account-tabs button:focus-visible{outline:3px solid #24584466;outline-offset:-3px}
/* 我的：白色頁面延伸到畫面底部（底部分頁列之上） */
.account-shell .phone-wrap{display:flex;flex-direction:column;padding-bottom:0}
.account-shell .my-account-page{flex:1 0 auto;width:100%;min-height:0;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:0 -10px 40px #1d34251a}
.my-past-footer:not(.shipped){color:var(--muted)}

/* 客人端：匯款通知自動帶入帳號資料的帳戶末五碼 */
.remittance-notice .remit-last5-hint{color:#6c4a18}

/* 後台彙總單明細（簡化版） */
.batch-detail .modal-head small{display:block;margin-top:4px;color:var(--muted)}
.batch-detail .modal-head h2 .badge{vertical-align:middle;margin-left:6px}
.batch-step{display:grid;gap:10px;padding:16px;border-radius:14px;background:#f6f7f4}
.batch-step b{font-size:16px}
.batch-step p{margin:0;color:var(--muted);line-height:1.5}
.batch-step.remitted{background:#fff7e6;border:1px solid #f0dfbb}
.batch-step.paid{background:#e5f0e9}
.batch-step.shipped{background:#eef0ed}
.batch-remit{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.batch-remit>div{display:grid;gap:4px;padding:10px 12px;border-radius:10px;background:#fff}
.batch-remit small{color:var(--muted);font-size:12px}
.batch-remit strong{font-size:18px;letter-spacing:.02em}
.batch-step .primary{justify-self:start;min-width:140px}
.batch-ship-form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}
.batch-ship-form .form-field{margin:0}
.batch-section-title{margin:22px 0 8px;font-size:16px}
.batch-lines{width:100%;border-collapse:collapse;font-size:14px}
.batch-lines th{padding:8px 6px;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:600;text-align:left}
.batch-lines td{padding:10px 6px;border-bottom:1px solid var(--line);vertical-align:top}
.batch-lines th:nth-child(4),.batch-lines th:nth-child(5),.batch-lines td:nth-child(4),.batch-lines td:nth-child(5){text-align:right;white-space:nowrap}
.batch-lines .batch-sku{color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.batch-lines tfoot td{border-bottom:0;font-weight:800;font-size:15px}
.batch-orders,.batch-more{margin-top:16px;border:1px solid var(--line);border-radius:12px;padding:0 14px}
.batch-orders>summary,.batch-more>summary{padding:13px 0;font-weight:700;cursor:pointer}
.batch-order{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid var(--line)}
.batch-order>div{display:grid;gap:3px;min-width:0}
.batch-order small{color:var(--muted)}
.batch-order .batch-order-note{color:#8b5015}
.batch-order strong{white-space:nowrap}
.batch-more p{margin:0 0 10px;color:var(--muted);font-size:13px}
.batch-more .small-btn{margin-bottom:14px}
@media(max-width:560px){.batch-remit{grid-template-columns:1fr}.batch-ship-form{grid-template-columns:1fr}}
.batch-actions{display:flex;flex-wrap:wrap;gap:10px}
.batch-actions .primary{min-width:140px}
.batch-shipped-btn{min-height:46px;padding:0 18px;border:1.5px solid var(--green);border-radius:12px;background:#fff;color:var(--green);font-weight:800}
.batch-shipped-btn.active{background:#e5f0e9}
.batch-step.remitted .batch-ship-form{padding-top:4px}
/* 筆記頁購物車圖示：已加入件數氣泡 */
.note-reference-top .note-cart{position:relative}
.note-cart-badge{position:absolute;top:-2px;right:-6px;display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border:2px solid #fff;border-radius:999px;background:#000;color:#fff;font-size:12px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;animation:cart-badge-pop .18s ease-out}
@media(prefers-reduced-motion:reduce){.note-cart-badge{animation:none}}
/* 後台筆記庫：桌面端卡片維持約 255px 寬，空間足夠時一排四張 */
@media(min-width:901px){.note-library{grid-template-columns:repeat(auto-fill,minmax(max(220px,calc((100% - 48px) / 4)),1fr));max-width:1168px}}
/* 建立清單：筆記篩選列（月份／加入狀態／分類） */
.list-picker-filters{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin:36px 0 14px}
.list-picker-filters select{min-width:150px;height:48px;padding:0 38px 0 16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:16px;font-weight:700;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2317211d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;cursor:pointer}
.list-picker-filters select:focus-visible{outline:3px solid #24584444;outline-offset:1px}
.list-picker-filters .badge{margin-left:auto}
@media(max-width:560px){.list-picker-filters select{flex:1 1 140px;min-width:0}.list-picker-filters .badge{margin-left:0}}
.qa-conflict-actions{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 10px}
/* 建立清單後的預覽發布列 */
.customer-preview-modal .preview-publish-bar{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;border-top:1px solid var(--line);background:#fffdf8;box-shadow:0 -8px 24px #17211d14}
.preview-publish-bar>div:first-child{display:grid;gap:3px;min-width:0}
.preview-publish-bar small{color:var(--muted)}
.preview-publish-actions{display:flex;gap:10px;flex:none}
.preview-publish-actions .primary{min-width:120px}
@media(max-width:560px){.customer-preview-modal .preview-publish-bar{flex-direction:column;align-items:stretch}.preview-publish-actions>*{flex:1}}
.customer-preview-modal:has(.preview-publish-bar) .customer-preview-frame{height:calc(100% - 80px)}
/* 清單詳情：刪除清單 */
.list-delete-zone{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:18px;padding-top:14px;border-top:1px dashed var(--line)}
.list-delete-btn{padding:8px 0;border:0;background:transparent;color:var(--red);font-weight:800;cursor:pointer}
@media(hover:hover) and (pointer:fine){.list-delete-btn:hover:not(:disabled){text-decoration:underline}}
.list-delete-btn:disabled{color:#b9b9b9;cursor:not-allowed}
.list-delete-zone small{color:var(--muted);font-size:12px}
/* 清單詳情：操作按鈕排成一列，節省空間 */
.modal .list-actions.list-actions-three{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}
.modal .list-actions-three>button{flex:0 0 auto;width:auto;min-height:40px;margin:0;padding:0 16px;border-radius:10px;font-size:14px}
.modal .list-actions-three>.add{margin-left:auto;padding:0 22px}
.modal .danger-zone{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.modal .danger-zone .danger-outline{min-height:36px;padding:0 14px;font-size:13px}
.modal .list-delete-zone{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.modal .danger-zone+.list-delete-zone{margin-top:6px;padding-top:0;border-top:0}
.modal .list-delete-btn{padding:4px 0;font-size:13px}
@media(max-width:560px){.modal .list-actions-three>button{flex:1 1 auto}.modal .list-actions-three>.add{flex-basis:100%;margin-left:0}}

/* 叫貨與發貨 */
.purchase-tabs{margin-bottom:16px}
.purchase-lists{padding:0;margin-bottom:14px;overflow:hidden}
.purchase-lists-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line)}
.purchase-lists-head .check-row{margin:0;font-size:13px;color:var(--muted)}
.purchase-list-row{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line)}
.purchase-list-pick{display:flex;flex:1;align-items:center;gap:12px;min-width:0;cursor:pointer}
.purchase-list-pick>span{display:grid;gap:2px;min-width:0}
.purchase-mark-btn{flex:none;min-height:40px;padding:0 16px;border-radius:10px;font-size:14px}
.purchase-list-row:last-child{border-bottom:0}
.purchase-list-row input{width:18px;height:18px}
.purchase-list-row>span:nth-of-type(1){display:grid;gap:2px;flex:1;min-width:0}
.purchase-list-row small{color:var(--muted);font-size:12px}
.purchase-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:6px 0 14px}
.purchase-toolbar>span{font-weight:700}
.purchase-toolbar em{display:block;margin-top:2px;color:#9b571c;font-size:13px;font-style:normal;font-weight:500}
.purchase-toolbar>div{display:flex;gap:8px}
.purchase-supplier,.ship-card{padding:0;margin-bottom:14px;overflow:hidden}
.purchase-supplier>header,.ship-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:#f6f3eb;border-bottom:1px solid var(--line)}
.purchase-supplier>header>div,.ship-card>header>div{display:grid;gap:2px;min-width:0}
.purchase-supplier small,.ship-card small{color:var(--muted);font-size:12px}
.purchase-supplier .batch-lines,.ship-card .batch-lines{margin:0}
.purchase-supplier .batch-lines th,.purchase-supplier .batch-lines td,.ship-card .batch-lines th,.ship-card .batch-lines td{padding-left:18px;padding-right:18px}
.purchase-supplier .batch-lines td:nth-child(5),.purchase-supplier .batch-lines th:nth-child(5){text-align:right;color:var(--muted)}
@media print{
 .sidebar,.topbar,.mobile-nav,.page-head,.purchase-tabs,.purchase-toolbar,.ship-card header .small-btn{display:none!important}
 .main{padding:0!important}
 .ship-card{break-inside:avoid;box-shadow:none;border:1px solid #ccc}
}
.purchase-view-toggle{display:inline-flex;gap:4px;margin:0 0 12px;padding:4px;border:1px solid var(--line);border-radius:12px;background:#fff}
.purchase-view-toggle button{min-width:84px;padding:8px 14px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:800;cursor:pointer}
.purchase-view-toggle button.active{background:var(--green);color:#fff}
.purchase-overview .batch-lines td:nth-child(5),.purchase-overview .batch-lines th:nth-child(5){text-align:right;white-space:nowrap}
.purchase-overview .batch-lines td:nth-child(6),.purchase-overview .batch-lines th:nth-child(6){text-align:right;color:var(--muted)}
.purchase-overview .batch-lines td:nth-child(5){color:var(--ink)}
.purchase-overview .purchase-supplier-name{color:var(--muted);font-size:13px;white-space:nowrap}
.purchase-overview tfoot td{font-weight:800}
.purchase-view-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.purchase-view-row .purchase-view-toggle{margin:0}
/* 叫貨：未完成匯款、依供應商標記、叫貨紀錄 */
label.purchase-list-row{cursor:pointer}
.purchase-unpaid{padding:0;margin-bottom:14px;overflow:hidden;border-color:#f0dfbb}
.purchase-unpaid>header{padding:14px 18px;background:#fff7e6;border-bottom:1px solid #f0dfbb}
.purchase-unpaid>header>div{display:grid;gap:2px}
.purchase-unpaid>header small{color:#8b5015;font-size:12px}
.purchase-unpaid-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:12px 18px;border-bottom:1px solid var(--line)}
.purchase-unpaid-row:last-child{border-bottom:0}
.purchase-unpaid-info{display:grid;gap:2px;min-width:0}
.purchase-unpaid-info small{color:var(--muted);font-size:12px}
.purchase-unpaid-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.purchase-unpaid-actions .line-share{display:inline-flex;align-items:center;text-decoration:none;color:#06a74f;border-color:#bfe6cc}
.purchase-decision{display:inline-flex;padding:3px;border:1px solid var(--line);border-radius:10px;background:#fff}
.purchase-decision button{padding:6px 12px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-weight:800;font-size:13px;cursor:pointer}
.purchase-decision button.active[data-purchasedecision="keep"]{background:var(--green);color:#fff}
.purchase-decision button.active[data-purchasedecision="exclude"]{background:#fde9e6;color:var(--red)}
.purchase-supplier-actions{display:flex;gap:8px;flex-wrap:wrap}
.purchase-supplier-actions .purchase-mark-btn{min-height:36px;padding:0 14px;font-size:13px}
.unpaid-note{display:block;color:#9b571c;font-size:11px}
.purchase-record{padding:0;margin-bottom:10px;overflow:hidden}
.purchase-record>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;cursor:pointer;list-style:none}
.purchase-record>summary::-webkit-details-marker{display:none}
.purchase-record>summary>div{display:grid;gap:2px}
.purchase-record>summary small{color:var(--muted);font-size:12px}
.purchase-record[open]>summary{border-bottom:1px solid var(--line);background:#f6f3eb}
.purchase-record .batch-lines th,.purchase-record .batch-lines td{padding-left:18px;padding-right:18px}
.badge.unlisted{background:#eef0ed;color:#5f6b66}
.note-category-toolbar{margin-bottom:20px}
body:has(#app[data-scene="customer"]) .toast{bottom:calc(150px + env(safe-area-inset-bottom))}
/* 運費規則 */
.shipping-mode{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:4px 0 14px}
.shipping-mode-option{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1.5px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}
.shipping-mode-option input{margin-top:3px;accent-color:var(--green)}
.shipping-mode-option span{display:grid;gap:2px}
.shipping-mode-option small{color:var(--muted);font-size:12px}
.shipping-mode-option.selected{border-color:var(--green);background:#f1f7f3}
.summary .shipping-hint{justify-content:flex-end}
.summary .shipping-hint small{color:#9b571c;font-size:12px}
.batch-lines tfoot .batch-subtotal td{font-weight:500;color:var(--muted);font-size:13px;padding-top:6px;padding-bottom:6px}
@media(max-width:560px){.shipping-mode{grid-template-columns:1fr}}
.note-pick-filters{margin:12px 0 16px}.note-pick-filters select{min-width:0;flex:1 1 150px}
.note-pick-footer{bottom:0;padding:12px 0 16px;box-shadow:0 -8px 16px #fff}
.note-new-badge{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:999px;background:#e5484d;color:#fff;font-size:11px;font-weight:700;letter-spacing:.04em;line-height:18px;vertical-align:2px}
.detail-title-actions.editing{align-items:center;flex-wrap:wrap;justify-content:flex-end}
.list-edit-hint{color:var(--muted);font-size:13px}
.small-btn.danger-fill{background:#e5484d;border-color:#e5484d;color:#fff}
.small-btn.danger-fill:disabled{background:#f2c4c5;border-color:#f2c4c5;cursor:not-allowed}
.list-row-editing{cursor:default}
label.list-row-editing{cursor:pointer}
label.list-row-editing input[type=checkbox]{width:20px;height:20px;flex:0 0 auto;accent-color:#e5484d;margin:0 4px 0 0}
label.list-row-editing:has(input:checked){background:#fff5f5}
label.list-row-editing.is-locked{cursor:not-allowed;opacity:.55}
.list-row-sort{display:flex;flex-direction:column;gap:6px;flex:0 0 auto;margin-left:8px}
.list-row-sort button{width:36px;height:30px;border:1px solid var(--line,#ddd);border-radius:8px;background:#fff;font-size:16px;line-height:1;cursor:pointer}
.list-row-sort button:disabled{opacity:.3;cursor:default}
.demand-row.list-product-row[data-sortrow]{grid-template-columns:72px minmax(0,1fr) auto auto;align-items:center}
label.demand-row.list-product-row.list-row-editing{grid-template-columns:auto 72px minmax(0,1fr) auto;align-items:center}
.list-row-sort{margin-left:0}
@media(max-width:560px){.demand-row.list-product-row[data-sortrow]{grid-template-columns:60px minmax(0,1fr) auto auto}label.demand-row.list-product-row.list-row-editing{grid-template-columns:auto 60px minmax(0,1fr) auto}}
.nav button{display:flex;align-items:center;gap:10px}
.nav .lucide.nav-icon{width:19px;height:19px;flex:0 0 auto}
.lucide.btn-icon{width:1.05em;height:1.05em;margin-right:5px;vertical-align:-.16em}
button.close .lucide-x{width:18px;height:18px;vertical-align:middle}
.todo-icon .lucide{width:19px;height:19px;color:var(--green2)}
.lucide.trend-icon{width:14px;height:14px;margin-left:2px;vertical-align:-.2em}
.list-row-sort .lucide{width:16px;height:16px;vertical-align:middle}
/* 筆記卡片：內容由上往下排，按鈕固定在卡片底部 */
.library-card{display:flex;flex-direction:column}
.library-card .library-body{display:flex;flex-direction:column;flex:1}
.library-card .library-meta{margin:14px 0 0}
.library-card .library-actions{margin-top:auto;padding-top:14px}
/* 彙總單：待出貨卡片內直接出貨 */
.order-card.order-card-ship{grid-template-columns:minmax(220px,1fr) minmax(0,1.6fr) auto;align-items:center}
.order-card-ship .meta b{color:var(--ink)}
.order-ship-inline{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;background:var(--mint);border-radius:12px;padding:10px 12px}
.order-ship-inline label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:800;color:var(--ink)}
.order-ship-inline input{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px 12px;font:inherit;font-weight:500;min-width:0}
.order-ship-inline .primary{white-space:nowrap;padding:11px 16px}
@media(max-width:900px){.order-card.order-card-ship{grid-template-columns:1fr}.order-ship-inline{grid-template-columns:1fr 1fr}.order-ship-inline .primary{grid-column:1/-1}}
.order-card-ship .order-actions{grid-column:auto;border-top:0;padding-top:0}
@media(max-width:900px){.order-card-ship .order-actions{justify-content:flex-end}}
.order-card-ship>*{min-width:0}
@media(max-width:900px){.order-card.order-card-ship{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.order-ship-inline{grid-template-columns:minmax(0,1fr)}}
/* 彙總單：所有狀態統一卡片格式 */
.order-card.order-row-card{grid-template-columns:minmax(220px,1fr) minmax(0,1.6fr) auto;align-items:center}
.order-row-card>*{min-width:0}
.order-row-card .meta b{color:var(--ink)}
.order-row-card .order-actions{grid-column:auto;border-top:0;padding-top:0}
.order-row-action{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;background:none;padding:0;border-radius:0}
.order-row-action label,.order-row-info{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:800;color:var(--ink);min-width:0}
.order-row-info span{color:var(--muted);font-weight:700}
.order-row-info b{font-size:15px;min-height:44px;display:flex;align-items:center;overflow-wrap:anywhere}
.order-row-action input{height:44px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:0 12px;font:inherit;font-weight:500;min-width:0}
.order-row-btn{height:44px;min-width:120px;padding:0 18px;border:0;border-radius:12px;background:var(--green);color:#fff;font-size:15px;font-weight:800;white-space:nowrap;cursor:pointer}
@media(hover:hover) and (pointer:fine){.order-row-btn:hover{background:var(--green2)}}
.order-row-btn:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:900px){.order-card.order-row-card{grid-template-columns:minmax(0,1fr)}.order-row-action{grid-template-columns:1fr 1fr}.order-row-action .order-row-btn{grid-column:1/-1}.order-row-card .order-actions{justify-content:flex-end}}
@media(max-width:480px){.order-row-action{grid-template-columns:minmax(0,1fr)}.order-row-card .order-actions .order-row-btn{width:100%}}
.order-card.order-row-card{align-items:end}
.order-row-card .order-main{align-self:center}
.order-row-card .meta b{font-weight:inherit;color:inherit}
div.purchase-list-row{cursor:default}
.purchase-supplier>header>.purchase-supplier-actions{display:flex;flex-wrap:nowrap;gap:8px;flex:0 0 auto}
.purchase-supplier-actions .small-btn,.purchase-supplier-actions .purchase-mark-btn{min-height:40px;padding:0 16px;font-size:14px;border-radius:12px;white-space:nowrap}
/* 彙總單：訂單處理流程 */
.order-flow{margin-top:10px}
.order-flow-title{display:block;font-size:13px;font-weight:800;color:var(--muted);margin-bottom:8px}
.order-flow ol{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none;counter-reset:flow}
.order-flow li{counter-increment:flow;display:flex;align-items:center;gap:8px;padding:8px 14px 8px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:14px}
.order-flow li::before{content:counter(flow);display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--green);color:#fff;font-size:12px;font-weight:800}
.order-flow li b{white-space:nowrap}
.order-flow li small{color:var(--muted);font-size:12px}
.order-flow li.order-flow-arrow{counter-increment:none;border:0;background:none;padding:0;color:var(--muted)}
.order-flow li.order-flow-arrow::before{display:none}
.order-flow ol{align-items:center}
/* 待出貨：理貨單 */
.packing-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;color:var(--muted);font-size:13px}
.packing-toolbar>div{display:flex;gap:8px}
.packing-print{display:none}
@media print{
 body.printing-packing .sidebar,body.printing-packing .topbar,body.printing-packing .mobile-nav,body.printing-packing .page-head,body.printing-packing .tabs,body.printing-packing .packing-toolbar,body.printing-packing .order-card{display:none!important}
 body.printing-packing .packing-print{display:block!important}
 body.printing-packing .main{padding:0!important}
}
.order-row-btn.order-row-line{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;background:#fff;color:#06a74f;border:1px solid #bfe6cc}
@media(hover:hover) and (pointer:fine){.order-row-btn.order-row-line:hover{background:#f0faf3}}
.order-row-btn{min-width:136px}
/* 查看明細：次要按鈕（白底細框），與「複製叫貨訊息」同樣式 */
.order-row-card .order-actions .order-row-btn{background:#fff;color:var(--ink);border:1px solid var(--line)}
@media(hover:hover) and (pointer:fine){.order-row-card .order-actions .order-row-btn:hover{background:#f6f3eb}}
.order-row-action select{height:44px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:0 12px;font:inherit;font-weight:500;min-width:0;color:var(--ink)}
.order-row-action select:invalid{color:var(--muted)}

/* 客戶主檔與交易資料 */
.customer-page-head{align-items:end}
.customer-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.customer-filter-tabs{display:flex;gap:8px;margin:0 0 14px;overflow-x:auto;padding-bottom:2px}
.customer-filter-tabs button{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:inherit;font-size:14px;font-weight:750;white-space:nowrap;cursor:pointer}
.customer-filter-tabs button span{display:grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#eef1ed;color:var(--muted);font-size:12px}
.customer-filter-tabs button.active{border-color:var(--green);background:var(--green);color:#fff}
.customer-filter-tabs button.active span{background:#ffffff22;color:#fff}
.customer-directory{overflow:hidden}
.customer-table-head,.customer-directory-row{display:grid;grid-template-columns:minmax(270px,1.55fr) minmax(155px,.85fr) minmax(155px,.85fr) minmax(130px,.65fr) 64px;gap:16px;align-items:center}
.customer-table-head{padding:12px 20px;border-bottom:1px solid var(--line);background:#f7f8f5;color:var(--muted);font-size:12px;font-weight:800}
.customer-directory-row{width:100%;min-height:86px;padding:14px 20px;border:0;border-bottom:1px solid var(--line);background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.customer-directory-row:last-child{border-bottom:0}
@media(hover:hover) and (pointer:fine){.customer-directory-row:hover{background:#fafbf8}}
.customer-identity{display:flex;align-items:center;gap:12px;min-width:0}.customer-identity>span:last-child{display:grid;gap:4px;min-width:0}.customer-identity b,.customer-identity small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-identity small,.customer-cell small{color:var(--muted);font-size:13px}.customer-identity em{display:flex;gap:5px;min-height:20px;font-style:normal}.customer-identity em i{padding:2px 7px;border-radius:999px;background:#edf5f0;color:var(--green);font-size:11px;font-style:normal}.customer-identity em i.danger{background:#fbe9e6;color:#9c3d32}
.customer-cell{display:grid;gap:5px}.customer-cell b{font-size:14px}.customer-paid{font-weight:850;font-variant-numeric:tabular-nums}.customer-open{color:var(--green);font-size:13px;font-weight:800;text-align:right}
.customer-management-modal{width:min(920px,calc(100vw - 32px));max-height:92vh}.customer-detail-tabs{display:flex;gap:4px;padding:0 20px;border-bottom:1px solid var(--line);background:#fff}.customer-detail-tabs button{min-height:48px;padding:0 14px;border:0;box-shadow:inset 0 -2px 0 transparent;background:transparent;color:var(--muted);font:inherit;font-weight:800;cursor:pointer}.customer-detail-tabs button.active{box-shadow:inset 0 -2px 0 var(--green);color:var(--green)}
.customer-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin:0}.customer-overview-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:22px}.customer-facts{border:1px solid var(--line);border-radius:12px;padding:0 14px}.customer-facts p{display:flex;justify-content:space-between;gap:12px;margin:0;padding:13px 0;border-bottom:1px solid var(--line)}.customer-facts p:last-child{border:0}.customer-facts span{color:var(--muted)}
.customer-activity{display:flex;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}.customer-activity>i{flex:0 0 9px;width:9px;height:9px;margin-top:6px;border-radius:50%;background:var(--green)}.customer-activity>span{display:grid;gap:3px}.customer-activity small{color:var(--muted);font-size:13px}
.customer-master-form .detail-title small,.customer-history .detail-title small{color:var(--muted)}.customer-master-form .grid-2{gap:12px}.customer-form-actions{display:flex;align-items:center;gap:10px}.customer-form-actions .add{flex:1}.customer-form-actions .danger-outline{margin:0}.field-help{display:block;margin-top:10px;color:var(--muted);font-size:12px}
.customer-timeline-row{display:grid;grid-template-columns:116px 14px minmax(0,1fr);gap:10px;padding:10px 0}.customer-timeline-row time{color:var(--muted);font-size:12px}.customer-timeline-row>i{position:relative;width:10px;height:10px;margin-top:4px;border-radius:50%;background:var(--green)}.customer-timeline-row>i::after{content:"";position:absolute;top:12px;bottom:-17px;left:4px;width:2px;background:#dce7e0}.customer-timeline-row:last-of-type>i::after{display:none}.customer-timeline-row>span{display:grid;gap:3px}.customer-timeline-row small{color:var(--muted);font-size:13px}
@media(max-width:980px){.customer-metrics{grid-template-columns:1fr 1fr}.customer-table-head{display:none}.customer-directory-row{grid-template-columns:minmax(240px,1.4fr) 1fr 1fr auto}.customer-directory-row>.customer-cell:nth-of-type(2){display:none}.customer-open{display:none}}
@media(max-width:680px){.customer-page-head{align-items:stretch}.customer-search{width:100%}.customer-metrics,.customer-kpis,.customer-overview-grid{grid-template-columns:1fr 1fr}.customer-directory-row{grid-template-columns:1fr auto;gap:10px}.customer-directory-row>.customer-cell{display:none}.customer-paid{align-self:start}.customer-management-modal{width:100%;max-height:100dvh;border-radius:0}.customer-detail-tabs{position:sticky;top:0;z-index:2}.customer-form-actions{align-items:stretch;flex-direction:column}.customer-form-actions>*{width:100%}.customer-timeline-row{grid-template-columns:92px 12px minmax(0,1fr)}}

/* 匯款回報連結頁（/customer?pay=…&t=…）：客人免登入填末五碼、按我已匯款 */
html[data-surface="client"] .remit-page{min-height:100vh;min-height:100dvh;background:#fafafa;padding:24px 16px 48px;box-sizing:border-box}
html[data-surface="client"] .remit-shell{max-width:480px;margin:0 auto;display:grid;gap:12px}
html[data-surface="client"] .remit-store{margin:0;font:var(--text-title);color:var(--a-ink);text-align:center}
html[data-surface="client"] .remit-card{background:#fff;border:1px solid var(--a-line);border-radius:var(--a-radius);padding:24px 20px;display:grid;gap:16px}
html[data-surface="client"] .remit-card h1{margin:0;font:var(--text-subheading)}
html[data-surface="client"] .remit-card p{margin:0;font:var(--text-body);color:var(--a-muted)}
html[data-surface="client"] .remit-items{list-style:none;margin:0;padding:0;display:grid;border-top:1px solid var(--a-line)}
html[data-surface="client"] .remit-items li{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 0;border-bottom:1px solid var(--a-line)}
html[data-surface="client"] .remit-items li div{display:grid;gap:2px;min-width:0}
html[data-surface="client"] .remit-items b{font:var(--text-ui);overflow-wrap:anywhere}
html[data-surface="client"] .remit-items small{font:var(--text-small);color:var(--a-muted)}
html[data-surface="client"] .remit-items strong{font:var(--text-ui);font-variant-numeric:tabular-nums;white-space:nowrap}
html[data-surface="client"] .remit-total{margin:0;display:grid;gap:6px}
html[data-surface="client"] .remit-total div{display:flex;justify-content:space-between;font:var(--text-body);color:var(--a-muted)}
html[data-surface="client"] .remit-total dt,html[data-surface="client"] .remit-total dd{margin:0}
html[data-surface="client"] .remit-total dd{font-variant-numeric:tabular-nums}
html[data-surface="client"] .remit-total .remit-due{padding-top:8px;color:var(--a-ink);font:var(--text-title)}
html[data-surface="client"] .remit-total .remit-due dd{font:var(--text-subheading)}
html[data-surface="client"] .remit-bank{display:grid;gap:2px;padding:12px 14px;background:var(--a-canvas);border-radius:var(--a-radius-sm)}
html[data-surface="client"] .remit-bank small{font:var(--text-small);color:var(--a-muted)}
html[data-surface="client"] .remit-bank b{font:var(--text-title);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;user-select:all}
html[data-surface="client"] .remit-form{display:grid;gap:8px}
html[data-surface="client"] .remit-form label{font:var(--text-ui)}
html[data-surface="client"] .remit-form input{height:48px;border:1px solid var(--a-line-strong);border-radius:var(--a-radius-sm);padding:0 14px;font:500 18px/1 var(--a-font-family);letter-spacing:.2em;font-variant-numeric:tabular-nums;background:#fff;color:var(--a-ink);box-sizing:border-box;width:100%}
html[data-surface="client"] .remit-form input:focus{outline:none;border-color:var(--a-ink);box-shadow:0 0 0 1px var(--a-ink)}
html[data-surface="client"] .remit-error{color:var(--a-warn)!important;font:var(--text-small)!important}
html[data-surface="client"] .remit-submit{margin-top:8px;height:52px;border:0;border-radius:var(--a-radius-sm);background:var(--a-accent-fill);color:#fff;font:600 16px/1 var(--a-font-family);cursor:pointer;width:100%}
html[data-surface="client"] .remit-submit:active{background:var(--a-accent-fill-press)}
html[data-surface="client"] .remit-submit:disabled{opacity:.6;cursor:default}
html[data-surface="client"] .remit-message{text-align:center;justify-items:center;padding:40px 24px}
html[data-surface="client"] .remit-check{width:56px;height:56px;border-radius:50%;background:var(--a-success-soft);color:var(--a-success);display:grid;place-items:center}
html[data-surface="client"] .remit-check svg{width:28px;height:28px}
/* LINE Login and signed customer session */
.line-auth-loading,.line-auth-prompt{display:grid;justify-items:center;text-align:center;gap:12px;padding:24px 12px}
.line-auth-loading p,.line-auth-prompt p{margin:0;max-width:32rem;color:var(--muted);line-height:1.65}
.line-auth-prompt h3{margin:4px 0 0;font-size:1.25rem}
.line-auth-prompt .line-logo{display:grid;place-items:center;width:64px;height:64px;border-radius:18px;background:#06c755;color:#fff;font-size:15px;font-weight:900;letter-spacing:-.04em}
.line-login-link{display:flex;align-items:center;justify-content:center;width:min(100%,360px);min-height:48px;text-decoration:none}
.line-auth-loading .loading-spinner{width:30px;height:30px;border:3px solid #dfe7e2;border-top-color:#12372a;border-radius:50%;animation:line-auth-spin .75s linear infinite}
.line-profile-picture{width:48px;height:48px;border-radius:50%;object-fit:cover;background:#edf2ef}
.line-logout-form{display:flex;justify-content:flex-end;margin:-2px 0 18px}
.line-logout-form button{appearance:none;border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
@media(hover:hover) and (pointer:fine){.line-logout-form button:hover{color:var(--ink)}}
@keyframes line-auth-spin{to{transform:rotate(360deg)}}

/* 筆記卡片與筆記頁的縮圖列：高度跟著縮圖，不出現捲動條（太多張時仍可左右滑動） */
:is(.product-thumbs,.admin-note-thumbs,.preview-thumbs),
:is(.customer-list-page,.client-store-home) .product-figma-card .product-thumbs{height:auto;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}
:is(.product-thumbs,.admin-note-thumbs,.preview-thumbs)::-webkit-scrollbar{display:none}
:is(.product-thumbs,.admin-note-thumbs,.preview-thumbs) button{flex:none}

/* LINE 登入按鈕（LINE Login button design guidelines）：底色 #06C755，hover 疊 10% 黑、按下疊 30% 黑；官方圖示與文字之間 8% 黑分隔線；文字與圖示白色 */
.line-login-btn{display:flex;align-items:stretch;width:100%;max-width:400px;min-height:48px;margin:0 auto;border-radius:8px;background:#06C755;color:#fff;text-decoration:none;font-weight:700;font-size:16px;line-height:1.2;overflow:hidden;-webkit-tap-highlight-color:transparent}
.line-login-btn:hover{background:#06C755 linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1));color:#fff}
.line-login-btn:active{background:#06C755 linear-gradient(rgba(0,0,0,.3),rgba(0,0,0,.3))}
.line-login-btn:focus-visible{outline:2px solid #222;outline-offset:3px}
.line-login-btn-icon{flex:none;display:grid;place-items:center;width:48px;min-height:48px;border-right:1px solid rgba(0,0,0,.08)}
.line-login-btn-icon img{display:block;width:48px;height:48px}
.line-login-btn-text{flex:1;display:flex;align-items:center;justify-content:center;padding:0 48px 0 28px;white-space:nowrap}
html[data-surface="client"] .home-login-bar .line-login-btn{max-width:none;font-size:16px}
.line-auth-prompt .line-login-btn{margin-top:4px}

/* 商品影片以直式為主：9:16 格子、完整顯示（橫式影片會上下留黑邊） */
.note-video-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.note-video-tile video{aspect-ratio:9/16;object-fit:contain;background:#111}
.customer-videos,.note-video-grid.preview-videos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
/* 客人看不到檔名列（例如 IMG_6451.MOV） */
.customer-videos .note-video-tile>div{display:none}
@media(max-width:560px){.note-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 客人筆記頁輪播裡的影片：與照片同一個 4:5 畫框，填滿（同 IG 輪播） */
.note-gallery-track .note-gallery-video{display:block;flex:0 0 100%;width:100%;height:100%;object-fit:cover;background:#111;scroll-snap-align:start;scroll-snap-stop:always}

/* 輪播影片的精簡控制列（播放、進度、聲音、速度） */
.note-gallery-track .note-gallery-slide{position:relative;flex:0 0 100%;width:100%;height:100%;scroll-snap-align:start;scroll-snap-stop:always;background:#111}
.note-gallery-slide .note-gallery-video{flex:none;cursor:pointer}
.gv-controls{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;gap:12px;padding:28px 14px 12px;background:linear-gradient(transparent,rgba(0,0,0,.55));color:#fff}
.gv-controls button{flex:none;display:grid;place-items:center;min-width:32px;height:32px;padding:0;border:0;background:none;color:#fff;font:600 14px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text",sans-serif;cursor:pointer}
.gv-controls button svg{width:22px;height:22px}
.gv-controls button:focus-visible,.gv-progress:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:4px}
.gv-progress{--p:0%;flex:1;min-width:0;height:24px;margin:0;background:none;-webkit-appearance:none;appearance:none;cursor:pointer}
.gv-progress::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:linear-gradient(to right,#fff var(--p),rgba(255,255,255,.4) var(--p))}
.gv-progress::-moz-range-track{height:4px;border-radius:2px;background:linear-gradient(to right,#fff var(--p),rgba(255,255,255,.4) var(--p))}
.gv-progress::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;margin-top:-4px;border:0;border-radius:50%;background:#fff}
.gv-progress::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:#fff}
