/* V Square ตารางทีม — v11 "Pearl" (user-chosen option A): white, five-star-hotel calm. One centered column, a pill search, thin type, a single gold hairline, black primary button. Dark "Pearl Night" mirrors it. */
/* LINE Seed Sans TH — LY Corporation, SIL Open Font License 1.1 (fonts/). Weights: Th 100 · Rg 400 · Bd 700 · XBd 800 · He 900; ranges map the UI's 200/300/500 onto the nearest cut. */
@font-face { font-family: "LINE Seed Sans TH"; src: url("../fonts/LINESeedSansTH_W_Th.woff2") format("woff2"), url("../fonts/LINESeedSansTH_W_Th.woff") format("woff"); font-weight: 100 250; font-style: normal; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../fonts/LINESeedSansTH_W_Rg.woff2") format("woff2"), url("../fonts/LINESeedSansTH_W_Rg.woff") format("woff"); font-weight: 251 499; font-style: normal; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../fonts/LINESeedSansTH_W_Bd.woff2") format("woff2"), url("../fonts/LINESeedSansTH_W_Bd.woff") format("woff"); font-weight: 500 749; font-style: normal; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../fonts/LINESeedSansTH_W_XBd.woff2") format("woff2"), url("../fonts/LINESeedSansTH_W_XBd.woff") format("woff"); font-weight: 750 849; font-style: normal; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../fonts/LINESeedSansTH_W_He.woff2") format("woff2"), url("../fonts/LINESeedSansTH_W_He.woff") format("woff"); font-weight: 850 1000; font-style: normal; font-display: swap; }
:root {
  --bg: #F7F7FA; --card: #FFFFFF; --card-2: #FBFBFD; --line: #E9EAF0; --line-2: #F1F2F6;
  --ink: #10151F; --ink-2: #3B4252; --muted: #7A8090;
  --gold: #B0904E; --gold-text: #8A6A2E; --gold-soft: rgba(176, 144, 78, .12); --gold-line: rgba(176, 144, 78, .45);
  --accent: #1F6FE5; --accent-text: #1B5FC8; --accent-soft: #EEF4FF; --accent-press: #1859BF; --accent-2: #4A8CF0;
  --btn: #10151F; --btn-ink: #FFFFFF; --btn-hover: #273042;
  --ok: #148A55; --ok-soft: #E7F5EE; --gap: #8F5300; --gap-soft: #FBF1E2; --bad: #C8233A; --bad-soft: #FCEAEC;
  --doc: #2E6BD6; --nurse: #D9679A; --physio: #2BA486; --staff: #B0904E;
  --fill: #F1F3F8; --fill-2: #F6F7FA; --fill-3: #E3E6EE;
  --bar: rgba(247, 247, 250, .86); --menu: #FFFFFF; --scrim: rgba(16, 21, 31, .28);
  --shadow-1: 0 1px 2px rgba(16, 21, 31, .04); --shadow-pill: 0 14px 30px -16px rgba(20, 40, 90, .28); --shadow-2: 0 30px 60px -24px rgba(16, 21, 31, .35);
  --stage-a: #FFFFFF; --stage-b: #EEF3FC; --stage-c: #DDE7F7;
  --f: "LINE Seed Sans TH", "Noto Sans Thai", "Thonburi", system-ui, sans-serif;
  --r-xl: 24px; --r-lg: 20px; --r: 14px; --r-sm: 10px;
  --ease-ios: cubic-bezier(.32, .72, 0, 1); --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 60px; --col: 760px;
  --sky: var(--accent); --sky-deep: var(--accent-press); --sky-soft: var(--accent-soft); --sky-text: var(--accent-text);
  --surface: var(--card); --glass: var(--card); --glass-strong: var(--card); --glass-soft: var(--fill-2); --sep: var(--line); --edge: var(--line); --surface-solid: var(--card); --surface-2: var(--card-2); --raised: var(--card); --hl: transparent;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D0F14; --card: #161920; --card-2: #1B1F27; --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .05);
  --ink: #F1F3F7; --ink-2: #C7CCD6; --muted: #8E95A3;
  --gold: #D2B06C; --gold-text: #E1C38A; --gold-soft: rgba(210, 176, 108, .13); --gold-line: rgba(210, 176, 108, .4);
  --accent: #7FB0FF; --accent-text: #9CC2FF; --accent-soft: rgba(127, 176, 255, .12); --accent-press: #5F98F5; --accent-2: #A8CBFF;
  --btn: #F1F3F7; --btn-ink: #10151F; --btn-hover: #FFFFFF;
  --ok: #3DD68C; --ok-soft: rgba(61, 214, 140, .13); --gap: #FFB547; --gap-soft: rgba(255, 181, 71, .13); --bad: #FF6B7E; --bad-soft: rgba(255, 107, 126, .13);
  --fill: rgba(255, 255, 255, .07); --fill-2: rgba(255, 255, 255, .04); --fill-3: rgba(255, 255, 255, .14);
  --bar: rgba(13, 15, 20, .86); --menu: #161920; --scrim: rgba(0, 0, 0, .6);
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, .02); --shadow-pill: 0 14px 30px -16px rgba(0, 0, 0, .8); --shadow-2: 0 30px 60px -20px rgba(0, 0, 0, .85);
  --stage-a: #1E2333; --stage-b: #141824; --stage-c: #0B0E15;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 300 15px/1.6 var(--f); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--gold-soft); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
input, textarea { caret-color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }
b, strong { font-weight: 500; }
a { color: var(--accent-text); text-underline-offset: 3px; }
* { scrollbar-width: thin; scrollbar-color: var(--fill-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--fill-3); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.muted { color: var(--muted); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.glass, .tile { position: relative; background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.press { transition: transform .3s var(--ease-ios); }
.press:active { transform: scale(.97); }
.kbd { display: inline-flex; align-items: center; font: 400 11.5px/1 ui-sans-serif, system-ui, sans-serif; color: var(--muted); padding: 4px 7px; border-radius: 7px; border: 1px solid var(--line); background: var(--card-2); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: var(--bar); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--line-2); padding-top: env(safe-area-inset-top, 0px); }
.hdr-in { max-width: 1200px; margin: 0 auto; min-height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; justify-self: start; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--card), 0 0 0 2.5px var(--gold-line); }
.brand .wm { font-weight: 400; font-size: 16px; line-height: 1; display: block; white-space: nowrap; letter-spacing: .02em; color: var(--ink); }
.brand .wm em { font-style: normal; }
.brand .sub { display: none; }
.ntools { display: flex; align-items: center; gap: 6px; justify-self: end; }
.toptabs { justify-self: center; display: inline-flex; gap: 4px; }
.toptabs .thumb { display: none; }
.toptabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); position: relative; }
.toptabs button:hover { color: var(--ink); }
.toptabs button[aria-pressed="true"] { color: var(--ink); font-weight: 400; }
.toptabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 18px; height: 1px; margin-left: -9px; background: var(--gold); }
.seg { display: inline-flex; gap: 0; padding: 3px; border-radius: 999px; background: var(--fill); position: relative; max-width: 100%; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 0 14px; min-height: 32px; font-size: 13.5px; color: var(--muted); position: relative; z-index: 1; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg .thumb { position: absolute; top: 3px; bottom: 3px; border-radius: 999px; background: var(--card); box-shadow: 0 2px 8px -2px rgba(16, 21, 31, .18); transition: left .4s var(--ease-ios), width .4s var(--ease-ios); z-index: 0; }
.datebar { display: inline-flex; align-items: center; gap: 0; padding: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.datebar button { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.datebar button:hover { color: var(--ink); background: var(--fill-2); }
.datebar .dlabel { position: relative; padding: 0 6px; font-size: 13.5px; white-space: nowrap; text-align: center; }
.datebar .dlabel input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.datebar .today { width: auto; padding: 0 10px; font-size: 12.5px; color: var(--gold-text); }
.datebar .today[disabled] { display: none; }
.iconbtn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--muted); flex: none; }
.iconbtn:hover { color: var(--ink); }
.iconbtn svg { width: 18px; height: 18px; }
.me { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.me .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 400; font-size: 13px; color: var(--ink); background: var(--fill); border: 1px solid var(--line); object-fit: cover; flex: none; }
.me .rl, .me .em { display: none; }
.me button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 8px; font-size: 12.5px; }
@media (max-width: 899px) { .hdr-in { grid-template-columns: 1fr auto; min-height: 54px; padding: 0 16px; } .toptabs { display: none; } }
@media (max-width: 520px) { .brand .wm, .datebar .tdy { display: none; } .me { display: none; } }

