/* 좋은얼굴신종연치과의원 — subpages. Load after site.css (never edit site.css).
   Unscoped rules (header, footer, buttons, placeholders) also work on index.html once the
   partials in site/partials/ are pasted there. Page layout is scoped to body.sub. */

:root {
  --tbc-ink: #8F3B13;     /* placeholder ink: persimmon, deepened to pass AA on textured hanji (6.2:1) */
  --timber-ink: #84421F;  /* timber for small labels and numerals (6.3:1) */
  --rule: rgba(43, 38, 34, .16);
  --focus: var(--pine);
  --gap: clamp(18px, 2.4vw, 30px);
}

/* ---------- utilities ---------- */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a[href^="tel:"]:not(.btn), .nw { white-space: nowrap; }  /* a phone number or a short address never breaks at its hyphen */
/* a call BUTTON may wrap (WCAG 1.4.10: at 320 px its one-line label was wider than the column, and main clips the
   overflow): only its number stays whole (<span class="nw">), and the label goes under it, centred */
.btn[href^="tel:"] { flex-wrap: wrap; justify-content: center; text-align: center; row-gap: 0; }

/* placeholders: anything the clinic still has to fill or confirm */
.tbc { display: inline-block; color: var(--tbc-ink); font-size: inherit; font-weight: 600; background: rgba(217, 101, 42, .11); border-radius: 4px; padding: 0 .3em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }  /* inline-block: a placeholder moves to the next line whole */

.skip { position: fixed; z-index: 60; left: 12px; top: 8px; padding: 10px 18px; border-radius: 8px; background: var(--ink); color: #fff;
  font-weight: 600; text-decoration: none; transform: translateY(-220%); }
.skip:focus { transform: none; outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- header ---------- */
/* the bar is opaque hanji on every page, home too (site.css .bar): the sheets' text scrolls under it, and an older
   reader should never see it ghost through the name and the phone number */
.site-bar { gap: 20px; }
.site-bar .brand { margin-right: 0; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
.site-bar .brand .mark { flex: none; width: 40px; height: 40px; }
.site-bar .brand .bn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; }
.site-bar .brand .b2 { font-size: 14px; letter-spacing: .02em; }
.site-bar .site-nav { display: block; margin-left: auto; font-size: 16px; }
.site-nav ul { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 11px; border-radius: 8px; color: var(--ink-2);
  text-decoration: none; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: rgba(43, 38, 34, .06); }
.site-nav a[aria-current] { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 9px; }
/* white on persimmon is 3.6:1, so the call button is set as WCAG large text (19px bold) */
.call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 15px; font-size: 19px; font-weight: 700;
  line-height: 1; letter-spacing: .01em; }
.call-icon { width: 18px; height: 18px; flex: none; }
.nav-toggle { display: none; }
.nav-toggle:focus-visible, .site-nav a:focus-visible, .brand:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (min-width: 900px) and (max-width: 1099.98px) {  /* narrow desktop: the five links and the number with its icon fit inside the padding */
  .site-bar { gap: 14px; }
  .site-nav a { padding: 0 8px; }
}

