/* 煥亮診所 — 白瓷描金
   象牙白是桌面，白瓷是要細讀的紙面，杯緣與照片框描金，深咖啡是字與結構，緞面茶巾承接承諾與行動，
   深咖啡漆面是唯一的預約行動，香檳只標示選中與倒入，柿紅只給注意事項。光感只在描金、香檳與緞面上。 */

@font-face {
  font-family: "GenRyuMin";
  src: url("../fonts/genryumin-subset.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #faf7f1;          /* 象牙白：桌面與大面積底色 */
  --mist: #f3ece1;           /* 香檳霧：次要底色、照片框杯底 */
  --porcelain: #ffffff;      /* 白瓷：閱讀紙面、卡片、頁首 */
  --porcelain-shade: #f6f1e8;
  --ink: #2a221c;            /* 深咖啡：字與結構 */
  --ink-2: #5b4e43;          /* 次要文字，在所有淺色底上都 ≥ 4.5:1 */
  --gold: #c2a26a;           /* 描金：杯緣、照片框、細邊 */
  --gold-hi: #efe0bb;        /* 描金受光處；深色底上的標籤字 */
  --gold-lo: #9c7c45;        /* 描金背光處 */
  --gold-line: #e2d2ae;      /* 淡金細線：頁首底線、茶巾邊、選取底色 */
  --gold-deep: #8e6f3c;      /* 圖示與非文字記號，在淺色底上 ≥ 3:1 */
  --gold-edge: rgb(214 186 130 / 0.6);    /* 漆面按鈕的金邊 */
  --gold-on-dark: rgb(214 186 130 / 0.28); /* 深咖啡底上的分隔線 */
  --satin: #efe5d3;          /* 緞面茶巾 */
  --satin-hi: #fbf6ec;       /* 緞面受光處 */
  --satin-edge: #dccaa5;
  --lacquer: #2a221c;        /* 深咖啡漆面：預約 */
  --lacquer-hover: #3b3027;
  --lacquer-text: #f3e6c9;   /* 漆面上的香檳色字 */
  --champagne: #c9a96e;      /* 香檳：選中與倒入，不當文字色 */
  --caution: #8a2f1c;        /* 柿紅：注意事項 */
  --rule: rgb(42 34 28 / 0.14);
  --rule-strong: rgb(42 34 28 / 0.28);
  /* 描金：圓形杯緣用的金屬光感（亮暗交替繞一圈） */
  --gilt: conic-gradient(from 210deg, var(--gold-hi), var(--gold), var(--gold-lo), var(--gold), var(--gold-hi), var(--gold), var(--gold-lo), var(--gold), var(--gold-hi));

  --font-ming: "GenRyuMin", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-body: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;

  --gutter: clamp(20px, 4.4vw, 72px);
  --section: clamp(64px, 8vw, 120px);
  --measure: 1400px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-cup: 0 18px 30px -20px rgb(70 52 32 / 0.42), 0 2px 6px -2px rgb(70 52 32 / 0.12);
  --shadow-lift: 0 26px 40px -24px rgb(70 52 32 / 0.5), 0 4px 12px -4px rgb(70 52 32 / 0.16);
  --shadow-hairline: 0 1px 0 rgb(42 34 28 / 0.06);

  color-scheme: light;
  accent-color: var(--ink);
  scrollbar-color: var(--gold-deep) var(--mist);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font: 400 17px/1.85 var(--font-body);
  caret-color: var(--champagne);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold-line); color: var(--ink); }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.32em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 10px; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 40;
  padding: 10px 18px; background: var(--ink); color: var(--porcelain);
  border-radius: 10px; text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; }

.ic {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.seg { display: inline-block; }

/* 區塊標題：源流明體 */
.finder-head h2,
.steps h2,
.pg-intro h2,
.notice h2,
.doctors-head h2,
.rooms-head h2,
.faq h2,
.directory h2,
.close-panel h2,
.tx-more h2 {
  font: 500 clamp(30px, 3.2vw, 46px)/1.3 var(--font-ming);
  letter-spacing: 0.02em;
  text-wrap: balance;
}

/* ---------- 預約：深咖啡漆面、細金邊、香檳色字 ---------- */

.btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  background-color: var(--lacquer);
  color: var(--lacquer-text);
  border: 0; border-radius: 12px;
  font: 700 16px/1.2 var(--font-body);
  letter-spacing: 0.04em;
  text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--gold-edge), var(--shadow-cup);
  transition: background-color 0.2s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-line:hover { background-color: var(--lacquer-hover); transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--gold-edge), var(--shadow-lift); }
.btn-line:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px var(--gold-edge), var(--shadow-cup); }
.btn-line .ic { width: 20px; height: 20px; }
.btn-line-lg { min-height: 56px; padding: 14px 28px; font-size: 18px; }
.btn-line-lg .ic { width: 22px; height: 22px; }

.caution {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; line-height: 1.5; font-weight: 700;
  color: var(--caution);
}
.caution .ic { width: 18px; height: 18px; }

.tbd {
  display: inline-block;
  justify-self: start;
  padding: 0 12px;
  border: 1px dashed var(--ink-2);
  border-radius: 999px;
  font-size: 14px; line-height: 1.9;
}

