/* 華醫論健 CIS 10/10 版（正本：../華醫論健_CIS_Design_System.md、../assets/brand-tokens.css，唯讀）
   這裡先放 brand-tokens 的 --hm-* 變數當底，再對應到語意變數；其他 CSS 檔只能用語意變數，禁止寫死色碼。
   Jerry 之後若有新交付版，只要改這個檔案裡 --hm-* 的值或下面的對應關係，版面程式都不用動。 */
:root {
  /* ---- 華醫論健 Seminar 網站 VI 規範 v1.0（2026-10-27）色票 ---- */
  --hy-primary: #0E5A5E;        /* 華醫青 */
  --hy-primary-dark: #0A3F42;   /* 深青 */
  --hy-primary-mid: #2E8C8A;    /* 青 */
  --hy-primary-light: #DCEEEC;  /* 淡青 */
  --hy-accent: #E8963A;         /* 暖橘 */
  --hy-accent-light: #FBEBD3;   /* 淡橘 */
  --hy-ink: #231F20;            /* 墨黑（與 logo 同色） */
  --hy-text-secondary: #5E5A5B;
  --hy-border: #D9D5D2;
  --hy-bg: #FAF8F4;             /* 暖白 */
  --hy-surface: #FFFFFF;
  --hy-success: #2E7D5B;
  --hy-error: #B3392F;

  --hm-font-display: "Noto Serif TC", "Songti TC", PMingLiU, serif;
  --hm-font-ui: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --hm-text-display: clamp(2.375rem, 5vw, 3.5rem);
  --hm-text-h1: clamp(2rem, 4vw, 2.75rem);
  --hm-text-h2: clamp(1.6875rem, 3vw, 2rem);
  --hm-text-h3: clamp(1.375rem, 2vw, 1.5rem);
  --hm-text-body-lg: clamp(1.1875rem, 1.6vw, 1.25rem);
  --hm-text-body: 1.125rem;
  --hm-text-small: 0.9375rem;
  --hm-container: 75rem;
  --hm-duration-fast: 160ms;
  --hm-duration-normal: 220ms;
  --hm-ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* 版面程式還直接引用的幾個 --hm-* 名稱，對應到新色 */
  --hm-gold-300: var(--hy-accent-light);
  --hm-line-300: var(--hy-border);
  --hm-ink-700: var(--hy-ink);

  /* ---- 語意變數：版面程式只能引用這一層 ---- */
  --brand: var(--hy-primary);
  --brand-hover: var(--hy-primary-dark);
  --brand-ink: #FFFFFF;
  --brand-soft: var(--hy-primary-light);
  --accent: var(--hy-accent);
  --accent-ink: var(--hy-ink);          /* 暖橘底上一律墨黑字 */
  --bg: var(--hy-bg);
  --surface: var(--hy-surface);
  --text: var(--hy-ink);
  --heading-ink: var(--hy-ink);
  --muted: var(--hy-text-secondary);
  --line: var(--hy-border);
  --ok: var(--hy-success);
  --warn: #8A5A10;
  --info: var(--hy-primary);
  --error: var(--hy-error);

  --radius: 16px;
  --radius-button: 12px;
  --radius-hero: 24px;
  --shadow: 0 4px 16px rgba(35, 31, 32, 0.08);
  --focus-ring: 0 0 0 0.25rem rgb(14 90 94 / 25%);

  --font-sans: var(--hm-font-ui);
  --font-serif: var(--hm-font-display);
}

@media (prefers-reduced-motion: reduce) {
  :root { --hm-duration-fast: 0ms; --hm-duration-normal: 0ms; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--hm-text-body); line-height: 1.75;
  padding: 0 20px;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 0 96px; }
.wide { max-width: var(--hm-container); }
h1, h2, h3 { margin: 0; line-height: 1.3; font-family: var(--font-serif); color: var(--heading-ink); text-wrap: balance; }
h1 { font-size: var(--hm-text-h1); }
h2 { font-size: var(--hm-text-h2); }
h3 { font-size: var(--hm-text-h3); }
p { margin: 0; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: var(--hm-text-small); }
.body-lg { font-size: var(--hm-text-body-lg); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---- 按鈕（CIS 7.1）---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 24px; border-radius: var(--radius-button);
  font-size: 1.0625rem; font-weight: 700; font-family: var(--font-sans);
  text-decoration: none; cursor: pointer; border: none;
  transition: background var(--hm-duration-fast) var(--hm-ease-standard);
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--heading-ink); border: 1px solid var(--hm-ink-700); }
.btn-block { width: 100%; }