@media (max-width: 899.98px) {
  .site-bar { gap: 10px; }
  .site-bar.nav-open { z-index: 40; }  /* the open menu paints over every fixed chip (시안, 자연의 소리) */
  .site-bar .call { order: 2; margin-left: auto; }
  .nav-toggle { order: 3; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px;
    padding: 0 14px 0 12px; border: 0; border-radius: 999px; cursor: pointer; color: var(--ink); font: 600 16px/1 var(--font);
    background: rgba(243, 233, 215, .92); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .32); }
  .nav-toggle-icon { position: relative; width: 18px; height: 14px; flex: none; }
  .nav-toggle-icon i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, opacity .2s; }
  .nav-toggle-icon i:nth-child(1) { top: 0; }
  .nav-toggle-icon i:nth-child(2) { top: 6px; }
  .nav-toggle-icon i:nth-child(3) { top: 12px; }
  .nav-open .nav-toggle-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-icon i:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-bar .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 4px clamp(18px, 4vw, 48px) 14px;
    max-height: calc(100vh - 56px); overflow-y: auto; border-top: 1px solid var(--rule);
    background: url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 600px auto, var(--hanji); box-shadow: 0 22px 30px -20px rgba(40, 28, 16, .5); }
  .site-bar.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--rule); }
  .site-nav a { min-height: 58px; padding: 0 4px; border-radius: 0; font-size: 19px; color: var(--ink); }
  .site-nav a[aria-current] { text-underline-offset: 7px; }
  /* without JS the menu simply stays open under the bar. The bar then is not fixed: the whole header, the open menu as
     its second row, sits at the top of the page and scrolls away with it (a fixed open menu would cover half a phone
     screen at every scroll position), and the 시안 chip follows it in the flow rather than lying on the first link */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-bar { position: relative; flex-wrap: wrap; row-gap: 0; height: auto; background: var(--hanji);
    box-shadow: 0 22px 30px -20px rgba(40, 28, 16, .5); }
  html:not(.js) .site-bar > .brand { min-height: 64px; }   /* the first row keeps the bar's own height */
  html:not(.js) .site-bar .site-nav { display: block; position: static; order: 4; flex: 0 0 100%; max-height: none; overflow: visible;
    padding: 4px 0 14px; background: none; box-shadow: none; }
  html:not(.js) .draft { position: relative; top: auto; left: auto; width: fit-content; margin: 12px 0 0 clamp(14px, 3vw, 30px); }
  html:not(.js) .sub main { padding-top: 12px; }
  html:not(.js) body:not(.sub) .hero { padding-top: 36px; }
  /* home's title then first stands below the menu, over the still's hanok rather than its sky: a fuller glow behind it */
  html:not(.js) body:not(.sub) .hero-in::before {
    background: radial-gradient(closest-side, rgba(246, 236, 218, .95), rgba(246, 236, 218, .86) 62%, rgba(246, 236, 218, 0)); }
}
@media (max-width: 760px) {
  .site-bar .brand { gap: 8px; }
  .site-bar .brand .mark { width: 34px; height: 34px; }
  .site-bar .brand .b1 { font-size: 19px; }
  .call { padding: 0 14px 0 12px; }
  html:not(.js) .site-bar > .brand { min-height: 56px; }   /* the phone bar's height (site.css) */
}
/* Phone header row: face mark + name, the number, the menu button. The face mark always shows and the number always shows
   in full (white on persimmon at 19px bold = WCAG large text). Each width step below keeps at least 8px of slack at its
   narrowest width (Pretendard); js/page.js adds the fit-1..5 steps further down if the row still overflows (text-spacing
   overrides, zoom, a wider fallback font). tools/check-layout.cjs checks 320-1024 px, also with WCAG 1.4.12 spacing. */
@media (max-width: 480px) {
  .site-bar { padding: 0 14px; gap: 8px; }
  .nav-toggle { padding: 0; width: 44px; }  /* icon only; its name 메뉴 stays for screen readers */
  .nav-toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 419.98px) { .call-icon { display: none; } }