/* 照片框：圓形杯口，院方照片放進來之前是香檳霧底加虛線圈 */
.photo-slot {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mist);
  color: var(--ink-2);
  text-align: center;
  font-size: 13px; line-height: 1.6;
  overflow: hidden;
  box-shadow: inset 0 0 0 var(--slot-rim, 0px) var(--gold);
}
.photo-slot::after {
  content: ""; position: absolute; inset: 12%;
  border: 1px dashed var(--gold-deep); border-radius: 50%;
  opacity: 0.55;
}
.photo-slot > span { position: relative; z-index: 1; padding: 0 22%; }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 院方照片：去背半身照坐在香檳霧杯底，描金杯緣疊在照片上 */
.has-photo::after { inset: 0; border: 0; opacity: 1; box-shadow: inset 0 0 0 var(--slot-rim, 0px) var(--gold); }

/* ---------- 頁首 ---------- */

.site-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: clamp(20px, 3vw, 48px);
  min-height: 72px; padding: 12px var(--gutter);
  background: var(--porcelain);
  border-bottom: 1px solid var(--gold-line);
}
.brand { position: relative; flex: none; display: block; }
.brand img { display: block; width: auto; height: 40px; }
/* Logo 的光：一道柔光斜斜掃過 Logo（以 Logo 為遮罩，光只落在筆畫上，像光線滑過描金），
   經過圓標時裡面的星芒閃一下。何時播放由 site.js 決定：載入一次、滑過或鍵盤停在 Logo 上再一次。 */
.brand-glint {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 43%, rgb(255 246 222 / 0.78) 47.6%, rgb(255 255 255 / 0.98) 50%, rgb(255 246 222 / 0.78) 52.4%, transparent 57%) 100% 0 / 300% 100% no-repeat;
  -webkit-mask: url("../img/logo-h.svg") 0 0 / 100% 100% no-repeat;
  mask: url("../img/logo-h.svg") 0 0 / 100% 100% no-repeat;
}
.brand-star {
  position: absolute; left: 6.05%; top: 57.97%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  opacity: 0; pointer-events: none;
  filter: drop-shadow(0 0 2px rgb(255 244 214 / 1)) drop-shadow(0 0 7px rgb(239 224 187 / 0.9));
}
.brand-star::before {
  content: ""; position: absolute; inset: 0;
  background: var(--porcelain);
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
}
.site-nav { display: flex; gap: clamp(16px, 2.2vw, 32px); margin-left: auto; }
.site-nav a,
.nav-strip a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  font-size: 15px; line-height: 1.4;
  text-decoration: none; white-space: nowrap;
  transition: border-color 0.2s var(--ease);
}
.site-nav a:hover,
.nav-strip a:hover { border-bottom-color: var(--rule-strong); }
.site-nav a[aria-current="true"],
.nav-strip a[aria-current="true"] { border-bottom-color: var(--champagne); font-weight: 700; }
.btn-line-head { min-height: 42px; padding: 9px 16px; font-size: 15px; box-shadow: inset 0 0 0 1px var(--gold-edge); }
.js .home .btn-line-head { transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease); }
.js .home:not(.tray-away) .btn-line-head { opacity: 0; visibility: hidden; }
.btn-line-head .ic { width: 18px; height: 18px; }
.nav-strip { display: none; }

/* ---------- 首頁：茶席 ---------- */

.table { background: var(--ivory); }
.table-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 33vw, 480px);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
  max-width: 1600px;
  padding: clamp(20px, 1.8vw, 28px) var(--gutter) clamp(24px, 2.4vw, 36px);
}
.greet { padding-top: clamp(24px, 4.4vw, 72px); }
.greet h1 {
  font: 500 clamp(40px, 5.4vw, 82px)/1.24 var(--font-ming);
  letter-spacing: 0.02em;
}
.greet h1 .l { display: block; }
.greet-sub .l { display: block; text-wrap: balance; }
.greet-sub {
  max-width: 25em;
  margin-top: clamp(20px, 2.4vw, 32px);
  font-size: clamp(17px, 1.4vw, 20px); line-height: 1.95;
  color: var(--ink-2);
}

/* 大杯：俯看的白瓷杯口，描金杯緣，杯裡是院方的診所照，照片外再描一圈細金線 */
.big-cup {
  --rim: clamp(10px, 1.1vw, 16px);
  position: relative;
  aspect-ratio: 1;
  border: var(--rim) solid transparent;
  border-radius: 50%;
  background: linear-gradient(var(--porcelain), var(--porcelain)) padding-box, var(--gilt) border-box;
  box-shadow: var(--shadow-cup);
}
.big-cup .photo-slot { position: absolute; inset: clamp(8px, 1vw, 14px); font-size: 15px; box-shadow: 0 0 0 1px var(--gold); }

