/* 이 책의 모양: 1학기 만화 덱 팔레트, Pretendard, 프로젝터용 큰 글자. page.css 뒤에 읽힌다. */
:root {
  --sea: #BFD8D5; --base: #FAF7F2; --paper: #FAF7F2; --ink: #1A1A1A; --shu: #E0604C; --gold: #E0B84A; --ink2: #555; --coral: #FF8B7A; --teal: #4A8B8B;
  --head: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; --serif: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
body { font-size: 21px; word-break: keep-all; }
.lab text, .lab.pinname text, .fig .tag text, #title, .link, #people button, #event h2, #move, #skip, #intro h2, #intro .sub, #person .where, #place .where { text-transform: none; letter-spacing: 0; }
.lab text { font-size: 16px; }
.lab.pinname text { font-size: 20px; }
.lab.region text { font-size: 28px; letter-spacing: .1em; }
.fig .tag text { font-size: 14px; }
#mapstate { font-style: normal; }
#hint { font-style: normal; font-size: 17px; }
#title { font-size: 18px; }
#event { width: min(560px, 42vw); }
#event h2 { font-size: 30px; padding: 12px 16px 13px; }
#event .text { font-size: 25px; line-height: 1.45; margin: 14px 20px 18px; }
#event img { filter: none; max-height: 38vh; }
#event figcaption { font-size: 14px; }
#intro { width: min(680px, calc(100% - 32px)); border-top-color: var(--coral); }
#intro h2 { font-size: 40px; }
#intro .text { font-size: 23px; line-height: 1.5; }
#person, #place { width: min(500px, 46vw); }
#person .text, #place .text { font-size: 22px; line-height: 1.45; }
.card h2 { font-size: 30px; }
#move { font-size: 24px; }

/* 대정: 이 지도의 한가운데 */
#here .ring { fill: none; stroke: var(--shu); stroke-width: 3px; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: here 2.4s ease-out infinite; }
#here .core { fill: var(--shu); stroke: var(--paper); stroke-width: 2px; vector-effect: non-scaling-stroke; }
#here text { font: 800 22px var(--head); fill: var(--shu); paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }
@keyframes here { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
body.film #here text { opacity: 0; transition: opacity .4s; }

/* 해마다 늘어나는 길 */
#ties path { fill: none; stroke-width: 4px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .85; }
#ties path.old { opacity: .5; stroke-width: 3px; }
#ties path.grow { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 3.2s ease-in-out; }
#ties path.grow.on { stroke-dashoffset: 0; }
#ties-key { position: absolute; z-index: 1; right: max(16px, env(safe-area-inset-right)); bottom: 12px; margin: 0; padding: 6px 12px; background: var(--paper); border: 1.5px solid var(--ink); font: 700 15px/1.5 var(--head); list-style: none; }
#ties-key i { display: inline-block; width: 22px; height: 4px; vertical-align: 5px; margin-right: 6px; border-radius: 2px; }
body.film #ties-key, body.card-open #ties-key { opacity: 0; pointer-events: none; }
#ties-key .n { color: var(--shu); }

/* 마무리: 손, 약지 */
#finale { position: absolute; inset: 0; z-index: 5; background: var(--paper); display: flex; align-items: center; justify-content: center; gap: 5vw; padding: 4vh 5vw; }
#finale:not([hidden]) { animation: fin .8s ease-out; }
@keyframes fin { from { opacity: 0; } }
#hand { width: min(36vw, 52vh); height: auto; flex: none; }
#hand .f, #hand .palm { fill: #fff; stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
#hand .f.ring { transition: fill 1.2s ease .6s; }
#finale.lit #hand .f.ring { fill: var(--coral); }
#hand .glow { fill: var(--coral); opacity: 0; transition: opacity 1.2s ease .6s; }
#finale.lit #hand .glow { opacity: .35; }
#finale .words { max-width: 40vw; }
#finale p { margin: 0; }
#finale .lead { font: 800 clamp(30px, 5vw, 64px)/1.15 var(--head); color: var(--shu); }
#finale .big { font: 800 clamp(34px, 6vw, 80px)/1.15 var(--head); margin-top: .2em; }
#finale .task { margin-top: 1.4em; font: 700 clamp(20px, 2.4vw, 32px)/1.4 var(--head); padding: .5em .8em; border: 3px solid var(--ink); background: #fff; box-shadow: 5px 6px 0 rgba(26, 26, 26, .3); }
#finale .task b { display: block; color: var(--teal); }
#finale .words > * { opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s; }
#finale.lit .words > * { opacity: 1; transform: none; }
#finale.lit .words > .big { transition-delay: 1.4s; }
#finale.lit .words > .task { transition-delay: 3.2s; }
#finale.lit .words > .row { transition-delay: 4s; }
#finale .row { margin-top: 1.2em; }
@media (max-width: 700px) {
  body { font-size: 16px; }
  #finale { flex-direction: column; gap: 2vh; }
  #hand { width: 46vw; }
  #finale .words { max-width: none; text-align: center; }
  #event .text { font-size: 16px; } #event h2 { font-size: 18px; }
  #ties-key { display: none; }
}
#here, #ties { pointer-events: none; }
