:root {
  /* 品牌色：墨綠 × 宣紙 × 一縷金 */
  --green: #3a5244;
  --green-dark: #2c4034;
  --green-light: #ecefe4;
  --cream: #fdfdf1;
  --gold: #ae8f61;
  --gold-light: #f3ecdd;
  --ink: #434d42;
  --muted: #83867a;
  --line: #e4e1cf;
  --danger: #b0413e;
  --radius: 14px;
  --serif: "Noto Serif TC", "PMingLiU", "MingLiU", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, .brand h1 { font-family: var(--serif); }

header.site {
  background: var(--green);
  color: #fdfdf1;
  border-bottom: 3px solid var(--gold);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
header.site h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.12em; }
header.site .sub { font-size: 0.85rem; opacity: 0.85; }
header.site .brand { display: flex; align-items: center; gap: 12px; }
header.site .logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

footer.site-foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 20px 16px 40px;
  line-height: 1.9;
}

main { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }
main.wide { max-width: 960px; }

/* 病患頁：側欄靠左、預約流程置於畫面中央 */
main.booking-layout {
  max-width: none;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 28px 40px 60px;
  min-height: calc(100vh - 180px);
}
.booking-main {
  justify-self: start;
  width: min(760px, 90%);
  margin-left: 10%;
}
.clinic-panel {
  position: sticky;
  top: 24px;
  background: var(--green);
  color: #fdfdf1;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}
.clinic-panel img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream);
  border: 3px solid rgba(253, 253, 241, 0.35);
  margin-bottom: 14px;
}
.clinic-panel h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  margin-bottom: 6px;
}
.clinic-panel .doc { font-size: 0.95rem; color: #e8dcc3; letter-spacing: 0.1em; }
.clinic-panel .divider { height: 1px; background: rgba(253, 253, 241, 0.22); margin: 16px 0; }
.clinic-panel p { font-size: 0.85rem; line-height: 1.9; opacity: 0.95; }
.clinic-panel .wa { font-size: 1.1rem; letter-spacing: 0.08em; color: #e8dcc3; }

@media (max-width: 860px) {
  main.booking-layout { grid-template-columns: 1fr; min-height: 0; padding: 20px 16px 40px; }
  .clinic-panel { display: none; }
  .booking-main { width: 100%; margin-left: 0; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(58, 82, 68, 0.05);
}
.card h2 { font-size: 1.1rem; color: var(--green-dark); margin-bottom: 12px; letter-spacing: 0.06em; }

/* 分頁 */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--muted);
}
.tabs button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 700;
}

