/* Indwell 웹사이트 모양. 글은 index.html, 움직임은 site.js.
   고치면 index.html의 site.css 주소 뒤 ?v= 날짜도 바꿀 것(방문자 브라우저가 옛 파일을 기억하지 않게). */

/* ── 기본값 ─────────────────────────────────────────── */
:root {
  --oat: #EFE3D6;      /* 앱 책상 기본 배경 '오트밀 아이보리' 평균색 */
  --gold: #9A6B2A;     /* 오트밀 위에서 읽히는 짙은 금빛 */
  --ink: #3B2A20;
  --ink-dim: #75604F;
  --rule: #D6C6B2;
  --card: #F6EEE4;
  --night: #0E1530;    /* 앱 아이콘 밤하늘 남색 */
  --night-ink: #EDE3CC;
  --serif: "Noto Serif KR", "AppleMyungjo", "Nanum Myeongjo", serif;
  --title: "Indwell Title", var(--serif);   /* 앱 기본 서체(마루부리)에서 이 페이지 글자만 잘라 낸 서체 */
  --latin: "Cormorant Garamond", "Noto Serif KR", Georgia, serif;
  --hand: "Nanum Pen Script", "Noto Serif KR", cursive;   /* 그림 속 종이·포스트잇에 손으로 쓴 글. 그림 위에는 제목 서체(마루부리)를 쓰지 않는다 */
  --wrap: 1080px;
}
/* 서체 파일은 tools/build-fonts.py가 만든다. 문구를 고치면 그 도구를 다시 실행할 것 */
@font-face { font-family: "Indwell Title"; src: url(fonts/indwell-title-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Indwell Title"; src: url(fonts/indwell-title-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* 종이 결 바탕: 이어 붙이지 않은 한 장짜리 그림을 화면에 고정(스크롤해도 반복 없음).
   넓은 화면 = 5120×2880, 세로 화면(휴대폰) = 1600×2880 */
.paper-bg { position: fixed; inset: 0; z-index: -1; background: var(--oat) url(img/oatmeal-wide.jpg) center / cover no-repeat; }
@media (orientation: portrait) { .paper-bg { background-image: url(img/oatmeal-tall.jpg); } }
/* 필름 입자 한 겹: 그림들과 바탕의 질감을 하나로 묶는다. 누르기·고르기를 막지 않게 pointer-events 없음 */
.grain { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .15 0 0 0 0 .1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* 기본 여백 없애기·그림이 화면 폭을 넘지 않게 */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }
body { margin: 0; background: var(--oat); color: var(--ink); font-family: var(--serif); font-size: 16px; line-height: 1.8; word-break: keep-all; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── 맨 위 메뉴 ─────────────────────────────────────── */
/* 따라오는 띠 높이만큼 남겨 두어, 메뉴로 이동했을 때 제목이 띠에 가리지 않게 */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
/* 따라오는 메뉴 띠: 맨 위 메뉴가 화면 밖으로 나가면 위에서 내려온다(site.js가 .show를 붙임).
   내용은 맨 위 메뉴(.nav-right)를 그대로 복사해 쓰므로 메뉴는 맨 위 한 곳만 고치면 된다.
   남색 = 앱 아이콘 밤하늘색 */
.stickybar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: var(--night);   /* 불투명이어야 아이폰 사파리가 시계 줄도 같은 색으로 칠한다(반투명이면 시계 줄이 오트밀로 떨어져 보였다, 2026-10-23) */ padding-top: env(safe-area-inset-top, 0px); transform: translateY(-100%); visibility: hidden; transition: transform .25s ease, visibility .25s; box-shadow: 0 6px 20px rgba(14,21,48,.25); }
.stickybar.show { transform: none; visibility: visible; }
.stickybar .wrap { display: flex; justify-content: flex-end; padding-block: 10px; }
.stickybar .nav-right { display: flex; align-items: center; gap: 20px; }
.stickybar .menu { display: flex; gap: 22px; border: 0; padding: 0; }
.stickybar .menu a { color: var(--night-ink); }
.stickybar .menu a:hover { color: #FFFFFF; }
.stickybar .get { background: var(--oat); color: var(--ink); }
.stickybar .share { color: var(--night-ink); border-color: rgba(237,227,204,.4); }
.stickybar .share::after { background: var(--oat); color: var(--ink); }
/* 밤 장면(남색 바탕)에서는 반대로 밝은 띠 — 밝은 바탕엔 남색, 남색 바탕엔 오트밀(site.js가 시간 버튼과 같은 때 .dark를 붙임) */
.stickybar { transition: transform .25s ease, visibility .25s, background .5s ease; }
.stickybar.dark { background: var(--oat); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.stickybar.dark .menu a { color: var(--ink-dim); }
.stickybar.dark .menu a:hover { color: var(--ink); }
.stickybar.dark .get { background: var(--night); color: var(--night-ink); }
.stickybar.dark .share { color: var(--ink); border-color: var(--rule); }
.stickybar.dark .share::after { background: var(--night); color: var(--night-ink); }
@media (prefers-reduced-motion: reduce) { .stickybar { transition: none; } }
/* 맨 위 줄. 화면 폭마다 로고 크기를 정해 두어 메뉴와 부딪히지 않게 함:
   600 미만(휴대폰) = 1줄: 로고·앱 받기 / 2줄: 메뉴
   600 이상 = 한 줄: 로고 왼쪽, 메뉴·앱 받기 오른쪽 */
.topbar .wrap { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand . actions" "menu menu menu"; align-items: center; gap: 14px 24px; padding-block: 20px 0; }
.brand { grid-area: brand; margin: 0; line-height: 0; }
/* 로고 = 같은 줄의 남은 폭을 꽉 채우는 크기(가로:세로 3.485).
   실측(10-10): 메뉴 3개 213(600~820)·233(820 이상), 앱 받기 77, 칸 사이 24×2.
   공유 아이콘(11-16): 34 + 앱 받기와의 사이 8 = 42를 세 계산식 모두에 더했다.
   계산식의 빼는 값 = 여백 40 + 칸 사이 48 + 메뉴·버튼 폭 + 안전 여유 36(스크롤바·글꼴 차이 대비).
   메뉴 글자나 버튼을 바꾸면 이 숫자도 다시 재야 한다.
   원본 1812×520 — 가장 클 때도 원본보다 작게 표시되어 큰 화면에서 선명 */
.brand img { height: max(40px, calc((100vw - 243px) / 3.485)); width: auto; }
.nav-right { display: contents; }
.menu { grid-area: menu; display: flex; justify-content: flex-end; gap: 22px; font-size: 15px; border-top: 1px solid var(--rule); padding-top: 8px; }
.actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }
.menu a { text-decoration: none; color: var(--ink-dim); padding-block: 4px; }
.menu a:hover { color: var(--ink); }
.get { white-space: nowrap; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--card); background: var(--ink); padding: 8px 16px; border-radius: 999px; }

/* 링크 공유 아이콘 — 앱 받기 오른쪽 동그라미. 주소를 복사했을 때만 아래에 '링크를 복사했어요'가 잠깐 뜬다(site.js가 .copied를 붙임) */
.share { position: relative; flex: none; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.share svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share:hover { border-color: currentColor; }
.share::after { content: '링크를 복사했어요'; position: absolute; top: calc(100% + 8px); right: 0; white-space: nowrap; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--card); opacity: 0; pointer-events: none; transition: opacity .2s; }
.share.copied::after { opacity: 1; }

/* ── 앱 받기 단추 ───────────────────────────────────── */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.store { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-size: 15px; text-decoration: none; border: 1px solid var(--gold); }
.store.primary { background: var(--ink); border-color: var(--ink); color: var(--card); font-weight: 600; }
.store.soon { color: var(--ink-dim); border-color: var(--rule); cursor: default; }
.store svg { width: 18px; height: 18px; fill: currentColor; }

/* ── 장면 공통 ──────────────────────────────────────── */
/* 장면 = 머리글(시각·제목·짧은 글) + 그림판(.plate) 여러 장.
   그림판은 그림 비율(가로 3:2 / 휴대폰 세로판 2:3)을 그대로 지키는 액자라서 그림이 잘리지 않고,
   그 위에 손으로 쓴 글(.ov)은 site.js가 그림 속 종이의 네 모서리(data-quad)에 맞춰 붙인다 → 종이가 기울고 누운 만큼 글도 함께.
   큰 화면에서는 그림판이 원본 폭(1536)을 넘지 않고 둘레에 오트밀 여백이 남는다(그림을 키우지 않음). */
.scene { padding-block: 72px; }
.scene-head { max-width: 40em; }
.time-label { font-family: var(--latin); font-size: 14px; letter-spacing: .2em; color: var(--gold); }
.scene-title { font-family: var(--title); font-weight: 400; font-size: clamp(28px, 6vw, 44px); line-height: 1.35; margin-top: 10px; }
.scene-lead { margin-top: 18px; color: var(--ink-dim); max-width: 34em; }
.frame { margin: 48px 0 0; }
.plate { position: relative; margin-inline: auto; overflow: hidden; container-type: inline-size; background: var(--card);
  width: min(100%, 1536px, calc((100svh - 48px) * 1.5)); aspect-ratio: 3 / 2; }
.plate picture { position: absolute; inset: 0; display: block; }   /* 그림 틀도 그림판 크기로 — 그래야 빛 쓸기·다가가기 효과가 그림에 걸린다 */
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: var(--focus, 50% 50%); }   /* 틀과 그림 비율이 다를 때(휴대폰 장면 틀)만 잘린다. 잘릴 때 남길 중심 = 그림별 --focus(index.html) */
.caption { margin: 10px auto 0; width: min(100%, 1536px, calc((100svh - 48px) * 1.5)); font-family: var(--latin); font-size: 13px; letter-spacing: .08em; color: var(--ink-dim); }
.frame-note { margin: 14px auto 0; width: min(100%, 1536px, calc((100svh - 48px) * 1.5)); color: var(--ink-dim); max-width: 34em; }

/* 그림 속 종이에 손으로 쓴 글. 자리·기울기·원근·글자 크기는 site.js가 정한다(여기서는 필기구별 잉크만).
   잉크는 종이 색과 곱해져(multiply) 종이 결·나뭇잎 그림자가 글자 위로 비친다 — 종이에 스민 것처럼 */
.ov { position: absolute; left: 0; top: 0; box-sizing: border-box; transform-origin: 0 0; visibility: hidden; pointer-events: none;
  font-family: var(--hand); line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; mix-blend-mode: multiply; }
html.ov-ready .ov { visibility: visible; }
.ov .c { display: inline-block; }
/* 종이에 붙인 사진: 자리는 site.js가 종이 네 모서리에 맞추고, 여기서는 손으로 붙인 듯한 작은 기울기와 얇은 그림자만 */
.pasted { position: absolute; left: 0; top: 0; box-sizing: border-box; transform-origin: 0 0; visibility: hidden; pointer-events: none; }
html.ov-ready .pasted { visibility: visible; }
.pasted picture { position: static; display: block; }   /* 그림판 배경 그림 규칙(.plate picture/img)을 사진에는 쓰지 않게 */
.pasted img { position: static; inset: auto; display: block; width: 100%; height: auto; rotate: -2.2deg; box-shadow: 0 1px 2px rgba(40, 24, 10, .28), 0 6px 14px rgba(40, 24, 10, .18); }
/* 종이 액자(1년 전 일기 '우산'): 사진 둘레에 크림색 종이 여백(아래를 조금 더 넓게), 결이 보이게 아주 옅은 안쪽 그늘 */
.pasted.framed img { box-sizing: border-box; padding: 5% 5% 9%; background: #E9DCC6; rotate: 1.6deg;
  filter: sepia(.14) brightness(.95);   /* 스탠드 불빛 아래 일기장 종이색에 맞춰 액자·사진을 조금 데운다(하얗게 떠 보이지 않게) */
  box-shadow: inset 0 0 0 1px rgba(120, 96, 70, .12), 0 1px 2px rgba(40, 24, 10, .26), 0 7px 16px rgba(40, 24, 10, .2); }
.ov p + p { margin-top: .55em; }
.ov .small { font-size: .74em; opacity: .8; }
/* 글은 '무언가 써 있다'는 느낌이 목적 — 보려고 하면 읽히는 정도로 옅고 작게(부각 금지).
   진하기는 색의 알파로만 정한다(opacity는 장면 움직임이 글을 나타내고 지우는 데 쓰므로 여기서 쓰면 덮어써짐) */
.ov[data-pen="fountain"]  { color: rgba(30, 40, 82, .58);  filter: blur(.2px); }  /* 남색 만년필 잉크 */
.ov[data-pen="ballpoint"] { color: rgba(30, 34, 52, .55);  filter: blur(.15px); }                                           /* 검정 볼펜 */
.ov[data-pen="pencil"]    { color: rgba(80, 80, 84, .5);   filter: blur(.25px); }                                          /* 연필(흑연) */
.ov[data-pen="faded"]     { color: rgba(66, 40, 24, .72);  filter: blur(.1px); }                                            /* 오래되어 바랜 잉크 */
/* 천 표지에 찍힌 금박 제목: 손글씨가 아니라 찍어 누른 글자라 본명조, 곱하기 대신 빛나는 금색 + 눌린 그림자 */
.ov[data-pen="foil"] { font-family: var(--serif); font-weight: 600; letter-spacing: .08em; text-align: center; white-space: nowrap;
  color: rgba(217, 182, 118, .9); mix-blend-mode: normal; filter: none; text-shadow: 0 1px 0 rgba(0, 0, 0, .45), 0 -.5px 0 rgba(255, 236, 190, .35); }
/* 앱이 실제로 띄우는 안내 문구를 앱 모양 그대로 보여 주는 쪽지 */
.toast { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); padding: .7em 1.4em; border-radius: 999px;
  background: rgba(46, 33, 25, .86); color: var(--night-ink); font-size: max(13px, 1.1cqw); white-space: nowrap; }

/* 큰 문장 장면(영상의 큰 글자 장면을 인드웰 식으로): 흐린 그림 위에 한 문장 */
.statement .plate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(239,227,214,.88) 0%, rgba(239,227,214,.55) 55%, rgba(239,227,214,0) 85%); }
.statement-text { position: absolute; z-index: 1; left: 7%; top: 50%; transform: translateY(-50%); width: 58%;
  font-family: var(--serif); font-weight: 500; font-size: 4.2cqw; line-height: 1.5; color: var(--ink); }