/* ---------- bottom tab bar (narrow) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: none; justify-content: space-around; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); background: var(--bar); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); border-top: 1px solid var(--line-2); }
.tabbar button { border: 0; background: transparent; flex: 1; max-width: 160px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--muted); }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-pressed="true"] { color: var(--ink); }
.tabbar .thumb { display: none; }
@media (max-width: 899px) { .tabbar { display: flex; } }

/* ---------- page ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 18px max(20px, env(safe-area-inset-right, 0px)) 64px max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 899px) { .wrap { padding: 12px 16px calc(84px + env(safe-area-inset-bottom, 0px)); } }
.banner { align-self: center; width: 100%; max-width: var(--col); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 6px 6px 14px; border-radius: 999px; font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line); }
.banner b { color: var(--gold-text); font-weight: 400; }
.banner button { margin-left: auto; border: 0; border-radius: 999px; padding: 5px 11px; font-size: 12px; background: var(--fill); color: var(--ink-2); }
.banner.err { color: var(--bad); border-color: var(--bad); }
@media (max-width: 640px) { .banner { border-radius: 999px; } .banner .bx { display: none; } }

/* ---------- one centered column ---------- */
.col { width: 100%; max-width: var(--col); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.col > [hidden] { display: none !important; }
.view { display: flex; flex-direction: column; gap: 18px; animation: viewIn .45s var(--ease-ios); }
@keyframes viewIn { from { opacity: .4; transform: translateY(6px); } }
.hello { text-align: center; padding-top: clamp(8px, 4vw, 28px); }
.hello h2 { margin: 0; font-weight: 200; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.01em; }
.hello p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.hello .hr { width: 40px; height: 1px; background: var(--gold); margin: 14px auto 0; }
.backbtn { align-self: flex-start; border: 0; background: transparent; color: var(--muted); font-size: 14px; padding: 4px 6px 4px 0; display: inline-flex; align-items: center; gap: 2px; }
.backbtn:hover { color: var(--ink); }
.backbtn svg { width: 20px; height: 20px; }

/* ---------- search ---------- */
.ask { display: flex; flex-direction: column; gap: 12px; }
.sfield { display: flex; align-items: center; gap: 10px; height: 58px; border-radius: 999px; padding: 0 10px 0 20px; background: var(--card); box-shadow: var(--shadow-pill), 0 0 0 1px var(--line); transition: box-shadow .3s var(--ease); }
.sfield:focus-within { box-shadow: var(--shadow-pill), 0 0 0 1px var(--gold-line), 0 0 0 5px var(--gold-soft); }
.sfield svg { color: var(--muted); flex: none; }
.sfield input { flex: 1; border: 0; background: transparent; outline: none; font-size: 17px; font-weight: 300; min-width: 0; }
.sfield input::placeholder { color: var(--muted); }
.sfield input::-webkit-search-cancel-button { display: none; }
.sfield:focus-within .kbd, .sfield.has .kbd { display: none; }
.sclear { border: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--fill); color: var(--muted); display: grid; place-items: center; flex: none; }
.sclear[hidden] { display: none; }
.shint { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; }
.shint button { border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 13px; background: var(--card); color: var(--ink-2); }
.shint button:hover { border-color: var(--gold-line); color: var(--ink); }
.shint .lbl { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.ask .seg { display: none; }

/* ---------- lists ---------- */
.gsec { display: flex; flex-direction: column; gap: 8px; }
.gh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; letter-spacing: .02em; }
.gh b { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.glist { background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.grow { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1px 0; width: 100%; min-height: 60px; padding: 12px 18px; border: 0; background: transparent; text-align: left; color: inherit; transition: background .2s; }
.grow + .grow::before { content: ""; position: absolute; top: 0; left: 18px; right: 18px; border-top: 1px solid var(--line-2); }
button.grow:hover, .grow.tap:hover { background: var(--card-2); }
.grow[aria-current="true"] { background: var(--card-2); }
.grow .gt { grid-column: 2; font-weight: 400; font-size: 15.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow .gs { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 1.45; min-width: 0; }
.grow .ge { grid-column: 3; grid-row: 1 / span 2; margin-left: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); font-size: 13px; }
.grow .ge > svg { opacity: .45; width: 16px; height: 16px; }
.grow .gi { grid-column: 1; grid-row: 1 / span 2; margin-right: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 400; flex: none; }
.grow .gi svg { width: 14px; height: 14px; }
.grow .gd { grid-column: 1; grid-row: 1 / span 2; margin-right: 14px; }
.gi.closed { background: var(--bad-soft); color: var(--bad); } .gi.gap, .gi.nodoc { background: var(--gap-soft); color: var(--gap); } .gi.covered { background: var(--accent-soft); color: var(--accent-text); } .gi.calm, .gi.ok { background: var(--ok-soft); color: var(--ok); }
.gi.branch { background: var(--fill); color: var(--muted); font-size: 11px; }
.gi.ava { color: #fff !important; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.zones { display: none; }
.listhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.listhead .actions { gap: 4px; }
.listhead .btn.sm { background: transparent; color: var(--muted); min-height: 30px; padding: 0 8px; border: 0; }
.listhead .btn.sm:hover { color: var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 0 4px; justify-content: center; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }

/* answer card */
.ans { background: var(--card); border-radius: var(--r-xl); border: 1px solid var(--line); overflow: hidden; }
.ans-h { padding: 18px 20px 8px; display: flex; flex-direction: column-reverse; gap: 2px; }
.ans-h .k { font-size: 12.5px; color: var(--muted); }
.ans-h h3 { margin: 0; font-size: 20px; font-weight: 400; line-height: 1.35; }
.ans-h .note2 { order: -1; font-size: 12.5px; color: var(--gap); }
.ans .glist { border: 0; border-radius: 0; }
.ans .grow { padding-left: 20px; padding-right: 20px; }
.ans .grow + .grow::before { left: 20px; right: 20px; }
.ans-f { display: flex; flex-direction: column; gap: 6px; padding: 8px 20px 18px; }
.ans-f .cbtn.solid { width: 100%; justify-content: center; min-height: 50px; border-radius: 14px; font-size: 15px; }
.ans-f .btn.sm { align-self: center; background: transparent; border: 0; color: var(--muted); }
.ans-f .btn.sm:hover { color: var(--ink); }
.okline { color: var(--ok); } .noline { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--bad); }

/* buttons */
.cbtn { flex: none; border: 0; border-radius: 999px; min-height: 34px; padding: 0 13px 0 11px; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--accent-text); background: var(--accent-soft); transition: background .25s, color .25s, transform .3s var(--ease-ios); white-space: nowrap; }
.cbtn svg { width: 16px; height: 16px; }
.cbtn:active { transform: scale(.95); }
.cbtn.done { background: var(--ok-soft); color: var(--ok); animation: pop .4s var(--ease-ios); }
.cbtn.solid, .btn.primary { color: var(--btn-ink); background: var(--btn); font-weight: 400; }
.cbtn.solid:hover, .btn.primary:hover { background: var(--btn-hover); }
.cbtn.solid.done { background: var(--ok); color: #fff; }
.cbtn.icon { padding: 0; width: 36px; justify-content: center; background: var(--fill); }
.cbtn.icon.done { background: var(--ok-soft); }
@keyframes pop { from { transform: scale(.94); } to { transform: scale(1); } }
.btn { border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; min-height: 42px; font-size: 14px; font-weight: 300; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); background: var(--card); transition: transform .3s var(--ease-ios), border-color .2s; text-decoration: none; }
.btn:hover { border-color: var(--fill-3); color: var(--ink); } .btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { color: #fff; background: var(--bad); border-color: transparent; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.sm { min-height: 34px; font-size: 13px; padding: 0 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- branch page ---------- */
.bhead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-top: 4px; }
.bhead .code { font-size: 12px; letter-spacing: .14em; color: var(--gold-text); }
.bhead h1 { margin: 0; font-size: clamp(28px, 4.4vw, 38px); font-weight: 200; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.bhead .bsub { font-size: 13.5px; color: var(--muted); }
.bhead .hr { width: 40px; height: 1px; background: var(--gold); margin-top: 6px; }
.side { display: flex; flex-direction: column; gap: 14px; }
.panel { padding: 18px 20px; border-radius: var(--r-xl); }
.ph { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 8px; min-height: 30px; }
.ph h3 { margin: 0; font-size: 16.5px; font-weight: 400; } .ph > span { font-size: 12.5px; color: var(--muted); }
.people { display: flex; flex-direction: column; }
.person { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0 12px; align-items: center; padding: 10px 0; }
.person + .person::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; border-top: 1px solid var(--line-2); }
.ava { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 400; font-size: 13px; }
.r-doc { background: linear-gradient(160deg, #6E9EF0, #2C5FC4); } .r-nurse { background: linear-gradient(160deg, #EFA3C2, #C2537F); } .r-physio { background: linear-gradient(160deg, #6CCDB2, #23826A); } .r-staff { background: linear-gradient(160deg, #DCC28E, #A88236); } .r-none { background: linear-gradient(160deg, #B5BCC9, #7B8494); }
.person .nm { font-weight: 400; font-size: 15.5px; min-width: 0; } .person .full { grid-column: 2; font-size: 12.5px; color: var(--muted); min-width: 0; }
.person .tm { grid-row: span 2; font-size: 14px; text-align: right; color: var(--ink-2); }
.person .nd { grid-column: 2 / -1; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.nd span { font-size: 12px; background: var(--fill-2); color: var(--ink-2); border-radius: 8px; padding: 2px 8px; }
.person.off .nm { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--bad); }
.tag-leave { font-size: 12px; color: var(--bad); background: var(--bad-soft); padding: 1px 9px; border-radius: 999px; }
.tag-sub { font-size: 12px; color: var(--accent-text); background: var(--accent-soft); padding: 1px 9px; border-radius: 999px; }
.contact dl, .infol { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; font-size: 14.5px; }
.contact dt, .infol dt { color: var(--muted); } .contact dd, .infol dd { margin: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; text-align: right; }
.copy { border: 0; border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--accent-text); background: var(--accent-soft); }
.note { margin-top: 12px; border-radius: 14px; padding: 11px 13px; font-size: 13.5px; white-space: pre-line; color: var(--ink-2); background: var(--fill-2); }
.note b { display: block; color: var(--gold-text); font-weight: 400; margin-bottom: 3px; font-size: 12.5px; }
.msgcard .cbtn.solid { width: 100%; justify-content: center; min-height: 50px; border-radius: 14px; font-size: 15px; margin-top: 12px; }
.msgcard .qtpl { margin-left: auto; }
details.more { border-radius: var(--r-xl); padding: 0; }
details.more > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 400; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .3s var(--ease-ios); }
details.more[open] > summary svg { transform: rotate(90deg); }
details.more > .in { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.week { padding: 0; border: 0; background: transparent; }
.wgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { border: 1px solid var(--line); border-radius: 14px; padding: 8px 3px 10px; text-align: center; font-size: 12.5px; min-height: 84px; display: flex; flex-direction: column; gap: 2px; align-items: center; background: var(--card); color: inherit; min-width: 0; transition: border-color .2s; }
.wd:hover { border-color: var(--fill-3); }
.wd .dn { font-size: 11.5px; color: var(--muted); } .wd .dd { font-weight: 300; font-size: 19px; }
.wd .ppl { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.wd[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.wd.is-closed .ppl { color: var(--bad); }
@media (max-width: 600px) { .wgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.room { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.roombtn { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.roombtn svg { width: 16px; height: 16px; color: var(--gold); }
.stagecard { width: 100%; padding: 0; overflow: hidden; border-radius: var(--r-xl); }
.stage { position: relative; height: clamp(320px, 52vh, 520px); background: radial-gradient(120% 90% at 70% 0%, var(--stage-a) 0%, var(--stage-b) 55%, var(--stage-c) 100%); cursor: grab; }
.stage:active { cursor: grabbing; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.labels3d { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tag3d { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 0; border-radius: 999px; padding: 4px 11px 4px 7px; font-size: 12.5px; color: var(--ink); background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .3), 0 0 0 1px var(--line); will-change: transform; transition: opacity .4s; }
.tag3d i { width: 7px; height: 7px; border-radius: 50%; background: var(--staff); }
.tag3d b { font-weight: 400; } .tag3d small { color: var(--muted); font-size: 11px; }
.tag-doc { background: var(--btn); color: var(--btn-ink); } .tag-doc i { background: var(--gold); } .tag-doc small { color: color-mix(in srgb, var(--btn-ink) 70%, transparent); }
.tag-nurse i { background: var(--nurse); } .tag-physio i { background: var(--physio); }
.tag3d.is-sub { background: var(--accent-soft); color: var(--accent-text); }
.bubble { position: absolute; left: 14px; bottom: 14px; z-index: 3; padding: 8px 13px; border-radius: 12px; max-width: calc(100% - 28px); font-size: 13px; background: color-mix(in srgb, var(--card) 90%, transparent); box-shadow: 0 0 0 1px var(--line); }
.bubble b { display: block; font-size: 14.5px; font-weight: 400; color: var(--ink); } .bubble.closed b { color: var(--bad); }
.fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); padding: 20px; text-align: center; font-size: 13.5px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.ok i { background: var(--ok); }
.pill.covered { background: var(--accent-soft); color: var(--accent-text); } .pill.covered i { background: var(--accent); }
.pill.gap, .pill.nodoc { background: var(--gap-soft); color: var(--gap); } .pill.gap i, .pill.nodoc i { background: var(--gap); }
.pill.closed { background: var(--bad-soft); color: var(--bad); } .pill.closed i { background: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.st-ok { background: var(--ok); } .st-covered { background: var(--accent); } .st-gap, .st-nodoc { background: var(--gap); } .st-closed { background: var(--bad); }
.edbox > summary { color: var(--muted); font-size: 14px !important; }
.edbox .actions .btn { flex: 1 1 auto; }
.exlink { border: 0; background: var(--gap-soft); color: var(--gap); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; cursor: pointer; white-space: nowrap; }

/* map / grid overview (opened in a sheet) */
.mapwrap { overflow-x: auto; }
.map { display: block; width: 100%; min-width: 760px; height: auto; }
.map .zl { font: 500 13px var(--f); }
.st { cursor: pointer; outline: none; }
.st text { font: 400 12.5px var(--f); fill: var(--ink-2); }
.st .halo { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease-ios); }
.st:hover .halo, .st:focus-visible .halo { transform: scale(1.3); }
.st[aria-current="true"] text { fill: var(--ink); font-weight: 500; }
.st .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: .7; } to { transform: scale(2.2); opacity: 0; } }
.ov { overflow: auto; max-height: 70vh; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--edge); }
.ov table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 880px; font-size: 13px; }
.ov th { position: sticky; top: 0; z-index: 2; background: var(--surface-solid); font-weight: 400; color: var(--muted); padding: 10px 8px; text-align: center; white-space: nowrap; }
.ov th:first-child, .ov td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface-solid); text-align: left; }
.ov th:first-child { z-index: 3; }
.ov th.today { color: var(--accent-text); }
.ov td { border-top: 1px solid var(--sep); padding: 3px; vertical-align: top; }
.ov td:first-child { padding: 8px 12px; min-width: 150px; }
.ov .bn { font-weight: 400; font-size: 13.5px; display: flex; align-items: center; gap: 8px; } .ov .bc { font-size: 11px; color: var(--muted); }
.cell { width: 100%; border: 0; background: transparent; border-radius: 10px; padding: 6px 4px; min-height: 46px; display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: center; color: inherit; }
.cell:hover { background: var(--fill-2); }
.cell.sel { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.cell.todaycol { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.dchip { font-size: 13px; border-radius: 7px; padding: 2px 4px; white-space: nowrap; }
.dchip small { display: block; font-size: 10.5px; color: var(--muted); }
.dchip.leave { text-decoration: line-through; color: var(--muted); }
.dchip.sub { background: var(--accent-soft); color: var(--accent-text); }
.dchip.hasnote::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gap); margin-left: 4px; vertical-align: 2px; }
.cell .closedx { color: var(--bad); font-size: 12.5px; padding-top: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 0; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--edge); }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip[aria-pressed="true"] { color: var(--btn-ink); background: var(--btn); }