/* 緞面茶巾：首屏與門診區各一條，承接三只承諾杯與漆面預約；淡淡的斜向光感，邊上一道細金線 */
.runner {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 48px;
  padding: clamp(28px, 3vw, 40px) var(--gutter);
  background: linear-gradient(105deg, var(--satin) 0%, var(--satin-hi) 36%, var(--satin) 60%, var(--satin-hi) 88%, var(--satin) 100%);
  border-block: 1px solid var(--satin-edge);
}
.runner::before,
.runner::after {
  content: ""; position: absolute; left: 0; right: 0;
  border-top: 1px solid var(--gold-line);
}
.runner::before { top: 8px; }
.runner::after { bottom: 8px; }

.cups { display: flex; flex-wrap: wrap; gap: 20px clamp(28px, 4.4vw, 72px); }
.cups li { display: grid; justify-items: center; align-content: start; gap: 12px; text-align: center; }
.cup {
  position: relative;
  width: clamp(60px, 5.6vw, 84px); aspect-ratio: 1;
  border: clamp(6px, 0.6vw, 9px) solid transparent;
  border-radius: 50%;
  background: linear-gradient(var(--porcelain), var(--porcelain)) padding-box, var(--gilt) border-box;
  box-shadow: var(--shadow-cup);
}
.cup i {
  position: absolute; inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--gold-hi) 0 16%, var(--champagne) 58%, var(--gold-lo) 100%);
}
.cup-label { font: 500 clamp(17px, 1.45vw, 21px)/1.4 var(--font-ming); text-wrap: balance; }
.tray { min-height: 64px; padding: 18px 34px; font-size: 20px; border-radius: 14px; }
.tray .ic { width: 22px; height: 22px; }

/* 奉茶：載入時三只杯子依序倒入香檳（預設就是滿杯，動畫只是從空杯開始） */
@keyframes pour {
  from { transform: scale(0.25); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.js .table .cup i { animation: pour 1.1s var(--ease) both; animation-delay: calc(450ms + var(--n) * 260ms); }

/* ---------- 首頁：從困擾找到療程 ---------- */

.finder { padding: clamp(28px, 2.6vw, 40px) var(--gutter) var(--section); background: var(--ivory); }
.finder-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27em);
  gap: 16px clamp(32px, 5vw, 80px); align-items: end;
  max-width: var(--measure); margin-bottom: clamp(28px, 3vw, 40px);
}
.finder-head p { color: var(--ink-2); }

.shelves { max-width: var(--measure); border-top: 1px solid var(--rule-strong); }
.level {
  display: grid; grid-template-columns: 10em minmax(0, 1fr);
  column-gap: clamp(20px, 3vw, 40px);
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.endcap {
  grid-column: 1; grid-row: 1;
  padding-top: 8px;
  font: 500 20px/1.4 var(--font-ming);
  letter-spacing: 0.12em;
}
.row { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* 困擾：白瓷圓籤、細金邊；選中時從杯底注滿深咖啡 */
.talker {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: baseline; gap: 6px;
  min-height: 44px; padding: 9px 18px 10px;
  border-radius: 999px;
  background: var(--porcelain);
  box-shadow: inset 0 0 0 1px var(--gold), var(--shadow-hairline);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.35s var(--ease);
}
.talker::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}
.talker:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--gold), var(--shadow-cup); }
.talker[aria-expanded="true"] { color: var(--porcelain); }
.talker[aria-expanded="true"]::before { transform: none; }
.talker-main { font: 500 17px/1.3 var(--font-ming); }
.talker-sub { font-size: 12.5px; line-height: 1.3; color: var(--ink-2); transition: color 0.35s var(--ease); }
.talker[aria-expanded="true"] .talker-sub { color: var(--mist); }

.row-end { margin-left: 6px; }
.ask {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 2px;
  font-size: 14px; font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--rule-strong);
}
.ask .ic { width: 18px; height: 18px; }

/* 茶牌：選中的困擾對應的療程、許可證字號與預約 */
.rail {
  grid-column: 2;
  display: none;
  margin-top: 16px;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--porcelain);
  border-radius: 20px;
  box-shadow: var(--shadow-cup);
}
.rail.is-open,
.no-js .rail:target {
  display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr);
  gap: 20px clamp(20px, 3vw, 40px);
}
.rail:focus-visible { outline-offset: 4px; border-radius: 20px; }
.rail-lead h4 { font: 500 24px/1.35 var(--font-ming); }
.rail-lead p { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); font-variant-numeric: tabular-nums; text-wrap: balance; }
/* 對應療程：等寬等高的茶牌格；欄寬以最長的療程名（Thermage CPT 電波拉提）一行放得下為準 */
.tickets {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13em), 1fr)); grid-auto-rows: 1fr;
  align-content: start; gap: 10px;
}
.tickets li { display: grid; }
.rail-act {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 12px 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
@keyframes steep {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.js .rail.is-open { animation: steep 0.5s var(--ease); }
.js .rail.is-open .ticket { animation: steep 0.45s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 80ms); }

/* 療程籤（茶牌上的一格），療程頁與醫師頁也共用 */
.ticket {
  display: grid; align-content: start; gap: 2px;
  padding: 10px 16px 12px;
  border-radius: 12px;
  background: var(--porcelain);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.ticket:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--ink), var(--shadow-cup); }