/* 같은 펜촉 그림 위에서 큰 문장보다 먼저 나오는 소개 글(두 장면이 같은 그림이라 글만 바뀌어 보인다) */
.statement-sub { top: 30%; font-size: 2cqw; font-weight: 400; line-height: 1.9; }
/* 결론 문장은 펜촉 끝(그림 가로 70%·세로 73%의 잉크 점) 아래 빈 종이에 — 펜이 방금 쓴 문장처럼. 시작선은 위 문단과 같고 조금만 진하게 */
.statement-end { top: auto; bottom: 8%; transform: none; font-weight: 500; }

/* ── 첫 화면(장면 1) ────────────────────────────────── */
.hero { padding-top: 28px; }
.hero .plate::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(239,227,214,.9) 0%, rgba(239,227,214,.6) 30%, rgba(239,227,214,0) 52%); }
.hero-copy { position: absolute; z-index: 2; left: 5.5%; top: 50%; transform: translateY(-50%); width: 38%; }
.hero .meaning { display: flex; align-items: baseline; gap: 12px; font-size: 15px; color: var(--ink-dim); letter-spacing: .04em; }
.hero .meaning .word { font-family: var(--latin); font-size: 30px; font-weight: 600; color: var(--gold); letter-spacing: .02em; }
.hero .line { width: 48px; height: 1px; background: var(--gold); opacity: .6; margin-block: 24px; }
.hero .lead { font-family: var(--serif); font-size: clamp(18px, 1.8cqw, 26px); line-height: 1.75; }
.hero .stores { margin-top: 32px; }