/* ---------- manage ---------- */
.mtabs { overflow-x: auto; scrollbar-width: none; align-self: stretch; justify-content: flex-start; width: fit-content; max-width: 100%; }
.mtabs::-webkit-scrollbar { display: none; }
.mpanel { padding: 18px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select, .field input, .field select, .field textarea, .qp input[type="search"], .qtpl { border: 0; border-radius: 10px; min-height: 44px; padding: 8px 12px; font-size: 15px; font-weight: 400; background: var(--fill-2); box-shadow: inset 0 0 0 .5px var(--sep); color: var(--ink); }
.toolbar input:focus, .qp input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.toolbar input { flex: 1 1 220px; }
select option { color: #1D1D1F; }
.tablewrap { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 .5px var(--sep); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 10px 12px; white-space: nowrap; background: var(--surface-2); }
table.t td { padding: 10px 12px; border-top: .5px solid var(--sep); vertical-align: top; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--fill-2); }
.tgrid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.tcol { border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 150px; background: var(--fill-2); }
.tcol h4 { margin: 0 0 2px; font-weight: 500; font-size: 14px; }
.tent { border-radius: 10px; padding: 8px 10px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--surface); box-shadow: var(--shadow-1); }
.tent .tx { min-width: 0; } .tent .tx small { display: block; color: var(--muted); }
.tent button { border: 0; background: transparent; color: var(--bad); padding: 4px; border-radius: 8px; }
.logrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 12px 0; border-bottom: .5px solid var(--sep); }
.logrow .lb { font-size: 12.5px; color: var(--muted); } .logrow .lt { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.logrow .lu { grid-column: 2; justify-self: end; border: 0; background: transparent; color: var(--accent-text); font-size: 13px; padding: 0; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: var(--scrim); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(560px, 100%); max-height: min(88dvh, 900px); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 22px; border-radius: 26px; background: var(--menu); border: 1px solid var(--edge); box-shadow: var(--shadow-2); animation: sheetIn .4s var(--ease-ios) both; display: flex; flex-direction: column; }
.sheet > * { flex-shrink: 0; }
.sheet.wide { width: min(1120px, 100%); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.sheet h3 { margin: 0; font-size: 22px; font-weight: 400; } .sheet .dsub { margin: 2px 0 14px; color: var(--muted); font-size: 13.5px; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-3); margin: -10px auto 12px; display: none; }
@media (max-width: 640px) { .scrim { place-items: end center; padding: 0; } .sheet { width: 100%; border-radius: 16px 16px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); animation-name: sheetUp; } .grabber { display: block; } }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet .pfproc, .sheet .docgrid { max-height: none; overflow: visible; }
.sheet .dact { position: sticky; bottom: -22px; margin: 16px -22px -22px; padding: 12px 22px calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--menu) 72%, transparent); z-index: 2; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field .hint { font-size: 12px; color: var(--muted); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.frow > *, .field input, .field select { min-width: 0; }
@media (max-width: 480px) { .frow { grid-template-columns: 1fr; } }
.dact { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 14px; margin-top: auto; }
.dact .left { margin-right: auto; }
.err-msg { color: var(--bad); font-size: 13px; min-height: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--bg); background: var(--ink); box-shadow: var(--shadow-2); animation: toastIn .35s var(--ease-ios); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (max-width: 899px) { .toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login .glass { width: min(420px, 100%); padding: 36px 28px; text-align: center; border-radius: 22px; }
.login svg { width: 68px; height: 68px; }
.login h1 { font-weight: 500; font-size: 24px; margin: 12px 0 4px; } .login p { color: var(--muted); margin: 0 0 22px; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- finder ---------- */
.finder .fgrid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, 2fr) minmax(150px, .7fr) minmax(190px, .8fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .finder .fgrid { grid-template-columns: 1fr 1fr; } .finder .fwide { grid-column: 1 / -1; } }
@media (max-width: 640px) { .finder .fgrid { grid-template-columns: 1fr; } }
.finder .field { margin: 0; }
.locrow { display: flex; gap: 8px; }
.locrow input { flex: 1; min-width: 0; }
.fres { display: flex; flex-direction: column; gap: 12px; }
.fcols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .fcols { grid-template-columns: 1fr; } }
.flist { display: flex; flex-direction: column; gap: 10px; }
.rcard { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-radius: var(--r-lg); }
.rcard.rec { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--ok); }
.rh { display: flex; align-items: center; gap: 12px; }
.rk { flex: none; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center; font-weight: 500; font-size: 13px; background: var(--fill); }
.rec .rk { background: var(--ok); color: #fff; }
.rt { flex: 1; min-width: 0; } .rt b { display: block; font-size: 16px; font-weight: 500; } .rt span { font-size: 12.5px; color: var(--muted); }
.rd { font-weight: 500; color: var(--accent-text); white-space: nowrap; }
.rdocs { display: flex; flex-wrap: wrap; gap: 6px; }
.okdoc { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.okdoc small { font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.nodoc { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--fill-2); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--bad); }
.ract { display: flex; flex-wrap: wrap; gap: 8px; }
.fmap { padding: 10px; border-radius: var(--r-lg); position: sticky; top: calc(var(--nav-h) + 16px); }
.minimap { display: block; width: 100%; height: auto; }
.gmap { width: 100%; height: 440px; border-radius: 12px; overflow: hidden; }
.docgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; padding: 2px; }
.dchk { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 9px; background: var(--fill-2); font-size: 13.5px; cursor: pointer; }
.dchk:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.dchk input { min-height: 0; padding: 0; margin: 0; box-shadow: none; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }

/* messages + conditions */
.msgbox { margin-top: 12px; }
.msgprev { margin: 0; width: 100%; white-space: pre-wrap; font: 400 13.5px/1.6 var(--f); color: var(--ink); background: var(--fill-2); border: 0; border-radius: 12px; padding: 12px 14px; resize: vertical; }
textarea.msgprev:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.flist .msgbox { margin: 0; }
.conds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 12px; }
.cond { padding: 14px 16px; border-radius: var(--r-lg); }
.cond .ch { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cond .ch .ava { grid-row: auto; flex: none; width: 44px; height: 44px; font-size: 14px; color: #fff; }
.ava svg { width: 55%; height: 55%; max-width: 24px; max-height: 24px; }
.cond .ch > div { flex: 1; min-width: 0; } .cond .ch b { display: block; font-weight: 500; font-size: 16px; } .cond .ch span { font-size: 12.5px; color: var(--muted); }
.cond .cbody { display: grid; gap: 10px; }
.cond h4 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.cond ul { margin: 0; padding-left: 18px; font-size: 13.5px; } .cond li { margin: 2px 0; }
.cond .nd { display: flex; flex-wrap: wrap; gap: 6px; }
details.note summary { cursor: pointer; }

/* doctor profile */
.docname { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.docname:hover { color: var(--accent-text); }
.exlink { border: 0; background: var(--gap-soft); color: var(--gap); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 400; cursor: pointer; white-space: nowrap; }
.prof-h { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.prof-h .ava { width: 54px; height: 54px; font-size: 18px; flex: none; }
.prof-h > div { flex: 1; min-width: 0; }
h4.pf { margin: 16px 0 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.pf-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pw { border-radius: 10px; padding: 6px; font-size: 12px; background: var(--fill-2); text-align: center; }
.pw b { display: block; font-weight: 500; color: var(--muted); } .pw.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pflist { margin: 0; padding-left: 18px; font-size: 14px; } .pflist li { margin: 3px 0; }
.pfproc { display: flex; flex-direction: column; gap: 12px; }
.pfg h5 { margin: 0 0 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.pfchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; cursor: default; }
label.pchip { cursor: pointer; }
.pchip input { margin: 0; width: 14px; height: 14px; accent-color: var(--ok); min-height: 0; padding: 0; box-shadow: none; }
.pchip.ok { background: var(--ok-soft); color: var(--ok); }
.pchip.no { background: var(--fill-2); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--bad); }
@media (max-width: 560px) { .pweek { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hdays { display: flex; flex-wrap: wrap; gap: 4px; }
.hdays .hd { display: inline-flex; gap: 4px; align-items: baseline; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); font-size: 12.5px; white-space: nowrap; }
.hdays .hd b { font-weight: 500; color: var(--accent-text); }
.hdays .hd.off { opacity: .45; }
.hdays.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.hdays.grid .hd { flex-direction: column; align-items: center; border-radius: 10px; padding: 6px 4px; white-space: normal; text-align: center; line-height: 1.3; }
@media (max-width: 560px) { .hdays.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* procedure check at a branch */
.qp input[type="search"] { width: 100%; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qchip { font: 400 13px/1.2 var(--f); padding: 7px 12px; border-radius: 999px; border: 0; background: var(--fill-2); color: var(--ink-2); cursor: pointer; transition: background .15s, transform .25s var(--ease-ios); }
.qchip:hover { background: var(--fill); }
.qchip:active { transform: scale(.96); }
.qchip.on { background: var(--accent); color: #fff; }
.qchip.copyish { color: var(--accent-text); background: var(--accent-soft); }
.qchip.copyish.done { color: var(--ok); background: var(--ok-soft); }
.qsel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 8px; }
.qsel b { font-weight: 500; font-size: 16px; }
.qsel .muted { font-size: 12.5px; flex: 1 1 200px; }
.qrows { display: flex; flex-direction: column; }
.qrow { position: relative; display: grid; grid-template-columns: 24px auto 1fr auto; align-items: center; gap: 2px 10px; padding: 9px 2px; }
.qrow + .qrow::before { content: ""; position: absolute; top: 0; left: 34px; right: 0; border-top: .5px solid var(--sep); }
.qrow .qmark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500; } .qrow .qmark svg { width: 13px; height: 13px; }
.qrow.yes .qmark { background: var(--ok-soft); color: var(--ok); } .qrow.yes .qv { color: var(--ok); font-weight: 500; }
.qrow.no .qmark { background: var(--bad-soft); color: var(--bad); } .qrow.no .qv { color: var(--bad); font-weight: 500; }
.qrow.no .docname { color: var(--muted); }
.qrow .qc { grid-column: 2 / -1; color: var(--gap); font-size: 12px; line-height: 1.4; }
.qmsg { margin-top: 14px; } .qmsg .ph { gap: 8px; flex-wrap: wrap; }
.qact { display: inline-flex; gap: 8px; align-items: center; }
.qtpl { font: 400 13px var(--f); min-height: 34px !important; padding: 4px 10px !important; border-radius: 999px !important; max-width: 200px; }
.qmore { margin-top: 12px; } .qmore > .muted { font-size: 12.5px; }

/* message templates manager */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.mkind h4 { margin: 0 0 8px; font-weight: 500; color: var(--ink-2); }
.mcard { padding: 12px; border-radius: 14px; background: var(--fill-2); margin-bottom: 10px; }
.mcard .ph { margin-bottom: 8px; }
.phchips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.phchips .qchip { padding: 5px 10px; font-size: 12.5px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--accent-soft); color: var(--accent-text); padding: 1px 5px; border-radius: 6px; }

/* v11.1: zone menu + swipeable branch shelves */
.zones { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 4px; scroll-snap-type: x proximity; -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); }
.zones::-webkit-scrollbar { display: none; }
.zones button { flex: none; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: 36px; font-size: 13.5px; color: var(--ink-2); background: var(--card); display: inline-flex; align-items: center; gap: 7px; transition: border-color .2s, background .2s; }
.zones button .n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zones button:hover { border-color: var(--gold-line); }
.zones button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.zones button[aria-pressed="true"] .n { color: color-mix(in srgb, var(--btn-ink) 65%, transparent); }
.shelf { display: flex; flex-direction: column; gap: 6px; }
.rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 2px; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.bcard { flex: none; width: 176px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 13px 14px 14px; text-align: left; color: inherit; display: flex; flex-direction: column; gap: 8px; min-height: 112px; transition: border-color .2s, transform .3s var(--ease-ios); }
.bcard:hover { border-color: var(--gold-line); }
.bcard:active { transform: scale(.97); }
.bcard .bn { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 400; }
.bcard .bd { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; color: var(--ink-2); }
.bcard .bd i { font-style: normal; color: var(--muted); }
.bcard .pill { align-self: flex-start; margin-top: auto; font-size: 11.5px; padding: 3px 9px; }
.bcard.st-b-closed { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
@media (max-width: 520px) { .bcard { width: 158px; } }

/* v11.2: transit-style branch map inline */
.mapwrap { overflow-x: auto; padding: 14px 6px 6px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.mapwrap .map { margin: 0 auto; max-width: 100%; }
.mapwrap.still .mline, .mapwrap.still .st { animation: none; stroke-dashoffset: 0; }
.map { display: block; min-width: 0; width: auto; height: auto; }
.map .zl { font: 400 13px var(--f); fill: var(--ink); }
.map .zl .zn { fill: var(--muted); font-size: 12px; }
.st text { font: 300 12.5px var(--f); fill: var(--ink-2); }
.st:hover text, .st:focus-visible text { fill: var(--ink); }
.st:focus-visible .halo circle:first-child { stroke-width: 4; }
.st[aria-current="true"] text { fill: var(--ink); font-weight: 400; }

/* v11.3: date popover */
.datebar .dlabel { width: auto; border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; gap: 4px; height: 32px; border-radius: 999px; padding: 0 8px; cursor: pointer; }
.datebar .dlabel:hover { background: var(--fill-2); }
.datebar .dlabel .dcar { color: var(--muted); }
.calpop { position: fixed; z-index: 80; width: min(320px, calc(100vw - 24px)); padding: 14px; border-radius: 22px; background: var(--menu); border: 1px solid var(--line); box-shadow: var(--shadow-2); animation: calIn .28s var(--ease-ios); }
@keyframes calIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.calpop .ch { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.calpop .cn { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; }
.calpop .cn:hover { background: var(--fill-2); color: var(--ink); }
.calpop .cn svg { width: 18px; height: 18px; }
.calpop .ct { border: 0; background: transparent; font-size: 15.5px; font-weight: 400; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; }
.calpop .ct:hover { background: var(--fill-2); }
.calpop .ct svg { color: var(--gold); }
.calpop .cw, .calpop .cg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.calpop .cw span { font-size: 11.5px; color: var(--muted); padding: 4px 0; }
.calpop .cd { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; display: grid; place-items: center; transition: background .15s; }
.calpop .cd:hover { background: var(--fill-2); }
.calpop .cd.tod { box-shadow: inset 0 0 0 1px var(--gold); color: var(--ink); }
.calpop .cd.sel { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
.calpop .cmg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px 0 6px; }
.calpop .cm { border: 1px solid var(--line); border-radius: 14px; background: var(--card); min-height: 44px; font-size: 14px; color: var(--ink-2); }
.calpop .cm:hover { border-color: var(--gold-line); }
.calpop .cm.tod { border-color: var(--gold); }
.calpop .cm.sel { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.calpop .cf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12.5px; }

/* v12: restrained motion layer — blur-in greeting, rotating search hint, shine on the black button, gold sparkle on copy, rolling date, map draw-in, soft gold spotlight */
:root { --shine: rgba(240, 214, 160, .55); --spot: rgba(214, 180, 112, .11); --star-1: #F6E7BF; --star-2: #E9CF96; --star-3: #FFF6DE; --gold-done: #F3E6C4; --gold-done-ink: #6E5320; }
:root[data-theme="dark"] { --shine: rgba(240, 214, 160, .45); --spot: rgba(226, 196, 136, .08); --star-1: #F6E3B4; --star-2: #E2C285; --star-3: #FFF4D6; --gold-done: rgba(226, 196, 136, .22); --gold-done-ink: #F1DBA8; }
.wreveal span { display: inline-block; animation: wordIn .9s var(--ease-ios) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
@keyframes wordIn { from { opacity: 0; filter: blur(10px); transform: translateY(8px); } }
.hello .hr { animation: hrGrow 1.1s var(--ease-ios) .35s both; }
@keyframes hrGrow { from { width: 0; opacity: 0; } }
.hello p { animation: fadeUp .8s var(--ease-ios) .3s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.sfield { position: relative; }
.sfield .rot { position: absolute; left: 50px; right: 110px; top: 0; bottom: 0; display: flex; align-items: center; pointer-events: none; overflow: hidden; color: var(--muted); font-size: 17px; font-weight: 300; white-space: nowrap; }
.sfield .rot span { display: block; overflow: hidden; text-overflow: ellipsis; }
.sfield .rot span.in { animation: rotIn .55s var(--ease-ios); }
@keyframes rotIn { from { opacity: 0; transform: translateY(70%); filter: blur(4px); } }
.sfield.has .rot { display: none; }
.cbtn.solid { position: relative; overflow: hidden; isolation: isolate; }
.cbtn.solid::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, var(--shine) 50%, transparent 62%); transform: translateX(-120%); animation: shine 4.8s var(--ease) 1.2s infinite; pointer-events: none; }
.cbtn.solid > * { position: relative; z-index: 1; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.spark { position: fixed; z-index: 95; width: 0; height: 0; pointer-events: none; }
.spark i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; background: var(--star-1); clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%); filter: drop-shadow(0 0 4px var(--star-2)); animation: sparkOut .95s var(--ease-ios) both; }
.spark i:nth-child(3n) { width: 8px; height: 8px; left: -4px; top: -4px; background: var(--star-3); }
.spark i:nth-child(3n+1) { background: var(--star-2); }
@keyframes sparkOut { 0% { transform: translate(0, 0) scale(.3) rotate(0deg); opacity: 0; } 25% { opacity: 1; } 60% { transform: translate(calc(var(--x) * .8), calc(var(--y) * .8)) scale(1.1) rotate(45deg); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) scale(0) rotate(90deg); opacity: 0; } }
/* copy success in soft champagne */
.cbtn.done { background: var(--gold-done); color: var(--gold-done-ink); }
.cbtn.solid.done { background: var(--gold-done); color: var(--gold-done-ink); }
.cbtn.icon.done { background: var(--gold-done); color: var(--gold-done-ink); }
/* twinkle on the greeting hairline */
.hello .hr { position: relative; overflow: visible; }
.hello .hr::after { content: ""; position: absolute; right: -9px; top: -5px; width: 11px; height: 11px; background: var(--star-2); clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%); filter: drop-shadow(0 0 4px var(--star-1)); animation: twinkle 3.6s ease-in-out 1.3s infinite both; }
@keyframes twinkle { 0%, 70%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 80% { transform: scale(1) rotate(45deg); opacity: 1; } 90% { transform: scale(.4) rotate(90deg); opacity: .6; } }
.droll { display: inline-flex; align-items: baseline; }
.droll.r-up { animation: rollUp .45s var(--ease-ios); } .droll.r-down { animation: rollDown .45s var(--ease-ios); }
@keyframes rollUp { from { opacity: 0; transform: translateY(60%); } } @keyframes rollDown { from { opacity: 0; transform: translateY(-60%); } }
#answers.anim > * { animation: listIn .5s var(--ease-ios) both; }
#answers.anim > *:nth-child(2) { animation-delay: 50ms; } #answers.anim > *:nth-child(3) { animation-delay: 100ms; } #answers.anim > *:nth-child(4) { animation-delay: 150ms; } #answers.anim > *:nth-child(n+5) { animation-delay: 200ms; }
@keyframes listIn { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
.st[aria-current="true"] .halo circle:first-child { stroke: var(--star-2); }
.mline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease-ios) var(--d, 0ms) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.st { animation: stIn .5s var(--ease-ios) var(--d, 0ms) both; transform-box: fill-box; transform-origin: center; }
@keyframes stIn { from { opacity: 0; transform: scale(.4); } }
.glist, .ans, .panel, .mapwrap { background-image: radial-gradient(380px circle at var(--mx, -500px) var(--my, -500px), var(--spot), transparent 60%); }
@media (prefers-reduced-motion: reduce) { .mline { stroke-dashoffset: 0; } .cbtn.solid::after { display: none; } }

/* v13 "Pearl Couture": Thai serif display, metallic champagne type, marble light, gold-framed answer, black-and-gold buttons */
:root {
  --serif: "LINE Seed Sans TH", "Noto Sans Thai", system-ui, sans-serif;
  --champ-1: #8C6A2F; --champ-2: #C9A55E; --champ-3: #F1DDA8; --champ-4: #B48B45;
  --metal: linear-gradient(100deg, var(--champ-1) 0%, var(--champ-2) 22%, var(--champ-3) 38%, var(--champ-2) 52%, var(--champ-1) 70%, var(--champ-2) 86%, var(--champ-3) 100%);
  --marble-o: .55; --hero-glow: rgba(233, 207, 150, .28);
  --btn-gold: #E7CF98;
}
:root[data-theme="dark"] { --champ-1: #A8833F; --champ-2: #E2C285; --champ-3: #FFF0C8; --champ-4: #C9A55E; --marble-o: .16; --hero-glow: rgba(226, 194, 133, .14); --btn-gold: #1A1408; }
body { background: var(--bg) var(--marble, none) center top / 1400px auto no-repeat; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 34% at 50% 0%, var(--hero-glow), transparent 70%); }
.col::before { content: ""; position: absolute; }
.metal { background: var(--metal); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: metal 9s ease-in-out infinite alternate; }
@keyframes metal { from { background-position: 0% 0; } to { background-position: 100% 0; } }
/* type */
.hello h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 5vw, 46px); letter-spacing: 0; line-height: 1.25; }
.hello p { letter-spacing: .04em; }
.bhead h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 5.4vw, 52px); line-height: 1.2; }
.ans-h h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.ph h3 { font-family: var(--serif); font-weight: 400; font-size: 19px; }
.gh b { font-family: var(--serif); font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 10px; }
.gh b::before { content: ""; width: 16px; height: 1px; background: var(--champ-2); }
.brand .wm { font-family: var(--serif); font-weight: 400; letter-spacing: .22em; font-size: 15px; text-transform: uppercase; }
.brand .wm em { color: var(--champ-4); }
.toptabs button { letter-spacing: .03em; }
/* gold-framed answer card */
.ans { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(140deg, var(--champ-3), var(--line) 30%, var(--line) 70%, var(--champ-2)) border-box; box-shadow: 0 24px 50px -30px rgba(140, 106, 47, .35); }
.ans-h::before { content: ""; display: block; width: 28px; height: 1px; background: var(--champ-2); margin-bottom: 10px; order: 9; }
/* black & gold primary */
.cbtn.solid, .btn.primary { background: linear-gradient(180deg, #1C2230, #0B0E14); color: var(--champ-3); box-shadow: inset 0 0 0 1px rgba(226, 194, 133, .35), 0 14px 28px -16px rgba(11, 14, 20, .8); letter-spacing: .03em; }
.cbtn.solid:hover, .btn.primary:hover { background: linear-gradient(180deg, #232A3A, #0E121A); }
:root[data-theme="dark"] .cbtn.solid, :root[data-theme="dark"] .btn.primary { background: linear-gradient(180deg, #F3E1B2, #C9A55E); color: #1A1408; box-shadow: 0 14px 28px -16px rgba(226, 194, 133, .6); }
.cbtn.solid.done, .cbtn.done { background: var(--gold-done); color: var(--gold-done-ink); box-shadow: inset 0 0 0 1px var(--gold-line); }
/* search pill: champagne ring */
.sfield { border: 1px solid transparent; box-shadow: var(--shadow-pill); background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(120deg, var(--line), var(--champ-3) 50%, var(--line)) border-box; }
.sfield:focus-within { box-shadow: var(--shadow-pill), 0 0 0 6px var(--gold-soft); background: linear-gradient(var(--card), var(--card)) padding-box, var(--metal) border-box; }
/* hairline under greeting a touch longer, logo ring metallic */
.hello .hr { width: 56px; background: var(--metal); }
.bhead .code { letter-spacing: .3em; }
.brand svg { box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px var(--champ-2); }
.wd[aria-pressed="true"] { border-color: var(--champ-2); box-shadow: 0 0 0 1px var(--champ-2), 0 10px 22px -14px rgba(140, 106, 47, .5); }
.zones button[aria-pressed="true"] { background: linear-gradient(180deg, #1C2230, #0B0E14); color: var(--champ-3); }
:root[data-theme="dark"] .zones button[aria-pressed="true"] { background: linear-gradient(180deg, #F3E1B2, #C9A55E); color: #1A1408; }
.zones button[aria-pressed="true"] .n { color: inherit; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .metal { animation: none; } }
.wreveal.metal { background: none; color: var(--champ-1); -webkit-text-fill-color: currentColor; animation: none; }
.wreveal.metal span { background: var(--metal); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: wordIn .9s var(--ease-ios) both, metal 9s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * 90ms + 80ms), 0s; padding-bottom: .08em; }
.metal { padding-bottom: .06em; }
.cbtn:not(.solid) { color: var(--gold-text); background: var(--gold-soft); }
.cbtn.icon { background: var(--gold-soft); color: var(--gold-text); }
.grow .gt[style*="accent-text"] { color: var(--gold-text) !important; }
.copy { color: var(--gold-text); background: var(--gold-soft); }
.shint button:hover { border-color: var(--champ-2); }
/* v13.1: stable metallic text (no flicker on hover) */
.metal { will-change: background-position; transform: translateZ(0); backface-visibility: hidden; }
.hello h2.metal:not(.wreveal) { display: inline-block; }
.hello { display: flex; flex-direction: column; align-items: center; }

/* v14: easier doctor access */
.person.tapdoc { cursor: pointer; border-radius: 12px; transition: background .2s; }
.person.tapdoc:hover { background: var(--card-2); }
.person.tapdoc::after { content: ""; position: absolute; right: -4px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: translateY(-50%) rotate(45deg); opacity: .5; }
.person.tapdoc .tm { padding-right: 12px; }
.drail { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 6px; scroll-snap-type: x proximity; -webkit-mask: linear-gradient(90deg, #000 90%, transparent); mask: linear-gradient(90deg, #000 90%, transparent); }
.drail::-webkit-scrollbar { display: none; }
.dchipx { flex: none; scroll-snap-align: start; width: 88px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; transition: border-color .2s, transform .3s var(--ease-ios); }
.dchipx:hover { border-color: var(--champ-2, var(--gold)); } .dchipx:active { transform: scale(.96); }
.dchipx .ava { grid-row: auto; width: 40px; height: 40px; font-size: 13px; }
.dchipx b { font-weight: 400; font-size: 14px; } .dchipx small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.docans .dcount { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 20px 6px; }
.dc { border: 1px solid var(--line); border-radius: 16px; background: var(--card-2); padding: 12px 14px; text-align: left; color: inherit; display: flex; flex-direction: column; gap: 0; transition: border-color .2s; }
.dc:hover { border-color: var(--champ-2, var(--gold)); }
.dc b { font-family: var(--serif, inherit); font-weight: 300; font-size: 30px; line-height: 1.1; }
.dc span { font-size: 12.5px; color: var(--muted); }
.dc.no b { color: var(--bad); } .dc.yes b { color: var(--ok); }
.pftoday { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); font-size: 14px; margin-bottom: 10px; }
.pftoday svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.pftoday span { flex: 1; min-width: 0; } .pftoday b { font-weight: 400; }
.pfnotes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pfnotes span { font-size: 13px; padding: 8px 12px; border-radius: 12px; background: var(--gap-soft); color: var(--ink-2); }
.pfbar { position: sticky; top: -22px; z-index: 2; background: var(--menu); display: flex; flex-direction: column; gap: 8px; padding: 8px 0 10px; margin: 0 0 4px; }
.pfq { display: flex; align-items: center; gap: 8px; height: 44px; border-radius: 999px; padding: 0 14px; border: 1px solid var(--line); background: var(--card); }
.pfq:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); }
.pfq svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.pfq input { flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; min-width: 0; }
.pfbar .seg { align-self: flex-start; }
.pfsec { margin-top: 6px; } .pfsec h4.pf { margin-top: 10px; }
.pfsec.sno h4.pf { color: var(--bad); } .pfsec.syes h4.pf { color: var(--ok); }
.pfsec .pfg + .pfg { margin-top: 8px; }
.pchip.no { text-decoration: none; background: var(--bad-soft); color: var(--bad); }
.pfweek { margin-top: 14px; border: 1px solid var(--line); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 12px; }
.dpick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 10px 12px; text-align: left; color: inherit; }
.dpick:hover { border-color: var(--gold-line); }
.dpick .ava { grid-row: auto; width: 36px; height: 36px; font-size: 12px; flex: none; }
.dpick b { display: block; font-weight: 400; } .dpick small { font-size: 12px; color: var(--muted); }
[hidden] { display: none !important; }

/* v16: doctors-today as a rotating glass ring (virtual cylinder, drawn in JS; drag / swipe / wheel / arrows) */
.ring { position: relative; height: 236px; margin-top: 2px; touch-action: pan-y; user-select: none; -webkit-user-select: none; isolation: isolate; }
.ring::before { content: ""; position: absolute; inset: 18px 12% 30px; z-index: -1; border-radius: 50%; filter: blur(26px); opacity: .75;
  background: radial-gradient(40% 60% at 32% 50%, rgba(233, 207, 150, .55), transparent 70%), radial-gradient(38% 60% at 70% 45%, rgba(127, 170, 240, .35), transparent 70%); }
.ring::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 10px; height: 16px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(16, 21, 31, .16), transparent); }
.ringstage { position: absolute; inset: 0; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.gcard { position: absolute; left: 50%; top: 48%; width: 134px; height: 184px; padding: 18px 10px 12px; border-radius: 24px; color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; overflow: hidden; will-change: transform, opacity; backface-visibility: hidden; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(155deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .34) 52%, rgba(255, 255, 255, .58));
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 0 0 1px rgba(201, 165, 94, .16), 0 18px 34px -20px rgba(20, 30, 60, .4);
  transition: box-shadow .4s var(--ease-ios); }
.gcard.front { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 0 0 1px rgba(201, 165, 94, .6), 0 0 0 4px rgba(233, 207, 150, .22), 0 28px 46px -22px rgba(140, 106, 47, .5); }
.gcard:focus-visible { outline: 2px solid var(--champ-2); outline-offset: 3px; }
.gsheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .85;
  background: linear-gradient(112deg, transparent 32%, rgba(255, 255, 255, .85) 44%, rgba(241, 221, 168, .45) 50%, transparent 60%); background-size: 280% 100%;
  background-position: calc(50% + var(--t, 0) * 70%) 0; }
.gcard > :not(.gsheen) { position: relative; z-index: 1; }
.gcard.front .gsheen { opacity: .55; }
.gcard .ava { width: 48px; height: 48px; font-size: 15px; margin-bottom: 6px; box-shadow: 0 8px 18px -8px rgba(44, 95, 196, .6), inset 0 1px 0 rgba(255, 255, 255, .45); }
.gcard b { font-weight: 400; font-size: 17px; line-height: 1.2; }
.gcard small { font-size: 12px; color: var(--ink-2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .gtm { color: var(--muted); font-size: 11.5px; }
.gtag { margin-top: auto; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--gap-soft); color: var(--gap); }
.gtag.ok { background: var(--ok-soft); color: var(--ok); }
.ringnav { position: absolute; top: 48%; transform: translateY(-50%); z-index: 400; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2);
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 8px 20px -10px rgba(16, 21, 31, .35); transition: transform .3s var(--ease-ios), color .2s; }
.ringnav:hover { color: var(--gold-text); } .ringnav:active { transform: translateY(-50%) scale(.92); }
.ringnav.prev { left: 2px; } .ringnav.next { right: 2px; }
.ringnav svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .gcard { color: var(--ink); background: linear-gradient(155deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04) 55%, rgba(255, 255, 255, .09)); border-color: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(226, 194, 133, .12), 0 20px 36px -20px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .gcard.front { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(226, 194, 133, .55), 0 0 0 4px rgba(226, 194, 133, .12), 0 28px 46px -22px rgba(0, 0, 0, .9); }
:root[data-theme="dark"] .gsheen { opacity: .35; }
:root[data-theme="dark"] .ringnav { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .ring::before { opacity: .35; }
@media (max-width: 520px) { .listhead .wide { display: none; } .ring { height: 220px; } .gcard { width: 120px; height: 172px; } .ringnav { display: none; } }

/* v16.1: doctor search above the ring */
.dfindrow { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 10px 0 0; }
.dfind { position: relative; display: flex; align-items: center; gap: 8px; width: min(380px, 100%); height: 42px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 24px -18px rgba(20, 40, 90, .35); transition: border-color .2s, box-shadow .3s var(--ease-ios); }
.dfind:focus-within { border-color: var(--gold-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 4px var(--gold-soft), 0 12px 26px -18px rgba(140, 106, 47, .45); }
.dfind svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.dfind input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.dfind input::placeholder { color: var(--muted); }
.dfind input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .55; cursor: pointer; }
.dfc { font-size: 12px; color: var(--gold-text); flex: none; }
.dfmsg { margin: 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.dfmsg .chip { display: inline-flex; align-items: center; gap: 2px; }
.dfmsg .chip svg { width: 14px; height: 14px; }
.gcard.dim { filter: grayscale(.85); }
.gcard.dim > :not(.gsheen) { opacity: .45; }
.gcard.hit { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 0 0 1.5px var(--champ-2), 0 0 0 5px rgba(233, 207, 150, .38), 0 28px 46px -22px rgba(140, 106, 47, .55); }
:root[data-theme="dark"] .dfind { background: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .gcard.hit { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 1.5px var(--champ-2), 0 0 0 5px rgba(226, 194, 133, .2), 0 28px 46px -22px rgba(0, 0, 0, .9); }

/* v16.2: clearable procedure check on the branch page */
.qchip .qx { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; margin-right: -4px; border-radius: 50%; background: rgba(255, 255, 255, .25); vertical-align: -3px; }
.qchip .qx svg { width: 12px; height: 12px; }
.qclear svg { width: 14px; height: 14px; }
.qclear:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }

/* v16.3: finder in Pearl — hero search with built-in place suggestions (no map service needed) */
#view > .fhero, #view > .fopts, #view > .fres { width: min(100%, 980px); margin-inline: auto; }
.fhero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 0 2px; }
.fhero h2 { margin: 0; font-weight: 400; font-size: clamp(30px, 4.6vw, 42px); line-height: 1.25; }
.fhero p { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.fhero .fsearch { width: min(640px, 100%); margin-top: 8px; }
.fhero .fsearch .cbtn { flex: none; }
.fsug { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 680px; min-height: 8px; }
.fsug > .muted { font-size: 12.5px; align-self: center; margin-right: 2px; }
.fsug .qchip { background: var(--card); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); padding: 8px 14px; }
.fsug .qchip:hover { box-shadow: 0 0 0 1px var(--gold-line), var(--shadow-1); color: var(--ink); }
.fsug .qchip small { margin-left: 6px; font-size: 11px; color: var(--muted); }
.fhero .hint { font-size: 12.5px; color: var(--gold-text); min-height: 1em; }
.fopts { display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(130px, .7fr) auto auto; gap: 14px; align-items: end; padding: 16px 18px; }
.fopts .field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fopts .field > label { font-size: 12.5px; color: var(--muted); }
.fopts .fme { align-self: end; }
@media (max-width: 760px) { .fopts { grid-template-columns: 1fr 1fr; } .fopts .field:first-child { grid-column: 1 / -1; } }

/* v16.4: finder route — real Google Maps embed + travel modes */
.fmap { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.fmodes { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px; }
.fmodes::-webkit-scrollbar { display: none; }
.fmode { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.fmode:hover { border-color: var(--gold-line); }
.fmode[aria-selected="true"] { background: linear-gradient(180deg, #1C2230, #0B0E14); color: var(--champ-3); border-color: transparent; }
:root[data-theme="dark"] .fmode[aria-selected="true"] { background: var(--champ-2); color: #1A1408; }
.gwrap { position: relative; border-radius: 18px; overflow: hidden; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line); aspect-ratio: 4 / 3.4; min-height: 300px; }
.gframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rsum { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 2px 4px; }
.rsum > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rsum b { font-weight: 400; font-size: 16px; }
.rsum span { font-size: 13px; color: var(--muted); }
.rsum .cbtn { text-decoration: none; }
.ract .btn.on { border-color: var(--gold-line); color: var(--gold-text); background: var(--gold-soft); }
@media (max-width: 980px) { .fcols .fmap { order: -1; position: static; } }

/* v16.5: finder is procedure-first: step 1 procedure, step 2 location */
.fstep { display: flex; align-items: center; gap: 8px; width: min(640px, 100%); margin: 14px 0 -2px; font-size: 13px; color: var(--ink-2); letter-spacing: .02em; }
.fstep .fn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; color: var(--champ-3); background: linear-gradient(180deg, #1C2230, #0B0E14); }
:root[data-theme="dark"] .fstep .fn { background: var(--champ-2); color: #1A1408; }
.fhero .fsearch { margin-top: 4px; }
.fsearch.picked { box-shadow: var(--shadow-pill), 0 0 0 1.5px var(--gold-line); }
.fsearch.picked input { color: var(--gold-text); }
.fclear { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); color: var(--muted); cursor: pointer; }
.fclear:hover { color: var(--bad); }
.fmore { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; }
.ftime { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.ftime input { border: 0; background: var(--fill-2); border-radius: 999px; padding: 6px 10px; font: inherit; color: var(--ink); }

/* v16.6: procedure combobox + location browse + precision */
.fcombo { position: relative; width: min(640px, 100%); display: flex; flex-direction: column; align-items: stretch; }
.fcombo .fsearch { width: 100%; }
.fdrop { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fdrop:hover { border-color: var(--gold-line); color: var(--gold-text); }
.fpanel { position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; right: 0; max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; text-align: left;
  padding: 12px; border-radius: 22px; background: var(--menu); border: 1px solid var(--line); box-shadow: var(--shadow-2); animation: calIn .25s var(--ease-ios); }
.fpg + .fpg { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.fpg > b { display: block; font-weight: 400; font-size: 12.5px; color: var(--gold-text); margin: 0 4px 6px; letter-spacing: .03em; }
.fpc { display: flex; flex-wrap: wrap; gap: 6px; }
.fpanel .qchip { background: var(--fill-2); }
.fpanel .qchip:hover { background: var(--gold-soft); color: var(--ink); }
.ftabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; position: sticky; top: -12px; background: var(--menu); padding: 2px 0 8px; }
.ftab { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.ftab[aria-pressed="true"] { background: linear-gradient(180deg, #1C2230, #0B0E14); color: var(--champ-3); border-color: transparent; }
:root[data-theme="dark"] .ftab[aria-pressed="true"] { background: var(--champ-2); color: #1A1408; }
.fhero .hint.prec-ok { color: var(--ok); } .fhero .hint.prec-mid { color: var(--gold-text); } .fhero .hint.prec-low { color: var(--gap); }
.fhero .hint b { font-weight: 400; color: var(--ink); }
.fguide { margin: 2px 0 0; max-width: 640px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.fguide b { font-weight: 400; color: var(--ink-2); }
@media (max-width: 520px) { .fdrop { padding: 0 9px; } .fsearch .cbtn { padding: 0 11px; } }

/* v16.7: dropdown panels as one tidy column (like a native select), easier to scan */
.fpanel .fpc { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.fpanel .qchip { display: block; width: 100%; text-align: left; border-radius: 12px; background: transparent; padding: 11px 14px; font-size: 15.5px; line-height: 1.35; color: var(--ink); }
.fpanel .qchip:hover, .fpanel .qchip:focus-visible { background: var(--fill); color: var(--ink); }
.fpanel .qchip.on { background: var(--gold-soft); color: var(--gold-text); }
.fpanel .qchip.on::after { content: "✓"; float: right; color: var(--gold-text); }
.fpanel .qchip + .qchip { box-shadow: 0 -1px 0 var(--line-2); }
.fpanel .qchip:hover + .qchip, .fpanel .qchip.on + .qchip { box-shadow: none; }
.fpg + .fpg { margin-top: 4px; padding-top: 4px; }
.fpg > b { position: sticky; top: -12px; z-index: 1; background: var(--menu); margin: 0; padding: 8px 14px 6px; font-size: 13px; }
.fpanel { padding: 8px 8px 10px; }
.ftabs { top: -8px; padding: 6px 4px 8px; }

/* v16.8: compact native-select feel — tight rows, clear group headers, taller drop */
.fpanel { max-height: min(560px, 68vh); padding: 6px; border-radius: 18px; }
.fpanel .qchip { padding: 7px 12px; font-size: 15px; line-height: 1.3; border-radius: 8px; }
.fpanel .qchip + .qchip { box-shadow: none; }
.fpg + .fpg { margin-top: 6px; padding-top: 0; border-top: 0; }
.fpg > b { top: -6px; margin: 0 0 2px; padding: 7px 12px; font-size: 13.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink); background: var(--fill); border-radius: 8px; }
:root[data-theme="dark"] .fpg > b { background: #20242D; }
.ftabs { top: -6px; padding: 4px 2px 6px; margin-bottom: 4px; }

.ftime { white-space: nowrap; }
.ftime .fdt { font-size: 12.5px; color: var(--ink-2); padding-right: 8px; }
@media (max-width: 520px) { .ftime .fdt { display: none; } }

/* v16.9: offline route map (preview / no Google) */
:root { --rm-a: #FBFBFD; --rm-b: #F1F3F8; --rm-grid: rgba(16, 21, 31, .045); --rm-river: rgba(120, 170, 230, .45); --rm-route: #1F6FE5; }
:root[data-theme="dark"] { --rm-a: #171A21; --rm-b: #12151B; --rm-grid: rgba(255, 255, 255, .05); --rm-river: rgba(100, 150, 220, .35); --rm-route: #7FB0FF; }
.rmap { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rmap text { font: 400 12px var(--f); fill: var(--ink-2); paint-order: stroke; stroke: var(--rm-a); stroke-width: 3px; stroke-linejoin: round; }
.rmap .rst { font-size: 10.5px; fill: var(--muted); }
.rmap .rwalk { fill: none; stroke: var(--ink-2); stroke-width: 3; stroke-dasharray: 1 7; stroke-linecap: round; }
.rmap .rbd { font-size: 12.5px; fill: var(--ink); }
.rmap .rkm { font-size: 12px; fill: var(--rm-route); }
.rmap .rdist { font-size: 12px; letter-spacing: .12em; fill: var(--muted); opacity: .55; stroke: none; }
.rmap .rdl { font-size: 14px; fill: var(--ink); }
.rmap .rml { font-size: 13px; fill: var(--gold-text); }
.rmap .rscale text { font-size: 11px; stroke: none; }
.gwrap .gframe { z-index: 1; background: var(--fill-2); }
.gnote { position: absolute; right: 10px; top: 10px; z-index: 2; font-size: 11.5px; color: var(--muted); background: var(--rm-a); padding: 4px 10px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line); }

/* v17: home search drop-down (procedures / branches / doctors) */
.askbox { position: relative; }
.askpanel { z-index: 70; max-height: min(520px, 62vh); }
.fpanel .qchip .asub { float: right; margin-left: 12px; font-size: 12.5px; color: var(--muted); }
.askpanel .ftabs { z-index: 2; }
.askhint { margin: 2px 8px 8px; font-size: 13px; color: var(--muted); }
.askhint b { font-weight: 400; color: var(--gold-text); }

/* v18: branch week — open by default, one row per day: day · count · doctors with hours */
.wkcard { padding: 16px 16px 12px; }
.wkcard .ph { margin-bottom: 8px; }
.wknav { display: inline-flex; align-items: center; gap: 4px; }
.wknav b { font-weight: 400; font-size: 13px; color: var(--ink-2); }
.wknav .cn { width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.wknav .cn:hover { background: var(--fill-2); color: var(--ink); }
.wknav .cn svg { width: 16px; height: 16px; }
.wkrows { display: flex; flex-direction: column; }
.wkr { display: grid; grid-template-columns: 136px 64px 1fr; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; }
.wkr + .wkr { box-shadow: 0 -1px 0 var(--line-2); }
.wkr.sel { background: var(--gold-soft); box-shadow: none; }
.wkr.sel + .wkr { box-shadow: none; }
.wkd { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; padding: 2px 0; cursor: pointer; }
.wkd b { font-weight: 700; font-size: 15px; min-width: 26px; }
.wkd span { font-size: 13px; color: var(--ink-2); }
.wkd i { font-style: normal; font-size: 11px; color: var(--gold-text); background: var(--card); border: 1px solid var(--gold-line); border-radius: 999px; padding: 0 7px; }
.wkc { justify-self: start; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.wkc.zero { background: var(--gap-soft); color: var(--gap); }
.wkc.x { background: var(--bad-soft); color: var(--bad); }
.wkp { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.wkdoc { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; transition: border-color .2s; }
.wkdoc:hover { border-color: var(--gold-line); }
.wkdoc small { font-size: 12.5px; color: var(--muted); }
.wkdoc em { font-style: normal; font-size: 11px; color: var(--accent-text); }
.wkdoc.ext em { color: var(--ok); }
.wkdoc.off { cursor: default; color: var(--muted); text-decoration: line-through; border-style: dashed; }
.wkdoc.off em { color: var(--gap); text-decoration: none; }
.wkr.closed .wkd b, .wkr.closed .wkd span { color: var(--bad); }
.wkfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12.5px; }
@media (max-width: 560px) {
  .wkr { grid-template-columns: 1fr auto; grid-template-areas: "d c" "p p"; row-gap: 6px; }
  .wkd { grid-area: d; } .wkc { grid-area: c; justify-self: end; } .wkp { grid-area: p; }
}

/* v18.1: doctor answer → 7-day table; the searched day stands out */
.dweek { margin: 4px 0 10px; padding: 0 14px; }
.dweek .ph { padding: 0 6px; }
.dweek .ph { margin-bottom: 6px; }
.wkc.none { background: var(--fill-2); color: var(--muted); }
.wkr.sel { background: linear-gradient(90deg, rgba(201, 165, 94, .30), rgba(201, 165, 94, .12)); box-shadow: inset 4px 0 0 var(--champ-2), 0 0 0 1px var(--gold-line); }
.wkr.sel .wkd b, .wkr.sel .wkd span { color: var(--ink); font-weight: 700; }
.wkr.sel .wkd i { background: var(--champ-2); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .wkr.sel .wkd i { color: #1A1408; }
.wkr.sel + .wkr { box-shadow: none; }

.pfweek2 .dweek { padding: 0; margin: 6px 0 14px; }
.pfweek2 .dweek .ph { padding: 0 6px; }

/* v18.2: branch procedure check — roster based */
.qrow .qnext { grid-column: 2 / -1; font-size: 12.5px; color: var(--ok); }
.qno { margin: 8px 2px 0; font-size: 13px; }
.qmsg.good .ph h3 { color: var(--ok); }
.qmsg.bad .ph h3 { color: var(--bad); }

.inans { margin-left: 20px; margin-right: 20px; }
.qmsg.inans { margin-top: 6px; }

/* v18.3: gender avatar on the doctor ring — male blue ♂, female pink ♀ */
.ava.g-m { background: linear-gradient(160deg, #6EA6F2, #2C64C8); color: #fff; }
.ava.g-f { background: linear-gradient(160deg, #F4A9C8, #D2558A); color: #fff; }
.ava.g-x { background: linear-gradient(160deg, #B5BCC9, #7B8494); color: #fff; }
.gcard .ava.g-m { box-shadow: 0 8px 18px -8px rgba(44, 100, 200, .6), inset 0 1px 0 rgba(255, 255, 255, .45); }
.gcard .ava.g-f { box-shadow: 0 8px 18px -8px rgba(210, 85, 138, .55), inset 0 1px 0 rgba(255, 255, 255, .45); }
.gcard .ava svg { width: 24px; height: 24px; }

/* v18.4: Thai day colours (จ เหลือง · อ ชมพู · พ เขียว · พฤ ส้ม · ศ ฟ้า · ส ม่วง · อา แดง) so a day is recognised at a glance */
/* pastel version: soft fill + deeper ink of the same hue + thin ring, sits with the pearl/champagne theme */
:root { --d0: #E8C964; --d1: #E7A3BF; --d2: #8FC9A7; --d3: #EDB27C; --d4: #92BFE6; --d5: #B7A2DA; --d6: #E59A9A;
  --d0b: #FBF1CF; --d1b: #FAE3EC; --d2b: #E0F1E7; --d3b: #FBE8D6; --d4b: #E0EDF9; --d5b: #ECE5F7; --d6b: #F9E1E1;
  --d0i: #8A6A12; --d1i: #A44871; --d2i: #2F7A50; --d3i: #A35A1C; --d4i: #2E6EA6; --d5i: #6A4BA1; --d6i: #A93A3A; }
:root[data-theme="dark"] { --d0b: rgba(232, 201, 100, .18); --d1b: rgba(231, 163, 191, .18); --d2b: rgba(143, 201, 167, .18); --d3b: rgba(237, 178, 124, .18); --d4b: rgba(146, 191, 230, .18); --d5b: rgba(183, 162, 218, .18); --d6b: rgba(229, 154, 154, .18);
  --d0i: #F1D98A; --d1i: #F2BCD2; --d2i: #A9DBBE; --d3i: #F4C79E; --d4i: #B3D3EF; --d5i: #CDBDE8; --d6i: #F0B4B4; }
.wkd .dday { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; min-width: 0; border-radius: 50%; font-size: 13.5px; font-weight: 700; letter-spacing: 0; }
.dday.dd0 { background: var(--d0b); color: var(--d0i); box-shadow: inset 0 0 0 1.5px var(--d0); } .dday.dd1 { background: var(--d1b); color: var(--d1i); box-shadow: inset 0 0 0 1.5px var(--d1); } .dday.dd2 { background: var(--d2b); color: var(--d2i); box-shadow: inset 0 0 0 1.5px var(--d2); } .dday.dd3 { background: var(--d3b); color: var(--d3i); box-shadow: inset 0 0 0 1.5px var(--d3); } .dday.dd4 { background: var(--d4b); color: var(--d4i); box-shadow: inset 0 0 0 1.5px var(--d4); } .dday.dd5 { background: var(--d5b); color: var(--d5i); box-shadow: inset 0 0 0 1.5px var(--d5); } .dday.dd6 { background: var(--d6b); color: var(--d6i); box-shadow: inset 0 0 0 1.5px var(--d6); }
.wkd { align-items: center; }
.wkr { grid-template-areas: "d c p"; }
.wkr > .wkd { grid-area: d; } .wkr > .wkc { grid-area: c; } .wkr > .wkp { grid-area: p; }
.wkr { grid-template-columns: 150px auto 1fr; }
.wkc:empty { display: none; }
.wkr { border-left: 0; }
.wkr::before { content: none; }
.wkr.wd0 .wkdoc:not(.off) { border-color: color-mix(in srgb, var(--d0) 70%, var(--line)); } .wkr.wd1 .wkdoc:not(.off) { border-color: color-mix(in srgb, var(--d1) 70%, var(--line)); }
.wkr.wd2 .wkdoc:not(.off) { border-color: color-mix(in srgb, var(--d2) 70%, var(--line)); } .wkr.wd3 .wkdoc:not(.off) { border-color: color-mix(in srgb, var(--d3) 70%, var(--line)); }
.wkr.wd4 .wkdoc:not(.off) { border-color: color-mix(in srgb, var(--d4) 70%, var(--line)); } .wkr.wd5 .wkdoc:not(.off) { border-color: color-mix(in srgb, var(--d5) 70%, var(--line)); }
.wkr.wd6 .wkdoc:not(.off) { border-color: color-mix(in srgb, var(--d6) 70%, var(--line)); }
@media (max-width: 560px) { .wkr { grid-template-columns: 1fr auto; grid-template-areas: "d c" "p p"; } }

/* v18.5: doctor chips take the day's pastel fill */
.wkr.wd0 .wkdoc:not(.off) { background: var(--d0b); }
.wkr.wd1 .wkdoc:not(.off) { background: var(--d1b); }
.wkr.wd2 .wkdoc:not(.off) { background: var(--d2b); }
.wkr.wd3 .wkdoc:not(.off) { background: var(--d3b); }
.wkr.wd4 .wkdoc:not(.off) { background: var(--d4b); }
.wkr.wd5 .wkdoc:not(.off) { background: var(--d5b); }
.wkr.wd6 .wkdoc:not(.off) { background: var(--d6b); }
.wkr .wkdoc:not(.off) small { color: var(--ink-2); }
.wkr .wkdoc:not(.off):hover { filter: brightness(.97); }

/* v18.6: chat-team note under the 7-day table, always visible */
#chatNote:empty { display: none; }
.chatnote { border-radius: var(--r-lg); padding: 14px 18px; background: linear-gradient(180deg, #FFF8E8, #FDF2DA); border: 1px solid var(--gold-line); box-shadow: var(--shadow-1); }
.chatnote b { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--gold-text); margin-bottom: 6px; }
.chatnote b svg { width: 18px; height: 18px; }
.chatnote p { margin: 0; white-space: pre-line; font-size: 15px; line-height: 1.6; color: var(--ink); }
:root[data-theme="dark"] .chatnote { background: rgba(210, 176, 108, .1); }

/* v19: voice input — mic inside every search box + "ได้ยินว่า…" bubble */
.micbtn { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.micbtn:hover { background: var(--fill-2); color: var(--gold-text); }
.micbtn.on { background: var(--bad); color: #fff; animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200, 35, 58, .35); } 50% { box-shadow: 0 0 0 8px rgba(200, 35, 58, 0); } }
.micwrap { position: relative; display: block; width: 100%; }
.micwrap > input { width: 100%; padding-right: 46px !important; box-sizing: border-box; }
.micwrap > .micbtn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); }
.dfind .micbtn, .pfq .micbtn { width: 30px; height: 30px; }
.vhint { position: fixed; z-index: 120; padding: 8px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; color: var(--ink); background: var(--menu); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.vhint b { font-weight: 700; }
.vhint[data-state="listen"] { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.vhint[data-state="done"] { border-color: var(--gold-line); }
.vhint[data-state="err"] { color: var(--gap); }
@media (prefers-reduced-motion: reduce) { .micbtn.on { animation: none; } }

/* v20 · Excel import summary */
.xwrap{margin-top:14px;padding:16px;border:1px solid var(--gold-line);border-radius:18px;background:var(--card)}
.xhead{font-size:15px;margin-bottom:12px;color:var(--ink)}
.xsums{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.xsum{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:14px;background:var(--fill);border:1px solid var(--line)}
.xsum b{font-size:12px;font-weight:600;color:var(--muted)}
.xsum span{font-size:17px;font-weight:600;color:var(--muted)}
.xsum small{font-size:12px;color:var(--muted)}
.xsum.on{background:var(--gold-soft);border-color:var(--gold-line)}
.xsum.on span{color:var(--gold-text)}
.xerr{margin-top:12px;padding:12px 14px;border-radius:14px;background:rgba(214,92,92,.08);border:1px solid rgba(214,92,92,.35);color:var(--ink)}
.xerr b{color:#B24B4B}
.xerr ul{margin:6px 0 0;padding-left:18px;font-size:13px;line-height:1.55}
.xdet{margin-top:12px}
.xdet summary{cursor:pointer;font-weight:600;color:var(--gold-text);padding:4px 0}
.xdet ul{list-style:none;margin:6px 0 0;padding:0;max-height:320px;overflow:auto;font-size:13px;line-height:1.5}
.xdet li{display:flex;gap:8px;align-items:baseline;padding:6px 0;border-top:1px solid var(--line)}
.xk{flex:0 0 auto;font-size:11px;font-weight:600;padding:2px 8px;border-radius:99px;background:var(--gold-soft);color:var(--gold-text)}

/* v21 · branch add / close */
.t tr.brshut td{color:var(--muted)}
.t tr.brshut td b{color:var(--muted);text-decoration:line-through;text-decoration-color:rgba(0,0,0,.25)}
.shutbadge{display:inline-block;margin-left:6px;font-size:11px;font-weight:600;padding:1px 8px;border-radius:99px;background:rgba(214,92,92,.12);color:#B24B4B;vertical-align:1px}
.t tr.brsep td{background:var(--fill);color:var(--muted);font-size:12px;font-weight:600;padding:10px 12px}
.brclose{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0 14px;padding-top:12px;border-top:1px solid var(--line)}
.brclose .muted{font-size:12px}

/* v22 · brand credit */
.brand .sub{display:block;margin-top:4px;font-size:10px;line-height:1;letter-spacing:.08em;color:var(--gold-text);opacity:.85;white-space:nowrap}
@media (max-width: 520px){.brand .sub{display:none}}

/* v23 · login (Supabase) */
.banner .bbtns{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}
.banner .bbtns button{margin-left:0}
.banner a.bl{border-radius:999px;padding:5px 11px;font-size:12px;background:var(--gold-soft);color:var(--gold-text);text-decoration:none}
.login .glass{padding:40px 30px 26px}
.login .lg-wm{font-family:var(--serif);letter-spacing:.24em;text-transform:uppercase;font-size:13px;color:var(--ink);margin:14px 0 2px}
.login .lg-wm em{font-style:normal;color:var(--champ-4,var(--gold))}
.login h1{margin:2px 0 6px}
.login .lg-sub{margin:0 0 26px}
.gsign{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:50px;padding:0 18px;border-radius:999px;border:1px solid var(--line-2,var(--line));background:var(--card);color:var(--ink);font:inherit;font-size:15px;cursor:pointer;box-shadow:var(--shadow-1);transition:transform .15s,box-shadow .15s}
.gsign:hover{transform:translateY(-1px);box-shadow:var(--shadow-2)}
.gsign:active{transform:translateY(0)}
.gsign .glogo{width:20px;height:20px;flex:none}
.gsign.busy{opacity:.6;pointer-events:none}
.login .lg-note{font-size:12.5px;margin:16px 0 0}
.login .lg-note b{color:var(--gold-text);font-weight:600}
.login .lg-prev{font-size:12px;margin:14px 0 0;padding:8px 12px;border-radius:12px;background:var(--gold-soft);color:var(--gold-text)}
.login .lg-prev a{color:inherit;font-weight:600}
.login .lg-by{font-size:10.5px;letter-spacing:.08em;margin:22px 0 0;color:var(--gold-text);opacity:.8}

[hidden]{display:none!important}