/* 步驟指示 */
.steps { display: flex; gap: 6px; margin-bottom: 16px; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.steps span { padding: 4px 10px; border-radius: 20px; background: #f1efe0; }
.steps span.on { background: var(--gold); color: #fff; font-weight: 700; }

/* 表單 */
/* hidden 屬性一律生效（避免被 display 規則蓋過） */
[hidden] { display: none !important; }

label.field { display: block; margin-bottom: 14px; font-size: 0.9rem; color: var(--muted); }
label.field input, label.field select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
label.field input:focus, label.field select:focus { outline: 2px solid var(--green-light); border-color: var(--green); }

button.primary, button.ghost, button.danger, button.small {
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  font-size: 1rem;
}
button.primary {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-weight: 700;
  width: 100%;
}
button.primary:hover { background: var(--green-dark); }
button.primary:disabled { background: #b8c4ba; cursor: not-allowed; }
button.ghost {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 10px 20px;
}
button.danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 8px 14px;
  font-size: 0.9rem;
}
button.small { padding: 6px 12px; font-size: 0.85rem; border: 1px solid var(--line); background: #fff; }

/* 選項卡（初診/複診） */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-grid button {
  padding: 20px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 1rem;
}
.choice-grid button:hover { border-color: var(--green); }
.choice-grid button strong { display: block; font-size: 1.15rem; color: var(--green-dark); margin-bottom: 4px; }
.choice-grid button small { color: var(--muted); }

/* 日期 / 時段按鈕 */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot-grid button {
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}
.slot-grid button:hover { border-color: var(--green); background: var(--green-light); }
.date-list { display: flex; flex-direction: column; gap: 8px; }
.date-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
}
.date-list button:hover { border-color: var(--green); background: var(--green-light); }
.date-list button .n { font-size: 0.8rem; color: var(--muted); }

/* 訊息 */
.msg { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.95rem; display: none; }
.msg.error { display: block; background: #fbeeee; color: var(--danger); border: 1px solid #eecfce; }
.msg.ok { display: block; background: var(--green-light); color: var(--green-dark); border: 1px solid #cfe0d2; }

.summary { background: var(--green-light); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.summary div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 0.95rem; }
.summary div span:first-child { color: var(--muted); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; }
.badge.first { background: var(--gold-light); color: #8a6c3c; }
.badge.return { background: var(--green-light); color: var(--green-dark); }
.badge.internal { background: #eef1ee; color: #55605a; }
.badge.acu { background: #f3e3db; color: #a2542f; }
.badge.both { background: #e8ead9; color: #6b6a2f; }

/* 治療項目複選：選中狀態 */
.choice-grid button.sel { border-color: var(--green); background: var(--green-light); }
body.patient .choice-grid button.sel { border-color: var(--ink-green); background: var(--green-light); }

/* 預約列表 */
.appt-list { display: flex; flex-direction: column; gap: 10px; }
.appt-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
}
.appt-item .when { font-weight: 700; }
.appt-item .who { color: var(--muted); font-size: 0.9rem; }
.appt-item .actions { display: flex; gap: 8px; }

.back-row { margin-top: 14px; }
.hint { font-size: 0.83rem; color: var(--muted); margin-top: 8px; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

/* ===== 後台 ===== */
.admin-nav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-nav button {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
}
.admin-nav button.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type="date"], .toolbar input[type="month"] {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.95rem; font-family: inherit;
}

table.appt-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
table.appt-table th, table.appt-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.appt-table th { color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.table-wrap { overflow-x: auto; }

/* 月曆 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .head { text-align: center; font-size: 0.78rem; color: var(--muted); padding: 4px 0; }
.cal .day {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.75rem;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.cal .day:hover { border-color: var(--green); }
.cal .day.blank { border: none; background: transparent; cursor: default; }
.cal .day.past { opacity: 0.45; }
.cal .day.selected { outline: 2px solid var(--green); }
.cal .day .num { font-weight: 700; font-size: 0.85rem; }
.cal .day .sess { color: var(--green-dark); white-space: nowrap; }
.cal .day .cnt { color: var(--gold); font-weight: 700; }

.sess-rows { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.sess-rows .row { display: flex; gap: 8px; align-items: center; }
.sess-rows select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}

.preset-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.preset-btn {
  padding: 7px 14px;
  border: 1px solid var(--green);
  color: var(--green);
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}
.preset-btn:hover { background: var(--green-light); }

/* 診段開關（排班用） */
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.chip {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  overflow: hidden;
}
.chip button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}
.chip .chip-main {
  padding: 10px 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}
.chip .chip-main small { display: block; font-size: 0.78rem; opacity: 0.85; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--green); }
.chip.sel { background: var(--green); border-color: var(--green); color: #fff; }
.chip.sel .chip-main { font-weight: 700; }
.chip .chip-edit { display: none; }
.chip.sel .chip-edit {
  display: block;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 1rem;
}
.chip.sel .chip-edit:hover { background: rgba(255, 255, 255, 0.18); }

/* 每週範本：一行一天 */
.tpl-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.tpl-row:last-child { border-bottom: none; }
.tpl-label { flex: none; width: 56px; color: var(--green-dark); }
.tpl-row .chip-row { margin: 0; }
.tpl-row .sess-rows { margin: 0; flex-basis: 100%; }
.tpl-row .sess-rows:empty { display: none; }

/* 自訂時段摺疊區 */
#dayAdvanced { margin-top: 12px; }
#dayAdvanced summary { cursor: pointer; color: var(--muted); font-size: 0.86rem; }
#dayAdvanced[open] summary { margin-bottom: 8px; }

/* 診段設定的名稱欄位 */
.sess-rows input.pl {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  width: 140px; font-family: inherit; font-size: 0.95rem; background: #fff;
}

/* 週檢視 */
.week-day { margin-bottom: 16px; }
.week-day:last-child { margin-bottom: 0; }
.week-day-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--green-light); border-radius: 8px;
}
.week-day-head .wd-date { font-weight: 700; color: var(--green-dark); }
.week-day-head .wd-sess { font-size: 0.84rem; color: var(--muted); }
.week-day-head .wd-cnt { margin-left: auto; font-size: 0.84rem; font-weight: 700; color: var(--gold); }
.week-day.today .week-day-head { outline: 2px solid var(--green); }
.week-empty { color: var(--muted); font-size: 0.85rem; padding: 8px 12px 2px; }
.week-day .appt-table { margin-top: 2px; }

/* 卡片內摺疊區（加診） */
summary.card-toggle {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  padding: 2px 0;
  list-style-position: outside;
}
summary.card-toggle:hover { color: var(--green-dark); }
details[open] > summary.card-toggle { margin-bottom: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat-box { background: var(--green-light); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-box .v { font-size: 1.7rem; font-weight: 700; color: var(--green-dark); }
.stat-box .l { font-size: 0.82rem; color: var(--muted); }

.login-wrap { max-width: 380px; margin: 60px auto; }

@media (max-width: 520px) {
  .choice-grid { grid-template-columns: 1fr; }
  .cal .day { min-height: 52px; font-size: 0.65rem; }
  header.site h1 { font-size: 1.05rem; }
}

/* 桌面版放大（須置於檔案最末，覆蓋前面的基礎規則） */
@media (min-width: 861px) {
  footer.site-foot { display: none; }
  .booking-main .card { padding: 30px; }
  .booking-main .card h2 { font-size: 1.2rem; }
  .choice-grid button { padding: 34px 16px; }
  .choice-grid button strong { font-size: 1.35rem; }
  .slot-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .date-list button { padding: 14px 18px; }
}

/* =====================================================
   病患頁 · 禪意簡約（scoped: body.patient，不影響後台）
   宣紙 × 墨綠 × 一縷金
   ===================================================== */
body.patient {
  --paper: #fbfaf0;
  --ink-green: #3a5244;
  --ink-deep: #2b3d32;
  --hairline: #e3dfcc;
  --serif-tc: "Noto Serif TC", "Songti TC", "PMingLiU", "MingLiU", serif;
  background: var(--paper);
}

/* 頁首：素紙、墨字、髮絲線 */
body.patient header.site {
  background: transparent;
  color: var(--ink-green);
  border-bottom: 1px solid var(--hairline);
  padding: 18px 24px;
}
body.patient header.site h1 { letter-spacing: 0.28em; font-weight: 600; }
body.patient header.site .logo { border: 1px solid var(--hairline); background: #fff; }
body.patient header.site .sub {
  color: var(--gold);
  opacity: 1;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

/* 左欄：直排「敬請預約」＋ 金色髮絲線（簽名元素） */
body.patient .clinic-panel {
  background: transparent;
  color: var(--ink-green);
  border-radius: 0;
  border-right: 1px solid var(--hairline);
  padding: 8px 28px 8px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  min-height: 560px;
}
body.patient .panel-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--hairline);
  background: #fff;
  margin: 0;
}
body.patient .motto {
  flex: 1;
  align-self: center;
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-family: var(--serif-tc);
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--ink-green);
  display: flex;
  align-items: center;
}
/* 金線只與文字等高（含在 span 上） */
body.patient .motto span {
  letter-spacing: 0.7em;
  padding-left: 16px;
  border-left: 1px solid var(--gold);
}
body.patient .motto-en {
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--gold);
  margin-top: -8px;
}
body.patient .panel-info .doc { font-size: 0.88rem; letter-spacing: 0.15em; color: var(--ink-green); margin-bottom: 10px; }
body.patient .panel-info p { font-size: 0.78rem; line-height: 2; color: var(--muted); }
body.patient .panel-info .wa { color: var(--gold); letter-spacing: 0.08em; margin-top: 6px; }

/* 分頁：去框，改為底線式 */
body.patient .tabs { gap: 26px; margin-bottom: 22px; border-bottom: 1px solid var(--hairline); }
body.patient .tabs button {
  flex: none;
  min-width: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 2px 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  font-size: 0.98rem;
}
body.patient .tabs button.active {
  background: none;
  color: var(--ink-deep);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* 步驟：漢字數字，當前者著金 */
body.patient .steps { gap: 22px; margin-bottom: 26px; }
body.patient .steps span {
  background: none;
  padding: 0 0 4px;
  border-radius: 0;
  border-bottom: 1px solid transparent;
  letter-spacing: 0.14em;
  color: #b4b2a2;
  font-family: var(--serif-tc);
}
body.patient .steps span.on {
  background: none;
  color: var(--ink-green);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* 區塊：去卡片感，靠留白與髮絲線分章 */
body.patient .card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 6px 2px 34px;
  margin-bottom: 8px;
}
body.patient .card h2 {
  font-family: var(--serif-tc);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-deep);
  margin-bottom: 22px;
}
body.patient .card h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  margin-top: 10px;
}

/* 選項與時段：素白、髮絲框、方正 */
body.patient .choice-grid { gap: 16px; }
body.patient .choice-grid button {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
body.patient .choice-grid button:hover {
  border-color: var(--ink-green);
  transform: translateY(-2px);
}
body.patient .choice-grid button strong {
  font-family: var(--serif-tc);
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--ink-deep);
}
body.patient .date-list button,
body.patient .slot-grid button {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
body.patient .date-list button:hover,
body.patient .slot-grid button:hover {
  background: #fff;
  border-color: var(--ink-green);
}

/* 輸入框：信箋式底線 */
body.patient label.field { color: var(--ink-green); letter-spacing: 0.1em; margin-bottom: 20px; }
body.patient label.field input {
  border: none;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  padding: 8px 2px;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}
body.patient label.field input:focus {
  outline: none;
  border-bottom: 1px solid var(--ink-green);
}

/* 主按鈕：墨綠端方，字距開闊 */
body.patient button.primary {
  border-radius: 4px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  padding: 14px 24px;
  background: var(--ink-green);
  transition: background 0.25s ease;
}
body.patient button.primary:hover { background: var(--ink-deep); }
body.patient button.ghost { border-radius: 4px; letter-spacing: 0.15em; }
body.patient button.small { border-radius: 4px; background: transparent; color: var(--muted); }
body.patient button.danger { border-radius: 4px; }

/* 摘要：金線側註 */
body.patient .summary {
  background: transparent;
  border-left: 2px solid var(--gold);
  border-radius: 0;
  padding: 4px 0 4px 18px;
  margin-bottom: 22px;
}

/* 預約列表項目 */
body.patient .appt-item { background: #fff; border: 1px solid var(--hairline); border-radius: 4px; }
body.patient .badge { border-radius: 2px; letter-spacing: 0.1em; }

/* 頁尾 */
body.patient footer.site-foot { border-top: 1px solid var(--hairline); margin-top: 20px; padding-top: 24px; letter-spacing: 0.06em; }

/* 動：步驟切換時淡入上浮（唯一的動態） */
@keyframes zenFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
body.patient .booking-main .card:not([hidden]) { animation: zenFadeUp 0.35s ease-out; }
@media (prefers-reduced-motion: reduce) {
  body.patient .booking-main .card:not([hidden]) { animation: none; }
  body.patient .choice-grid button:hover { transform: none; }
}

/* 時段分組：上午／下午／晚上 */
.slot-group { margin-bottom: 22px; }
.slot-group:last-child { margin-bottom: 0; }
.slot-group-label {
  font-family: var(--serif-tc, inherit);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.slot-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* 標誌圖像（藥草紮束） */
.brand-mark {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: contain;
}
.panel-mark {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto;
}

/* 印章式標記（取代圖片 Logo） */
.seal {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 8px;
  background: var(--green);
  color: #d9c9a3;
  font-family: var(--serif);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  user-select: none;
}
.seal-lg {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

/* 收費表 */
.price-list { margin-top: 4px; }
.price-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.price-list > div:last-child { border-bottom: none; }
.price-list dt { font-size: 1rem; color: var(--ink); }
.price-list dt span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.price-list dd {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--gold);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-align: right;
}

/* 後台：初診登記資料 */
.reg-info { font-size: 0.85rem; line-height: 1.5; }
.reg-info span { display: block; color: var(--muted); font-size: 0.78rem; }

/* 鍵盤操作焦點 */
body.patient :focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* 手機：單欄維持精簡 */
@media (max-width: 860px) {
  body.patient .clinic-panel { display: none; }
  body.patient header.site { padding: 14px 16px; }
  body.patient .card { padding: 4px 0 26px; }
  body.patient .steps { gap: 14px; }
  body.patient .tabs { gap: 16px; }
}
