/* 치킨특공대 사이트 — 장면(beat)마다 제목 줄이 가림막에서 솟고, 기기 화면이 기울어 떠오르는 스크롤 이야기.
   글은 모두 서버 HTML 이다(크롤러가 그대로 읽는다). 움직임은 html.js 일 때만 숨겨 두었다가 장면이 화면에 들면(.is-in) 푼다 —
   스크립트가 없거나 움직임 줄이기면 처음부터 다 보인다(html.c-settled). 생성기: tools/build-site.py */

@font-face {
  font-family: "Lilita One";
  src: url("lilita-one.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fff8ea;
  --bg2: #fff1d6;
  --ink: #2c1a0c;
  --muted: #6f5038;
  --accent: #e2572b;
  --corn: #f4b400;
  --leaf: #4f9a2c;
  --card: #ffffff;
  --line: #efdcbf;
  --shadow: 0 34px 70px -28px rgba(92, 46, 10, 0.42);
  --bezel: #22160d;
  --ease: cubic-bezier(0.2, 0.75, 0.15, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --display: var(--sans);
}
/* 언어마다 글꼴 줄 — 한 줄에 섞으면 앞선 글꼴이 남의 글자를 그린다(일본어의 한자를 한국어 글꼴이 그렸다). */
html[lang="ko"] { --sans: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
html[lang="ja"] { --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif; }
html[lang="zh-Hans"] { --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
html[lang="zh-Hant"] { --sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
html[lang="th"] { --sans: system-ui, -apple-system, "Leelawadee UI", "Noto Sans Thai", "Segoe UI", sans-serif; }
html[lang="hi"] { --sans: system-ui, -apple-system, "Nirmala UI", "Noto Sans Devanagari", "Segoe UI", sans-serif; }
html[lang="en"], html[lang="de"], html[lang="fr"], html[lang="es"], html[lang="pt"],
html[lang="id"], html[lang="ms"], html[lang="fil"], html[lang="vi"] { --display: "Lilita One", var(--sans); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17100a;
    --bg2: #21170e;
    --ink: #fbeedb;
    --muted: #cfb08f;
    --accent: #ff8656;
    --corn: #ffcd3c;
    --leaf: #8cd05c;
    --card: #241a11;
    --line: #3d2c1d;
    --shadow: 0 34px 70px -28px rgba(0, 0, 0, 0.7);
    --bezel: #0b0704;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.7 var(--sans);
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; position: relative; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 16px; }

/* ---------- 위 막대 ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.bar-in { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.bar-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 15px; }
.bar-nav > a, .langs summary { padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--muted); cursor: pointer; }
.bar-nav > a:hover, .langs summary:hover { color: var(--ink); background: var(--bg2); }
.bar-get { background: var(--accent); color: #fff !important; font-weight: 700; }
.bar-get:hover { background: var(--accent) !important; filter: brightness(1.06); }
.langs { position: relative; }
.langs summary { list-style: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: " ▾"; font-size: 12px; }
.langs ul {
  position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 8px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  min-width: 190px; max-height: 70vh; overflow: auto;
}
.langs li a { display: block; padding: 7px 12px; border-radius: 9px; text-decoration: none; }
.langs li a:hover, .langs li a[aria-current] { background: var(--bg2); }
@media (max-width: 640px) {
  .brand span { display: none; }
  .bar-nav { font-size: 14px; }
  .bar-nav > a.opt { display: none; }
}

/* ---------- 글꼴 ---------- */
.c-display {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
html[lang="en"] .c-display, html[lang="de"] .c-display, html[lang="fr"] .c-display, html[lang="es"] .c-display,
html[lang="pt"] .c-display, html[lang="id"] .c-display, html[lang="ms"] .c-display, html[lang="fil"] .c-display,
html[lang="vi"] .c-display { font-weight: 400; letter-spacing: 0; line-height: 1.04; }
html[lang="ko"] .c-display, html[lang="ja"] .c-display, html[lang^="zh"] .c-display { line-height: 1.16; }
html[lang="th"] .c-display, html[lang="hi"] .c-display { line-height: 1.32; letter-spacing: 0; }
.c-title { font-size: clamp(38px, 5.4vw, 78px); }
.c-hero { font-size: clamp(48px, 7.4vw, 108px); }
/* 일본어는 띄어쓰기가 없어 낱말 가운데서 끊긴다 — 구절 단위로(크롬 119+, 못 읽는 브라우저는 그대로). */
html[lang="ja"] .c-display, html[lang="ja"] .c-lead { word-break: auto-phrase; }
.c-accent { color: var(--accent); }
.c-line { display: block; overflow: hidden; padding: 0.08em 0.05em 0.14em; margin: -0.08em -0.05em -0.14em; }
.c-line-in { display: inline-block; transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.c-lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--muted); max-width: 32em; margin: 22px 0 0; }
.c-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 8px 15px;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--card) 85%, transparent);
  color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.2;
}
.c-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--corn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--corn) 25%, transparent); }