.ticket b { font: 500 17px/1.4 var(--font-ming); }
.tag-cat { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.permit { display: block; font-size: 12px; line-height: 1.55; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- 首頁：三個步驟 ---------- */

.steps { padding: var(--section) var(--gutter); background: var(--porcelain); }
.steps h2 { max-width: var(--measure); margin-bottom: clamp(32px, 4vw, 56px); }
.ritual {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(28px, 4vw, 64px);
  max-width: var(--measure);
}
.ritual::before {
  content: ""; position: absolute; left: 40px; right: 18%; top: 40px;
  border-top: 1px dashed var(--gold);
}
.ritual li { position: relative; display: grid; align-content: start; gap: 12px; }
.step-cup {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 80px; height: 80px;
  border: 7px solid transparent;
  border-radius: 50%;
  background: linear-gradient(var(--porcelain), var(--porcelain)) padding-box, var(--gilt) border-box;
  box-shadow: var(--shadow-cup);
  font: 500 28px/1 var(--font-ming);
}
.step-title { margin-top: 10px; font: 500 clamp(21px, 1.8vw, 25px)/1.4 var(--font-ming); }
.ritual p { max-width: 22em; color: var(--ink-2); }

/* ---------- 首頁：57 項療程總表 ---------- */

.planogram { padding: var(--section) var(--gutter); background: var(--mist); }
.pg-intro { max-width: 46em; margin-bottom: clamp(28px, 3vw, 40px); }
.pg-intro p { margin-top: 12px; color: var(--ink-2); }
.pg-status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 16px !important;
  font-size: 15px; font-weight: 700;
  color: var(--ink) !important;
}
.pg-clear {
  min-height: 36px; padding: 6px 16px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  font: 700 14px/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.pg-clear:hover { background: var(--ink); color: var(--porcelain); }
.pg-sheet {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  max-width: 1560px;
  background: var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow-cup);
  overflow: hidden;
}
.pg-col { background: var(--porcelain); scroll-margin-top: 110px; }
.pg-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 16px 18px 14px;
  background: var(--porcelain-shade);
  font: 500 19px/1.3 var(--font-ming);
}
.pg-head span { font: 700 13px/1 var(--font-body); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pg-col ul { display: grid; gap: 2px; padding: 10px; }
.pg-cell { border-radius: 10px; transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.pg-cell > a {
  position: relative;
  display: grid; gap: 1px;
  padding: 8px 10px 9px 28px;
  color: inherit; text-decoration: none;
}
.pg-cell > a::before {
  content: ""; position: absolute; left: 10px; top: 15px;
  width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--gold);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.pg-cell b { font: 500 15.5px/1.45 var(--font-ming); }
.pg-cell:hover { background: var(--mist); }
.pg-cell > a:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.pg-cell.is-hit { background: var(--mist); }
.pg-cell.is-hit > a::before { background: var(--champagne); box-shadow: none; }
.pg-cell.is-miss { color: var(--ink-2); }
.pg-cell.is-miss > a::before { box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* ---------- 首頁：標語 ---------- */

.motto { padding: clamp(88px, 12vw, 176px) var(--gutter); background: var(--ivory); }
.motto-text {
  max-width: 12em;
  font: 500 clamp(36px, 4.8vw, 68px)/1.4 var(--font-ming);
  letter-spacing: 0.02em;
}
.motto-text .l { display: block; }
.motto-text .w { transition: opacity 0.9s var(--ease); }
.can-reveal .motto-text .w:not(.is-on) { opacity: 0.24; }

/* ---------- 首頁：看療程之前 ---------- */

.notice { padding: var(--section) var(--gutter); background: var(--porcelain); }
.notice h2 { max-width: var(--measure); margin-bottom: clamp(24px, 3vw, 36px); }
.notice-sheet {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: var(--measure);
  border-top: 1px solid var(--rule-strong);
}
.notice-sheet li { padding: 24px 32px 28px 0; border-bottom: 1px solid var(--rule); }
.notice-sheet li:nth-child(even) { padding: 24px 0 28px 32px; border-left: 1px solid var(--rule); }
.notice-sheet h3 { display: flex; align-items: center; gap: 10px; font: 500 21px/1.45 var(--font-ming); }
.notice-sheet h3 .ic { width: 22px; height: 22px; color: var(--gold-deep); }
.notice-sheet h3 .ic-warn { color: var(--caution); }
.notice-sheet p { max-width: 30em; margin-top: 8px; color: var(--ink-2); }
.notice-sheet a { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--ink); }
.notice-sheet a .ic { width: 1em; height: 1em; }

/* ---------- 首頁：看診醫師 ---------- */

.doctors { padding: var(--section) var(--gutter); background: var(--mist); }
.doctors-head,
.rooms-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26em);
  gap: 16px clamp(32px, 5vw, 80px); align-items: end;
  max-width: var(--measure); margin-bottom: clamp(28px, 3vw, 40px);
}
.doctors-head p,
.rooms-head p { color: var(--ink-2); }
.plates { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; max-width: var(--measure); }
.plate {
  display: grid; justify-items: center; align-content: start; gap: 4px;
  height: 100%;
  padding: 24px 16px 22px;
  border-radius: 18px;
  background: var(--porcelain);
  box-shadow: var(--shadow-hairline);
  color: inherit; text-align: center; text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.plate:hover,
.plate:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.plate .photo-slot { --slot-rim: 5px; width: 96px; margin-bottom: 12px; font-size: 12px; line-height: 1.45; }
.plate b { font: 500 24px/1.35 var(--font-ming); letter-spacing: 0.08em; }
.plate-role { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.board-more { max-width: var(--measure); margin-top: 28px; font-size: 15px; font-weight: 700; }

/* ---------- 首頁：常見問題 ---------- */

.faq { padding: var(--section) var(--gutter); background: var(--porcelain); }
.faq h2 { max-width: var(--measure); margin-bottom: 24px; }
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; max-width: var(--measure); }
.faq-item { padding: 24px 0 28px; border-top: 1px solid var(--rule); }
.faq-item h3 { font: 700 18px/1.6 var(--font-body); text-wrap: balance; }
.faq-item p { margin-top: 8px; color: var(--ink-2); }
.faq-item a { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--ink); }
.faq-item a .ic { width: 1em; height: 1em; }