@media (max-width: 389.98px) {
  .site-bar { padding: 0 10px; gap: 6px; }
  .site-bar .brand { gap: 6px; }
  .site-bar .brand .mark { width: 30px; height: 30px; }
  .call { padding: 0 10px; }
}
@media (max-width: 369.98px) { .site-bar .brand .b2 { font-size: 13px; } }
@media (max-width: 359.98px) {  /* one name line: 좋은얼굴 beside the mark; the full name stays the link's accessible name */
  .site-bar .brand .b1 { font-size: 17px; }
  .site-bar .brand .b2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 339.98px) {  /* the mark alone stands for the name (the hero below carries it in full) */
  .site-bar .brand .mark { width: 34px; height: 34px; }
  .site-bar .brand .bn { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* js/page.js fit steps, added in order only while the row overflows */
.site-bar.fit-1 .call-icon { display: none; }
.site-bar.fit-2 { padding-left: 10px; padding-right: 10px; gap: 6px; }
.site-bar.fit-2 .brand { gap: 6px; }
.site-bar.fit-2 .brand .mark { width: 30px; height: 30px; }
.site-bar.fit-2 .call { padding: 0 10px; }
@media (min-width: 900px) { .site-bar.fit-2 .site-nav a { padding: 0 6px; } }
.site-bar.fit-3 .brand .b2, .site-bar.fit-4 .brand .bn, .site-bar.fit-5 .call-num {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-bar.fit-5 .call { width: 44px; padding: 0; justify-content: center; }  /* last resort: the handset alone, still a 44px target */
.site-bar.fit-5 .call-icon { display: block; }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 10; padding: var(--gap) clamp(12px, 3.4vw, 40px) clamp(28px, 4vw, 52px); background: none;
  color: var(--ink); font-size: 17px; }
.site-footer .site-footer-in { width: auto; max-width: 1160px; margin: 0 auto; padding: clamp(30px, 3.6vw, 46px) clamp(24px, 4.6vw, 60px); }
.site-footer .f-name { margin: 0 0 16px; font: 600 22px/1.4 var(--display); display: flex; align-items: center; gap: 10px;
  overflow-wrap: anywhere; }  /* the name is one long word: at 320px with WCAG text spacing it wraps instead of widening the page */
.site-footer .f-name .mark { flex: none; width: 32px; height: 32px; }
.f-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 36px; margin: 0; }
.f-info div { display: flex; align-items: baseline; gap: 14px; }
.f-info dt { flex: none; min-width: 6.6em; color: var(--ink-2); }
.f-info dd { margin: 0; }
.f-info a { display: inline-block; padding: 8px 0; font-weight: 600; text-underline-offset: 4px; }  /* 44px+ tall */
.f-links { display: flex; flex-wrap: wrap; gap: 0 26px; margin: 14px 0 0; }
.f-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 4px; }
.f-links a[aria-current] { text-decoration-thickness: 2px; }
/* 표준 개인정보 보호지침 §20①: the 처리방침 link stands apart from the other notices by weight and colour. Timber deepened
   past --timber-ink: 7.8:1 on plain hanji, and >= 4.5:1 on 99.8% of the pixels behind it on the home footer's darker fibres */
.f-links a[href$="privacy.html"] { font-weight: 800; color: #6F3718; }
.site-footer .f-note { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.site-footer a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 760px) {
  .f-info { grid-template-columns: 1fr; }
  .f-info div { flex-direction: column; gap: 0; padding: 6px 0; }
}

/* ======================================================================
   Subpage layout (body.sub)
   ====================================================================== */
body.sub { font-size: 18px; line-height: 1.75; }
.sub main { padding: calc(64px + 40px) clamp(12px, 3.4vw, 40px) 0; }
/* anchors and keyboard focus stop clear of the fixed bar (top) and of the fixed 자연의 소리 button (bottom, home) */
html { scroll-padding: 92px 0 84px; }
body:not(.sub) .sec { scroll-margin-top: -92px; }  /* home: a jump to a section still lands with the section top at the screen top */
.wrap { max-width: 1160px; margin: 0 auto; }
.wrap.narrow { max-width: 900px; }
.stack > * + * { margin-top: var(--gap); }
.sub main a:not(.btn) { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sub main a:focus-visible, .sub main button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* hanji sheets: tiled, de-vignetted paper so tall sheets keep the same fibre scale; torn edge from sheet-mask */
.sub .sheet { width: 100%; padding: clamp(30px, 4vw, 56px) clamp(24px, 4.6vw, 60px); filter: drop-shadow(0 14px 20px rgba(64, 42, 22, .12)); }
.sub .sheet::before { opacity: 1; filter: none;
  background: radial-gradient(130% 80% at 50% 28%, rgba(255, 252, 245, .55), rgba(255, 252, 245, 0) 72%),
    url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 600px auto repeat, var(--hanji); }
.sub .sheet:nth-of-type(3n+1)::before { transform: rotate(-.2deg); }
.sub .sheet:nth-of-type(3n+2)::before { transform: rotate(.16deg); }
.sub .sheet h2 { margin: 0 0 18px; font: 600 clamp(25px, 2.5vw, 32px)/1.38 var(--display); letter-spacing: -.01em; }
.sub .sheet p { margin: 0 0 14px; }
.sub .sheet > :last-child, .sub .sheet p:last-child { margin-bottom: 0; }
.sub h3 { margin: 0 0 6px; font: 700 19px/1.5 var(--font); }
.prose { max-width: 42em; }

/* page head */
.page-head { padding-top: clamp(22px, 3vw, 40px) !important; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 8px; padding: 0; list-style: none; font-size: 16px; color: var(--ink-2); }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "›"; margin: 0 10px; color: rgba(43, 38, 34, .45); }
/* the padding widens the tap target to 44px; the equal negative margin keeps the visual spacing set by the separators */
.crumbs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 13px; margin: 0 -13px; color: var(--ink-2); }
.crumbs li:first-child a { padding-left: 19px; margin-left: -19px; }  /* 홈 is one syllable: 46px wide, extra room on the open side only */
.page-head h1 { margin: 0; font: 600 clamp(36px, 5vw, 60px)/1.2 var(--display); letter-spacing: -.02em; }
.sub .page-head .lead { margin: 16px 0 0; max-width: 34em; font-size: clamp(19px, 1.7vw, 21px); line-height: 1.7; }
.sub .page-head .avail { margin: 14px 0 0; color: var(--ink-2); font-size: 17px; }
.toc { margin-top: 24px; }
.sub .toc-label { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--ink-2); }
.toc ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 17px; border-radius: 999px; font-size: 16px; font-weight: 600;
  color: var(--ink); text-decoration: none; background: rgba(255, 255, 255, .38); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .2); }
