/* 분위기 기준: ../ollama_design.md (흰 바탕, 검정 알약, 헤어라인, 그림자·그라디언트 없음) */
:root {
  --bg: #fff; --fg: #000; --body: #737373; --charcoal: #525252; --mute: #a3a3a3;
  --soft: #fafafa; --hair: #e5e5e5; --hair2: #d4d4d4; --dark: #171717;
  --pill-bg: #000; --pill-fg: #fff;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --section: 88px;
}
/* 하루 이야기의 밤 장면: 홈에서 단 한 번 쓰는 반전 면 */
html[data-night="1"] {
  --bg: #171717; --fg: #fff; --body: rgba(255,255,255,.7); --charcoal: rgba(255,255,255,.78);
  --mute: rgba(255,255,255,.45); --soft: #222; --hair: #333; --hair2: #444;
  --pill-bg: #fff; --pill-fg: #000;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: light; transition: background-color .5s; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--sans); transition: background-color .5s, color .5s; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 500; letter-spacing: 0; word-break: keep-all; }
.lead, .sub, .card p { word-break: keep-all; }
p { margin: 0; }
.wrap { width: min(1080px, 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--bg); padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 2px solid rgba(59,130,246,.6); outline-offset: 3px; }

/* 상단 바 */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 56px; background: var(--bg); border-bottom: 1px solid var(--hair); transition: background-color .5s, border-color .5s; }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font: 600 15px var(--mono); text-decoration: none; }
.brand i { font-style: normal; color: var(--mute); }
.nav nav { display: flex; gap: 24px; font-size: 14px; font-weight: 500; }
.nav nav a { text-decoration: none; color: var(--fg); }
.nav nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }

/* 알약 버튼 */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 20px; border-radius: 9999px; font: 500 14px/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.pill.primary { background: var(--pill-bg); color: var(--pill-fg); }
.pill.primary:active { background: #090909; }
.pill.ghost { border-color: var(--hair2); background: transparent; color: var(--fg); }
.pill.big { height: 44px; padding: 0 26px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 9999px; background: var(--soft); border: 1px solid var(--hair); font: 400 13px var(--mono); color: var(--charcoal); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .08em; color: var(--body); text-transform: uppercase; }

/* ───────── 홈: 하루 이야기 ───────── */
.day { position: relative; }
.stage { position: relative; min-height: 100svh; }
.scene { padding: 104px 0 168px; }
.scene .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.scene h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.1; }
.scene h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; }
.scene-copy > * + * { margin-top: 20px; }
.scene .lead { color: var(--body); font-size: 18px; line-height: 1.6; }
.scene .more { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }
.scene-time { font: 500 13px var(--mono); color: var(--body); letter-spacing: .04em; }

/* 앱 화면 창(헤어라인 카드) */
.window { border: 1px solid var(--hair); border-radius: 12px; background: var(--bg); overflow: hidden; }
.window .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--hair); }
.window .bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f56; }
.window .bar i:nth-child(2) { background: #ffbd2e; }
.window .bar i:nth-child(3) { background: #27c93f; }
.window .bar span { margin-left: 8px; font: 400 12px var(--mono); color: var(--mute); }
.window img { width: 100%; height: auto; }
.shots { position: relative; }
.shots img + img { position: absolute; inset: 0; opacity: 0; }
.shots.late img + img { opacity: 1; }
/* 장면이 열리면 왼쪽부터 드러난다. 스크립트가 없으면 처음부터 보인다. */
.js .scene .rev, .flow .scene .rev { clip-path: inset(0 100% 0 0); }
/* 좁은 화면은 여러 장면이 함께 보이므로 한 번 열린 장면(.seen)은 다시 가리지 않는다. */
.js .scene.is-active .rev, .flow .scene.seen .rev { clip-path: inset(0 0 0 0); transition: clip-path .9s cubic-bezier(.23, 1, .32, 1) .2s; }
.layerbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--hair); font: 400 12px var(--mono); color: var(--body); }
.layerbar .tr { flex: 1; height: 2px; background: var(--hair2); position: relative; }
.layerbar .tr b { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--layer, 0) * 100%); background: var(--fg); }

