:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #6d7772;
  --line: #dfe4de;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --canvas: #f5f1e9;
  --accent: #116b5b;
  --accent-dark: #0b4e43;
  --accent-soft: #e3f2ec;
  --warning: #9b5a10;
  --warning-soft: #fff0d6;
  --danger: #a1382d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100%, 760px); margin: 0 auto; padding: 20px 16px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(25px, 7vw, 36px); line-height: 1.08; letter-spacing: -.03em; }
h2 { margin-bottom: 12px; font-size: 18px; }
h3 { margin-bottom: 5px; font-size: 15px; }
.subtitle { margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.badge { flex: none; padding: 7px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.card { margin-bottom: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 28px rgba(37, 52, 44, .05); }
.item-list { display: grid; gap: 10px; }
.item { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-strong); }
.item.component { margin-left: 18px; background: #f8faf7; border-style: dashed; }
.item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.item-name { font-weight: 700; line-height: 1.35; }
.item-meta { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.item-price { white-space: nowrap; font-weight: 800; }
.controls { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; margin-top: 12px; }
.field { display: grid; gap: 5px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.check-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.button { min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; }
.button:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button.danger { background: var(--danger); }
.button:disabled { cursor: wait; opacity: .55; }
.notice { margin-bottom: 14px; padding: 12px 14px; border-radius: 11px; background: var(--warning-soft); color: var(--warning); font-size: 14px; line-height: 1.45; }
.notice.error { background: #fde8e5; color: var(--danger); }
.review-notes { margin: 0; padding-left: 18px; color: var(--warning); font-size: 13px; line-height: 1.6; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.summary-cell { padding: 12px; border-radius: 12px; background: var(--accent-soft); }
.summary-cell span { display: block; color: var(--muted); font-size: 12px; }
.summary-cell strong { display: block; margin-top: 3px; font-size: 20px; }
.participant-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.participant { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.participant:last-child { border-bottom: 0; }
.empty { color: var(--muted); text-align: center; }
.loading-card { margin-top: 20vh; padding: 24px; border-radius: 18px; background: var(--surface); text-align: center; }
.small { color: var(--muted); font-size: 12px; line-height: 1.5; }
@media (min-width: 640px) {
  .shell { padding: 42px 24px 72px; }
  .card { padding: 22px; }
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