/* ---------- 首頁：診所環境（院方照片印在白瓷紙卡上，擺在象牙白桌面） ---------- */

.rooms { padding: var(--section) var(--gutter); background: var(--ivory); }
.room-prints {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  max-width: var(--measure); margin: 0; padding: 0; list-style: none;
}
.room-prints li { padding: 10px; border-radius: 20px; background: var(--porcelain); box-shadow: var(--shadow-cup); }
.room-prints img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* ---------- 首頁：門診與分院（收尾在同一條茶巾上預約） ---------- */

.contact { padding-top: var(--section); background: var(--ink); color: var(--porcelain); }
.contact-top {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px clamp(40px, 6vw, 120px);
  max-width: 1560px;
  padding: 0 var(--gutter) clamp(48px, 6vw, 88px);
}
.directory h2 { margin-bottom: 24px; color: var(--porcelain); }
.directory dl { border-top: 1px solid var(--gold-on-dark); }
.directory dl > div {
  display: grid; grid-template-columns: 9em 1fr; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gold-on-dark);
}
.directory dt { color: var(--gold-hi); }
.directory .tbd { color: var(--mist); border-color: var(--mist); }
.directory dd a { display: inline-flex; align-items: center; gap: 4px; }
.directory dd a .ic { width: 1em; height: 1em; }
.hours { display: grid; grid-template-columns: max-content max-content; gap: 4px 24px; font-variant-numeric: tabular-nums; }
.closing { align-self: end; }
.fast-title { font: 500 clamp(26px, 2.6vw, 36px)/1.4 var(--font-ming); }
.closing p + p { margin-top: 10px; color: var(--mist); }
.contact .runner { color: var(--ink); }

/* ---------- 頁尾 ---------- */

.site-foot {
  display: grid; gap: 16px;
  padding: 40px var(--gutter) 48px;
  background: var(--porcelain-shade);
  font-size: 13.5px; line-height: 1.8; color: var(--ink-2);
}
.foot-brand { margin-bottom: 20px; }
.foot-brand img { display: block; width: auto; height: 88px; }
.legal dl { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.legal dl > div { display: flex; align-items: center; gap: 8px; }
.legal .tbd { font-size: 12px; }
.offlabel { max-width: 62em; }

/* ---------- 療程頁 ---------- */

.crumb { padding: 20px var(--gutter) 0; background: var(--ivory); font-size: 14px; color: var(--ink-2); }
.crumb ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.crumb li + li::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; margin: 0 12px 2px 10px;
  border-top: 1px solid var(--ink-2); border-right: 1px solid var(--ink-2);
  rotate: 45deg;
}
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb .crumb-cat { font-weight: 700; color: var(--ink); }
.crumb [aria-current] { color: var(--ink); }