.toc a:hover { background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .45); }

/* two-column body: content + sticky treatment list */
.cols { display: grid; gap: var(--gap); margin-top: var(--gap); }
.main-col > * + * { margin-top: var(--gap); }
@media (min-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
  .side-col { position: sticky; top: 88px; }
}
.after-head { margin-top: var(--gap); }
.grid-2 { display: grid; gap: var(--gap); }
@media (min-width: 960px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

/* lists */
.ticks, .dots { margin: 2px 0 0; padding: 0; list-style: none; }
.ticks li, .dots li { position: relative; padding: 10px 0 10px 34px; border-top: 1px solid var(--rule); }
.ticks li:first-child, .dots li:first-child { border-top: 0; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: calc(10px + .875em - 7px); width: 13px; height: 7px;
  border-left: 2.5px solid var(--timber-ink); border-bottom: 2.5px solid var(--timber-ink); transform: rotate(-45deg); }
.dots li::before { content: ""; position: absolute; left: 9px; top: calc(10px + .875em - 3.5px); width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); }
.sub .sheet .follow { margin-top: 16px; color: var(--ink-2); }

/* numbered steps */
.steps { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 18px; padding-bottom: 24px; counter-increment: step; }
.steps > li::before { content: counter(step); grid-row: 1 / span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  font: 600 21px/1 var(--display); color: var(--timber-ink); background: rgba(255, 255, 255, .5); box-shadow: inset 0 0 0 1.5px rgba(132, 66, 31, .55); }
.steps > li::after { content: ""; position: absolute; left: 23.25px; top: 56px; bottom: 6px; width: 1.5px;
  background: repeating-linear-gradient(180deg, rgba(43, 38, 34, .3) 0 5px, transparent 5px 10px); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 9px 0 4px; }
.sub .steps p { margin: 0; }
@media (min-width: 1000px) {
  .steps.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
  .steps.flow > li { grid-template-columns: 1fr; align-content: start; padding-bottom: 0; }  /* rows must not stretch to the tallest step */
  .steps.flow > li::before { grid-row: auto; margin-bottom: 12px; }
  .steps.flow > li::after { left: 58px; right: -10px; top: 23.25px; bottom: auto; width: auto; height: 1.5px;
    background: repeating-linear-gradient(90deg, rgba(43, 38, 34, .3) 0 5px, transparent 5px 10px); }
  .steps.flow h3 { margin-top: 0; }
}

