/* offscreen.kr — 색 · 크기는 앱의 src/theme/tokens.ts 값에서 왔다(tone · entry.first · ui).
   첫 화면은 "화면 전체가 포스터"(2026-12-05 대표님 확정, docs/web-links/홈페이지-새시안-1205.jpg). 글은 라운드123 그림의 글 그대로다.
   라임은 로고의 ° 와 큰 글의 마침표에만 쓴다. */

@font-face {
  font-family: 'Pretendard';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/Pretendard-Regular.subset.woff2') format('woff2');
}
@font-face {
  font-family: 'Pretendard';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/Pretendard-SemiBold.subset.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Bodoni';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/LibreBodoni-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Gowun Batang';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/GowunBatang-Bold.subset.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/IBMPlexMono-Regular.ttf') format('truetype');
}

:root {
  --bg: #0B0B0C;
  --surface: #141417;
  --field: #17171A;
  --chip: #1C1C20;
  --line: #29292F;
  --faint-line: #1F1F23;
  --outline: #3A3A40;
  --text: #F1F1F0;
  --sub: #A5A5B0;
  --dim: #77777F;
  --cream: #F2EDE4;
  --cream-pressed: #D0CCC4;
  --on-cream: #141416;
  --ink: #E9E2D4;
  --lime: #C5FA74;
  --side: 16px; /* 앱의 화면 좌우 여백 */
}

* { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all; /* 한글은 낱말 단위로 줄을 바꾼다(앱과 같다) */
  overflow-wrap: anywhere;
}

main { flex: 1 0 auto; }

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 4px; }

h1, h2, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: max(var(--side), env(safe-area-inset-left));
  padding-right: max(var(--side), env(safe-area-inset-right));
}