/* ── 세 가지 글 (가는 선 격자 + 도장 문양) ──────────────── */
.intro .big { font-family: var(--title); font-size: clamp(22px, 5.4vw, 32px); line-height: 1.6; max-width: 22em; margin-top: 14px; }
.intro .body { margin-top: 24px; max-width: 34em; color: var(--ink-dim); }
.intro strong { color: var(--ink); font-weight: 500; }
.pillars { display: grid; margin-top: 56px; border-top: 1px solid var(--rule); }
.pillar { padding: 32px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 10px; }
.emblem { width: 96px; height: 96px; color: var(--ink-dim); }
.pillar h3 { font-family: var(--title); font-size: 22px; font-weight: 400; margin-top: 8px; }
.pillar .limit { font-size: 13px; letter-spacing: .04em; color: var(--gold); }
.pillar p { color: var(--ink-dim); font-size: 15px; }
.flow-note { margin-top: 24px; color: var(--ink-dim); font-size: 15px; max-width: 34em; }
/* 세 가지 글 아래의 두 번째 묶음(일기·독후감): 같은 칸 모양, 위에 여백과 작은 제목 */
.pillars-title { font-family: var(--title); font-weight: 400; font-size: clamp(22px, 5vw, 28px); margin-top: 88px; }
.pillars-title + .pillars { margin-top: 28px; }