/* key facts (insurance, transit, payment) */
.facts { margin: 4px 0 0; }
.facts > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 2px 20px; padding: 13px 0; border-top: 1px solid var(--rule); }
.facts > div:first-child { border-top: 0; padding-top: 4px; }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts > div { grid-template-columns: 1fr; } }

/* side effects / cautions */
.heed h2 { display: flex; align-items: center; gap: 12px; }
.heed-mark { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  font: 700 19px/1 var(--font); color: var(--hanji); background: var(--ink); }

/* booking sheet */
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.sub .sheet .book-addr { margin: 18px 0 0; color: var(--ink-2); }
.book-addr b { color: var(--ink); }
.sub .btn { font-size: 18px; }
/* white on persimmon is 3.6:1, so every persimmon button is set as WCAG large text (19px bold), home included */
.btn.gam { font-size: 19px; font-weight: 700; }
.btn .ext { font-size: .9em; opacity: .7; }
.btn.gam .ext { opacity: 1; }  /* white at .7 on persimmon is 2.5:1; whole white matches the label (3.6:1, large text) */

/* treatment list (aside) */
.sub .tx-nav { padding: 30px 28px 26px; }
.sub .sheet .tx-nav-h { margin: 0 0 8px; font-size: 22px; }
.tx-nav ul { margin: 0; padding: 0; list-style: none; }
.tx-nav li + li { border-top: 1px solid var(--rule); }
.tx-nav ul a { position: relative; display: flex; align-items: center; min-height: 47px; padding-left: 18px; color: var(--ink-2); font-size: 17px; text-decoration: none; }
.tx-nav ul a:hover { color: var(--ink); }
.tx-nav ul a[aria-current] { color: var(--ink); font-weight: 700; }
.tx-nav ul a[aria-current]::before { content: ""; position: absolute; left: 2px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--timber-ink); }
.tx-nav-all { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-weight: 600; color: var(--ink); }
@media (max-width: 1099.98px) {
  .tx-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
  .tx-nav li, .tx-nav li + li { border-top: 1px solid var(--rule); }
}

/* treatment cards (overview) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 6px 0 0; padding: 0; list-style: none; }
.tx-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px 22px 16px; border-radius: 12px; color: var(--ink); text-decoration: none;
  background: rgba(255, 255, 255, .36); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .14); transition: background .2s, box-shadow .2s, transform .2s; }
.tx-card:hover { background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .42); transform: translateY(-2px); }
.sub .tx-card h3 { margin: 0; font: 600 23px/1.35 var(--display); }
.sub .tx-card p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.tx-card .tx-meta { margin-top: auto; padding-top: 8px; font-size: 16px; color: var(--ink-2); }
.tx-card .tx-more { display: flex; align-items: center; justify-content: space-between; min-height: 44px; border-top: 1px solid var(--rule); font-size: 17px; font-weight: 700; }
.tx-card .tx-more::after { content: "→"; font-weight: 400; transition: transform .2s; }
.tx-card:hover .tx-more::after { transform: translateX(4px); }
.sub .sheet .group-intro { color: var(--ink-2); }

/* about */
.ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: idea; }
.ideas li { counter-increment: idea; }
.ideas li::before { content: "0" counter(idea); display: block; margin-bottom: 6px; font: 600 17px/1 var(--display); letter-spacing: .08em; color: var(--timber-ink); }
.sub .ideas h3 { margin: 0 0 8px; font: 600 23px/1.4 var(--display); }
.sub .ideas p { margin: 0; }
@media (max-width: 860px) { .ideas { grid-template-columns: 1fr; gap: 22px; } }
.confirm-line { margin: -6px 0 18px; font-size: 16px; }
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(22px, 3.4vw, 44px); align-items: start; }
.sub .doc .photo-slot { aspect-ratio: 3 / 4; }
.sub .doc-role { margin: 0; font-size: 17px; font-weight: 600; color: var(--timber-ink); letter-spacing: .06em; }
.sub .doc-name { margin: 2px 0 18px; font: 600 clamp(34px, 3.6vw, 44px)/1.2 var(--display); }
.greeting { margin: 18px 0 0; padding: 18px 22px; border-radius: 10px; background: rgba(255, 255, 255, .34); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .14); }
.sub .greeting p { margin: 0; }
@media (max-width: 760px) { .doc { grid-template-columns: 1fr; } .doc .photo { max-width: 240px; } }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; margin: 6px 0 0; }
.fields > div { padding: 13px 0; border-top: 1px solid var(--rule); }
.fields dt { font-weight: 700; }
.fields dd { margin: 2px 0 0; color: var(--ink-2); }
@media (max-width: 760px) { .fields { grid-template-columns: 1fr; } .fields > div:nth-child(2) { border-top: 1px solid var(--rule); } }
@media (min-width: 761px) { .fields > div:nth-child(-n+2) { border-top: 0; } }