/* 빈 시간, 밤 장면 */
.slot { border: 1px dashed var(--hair2); border-radius: 12px; padding: 40px 32px; display: grid; gap: 16px; min-height: 280px; align-content: center; }
.slot strong { font: 500 22px var(--display); }
.slot span { color: var(--body); }
.night-grid { display: grid; gap: 12px; }
.night-grid article { border: 1px solid var(--hair); border-radius: 12px; padding: 20px 22px; background: var(--soft); }
.night-grid h3 { font-size: 18px; margin-bottom: 6px; }
.night-grid p { color: var(--body); font-size: 14px; line-height: 1.55; }
.runway { border-bottom: 1px solid var(--hair2); height: 76px; position: relative; overflow: hidden; margin-bottom: 8px; }
.runner { position: absolute; bottom: 2px; left: 0; width: 112px; height: 72px; background: url("assets/seal-strip.png") 0 0 / 3584px 72px no-repeat; animation: run 1s steps(32) infinite, cross 9s linear infinite; filter: invert(var(--inv, 0)); }
html[data-night="1"] .runner { --inv: 1; }
@keyframes run { to { background-position-x: -3584px; } }
@keyframes cross { from { left: -112px; } to { left: 100%; } }

/* 시간 막대 (조작 장치) */
.dock { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; padding: 14px 0 22px; background: var(--bg); border-top: 1px solid var(--hair); transition: background-color .5s, border-color .5s; }
.dock[hidden] { display: none; }
.dock .wrap { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: end; }
.clock { font: 500 44px/1 var(--mono); letter-spacing: -.02em; min-width: 5.4ch; }
.clock small { display: block; font: 400 12px var(--mono); color: var(--body); letter-spacing: .04em; margin-bottom: 8px; }
.scrub { position: relative; height: 56px; }
.scrub .track { position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: var(--hair2); }
.scrub .fill { position: absolute; left: 0; top: 30px; height: 2px; width: calc(var(--pct, 0) * 1%); background: var(--fg); }
.scrub .ticks { position: absolute; left: 0; right: 0; top: 40px; display: flex; justify-content: space-between; font: 400 11px var(--mono); color: var(--mute); }
.scrub .ticks span { width: 0; text-align: center; white-space: nowrap; }
.scrub .mark { position: absolute; top: 4px; left: calc(var(--at) * 1%); transform: translateX(-50%); font: 500 12px var(--mono); white-space: nowrap; color: var(--body); }
.scrub .mark::after { content: ""; display: block; margin: 6px auto 0; width: 1px; height: 14px; background: var(--hair2); }
.scrub .mark.is-on { color: var(--fg); }
.scrub .mark.is-on::after { background: var(--fg); }
.scrub .mark.dashed { color: var(--mute); }
.scrub input { position: absolute; left: -10px; width: calc(100% + 20px); top: 20px; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: grab; }
.scrub input:active { cursor: grabbing; }
.scrub input::-webkit-slider-runnable-track { height: 22px; background: transparent; }
.scrub input::-moz-range-track { height: 22px; background: transparent; }
.scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--fg); border: 3px solid var(--bg); outline: 1px solid var(--fg); }
.scrub input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--fg); border: 3px solid var(--bg); outline: 1px solid var(--fg); }

/* JS가 있을 때만: 긴 스크롤 + 고정 무대 */
.js .day { height: 620svh; }
.js .stage { position: sticky; top: 0; height: 100svh; min-height: 0; overflow: hidden; }
.js .scene { position: absolute; inset: 0; display: flex; align-items: center; padding: 72px 0 148px; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .45s, transform .45s, visibility 0s .45s; }
.js .scene > .wrap { width: min(1080px, 100% - 48px); }
.js .scene.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s, transform .45s; }
.js .stage .scene h1, .js .stage .scene h2 { will-change: auto; }

