/* MEMORY PIECE 홈페이지 — 토큰·규칙은 ../../STYLE.md 그대로. 외부 주소 0. */
@font-face { font-family: "Gowun Batang"; src: url("fonts/gowun-batang-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gowun Batang"; src: url("fonts/gowun-batang-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans KR"; src: url("fonts/noto-sans-kr.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --night: #1c1530; --night-2: #251c3d; --page: #efe3c8; --page-ink: #2e2116; --page-muted: #5b4935; --page-gold: #74501a; --leather: #2a1d14; --parch: #f3e8d2; --parch-dim: #c9b896; --gold: #d9b46a; --gold-hi: #f2d58e; --line: rgba(217, 180, 106, .28);
  --serif: "Gowun Batang", "Batang", serif; --sans: "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-hero: clamp(3rem, 1rem + 5vw, 6.2rem); --fs-h2: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); --fs-h3: 1.25rem; --fs-body: 1.0625rem; --fs-small: .875rem;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --ease: cubic-bezier(.22, .8, .24, 1); --t-fast: 180ms; --t-reveal: 700ms; --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--parch); font: 400 var(--fs-body)/1.75 var(--sans); word-break: keep-all; overflow-wrap: anywhere; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 var(--s4); letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); } h3 { font-size: var(--fs-h3); margin-bottom: var(--s2); }
p { margin: 0 0 var(--s4); max-width: 34em; }
a { color: var(--gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--parch); color: var(--leather); padding: var(--s2) var(--s4); border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
.pi { width: 1.1em; height: 1.1em; fill: var(--gold); flex: none; }
/* ~~.kicker(대문자·자간 넓힌 꼬리표)~~ 2026-11-16 frontend-design 재작업 — 구획마다 붙던 꼬리표는 생성 티라 뺐다 */

/* 윗줄 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(18, 13, 22, .82); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 56px; }
.brand { display: flex; align-items: center; min-height: 44px; text-decoration: none; transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.brand img { height: 46px; width: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
body.home .top { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; transition: background-color 400ms var(--ease), border-color 400ms var(--ease); }
body.home .top.solid { background: rgba(18, 13, 22, .86); border-bottom-color: var(--line); backdrop-filter: blur(8px); }
html.js body.home .top:not(.solid) .brand { opacity: 0; transform: translateY(-6px); pointer-events: none; } /* 큰 로고가 보이는 동안은 작은 로고를 숨긴다 */
body.home .top:not(.solid) nav a { color: #fff3d6; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.top nav { display: flex; gap: var(--s1); flex-wrap: wrap; justify-content: flex-end; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); color: var(--parch-dim); text-decoration: none; font-size: var(--fs-small); border-radius: 999px; }
.top nav a:hover { color: var(--parch); }
.top nav .lang { border: 1px solid var(--line); }
@media (max-width: 560px) { .top nav > a { display: none; } } /* ~~.top nav a:not(.lang)~~ — 언어 메뉴(<details>) 안의 링크까지 숨겼다(2026-11-16 4개 언어) */

/* 첫 화면 — 대표 장면 */
.hero { position: relative; }
html.motion .hero { height: 230vh; }
.hero-stick { position: relative; min-height: calc(100vh - 56px); display: flex; flex-direction: column; justify-content: center; padding: var(--s7) 0 var(--s8); overflow: clip; }
html.motion .hero-stick { position: sticky; top: 56px; height: calc(100vh - 56px); padding: var(--s5) 0; }
.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); align-items: center; }
/* ~~.hero h1 글자 제목~~ — 시네마틱 재작업: 이름(h1)은 1막 타이틀의 로고 그림, 2막은 한 줄 소개(h2) */
.hero-h { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); line-height: 1.15; color: var(--parch); margin-bottom: var(--s5); }
.hero h1.logo-h1 { line-height: 0; margin-bottom: var(--s5); } /* 제목 = 게임 로고 그림(제목 글은 대체 텍스트) */
.logo-h1 img { width: min(100%, 470px); height: auto; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .55)); }
.logo-h1 .subtitle { line-height: 1.3; }
.subtitle { display: block; margin-top: var(--s3); font-size: clamp(1.15rem, .9rem + 1vw, 1.6rem); line-height: 1.3; letter-spacing: .01em; color: var(--gold); }
.hero-lead { font-family: var(--serif); font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); color: var(--gold-hi); margin-bottom: var(--s4); }
.hero-text { color: var(--parch-dim); }
.status { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); color: var(--parch); border: 1px solid var(--line); border-radius: 999px; padding: var(--s2) var(--s4); margin-top: var(--s2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(217, 180, 106, .18); }
.hero-art { position: relative; }
.frame { position: relative; padding: clamp(8px, 1.4vw, 16px); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(var(--night-2), var(--night-2)) padding-box; box-shadow: var(--shadow); }
.frame::after { content: ''; position: absolute; inset: 0; border-radius: 14px; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 238, 190, .55) 50%, transparent 62%) no-repeat; background-size: 300% 100%; background-position: calc(100% - var(--flash, 0) * 100%) 0; opacity: calc(var(--flash, 0) * (1 - var(--flash, 0)) * 4); mix-blend-mode: screen; }
.puzzle { width: 100%; height: auto; overflow: visible; border-radius: 6px; }
.pc { transform-box: fill-box; transform-origin: center; transform: translate(calc(var(--dx) * var(--k, 0) * var(--spread, 1) * 1px), calc(var(--dy) * var(--k, 0) * var(--spread, 1) * 1px)) rotate(calc(var(--rot) * var(--k, 0) * var(--rspread, 1) * 1deg)); will-change: transform; }
.seam { fill: none; stroke: rgba(18, 13, 22, .85); stroke-width: 5; opacity: var(--seam, 0); }
.whole { opacity: var(--whole, 1); pointer-events: none; }   /* 다 모인 뒤의 «한 장»(JS 가 없거나 움직임 줄이기면 처음부터 1) */
.hero-phone.mount { position: absolute; right: -4%; bottom: -14%; width: 30%; padding: 6px 6px 6px; opacity: var(--phone, 1); transform: translateY(calc((1 - var(--phone, 1)) * 24px)) rotate(2.5deg); }
.hero-phone .corner { width: 18px; height: 18px; } /* .hero-phone.mount — 꽂이 공통 규칙(.mount, 뒤에 있음)이 absolute 를 덮어 판 아래로 떨어지고 투명한 채 자리를 차지했다(2차 재작업 · 선택자 강도를 올림) */
.cue { position: absolute; left: max(16px, calc((100vw - 1120px) / 2)); bottom: var(--s5); /* ~~가운데 · translateX(-50%)~~ 흩어진 조각이 덮었다(3차 재작업) — 글 칸 아래로 */ margin: 0; font-size: var(--fs-small); color: var(--parch-dim); opacity: var(--cue, 0); white-space: nowrap; }
@media (max-width: 860px) {
  /* 휴대폰: 제목 → 판 → 설명·출시 안내(판 아래 빈 곳을 채움 · 2차 검수) — hero-copy 를 풀어 순서를 다시 정한다 */
  .hero-in { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { display: contents; }
  .hero-h { order: 2; } .hero-art { order: 4; margin: var(--s4) 0 var(--s5); } .hero-text { order: 5; font-size: .95rem; } .status { order: 6; justify-self: start; }
  html.motion .hero-stick { justify-content: flex-start; padding-top: var(--s4); }
  .puzzle { --spread: .32; --rspread: .6; }   /* 휴대폰: 판 안에서만 흩어진다(3차 검수 — .55 면 위 조각이 문구를 덮음) */
  .hero-phone.mount { width: 26%; right: 3%; bottom: -10%; }
  .cue { display: none; } /* 휴대폰: 출시 안내 칸과 겹쳤다(2차 재작업) — 안내 없이도 조각이 흩어진 판이 «내려 보라»를 말한다 */   /* 3차 검수: 34%·-18% 는 아래 설명 글을 가림 */
  .hero-art { margin-bottom: var(--s7) !important; }
  .hero-h { margin-bottom: var(--s2); }
}
@media (max-width: 860px) and (max-height: 700px) { .hero-text { display: none; } }

/* 사진 모서리 꽂이 — 옛 사진첩처럼 인화지(흰 테) 네 귀퉁이를 금빛 삼각 꽂이가 잡는다 · 아래 메모는 앨범에 적은 손글씨 자리 */
.mount { position: relative; margin: 0; padding: 9px 9px 0; background: #fbf6ea; border-radius: 3px; box-shadow: 0 10px 28px rgba(10, 6, 20, .32); }
.mount img { width: 100%; height: auto; border-radius: 1px; }
.mount figcaption { font-family: var(--serif); font-size: .98rem; line-height: 1.35; color: #5b4935; text-align: center; padding: 10px 6px 12px; }
.mount:not(:has(figcaption)) { padding-bottom: 9px; }
.corner { position: absolute; width: 30px; height: 30px; background: linear-gradient(135deg, #e2bf73 0 50%, transparent 50%); filter: drop-shadow(0 1px 1px rgba(40, 25, 5, .35)); pointer-events: none; }
.c-tl { top: -4px; left: -4px; }
.c-tr { top: -4px; right: -4px; transform: rotate(90deg); }
.c-br { bottom: -4px; right: -4px; transform: rotate(180deg); }
.c-bl { bottom: -4px; left: -4px; transform: rotate(270deg); }
.tilt-l { transform: rotate(-2deg); } .tilt-r { transform: rotate(1.6deg); } .back { transform: rotate(1.1deg); }

/* ── 1막: 타이틀 시퀀스 — 게임 타이틀 화면의 겹(배경·에리·꽃 좌우·로고)을 그대로 쌓은 무대.
   들어올 때 한 번 «등장»(html.ts-in) · 내리면 카메라가 밀려 들어가고 꽃이 갈라지며 밤빛으로 저문다(--p) · 마우스를 따라 겹마다 시차(--mx/--my).
   JS 가 없거나 움직임 줄이기면: 움직임 없이 완성된 한 장면(아래 기본값). 바깥 겹(.ts-l-*)은 스크롤·마우스, 안쪽 그림은 등장 — 둘을 나눠 transform 이 부딪히지 않게 했다 */
.ts { position: relative; }
.ts-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #120d16; isolation: isolate; }
html.motion .ts { height: 205vh; }
html.motion .ts-stage { position: sticky; top: 0; }
.ts-layer { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.ts-l-bg { transform-origin: 64% 46%; transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -6px), 0) scale(calc(1.06 + var(--p, 0) * .24)); }
.ts-bg { width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; max-width: none; }
.ts-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.ts-l-eri { transform: translate3d(calc(var(--mx, 0) * 22px - var(--p, 0) * 24vw), calc(var(--my, 0) * 12px + var(--p, 0) * 10vh), 0); opacity: calc(1 - var(--p, 0) * 2.6); } /* 옆으로 빠르게 퇴장(~~제자리에서 흐려짐~~ — 중간에 반투명 유령처럼 남았다) */
.ts-eri { position: absolute; left: max(-3vw, calc(50% - 800px)); bottom: -6%; height: 94%; width: auto; max-width: none; filter: drop-shadow(0 0 40px rgba(255, 196, 120, .25)); }
.ts-l-fl { transform: translate3d(calc(var(--mx, 0) * 38px - var(--p, 0) * 34vw), calc(var(--p, 0) * 12vh), 0) scale(calc(1 + var(--p, 0) * .5)); transform-origin: 0 100%; }
.ts-l-fr { transform: translate3d(calc(var(--mx, 0) * 38px + var(--p, 0) * 34vw), calc(var(--p, 0) * 12vh), 0) scale(calc(1 + var(--p, 0) * .5)); transform-origin: 100% 100%; }
.ts-fl, .ts-fr { position: absolute; bottom: -4%; width: clamp(240px, 32vw, 560px); max-width: none; filter: drop-shadow(0 8px 18px rgba(20, 8, 30, .45)); }
.ts-fl { left: -3%; } .ts-fr { right: -3%; }
.ts-veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(18, 13, 22, .6) 0, rgba(18, 13, 22, 0) 20%, rgba(18, 13, 22, 0) 62%, rgba(28, 21, 48, .78) 100%), radial-gradient(90% 70% at 72% 40%, transparent 40%, rgba(18, 13, 22, .45) 100%); }
.ts-veil::after { content: ''; position: absolute; inset: 0; background: var(--night); opacity: calc(max(0, var(--p, 0) - .34) * 1.6); } /* 내릴수록 밤빛으로 저물어 2막(어두운 판)으로 이어진다 */
/* 중간 자막 — 카메라가 밀려 들어가는 사이 이야기의 첫 문장이 영화 자막처럼 떴다 진다(--say 0→1→0 · JS). 같은 문장이 이야기 구획에 있어 읽기 도구에는 숨긴다 */
.ts-says { position: absolute; left: 50%; top: 46%; width: min(92vw, 900px); margin: 0; max-width: none; text-align: center; font-family: var(--serif); font-size: clamp(1.5rem, .9rem + 2.6vw, 3.1rem); line-height: 1.3; letter-spacing: -.01em; color: #fff6dd; text-shadow: 0 2px 18px rgba(10, 4, 24, .95), 0 0 3px rgba(10, 4, 24, .8); opacity: var(--say, 0); transform: translate(-50%, calc(-50% + (1 - var(--say, 0)) * 18px)); filter: blur(calc((1 - var(--say, 0)) * 5px)); pointer-events: none; padding: .8em 1.2em; background: radial-gradient(closest-side, rgba(18, 13, 22, .5), rgba(18, 13, 22, 0)); }
.ts-l-copy { transform: translate3d(calc(var(--mx, 0) * -12px), calc(var(--p, 0) * -24vh), 0); opacity: calc(1 - var(--p, 0) * 1.9); }
.ts-copy { position: absolute; right: max(16px, calc(50% - 580px)); top: 50%; transform: translateY(-54%); width: min(540px, 46vw); text-align: center; pointer-events: auto; isolation: isolate; }
.ts-copy::before { content: ''; position: absolute; inset: 30% -14% -18%; z-index: -1; background: radial-gradient(closest-side, rgba(18, 13, 22, .8) 30%, rgba(18, 13, 22, 0)); pointer-events: none; } /* 문구 뒤 어둠 — 밝은 물·다리 위에서 «흩어진 세상을…» 이 안 읽혔다 */
.ts-logo { margin: 0 0 var(--s4); line-height: 0; }
.ts-logo .subtitle { line-height: 1.3; color: var(--gold-hi); text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.ts-logo-in { position: relative; display: block; }
.ts-logo img { width: 100%; height: auto; filter: drop-shadow(0 10px 30px rgba(10, 4, 24, .7)); }
.ts-shine { position: absolute; inset: 0; -webkit-mask: url("logo.webp") center / 100% 100% no-repeat; mask: url("logo.webp") center / 100% 100% no-repeat; background: linear-gradient(105deg, transparent 42%, rgba(255, 250, 225, .95) 50%, transparent 58%) no-repeat; background-size: 260% 100%; background-position: 140% 0; mix-blend-mode: screen; opacity: 0; }
html.motion.ts-in .ts-shine { animation: ts-shine 7s cubic-bezier(.45, 0, .2, 1) 2.1s infinite; }
@keyframes ts-shine { 0% { background-position: 140% 0; opacity: 1; } 22% { background-position: -40% 0; opacity: 1; } 23%, 100% { background-position: -40% 0; opacity: 0; } }
.ts-line { font-family: var(--serif); font-size: clamp(1.15rem, .9rem + 1vw, 1.6rem); line-height: 1.4; font-weight: 700; color: #fff6dd; text-shadow: 0 0 10px rgba(10, 4, 24, .9), 0 2px 4px rgba(10, 4, 24, .9); margin: 0 auto var(--s5); max-width: 22em; }
.ts-acts { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; align-items: center; margin: 0 auto; max-width: none; }
.ts-acts .status { margin: 0; background: rgba(18, 13, 22, .62); backdrop-filter: blur(6px); border-color: rgba(242, 213, 142, .45); }
.ts-story { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s5); border-radius: 999px; background: linear-gradient(180deg, #f6dc9a, #c9963f); color: #2a1a0a; font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(201, 150, 63, .35), inset 0 1px 0 rgba(255, 255, 255, .6); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.ts-story:hover { color: #2a1a0a; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(201, 150, 63, .5), inset 0 1px 0 rgba(255, 255, 255, .6); }
.ts-cue { position: absolute; left: 50%; bottom: var(--s5); transform: translateX(-50%); margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s2); font-size: var(--fs-small); color: #fff3d6; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); opacity: calc(1 - var(--p, 0) * 6); pointer-events: none; }
.ts-cue::after { content: ''; width: 1px; height: 38px; background: linear-gradient(#fff3d6, transparent); }
html.motion .ts-cue::after { animation: ts-cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes ts-cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
/* 등장 — 배경이 어둠에서 밝아지며 다가오고 → 꽃 → 에리 → 로고 → 문구 순서(html.ts-in 이 붙기 전이 시작 상태) */
html.motion .ts-bg { transition: opacity 1.4s var(--ease), transform 2.8s var(--ease), filter 2.2s var(--ease); }
html.motion .ts-fl, html.motion .ts-fr { transition: transform 1.3s var(--ease) .5s, opacity 1s var(--ease) .5s; }
html.motion .ts-eri { transition: transform 1.6s var(--ease) .8s, opacity 1.4s var(--ease) .8s; }
html.motion .ts-logo-in { transition: transform 1.3s cubic-bezier(.2, .9, .25, 1.15) 1.25s, opacity 1s var(--ease) 1.25s, filter 1.2s var(--ease) 1.25s; }
html.motion .ts-line { transition: transform 1s var(--ease) 1.8s, opacity 1s var(--ease) 1.8s; }
html.motion .ts-acts { transition: transform 1s var(--ease) 2.05s, opacity 1s var(--ease) 2.05s; }
html.motion .ts-cue span { transition: opacity 1s var(--ease) 2.6s; }
html.motion:not(.ts-in) .ts-bg { opacity: 0; transform: scale(1.14); filter: blur(10px) brightness(.35); }
html.motion:not(.ts-in) .ts-fl { opacity: 0; transform: translate(-12%, 40%); }
html.motion:not(.ts-in) .ts-fr { opacity: 0; transform: translate(12%, 40%); }
html.motion:not(.ts-in) .ts-eri { opacity: 0; transform: translateY(8%); }
html.motion:not(.ts-in) .ts-logo-in { opacity: 0; transform: scale(.82); filter: blur(8px); }
html.motion:not(.ts-in) .ts-line, html.motion:not(.ts-in) .ts-acts { opacity: 0; transform: translateY(18px); }
html.motion:not(.ts-in) .ts-cue span { opacity: 0; }
@media (max-width: 700px) {
  .ts-copy { right: auto; left: 50%; top: calc(56px + 4svh); transform: translateX(-50%); width: min(92vw, 440px); }
  .ts-logo { margin-bottom: var(--s3); }
  .ts-line { margin-bottom: var(--s4); }
  .ts-eri { left: -26%; height: 60%; bottom: -4%; }
  .ts-fl, .ts-fr { width: 58vw; bottom: -3%; }
  .ts-bg { object-position: 50% 50%; }
  .ts-veil { background: linear-gradient(180deg, rgba(18, 13, 22, .78) 0, rgba(18, 13, 22, .35) 46%, rgba(18, 13, 22, 0) 62%, rgba(28, 21, 48, .7) 100%); }
  .ts-cue { display: none; }
}
@media (min-width: 701px) and (max-height: 640px) { .ts-copy { width: min(440px, 40vw); } .ts-line { margin-bottom: var(--s3); } }

/* ── 필름 띠 — 이야기 모드 원화가 스크롤을 따라 가로로 흘러간다(JS 가 띠 길이만큼 구획 높이를 잡는다).
   JS 가 없거나 움직임 줄이기면: 손가락·가로 스크롤로 넘기는 띠(scroll-snap) */
.film { position: relative; background: linear-gradient(180deg, var(--night) 0, #221a38 50%, var(--night) 100%); }
.film-stick { padding: var(--s8) 0; overflow: hidden; }
html.motion .film-stick { position: sticky; top: 56px; height: calc(100vh - 56px); display: flex; flex-direction: column; justify-content: center; padding: var(--s5) 0; }
.film-head { margin-bottom: var(--s6); }
.film-head p { color: var(--parch-dim); }
.film-view { overflow-x: auto; scroll-snap-type: x mandatory; padding: var(--s4) 0 var(--s5); }
html.motion .film-view { overflow: visible; padding: var(--s4) 0; }
.film-track { list-style: none; margin: 0; padding: 0 max(16px, calc((100vw - 1120px) / 2)); display: flex; gap: clamp(20px, 3vw, 44px); width: max-content; }
html.motion .film-track { transform: translate3d(calc(var(--fx, 0) * -1px), 0, 0); will-change: transform; }
.film-card { flex: none; width: min(clamp(220px, 25vw, 330px), 46vh); scroll-snap-align: center; }
.film-card .mount { transition: transform 300ms var(--ease); }
.film-card.f0 .mount { transform: rotate(-1.6deg); } .film-card.f1 .mount { transform: rotate(1.2deg) translateY(26px); } .film-card.f2 .mount { transform: rotate(-.5deg) translateY(-8px); } .film-card.f3 .mount { transform: rotate(1.8deg) translateY(14px); }
.film-card .mount:hover { transform: rotate(0) translateY(-8px) scale(1.03); }
.film-card figcaption b { color: #8a5d1c; margin-right: .3em; }
.film-card figcaption small { display: block; font-family: var(--sans); font-size: .8rem; color: #7a6650; margin-top: 2px; }

/* ── v2(GPT 제안을 옮겨 고침 · 2026-11-16): 장면 이동 레일 · 읽기 진행 막대 · 여섯 월드 탐색 · 원화 크게 보기 · 언어 메뉴
   ~~THE SIX WORLDS 대문자 꼬리표~~ — frontend-design «대문자 꼬리표는 생성 티» 규칙대로 뺐다 */
html { scroll-padding-top: 64px; }
/* 일본어 — 한국어 글꼴의 한자 모양 대신 기기의 일본어 글꼴을 먼저(내려받지 않는다) */
html:lang(ja) { --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif CJK JP", "Gowun Batang", serif; --sans: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", "Noto Sans KR", system-ui, sans-serif; }
/* 루마니아어 — ș ț(쉼표 아래)가 두 글꼴에 없어 본문은 그 글자가 있는 기기 글꼴을 먼저(글자마다 글꼴이 섞이지 않게) · 제목 명조는 그대로 */
html:lang(ro) { --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; --serif: Georgia, "Noto Serif", "Times New Roman", serif; }
html:lang(ja) body, html:lang(ro) body { word-break: normal; }
h1, h2, h3, .ts-line, .ts-says, .world-lede, .film-head p { text-wrap: balance; } /* 줄을 고르게 — 일본어 휴대폰에서 «もう一 / 度。»처럼 한 글자가 다음 줄로 떨어졌다 */

/* 언어 메뉴 — <details>(JS 없이 동작) */
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s3); color: var(--parch-dim); font-size: var(--fs-small); border-radius: 999px; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover { color: var(--parch); }
.langs .globe { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; min-width: 150px; background: rgba(18, 13, 22, .96); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 40; }
.langs li a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s4); color: var(--parch); text-decoration: none; border-radius: 8px; }
.langs li a:hover { background: rgba(217, 180, 106, .12); }
.langs li a[aria-current="page"] { color: var(--gold-hi); font-weight: 700; }
body.home .top:not(.solid) .langs summary { color: #fff3d6; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }

/* 장면 이동 레일 — 넓은 화면 오른쪽 · 이름은 가리키거나 초점을 줄 때 보인다 */
.chapter-rail { position: fixed; z-index: 24; right: clamp(8px, 1.4vw, 26px); top: 50%; transform: translateY(-50%); }
.chapter-rail ol { list-style: none; margin: 0; padding: 10px 6px; display: flex; flex-direction: column; gap: 4px; background: rgba(18, 13, 22, .72); border: 1px solid rgba(222, 184, 111, .25); border-radius: 40px; backdrop-filter: blur(6px); }
.chapter-rail a { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; text-decoration: none; }
.rail-dot { width: 7px; height: 7px; border-radius: 50%; background: #9f8b6a; transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.chapter-rail a[aria-current="location"] .rail-dot, .chapter-rail a:hover .rail-dot { background: var(--gold-hi); transform: scale(1.6); }
.rail-name { position: absolute; right: calc(100% + 10px); white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: rgba(18, 13, 22, .9); color: var(--parch); font-size: .8rem; opacity: 0; transform: translateX(6px); pointer-events: none; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.chapter-rail a:hover .rail-name, .chapter-rail a:focus-visible .rail-name { opacity: 1; transform: none; }
.reading-progress { position: fixed; z-index: 30; left: 0; top: 0; height: 3px; width: 100%; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: linear-gradient(90deg, #b8893d, var(--gold-hi)); transform: scaleX(0); transform-origin: left; }
html:not(.js) .reading-progress { display: none; }
@media (max-width: 980px) { .chapter-rail { display: none; } }

/* 여섯 월드 탐색 — 고르면 그 월드 카드만(JS) · JS 가 없으면 카드 여섯 장이 차례로 보인다 */
section.world-ex { position: relative; overflow: hidden; isolation: isolate; background: #14101c; color: #f5e8ca; }
.world-backdrop { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(15, 11, 23, .94), rgba(23, 15, 36, .82)), url("castle.webp") center / cover; }
.world-ex h2 { color: #fff0d4; }
.world-lede { color: #d8cbb8; margin-bottom: var(--s6); }
.world-picker { display: none; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: var(--s5); }
html.js .world-picker { display: grid; }
.world-option { cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; text-align: left; border: 1px solid rgba(214, 178, 109, .28); border-radius: 12px; background: rgba(16, 12, 24, .76); color: #e4d7be; font: 700 .88rem/1.35 var(--serif); transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.world-option:hover { background: #2c2236; }
.world-option[aria-pressed="true"] { background: #4a3a28; border-color: #e6c17d; color: #fff5dc; }
.world-option-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid currentColor; color: var(--gold); font: 700 .8rem/1 var(--sans); }
.world-cards { display: grid; gap: var(--s5); }
html.js .world-card:not(.is-on) { display: none; }
.world-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 400px; border: 1px solid rgba(216, 177, 103, .36); border-radius: 16px; background: rgba(16, 12, 24, .84); box-shadow: 0 25px 90px rgba(0, 0, 0, .3); overflow: hidden; }
html.motion .world-card.is-on { animation: world-in 520ms var(--ease); }
@keyframes world-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.world-art { position: relative; min-height: 320px; background: linear-gradient(135deg, #3c3046, #1d2038 65%, #4e3622); }
.world-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.world-soon { position: absolute; inset: 0; display: grid; place-items: end start; padding: var(--s5); }
.world-soon svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(242, 213, 142, .5); stroke-width: 2.2; stroke-linejoin: round; }
.world-soon p { position: relative; margin: 0; max-width: 26em; padding: var(--s3) var(--s4); background: rgba(16, 12, 24, .82); border: 1px solid rgba(242, 213, 142, .35); border-radius: 10px; font-size: .9rem; color: #e9dcc2; }
.world-soon b { display: block; color: var(--gold-hi); font-family: var(--serif); font-size: 1.05rem; margin-bottom: 2px; }
.world-copy { align-self: center; padding: clamp(24px, 4vw, 56px); }
.world-num { margin: 0 0 var(--s2); color: var(--gold); font: 700 .9rem/1 var(--sans); }
.world-card h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); color: #f6e4bc; margin-bottom: var(--s5); }
.world-facts { margin: 0; display: grid; gap: var(--s3); }
.world-facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid rgba(216, 177, 103, .2); }
.world-facts dt { color: var(--gold); font-size: .88rem; }
.world-facts dd { margin: 0; color: #e7dac2; }
@media (max-width: 980px) { .world-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .world-picker { grid-template-columns: 1fr 1fr; }
  .world-option { font-size: .8rem; min-height: 50px; padding: 8px 10px; }
  .world-card { grid-template-columns: 1fr; min-height: 0; }
  .world-art { min-height: 0; aspect-ratio: 4 / 3; }
  .world-facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* 원화 크게 보기 */
.gallery-tip { color: var(--parch-dim); font-size: .9rem; margin-top: calc(var(--s2) * -1); }
html:not(.js) .gallery-tip { display: none; }
.film-card figure[role="button"] { cursor: zoom-in; }
.film-card figure:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 5px; }
.gallery-dialog { width: min(920px, 94vw); max-width: 94vw; max-height: 94dvh; padding: 14px 16px 16px; background: #17111f; color: #f5e9d2; border: 1px solid #cda86d; border-radius: 16px; box-shadow: 0 26px 90px rgba(0, 0, 0, .7); }
.gallery-dialog::backdrop { background: rgba(7, 5, 12, .88); backdrop-filter: blur(5px); }
.gallery-dialog form { display: flex; justify-content: flex-end; }
.gallery-dialog figure { margin: 0; display: grid; justify-items: center; gap: 10px; }
.gallery-dialog figure img { max-height: min(70dvh, 760px); max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.gallery-dialog figcaption { font: 700 1rem/1.5 var(--serif); text-align: center; }
.gallery-close, .gallery-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: transparent; color: #f4dbab; border: 1px solid #8e7955; border-radius: 50%; cursor: pointer; }
.gallery-close svg, .gallery-controls svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery-close:hover, .gallery-controls button:hover { background: rgba(217, 180, 106, .14); }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 12px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .world-card.is-on { animation: none; } }

/* 구획 공통 */
section:not(.hero, .ts, .film) { padding: var(--s9) 0; } /* 1막·필름 띠는 고정 무대라 여백을 안쪽에서 잡는다(~~:not(.hero)~~ 만이면 1막 위에 112px 빈 띠가 생겼다) */
@media (max-width: 860px) { section:not(.hero, .ts, .film) { padding: var(--s8) 0; } }
/* ~~[data-reveal] 구획마다 아래에서 떠오름~~ 2026-11-16 — 두 스킬 모두 «흔한 기본값». 움직임은 첫 화면의 직소 하나만 */

/* 양피지 속지 — 앨범을 펼친 면. 글자는 잉크색 · 링크·번호는 짙은 금 */
.page { background: var(--page); color: var(--page-ink); }
.page h2, .page h3 { color: #3a2814; }
.page p, .page .steps p { color: var(--page-muted); }
.page a { color: var(--page-gold); }
.page :focus-visible { outline-color: var(--page-gold); }
section.page-cont { padding-top: 0; }
/* 게임 방식 */
.how-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s8); align-items: center; }
.steps { list-style: none; padding: 0; margin: var(--s6) 0 0; display: grid; gap: var(--s5); }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s4); align-items: start; }
.num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-family: var(--serif); font-size: 1.2rem; }
.page .num { border-color: var(--page-gold); color: var(--page-gold); }
.steps p { color: var(--parch-dim); margin: 0; }
.how-shots { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; }
.how-shots .tilt-r { margin-top: var(--s8); }
@media (max-width: 860px) { .how-in { grid-template-columns: 1fr; } .how-shots { max-width: 520px; } }

/* 자르는 모양 — 엇갈린 높이 */
.cuts-head { max-width: 640px; margin-bottom: var(--s6); }
.cuts-head p { color: var(--page-muted); }
/* 절단선 체험 — 원화 한 장 위에 고른 모양의 절단선. ~~움직임은 단추를 누를 때만~~ 시네마틱 재작업(오너 «액티브하게»):
   화면에 들어오면 모양이 저절로 돌아가며 칼선이 «그려진다»(JS · 누르면 그 모양에서 멈춤). 움직임 줄이기·JS 없음이면 선이 바로 보인다.
   넓은 화면: 그림 왼쪽 · 제목·설명·단추 오른쪽(읽는 순서는 제목 → 단추 → 그림) */
.cutdemo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s7); align-items: center; margin-bottom: var(--s9); }
.cutdemo-side { grid-column: 2; grid-row: 1; }
.cutdemo-art { grid-column: 1; grid-row: 1; transform: rotate(-.8deg); }
.cutdemo-stage { position: relative; }
.cutdemo-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 1.5px rgba(30, 18, 6, .85)); }
.cut-lines { fill: none; stroke: #fff8e6; stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; opacity: 0; transition: opacity 360ms var(--ease); } /* 굵기는 1600 폭 좌표 기준(~~non-scaling-stroke~~ — pathLength 칼선 그리기와 같이 쓰면 대시 계산이 어긋날 수 있어 뺐다) */
.cutdemo-art[data-active="triangle"] .cut-lines[data-cut="triangle"], .cutdemo-art[data-active="jigsaw"] .cut-lines[data-cut="jigsaw"], .cutdemo-art[data-active="hex"] .cut-lines[data-cut="hex"] { opacity: 1; }
html.motion .cut-lines { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: opacity 300ms var(--ease), stroke-dashoffset 0s linear 300ms; }
html.motion .cutdemo-art[data-active="triangle"] .cut-lines[data-cut="triangle"], html.motion .cutdemo-art[data-active="jigsaw"] .cut-lines[data-cut="jigsaw"], html.motion .cutdemo-art[data-active="hex"] .cut-lines[data-cut="hex"] { stroke-dashoffset: 0; transition: opacity 200ms var(--ease), stroke-dashoffset 1.8s cubic-bezier(.5, 0, .2, 1); }
@media (max-width: 860px) { .cut-lines { stroke-width: 7; } }
.cutdemo-btns { display: none; flex-direction: column; align-items: flex-start; gap: var(--s3); }
html.js .cutdemo-btns { display: flex; } /* JS 가 없으면 단추가 아무 일도 못 하므로 숨긴다(그림은 사각 직소 선으로 보인다) */
.cutdemo-btns button { display: inline-flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s5) 0 var(--s4); border: 1px solid var(--page-gold); border-radius: 999px; background: transparent; color: var(--page-ink); font: 700 1rem/1 var(--serif); cursor: pointer; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.cutdemo-btns button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.cutdemo-btns button:hover { background: rgba(116, 80, 26, .1); }
.cutdemo-btns button[aria-pressed="true"] { background: #3a2814; border-color: #3a2814; color: var(--page); }
.cutdemo-btns button[aria-pressed="true"] svg { fill: rgba(239, 227, 200, .25); }
@media (max-width: 860px) {
  .cutdemo { grid-template-columns: 1fr; gap: var(--s5); margin-bottom: var(--s8); }
  .cutdemo-side, .cutdemo-art { grid-column: 1; grid-row: auto; }
  .cutdemo-art { transform: none; }
  .cutdemo-btns { flex-direction: row; flex-wrap: wrap; }
  .cutdemo-btns button { padding: 0 var(--s4) 0 var(--s3); }
}
.cuts-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); align-items: start; max-width: 840px; margin-inline: auto; } /* 체험 그림이 주인공 — 실제 게임 화면 셋은 그 아래 작게(개선 2) */
.cut.c1 { margin-top: var(--s8); } .cut.c2 { margin-top: var(--s5); }
.cut.c0 .mount { transform: rotate(-1.4deg); } .cut.c1 .mount { transform: rotate(1deg); } .cut.c2 .mount { transform: rotate(-.6deg); }
@media (max-width: 860px) {
  .cuts-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s4); margin-inline: -16px; padding-inline: 16px; }
  .cut { scroll-snap-align: center; } .cut.c1, .cut.c2 { margin-top: 0; }
}

/* 이야기 */
.story { background: radial-gradient(120% 80% at 80% 0%, rgba(217, 180, 106, .08), transparent 60%), var(--night); }
.story-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s8); align-items: center; }
.story-shots { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
/* ~~.story-shots .back(화면 캡처 둘)~~ 2026-11-16 개선 2 — 월드 원화 셋(앨범에 꽂은 사진)으로 바꿨다 */
.story-shots .art.a0 { grid-column: 1 / -1; width: 74%; justify-self: center; transform: rotate(-1.2deg); }
.story-shots .art.a1 { transform: rotate(1.5deg); margin-top: calc(var(--s5) * -1); }
.story-shots .art.a2 { transform: rotate(-.7deg); margin-top: var(--s5); }
.story-copy > p { color: var(--parch-dim); }
.worlds { margin-top: var(--s6); border-top: 1px solid var(--line); padding-top: var(--s5); }
.worlds-label { font-family: var(--serif); font-size: 1.05rem; color: var(--gold); margin-bottom: var(--s3); }
.worlds ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: var(--s6); counter-reset: w; }
.worlds li { counter-increment: w; break-inside: avoid; padding: var(--s1) 0; font-family: var(--serif); }
.worlds li::before { content: counter(w); display: inline-block; width: 1.6em; color: var(--gold); font-weight: 700; }
@media (max-width: 860px) { .story-in { grid-template-columns: 1fr; } .story-copy { order: -1; } .story-shots { max-width: 520px; } }
@media (max-width: 420px) { .worlds ol { columns: 1; } }

/* 함께 */
.together-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s8); align-items: center; }

.together .mount { max-width: 340px; justify-self: end; } /* ~~.together .phone~~ — 틀 이름이 .mount 로 바뀐 뒤 이 폭이 안 걸려 사진이 칸 전체로 커지고 기울인 귀퉁이가 768 에서 화면 밖으로 나갔다 */
@media (max-width: 860px) { .together-in { grid-template-columns: 1fr; } .together .mount { justify-self: start; max-width: 300px; } }

/* 사진 약속 — 양피지 카드 */
.parch { background: var(--parch); color: var(--leather); border: 1px solid rgba(217, 180, 106, .4); border-radius: 14px; padding: clamp(24px, 4vw, 56px); box-shadow: var(--shadow); max-width: 860px; }
.parch ul { margin: 0 0 var(--s5); padding-left: 1.2em; display: grid; gap: var(--s3); }
.parch a { color: #6b4a12; }
.more { font-weight: 700; display: inline-flex; min-height: 44px; align-items: center; }
::selection { background: rgba(217, 180, 106, .35); }

/* 출시 */
.release-in { text-align: left; max-width: 760px; }
.release p { color: var(--parch-dim); }
.mail { color: var(--parch) !important; }
.shot-note { font-size: var(--fs-small); margin-top: var(--s6); }

/* 바닥글 */
.foot { border-top: 1px solid var(--line); padding: var(--s7) 0 var(--s6); font-size: var(--fs-small); color: var(--parch-dim); }
.foot-top { display: flex; justify-content: space-between; gap: var(--s6); flex-wrap: wrap; margin-bottom: var(--s5); }
.foot-brand { display: flex; align-items: center; gap: var(--s2); font-family: var(--serif); font-weight: 700; color: var(--parch); margin-bottom: var(--s1); }
.foot-tag { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); align-items: center; }
.foot-links a { min-height: 44px; display: inline-flex; align-items: center; }
.biz, .biz-en { line-height: 1.7; margin: 0 0 var(--s3); max-width: none; }
.copy { margin: var(--s4) 0 0; }

/* 문서 페이지 */
.doc-in { padding: var(--s8) 0 var(--s9); max-width: 820px; }
.doc h1 { font-size: var(--fs-h2); }
.doc h2 { font-size: 1.35rem; margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); }
.doc p, .doc li { color: var(--parch-dim); max-width: none; }
.doc b { color: var(--parch); }
.doc .lead { color: var(--parch); font-size: 1.15rem; }
.doc .note { border-left: 3px solid var(--gold); padding-left: var(--s4); }
.doc ul, .doc ol { padding-left: 1.3em; display: grid; gap: var(--s2); }
.pending { display: inline-block; font-family: var(--sans); font-size: .75rem; font-weight: 700; color: var(--leather); background: var(--gold); border-radius: 999px; padding: 1px 10px; vertical-align: middle; letter-spacing: 0; }
.table { overflow-x: auto; margin: var(--s4) 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
th { color: var(--gold); font-weight: 700; background: var(--night-2); }
td ul { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