/* photo placeholders */
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 6px 0 0; padding: 0; list-style: none; }
@media (max-width: 760px) { .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.photo { margin: 0; }
.sub .photo-slot { margin: 0; aspect-ratio: 4 / 3; padding: 12px; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.photo figcaption { margin-top: 8px; font-size: 17px; font-weight: 700; }
.sub .wide-slot { aspect-ratio: 16 / 9; margin: 20px 0 0; }

/* location */
.sub .addr-big { margin: 0 0 6px; font: 600 clamp(34px, 4vw, 46px)/1.2 var(--display); letter-spacing: -.01em; }
.sub .addr-road { margin: 0; font-size: 19px; }
.sub .addr-lot { margin: 2px 0 0; color: var(--ink-2); }
.office { display: flex; gap: 14px; align-items: flex-start; margin: 20px 0 0; padding: 16px 20px; border-radius: 10px;
  background: rgba(255, 255, 255, .36); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .16); }
.office svg { flex: none; width: 26px; height: 26px; margin-top: 2px; color: var(--ink-2); }
.sub .office p { margin: 0; }
.maps-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sub .hours { margin: 4px 0 0; font-size: 18px; }
.sub .hours th, .sub .hours td { padding: 13px 0; vertical-align: top; border-top: 1px solid var(--rule); }
.sub .hours tr:first-child th, .sub .hours tr:first-child td { border-top: 0; }
.sub .hours th { width: 8em; font-weight: 600; color: var(--ink-2); }
.sub .hours td { font-weight: 600; }
.sub .hours td .tbc { font-weight: 600; }

/* fees */
.notice { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 0; padding: 14px 18px; border-radius: 10px; font-weight: 700; color: var(--tbc-ink);
  background: rgba(217, 101, 42, .11); box-shadow: inset 0 0 0 1.5px rgba(143, 59, 19, .4); }
.notice svg { flex: none; width: 24px; height: 24px; margin-top: 3px; }
.sub .notice p { margin: 0; }
/* the 비급여 고지 form (지침 별표 2): a real table on desktop; from 1023px down every row becomes a card of labelled lines.
   The explicit ARIA roles in the markup keep the table semantics when the cells are display:block. */
.sub .sheet .fee-src { color: var(--ink-2); }
.fee-table { width: 100%; margin: 6px 0 0; border-collapse: collapse; font-size: 16px; line-height: 1.55; }
.fee-table caption { padding: 0 0 10px; text-align: left; color: var(--ink-2); font-size: 17px; font-weight: 600; }
.fee-table th, .fee-table td { padding: 13px 12px 13px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
.fee-table th:last-child, .fee-table td:last-child { padding-right: 0; }
.fee-table thead th { padding-top: 0; border-top: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink-2); vertical-align: bottom; }
.fee-table tbody th { font-weight: 400; }
.fee-table .fee-name { display: block; font-weight: 700; }
/* every line of the table, its notes, codes, chips and the phone's labels too, at 16px: the owner's floor for Korean text */
.fee-table .fee-note, .fee-table .fee-code { display: block; margin-top: 2px; font-size: 16px; color: var(--ink-2); }
.fee-table .fee-code { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.fee-table th[scope="rowgroup"] { padding: 28px 0 10px; border-top: 0; font: 600 20px/1.4 var(--display); color: var(--timber-ink); }
.fee-table tbody:first-of-type th[scope="rowgroup"] { padding-top: 8px; }
.fee-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fee-table .ox { text-align: center; }
.fee-table td .tbc { font-size: 16px; white-space: nowrap; }
@media (max-width: 1023px) {
  .fee-table, .fee-table caption, .fee-table tbody, .fee-table tr, .fee-table th, .fee-table td { display: block; }
  .fee-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fee-table tbody tr { padding: 16px 0; border-top: 1px solid var(--rule); }
  .fee-table tbody tr:first-child { border-top: 0; }
  .fee-table tbody th, .fee-table tbody td { padding: 0; border: 0; text-align: left; }
  .fee-table th[scope="rowgroup"] { padding: 20px 0 0; }
  .fee-table tbody:first-of-type th[scope="rowgroup"] { padding-top: 4px; }
  .fee-table .fee-name { font-size: 18px; }
  .fee-table td { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 12px; margin-top: 8px; white-space: normal; }
  .fee-table td::before { content: attr(data-label); content: attr(data-label) / ""; color: var(--ink-2); font-size: 16px; font-weight: 600; line-height: 1.65; }
  /* the second content (empty alt text) keeps the visual label out of screen readers, which already get the column header */
  .fee-table td.na { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); }  /* hidden, not removed: cells keep their column headers */
  .fee-table .num, .fee-table .ox { text-align: left; }
}

/* FAQ */
.qa { margin: 0; padding: 0; list-style: none; }
.qa > li { padding: 20px 0; border-top: 1px solid var(--rule); }
.qa > li:first-child { padding-top: 2px; border-top: 0; }
.qa > li:last-child { padding-bottom: 0; }
.sub .qa h3 { display: flex; gap: 12px; margin: 0 0 6px; font-size: 19px; line-height: 1.55; }
.qa h3::before { content: "Q"; flex: none; font: 600 20px/1.45 var(--display); color: var(--timber-ink); }
.qa .answer { padding-left: 27px; }
.sub .qa .answer p { margin: 0 0 8px; }
.sub .qa .answer p:last-child { margin-bottom: 0; }

/* privacy: three sheets (홈페이지, 진료, 책임자), numbered parts */
.policy .sheet-part + .sheet-part { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--rule); }
.sub .policy h2 { font-size: clamp(22px, 2.1vw, 27px); }
.sub .policy h3 { margin-top: 26px; }
.sub .hours .hours-note { display: block; margin-top: 2px; font-size: 17px; font-weight: 400; color: var(--ink-2); }