/* 머리: 왼쪽 로고 34, 오른쪽 어두운 알약 'Scene 만들기' */
.top { padding-top: env(safe-area-inset-top); }
.top .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; color: var(--text); padding: 8px 0; }
.wm { display: block; height: 23.6px; width: auto; } /* 로고 34일 때 워드마크 그림 높이 */
.pill {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 19px;
  background: var(--chip);
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.pill:hover { background: #26262B; }
.link .pill { display: none; } /* 링크 페이지에는 제 버튼이 있다 */

/* 버튼: 크림 알약 56 (앱의 주 버튼) */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  padding: 0 28px;
  border-radius: 28px;
  background: var(--cream);
  color: var(--on-cream);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #E9E4DB; }
.btn:active { background: var(--cream-pressed); }
.btn-line { background: transparent; color: var(--text); border: 1px solid var(--outline); }
.btn-line:hover, .btn-line:active { background: rgba(255, 255, 255, 0.06); }
.btn[hidden] { display: none; }

.note { margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--dim); text-align: center; }

/* ── 첫 화면 ── */
/* 머리 줄은 늘 위에 있다. 포스터를 지나면 뒤가 어두워진다(home.js가 solid를 붙인다) */
.home .top { position: fixed; z-index: 10; top: 0; left: 0; right: 0; transition: background-color 0.3s; }
.home .top.solid { background: rgba(11, 11, 12, 0.78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.home .pill { background: rgba(28, 28, 32, 0.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background-color 0.2s; }
.home .pill:hover { background: rgba(48, 48, 54, 0.8); }
.home ::selection { background: rgba(242, 237, 228, 0.28); }

/* 1. 화면 전체가 포스터: 사진을 화면 가득, 위에 출연 · 큰 글 · 제목 · 크레딧 · 개봉일 · 버튼. 제자리에 멈춰 있고 아래 내용이 그 위로 올라온다 */
.hero {
  --vh: 100vh;
  position: sticky;
  top: 0;
  height: var(--vh);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
@supports (height: 100svh) { .hero, .credits { --vh: 100svh; } }
.hero-media { position: absolute; inset: 0; z-index: -4; animation: develop 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; will-change: transform; }
.hero-shade { position: absolute; inset: 0; z-index: -3; background: linear-gradient(180deg, rgba(11, 11, 12, 0.66) 0%, rgba(11, 11, 12, 0.2) 24%, rgba(11, 11, 12, 0.1) 44%, rgba(11, 11, 12, 0.7) 74%, #0B0B0C 100%); }
.hero-grain { position: absolute; inset: 0; z-index: -2; background: url('/img/grain.png') 0 0 / 256px 256px; opacity: 0.36; mix-blend-mode: overlay; }
.hero-dark { position: absolute; inset: 0; z-index: -1; background: var(--bg); opacity: 0; }
.cast { display: flex; gap: 28px; margin-top: calc(84px + env(safe-area-inset-top)); padding-left: 0.32em; font-size: 13px; line-height: 18px; letter-spacing: 0.32em; color: var(--ink); opacity: 0.92; animation: rise 0.9s 0.35s both; }
.bill { margin-top: auto; width: 100%; padding: 0 max(var(--side), env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(var(--side), env(safe-area-inset-left)); text-align: center; will-change: transform, opacity; }
.bill h1 { font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; animation: rise 0.9s 0.6s both; }
.dot { color: var(--lime); }

/* 제목 자리가 곧 Scene 이름 칸이다(앱의 "이름을 포스터 위에서"). 글꼴은 앱 표지와 같은 Gowun Batang Bold */
.title-wrap { position: relative; margin-top: 6px; animation: rise 1s 0.8s both; }
.title, .title-mirror { font-family: 'Gowun Batang', 'Noto Serif KR', 'Apple SD Gothic Neo', serif; font-weight: 700; font-size: 62px; line-height: 1.3; letter-spacing: -0.01em; }
.title {
  display: block;
  width: 100%;
  height: 1.3em;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--cream);
  text-align: center;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
  cursor: text;
  -webkit-appearance: none;
  appearance: none;
}
.title::placeholder { color: rgba(233, 226, 212, 0.42); }
.title-mirror { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; pointer-events: none; }
/* 누르기 전에 글 끝에서 깜박이는 막대. 누르면 진짜 커서가 대신한다 */
.caret { position: absolute; left: 50%; top: 50%; width: 3px; height: 56px; border-radius: 1px; background: var(--cream); pointer-events: none; animation: blink 1.1s steps(1) infinite; }
.title-wrap:focus-within .caret { display: none; }
.credit { margin-top: 10px; font-size: 11px; line-height: 16px; color: var(--ink); opacity: 0.8; animation: rise 0.9s 1.15s both; }
.date { margin-top: 4px; padding-left: 0.26em; font-family: 'IBM Plex Mono', 'Pretendard', monospace; font-size: 12px; line-height: 18px; letter-spacing: 0.26em; color: var(--ink); opacity: 0.9; animation: rise 0.9s 1.25s both; }
.bill .btn, .credits .btn { font-size: 18px; transition: background-color 0.2s, transform 0.2s, opacity 0.7s; }
.bill .btn:hover, .credits .btn:hover { background: #fff; }
.bill .btn:active, .credits .btn:active { background: var(--cream-pressed); }
.bill .btn { margin-top: 28px; animation: rise 0.9s 1.45s both; }

/* 포스터 위로 올라오는 나머지 */
.after { position: relative; z-index: 1; background: var(--bg); }

/* 2. 묶음: 가운데 제목(폰 26/34) + 한 줄 + 폰 그림 셋 */
.band { padding-top: 112px; text-align: center; }
.band h2, .credits h2 { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin-top: 10px; padding: 0 var(--side); font-size: 15px; line-height: 22px; color: var(--sub); }

/* 폰 그림 셋: 폰에서는 옆으로 넘긴다(248 폭, 틈 12). 보이기 시작할 때 차례로 켜진다 */
.phones-scroll { margin-top: 44px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scroll-padding-left: 16px; }
.phones-scroll::-webkit-scrollbar { display: none; }
.phones { display: flex; gap: 12px; width: max-content; margin: 0 auto; padding: 0 16px 60px; }
.phone { flex: none; width: 248px; scroll-snap-align: start; container-type: inline-size; opacity: 0.28; transform: translateY(18px); transition: opacity 0.9s, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.phones.on .phone { opacity: 1; transform: none; }
.phones.on .phone:nth-child(2) { transition-delay: 0.16s; }
.phones.on .phone:nth-child(3) { transition-delay: 0.32s; }
.screen {
  position: relative;
  aspect-ratio: 390 / 844;
  border-radius: 15.4cqw;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px #2A2A30, 0 30px 60px rgba(0, 0, 0, 0.6);
}
.screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 상태 표시줄과 홈 막대(390 폭 기준 자리를 폭에 맞춰 줄인다) */
.sb-time, .sb-net { position: absolute; top: 4.1cqw; font-size: 4.1cqw; line-height: 5.4cqw; font-weight: 600; color: #fff; }
.sb-time { left: 8.7cqw; }
.sb-net { right: 15.6cqw; font-size: 3.3cqw; }
.sb-batt { position: absolute; top: 5.1cqw; right: 7.9cqw; width: 6.4cqw; height: 3.2cqw; border-radius: 1cqw; background: #fff; }
.home-bar { position: absolute; left: 50%; bottom: 2.1cqw; width: 34.4cqw; height: 1.3cqw; margin-left: -17.2cqw; border-radius: 1cqw; background: #fff; }
.cap { margin-top: 16px; font-size: 15px; line-height: 22px; font-weight: 600; text-align: center; }

/* 3. 엔딩 크레딧: 화면이 멈춘 채, 내리는 만큼 이름이 하나씩 올라오고 마지막에 버튼이 나온다(home.js가 on을 붙인다) */
.credits { --vh: 100vh; position: relative; height: calc(var(--vh) * 2.3); margin-top: 52px; }
.credits-pin { position: sticky; top: 0; height: var(--vh); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px var(--side) 24px; text-align: center; overflow: hidden; isolation: isolate; }
.credits-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: saturate(0.9); transform: scale(1.1); will-change: transform; }
.credits-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #0B0B0C 0%, rgba(11, 11, 12, 0.78) 22%, rgba(11, 11, 12, 0.72) 70%, #0B0B0C 100%); }
.roll { margin-top: min(56px, 5vh); }
.film { font-family: 'Gowun Batang', 'Noto Serif KR', 'Apple SD Gothic Neo', serif; font-weight: 700; font-size: 22px; line-height: 30px; color: var(--ink); }
.role { margin-top: min(28px, 3vh); padding-left: 0.32em; font-size: 13px; line-height: 18px; letter-spacing: 0.32em; color: var(--sub); }
.roll ul { margin-top: 14px; }
.roll li { font-family: 'Gowun Batang', 'Noto Serif KR', 'Apple SD Gothic Neo', serif; font-weight: 700; font-size: clamp(26px, 4.6vh, 34px); line-height: 1.6; color: var(--ink); transition: opacity 0.7s, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.roll li, .credits .btn { opacity: 0; transform: translateY(22px); }
.roll li.on, .credits .btn.on { opacity: 1; transform: none; }
.credits .btn { margin-top: min(56px, 5vh); }

@keyframes develop { from { opacity: 0; transform: scale(1.12); } 30% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes blink { 50% { opacity: 0; } }

/* 바닥: 옅은 선 + 작은 로고 + 문서 */
.foot { flex: none; padding: 0 0 calc(44px + env(safe-area-inset-bottom)); }
.foot .wrap::before { content: ''; display: block; height: 1px; background: var(--faint-line); }
.foot-row { display: grid; gap: 20px; padding-top: 32px; }
.foot-logo { display: inline-flex; width: max-content; color: var(--text); }
.foot-logo .wm { height: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; line-height: 18px; }
.foot-links a { color: var(--dim); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-owner { margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--dim); }

/* 링크 페이지 (/@아이디 · /invite/코드): 앱의 입력 화면 틀 — 제목 26, 큰 글 34/600 가운데, 아래 크림 알약 */
.open { padding: 56px 0 64px; }
.open-box { max-width: 390px; text-align: center; }
.open-kind { min-height: 18px; font-size: 13px; line-height: 18px; color: var(--sub); }
.open-title { margin-top: 14px; font-size: 34px; line-height: 44px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; word-break: break-all; }
.open-title.words { font-size: 26px; line-height: 34px; font-weight: 600; word-break: keep-all; }
.open-help { margin-top: 14px; min-height: 22px; font-size: 15px; line-height: 22px; color: var(--sub); }
.open-actions { margin-top: 56px; display: grid; gap: 10px; }
.open-actions .note { margin-top: 6px; }

/* 문서 (약관 · 개인정보 처리방침) */
/* 글 폭은 720까지. 좌우 여백(--side)이 넓은 화면에서 커지므로 여백을 뺀 안쪽이 720이 되게 한다 */
.doc-body { max-width: calc(720px + 2 * var(--side)); padding-top: 28px; padding-bottom: 72px; }
.doc-body h1 { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -0.01em; }
.doc-body h2 { margin-top: 40px; font-size: 18px; line-height: 26px; font-weight: 600; }
.doc-body p { margin-top: 12px; color: var(--text); }
.doc-body ul { margin-top: 12px; }
.doc-body ul li { position: relative; padding: 3px 0 3px 16px; }
.doc-body ul li::before { content: '·'; position: absolute; left: 3px; color: var(--dim); }
.doc-body .pending { margin-top: 24px; color: var(--sub); }
.table-scroll { margin-top: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.doc-body table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; line-height: 20px; }
.doc-body th, .doc-body td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc-body th { font-weight: 600; color: var(--sub); background: var(--surface); white-space: nowrap; }
.doc-body tr:last-child td { border-bottom: 0; }


/* 넓은 화면 */
@media (min-width: 600px) {
  :root { --side: 32px; }
  .open-actions .btn { width: 100%; }
  .foot-row { grid-template-columns: 1fr auto; align-items: center; }
}

/* 컴퓨터(1440 폭 기준): 제목은 화면 폭 · 높이에 맞춰 72~168, 좌우 160 */
@media (min-width: 900px) {
  :root { --side: clamp(40px, 11.1vw, 160px); }
  .top .wrap { height: 86px; }
  .pill { height: 40px; border-radius: 20px; }
  .hero { min-height: 600px; }
  .cast { gap: 64px; margin-top: 94px; font-size: 15px; line-height: 22px; }
  .bill { padding-bottom: 56px; }
  .bill h1 { font-size: 34px; line-height: 44px; }
  .title-wrap { margin-top: 0; }
  .title, .title-mirror { font-size: clamp(72px, min(11.6vw, 19vh), 168px); line-height: 1.22; }
  .title { height: 1.22em; }
  .caret { width: 5px; }
  .credit { margin-top: 14px; font-size: 15px; line-height: 22px; }
  .date { margin-top: 6px; font-size: 15px; line-height: 22px; }
  .bill .btn, .credits .btn { display: inline-flex; width: auto; padding: 0 36px; }
  .bill .btn { margin-top: 36px; }
  .band { padding-top: 168px; }
  .band h2, .credits h2 { font-size: 34px; line-height: 44px; }
  .sub { margin-top: 12px; font-size: 18px; line-height: 26px; }
  .phones-scroll { margin-top: 72px; overflow: visible; }
  .phones { width: auto; justify-content: center; gap: 56px; padding: 0; }
  .phone { width: min(288px, calc((100vw - 2 * var(--side) - 112px) / 3)); }
  .cap { margin-top: 24px; font-size: 18px; line-height: 26px; }
  .credits { margin-top: 168px; }
  .roll { margin-top: min(72px, 6vh); }
  .film { font-size: 26px; line-height: 34px; }
  .role { margin-top: min(36px, 3.4vh); font-size: 15px; line-height: 22px; }
  .roll li { font-size: clamp(30px, 6.2vh, 56px); line-height: 1.5; }
  .credits .btn { margin-top: min(72px, 6vh); }
  .foot { padding-bottom: 48px; }
  .foot-row { padding-top: 38px; }
  .foot-logo .wm { height: 14px; }
  .open { padding: 96px 0 120px; }
}

@media (max-width: 359px) {
  .pill { padding: 0 14px; }
  .cast { gap: 20px; }
  .band h2, .credits h2 { font-size: 22px; line-height: 30px; }
  .credit { font-size: 10px; }
  .open-title { font-size: 28px; line-height: 38px; }
}

/* 움직임을 줄이라고 해 둔 기기: 움직이지 않고 처음부터 다 보인다 */
@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; }
  .hero { position: relative; }
  .credits { height: auto; }
  .credits-pin { position: relative; height: auto; padding-top: 120px; padding-bottom: 112px; }
  .phone, .roll li, .credits .btn { opacity: 1; transform: none; }
}