/* ---------- 장면 ---------- */
.c-beat { position: relative; padding: clamp(84px, 11vw, 168px) 0; overflow-x: clip; }
.c-center { text-align: center; }
.c-center .c-lead { margin-inline: auto; }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.split.flip > .copy { order: 2; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split.flip > .copy { order: 0; }
}

/* 들어오기 전의 꼴 — 스크립트가 있고 아직 장면이 안 들었을 때만 */
.c-rise { transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 110ms + 120ms); }
.js:not(.c-settled) [data-beat]:not(.is-in) .c-line-in { transform: translateY(118%); }
.js:not(.c-settled) [data-beat]:not(.is-in) .c-rise { opacity: 0; transform: translateY(28px); }
.c-settled *, .c-settled *::before, .c-settled *::after { transition: none !important; animation: none !important; }

/* ---------- 1. 놈들이 나타났다 ---------- */
.c-pain { min-height: min(86vh, 820px); display: grid; place-items: center; padding-top: clamp(64px, 8vw, 120px); }
.c-pain .c-display { font-size: clamp(44px, 7.4vw, 112px); position: relative; z-index: 2; }
.foes { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.foe { position: absolute; width: clamp(96px, 13vw, 190px); transition: transform 1.2s var(--spring), opacity 0.7s ease; transition-delay: calc(0.35s + var(--i, 0) * 140ms); }
.foe img { width: 100%; height: auto; animation: bob 4.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.1s); filter: drop-shadow(0 18px 18px rgba(80, 40, 10, 0.18)); }
.foe-sparrow { left: 6%; top: 12%; }
.foe-crow { right: 7%; top: 9%; width: clamp(110px, 15vw, 220px); }
.foe-goral { left: 9%; bottom: 8%; }
.foe-tiger { right: 6%; bottom: 6%; width: clamp(130px, 18vw, 260px); }
.js:not(.c-settled) [data-beat]:not(.is-in) .foe-sparrow,
.js:not(.c-settled) [data-beat]:not(.is-in) .foe-goral { opacity: 0; transform: translateX(-120px) rotate(-12deg) scale(0.7); }
.js:not(.c-settled) [data-beat]:not(.is-in) .foe-crow,
.js:not(.c-settled) [data-beat]:not(.is-in) .foe-tiger { opacity: 0; transform: translateX(120px) rotate(12deg) scale(0.7); }
@media (max-width: 640px) {
  .foe-sparrow { top: 4%; left: 2%; } .foe-crow { top: 3%; right: 2%; }
  .foe-goral { bottom: 2%; left: 0; } .foe-tiger { bottom: 1%; right: 0; }
}
.cue { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 40px; margin-left: -13px; border: 2px solid var(--muted); border-radius: 14px; opacity: 0.6; }
.cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--muted); animation: cue 1.8s ease-in-out infinite; }