/* 404 */
.lost { margin-top: clamp(20px, 8vh, 90px); }
.lost-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- home page (index.html): "자세히 보기" links; the sound credit (every page with a scene) ---------- */
.more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 2px; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.more::after { content: "→"; display: inline-block; text-decoration: none; transition: transform .2s; }
.more:hover::after { transform: translateX(3px); }
.more:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.maps + .more { margin-top: 10px; }
body:not(.sub) .site-footer { padding-top: 40px; }
.home-credit { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule, rgba(43, 38, 34, .14));
  font-size: 15px; line-height: 1.65; color: var(--ink-2); }
/* the credit is the footer sheet's last small paragraph, on its paper (js/page.js moves home's there; a scene page's dock
   script puts it there, tools/build-pages.cjs), so no flat box of its own floats on the scene under the footer */
.home-credit p { margin: 0; }
.home-credit a { color: inherit; }
@media (prefers-reduced-motion: reduce) { .more::after { transition: none; } }

/* links inside running text: a taller hit area for older fingers. Padding on an inline box does not move the text,
   and 4px (3px at the credit's tighter line height) keeps the hit areas of neighbouring lines from overlapping */
.sub main :is(p, dd, td, .ticks li, .dots li) a:not([class]), .home-credit a { padding: 4px 2px; margin: 0 -2px; }
.home-credit a { padding-block: 3px; }
/* a phone number in running text (119, 129, the emergency rooms, the clinic) and the 응급의료포털 address: tapped in a
   hurry, so a 44px tall target (the 28px prose hit area is for reading links). The padding reaches 44px on any line
   height of 26px and up; the negative margin takes it back, so neither the text nor its line moves, and inline-block
   keeps a number on one line */