/* ───────── 앱 카드 구간, 앱 상세 공통 ───────── */
.section { padding: var(--section) 0; }
.section h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.2; }
.section .sub { color: var(--body); margin-top: 12px; max-width: 56ch; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.card { border: 1px solid var(--hair); border-radius: 12px; padding: 28px; display: grid; gap: 14px; align-content: start; background: var(--bg); }
.card h3 { font-size: 22px; }
.card p { color: var(--body); font-size: 15px; }
.card.dash { border-style: dashed; border-color: var(--hair2); }
.card .meta { margin-top: 6px; }
.cat { font: 500 12px var(--mono); color: var(--body); letter-spacing: .06em; }
.foot { border-top: 1px solid var(--hair); padding: 32px 0 40px; font-size: 12px; color: var(--body); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot a { text-decoration: none; }

.page { padding-top: 56px; }
.hero { padding: 72px 0 var(--section); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; margin-top: 14px; }
.hero .lead { color: var(--body); font-size: 18px; margin-top: 20px; max-width: 34ch; line-height: 1.6; }
.hero .chips { margin-top: 24px; }
.dl { margin-top: 32px; display: grid; gap: 14px; justify-items: start; }
.dl-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dl-meta { font: 400 12px var(--mono); color: var(--body); overflow-wrap: anywhere; }
.note { border-left: 2px solid var(--hair2); padding: 2px 0 2px 16px; color: var(--body); font-size: 14px; max-width: 60ch; }
.note b { color: var(--fg); font-weight: 600; }
.runner-s { display: inline-block; vertical-align: middle; width: 56px; height: 36px; background: url("assets/seal-strip.png") 0 0 / 1792px 36px no-repeat; animation: run-s 1s steps(32) infinite; }
@keyframes run-s { to { background-position-x: -1792px; } }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.features h3 { font-size: 18px; }
.features p { margin-top: 8px; }
.shots-2 { margin-top: 40px; max-width: 880px; }
.caption { font: 400 12px var(--mono); color: var(--mute); margin-top: 12px; }
.term { border: 1px solid var(--hair); border-radius: 12px; background: var(--bg); margin-top: 32px; max-width: 720px; }
.term .bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--hair); }
.term .bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f56; }
.term .bar i:nth-child(2) { background: #ffbd2e; }
.term .bar i:nth-child(3) { background: #27c93f; }
.term ol { margin: 0; padding: 20px 24px 20px 44px; display: grid; gap: 10px; font: 400 14px/1.6 var(--mono); }
.term li::marker { color: var(--mute); }
.term code, .code { background: var(--soft); border: 1px solid var(--hair); border-radius: 6px; padding: 1px 7px; font: 400 13px var(--mono); }
.facts { margin-top: 32px; max-width: 720px; border-top: 1px solid var(--hair); }
.facts div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.facts dt { color: var(--body); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  :root { --section: 64px; }
  .scene .wrap, .hero { grid-template-columns: 1fr; gap: 28px; }
  .cards, .features { grid-template-columns: 1fr; }
  .js .scene { align-items: flex-start; padding-top: 80px; }
  .js .scene .chips, .js .scene .caption { display: none; }
  .scrub .mark { font-size: 0; }
  .scrub .mark::after { height: 12px; }
  .scene .lead { font-size: 16px; }
  .dock .wrap { grid-template-columns: 1fr; gap: 6px; }
  .clock { font-size: 30px; }
  .clock small { display: inline; margin-right: 10px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .scene, .js .scene.is-active { transition: none; transform: none; }
  .runner, .runner-s { animation: none; }
  html, body, .nav, .dock { transition: none; }
}
.fig { margin: 0; }
.cmd { margin: 16px 0 0; max-width: 720px; padding: 14px 18px; border: 1px solid var(--hair); border-radius: 12px; background: var(--soft); overflow-x: auto; font: 400 13px/1.6 var(--mono); }
.cmd { white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd + .caption { max-width: 720px; line-height: 1.7; }
.nav nav a.lang { border: 1px solid var(--hair2); border-radius: 9999px; padding: 2px 10px; font: 500 12px var(--mono); }

/* ───────── 연출 (모두 기계적인 움직임만. 모션 줄이기 설정에서는 끈다) ───────── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes typein { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes nudge { 50% { transform: translateX(7px); } }
.js .scene.is-active .scene-copy > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.js .scene.is-active .scene-copy > :nth-child(2) { animation-delay: .06s; }
.js .scene.is-active .scene-copy > :nth-child(3) { animation-delay: .12s; }
.js .scene.is-active .scene-copy > :nth-child(4) { animation-delay: .18s; }
.js .scene.is-active .scene-copy > :nth-child(5) { animation-delay: .24s; }
.js .scene.is-active .scene-visual { animation: rise .6s .14s cubic-bezier(.2, .7, .2, 1) both; }

/* 첫 화면 */
.scene-intro .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.scene-intro h1 { font-size: clamp(34px, 4.8vw, 60px); line-height: 1.04; letter-spacing: -.02em; }
.logcard { border: 1px solid var(--hair); border-radius: 12px; background: var(--bg); font-family: var(--mono); overflow: hidden; }
.logcard .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--hair); }
.logcard .bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f56; }
.logcard .bar i:nth-child(2) { background: #ffbd2e; }
.logcard .bar i:nth-child(3) { background: #27c93f; }
.logcard .bar span { margin-left: 8px; font-size: 12px; color: var(--mute); }
.logcard .cmd-line { padding: 18px 20px 6px; font-size: 14px; }
.logcard .cmd-line em { font-style: normal; color: var(--mute); margin-right: 8px; }
.logcard ol { list-style: none; margin: 0; padding: 8px 20px 20px; display: grid; gap: 4px; }
.logcard li { display: grid; grid-template-columns: 52px 112px 1fr; gap: 12px; font-size: 13px; line-height: 1.8; color: var(--mute); transition: color .25s; animation: typein .6s steps(28) both; }
.logcard li b { font-weight: 500; }
.logcard li.on { color: var(--fg); }
.logcard li:nth-child(1) { animation-delay: .5s; } .logcard li:nth-child(2) { animation-delay: .9s; }
.logcard li:nth-child(3) { animation-delay: 1.3s; } .logcard li:nth-child(4) { animation-delay: 1.7s; }
.logcard li:nth-child(5) { animation-delay: 2.1s; } .logcard li:nth-child(6) { animation-delay: 2.5s; }
.logcard ol::after { content: "▍"; color: var(--mute); animation: blink 1s steps(2) infinite; margin-top: 4px; }

/* 시간 막대 초대: 처음 움직이기 전까지만 보인다 */
.hint { position: absolute; left: 0; top: 8px; font: 400 12px var(--mono); color: var(--body); white-space: nowrap; pointer-events: none; animation: nudge 1.6s ease-in-out infinite; transition: opacity .3s; }
.dock.touched .hint { opacity: 0; animation: none; }

/* 버튼·카드 반응 */
.pill { transition: background-color .15s, border-color .15s, transform .15s; }
.pill:active { transform: translateY(1px); }
.card { transition: border-color .2s; }

/* 스크롤 등장 (reveal.js가 켠다) */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal-on [data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 860px) { .scene-intro .wrap { grid-template-columns: 1fr; } .logcard li { grid-template-columns: 48px 96px 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .js .scene.is-active .scene-copy > *, .js .scene.is-active .scene-visual, .logcard li, .logcard ol::after, .hint { animation: none; }
  .reveal-on [data-reveal] { opacity: 1; transform: none; transition: none; }
}

.badge { display: inline-block; margin-top: 4px; opacity: .85; }
.badge img { height: 34px; width: auto; }

/* FAQ · 개인정보 · 크레딧 */
.faq-group { margin-top: 28px; }
.faq-group h3 { font-size: 15px; font-weight: 500; color: var(--body); margin: 0 0 8px; }
.faq-group details { border-top: 1px solid var(--hair); padding: 14px 0; }
.faq-group details:last-child { border-bottom: 1px solid var(--hair); }
.faq-group summary { cursor: pointer; font-weight: 500; list-style: none; }
.faq-group summary::-webkit-details-marker { display: none; }
.faq-group summary::after { content: "+"; float: right; font-family: ui-monospace, monospace; }
.faq-group details[open] summary::after { content: "−"; }
.faq-group .answer { margin-top: 10px; max-width: 70ch; }
.faq-group .answer p { margin: 0 0 10px; }
.legal { max-width: 760px; }
.legal h3 { font-size: 16px; font-weight: 500; margin: 24px 0 6px; }
.legal p, .legal li { line-height: 1.7; }

/* ── 홈: 자기소개와 입구 카드 (설계 v3) ── */
.home { padding: calc(56px + var(--section)) 0 var(--section); }
.home-hero { max-width: 760px; }
.headline { font-size: clamp(34px, 5vw, 56px); line-height: 1.12; }
.intro { color: var(--body); font-size: 18px; margin-top: 24px; max-width: 56ch; word-break: keep-all; }
.entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: var(--section); }
.entry { border: 1px solid var(--hair); border-radius: 12px; padding: 28px; display: grid; gap: 14px; align-content: start; text-decoration: none; transition: border-color .2s; }
.entry p { color: var(--body); font-size: 15px; word-break: keep-all; }
a.entry:focus-visible { border-color: var(--fg); }
.entry .thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.entry .thumbs img { width: 100%; height: 120px; object-fit: cover; object-position: top left; border: 1px solid var(--hair); border-radius: 8px; }
.entry.soon { border-style: dashed; border-color: var(--hair2); cursor: default; }
.entry.soon .cat, .entry.soon p { color: var(--mute); }
.nav-soon { color: var(--mute); cursor: default; }
.todo { background: #fff3b0; color: #000; padding: 0 4px; border-radius: 4px; }
@media (max-width: 720px) { .entries { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .nav nav { gap: 16px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 모바일·터치 (mobile-native) ── */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
a, button, summary, input[type="range"] { touch-action: manipulation; }
.pill, .chip, .nav nav a, .nav-soon, .brand, summary { -webkit-user-select: none; user-select: none; }
/* hover는 마우스처럼 정밀한 포인터에서만. 터치는 :active로 누르는 순간 반응한다 */
@media (hover: hover) and (pointer: fine) {
  .nav nav a:hover { text-decoration: underline; }
  .nav nav a.lang:hover { text-decoration: none; background: var(--soft); }
  .pill.primary:hover { background: #262626; }
  html[data-night="1"] .pill.primary:hover { background: #e5e5e5; }
  .pill.ghost:hover { background: var(--soft); border-color: var(--fg); }
  .card:not(.dash):hover { border-color: var(--hair2); }
  a.entry:hover { border-color: var(--fg); }
}
.pill, a.entry { transition: transform .12s cubic-bezier(.2, .7, .2, 1), background-color .12s, border-color .2s; }
.pill:active, a.entry:active { transform: scale(.97); }
.pill.ghost:active { background: var(--soft); }
a.entry:active { border-color: var(--fg); }
/* 노치·홈 인디케이터: 고정 막대의 내용만 안전 영역 밖으로 밀어낸다 */
.nav { height: calc(56px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
.dock { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
.wrap { width: min(1080px, 100% - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); }
.scrub input { touch-action: pan-y; }
/* 고정 nav 아래 본문 시작점도 안전 영역만큼 내린다 */
.page { padding-top: calc(56px + env(safe-area-inset-top, 0px)); }
.home { padding-top: calc(56px + var(--section) + env(safe-area-inset-top, 0px)); }
/* 앱 페이지: 폰에서 들어오면 Mac에서 받으라고 알려 준다 */
.mobile-note { display: none; }
@media (hover: none) and (pointer: coarse) {
  .mobile-note { display: block; margin-top: 4px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 12px; background: var(--soft); font-size: 14px; color: var(--charcoal); word-break: keep-all; }
}

/* 좁은 화면의 하루 이야기: 장면이 흐르고(.flow) 막대는 작게 고정된다 */
.flow .day { padding-bottom: 120px; }
.flow .scene { padding: 56px 0; }
.flow .scene-intro { padding-top: calc(56px + 48px + env(safe-area-inset-top, 0px)); }
.flow .scene + .scene { border-top: 1px solid var(--hair); }
@media (max-width: 860px) {
  .dock { padding-top: 10px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dock .wrap { gap: 2px; }
  .clock { font-size: 22px; }
  .clock small { font-size: 11px; }
}

/* 장면 넘김: 어느 정도 스크롤해야 다음 장면으로 넘어가고, 덜 하면 제자리로 돌아온다. story.js가 있는 /apps/에서만 켜진다. */
html.js, html.flow { scroll-snap-type: y mandatory; }
html.flow { scroll-padding-top: calc(56px + env(safe-area-inset-top, 0px)); }
.snap { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; scroll-snap-align: start; scroll-snap-stop: always; }
.flow .snap { display: none; }
.flow .scene { scroll-snap-align: start; scroll-snap-stop: always; }
.js #apps, .flow #apps { scroll-snap-align: start; }
.js .foot, .flow .foot { scroll-snap-align: end; }
@media (prefers-reduced-motion: reduce) {
  .js .scene.is-active .rev, .flow .scene.seen .rev { transition: none; }
}

/* 앱 소개 페이지(/breeze/, /rhinoslicer/): 섹션을 한 쪽씩 넘긴다. 덜 스크롤하면 제자리로 돌아오고, 화면보다 긴 섹션은 안에서 스크롤된다. */
html:has(main.page) { scroll-snap-type: y mandatory; scroll-padding-top: calc(56px + env(safe-area-inset-top, 0px)); }
.page .hero, .page .section { scroll-snap-align: start; scroll-snap-stop: always; }
.page ~ .foot { scroll-snap-align: end; }
@media (min-width: 861px) {
  /* 넓은 화면은 섹션 하나가 한 화면이 되게 높이를 채우고 내용은 세로 가운데. */
  .page .hero { min-height: calc(100svh - 56px); align-content: center; }
  .page .section { min-height: calc(100svh - 56px); display: flex; flex-direction: column; justify-content: center; }
}