/* ---------- 2. 출동 ---------- */
.c-brand { background: radial-gradient(60% 50% at 50% 30%, color-mix(in srgb, var(--corn) 22%, transparent), transparent 70%); }
.emblem { position: relative; width: 220px; height: 220px; margin: 0 auto 30px; display: grid; place-items: center; }
.emblem img { position: relative; z-index: 1; width: 140px; height: 140px; border-radius: 32px; box-shadow: 0 24px 40px -14px rgba(120, 50, 0, 0.45); transition: transform 1s var(--spring), opacity 0.5s ease; }
.emblem i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--corn) 60%, transparent); }
.emblem i:nth-child(2) { inset: 26px; border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.is-in .emblem i { animation: ring 3.2s var(--ease) infinite; }
.is-in .emblem i:nth-child(2) { animation-delay: 0.6s; }
.js:not(.c-settled) [data-beat]:not(.is-in) .emblem img { opacity: 0; transform: scale(0.5) rotate(-10deg); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.c-center .stores { justify-content: center; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 190px; padding: 12px 22px;
  border-radius: 16px; background: var(--ink); color: var(--bg); text-decoration: none; line-height: 1.25;
  box-shadow: 0 14px 28px -16px rgba(60, 25, 0, 0.6); transition: transform 0.2s ease;
}
.store:hover { transform: translateY(-2px); }
.store small { font-size: 12px; opacity: 0.75; }
.store b { font-size: 19px; }
.plat { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- 3. 영상 ---------- */
.film { position: relative; margin: 0; border-radius: 26px; overflow: hidden; background: #000; box-shadow: var(--shadow); aspect-ratio: 16 / 9; transition: transform 1.1s var(--ease), opacity 0.8s ease; }
.film video { width: 100%; height: 100%; object-fit: cover; }
.js:not(.c-settled) [data-beat]:not(.is-in) .film { opacity: 0; transform: translateY(70px) scale(0.95); }
.film-ctl { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.film-ctl button {
  font: 600 13px var(--sans); color: #fff; background: rgba(20, 12, 6, 0.62); border: 0; border-radius: 999px;
  padding: 8px 14px; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.film-ctl [data-state="playing"] .when-paused, .film-ctl [data-state="paused"] .when-playing,
.film-ctl [data-state="muted"] .when-sound, .film-ctl [data-state="sound"] .when-muted { display: none; }

/* ---------- 떠 있는 기기 ---------- */
.stage { position: relative; perspective: 1600px; min-height: 420px; display: grid; place-items: center; }
.glow { position: absolute; inset: 6% 2%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--corn) 34%, transparent), color-mix(in srgb, var(--accent) 10%, transparent) 60%, transparent 80%); }
.float { position: relative; animation: bob 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.phone {
  margin: 0; width: clamp(220px, 24vw, 300px); padding: 9px; border-radius: 42px; background: var(--bezel);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  transform: rotateY(var(--tilt, -8deg)) rotateX(3deg);
  transition: transform 1.2s var(--ease), opacity 0.8s ease; transition-delay: var(--late, 0.15s);
}
.phone img { width: 100%; height: auto; border-radius: 34px; background: #cfe6a8; }
.js:not(.c-settled) [data-beat]:not(.is-in) .phone { opacity: 0; transform: translateY(130px) rotateX(24deg) rotateY(calc(var(--tilt, -8deg) * 2.4)); }
.stage.two { min-height: 780px; }
.stage.two .float:first-of-type { position: absolute; left: 4%; top: 0; }
.stage.two .float:last-of-type { position: absolute; right: 2%; top: 16%; }
@media (max-width: 880px) {
  .stage { min-height: 0; padding: 12px 0; }
  .phone { width: min(62vw, 270px); }
  .stage.two { min-height: 560px; }
  .stage.two .phone { width: min(48vw, 230px); }
}

/* ---------- 7. 스킬 · 보스 — 밤 ---------- */
.c-night { background: linear-gradient(#1c1209, #2a1a0c 60%, #1c1209); color: #fdeed8; --muted: #d8b892; --line: #4a3523; --card: #2a1c10; }
.c-night .c-accent { color: #ffb347; }
.c-night .glow { background: radial-gradient(closest-side, rgba(255, 140, 40, 0.42), rgba(255, 80, 20, 0.12) 60%, transparent 80%); }
.modes { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.modes li {
  padding: 20px 20px 18px; border-radius: 20px; background: color-mix(in srgb, var(--card) 90%, transparent);
  border: 1px solid var(--line); transition: transform 0.9s var(--spring), opacity 0.6s ease; transition-delay: calc(0.2s + var(--i, 0) * 90ms);
}
.modes b { display: block; font-size: 20px; margin-bottom: 4px; }
.modes span { font-size: 15px; color: var(--muted); }
.modes-title { margin-top: 72px; font-size: clamp(24px, 2.6vw, 34px); }
.js:not(.c-settled) [data-beat]:not(.is-in) .modes li { opacity: 0; transform: translateY(40px) scale(0.9) rotate(-3deg); }

/* ---------- 8. 방치 — 수 ---------- */
.count { margin: 40px 0 0; display: inline-flex; align-items: center; gap: 18px; padding: 18px 30px 18px 22px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.count img { width: 64px; height: auto; }
.count-num { font: 400 clamp(46px, 6vw, 78px)/1 "Lilita One", var(--sans); color: var(--corn); -webkit-text-stroke: 2px #6b3a10; paint-order: stroke fill; font-variant-numeric: tabular-nums; }
.count-label { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- 9. 환생 ---------- */
.orbit { position: relative; width: min(420px, 86vw); aspect-ratio: 1; margin: 0 auto; }
.orbit .egg { position: absolute; left: 50%; top: 50%; width: 46%; transform: translate(-50%, -50%); transition: transform 1.1s var(--spring), opacity 0.6s ease; }
.orbit .egg img { animation: bob 5s ease-in-out infinite; filter: drop-shadow(0 24px 26px rgba(120, 70, 0, 0.3)); }
.orbit .relic { position: absolute; width: 23%; transition: transform 1s var(--spring), opacity 0.6s ease; transition-delay: calc(0.4s + var(--i, 0) * 120ms); }
.orbit .relic img { animation: bob 4.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.9s); }
.orbit .r0 { left: 2%; top: 10%; } .orbit .r1 { right: 0; top: 18%; } .orbit .r2 { left: 6%; bottom: 6%; } .orbit .r3 { right: 6%; bottom: 2%; }
.js:not(.c-settled) [data-beat]:not(.is-in) .orbit .egg { opacity: 0; transform: translate(-50%, -30%) scale(0.6); }
.js:not(.c-settled) [data-beat]:not(.is-in) .orbit .relic { opacity: 0; transform: scale(0.2) rotate(-40deg); }

/* ---------- 10. 스킨 ---------- */
.skins { display: flex; justify-content: center; align-items: flex-end; margin: 56px 0 0; padding: 0; list-style: none; }
.skin {
  flex: 0 1 220px; margin: 0 -14px; text-align: center; transition: transform 1.1s var(--spring), opacity 0.7s ease;
  transition-delay: calc(0.2s + var(--i, 0) * 110ms);
}
.skin figure { margin: 0; padding: 18px 14px 14px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(var(--r, 0deg)); }
.skin img { width: 100%; height: auto; }
.skin figcaption { margin-top: 6px; font-weight: 800; font-size: 15px; }
.skin:nth-child(odd) figure { transform: rotate(var(--r, 0deg)) translateY(-14px); }
.js:not(.c-settled) [data-beat]:not(.is-in) .skin { opacity: 0; transform: translateY(90px) scale(0.85); }
@media (max-width: 720px) {
  .skins { flex-wrap: wrap; gap: 12px; }
  .skin { flex: 0 0 calc(50% - 12px); margin: 0; }
  .skin:last-child { flex-basis: 60%; }
}

/* ---------- 11. 사실 ---------- */
.c-facts { background: var(--bg2); }
.facts-what { font-size: clamp(18px, 1.5vw, 21px); max-width: 44em; margin: 28px 0 0; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 46px; }
@media (max-width: 880px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px 26px 20px; }
.card h3 { margin: 0 0 10px; font-size: 21px; }
.card p { margin: 0 0 10px; }
.card ul { margin: 0; padding-left: 1.1em; }
.card li { margin: 0 0 10px; }
.card.wide { grid-column: 1 / -1; }
.names { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.names li { padding: 6px 12px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: 14px; }
.names li span { color: var(--muted); margin-right: 6px; }
.more { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.more a { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 700; }

/* ---------- 12. 끝 ---------- */
.c-end { background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%); }

/* ---------- 글 쪽(자주 묻는 질문 · 허브) ---------- */
.doc { padding: 64px 0 40px; }
.doc h1 { font-size: clamp(34px, 4.4vw, 54px); }
.doc .c-lead { margin-top: 14px; }
.qa { margin: 40px 0 0; max-width: 46em; }
.qa dt { font-weight: 800; font-size: 19px; margin: 34px 0 8px; }
.qa dd { margin: 0; }
.picker { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.picker a { display: block; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-decoration: none; }
.picker a b { display: block; }
.picker a span { font-size: 14px; color: var(--muted); }
.doc h2 { margin-top: 56px; font-size: 26px; }

/* ---------- 바닥 ---------- */
.foot { border-top: 1px solid var(--line); padding: 34px 0 48px; color: var(--muted); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes ring { 0% { transform: scale(0.82); opacity: 0.9; } 100% { transform: scale(1.22); opacity: 0; } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