.sub main :is(p, dd, td, li) :is(a[href^="tel:"]:not([class]), a.nw[href^="http"]) { display: inline-block;
  padding: 9px 4px; margin: -9px -4px; }

@media (max-width: 760px) {
  .home-credit { font-size: 16px; }
}
/* home, phones held upright: a sheet taller than the space between the bar and the fixed dock ends above the dock at
   its camera stop (the stop puts the section centre mid-screen; 50% here is half the sheet's own height).
   --dock-band = the dock's bottom offset (seasons.css) + the folded dock opened (the season pill over the motion, sound
   and round buttons: 48 + 6 + 48px). --sound-clear = that band + 8px gap - the sheet's 34px bottom padding. Shorter
   sheets do not move. Nor does any sheet rise so far that its first line goes under the bar (56px): its text starts at
   least 12px below it (the sheet's top 34px is padding). A sheet too tall for both (js/page.js marks its section .tall)
   does not move at all: page.js gives its section the top padding that puts its first line under the bar at the stop.
   A sheet never rises over the sheet before it: by default it stays 24px inside its own section (140vh tall on phones,
   site.css), and js/page.js sets --pull-cap to the room really there (the space the sheet before it leaves).
   Upright only: on its side (360-430 px tall) a phone would pull its tall sheets far over their neighbours, and there
   the dock stands along the right edge, beside the sheets, not under them. */
@media (max-width: 760px) and (orientation: portrait) {
  body:not(.sub) .sec:not(.hero) > .sheet {
    --dock-band: calc(max(clamp(14px, 3vw, 30px), env(safe-area-inset-bottom, 0px)) + 48px + 6px + 48px);
    --sound-clear: calc(var(--dock-band) + 8px - 34px);
    transform: translateY(min(0px, max(var(--pull-cap, calc(50% - 70vh + 24px)), calc(50vh - 50% - var(--sound-clear)), calc(34px - 50vh + 50%))));
    transform: translateY(min(0px, max(var(--pull-cap, calc(50% - 70vh + 24px)), calc(50svh - 50% - var(--sound-clear)), calc(34px - 50svh + 50%)))); }
  body:not(.sub) .sec.tall:not(.hero) > .sheet { transform: none; }
}

@media (max-width: 760px) {
  body.sub { font-size: 17px; }
  .sub main { padding-top: calc(56px + 44px); }
  .sub .sheet { padding: 30px 24px; }
  .sub .tx-nav { padding: 28px 24px 22px; }
  .steps > li { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; }
  .steps > li::before { width: 44px; height: 44px; font-size: 19px; }
  .steps > li::after { left: 21.25px; top: 52px; }
  .steps h3 { margin-top: 7px; }
  .facts > div { gap: 0; }
  .office { padding: 14px 16px; }
  .book-actions .btn { width: 100%; justify-content: center; }
  .sub .site-footer { padding-bottom: 64px; }  /* clear of the fixed 시안 chip */
  .maps-row .btn { flex: 1 1 140px; justify-content: center; padding-left: 16px; padding-right: 16px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .tx-card, .tx-card .tx-more::after, .nav-toggle-icon i { transition: none; }
  .tx-card:hover { transform: none; }
}

/* Windows High Contrast (forced colors): the system paints every background as Canvas and drops box-shadows, so the
   menu button's ring (an inset shadow) and its three bars (backgrounds) would vanish, leaving no way to the site's pages
   at a phone width or high zoom. A real border, and bars in the system's button-text colour. */
@media (forced-colors: active) {
  .nav-toggle { border: 2px solid ButtonText; }
  .nav-toggle-icon i { forced-color-adjust: none; background: ButtonText; }
}

@media print {
  #scene, .skip, .site-bar, .toc, .side-col, .book, .maps-row, .lost-links { display: none !important; }
  body.sub { background: #fff; font-size: 12pt; }
  .sub main { padding: 0; }
  .sub .sheet { filter: none; padding: 0 0 12pt; }
  .sub .sheet::before { display: none; }
  .cols, .grid-2 { display: block; }
  .site-footer { padding: 0; }
}
