.ct-page, .co-page, .ct-bar, .co-bar, .co-head {
  --ct-red: #D4483B;
  --ct-line: #E8E3DC;
}
.scroll-content.ct-page, .scroll-content.co-page {
  padding-bottom: 16px;
  background: var(--cream);
}
.ct-page [hidden], .co-page [hidden], .ct-bar [hidden] { display: none !important; }

.ct-page .ct-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
  background: var(--cream);
}
.ct-page .ct-head-left { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ct-page .ct-back, .co-head .co-back {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ct-page .ct-back svg, .co-head .co-back svg {
  width: 20px; height: 20px; stroke: var(--pine); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ct-page .ct-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px; font-weight: 700; color: var(--text-primary);
}
.ct-page .ct-title span {
  margin-left: 4px; color: var(--text-tertiary); font-size: 14px; font-weight: 400;
  font-family: 'Noto Sans SC', sans-serif;
}
.ct-page .ct-edit { font-size: 13px; color: var(--text-secondary); background: none; flex-shrink: 0; }
.ct-page .flash { margin: 0 16px 12px; }

.ct-page .ct-group {
  margin: 0 16px 12px; background: #fff; border-radius: var(--radius-md);
  box-shadow: var(--shadow); overflow: hidden;
}
.ct-page .ct-store { display: flex; align-items: center; gap: 6px; padding: 12px 16px 8px; }
.ct-page .ct-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--pine); background: rgba(45,95,63,.06);
  padding: 3px 8px; border-radius: 4px; font-weight: 500;
}
.ct-page .ct-tag svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.ct-page .ct-store-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }

.ct-page .ct-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; position: relative; }
.ct-page .ct-item + .ct-item::before {
  content: ''; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--ct-line);
}
.ct-tick { position: relative; display: flex; flex-shrink: 0; }
.ct-tick input { position: absolute; inset: 0; margin: 0; opacity: 0; }
.ct-tick i {
  border-radius: 50%; border: 2px solid var(--ct-line);
  display: flex; align-items: center; justify-content: center;
}
.ct-tick input:checked + i { background: var(--pine); border-color: var(--pine); }
.ct-tick input:checked + i::after {
  content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.ct-page .ct-box { width: 22px; height: 22px; margin-top: 12px; }
.ct-page .ct-box i { width: 22px; height: 22px; }
.ct-page .ct-img {
  width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden;
  position: relative; flex-shrink: 0; display: block;
}
.ct-page .ct-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-page .ct-img svg, .co-page .co-thumb svg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  stroke: #fff; fill: none; stroke-width: 1.5; stroke-linecap: round; opacity: .75;
}
.ct-page .ct-img svg { width: 28px; height: 28px; }
.ct-page .ct-meta { flex: 1; min-width: 0; }
.ct-page .ct-name-row { display: flex; align-items: flex-start; gap: 8px; }
.ct-page .ct-name {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ct-page .ct-del { display: none; flex-shrink: 0; }
body.is-edit .ct-page .ct-del { display: block; }
.ct-page .ct-del button { color: var(--ct-red); font-size: 12px; line-height: 1.4; background: none; }
.ct-page .ct-spec { margin-top: 4px; font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-page .ct-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ct-page .ct-price { font-size: 15px; font-weight: 600; color: var(--ct-red); }
.ct-page .ct-price .symbol { font-size: 11px; margin-right: 1px; }
.ct-page .ct-price.is-points { font-size: 13px; }
.ct-page .ct-qty { display: flex; align-items: center; background: var(--cream-dark); border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.ct-page .ct-qty button { width: 26px; height: 26px; background: none; color: var(--text-secondary); font-size: 14px; }
.ct-page .ct-qty span { width: 28px; text-align: center; font-size: 12px; font-weight: 500; color: var(--text-primary); }

.ct-page .ct-points {
  margin: 0 16px 16px; background: #fff; border-radius: var(--radius-md);
  box-shadow: var(--shadow); padding: 14px 16px;
}
.ct-page .ct-points b { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ct-page .ct-points span { display: block; margin-top: 4px; font-size: 11px; color: var(--gold); }
.ct-page .ct-empty { text-align: center; padding: 72px 24px 24px; }
.ct-page .ct-empty p { color: var(--text-tertiary); font-size: 14px; margin-bottom: 16px; }
.ct-page .ct-empty a {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 22px; border-radius: 20px;
  background: var(--pine); color: #fff; font-size: 14px; font-weight: 600;
}

.ct-bar {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--ct-line);
  box-shadow: 0 -2px 12px rgba(0,0,0,.04);
}
.ct-bar .ct-all { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.ct-bar .ct-all .ct-tick, .ct-bar .ct-all .ct-tick i { width: 20px; height: 20px; }
.ct-bar .ct-sum { flex: 1; min-width: 0; text-align: right; }
.ct-bar .ct-sum-label { font-size: 12px; color: var(--text-secondary); }
.ct-bar .ct-sum b { display: block; color: var(--ct-red); font-size: 18px; font-weight: 700; line-height: 1.2; }
.ct-bar .ct-sum b.is-mix { font-size: 14px; }
.ct-bar .ct-sum small { display: block; margin-top: 2px; font-size: 10px; color: var(--text-tertiary); }
.ct-bar .ct-go {
  flex-shrink: 0; background: var(--pine); color: #fff; border-radius: 22px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
}
.ct-bar .ct-go:disabled { opacity: .45; }
.ct-bar .ct-go:active { background: var(--pine-dark); }

.co-head {
  height: 48px; display: flex; align-items: center; justify-content: center;
  position: relative; background: var(--cream); flex-shrink: 0;
}
.co-head .co-back { position: absolute; left: 8px; }
.co-head .co-title { font-family: 'Noto Serif SC', serif; font-size: 17px; font-weight: 600; color: var(--pine-dark); letter-spacing: 1px; }
.co-page { padding: 4px 16px 12px; }
.co-page .flash { margin: 0 0 12px; }
.co-page .co-block {
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden;
}
.co-page .co-addr, .co-page .co-addr-link {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px; position: relative; color: inherit;
}
.co-page .co-addr-link::before, .co-page .co-addr:has(input:checked)::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--pine), var(--gold));
}
.co-page .co-addr + .co-addr { border-top: 1px solid var(--cream-dark); }
.co-page .co-pin { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; stroke: var(--pine); fill: none; stroke-width: 1.5; stroke-linecap: round; }
.co-page .co-addr-main { flex: 1; min-width: 0; }
.co-page .co-who { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.co-page .co-who b { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.co-page .co-who span, .co-page .co-detail { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.co-page .co-who span { font-size: 13px; }
.co-page .co-arrow { width: 20px; height: 20px; flex-shrink: 0; margin-top: 8px; stroke: var(--text-tertiary); fill: none; stroke-width: 1.5; stroke-linecap: round; }
.co-page .co-addr input { position: absolute; opacity: 0; pointer-events: none; }
.co-page .co-manage { display: block; text-align: right; padding: 0 16px 14px; font-size: 12px; color: var(--pine); }
.co-page .co-empty-addr { font-size: 14px; font-weight: 600; color: var(--pine); padding-top: 1px; }

.co-page .co-pad { padding: 14px 16px; }
.co-page .co-label { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; }
.co-page .co-ships { display: flex; gap: 10px; }
.co-page .co-ship {
  flex: 1; position: relative; border: 1.5px solid var(--ct-line); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer;
}
.co-page .co-ship input { position: absolute; opacity: 0; pointer-events: none; }
.co-page .co-ship-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.co-page .co-ship i, .co-page .co-radio {
  border-radius: 50%; border: 1.5px solid var(--ct-line); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.co-page .co-ship i { width: 14px; height: 14px; }
.co-page .co-ship-desc { margin-top: 4px; padding-left: 20px; font-size: 11px; color: var(--text-tertiary); line-height: 1.45; }
.co-page .co-ship:has(input:checked) { border-color: var(--pine); background: rgba(45,95,63,.03); }
.co-page .co-ship:has(input:checked) .co-ship-title { color: var(--pine); }
.co-page .co-ship:has(input:checked) i { border-color: var(--pine); }
.co-page .co-ship:has(input:checked) i::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--pine); }
.co-page .co-store select, .co-page .co-remark input {
  width: 100%; border: 0; outline: none; background: var(--cream); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; color: var(--text-primary);
}
.co-page .co-store { margin-top: 12px; }

.co-page .co-shield {
  display: flex; align-items: flex-start; gap: 8px; margin: 12px;
  font-size: 12px; line-height: 1.7; color: var(--pine);
  background: rgba(45,95,63,.06); border-radius: 9px; padding: 10px 12px;
}
.co-page .co-shield b { font-weight: 700; }
.co-page .co-shield svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; stroke: var(--pine); fill: none; stroke-width: 1.6; }

.co-page .co-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.co-page .co-line + .co-line { border-top: 1px solid var(--cream-dark); }
.co-page .co-thumb {
  width: 44px; height: 44px; border-radius: 6px; overflow: hidden; position: relative; flex-shrink: 0; display: block;
}
.co-page .co-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-page .co-thumb svg { width: 18px; height: 18px; }
.co-page .co-line-main { flex: 1; min-width: 0; }
.co-page .co-line-name { font-size: 12px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-page .co-line-spec { margin-top: 2px; font-size: 10px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-page .co-line-side { text-align: right; flex-shrink: 0; }
.co-page .co-line-price { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.co-page .co-line-qty { margin-top: 2px; font-size: 10px; color: var(--text-tertiary); }

.co-page .co-fee { padding: 8px 0; }
.co-page .co-fee-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.co-page .co-fee-row span { color: var(--text-secondary); }
.co-page .co-fee-row b { font-weight: 500; color: var(--text-primary); text-align: right; }
.co-page .co-fee-row b.is-off { color: var(--ct-red); font-weight: 600; }
.co-page .co-fee select {
  max-width: 68%; border: 0; background: transparent; font-size: 13px; font-weight: 500;
  color: var(--text-primary); text-align: right;
}
.co-page .co-split { height: 1px; background: var(--ct-line); margin: 8px 0; }
.co-page .co-due-row { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; padding: 4px 0; }
.co-page .co-due-row span { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.co-page .co-due { font-size: 20px; font-weight: 700; color: var(--ct-red); }
.co-page .co-due .symbol { font-size: 13px; }

.co-page .co-pay { display: flex; align-items: center; gap: 10px; padding: 10px 0; position: relative; cursor: pointer; }
.co-page .co-pay + .co-pay { border-top: 1px solid var(--cream-dark); }
.co-page .co-pay input { position: absolute; opacity: 0; pointer-events: none; }
.co-page .co-pay-ico { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.co-page .co-pay-ico svg { width: 14px; height: 14px; }
.co-page .co-pay-name { flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary); }
.co-page .co-pay-name em { font-style: normal; margin-left: 4px; font-size: 11px; color: var(--text-tertiary); }
.co-page .co-radio { width: 18px; height: 18px; margin-left: auto; }
.co-page .co-pay:has(input:checked) .co-radio { border-color: var(--pine); }
.co-page .co-pay:has(input:checked) .co-radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--pine); }
.co-page .co-pay-note { padding-bottom: 4px; font-size: 11px; line-height: 1.6; color: var(--text-tertiary); }
.co-page .co-remark { display: block; }
.co-page .co-remark span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-primary); }

.co-bar {
  flex-shrink: 0; background: #fff; border-top: 1px solid var(--ct-line);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}
.co-bar .co-submit {
  width: 100%; background: var(--pine); color: #fff; border-radius: 24px; padding: 14px;
  font-size: 16px; font-weight: 600; box-shadow: 0 4px 16px rgba(45,95,63,.2);
}
.co-bar .co-submit:disabled { opacity: .45; box-shadow: none; }
.co-bar .co-submit:active { background: var(--pine-dark); }
