/* Fans Club health-check booking — mobile-first, warm & trustworthy */
:root {
  --accent: #b4552d;
  --accent-dark: #93431f;
  --accent-soft: #fbeee5;
  --bg: #fdf8f2;
  --card: #ffffff;
  --text: #33302c;
  --muted: #8a8178;
  --border: #e8ddd2;
  --ok: #2e7d4f;
  --warn: #b3261e;
  --info: #2f6db3;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 16px; line-height: 1.55;
}
a { color: var(--accent); }
#topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; color: var(--accent-dark); text-decoration: none; font-size: 17px; }
.top-actions { display: flex; gap: 8px; }
.container { max-width: 860px; margin: 0 auto; padding: 16px 14px 48px; }
h1 { font-size: 22px; margin: 6px 0 4px; }
h2 { font-size: 18px; margin: 18px 0 8px; }
h3 { font-size: 16px; margin: 14px 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 12px 0;
}
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.btn {
  display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 10px; padding: 10px 18px; font-size: 16px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #f6efe7; }
.btn-danger { background: #fff; color: var(--warn); border-color: var(--warn); }
.btn-danger:hover { background: #fdecea; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-row .btn { flex: 1; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; font-size: 16px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; color: var(--text); font-family: inherit;
}
label { display: block; font-weight: 600; margin: 12px 0 4px; }
.field-error { color: var(--warn); font-size: 13px; margin-top: 4px; }
input.invalid { border-color: var(--warn); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.step-dot { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: #f1e7dc; color: var(--muted); }
.step-dot.active { background: var(--accent); color: #fff; }
.choice-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .choice-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }
.choice { cursor: pointer; }
.choice h3 { margin: 0 0 4px; }
.choice .price { font-weight: 700; color: var(--accent-dark); font-size: 18px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent-dark); margin-right: 4px;
}
.badge.female { background: #fdeef3; color: #a8325e; }
.badge.male { background: #e8f0fb; color: #2f6db3; }
.badge.full { background: #f3e2e2; color: var(--warn); }
.badge.ok { background: #e4f3e8; color: var(--ok); }
.badge.grey { background: #eee9e2; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f3ece4; }
.check:last-child { border-bottom: none; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.check.disabled { opacity: .55; }
.check .price { font-weight: 700; color: var(--accent-dark); }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-row label { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
.radio-row input { accent-color: var(--accent); width: 18px; height: 18px; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.cal-head { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-day {
  border: 1px solid var(--border); border-radius: 10px; background: #fff; min-height: 56px;
  padding: 5px 4px; text-align: center; cursor: pointer; font-size: 15px;
}
.cal-day .dow { display: block; font-size: 11px; color: var(--muted); }
.cal-day .tag { display: block; font-size: 11px; font-weight: 700; margin-top: 2px; }
.cal-day.empty { visibility: hidden; }
.cal-day.disabled { background: #f6f1ea; color: #b9ad9f; cursor: not-allowed; }
.cal-day.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cal-day .tag.female { color: #a8325e; }
.cal-day .tag.male { color: #2f6db3; }
.cal-day .tag.full { color: var(--warn); }
.time-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; border-radius: 20px; padding: 8px 14px;
  cursor: pointer; font-size: 15px;
}
.chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.session-card { cursor: pointer; }
.session-card .meta { font-size: 14px; color: var(--muted); }
.notice { border-left: 4px solid var(--info); background: #eef4fc; padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: 14px; }
.notice.warn { border-color: #d9a441; background: #fdf6e3; }
.notice.error { border-color: var(--warn); background: #fdecea; }
.notice.ok { border-color: var(--ok); background: #e9f5ec; }
.total-box { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.total-box .row { display: flex; justify-content: space-between; padding: 3px 0; }
.total-box .grand { font-weight: 700; font-size: 18px; border-top: 1px solid #e5c9b8; margin-top: 6px; padding-top: 8px; }
.review-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f3ece4; font-size: 15px; }
.review-item:last-child { border-bottom: none; }
.review-item .k { color: var(--muted); flex-shrink: 0; }
.review-item .v { text-align: right; }
.review-item .v button { margin-left: 6px; }
.ref { font-size: 20px; font-weight: 700; letter-spacing: .5px; color: var(--accent-dark); }
.chart-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); cursor: zoom-in; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: left; vertical-align: top; }
table.list th { background: #faf5ee; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters .f { flex: 1 1 140px; }
.filters label { margin: 0 0 3px; font-size: 13px; }
.admin-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 14px 16px; margin: 12px 0; }
.admin-card .head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.admin-card .name { font-size: 17px; font-weight: 700; }
.admin-card .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 14px; margin-top: 8px; }
@media (max-width: 560px) { .admin-card .grid { grid-template-columns: 1fr; } }
.admin-card .grid .k { color: var(--muted); }
.history { font-size: 13px; color: var(--muted); margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 6px; }
.history div { padding: 2px 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tab { border: 1px solid var(--border); background: #fff; border-radius: 20px; padding: 7px 14px; cursor: pointer; font-size: 15px; color: var(--text); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #f3ece4; }
.slot-row select, .slot-row input { width: auto; }
.dialog-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .dialog-backdrop { align-items: center; } }
.dialog { background: #fff; border-radius: 16px 16px 0 0; max-width: 640px; width: 100%; max-height: 88vh; overflow: auto; padding: 18px; }
@media (min-width: 640px) { .dialog { border-radius: 16px; } }
.dialog h2 { margin-top: 0; }
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 560px); }
.toast { background: #33302c; color: #fff; border-radius: 10px; padding: 11px 16px; font-size: 15px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.toast.error { background: var(--warn); }
.toast.ok { background: var(--ok); }
.toggle { display: inline-flex; align-items: center; gap: 6px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 8px 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 14px; }
.kv .k { color: var(--muted); }