/* ── 실제 앱 화면(휴대폰 틀) ─────────────────────────── */
/* 틀만 그리고 화면은 실제 앱을 찍은 그림 그대로(1206×2622) */
.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin-top: 48px; }
.phone { margin: 0; width: clamp(200px, 21vw, 280px); }
.phone .bezel { padding: 7px; border-radius: 40px; background: #1E1A17; box-shadow: 0 24px 50px rgba(59,42,32,.22); }
.phone img { display: block; width: 100%; aspect-ratio: 1206 / 2622; border-radius: 33px; }
.phone figcaption { margin-top: 12px; text-align: center; font-size: 13px; color: var(--ink-dim); }

/* ── 앱 표지 진열(일기장·독후감) ─────────────────────── */
.covers { display: grid; grid-template-columns: repeat(4, auto); justify-content: center; gap: 22px clamp(14px, 3vw, 34px); margin-top: 40px; }   /* 4개씩 한 줄 */
.covers img { width: clamp(64px, 9vw, 120px); height: auto; filter: drop-shadow(0 10px 14px rgba(59,42,32,.18)); }

/* ── 돌아온 글(장면 4)의 큰 시각 ─────────────────────── */
.returned .time { font-family: var(--latin); font-size: clamp(72px, 18vw, 120px); color: var(--gold); line-height: 1; margin-top: 18px; font-variant-numeric: tabular-nums; }
.returned .scene-lead + .scene-lead { margin-top: 12px; font-size: 15px; }

/* ── 밤 장면(장면 5·마무리) ──────────────────────────── */
.night { background: var(--night); color: var(--night-ink); }
.night .time-label { color: #C9A86A; }
.night .scene-lead, .night .caption, .night .phone figcaption, .night .frame-note { color: #B9AE9C; }
.night .plate { background: #1A1F33; }
.night .phone .bezel { background: #05070F; box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.finale { text-align: center; padding-bottom: 96px; }
.finale h2 { font-family: var(--title); font-weight: 400; font-size: clamp(26px, 5.6vw, 40px); line-height: 1.5; margin-top: 40px; }
.finale .lead-in { color: #B9AE9C; }
.finale .gap { display: block; height: .5em; }
.finale .stores { justify-content: center; }
.motion .quiet { background: var(--oat); }   /* 밤 막 위에 오트밀을 덮는다 */
/* 밤 → 오트밀은 칼로 자르듯 바뀌지 않게: 첫 구역(둘러보기) 위에 화면 0.7장 높이의 여백을 두고 그 안에서 남색이 서서히 밝아진다.
   글은 그 여백이 끝난 뒤(완전한 오트밀 위)에서 시작하므로 중간 색 위에 글이 놓이지 않는다 */
.motion .quiet.shots { padding-top: calc(70svh + 72px); background: linear-gradient(180deg, var(--night) 0, var(--oat) 70svh, var(--oat) 100%); }
/* 직접 찍은 책장 사진: 다른 장면 그림과 같은 모양(모서리·그림자·좌우 여백 없이 화면 폭을 채움, 넓은 화면에선 1536px까지 가운데).
   실내 조명이라 하얀 사진을 앞뒤 오후 햇빛 그림과 어울리게 아주 조금 데운다 */
.shelf-photo { max-width: none; padding-inline: 0; margin-top: 36px; margin-bottom: 56px; }
.shelf-photo img { display: block; width: min(100%, 1536px); height: auto; margin-inline: auto; filter: sepia(.16) saturate(.92) brightness(.98); }
.finale .price-note { margin: 22px auto 0; max-width: 34em; font-size: 14px; line-height: 1.8; color: #B9AE9C; }
.night .store.primary { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
.night .store.soon { color: #B9AE9C; border-color: rgba(237,227,204,.3); }

/* ── 조용한 구역: 개인정보·둘러보기·자주 묻는 질문 (예전 그대로) ── */
section { padding-block: 72px; }
.eyebrow { font-size: 13px; letter-spacing: .14em; color: var(--ink-dim); }
h2 { font-size: clamp(24px, 5.6vw, 32px); line-height: 1.45; margin-top: 10px; }
.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-block: 8px 20px; margin-top: 36px; scrollbar-width: thin; }
.gallery picture { flex: 0 0 auto; scroll-snap-align: start; }
.gallery img { display: block; width: min(62vw, 240px); height: auto; aspect-ratio: 1284 / 2778; object-fit: cover; border-radius: 14px;   /* 앱스토어 포스터 비율 그대로(잘리지 않게) */ box-shadow: 0 8px 24px rgba(59,42,32,.12); background: var(--card); }
.hint { font-size: 13px; color: var(--ink-dim); margin-top: 4px; }
.privacy-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.privacy-list li { padding-block: 20px; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.privacy-list b { font-weight: 600; font-size: 17px; }
.privacy-list span { color: var(--ink-dim); font-size: 15px; }
/* 개인정보 구역 제목 아래 사진(덮인 책과 펜) — 하루 장면들과는 다른 사진이라 조용한 구역에만 둔다 */
.quiet-photo { display: block; width: 100%; height: auto; margin-top: 32px; border-radius: 3px; box-shadow: 0 18px 40px -24px rgba(60, 40, 20, .45); }
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); padding-block: 18px; }
.faq summary { cursor: pointer; font-size: 17px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; color: var(--ink-dim); }
.faq details[open] summary::after { content: "－"; }
.faq details p { margin-top: 10px; color: var(--ink-dim); font-size: 15px; max-width: 34em; }
/* 세 걸음: 실제 앱 화면 셋을 한 줄로 작게, 사이에 → */
.steps { padding-block: 56px 8px; }
.steps .phones { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); justify-content: center; gap: 28px; margin-top: 0; }
.steps .phone { width: auto; position: relative; }
.steps .phone + .phone::before { content: "→"; position: absolute; left: -22px; top: 46%; color: var(--gold); font-size: 15px; }
.steps .phone figcaption { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }

/* ── 사용 설명서 창 — 앱 설명서 카드와 같은 위계(장 제목·소제목·본문·왼쪽 선 강조문) ── */
.guide { width: min(720px, 100% - 24px); max-width: none; max-height: min(88vh, 100% - 24px); padding: 0; border: 1px solid var(--rule); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(59,42,32,.25); overflow: hidden; }
.guide[open] { display: flex; flex-direction: column; }
.guide::backdrop { background: rgba(59,42,32,.35); }
.g-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--ink-dim); }
.g-close { border: 0; background: none; font-size: 18px; color: var(--ink); cursor: pointer; padding: 4px 8px; }
.g-body { overflow-y: auto; padding: 28px clamp(20px, 5vw, 48px) 48px; font-size: 16px; line-height: 1.85; }
.g-head { text-align: center; padding-bottom: 12px; }
.g-head img { height: 40px; width: auto; }
.g-sub { margin-top: 10px; font-size: 16px; }
.g-cap { font-size: 13px; color: var(--ink-dim); }
.g-h { font-size: 20px; font-weight: 600; margin-top: 44px; margin-bottom: 4px; }
.g-s { font-size: 16px; font-weight: 600; margin: 18px 0 0; }
.g-p { margin-top: 12px; }
.g-p strong, .g-em strong { font-weight: 600; }
.g-em { margin-top: 16px; padding-left: 14px; border-left: 3px solid #8D6E63; font-weight: 600; }
.g-rule { border: 0; border-top: 1px solid var(--rule); margin: 36px 0 8px; }
.g-end { display: block; height: 32px; width: auto; margin: 28px auto 0; }
/* ── 사용 설명서 독립 페이지(guide/ — tools/build-guide.js가 만든다). 글 모양은 위 .g-* 를 그대로 쓰고, 여기엔 페이지 틀만 둔다 ── */
.doc-top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 24px; }
.doc-top img { display: block; height: 40px; width: auto; }
/* 이동 단추(오른쪽 위 '돌아가기' .back, 설명서 아래 앞·뒤 장 .g-nav a) — 글자만 두지 않는다. 공통은 뼈대와 화살표뿐이고 모양은 각자 아래에서 정한다 */
.doc-top .back, .g-nav a { display: flex; align-items: center; text-decoration: none; transition: border-color .2s, background-color .2s, color .2s; }
.doc-top .back::before, .g-nav .prev::before, .g-nav .next::after { flex: none; font-family: var(--latin); }
.doc-top .back::before, .g-nav .prev::before { content: "←"; color: var(--gold); }
.g-nav .next::after { content: "→"; color: #E2C28B; }
.doc-top .back { gap: 8px; padding: 8px 16px 8px 13px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; line-height: 1.4; white-space: nowrap; }
.doc-top .back:hover { border-color: var(--gold); background: #FBF5EC; }
.g-page { overflow: visible; max-width: 720px; margin-inline: auto; border: 1px solid var(--rule); border-radius: 18px; background: var(--card); }   /* 창(.guide) 안에서와 같은 종이 카드 */
.g-page > .g-h:first-child { margin-top: 8px; font-size: 22px; }   /* 장 페이지의 제목(h1) */
.g-toc { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--rule); }
.g-toc li { border-bottom: 1px solid var(--rule); }
.g-toc a { display: block; padding: 14px 2px; text-decoration: none; }
.g-toc a:hover { color: var(--gold); }
/* 앞·뒤 장: 위의 본문 카드와 같은 상자를 또 두지 않는다. 다음 장 = 짙은 먹색 단추(가야 할 곳, '앱 받기'와 같은 말투), 이전 장 = 테만 있는 가벼운 단추.
   크기는 제목 길이만큼만 — 왼쪽 끝과 오른쪽 끝에 하나씩 놓인다. */
.g-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 720px; margin: 24px auto 64px; font-size: 14px; line-height: 1.5; }
.g-nav a { gap: 10px; max-width: calc(50% - 6px); padding: 11px 20px; border: 1px solid transparent; border-radius: 24px; }
.g-nav .prev { padding-left: 16px; border-color: var(--rule); color: var(--ink-dim); }
.g-nav .prev:hover { border-color: var(--gold); color: var(--ink); }
.g-nav .next { margin-left: auto; padding-right: 16px; background: var(--ink); color: var(--card); font-weight: 500; box-shadow: 0 10px 24px -14px rgba(59, 42, 32, .55); }
.g-nav .next:hover { background: #2B1E16; }
@media (max-width: 560px) {
  /* 좁은 화면: 한 줄에 하나씩, 다음 장을 위에 */
  .g-nav { flex-direction: column-reverse; align-items: stretch; }
  .g-nav a { max-width: none; justify-content: center; text-align: center; }
  .g-nav .next { margin-left: 0; }   /* 넓은 화면의 '오른쪽 끝으로 밀기'를 풀어야 두 단추가 같은 폭이 된다 */
}
/* 기능별 소개 페이지(diary/ 등 — 글은 pages/pages.js)에서만 쓰는 것: 앱 화면 그림, 스토어 단추, 그리고 첫 화면 장면 끝의 '더 알아보기' 줄 */
/* 앱 화면 그림: 틀은 첫 화면의 아이폰 테두리(.phone .bezel)를 그대로 쓰고, 여기서는 크기와 자리만 정한다.
   (.phone.g-shot으로 적는 까닭 — 좁은 화면에서 .phone의 폭 160px 규칙보다 앞서야 한다) */
.phone.g-shot { width: min(250px, 68%); margin: 28px auto 8px; }
/* 여러 장을 한 줄로: 넓은 화면은 나란히, 좁은 화면은 한 장씩 옆으로 넘겨 본다 */
.g-shots { display: flex; justify-content: center; gap: 14px; margin: 28px 0 8px; }
.g-shots .phone.g-shot { flex: none; width: calc((100% - 28px) / 3); max-width: 210px; margin: 0; }
@media (max-width: 560px) {
  /* 카드 가장자리까지 넘겨지도록 카드 안쪽 여백(.g-body)만큼 밖으로 내고, 아래에는 그림자 자리를 둔다 */
  .g-shots { justify-content: flex-start; margin-inline: calc(-1 * clamp(20px, 5vw, 48px)); margin-bottom: -30px; padding: 0 clamp(20px, 5vw, 48px) 44px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .g-shots::-webkit-scrollbar { display: none; }
  .g-shots .phone.g-shot { width: 62%; max-width: none; scroll-snap-align: center; }
}
.g-page .faq { margin-top: 14px; }
.g-stores { justify-content: center; margin-top: 44px; }
.more { margin-top: 28px; font-size: 15px; text-align: center; }
.more { scroll-margin-top: 55vh; }   /* 소개 페이지의 '첫 화면' 단추로 돌아올 때, 이 줄이 화면 아래쪽에 오고 그 위의 앱 화면이 함께 보이게 */
.more a { text-underline-offset: 4px; }

/* ── 맨 아래 ───────────────────────────────────────── */
footer { border-top: 1px solid var(--rule); padding-block: 40px 56px; font-size: 14px; color: var(--ink-dim); }
footer .wrap { display: grid; gap: 20px; justify-items: center; text-align: center; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
footer .mail { user-select: all; color: var(--ink); }
.copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
/* 원본 1812×520 → 604×173 사본, 표시 높이 28 (고화질 화면 대비 여유) */
.logo { height: 28px; width: auto; }

/* ── 화면 폭별 ──────────────────────────────────────── */
/* 휴대폰 세로: 세로판이 있는 그림은 2:3 그림판으로 바꾼다(글은 site.js가 세로판의 네 모서리 data-quad-p로).
   이 조건은 index.html의 <source media="…">, site.js의 PORTRAIT와 같아야 한다(그림과 글이 같은 판을 가리키도록). */
@media (max-width: 700px) and (orientation: portrait) {
  .has-p .plate, .has-p .caption, .has-p .frame-note { width: 100%; aspect-ratio: 2 / 3; }
  .has-p .caption, .has-p .frame-note { aspect-ratio: auto; }
  /* 첫 화면: 세로판 그림의 위쪽 빈 벽 자리에 글과 단추를 얹는다(그림 틀 밖으로 내보내면 잘림).
     위에서 아래로 옅어지는 오트밀 막을 깔아 글이 읽히게 하고, 종이(그림 아래쪽 절반)는 가리지 않는다 */
  .hero .plate::before { background: linear-gradient(180deg, rgba(239,227,214,.94) 0%, rgba(239,227,214,.8) 34%, rgba(239,227,214,0) 50%); }
  .hero-copy { left: 0; right: 0; top: 0; transform: none; width: auto; padding: 22px 20px 0; }
  .hero .meaning .word { font-size: 24px; }
  .hero .line { margin-block: 14px; }
  .hero .lead { font-size: 17px; }
  .hero .stores { margin-top: 18px; gap: 8px; }
  .hero .store { padding: 9px 14px; font-size: 13px; }
  /* 그림 아래 글: 화면 가장자리에 붙지 않게 양옆 여백 */
  .caption, .frame-note { padding-inline: 20px; }
  .statement-text { width: 80%; font-size: 6cqw; }
  .steps { padding-block: 40px 0; }
  .steps .phones { gap: 14px; }
  .steps .phone + .phone::before { left: -12px; font-size: 12px; }
  .steps .phone .bezel { padding: 4px; border-radius: 20px; }
  .steps .phone img { border-radius: 16px; }
  .steps .phone figcaption { font-size: 14px; margin-top: 8px; }
  .statement-sub { top: 30%; width: 68%; font-size: 3.9cqw; }   /* 오른쪽 펜 몸통에 글 끝이 닿지 않게 */
  .statement-end { top: auto; }
}
/* 휴대폰 세로에서 가로 그림의 그림판은 폭에 맞춘다(세로 화면 높이 기준 계산이 폭보다 커지지 않게) */
@media (orientation: portrait) {
  .plate, .caption, .frame-note { width: min(100%, 1536px); }
}

@media (min-width: 600px) {
  .topbar .wrap { grid-template-areas: "brand menu actions"; }
  .brand img { height: calc((100vw - 456px) / 3.485); }
  .menu { justify-content: flex-end; gap: 22px; border-top: 0; padding-top: 0; }
}
/* 컴퓨터 화면: 옆으로 펼치기 */
@media (min-width: 820px) {
  .topbar .wrap { padding-block: 36px 0; }
  .brand img { height: calc((min(100vw, 1080px) - 476px) / 3.485); }
  .menu { gap: 32px; }
  section, .scene { padding-block: 104px; }
  .split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
  .split .privacy-list { margin-top: 0; }
  .gallery img { width: 230px; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .pillars.two { grid-template-columns: repeat(2, 1fr); max-width: calc(2 / 3 * 100%); }   /* 두 칸은 위 세 칸과 같은 폭으로 */
  .pillar { padding: 36px 32px; border-bottom: 0; }
  .pillar + .pillar { border-left: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: no-preference) {
  .store { transition: transform .2s ease; }
  .store.primary:hover { transform: translateY(-2px); }
  .covers img { transition: transform .3s ease; }
  .covers img:hover { transform: translateY(-6px); }
}

/* ══════════════════════════════════════════════════════════════════
   움직임 — site.js가 <html>에 .motion을 붙였을 때만 적용된다.
   '움직임 줄이기'를 켠 기기나 스크립트가 없는 화면은 위의 멈춘 장면 그대로(모든 글·그림이 차례로 보임).
   값의 흐름: site.js가 스크롤 위치로 계산해 아래 변수를 붙인다 → 여기서는 그 변수로 모양만 정한다.
     .seq        --n(그림 수)            .frame --in(이 그림이 덮여 오는 정도 0~1)
     .frame --a(이 그림의 글이 보이는 정도 0~1)   --p(묶음 전체 진행 0~1)   .nightfall --night-o
   ══════════════════════════════════════════════════════════════════ */
:root { --bar: 56px; --txt: 128px; --ease: cubic-bezier(.4, 0, .2, 1); --ease-out: cubic-bezier(.16, 1, .3, 1); }
html.motion { scroll-behavior: auto; }   /* 부드러운 이동은 site.js가 직접 한다(브라우저 것과 겹치면 덜컥거림) */

/* ── 장면 묶음: 화면에 붙잡아 두고 같은 자리에서 그림을 겹쳐 바꾼다 ── */
/* 묶음 높이 = 화면 1장 + 그림 하나 바뀔 때마다 화면 0.85장 */
.motion .seq { position: relative; height: calc(100svh + (var(--n, 1) - 1 + var(--hold, 0)) * 85svh); }
/* data-hold="x": 그 묶음만 마지막 그림이 x칸(0.85장 × x) 더 머문다 — 덮이자마자 지나가던 책 표지·책장 서재만(2026-10-24 사용자 요청). 값은 site.js가 --hold로 넣는다 */
.motion .seq-stick { position: sticky; top: 0; height: 100svh; padding-top: calc(var(--bar) + 20px); padding-bottom: 64px; display: grid; align-items: start; justify-items: center; overflow: hidden; }
/* ↑ 아래 64 = 시간 단추 자리. 그림들을 위쪽 기준으로 맞춘다 — 장마다 아래 글 길이가 달라도 겹치는 그림이 같은 자리에 놓이게 */
.motion .seq .frame { grid-area: 1 / 1; margin: 0; width: 100%; pointer-events: none; }   /* --txt는 그림 아래 글에 남길 높이(그림판 크기 계산에만 씀) */
.motion .seq .frame[data-active] { pointer-events: auto; }
.motion .seq .plate, .motion .seq .caption, .motion .seq .frame-note {
  width: min(100%, 1536px, calc((100svh - var(--bar) - var(--txt) - 96px) * 1.5)); }
/* 새 그림이 덮여 올 때: 그림판 전체(그림+그 위 글)가 아주 조금 다가오며 자리를 잡는다 */
.motion .seq .plate { scale: calc(1 + (1 - var(--in, 1)) * .03); }
.motion .seq .frame picture { opacity: var(--in, 1); }
/* 겹쳐 놓은 그림판은 바탕을 비워 두고(아래 그림이 비치도록), 그림에 딸린 막도 그림과 함께 나타나게 */
.motion .seq .plate { background: transparent; }
.motion .seq .statement .plate::after { opacity: var(--in, 1); }
/* 글은 자기 그림이 앞에 있을 때만 보이고, 살짝 떠오르며 나타난다 */
.motion .seq .frame :is(.ov, .pasted, .caption, .frame-note, .toast, .statement-text, .hero-copy) {
  opacity: var(--a, 1); translate: 0 calc((1 - var(--a, 1)) * 14px); }
.motion .seq .frame .plate::before { opacity: var(--a, 1); }   /* 첫 화면 글 뒤의 옅은 막도 글과 함께 */
/* 첫 화면 → 펜촉: 종이와 펜 쪽으로 천천히 다가간다 */
.motion [data-fx="zoom"] picture { scale: calc(1 + var(--p, 0) * .18); transform-origin: 72% 76%; }   /* 그림만 그림판 안에서 커진다(틀 밖으로 넘치지 않게). 종이 위 글·소개 글은 그 전에 먼저 사라진다 */
/* 저녁 7시: 그냥 겹치지 않고 창 쪽(오른쪽 위)에서부터 금빛이 종이를 쓸고 지나간다 */
.motion [data-fx="sweep"] picture { opacity: 1;
  -webkit-mask-image: linear-gradient(245deg, #000 calc(var(--in, 1) * 150% - 50%), transparent calc(var(--in, 1) * 150%));
          mask-image: linear-gradient(245deg, #000 calc(var(--in, 1) * 150% - 50%), transparent calc(var(--in, 1) * 150%)); }

/* ── 밤이 내려앉는다: 장면 5에 가까워질수록 화면 전체가 남색으로 ── */
.nightfall { position: fixed; inset: 0; z-index: -1; background: var(--night); opacity: 0; pointer-events: none; }
.motion .nightfall { opacity: var(--night-o, 0); }
/* 아이폰 사파리의 아래 주소창 뒤는 고정 막(.nightfall)이 덮지 못하고 페이지 바탕이 비친다 → 바탕색도 같은 값으로 섞는다(--night-o는 site.js가 <html>에 붙임) */
.motion body { background: color-mix(in srgb, var(--night) calc(var(--night-o, 0) * 100%), var(--oat)); }
/* 아이폰 사파리는 아래 주소창 뒤를 고정된 바탕 그림(.paper-bg)의 색으로 칠한다 → 밤에는 종이 결 바탕도 함께 걷어 낸다 */
.motion .paper-bg { opacity: calc(1 - var(--night-o, 0)); }
.motion .night { background: transparent; }

/* ── 하루 시간 단추(레퍼런스의 유리 알약): 첫 화면을 지나면 아래에 떠오른다 ── */
.timebar { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 25; display: flex; gap: 2px; padding: 5px;
  border-radius: 999px; background: rgba(246, 238, 228, .62); border: 1px solid rgba(59, 42, 32, .1);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 12px 34px rgba(59, 42, 32, .14);
  font-family: var(--latin); font-size: 14px; letter-spacing: .06em; font-variant-numeric: tabular-nums;
  translate: -50% 16px; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), translate .6s var(--ease), visibility .6s, background .6s, border-color .6s; }
.timebar.show { translate: -50% 0; opacity: 1; visibility: visible; }
.timebar a { padding: 6px 13px; border-radius: 999px; color: var(--ink-dim); text-decoration: none; transition: background .45s var(--ease), color .45s var(--ease); }
.timebar a:hover { color: var(--ink); }
.timebar a[aria-current] { background: var(--ink); color: var(--card); }
.timebar.dark { background: rgba(14, 21, 48, .55); border-color: rgba(237, 227, 204, .14); }
.timebar.dark a { color: #B9AE9C; }
.timebar.dark a:hover { color: var(--night-ink); }
.timebar.dark a[aria-current] { background: var(--night-ink); color: var(--night); }

/* ── 글자가 흐림에서 선명으로(레퍼런스 제목 효과). site.js가 글자마다 .ch로 감싸고 --i(순번)를 붙인다 ── */
.motion [data-reveal] .ch { opacity: 0; filter: blur(9px); transition: opacity .9s var(--ease-out), filter 1.2s var(--ease-out);
  transition-delay: calc(min(var(--i), 48) * 26ms); }
.motion [data-reveal].in .ch { opacity: 1; filter: blur(0); }
/* 첫 화면 종이: 만년필로 쓰듯 한 글자씩(손글씨 글자 .c는 site.js가 만든다) */
.motion [data-ink] .c { opacity: 0; filter: blur(2.5px); transition: opacity .55s ease-out, filter .8s ease-out;
  transition-delay: calc(700ms + var(--i) * 80ms); }
.motion [data-ink].in .c { opacity: 1; filter: blur(0); }

/* ── 화면에 들어올 때 떠오르기 ── */
.motion [data-enter] { opacity: 0; translate: 0 28px; transition: opacity 1s var(--ease-out), translate 1.3s var(--ease-out); }
.motion [data-enter].in { opacity: 1; translate: 0 0; }
/* 휴대폰 화면·표지·세 가지 글은 하나씩 차례로 */
.motion :is(.phones, .covers, .pillars)[data-enter] { opacity: 1; translate: none; }
.motion :is(.phones, .covers, .pillars)[data-enter] > * { opacity: 0; translate: 0 36px; transition: opacity 1s var(--ease-out), translate 1.3s var(--ease-out), rotate 1.3s var(--ease-out); }
.motion .phones[data-enter] > * { rotate: -1.2deg; }
.motion :is(.phones, .covers, .pillars)[data-enter].in > * { opacity: 1; translate: 0 0; rotate: 0deg; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(2) { transition-delay: .12s; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(3) { transition-delay: .24s; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(4) { transition-delay: .36s; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(5) { transition-delay: .48s; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(6) { transition-delay: .6s; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(7) { transition-delay: .72s; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(8) { transition-delay: .84s; }
.motion :is(.phones, .covers, .pillars)[data-enter] > :nth-child(9) { transition-delay: .96s; }
/* 도장 문양: 선이 그려지고(레퍼런스 조명 그림 효과) 둘레 글자가 뒤따라 나타난다 */
.motion .emblem :is(circle, rect, path) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease); }
.motion .emblem text { opacity: 0; transition: opacity 1.2s var(--ease) 1s; }
.motion .pillars.in .emblem :is(circle, rect, path) { stroke-dashoffset: 0; }
.motion .pillars.in .emblem text { opacity: 1; }

@media (max-width: 700px) and (orientation: portrait) {
  .timebar { font-size: 12px; letter-spacing: .02em; }
  .timebar a { padding: 5px 8px; }
  /* 휴대폰 장면 틀: 한 묶음 안의 그림이 세로판·가로판 섞여도 모두 같은 틀(화면 폭 × 남는 높이)에 꽉 차게.
     모양이 다르면 겹칠 때 넓은 그림이 비어져 나오고 긴 그림이 아래로 빠진다(2026-10-22 아이폰에서 확인).
     위 = 따라오는 메뉴 띠(61px) + 아이폰 상태 표시줄(safe-area). 아래는 화면 끝까지 그림으로 채운다 —
     높이를 100lvh(주소창이 접혔을 때의 큰 화면)로 잡아야 주소창이 접혀도 그림 아래에 빈 띠가 생기지 않는다.
     (100dvh는 스크롤 중 주소창이 접힐 때마다 높이가 바뀌어 그림이 출렁이므로 쓰지 않는다) */
  .motion .seq { height: calc(100lvh + (var(--n, 1) - 1 + var(--hold, 0)) * 85svh); }
  .motion .seq-stick { height: 100lvh; padding: calc(61px + env(safe-area-inset-top, 0px) + 6px) 0 calc(max(18px, env(safe-area-inset-bottom, 0px)) + 64px + (100lvh - 100svh));
    grid-template: 1fr / 1fr; align-items: center; justify-items: stretch; }
  /* 첫 장면: 맨 위에서는 그림이 로고 밑 경계선 바로 아래부터 채우고(메뉴 줄 '소개·사용법·자주 묻는 질문'은 그림 위에 얹힘),
     스크롤하면 그림이 메뉴 띠 뒤로 흘러 들어가 화면 맨 위(띠 뒤)부터 시간 단추 위까지 꽉 채운 채 붙잡힌다.
     띠 자리를 비워 두면 맨 위에서 큰 빈 여백이, 띠 바로 밑에 붙이면 띠와 그림이 맞닿는 이음매가 생겼다(2026-10-23 사용자 지적).
     높이를 채우느라 세로 그림의 좌우가 조금 잘린다 — 손글씨·설명 글 자리는 site.js drawn()이 잘린 만큼 맞춘다 */
  .topbar { position: relative; z-index: 3; }
  .motion .hero { padding-top: 0; margin-top: -44px; }   /* 44 = 메뉴 줄 높이(경계선 1 + 위 여백 8 + 글줄 35) */
  .motion .hero .seq-stick { --fill-h: calc(100svh - max(18px, env(safe-area-inset-bottom, 0px)) - 64px);
    top: 0; height: var(--fill-h); padding: 0; align-items: start; }
  .motion .hero .seq .plate { aspect-ratio: auto; height: var(--fill-h); max-height: none; }
  .motion .hero .hero-copy { padding-top: calc(61px + env(safe-area-inset-top, 0px) + 14px); }   /* 붙잡혔을 때 띠 아래에서 글 시작 */
  .motion .seq .frame { position: relative; }
  /* 틀 모양 = 세로판과 같은 2:3(세로판 그림은 잘리지 않고, 가로 그림만 --focus 중심으로 잘린다). 화면이 짧으면 높이에 맞춰 조금 잘린다.
     높이 상한 = 주소창이 펼쳐진 화면(svh)에서 메뉴 띠·시간 버튼을 뺀 자리 */
  .motion .seq .plate { width: 100%; height: auto; aspect-ratio: 2 / 3;
    max-height: calc(100svh - 61px - env(safe-area-inset-top, 0px) - 6px - max(18px, env(safe-area-inset-bottom, 0px)) - 64px); }
  /* 설명 글은 그림 안, 종이(주인공) 아래 나무 여백의 가운데에 얹는다 — 자리(top)는 site.js가 figure의 data-note-y로 정한다.
     바탕 띠·윤곽 없이, 글자마다 그 뒤 배경 밝기에 맞는 색을 site.js가 칠한다(.ch 하나하나의 color) */
  .motion .seq :is(.caption, .frame-note) { position: absolute; left: 0; right: 0; width: auto; max-width: none; margin: 0; padding: 0 20px;
    transform: translateY(-50%); text-shadow: none; background: none; }
  .motion .seq .frame-note { font-size: 17px; line-height: 1.6; }
  /* 배경이 밝고 결이 많은 장면만(figure의 data-note-band) 글 뒤에 옅은 오트밀 띠 — 진하기 .32는 site.js BAND_A와 같게 */
  .motion .seq [data-note-band] > :is(.caption, .frame-note) { padding-block: 22px;
    background: linear-gradient(180deg, rgba(239,227,214,0), rgba(239,227,214,.32) 30%, rgba(239,227,214,.32) 70%, rgba(239,227,214,0)); }
  /* 시각 표시(07:00 · 책상)는 숫자·글자를 한 색으로(영문 숫자 서체도 같은 색을 물려받게) */
  .motion .seq .caption * { color: inherit; }
  .motion .seq .caption { font-size: 14px; }
  .motion .seq .frame:has(.frame-note) .caption { display: none; }   /* 한 장에 둘 다 있으면 설명 글만(같은 자리에 겹치지 않게) */
  .motion .seq .toast { top: 16px; bottom: auto; }   /* 그림 아래쪽은 설명 글 자리라 앱 안내 쪽지는 위로 */
}
/* 높이가 낮은 가로 화면(휴대폰 가로): 넓은 화면 규칙은 그림 아래 글 자리(--txt)를 먼저 떼어 그림이 엄지손톱만 해진다(10-22 아이폰 가로에서 확인).
   → 그림은 메뉴 띠와 시간 버튼 사이 높이를 다 쓰고, 설명 글은 그림 오른쪽 빈자리에 나란히(가로 화면은 옆이 넓다) */
@media (orientation: landscape) and (max-height: 560px) {
  /* 높이 기준 = 100lvh(주소창이 접힌 큰 화면) — 세로 화면과 같은 방식. 100svh로 잡으면 가로에서는 주소창 자리(약 100pt)만큼
     그림이 늘 작아진다(2026-10-22 아이폰 가로에서 그림 폭이 화면의 30%). 주소창이 펼쳐진 동안엔 그림 아래가 잠깐 가릴 수 있다 */
  :root { --plate-w: min(100vw - 340px, calc((100lvh - 61px - 50px - 10px) * 1.5)); }
  .motion .seq { height: calc(100lvh + (var(--n, 1) - 1 + var(--hold, 0)) * 85svh); }
  .timebar { font-size: 11px; letter-spacing: .02em; bottom: 6px; }
  .timebar a { padding: 4px 9px; }
  .motion .seq-stick { height: 100lvh; padding: calc(61px + 5px) 0 50px; align-items: center; }
  .motion .seq .frame { display: grid; grid-template-columns: var(--plate-w) minmax(0, 250px); column-gap: 28px; justify-content: center; align-items: center; }
  .motion .seq .plate { width: var(--plate-w); margin: 0; grid-column: 1; grid-row: 1 / span 2; }
  .motion .seq :is(.caption, .frame-note) { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: auto; max-width: none; margin: 0; padding: 0; }
  .motion .seq .frame-note { font-size: 15px; line-height: 1.6; color: var(--ink); }
  .motion .night .seq .frame-note { color: var(--night-ink); }
  .motion .seq .frame:has(.frame-note) .caption { display: none; }
  .phone { width: 160px; }   /* 앱 화면 틀은 지나가며 보는 크기로 */
  /* 설명 글이 없는 묶음(첫 화면·독후감·일기·마무리)은 그림만 가운데 한 칸으로 — 묶음 안 그림들은 겹치며 바뀌므로
     모두 같은 배치여야 자리가 맞는다. 짧은 시각 표시(07:00 · 책상 등)는 이 화면에서는 숨긴다 */
  .motion .seq:not(:has(.frame-note)) .frame { grid-template-columns: var(--plate-w); }
  .motion .seq:not(:has(.frame-note)) .caption { display: none; }
  /* 첫 화면 글: 작아진 그림 안에 들어가게 */
  .hero-copy { width: 50%; left: 5%; }
  .hero .meaning .word { font-size: 20px; }
  .hero .meaning { font-size: 12px; }
  .hero .line { margin-block: 10px; }
  .hero .lead { font-size: 13px; line-height: 1.6; }
  .hero .stores { margin-top: 12px; gap: 6px; }
  .hero .store { padding: 6px 11px; font-size: 11px; }
  .hero .store svg { width: 13px; height: 13px; }
  .statement-text { font-size: 4.6cqw; }
  .statement-sub { font-size: 3.1cqw; }
  .statement-end { bottom: 3%; line-height: 1.7; }   /* 짧은 화면에서도 펜촉 끝보다 아래에서 시작 */
}
@media (prefers-reduced-motion: reduce) {
  .timebar, .timebar a { transition: none; }
}
/* 화면에는 안 보이고 화면 읽기 프로그램만 읽는 글(글자를 나눠 움직일 때 원래 문장을 들려주기 위해) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