/* ---- 表單（CIS 7.3）---- */
label { display: block; font-size: 0.9375rem; font-weight: 700; color: var(--heading-ink); margin-bottom: 6px; }
.field { margin-bottom: 20px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="url"], select, textarea {
  width: 100%; min-height: 52px; font-size: 1.125rem; font-family: var(--font-sans);
  padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-button);
  background: var(--surface); color: var(--text);
}
textarea { min-height: 96px; padding: 12px 14px; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--focus-ring); border-color: var(--brand); }
.hint { font-size: var(--hm-text-small); color: var(--muted); margin-top: 6px; }
.error-text { font-size: var(--hm-text-small); color: var(--error); margin-top: 6px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.checkbox-row .checkbox-label { font-size: var(--hm-text-body); font-weight: 400; color: var(--text); }

/* ---- 狀態標籤（CIS 7.4）---- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: var(--hm-text-small); font-weight: 700; }
.tag-ok { background: #e5f0ea; color: var(--ok); }
.tag-warn { background: var(--hm-gold-300); color: var(--accent-ink); }
.tag-off { background: var(--hm-line-300); color: var(--heading-ink); }

/* ---- Hero（CIS 5.2）：紙白到淡金的柔和徑向光暈 ---- */
.hero {
  background: radial-gradient(circle at 50% 15%, var(--brand-soft) 0%, var(--surface) 70%);
  border-radius: var(--radius-hero); padding: 48px 24px; text-align: center;
}
.hero img.logo { width: 240px; max-width: 70%; height: auto; margin: 0 auto 16px; display: block; }

header.site { max-width: var(--hm-container); margin: 0 auto; padding: 20px; display: flex; align-items: center; justify-content: space-between; }
header.site img.logo { width: 180px; height: auto; display: block; }

footer.site {
  max-width: 720px; margin: 48px auto 0; padding: 24px 0 48px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: var(--hm-text-small); text-align: center;
}
footer.site a { color: var(--info); }

.agenda-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: none; }
.agenda-time { flex: none; width: 110px; color: var(--muted); font-variant-numeric: tabular-nums; }

.speaker-card { display: flex; gap: 16px; align-items: flex-start; }
.speaker-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; background: var(--hm-line-300); }

.qr-box { text-align: center; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.qr-box img { width: 200px; height: 200px; }

/* 電腦上點 LINE oaMessage 連結叫不出 LINE app，旁邊附一組 QR 讓手機掃（只在滑鼠型裝置顯示） */
.lineqr { display: none; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--heading-ink); margin-top: 12px; }
.lineqr svg { width: 110px; height: 110px; flex: none; }
/* LINE 綁定：oaMessage 連結在電腦上叫不出 LINE app（只會開 LINE 網頁），
   所以電腦（滑鼠裝置）只顯示 QR 給手機掃，手機（觸控裝置）只顯示按鈕 */
@media (hover: hover) and (pointer: fine) { .lineqr { display: flex; } .only-touch { display: none !important; } }

.ticket-seat-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.step-list { padding-left: 0; margin: 0; list-style: none; }
.step-list li { padding: 2px 0; color: var(--muted); }
.step-list li.active { color: var(--heading-ink); font-weight: 700; }

/* ---- 後台（內部工具，桌面優先，仍沿用語意變數）---- */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 80px; }
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-family: var(--font-sans); font-size: 14px; color: var(--heading-ink); }
.tab-btn.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
table.admin-table th, table.admin-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.admin-table th { background: var(--bg); font-weight: 700; }
table.admin-table tr:hover td { background: rgba(0,0,0,.015); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.admin-field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

/* ---- VI v1.0：Logo lockup（四環圖形＋宋體字標；設計師正式組合版交付前的暫代）---- */
a.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--heading-ink); flex: none; white-space: nowrap; }
a.brand img { width: 44px; height: 44px; display: block; }
a.brand span { font-family: var(--font-serif); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.12em; }
@media (max-width: 480px) {
  a.brand { gap: 8px; }
  a.brand img { width: 34px; height: 34px; }
  a.brand span { font-size: 1.25rem; letter-spacing: 0.06em; }
}
.hero-lockup { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 20px; }
.hero-lockup img { width: 112px; height: 112px; }
.hero-lockup span { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2.25rem, 6vw, 3rem); letter-spacing: 0.2em; color: var(--heading-ink); padding-left: 0.2em; }
.hero-lockup small { font-family: var(--font-serif); color: var(--brand); font-size: 1.0625rem; letter-spacing: 0.1em; }
