/* 좋은얼굴신종연치과의원 — hanji hanok pilot */
/* the web fonts, self-hosted: subsets of the characters the pages use (tools/fonts/subset.py; tools/fonts/check_fonts.py
   in the gate fails when the copy needs a rebuild). Goodface Sans is Pretendard Variable renamed, as its licence asks of
   a modified copy; Hahmlet keeps its name. Both OFL: fonts/LICENSE-Pretendard.txt, fonts/OFL-Hahmlet.txt. Each page
   preloads both files, by the same URL. fonts/ is cached for a year (site/vercel.json), so the ?v= on both URLs is the
   file's content hash, stamped by node tools/build-pages.cjs (tools/art-version.cjs): run it after a re-subset. */
@font-face { font-family: "Goodface Sans"; src: url(../fonts/goodface-sans.woff2?v=f663d1c1) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Hahmlet"; src: url(../fonts/hahmlet.woff2?v=8b3b8663) format("woff2"); font-weight: 400 600; font-display: swap; }
/* the few Han characters (한자) in the copy, the names in the sound credit: Goodface Sans's own third file (from Pretendard
   JP, the same design), fetched only by a page that shows one (tools/fonts/chars.py 'only') */
@font-face { font-family: "Goodface Sans"; src: url(../fonts/goodface-sans-han.woff2?v=64840e3d) format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+20000-2FA1F; }
/* the site is drawn on hanji only: a browser's forced dark mode (Chromium's auto-dark, a phone's dark theme) would turn the
   ink light while the paper sheets, which are images, stay light. "only light" opts every page out (with the head's
   <meta name="color-scheme">, which covers the first paint) */
:root {
  color-scheme: only light;
  --hanji: #F3E9D7;
  --hanji-2: #EADFC9;
  --ink: #2B2622;
  --ink-2: #5A5048;
  --tile: #3B3633;
  --timber: #A85A2A;
  --gam: #D9652A;          /* persimmon accent: buttons only */
  --gam-ink: #B4501E;
  --pine: #3F5A3A;
  --dusk: 0;               /* 0 afternoon -> 1 dusk, set by scene.js */
  --font: "Goodface Sans", "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: "Hahmlet", "Goodface Sans", "Pretendard Variable", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--hanji); color: var(--ink); font: 400 17px/1.75 var(--font); word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
img { display: block; }

/* ---------- scene: CSS sky behind a transparent WebGL canvas (js/scene-gl.js) ---------- */
/* The scene's height: the large viewport, and never less than the box fixed elements are laid out in (100 % of a
   fixed box), nor than the engine's floor. The owner's iPhone, 11-15, in an in-app browser: its bars come and go with
   the scroll and resize the whole web view, 902 <-> 757 CSS px, and there 100lvh was at times 757 while the box the
   dock's bottom: 0 sits in was 902, so a 145 px band of bare page showed under the scene. max(100lvh, 100%) covers
   whatever bottom: 0 covers and still prefers the large viewport in Safari (lvh >= 100 % there). --scene-min is the
   engine's floor on a touch-first device (js/scene-gl.js floor()): the scene keeps its tallest height while only the
   bars change, so the canvas is neither resized nor re-framed when they show. That declaration sits in @supports: a
   value with var() is never refused when parsed, so a browser without lvh would drop the whole height (auto: 0 px)
   instead of keeping 100vh. Without lvh: 100vh, as before. */
#scene { position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: max(100lvh, 100%); z-index: 0; overflow: hidden; background: var(--hanji); }
@supports (height: 1lvh) { #scene { height: max(100lvh, 100%, var(--scene-min, 0px)); } }
#scene .sky, #scene .sky i { position: absolute; inset: 0; }
#scene .sky .day { background: linear-gradient(180deg, #EDE2CF 0%, #F4E6CB 45%, #F7E2BF 70%, #F2D9B4 100%); }
#scene .sky .dusk { background: linear-gradient(180deg, #7F8FA3 0%, #A3AEBB 40%, #C9C3BD 68%, #E8C9A6 100%); opacity: var(--dusk, 0); }
/* the season's day sky (js/scene-gl.js sets html[data-season]); autumn keeps the warm cream above */
[data-season=spring] #scene .sky .day { background: linear-gradient(180deg, #E9E7DC 0%, #F2ECDF 45%, #F6E7DA 70%, #F1DBCB 100%); }
[data-season=summer] #scene .sky .day { background: linear-gradient(180deg, #D5E0DE 0%, #E4E9E0 45%, #F1E8D3 70%, #EEDCBA 100%); }
[data-season=winter] #scene .sky .day { background: linear-gradient(180deg, #DFE5EA 0%, #ECEEEC 45%, #F3ECE1 70%, #EDDFCC 100%); }
[data-season=winter] #scene .sky .dusk { background: linear-gradient(180deg, #6C7F97 0%, #97A6B8 40%, #C3C2C2 68%, #E6C8A8 100%); }
#scene .sky .sun { left: 6%; top: -14%; width: 62%; height: 80%; inset: auto; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 196, .85), rgba(255, 226, 170, .35) 55%, rgba(255, 220, 160, 0) 100%);
  opacity: calc(1 - var(--dusk, 0)); }
#scene canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#scene.nogl { background: var(--hanji) url(../art/fallback.jpg?v=015691db) center bottom / cover no-repeat; }
#scene.nogl .sky, #scene.nogl canvas { display: none; }
/* home and first-visit (the hanok, no page scene of their own): the season's still photograph, a light WebP
   (tools/instant-stills.cjs, from tools/fallback.cjs's stills) over the CSS sky and the canvas, for a slow first load.
   The head script sets html[data-season], preloads this same file and holds it back (html.hanok-hold) until the file is in
   and 2 s have passed: a quick link never sees it, and the paper rises into place over the sky as designed. Past that it
   fades in, and when the scene is ready (#scene.ready) the paper is already in place under it (js/scene-gl.js skips the
   rise) and it dissolves into the live scene. Without scripts it simply stays, as every scene page's still does. The
   phone rule is the engine's (w/h < .78: 3899/5000), and so is the crop: cover, and on a window wider than the stage 55 %
   of the overflow comes off the top (scene-gl.js viewport()), so the still lies over the live paper as it dissolves. No
   colour of its own: until the file arrives the sky shows. */
#scene:not([data-scene])::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url(../art/fallback.webp?v=151044ce) 50% 55% / cover no-repeat; transition: opacity .5s ease; }
[data-season=spring] #scene:not([data-scene])::after { background-image: url(../art/fallback@spring.webp?v=c1ce400a); }
[data-season=summer] #scene:not([data-scene])::after { background-image: url(../art/fallback@summer.webp?v=a28f09ba); }
[data-season=winter] #scene:not([data-scene])::after { background-image: url(../art/fallback@winter.webp?v=56b010a5); }
@media (max-aspect-ratio: 3899/5000) {
  #scene:not([data-scene])::after { background-image: url(../art/fallback-m.webp?v=27fca745); }
  [data-season=spring] #scene:not([data-scene])::after { background-image: url(../art/fallback-m@spring.webp?v=4937f504); }
  [data-season=summer] #scene:not([data-scene])::after { background-image: url(../art/fallback-m@summer.webp?v=15b5d014); }
  [data-season=winter] #scene:not([data-scene])::after { background-image: url(../art/fallback-m@winter.webp?v=783fdfdc); }
}
.hanok-hold #scene::after { opacity: 0; transition: none; }
#scene.ready::after { opacity: 0; transition-duration: .9s; }
@media (prefers-reduced-motion: reduce) { #scene::after, #scene.ready::after { transition: none; } }
/* very wide or very short windows (INT2, the owner 11-14): the home scene at most 2.4 : 1. The desk stage is 16:9 and
   the engine lays it with cover (js/scene-gl.js viewport(), from the canvas's own size), so past about 21:9 the scene
   became a tight band of its middle: at 32:9 (3840 x 1080, 5120 x 1440) or in a window snapped to half height
   (1920 x 520) the hanok was cut through its doors, and the wall, the wheel and the courtyard were gone. Wider than
   2.4 : 1 the scene (canvas, CSS sky, instant still) keeps 2.4 : 1 at the window's full height, centred, and the page's
   own hanji lies left and right of it like the mat round a framed print, with a soft shadow where they meet. The bar
   still spans the window; the hero, the sheets, the footer and the dock stay inside the scene's box. Up to 2.4 : 1
   (21:9 included: 2560 x 1080, 3440 x 1440) none of this applies. Home only.
   The mat is the nearer paper (INT2 item 9): each side is a sheet of the page's hanji lying over the scene's edge, torn
   (no ruler-straight line through the mill house or the persimmon), with a soft shadow falling onto the scene.
   body::before (left) and body::after (right), fixed on the scene's edges, z 1: over the canvas, the CSS sky and the
   instant still (all inside #scene, z 0), under main (z 10), the dock (9), the bar (20), the chip (21) and dialogs. The
   paper is the body's own tile, fixed like it, so the mat and the page are one sheet with no seam (each box starts on a
   whole pixel, round(): from a fractional left edge Chrome laid the fixed tile up to half a pixel off the page's, a
   faint seam at the scene's right edge). art/ui/mat.py cuts
   it: mat-l/-r.png the mask (the paper, then the shadow's strength), mat-l/-r-ink.png the pale fibre core of the tear
   and the shadow's colour over it. One piece each the window's full height (152 x 2880, shown auto 100%: 57 css px
   wide at 1080 high, the paper 16-26 px over the scene, the shadow gone 20-25 px past the tear); the two sides are
   different tears. Until the masks arrive an image-free strip (solid 0.5vh, soft to 1vh, inside the tear's solid
   paper) already covers the scene's edge. The dock keeps clear of the paper and its shadow (5.3vh). No filter.
   On a short window (under 1080 css px high: 1920 x 520, a window snapped to half height) the tear keeps its 1080 px
   form, cut off at the window's foot, not squeezed into a near-ruled line: the mask is drawn at least 1080 px high
   (max(100%, 1080px)) and the mat and the dock's clearance are at least its 57.24 px (max(5.3vh, 57.24px)). At 1080 px
   and taller both are what they were. */
@media (min-aspect-ratio: 12/5) {
  body:not(.sub) { background: url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 480px auto fixed, var(--hanji); }
  body:not(.sub) #scene { left: calc(50% - 120vh); right: auto; width: 240vh; }
  /* height: as #scene's, without the engine's floor (the in-app browser's 902 <-> 757 px, 11-15: never shorter than
     what the fixed box covers) */
  body:not(.sub)::before, body:not(.sub)::after { content: ""; position: fixed; z-index: 1; top: 0; width: max(5.3vh, 57.24px); height: 100vh; height: max(100lvh, 100%);
    pointer-events: none; }
  body:not(.sub)::before { left: calc(50% - 120vh); left: round(down, 50% - 120vh, 1px);
    background: url(../art/ui/mat-l-ink.png?v=a62554e7) 0 0 / auto max(100%, 1080px) no-repeat, url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 480px auto fixed, var(--hanji);
    -webkit-mask: url(../art/ui/mat-l.png?v=5abe603c) 0 0 / auto max(100%, 1080px) no-repeat, linear-gradient(90deg, #000 .5vh, transparent 1vh) 0 0 / 1vh 100% no-repeat;
    mask: url(../art/ui/mat-l.png?v=5abe603c) 0 0 / auto max(100%, 1080px) no-repeat, linear-gradient(90deg, #000 .5vh, transparent 1vh) 0 0 / 1vh 100% no-repeat; }
  body:not(.sub)::after { left: calc(50% + 120vh - max(5.3vh, 57.24px)); left: round(down, 50% + 120vh - max(5.3vh, 57.24px), 1px); right: calc(50% - 120vh); width: auto;
    background: url(../art/ui/mat-r-ink.png?v=8ea4cd93) 100% 0 / auto max(100%, 1080px) no-repeat, url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 480px auto fixed, var(--hanji);
    -webkit-mask: url(../art/ui/mat-r.png?v=49c36d2c) 100% 0 / auto max(100%, 1080px) no-repeat, linear-gradient(270deg, #000 .5vh, transparent 1vh) 100% 0 / 1vh 100% no-repeat;
    mask: url(../art/ui/mat-r.png?v=49c36d2c) 100% 0 / auto max(100%, 1080px) no-repeat, linear-gradient(270deg, #000 .5vh, transparent 1vh) 100% 0 / 1vh 100% no-repeat; }
  body:not(.sub) main, body:not(.sub) .site-footer { max-width: 240vh; margin-inline: auto; }
  body:not(.sub) .dock, body:not(.sub) .sound-twin { right: calc(50% - 120vh + max(5.3vh, 57.24px) + clamp(14px, 3vw, 30px)); }
}

/* ---------- page ---------- */
.bar { position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: 64px; display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(18px, 4vw, 48px);
  /* opaque hanji, the sheets' own paper: text scrolling under the bar never ghosts through the name and the links */
  background: url(../art/hanji.jpg?v=c7d68546) 50% 40% / max(100%, 900px) auto, #F3E9D7; }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.brand .b1 { font: 600 21px/1 var(--display); letter-spacing: -.01em; }
.brand .b2 { font: 500 15px/1 var(--font); color: var(--ink-2); }
.bar nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--ink-2); }
.bar nav a:hover { color: var(--ink); }
.call { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 16px; border-radius: 999px; background: var(--gam); color: #fff; white-space: nowrap; }
/* the 시안 chip sits in the gap under the bar and scrolls away with the page, so it never covers text, links or the open menu */
.draft { position: absolute; z-index: 21; left: clamp(14px, 3vw, 30px); top: 70px; margin: 0; font-size: 12px; letter-spacing: .06em;
  padding: 5px 12px; border-radius: 999px; background: rgba(43, 38, 34, .72); color: #F3E9D7; pointer-events: none; }

main { position: relative; z-index: 10; overflow-x: clip; }  /* the hero glow must not widen a phone's layout viewport */
.sec { position: relative; min-height: 150vh; display: flex; align-items: center; padding: 0 clamp(18px, 6vw, 96px); }
.sec.right { justify-content: flex-end; }
.sec.center { justify-content: center; }

/* hero: name over the calm sky, no panel */
.hero { min-height: 100vh; min-height: 100svh; align-items: flex-start; justify-content: center; text-align: center; padding-top: max(12.5vh, 92px); }
.hero-in { position: relative; max-width: 760px; }
.hero-in::before { content: ""; position: absolute; inset: -18% -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 236, 218, .78), rgba(246, 236, 218, .45) 60%, rgba(246, 236, 218, 0)); }
.hero h1 { margin: 0; font: 600 clamp(50px, min(7vw, 10.5vh), 100px)/1.02 var(--display); letter-spacing: -.02em; }
.hero h1 .mark { display: inline-block; width: .9em; height: .9em; margin: 0 .14em 0 -.04em; vertical-align: -.1em; }  /* 좋은얼굴 face mark, as on the sign: disc, then name */
.hero h1 small { display: block; margin-top: 12px; font: 500 clamp(20px, 2.3vw, 30px)/1.2 var(--font); letter-spacing: .02em; color: var(--ink-2); }
.hero .line { margin: 20px 0 0; font: 400 clamp(18px, 1.7vw, 22px)/1.6 var(--display); color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 17px;
  padding: 14px 24px; border-radius: 999px; min-height: 52px; }
.btn.gam { background: var(--gam); color: #fff; box-shadow: 0 6px 18px -8px rgba(180, 80, 30, .7); }
.btn.ghost { background: rgba(243, 233, 215, .82); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(43, 38, 34, .35); }
/* the address is the one hero line low enough to meet the diorama on short phones, so it carries its own paper light:
   a wide soft ellipse with no edge (it must not read as a third button). It sits outside the layout, so the hero keeps
   its height (tools/hero-sizes.cjs). tools/check-layout.cjs measures the text against the rendered pixels behind it. */
.hero .addr { position: relative; z-index: 0; display: inline-block; margin-top: 14px; font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.hero .addr::before { content: ""; position: absolute; z-index: -1; inset: -28px -72px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(243, 233, 215, .95) 68%, rgba(243, 233, 215, .6) 84%, rgba(243, 233, 215, 0)); }
/* home on a short phone or a phone on its side: the hero reaches down into the roofs, and that glow lay on the tiles as a
   white smudge (INT2). There the line is a torn hanji slip, the paper of the 진료 시간 · 오시는 길 button above it (without
   a button's size or lift), and no glow. The slip lies outside the line's box, so nothing moves; every other size keeps the
   glow. */
@media (max-width: 760px) and (max-height: 700px), (orientation: landscape) and (max-height: 460px) {
  body:not(.sub) .hero .addr { isolation: isolate; filter: drop-shadow(0 2px 3px rgba(90, 45, 15, .22)); }
  body:not(.sub) .hero .addr::before { inset: -6px -14px; background: url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 300px auto, #F6EEDF;
    -webkit-mask: var(--slip-mask); mask: var(--slip-mask); }
}

/* hanji sheet: a torn sheet of paper laid over the diorama — the legibility layer */
.sheet { position: relative; width: min(560px, 100%); padding: clamp(34px, 5vw, 58px) clamp(26px, 4.4vw, 54px); }
.sheet::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: url(../art/hanji.jpg?v=c7d68546) center / cover, var(--hanji);
  -webkit-mask: url(../art/sheet-mask.png?v=612134b9) center / 100% 100% no-repeat; mask: url(../art/sheet-mask.png?v=612134b9) center / 100% 100% no-repeat;
  /* the torn edge keeps one depth on tall sheets: the same mask is laid at most 1000px tall at the top and at the bottom,
     over the stretched one that draws the sides (the union keeps the shallower tear). Sheets up to 1000px look as before. */
  -webkit-mask: url(../art/sheet-mask.png?v=612134b9) top / 100% min(1000px, 100%) no-repeat, url(../art/sheet-mask.png?v=612134b9) bottom / 100% min(1000px, 100%) no-repeat,
    url(../art/sheet-mask.png?v=612134b9) center / 100% 100% no-repeat;
  mask: url(../art/sheet-mask.png?v=612134b9) top / 100% min(1000px, 100%) no-repeat, url(../art/sheet-mask.png?v=612134b9) bottom / 100% min(1000px, 100%) no-repeat,
    url(../art/sheet-mask.png?v=612134b9) center / 100% 100% no-repeat;
  filter: drop-shadow(0 18px 30px rgba(60, 40, 20, .18)); opacity: .97; }
.sheet .eyebrow { font-size: 16px; letter-spacing: .14em; color: var(--timber-ink, #84421F); font-weight: 600; margin: 0 0 14px; }  /* timber-ink: 6.3:1 on hanji */
.sheet h2 { margin: 0 0 18px; font: 600 clamp(28px, 3.1vw, 40px)/1.3 var(--display); letter-spacing: -.01em; }
.sheet p { margin: 0 0 14px; }
.sheet .sign { margin-top: 22px; font: 500 18px/1.4 var(--display); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
/* the 낙관: the director's name seal (art/seal/seal-E.svg, picked by the owner 11-13) signs the greeting once, the way a
   painting is signed. Decoration: the name is in the text beside it, so the image has an empty alt. */
.sheet .sign .seal { flex: none; width: 44px; height: 44px; }
/* information on the home sheets (the side-effect notice, 접수 마감, the 지번 address, the photo slot) is never under
   16px, at every width: older readers on tablets and desks read it too */
.sheet .note { font-size: 16px; color: var(--ink-2); }
.care { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.care li { display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(43, 38, 34, .14); }
.care li:first-child { border-top: 0; }
.care b { font: 600 18px/1.5 var(--display); }
.care span { font-size: 16px; color: var(--ink-2); line-height: 1.6; }
.hours { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 16px; }
.hours th, .hours td { text-align: left; padding: 8px 0; border-top: 1px solid rgba(43, 38, 34, .14); font-weight: 400; }
.hours th { width: 7em; color: var(--ink-2); }
.tbc { color: var(--gam-ink); font-size: 14px; }
.photo-slot { margin: 14px 0 18px; aspect-ratio: 16 / 9; border-radius: 6px; display: grid; place-items: center; text-align: center;
  font-size: 16px; color: var(--ink-2); background: repeating-linear-gradient(135deg, rgba(43, 38, 34, .05) 0 10px, rgba(43, 38, 34, .09) 10px 20px); }
.visit-photo { margin: 14px 0 18px; }
.visit-photo img { display: block; width: 100%; height: auto; border-radius: 6px; background: rgba(43, 38, 34, .06); }
.visit-photo figcaption { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.maps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.maps .btn { font-size: 16px; padding: 10px 18px; min-height: 44px; }  /* the call button keeps .btn.gam's 19px bold (page.css) */
/* 오시는 길 on a desk or a tablet on its side: two columns (the address and the photo | the hours and the buttons), so the
   sheet is about 600px tall, not 1200: it fits its camera stop, its heading clear of the bar and its buttons clear of the
   dock */
@media (min-width: 900px) {
  #visit .sheet { width: min(880px, 100%); columns: 2; column-gap: clamp(28px, 3.4vw, 48px); }
  #visit .hours-h { break-before: column; margin-top: 0; }
  #visit .sheet > * { break-inside: avoid; }
  #visit .visit-photo { margin-bottom: 0; }
}

footer { position: relative; z-index: 10; padding: 70px clamp(18px, 6vw, 96px) 120px; background: linear-gradient(180deg, rgba(243, 233, 215, 0), rgba(243, 233, 215, .94) 34%);
  font-size: 14px; color: var(--ink-2); }
footer p { margin: 0 0 6px; }
footer .fname { font: 600 18px/1.4 var(--display); color: var(--ink); margin-bottom: 10px; }

#sound { position: fixed; z-index: 30; right: clamp(14px, 3vw, 30px); bottom: clamp(14px, 3vw, 30px); display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 18px 10px 14px; border: 0; border-radius: 999px; cursor: pointer; font: 500 15px/1 var(--font);
  color: var(--ink); background: rgba(243, 233, 215, .9); box-shadow: 0 8px 24px -10px rgba(40, 30, 20, .5), inset 0 0 0 1px rgba(43, 38, 34, .18); }
#sound[hidden], .home-credit[hidden] { display: none; }   /* no Web Audio here (js/scene-gl.js sound()) */
#sound svg { width: 22px; height: 22px; }
#sound.loading { opacity: .7; cursor: progress; }
footer .credit { font-size: 13px; line-height: 1.6; margin-top: 10px; }
footer .credit a { color: inherit; }
/* the sound's two states read at a glance and say what a tap does: off, a speaker struck through and 자연의 소리 켜기;
   on, filled dark like the checked season chip, the speaker sounding and 소리 끄기 (js/scene-gl.js sets the words) */
#sound { justify-content: center; min-width: 11.4em; }
#sound .wave { opacity: 0; transition: opacity .4s; }
#sound .slash { transition: opacity .4s; }
#sound[aria-pressed="true"] .wave { opacity: 1; }
#sound[aria-pressed="true"] .slash { opacity: 0; }
#sound[aria-pressed="true"], .sound-twin { color: #F7EFE0; background: rgba(43, 38, 34, .9); }
/* a page with its own scene: while the sound plays and the dock has scrolled away with the picture, 소리 끄기 waits in
   home's corner (js/scene-gl.js); the end of the page then scrolls clear of it */
.sound-twin { position: fixed; z-index: 19; right: max(clamp(14px, 3vw, 30px), env(safe-area-inset-right, 0px));
  bottom: max(clamp(14px, 3vw, 30px), env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 20px 10px 16px; border: 0; border-radius: 999px; cursor: pointer; font: 500 15px/1 var(--font);
  box-shadow: 0 8px 24px -10px rgba(40, 30, 20, .55); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
.sound-twin.show { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
.sound-twin svg { width: 22px; height: 22px; }
.sound-twin .slash { display: none; }
.sound-twin:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; }
.sound-twin-on .site-footer { padding-bottom: 104px !important; }
#sound:focus-visible, .btn:focus-visible, .call:focus-visible, .bar a:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; }

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .bar { height: 56px; gap: 12px; }
  .bar nav { display: none; }
  .brand { margin-right: auto; }
  .brand .b1 { font-size: 19px; }
  .brand .b2 { font-size: 13px; }
  .call { font-size: 14px; padding: 7px 13px; }
  .hero { padding-top: max(13svh, 92px); }
  .sec, .sec.right { justify-content: center; }
  .sec:not(.hero) { min-height: 140vh; }
  .care li { grid-template-columns: 1fr; gap: 2px; }
  .draft { top: 64px; }
  #sound, .sound-twin { font-size: 16px; }
}
@media (min-width: 761px) and (max-height: 860px) {
  .hero { padding-top: max(11vh, 84px); }
  .hero h1 small { margin-top: 8px; }
  .hero .line { margin-top: 14px; }
  .cta { margin-top: 18px; }
  .btn { min-height: 48px; padding: 12px 22px; }
  .hero .addr { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sound-twin, .sound-twin.show, #sound .wave, #sound .slash { transition: none; transform: none; }
}
@media print { .sound-twin { display: none !important; } }

/* ======================================================================
   The home interface in the scene's own paper (Wave 1, stream U). Home only (body:not(.sub)): the subpages keep their
   interface until the owner has seen this one. The paper pieces are cut from the site's own art (art/ui/make.py):
   art/ui/deckle.png is the sheets' torn edge laid out as a strip, tab.png / slip.png / disc.png the same tear round a
   slip, a button and a round token, and the season tokens and the wind-bell are the scenes' cut-outs.
   ====================================================================== */
:root {
  /* one ease and one set of durations for every move of the interface */
  --ease-paper: cubic-bezier(.2, .7, .2, 1);
  --t-press: 120ms;        /* a press */
  --t-state: 200ms;        /* hover, focus, the chosen token */
  --t-sheet: 260ms;        /* the menu sheet, the tokens fanning out */
  --t-enter: 600ms;        /* a sheet landing, the name stamped */
  --seal: #B32D24;         /* the 낙관's red: today's dot only */
  --deckle: 14px;          /* the bar's torn lower edge, below its 64 px (56 on phones) of solid paper */
  --bar-h: 64px;
  /* the season's ink for the eyebrows (U10). Each is >= 6:1 on hanji (#F3E9D7): summer 6.4, autumn 6.3 (the timber-ink
     the eyebrows always had), winter 6.8. Spring is the 진달래 rose #A7445A deepened to 6.2:1 (#A7445A itself is 4.8:1) */
  --season-ink: #84421F;
  /* the paper masks carry a second, image-free layer inside the tear (a slip's tear is <= 5 px deep, the tab's <= 8, a
     disc's <= 3): until the mask image has arrived the fill still paints, so the call button's white number is never
     shown on bare sky; the image then adds the torn edge around it */
  --slip-mask: url(../art/ui/slip.png?v=5ec2d23e) center / 100% 100% no-repeat, linear-gradient(#000 0 0) center / calc(100% - 14px) calc(100% - 14px) no-repeat;
  --tab-mask: url(../art/ui/tab.png?v=b2290c15) center / 100% 100% no-repeat, linear-gradient(#000 0 0) center / calc(100% - 20px) calc(100% - 20px) no-repeat;
  --disc-mask: url(../art/ui/disc.png?v=b16cca7f) center / 100% 100% no-repeat, radial-gradient(circle closest-side, #000 calc(100% - 5px), transparent calc(100% - 4px));
}
[data-season=spring] { --season-ink: #8C3A4D; }
[data-season=summer] { --season-ink: #3F5A3A; }
[data-season=winter] { --season-ink: #3C5168; }
@media (max-width: 760px) { :root { --bar-h: 56px; } }

/* ---------- 1. the bar: a strip of hanji laid across the top of the scene, its lower edge torn ----------
   The bar stays opaque paper (Wave 0: nothing ghosts through it). Under its 64 px (56 on phones) hangs a 14 px band
   torn like the sheets, so the bar's own pieces have at least 10 px of solid paper under them before the tear starts.
   The band continues the bar's own photograph (the same image, offset by the bar's height). The bar casts the sheets'
   shadow, through its torn edge: baked into art/ui/deckle-shadow.png (the strip blurred and dropped) and laid under the
   band in step with it, because a drop-shadow filter on a fixed full-width bar is redrawn on every scrolled frame. */
body:not(.sub) .site-bar { background-position: 50% -280px; }
body:not(.sub) .site-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: calc(var(--deckle) * 82 / 34);
  pointer-events: none; background: rgba(60, 40, 20, .2);
  -webkit-mask: url(../art/ui/deckle-shadow.png?v=5f87ee75) 0 0 / auto 100% repeat-x; mask: url(../art/ui/deckle-shadow.png?v=5f87ee75) 0 0 / auto 100% repeat-x; }
body:not(.sub) .site-bar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--deckle); pointer-events: none;
  background: url(../art/hanji.jpg?v=c7d68546) 50% calc(-280px - var(--bar-h)) / max(100%, 900px) auto, #F3E9D7;
  -webkit-mask: url(../art/ui/deckle.png?v=e51f9b53) 0 0 / auto 100% repeat-x; mask: url(../art/ui/deckle.png?v=e51f9b53) 0 0 / auto 100% repeat-x; }

/* ---------- 2. type (U2): a display scale, and the numbers a visitor acts on in Hahmlet ----------
   The name keeps the old 10.5vh guard, so a short laptop or a phone on its side still shows the call button in the
   first screen; at 1440 x 900 and wider it is the spec's clamp(44px, 6vw, 88px). 신종연치과의원 is set at 600 in full ink,
   0.42 of the name and never under 24 px: 치과 is no longer the smallest word in the hero (DES-10). */
body:not(.sub) .hero h1 { font-size: clamp(44px, min(6vw, 10.5vh), 88px); }
body:not(.sub) .hero h1 small { margin-top: .16em; font: 600 max(24px, .42em)/1.2 var(--font); letter-spacing: .01em; color: var(--ink); }
body:not(.sub) .sheet h2 { font-size: 36px; line-height: 1.28; }
/* hours and phone numbers: Hahmlet 600, tabular lining figures, one step (1.12x) larger than the words beside them */
body:not(.sub) .num { font-family: var(--display); font-weight: 600; font-size: 1.12em; font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0; }
body:not(.sub) .site-bar .call-num { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0; }
body:not(.sub) .site-footer a[href^="tel:"] { font-family: var(--display); font-weight: 600; font-size: 1.12em; font-variant-numeric: tabular-nums lining-nums; }
@media (max-width: 760px) {
  body:not(.sub) .hero h1 { font-size: 44px; }
  body:not(.sub) .sheet h2 { font-size: 30px; }
}

/* ---------- 6. the season's ink (U10): the eyebrows; fixed per visit by the season, never by the scroll ---------- */
body:not(.sub) .sheet .eyebrow { color: var(--season-ink); }

/* ---------- 5. buttons as paper slips: dyed persimmon (the call) or plain hanji, torn like the sheets ----------
   The slip is the button's ::before (the tear is a mask, so the button's own box stays the hit area and the focus ring);
   the shadow is a drop-shadow on the button, so it follows the tear. The call's persimmon is dyed into the hanji photograph
   (multiply): its fibres show, and white on it is 5:1 (the flat #D9652A was 3.6:1). Hover lifts the slip 1 px with a
   longer shadow, focus does the same under the ring, a press sinks it 1.5 px onto a tight shadow. */
body:not(.sub) :is(.btn, .site-bar .call) { position: relative; isolation: isolate; border-radius: 4px; background: none; box-shadow: none;
  -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 4px 5px rgba(90, 45, 15, .26));
  transition: transform var(--t-state) var(--ease-paper), filter var(--t-state) var(--ease-paper); }
body:not(.sub) :is(.btn, .site-bar .call)::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 300px auto, #F6EEDF;
  -webkit-mask: var(--slip-mask); mask: var(--slip-mask); }
body:not(.sub) :is(.btn.gam, .site-bar .call)::before { background-color: #CC5A22; background-blend-mode: multiply; }
body:not(.sub) .btn.ghost { color: var(--ink); }
/* the address's soft paper light (.hero .addr::before) reaches 28 px up: it lies under the buttons, never over them */
body:not(.sub) .hero .cta { position: relative; z-index: 1; }
body:not(.sub) :is(.btn, .site-bar .call):hover, body:not(.sub) :is(.btn, .site-bar .call):focus-visible {
  transform: translateY(-1px); filter: drop-shadow(0 7px 8px rgba(90, 45, 15, .3)); }
body:not(.sub) :is(.btn, .site-bar .call):active { transform: translateY(1.5px); filter: drop-shadow(0 1px 1.5px rgba(90, 45, 15, .4));
  transition-duration: var(--t-press); }
body:not(.sub) .btn:focus-visible, body:not(.sub) .site-bar .call:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; }

/* ---------- 5. the sheets land as paper ----------
   Every home sheet casts its torn edge's shadow (the shadow is on the sheet, outside the mask that tears its paper). A
   sheet that starts below the screen (js/page.js marks it .rise) waits 16 px low with a short shadow and, once 40 px of
   it is on screen, rises into place while its shadow grows (.landed), once. The rise is the separate `translate`
   property, so the phone layout's own transform (page.css) is untouched; js/page.js and js/seasons-ui.js measure
   around it. Nothing moves under reduced motion: no sheet is ever marked. */
body:not(.sub) .sheet { filter: drop-shadow(0 16px 22px rgba(60, 40, 20, .17)); }
body:not(.sub) .sheet::before { filter: none; }
body:not(.sub) .sheet.rise { translate: 0 16px; filter: drop-shadow(0 3px 5px rgba(60, 40, 20, .1)); }
body:not(.sub) .sheet.rise.landed { translate: none; filter: drop-shadow(0 16px 22px rgba(60, 40, 20, .17));
  transition: translate var(--t-enter) var(--ease-paper), filter var(--t-enter) var(--ease-paper); }

/* ---------- 5. the name set letter by letter like stamped ink: about 600 ms, the first visit of a session ----------
   The head script adds html.stamp (not under reduced motion, once per session: sessionStorage 'jg-stamped'); js/page.js
   takes it off when the last letter is down, so the letters go back to plain inline text. */
.hero h1 .ink i { font-style: normal; }
html.stamp .hero h1 .ink i { display: inline-block; animation: ink-stamp 260ms var(--ease-paper) both; }
html.stamp .hero h1 .ink i:nth-child(2) { animation-delay: 110ms; }
html.stamp .hero h1 .ink i:nth-child(3) { animation-delay: 220ms; }
html.stamp .hero h1 .ink i:nth-child(4) { animation-delay: 330ms; }
@keyframes ink-stamp {
  0% { opacity: 0; transform: scale(1.22); filter: blur(2px); }
  55% { opacity: 1; transform: scale(.97); filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; }
}

/* ---------- 4. the menu (phones and tablets): a full-height hanji sheet that drops from the bar ----------
   It hangs from under the bar's torn edge (the edge is drawn over it), runs to the bottom of the screen and ends in the
   same tear. It drops in 260 ms (the paper ease), unrolling from the top; closing rolls it back up. The four menu links
   in Hahmlet 24 px, then the call button, today's hours, the address and the seal (js/page.js moves #nav-more in from
   index.html and writes today's hours). The finer hanji tile (360 px, not 600): its fibres no longer read as cracks.
   Without scripts page.css shows the plain list in the flow, as before. */
.nav-more[hidden] { display: none; }
@media (max-width: 899.98px) {
  /* shut, the sheet is display: none as before (nothing of it is laid out under the bar); it drops from @starting-style
     and rolls back up before display goes (transition-behavior allow-discrete; a browser without it simply shows and
     hides the sheet) */
  html.js body:not(.sub) .site-bar .site-nav { display: none; top: 100%; height: calc(100vh - var(--bar-h)); height: calc(100svh - var(--bar-h));
    max-height: none; overflow-y: auto; overscroll-behavior: contain; border-top: 0; box-shadow: none;
    padding: calc(var(--deckle) + 8px) clamp(22px, 6vw, 48px) 46px;
    background: url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 360px auto, var(--hanji);
    -webkit-mask: linear-gradient(#000, #000) 0 0 / 100% calc(100% - 22px) no-repeat, url(../art/ui/deckle.png?v=e51f9b53) 0 100% / auto 22px repeat-x;
    mask: linear-gradient(#000, #000) 0 0 / 100% calc(100% - 22px) no-repeat, url(../art/ui/deckle.png?v=e51f9b53) 0 100% / auto 22px repeat-x;
    clip-path: inset(0 0 100% 0); transform: translateY(-10px);
    transition: clip-path var(--t-sheet) var(--ease-paper), transform var(--t-sheet) var(--ease-paper), display var(--t-sheet) allow-discrete; }
  html.js body:not(.sub) .site-bar.nav-open .site-nav { display: block; clip-path: inset(0 0 0 0); transform: none; }
  @starting-style { html.js body:not(.sub) .site-bar.nav-open .site-nav { clip-path: inset(0 0 100% 0); transform: translateY(-10px); } }
  body:not(.sub) .site-bar .site-nav li a { min-height: 60px; font: 600 24px/1.3 var(--display); letter-spacing: -.01em; color: var(--ink); }
  body:not(.sub) .site-bar .site-nav .nav-more .btn { padding: 12px 22px; border-radius: 4px; white-space: normal; }
  body:not(.sub) .nav-more { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 6px; padding-top: 22px;
    border-top: 1px solid var(--rule, rgba(43, 38, 34, .16)); }
  body:not(.sub) .site-bar .nav-more .btn { align-self: stretch; justify-content: center; min-height: 56px; margin-bottom: 6px; }
  body:not(.sub) .nav-more p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink); }
  body:not(.sub) .nav-more .nav-addr { color: var(--ink-2); font-size: 16px; }
  body:not(.sub) .nav-more .nh-day { font-weight: 600; color: var(--season-ink); margin-right: .4em; }
  body:not(.sub) .nav-more .seal { width: 44px; height: 44px; margin-top: 10px; transform: rotate(-2deg); }
  /* the menu button: a small hanji slip raised off the bar (its ring was a web-kit outline) */
  body:not(.sub) .nav-toggle { position: relative; isolation: isolate; border-radius: 4px; background: none; box-shadow: none;
    filter: drop-shadow(0 2px 2.5px rgba(60, 40, 20, .32)); -webkit-tap-highlight-color: transparent;
    transition: transform var(--t-press) var(--ease-paper), filter var(--t-press) var(--ease-paper); }
  body:not(.sub) .nav-toggle::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 300px auto, #F7F0E3;
    -webkit-mask: var(--slip-mask); mask: var(--slip-mask); }
  body:not(.sub) .nav-toggle:active, body:not(.sub) .nav-open .nav-toggle { transform: translateY(1px); filter: drop-shadow(0 1px 1px rgba(60, 40, 20, .38)); }
}
@media (min-width: 900px) { .nav-more { display: none; } }

/* the 소리 끄기 pill that waits in the corner while the sound plays and the dock is tucked: a hanji slip with the bell */
body:not(.sub) .sound-twin { background: none; color: var(--ink); box-shadow: none; isolation: isolate;
  filter: drop-shadow(0 6px 8px rgba(40, 30, 20, .3)); }
body:not(.sub) .sound-twin::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: url(../art/hanji-tile.jpg?v=e6b31083) 0 0 / 300px auto, var(--hanji);
  -webkit-mask: var(--slip-mask); mask: var(--slip-mask); }
body:not(.sub) .sound-twin svg { width: 28px; height: 30px; overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  body:not(.sub) :is(.btn, .site-bar .call, .nav-toggle) { transition: none; }
  html.js body:not(.sub) .site-bar .site-nav, html.js body:not(.sub) .site-bar.nav-open .site-nav { transition: none; transform: none; }
  html.stamp .hero h1 .ink i { animation: none; }
}
@media (forced-colors: active) {
  body:not(.sub) :is(.btn, .site-bar .call) { border: 2px solid ButtonText; }
  body:not(.sub) .site-bar::after { display: none; }
}
