:root {
  --green: #3dba8f;
  --green-dark: #2a9a73;
  --green-bg: #eef9f5;
  --text: #2b2f36;
  --muted: #6b7280;
  --danger: #d9534f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--green-bg);
  color: var(--text);
  font-family: -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
}
.card {
  max-width: 800px;
  margin: 32px auto;
  padding: 30px 30px 40px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
h1.site { margin: 0 0 20px; font-size: 22px; color: var(--green); font-weight: 500; }
.intro {
  border: 2px dashed #dfe3ee;
  border-radius: 12px;
  padding: 24px 32px;
  margin-bottom: 24px;
}
.intro h2 { margin: 0 0 8px; text-align: center; font-size: 26px; color: #25324d; }
.intro .time { color: #4a5b82; font-weight: 700; font-size: 18px; margin: 12px 0 8px; }
.intro ul { margin: 0; padding-left: 22px; }
.section-title {
  border-left: 5px solid var(--green);
  padding-left: 12px;
  font-size: 18px;
  margin: 28px 0 8px;
}
.q { margin: 28px 0; scroll-margin-block: 80px 160px; }
.opt { scroll-margin-block: 80px 160px; }
.q > .label { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.q > .label .req { color: #f0ad1c; margin-left: 4px; }
.hint { display: inline-block; font-size: 12px; color: #fff; background: #777; border-radius: 10px; padding: 0 10px; margin-bottom: 8px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) {
  .options { grid-template-columns: 1fr; }
  .card { margin: 0; border-radius: 0; padding: 20px 16px calc(110px + env(safe-area-inset-bottom)); }
  .intro { padding: 16px 18px; }
  .intro h2 { font-size: 22px; }
  .opt { min-height: 48px; padding: 10px 14px; font-size: 16px; }
  .opt input { width: 20px; height: 20px; }
  .q { margin: 24px 0; }
}
@media (hover: none) { .opt:hover { background: transparent; } .opt:has(input:checked):hover { background: var(--green-bg); } }
body { -webkit-tap-highlight-color: transparent; }
input[type=text], input[type=number] { font-size: 16px; } /* iOS 對 <16px 的輸入框會自動放大頁面 */
.opt {
  display: flex; align-items: center; gap: 10px;
  border: 1px dotted var(--green);
  border-radius: 3px;
  padding: 9px 12px;
  color: var(--green-dark);
  cursor: pointer;
  user-select: none;
}
.opt:hover { background: var(--green-bg); }
.opt:has(input:checked) { background: var(--green-bg); border-style: solid; font-weight: 600; }
.opt input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.opt .price { color: var(--muted); font-weight: 400; margin-left: auto; font-size: 14px; }
input[type=text], input[type=number] {
  width: 100%;
  border: 0; border-bottom: 1px solid #9aa0a6;
  padding: 8px 2px; font-size: 16px; background: transparent; outline: none;
}
input[type=text]:focus, input[type=number]:focus { border-bottom: 2px solid var(--green); }
.error { color: var(--danger); font-size: 14px; margin-top: 6px; min-height: 0; }
.q.invalid .label { color: var(--danger); }
.callout {
  border: 2px dashed #dfe3ee; border-radius: 12px;
  padding: 28px; text-align: center; font-size: 18px; margin: 28px 0;
}
.total-bar {
  position: sticky; bottom: 0;
  margin: 24px -30px -40px; padding: 8px 30px;
  background: #fff; border-top: 1px solid #e5e7eb;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  display: flex; align-items: center; gap: 16px;
}
.total-bar .sum { flex: 1; min-width: 0; }
.total-bar .row { display: flex; align-items: baseline; gap: 10px; }
.total-bar .amount { font-size: 22px; font-weight: 700; color: var(--green-dark); }
.total-bar .detail { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .total-bar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
  button.primary { padding: 12px 28px; }
}
button.primary {
  background: var(--green); color: #fff; border: 0; border-radius: 3px;
  padding: 10px 36px; font-size: 16px; cursor: pointer; flex: none;
}
button.primary:hover { background: var(--green-dark); }
button.primary:disabled { background: #a8d9c8; cursor: wait; }
.done { text-align: center; padding: 30px 10px; }
.done h2 { color: var(--green-dark); }
.done table { margin: 16px auto; border-collapse: collapse; min-width: 320px; text-align: left; }
.done td, .done th { padding: 6px 14px; border-bottom: 1px solid #eee; }
.done td.n, .done th.n { text-align: right; }
.hidden { display: none !important; }