.tx-hero {
  display: grid; grid-template-columns: minmax(320px, 40fr) 60fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding: 20px var(--gutter) clamp(40px, 5vw, 72px);
  background: var(--ivory);
}
.tx-id { min-width: 0; }
.tx-id h1 {
  margin-top: 8px;
  font: 500 clamp(38px, 4.6vw, 68px)/1.2 var(--font-ming);
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.tx-tagline { margin-top: 12px; font: 500 clamp(19px, 1.7vw, 23px)/1.6 var(--font-ming); color: var(--ink-2); }

/* 規格：一列茶牌，數字等寬 */
.spec-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tx-id .spec-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); }
.spec-strip .ticket { padding: 12px 16px 14px; box-shadow: var(--shadow-cup); }
.spec-strip .ticket b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ticket-permit { gap: 4px; }
.tx-permit {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 16px;
  font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.tx-permit span { color: var(--ink); }
.tx-act { justify-content: flex-start; margin-top: 24px; padding-top: 0; border-top: 0; }

.tx-concerns { margin-top: 32px; }
.tx-concerns h2,
.tx-concerns h3 { font: 500 18px/1.4 var(--font-ming); }
.mini-shelf { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mini-shelf .talker { min-height: 40px; padding: 7px 16px 8px; }
.mini-shelf .talker-main { font-size: 15.5px; }

.tx-pos {
  min-width: 0;
  padding: clamp(20px, 2.4vw, 36px);
  border-radius: 22px;
  background: var(--porcelain);
  box-shadow: var(--shadow-cup);
}
.pos-compare, .qa { scroll-margin-top: 150px; }
.pos-title { margin-bottom: 14px; font: 500 clamp(22px, 2vw, 28px)/1.4 var(--font-ming); text-wrap: balance; }
.pos-fit .pos-title:not(:first-child) { margin-top: 28px; }
.pos-more { margin-top: 12px; font-size: 14px; font-weight: 700; }
.fit-list { border-top: 1px solid var(--rule-strong); }
.fit-list li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.fit-list b { font: 500 18px/1.5 var(--font-ming); }
.fit-list span { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.fit-lead { color: var(--ink-2); }
.pair-list { display: flex; flex-wrap: wrap; gap: 8px; }
.q-list { border-top: 1px solid var(--rule-strong); }
.q-list li { border-bottom: 1px solid var(--rule); }
.q-list a { display: block; padding: 12px 0; font-weight: 700; text-decoration: none; }
.q-list a:hover { text-decoration: underline; }

/* 比較表：白瓷細線表格，本療程那一欄是深咖啡表頭 */
.table-wrap { overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--rule-strong); }
/* 放在白瓷卡片裡的比較表不再加框，只靠表頭色帶與細線分格，避免框中框 */
.tx-pos .table-wrap { border-radius: 10px; box-shadow: none; }
.cmp { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.7; }
.cmp th,
.cmp td { padding: 12px 14px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.cmp th + th,
.cmp th + td,
.cmp td + td { border-left: 1px solid var(--rule); }
.cmp thead th { background: var(--mist); font-weight: 700; line-height: 1.45; }
.cmp thead th.own { background: var(--ink); color: var(--porcelain); }
.cmp tbody th { background: color-mix(in srgb, var(--mist) 50%, transparent); font-weight: 700; }
.cmp tbody tr:last-child > * { border-bottom: 0; }

/* 段落目錄：捲動時貼在頁首下，標出目前段落 */
.toc {
  position: sticky; top: 72px; z-index: 20;
  padding: 10px var(--gutter);
  background: var(--porcelain);
  border-bottom: 1px solid var(--rule);
}
.toc ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.toc ul::-webkit-scrollbar { display: none; }
.toc a {
  display: block; padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px; line-height: 1.5; white-space: nowrap;
  color: var(--ink-2); text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.toc a:hover { background: var(--mist); color: var(--ink); }
.toc a[aria-current="true"] { background: var(--ink); color: var(--porcelain); }

/* 閱讀欄 */
.tx-body { padding: 16px var(--gutter) 88px; background: var(--porcelain); }
.col { max-width: 42em; margin: 0 auto; }
.sec { padding-top: 48px; scroll-margin-top: 140px; }
.sec h2 {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
  font: 500 clamp(24px, 2.2vw, 30px)/1.4 var(--font-ming);
}
.sec h2 .ic-warn { width: 24px; height: 24px; color: var(--caution); }
#sec-intro p:first-child { font-size: 18px; }
.sec h3 { margin-top: 28px; font-size: 18px; font-weight: 700; line-height: 1.6; }
.sec h2 + h3 { margin-top: 0; }
.sec p + p,
.sec ul + p,
.sec p + ul,
.sec .table-wrap + p { margin-top: 14px; }
.sec ul:not(.pair-list, .spec-strip, .q-list) { margin-top: 10px; padding-left: 1.3em; list-style: disc; }
.sec ul:not(.pair-list, .spec-strip, .q-list) li + li { margin-top: 6px; }
.sec li::marker { color: var(--gold-deep); }
.sec .table-wrap { margin-top: 16px; }
.sec .pair-list { margin-top: 4px; }
.qa { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.qa h3 { margin-top: 0; }
.qa p { margin-top: 6px; color: var(--ink-2); }
.qa p + p { margin-top: 8px; }

.reminder {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; padding: 16px 20px;
  border-radius: 14px;
  background: var(--mist);
}
.reminder .ic { margin-top: 5px; color: var(--gold-deep); }
.sec .reminder + .reminder { margin-top: 10px; }
.tx-notice {
  padding: 4px 24px 20px;
  border-radius: 18px;
  background: var(--porcelain-shade);
  box-shadow: inset 0 0 0 1px rgb(138 47 28 / 0.3);
}
.tx-notice > :first-child { margin-top: 16px; }

/* 醫師觀點 */
.quote { margin-top: 20px; padding: 24px 28px; border-radius: 18px; background: var(--mist); }
.quote-title { font: 500 20px/1.55 var(--font-ming); }
.quote blockquote { margin: 10px 0 0; }
.quote blockquote p + p { margin-top: 8px; }
.quote-by { margin-top: 12px; font-weight: 700; }

/* 收尾：適合你嗎？ */
.tx-close {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 5vw, 80px);
  padding: clamp(56px, 7vw, 96px) var(--gutter);
  background: var(--ivory);
}
.close-panel p { margin-top: 10px; color: var(--ink-2); }
.close-panel .rail-act { justify-content: flex-start; margin-top: 24px; padding-top: 0; border-top: 0; }
.tx-close .tx-concerns { align-self: end; margin-top: 0; }

.tx-more { padding: clamp(56px, 7vw, 96px) var(--gutter); background: var(--porcelain); }
.tx-more h2 { margin-bottom: 20px; }
.more-list.spec-strip { margin-top: 0; }
.more-list .ticket { padding: 8px 14px 9px; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.more-list .ticket b { font-size: 16px; }

/* ---------- 醫師頁 ---------- */

.dr-page main { background: var(--ivory); }
.dr-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30em);
  gap: 12px clamp(32px, 5vw, 80px); align-items: end;
  padding: clamp(40px, 5vw, 72px) var(--gutter) 32px;
}
.dr-head h1 { font: 500 clamp(40px, 5vw, 72px)/1.2 var(--font-ming); letter-spacing: 0.02em; }
.dr-head p { color: var(--ink-2); }

.rack {
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2.8fr);
  gap: 20px;
  padding: 0 var(--gutter) clamp(56px, 7vw, 96px);
}
.shelf.shelf-lead { display: flex; }
.shelf-lead .namecard { flex: 1; }
.shelf-rows { display: grid; gap: 20px; align-content: start; }
.shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.shelf > li { display: flex; min-width: 0; }
.shelf > li > .namecard { flex: 1; }

/* 名牌：白瓷，上方一只描金圓杯照片框 */
.namecard {
  display: grid; justify-items: start; align-content: start; gap: 6px;
  padding: 22px 18px 20px;
  border-radius: 18px;
  background: var(--porcelain);
  box-shadow: var(--shadow-hairline);
  color: inherit; text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.namecard:hover,
a.namecard:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.namecard .photo-slot { --slot-rim: 5px; width: 76px; margin-bottom: 10px; font-size: 12px; line-height: 1.4; }
.title-plate {
  display: inline-block; margin-right: 8px; padding: 1px 10px; vertical-align: 0.1em;
  border-radius: 999px;
  background: var(--ink); color: var(--porcelain);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em;
}
.nc-name { font: 500 26px/1.3 var(--font-ming); letter-spacing: 0.08em; }
.namecard .sp { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.namecard-lead { padding: 32px 28px; }
.namecard-lead .photo-slot { --slot-rim: 8px; width: 168px; font-size: 13px; }
.namecard-lead .nc-name { font-size: clamp(30px, 3.2vw, 46px); }
.namecard-lead .sp { font-size: 15px; }
.namecard-mini { gap: 2px; padding: 14px 16px; }
.namecard-mini .nc-name { font-size: 20px; }
/* 其他看診醫師：九張排成平均的兩列（5＋4），職稱保持一行 */
.shelf-mini { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dr-close { background: var(--porcelain); }

.dr-layout {
  display: grid; grid-template-columns: minmax(320px, 44em) minmax(0, 1fr);
  grid-template-areas: "front aside" "back aside";
  column-gap: clamp(28px, 4vw, 72px);
  padding: 20px var(--gutter) 72px;
}
.dr-page .crumb { background: transparent; }
.dr-hero { grid-area: front; }
.shelf-solo { display: block; }
/* 個人頁名牌：照片在左、姓名職稱在右，專長項目橫跨整張名牌放在姓名正下方 */
.namecard-lg {
  grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 26px clamp(20px, 2.6vw, 36px);
  padding: clamp(24px, 3vw, 40px); border-radius: 24px; box-shadow: var(--shadow-cup);
}
.namecard-lg .nc-id { display: grid; justify-items: start; gap: 8px; }
.namecard-lg .photo-slot { --slot-rim: 8px; width: clamp(140px, 14vw, 188px); margin-bottom: 0; font-size: 13px; }
.namecard-lg h1 { font: 500 clamp(44px, 5vw, 68px)/1.15 var(--font-ming); letter-spacing: 0.08em; }
.namecard-lg .sp { font-size: 16px; }
.dr-act { grid-area: aside; align-self: start; position: sticky; top: 96px; padding-top: 24px; }
.dr-act > p { max-width: 28em; color: var(--ink-2); }
.dr-act .rail-act { justify-content: flex-start; margin-top: 16px; padding-top: 0; border-top: 0; }
/* 專長項目：全部用同樣的白瓷圓籤，不分主次；有療程頁的是連結、多一個箭頭，其他的不會浮起 */
.dr-focus { grid-column: 1 / -1; justify-self: stretch; padding-top: 22px; border-top: 1px solid var(--rule); }
.dr-focus h2 { font: 500 22px/1.4 var(--font-ming); }
.focus-tags .talker { align-items: center; }
.focus-tags .ic-go { width: 15px; height: 15px; color: var(--gold-deep); }
.talker-static:hover { transform: none; box-shadow: inset 0 0 0 1px var(--gold), var(--shadow-hairline); }
/* 總覽名牌上的主要專長 */
.nc-focus { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.65; }
.nc-focus-label { margin-right: 6px; font-weight: 700; color: var(--ink-2); }
.namecard-lead .nc-focus { font-size: 14.5px; }
.dr-back {
  grid-area: back;
  margin-top: 24px;
  padding: clamp(20px, 3vw, 40px);
  border-radius: 24px;
  background: var(--porcelain);
}
.dr-back .sec:first-child { padding-top: 0; }
.dr-back .sec:first-child h2 { padding-top: 0; border-top: 0; }
.dr-back ul:not(.spec-strip, .q-list) { padding-left: 1.2em; }

/* ---------- 斷點 ---------- */

@media (max-width: 1180px) {
  /* 展開的困擾：說明在上、茶牌在下，茶牌用整個寬度排成等寬的格子 */
  .rail.is-open, .no-js .rail:target { grid-template-columns: 1fr; }
  .rail-act { justify-content: flex-start; }
  .room-prints { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tx-hero, .tx-close { grid-template-columns: 1fr; }
  .rack { grid-template-columns: 1fr; }
  .shelf-lead .namecard-lead { grid-template-columns: auto 1fr; column-gap: 28px; }
  .shelf-lead .namecard-lead .photo-slot { grid-row: span 5; }
  .shelf, .shelf-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dr-layout { grid-template-columns: 1fr; grid-template-areas: "front" "aside" "back"; }
  .dr-act { position: static; }
}
@media (max-width: 900px) {
  .toc { top: 116px; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-head { justify-content: space-between; }
  /* 窄螢幕的導覽橫列跟頁首一起固定：往上收 1px 藏在頁首底線下，避免兩條之間透出內容 */
  html { scroll-padding-top: 142px; }
  .nav-strip {
    position: sticky; top: 71px; z-index: 29;
    display: flex; gap: 20px;
    padding: 4px var(--gutter) 6px;
    background: var(--ivory);
    border-bottom: 1px solid var(--rule);
    overflow-x: auto; scrollbar-width: none;
  }
  .nav-strip::-webkit-scrollbar { display: none; }
  .nav-strip { mask-image: linear-gradient(90deg, #000 82%, transparent); }

  /* 手機：大標、說明、茶巾，大杯移到茶巾下方 */
  .table { display: flex; flex-direction: column; }
  .table-top { display: contents; }
  .greet { order: 1; padding: 32px var(--gutter) 28px; }
  .table > .runner { order: 2; }
  .big-cup { order: 3; width: min(78vw, 360px); margin: 36px auto 44px; }

  .finder-head, .doctors-head, .rooms-head, .contact-top, .dr-head { grid-template-columns: 1fr; }
  .ritual { grid-template-columns: 1fr; gap: 28px; }
  .ritual::before { left: 40px; right: auto; top: 40px; bottom: 40px; border-top: 0; border-left: 1px dashed var(--gold); }
  .ritual li { grid-template-columns: 80px minmax(0, 1fr); column-gap: 20px; }
  .step-cup { grid-row: span 2; }
  .step-title { margin-top: 18px; }
  .notice-sheet, .faq-list { grid-template-columns: 1fr; }
  .notice-sheet li,
  .notice-sheet li:nth-child(even) { padding: 22px 0 24px; border-left: 0; }
  .plates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .level { grid-template-columns: 1fr; row-gap: 12px; }
  .endcap, .row, .rail { grid-column: 1; }
  .endcap { padding-top: 0; }
  .row { grid-row: 2; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 128px; }
  .namecard-lg { grid-template-columns: 1fr; }
  .nav-strip { top: 59px; }
  body { font-size: 16px; }
  .site-head { min-height: 60px; padding-block: 8px; }
  .brand img { height: 32px; }
  .btn-line-head { min-height: 40px; padding: 8px 12px; font-size: 14px; }
  .runner { gap: 20px; }
  .cups { width: 100%; justify-content: space-between; gap: 12px; }
  .cups li { flex: 1; }
  .cup-label { font-size: 15px; }
  .tray { width: 100%; min-height: 58px; }
  .pg-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-head { padding: 12px 12px 10px; font-size: 17px; }
  .pg-col ul { padding: 6px; }
  .pg-cell > a { padding: 7px 6px 8px 24px; }
  .pg-cell > a::before { left: 7px; top: 14px; }
  .pg-cell b { font-size: 15px; }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* 診所環境：一排左右滑動，露出下一張的邊當提示 */
  .room-prints {
    display: flex; gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 28px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .room-prints::-webkit-scrollbar { display: none; }
  .room-prints li { flex: 0 0 78vw; scroll-snap-align: start; }
  .plate .photo-slot { width: 80px; }
  .directory dl > div { grid-template-columns: 1fr; gap: 6px; }
  .toc { top: 104px; padding-block: 8px; }
  .shelf, .shelf-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shelf-lead .namecard-lead { grid-template-columns: 1fr; }
  .shelf-lead .namecard-lead .photo-slot { grid-row: auto; width: 128px; }
  .sec, .pos-compare, .qa { scroll-margin-top: 120px; }
  .cmp th, .cmp td { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .talker, .talker::before, .talker-sub, .btn-line, .ticket, .pg-cell, .plate, .namecard, .toc a { transition: none; }
  .js .table .cup i,
  .js .rail.is-open,
  .js .rail.is-open .ticket { animation: none; }
}
