/* =========================================================
   FURNPO GAMES — 공용 스타일
   컨셉: FURNace(용광로) × POtential(잠재력)
   어두운 무쇠 바탕 + 쇳물·불티 강조. 움직임은 prefers-reduced-motion 존중
   ========================================================= */

/* ---------- 1. 토큰 ---------- */
:root {
  /* 무쇠(바탕) */
  --bg: #0e0b0a;
  --bg-2: #141010;
  --surface: #1a1412;
  --surface-2: #241c18;
  --line: #3a2d26;
  --line-soft: rgba(90, 70, 58, .35);
  /* 글자 */
  --text: #f6efe9;
  --text-2: #cfc1b6;
  --muted: #9d8e83;
  /* 쇳물·불티 */
  --white-hot: #fff4d6;
  --amber: #ffb547;
  --molten: #ff6b1a;
  --ember: #e8401c;
  --cinder: #7a2a14;
  --glow: rgba(255, 107, 26, .38);
  --on-molten: #1a0d06;

  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --gutter: 16px;
  --header-h: 60px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- 2. 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; } /* .btn 등 display 지정 요소도 hidden 속성으로 확실히 숨김 */
a { color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #ffd08a; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 107, 26, .45); color: #fff; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -.015em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--doc { max-width: calc(780px + var(--gutter) * 2); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 8px;
  background: var(--amber); color: var(--on-molten); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-molten); }

/* 등장 연출 — JS가 켜졌을 때만 숨김(스크립트 실패 시 내용이 보이도록) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; }
.js .reveal-d2 { transition-delay: .16s; }
.js .reveal-d3 { transition-delay: .24s; }

/* ---------- 3. 헤더·온도계 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 11, 10, .8);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 16px; letter-spacing: .06em; white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; transition: transform .4s var(--ease-out), filter .4s; }
.brand:hover img { transform: translateY(-2px) rotate(-5deg); filter: drop-shadow(0 0 8px var(--glow)); }
.brand b { color: var(--molten); font-weight: 800; }
.brand small { font-size: inherit; font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 2px; }
.nav a {
  position: relative; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 600;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--molten), var(--amber)); box-shadow: 0 0 8px var(--glow);
}
@media (max-width: 380px) {
  .brand small { display: none; }
  .nav a { padding: 8px; font-size: 14px; }
}

/* 스크롤 가열선 — 헤더 바닥. 읽은 만큼 달아오른다 */
.heat-line {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--cinder), var(--ember) 35%, var(--molten) 65%, var(--amber) 85%, var(--white-hot));
  clip-path: inset(0 calc((1 - var(--heat, 0)) * 100%) 0 0);
  box-shadow: 0 0 10px var(--glow);
}

/* ---------- 4. 공통 부품 ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease-out), box-shadow .3s, border-color .3s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary {
  color: var(--on-molten); border: 0;
  background: linear-gradient(180deg, #ff8f45, var(--molten) 60%, #e85512);
  box-shadow: 0 8px 28px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary::before { /* 달궈진 쇠 위를 지나가는 빛줄기 */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 244, 214, .7) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease-out);
}
.btn-primary:hover { color: var(--on-molten); transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(255, 107, 26, .65), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-ghost { color: var(--text); background: rgba(36, 28, 24, .7); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 107, 26, .6); box-shadow: 0 0 0 4px rgba(255, 107, 26, .12); transform: translateY(-2px); }
.btn .arrow { transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-center { justify-content: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--amber);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--molten), var(--amber)); box-shadow: 0 0 8px var(--glow);
}

.section { position: relative; padding: 96px 0; overflow: hidden; overflow: clip; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 660px; margin-bottom: 40px; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(26px, 5vw, 40px); font-weight: 800; }
.section-head p { margin: 0; color: var(--text-2); font-size: 17px; }
@media (max-width: 719px) { .section { padding: 68px 0; } }

.tbd {
  display: inline-block; margin: 0 2px; padding: 0 7px;
  border: 1px dashed var(--amber); border-radius: 6px;
  color: var(--amber); font-size: .88em; font-weight: 600; line-height: 1.55;
}

/* ---------- 5. 히어로(점화) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: min(880px, calc(100svh - var(--header-h)));
  padding: 48px 0 72px;
}
.hero::before { /* 바닥에서 올라오는 노(爐) 불빛 — 화력에 비례 */
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -35%; height: 80%; z-index: -2;
  background: radial-gradient(50% 55% at 50% 100%, rgba(255, 107, 26, .3), rgba(232, 64, 28, .1) 55%, transparent 75%);
  opacity: calc(.7 + var(--stoke, 0) * .3);
  transform: scaleY(calc(1 + var(--stoke, 0) * .25)); transform-origin: 50% 100%;
  transition: opacity .5s, transform .6s var(--ease-out);
}
.hero::after { /* 주물 틀 격자 */
  content: ""; position: absolute; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent);
  mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent);
}
.ember-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 96px; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; gap: 48px; }
}
.hero-copy h1 { margin: 0 0 20px; font-size: clamp(34px, 5.6vw, 60px); font-weight: 850; line-height: 1.2; letter-spacing: -.03em; }
.hero-copy .hot {
  display: inline-block; color: var(--amber);
  text-shadow: 0 0 calc(18px + var(--stoke, 0) * 34px) rgba(255, 107, 26, calc(.35 + var(--stoke, 0) * .45));
  transition: text-shadow .4s, color .4s;
}
.lead { margin: 0 0 32px; max-width: 34em; color: var(--text-2); font-size: clamp(16px, 2.2vw, 18px); }
.lead b { color: var(--text); font-weight: 800; }
.lead b span { color: var(--molten); }

@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.js .hero-copy > * { animation: rise-in .9s var(--ease-out) both; }
.js .hero-copy > :nth-child(2) { animation-delay: .12s; }
.js .hero-copy > :nth-child(3) { animation-delay: .24s; }
.js .hero-copy > :nth-child(4) { animation-delay: .36s; }
.js .forge { animation: rise-in 1.1s .2s var(--ease-out) both; }

/* 용광로 */
.forge { position: relative; display: grid; justify-items: center; gap: 18px; }
.forge::before { /* 뒤편 열기 */
  content: ""; position: absolute; left: 50%; top: 42%; width: 120%; aspect-ratio: 1; z-index: -1;
  translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 107, 26, calc(.16 + var(--stoke, 0) * .2)), transparent);
  transition: background .5s;
}
.furnace {
  --w: min(300px, 68vw);
  position: relative; isolation: isolate;
  width: var(--w); aspect-ratio: 5 / 6;
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s var(--ease-out);
}
.furnace:hover { transform: translateY(-3px); }
.furnace:active { transform: translateY(1px) scale(.985); }
.furnace:focus-visible { outline-offset: 10px; border-radius: 28px; }
.furnace::after { /* 바닥 반사광 */
  content: ""; position: absolute; left: -14%; right: -14%; bottom: -5%; height: 14%; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 107, 26, calc(.4 + var(--stoke, 0) * .4)), transparent);
  filter: blur(6px);
}
.furnace-spark { /* 잠재력: 위로 튀는 불티 하나 */
  position: absolute; left: 50%; top: 0; width: 20px; height: 20px;
  translate: -50% 0; border-radius: 3px;
  background: linear-gradient(135deg, var(--white-hot), var(--amber));
  box-shadow: 0 0 22px 6px rgba(255, 181, 71, .55);
  transform: rotate(45deg);
  animation: spark-hover 2.8s ease-in-out infinite;
}
@keyframes spark-hover {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-9px) rotate(45deg); }
}
.furnace-body {
  position: absolute; inset: 13% 4% 4% 4%; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 11%;
  border-radius: 50% 50% 9% 9% / 44% 44% 7% 7%;
  background: radial-gradient(120% 80% at 50% 100%, #3a2a22 0%, #241c18 45%, #17110f 100%);
  border: 2px solid #4b3a31;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .05),
    inset 0 -40px 60px -30px rgba(255, 107, 26, calc(.25 + var(--stoke, 0) * .4)),
    0 40px 90px -30px rgba(255, 107, 26, calc(.35 + var(--stoke, 0) * .45));
  transition: box-shadow .4s;
}
.furnace-body::before { /* 리벳 박힌 쇠띠 */
  content: ""; position: absolute; left: 0; right: 0; top: 20%; height: 12px;
  background:
    radial-gradient(circle, #7a6352 0 2px, transparent 2.6px) 6px 50% / 20px 12px repeat-x,
    linear-gradient(180deg, #4d3c32, #2c221d);
  border-top: 1px solid #66513f; border-bottom: 1px solid #120d0b;
}
.furnace.is-puffed .furnace-body { animation: puff .38s var(--ease-out); }
@keyframes puff { 35% { transform: scale(1.035, .965); } }
.furnace-mouth {
  position: relative; width: 46%; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 50% 50% 10px 10px / 40% 40% 10px 10px;
  background: radial-gradient(85% 70% at 50% 92%, var(--white-hot) 0%, #ffd27a 18%, var(--amber) 30%, var(--molten) 52%, var(--ember) 72%, #5a1a0e 100%);
  border: 3px solid #5d4a3e;
  box-shadow:
    inset 0 10px 24px rgba(0, 0, 0, .55),
    0 0 calc(30px + var(--stoke, 0) * 50px) calc(4px + var(--stoke, 0) * 10px) rgba(255, 107, 26, calc(.4 + var(--stoke, 0) * .35));
  filter: brightness(calc(1 + var(--stoke, 0) * .25)) saturate(calc(1 + var(--stoke, 0) * .2));
  transition: box-shadow .35s, filter .35s;
}
.js .furnace-mouth { animation: ignite 1.6s .3s var(--ease-out) backwards, breathe 3.4s 2s ease-in-out infinite; }
@keyframes ignite {
  0% { filter: brightness(.12) saturate(.3); }
  45% { filter: brightness(1.6) saturate(1.3); }
  100% { filter: brightness(1) saturate(1); }
}
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .86; } }
.flame {
  position: absolute; left: 50%; bottom: 6%; width: 44%; aspect-ratio: 3 / 5;
  translate: -50% 0; transform-origin: 50% 100%;
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(60% 55% at 50% 72%, #fffbe9 0%, #ffe39a 35%, rgba(255, 181, 71, .6) 62%, rgba(255, 107, 26, 0) 80%);
  filter: blur(1.5px);
  scale: 1 calc(1 + var(--stoke, 0) * .7);
  transition: scale .35s var(--ease-out);
  animation: flicker 1.6s ease-in-out infinite;
}
.flame-2 { left: 30%; width: 30%; bottom: 4%; opacity: .75; animation-duration: 1.2s; animation-delay: -.4s; }
.flame-3 { left: 70%; width: 30%; bottom: 4%; opacity: .75; animation-duration: 1.4s; animation-delay: -.8s; }
@keyframes flicker {
  0%, 100% { transform: scaleY(1) skewX(0); }
  25% { transform: scaleY(1.12) skewX(-3deg); }
  50% { transform: scaleY(.94) skewX(2deg); }
  75% { transform: scaleY(1.06) skewX(-1deg); }
}

/* 풀무 화력 표시 */
.stoke-ui { display: grid; justify-items: center; gap: 8px; }
.stoke-pips { display: flex; gap: 6px; }
.stoke-pips i {
  width: 26px; height: 6px; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: background .25s, box-shadow .25s, border-color .25s;
}
.stoke-pips i.is-on {
  background: linear-gradient(90deg, var(--molten), var(--amber));
  border-color: transparent; box-shadow: 0 0 10px var(--glow);
}
.stoke-hint { margin: 0; min-height: 1.7em; font-size: 14px; color: var(--muted); text-align: center; }

/* 최대 화력 */
.hero.is-blazing .hero-copy,
.hero.is-blazing .forge { animation: shake .5s cubic-bezier(.36, .07, .19, .97) both; }
.hero.is-blazing .hot { animation: white-hot 1.3s ease-out both; }
@keyframes shake {
  10%, 90% { transform: translate(-1px, 0); }
  20%, 80% { transform: translate(2px, 0); }
  30%, 50%, 70% { transform: translate(-3px, 1px); }
  40%, 60% { transform: translate(3px, -1px); }
}
@keyframes white-hot {
  0% { color: #fff; text-shadow: 0 0 20px var(--white-hot), 0 0 60px var(--amber), 0 0 120px var(--molten); }
  100% { color: var(--amber); }
}

/* ---------- 6. 이름의 단조 ---------- */
.forge-stage {
  position: relative; overflow: hidden;
  margin-bottom: 40px; padding: 56px 16px 32px; text-align: center;
  border-radius: var(--radius); border: 1px solid var(--line-soft);
  background: radial-gradient(60% 80% at 50% 100%, rgba(255, 107, 26, .12), transparent 70%), var(--bg-2);
}
.forge-stage::before { /* 모루 위 달궈지는 선 */
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--molten), var(--amber), var(--molten), transparent);
  opacity: .35;
}
.forge-stage.is-forged::before { animation: hearth 1.4s 1.25s ease-out both; }
@keyframes hearth {
  0% { opacity: .35; box-shadow: none; }
  20% { opacity: 1; box-shadow: 0 0 30px 6px var(--glow); }
  100% { opacity: .6; box-shadow: 0 0 12px 2px rgba(255, 107, 26, .2); }
}
.forge-words {
  position: relative; display: flex; justify-content: center; align-items: baseline;
  font-size: clamp(24px, 7vw, 88px); font-weight: 900; line-height: 1.15; letter-spacing: .02em;
  white-space: nowrap;
}
.fw { display: inline-flex; }
.fw-keep { color: var(--text); }
.fw-melt {
  display: inline-flex; overflow: visible; white-space: nowrap; color: #5e4d43;
  transition: max-width .75s .8s var(--ease-out);
}
.fw-a .fw-melt { max-width: 2.3em; }  /* ACE */
.fw-b .fw-melt { max-width: 4.6em; }  /* TENTIAL */
.fw-melt i {
  display: inline-block; font-style: normal; transform-origin: 50% 0;
  transition: transform .8s cubic-bezier(.55, 0, .8, .2), opacity .65s ease-in, filter .65s, color .25s;
}
.fw-melt i:nth-child(2) { transition-delay: .06s; }
.fw-melt i:nth-child(3) { transition-delay: .12s; }
.fw-melt i:nth-child(4) { transition-delay: .18s; }
.fw-melt i:nth-child(5) { transition-delay: .24s; }
.fw-melt i:nth-child(6) { transition-delay: .3s; }
.fw-melt i:nth-child(7) { transition-delay: .36s; }
.fw-op {
  display: inline-block; max-width: 1em; margin: 0 .3em; overflow: hidden;
  color: var(--molten); font-weight: 500;
  transition: opacity .4s .7s, transform .5s .7s, margin .75s .8s var(--ease-out), max-width .75s .8s var(--ease-out);
}
/* 녹는다 → 붙는다 */
.is-forged .fw-melt { max-width: 0; }
.is-forged .fw-melt i { transform: translateY(.9em) scale(.7, 1.8); opacity: 0; filter: blur(4px); color: var(--molten); }
.is-forged .fw-op { max-width: 0; margin: 0; opacity: 0; transform: scale(.2) rotate(90deg); }
/* 붙는 순간 백열 → 냉각 */
.is-forged .fw-keep { animation: forge-flash 1.9s 1.3s ease-out both; }
@keyframes forge-flash {
  0% { color: var(--text); text-shadow: none; }
  12% { color: #fff; text-shadow: 0 0 12px var(--white-hot), 0 0 40px var(--amber), 0 0 90px var(--molten); }
  100% { color: var(--amber); text-shadow: 0 0 18px rgba(255, 107, 26, .45); }
}
.forge-words::after { /* 충격파 */
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 1.2em; height: 1.2em; margin: -.6em 0 0 -.6em;
  border-radius: 50%; border: 2px solid var(--amber); opacity: 0; pointer-events: none;
}
.is-forged .forge-words::after { animation: shock 1s 1.3s ease-out both; }
@keyframes shock { 0% { opacity: .9; transform: scale(.2); } 100% { opacity: 0; transform: scale(4.2); } }
.forge-sparks { position: absolute; left: 50%; top: 55%; width: 0; height: 0; pointer-events: none; }
.forge-sparks b {
  position: absolute; left: -.06em; top: -1px; width: .12em; height: 2px; border-radius: 2px;
  background: var(--white-hot); box-shadow: 0 0 6px 1px var(--amber);
  opacity: 0; rotate: var(--a);
}
.is-forged .forge-sparks b { animation: spark-fly .85s 1.3s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes spark-fly {
  0% { opacity: 1; transform: translateX(0) scaleX(1); }
  100% { opacity: 0; transform: translateX(var(--d)) scaleX(2.5); }
}
.forge-sparks b:nth-child(1)  { --a: -170deg; --d: 1.7em; }
.forge-sparks b:nth-child(2)  { --a: -140deg; --d: 1.4em; }
.forge-sparks b:nth-child(3)  { --a: -112deg; --d: 1.9em; }
.forge-sparks b:nth-child(4)  { --a: -85deg;  --d: 1.5em; }
.forge-sparks b:nth-child(5)  { --a: -60deg;  --d: 2em; }
.forge-sparks b:nth-child(6)  { --a: -32deg;  --d: 1.4em; }
.forge-sparks b:nth-child(7)  { --a: -8deg;   --d: 1.8em; }
.forge-sparks b:nth-child(8)  { --a: 25deg;   --d: 1.1em; }
.forge-sparks b:nth-child(9)  { --a: 155deg;  --d: 1.2em; }
.forge-sparks b:nth-child(10) { --a: 188deg;  --d: 1.6em; }
.forge-caption {
  margin: 18px 0 0; font-size: clamp(15px, 2.4vw, 18px); color: var(--text-2);
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s 1.9s, transform .6s 1.9s var(--ease-out);
}
.forge-caption b { color: var(--amber); }
.is-forged .forge-caption { opacity: 1; transform: none; }
.forge-replay {
  margin-top: 20px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer;
  visibility: hidden; opacity: 0;
  transition: opacity .4s 2.4s, visibility 0s 2.4s, color .2s, border-color .2s;
}
.is-forged .forge-replay, .was-forged .forge-replay { visibility: visible; opacity: 1; }
.was-forged .forge-replay { transition: color .2s, border-color .2s; }
.forge-replay:hover { color: var(--amber); border-color: rgba(255, 107, 26, .5); }
.forge-stage.is-reset, .forge-stage.is-reset * { transition: none !important; animation: none !important; }

.etym-grid { display: grid; gap: 16px; }
@media (min-width: 820px) { .etym-grid { grid-template-columns: repeat(3, 1fr); } }
.etym-card { position: relative; padding: 26px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.etym-word { margin: 0 0 6px; font-size: 22px; font-weight: 900; letter-spacing: .06em; color: var(--amber); }
.etym-word span { color: #6b574b; }
.etym-word .silent-r { /* FU(R)N = FUN — R은 소리 없이 */
  display: inline-block; color: #7a6455; font-size: .7em; vertical-align: .28em;
  transform: rotate(-12deg); margin: 0 .04em;
}
.etym-card h3 { margin: 0 0 8px; font-size: 18px; }
.etym-card p:last-child { margin: 0; color: var(--text-2); }
.etym-card--result {
  border-color: rgba(255, 107, 26, .45);
  background: linear-gradient(160deg, rgba(255, 107, 26, .16), rgba(255, 107, 26, .03) 60%), var(--surface);
}

/* ---------- 7. 게임 ---------- */
.game { border-radius: calc(var(--radius) + 4px); }
.game-inner {
  display: grid; overflow: hidden; border-radius: inherit;
  background: var(--surface); border: 1px solid var(--line);
  transform: perspective(1100px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform .5s var(--ease-out), border-color .3s;
}
.game-inner:hover { border-color: rgba(124, 196, 255, .35); }
@media (min-width: 820px) { .game-inner { grid-template-columns: 1.05fr 1fr; } }
.game-art {
  position: relative; min-height: 260px; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, #1d3b6e 0%, #0b1426 55%, #060a13 100%);
}
.game-art::after { /* 포인터 하이라이트 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 40% at var(--gx, 50%) var(--gy, 30%), rgba(124, 196, 255, .18), transparent 70%);
}
.stars {
  position: absolute; inset: -360px;
  background-image:
    radial-gradient(circle at 8% 12%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 27% 64%, #cfe6ff 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 46% 28%, #fff 0 .8px, transparent 1.4px),
    radial-gradient(circle at 63% 82%, #9fd0ff 0 1px, transparent 1.6px),
    radial-gradient(circle at 81% 41%, #fff 0 1.3px, transparent 2px),
    radial-gradient(circle at 92% 7%, #cfe6ff 0 .9px, transparent 1.5px),
    radial-gradient(circle at 15% 90%, #fff 0 .8px, transparent 1.4px),
    radial-gradient(circle at 55% 52%, #e6f2ff 0 .7px, transparent 1.3px);
  background-size: 220px 220px;
  animation: drift-a 90s linear infinite;
}
.stars-2 { background-size: 340px 340px; opacity: .65; animation: drift-b 140s linear infinite, twinkle 3.2s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(-220px, 220px); } }
@keyframes drift-b { to { transform: translate(-340px, 340px); } }
@keyframes twinkle { from { opacity: .35; } to { opacity: .85; } }
.planet {
  position: absolute; left: -25%; right: -25%; top: 74%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, #8fd0ff 0%, #3a7bd5 5%, #173564 20%, #0b1a35 48%);
  box-shadow: 0 -8px 46px rgba(124, 196, 255, .35), inset 0 2px 0 rgba(200, 235, 255, .6);
}
.game-art-title {
  position: absolute; left: 0; right: 0; top: 28%; margin: 0;
  text-align: center; font-weight: 900; letter-spacing: .02em; line-height: 1.15;
  font-size: clamp(28px, 4.2vw, 40px); color: #e9f4ff;
  text-shadow: 0 0 18px rgba(124, 196, 255, .55);
}
.game-art-title small { display: block; margin-top: 4px; font-size: .55em; letter-spacing: .12em; color: #7cc4ff; }
.game-art-label {
  position: absolute; left: 14px; bottom: 12px;
  padding: 2px 8px; border-radius: 6px; border: 1px dashed rgba(207, 230, 255, .35);
  font-size: 12px; color: rgba(207, 230, 255, .7);
}
.game-body { display: flex; flex-direction: column; gap: 12px; padding: 28px 24px; }
@media (min-width: 820px) { .game-body { padding: 40px 36px; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line);
}
.tag-live { color: var(--amber); border-color: rgba(255, 181, 71, .4); }
.tag-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--molten); box-shadow: 0 0 8px var(--molten); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.75); } }
.game-body h3 { margin: 4px 0 0; font-size: clamp(24px, 4vw, 32px); font-weight: 850; }
.game-body p { margin: 0; color: var(--text-2); }
.game-body .actions { margin-top: 8px; }

/* ---------- 9. 플레이어 안내·문의 CTA ---------- */
.link-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .link-grid { grid-template-columns: repeat(3, 1fr); } }
.link-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 6px; padding: 24px 22px 22px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  transition: border-color .3s, transform .3s var(--ease-out);
}
.link-card::before { /* 아래에서 달아오르는 열기 */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(255, 107, 26, .2), transparent 65%);
  opacity: 0; transform: translateY(30%);
  transition: opacity .4s, transform .5s var(--ease-out);
}
.link-card:hover { color: var(--text); border-color: rgba(255, 107, 26, .5); transform: translateY(-3px); }
.link-card:hover::before { opacity: 1; transform: none; }
.link-card svg {
  width: 26px; height: 26px; margin-bottom: 8px;
  fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.link-card strong { font-size: 17px; }
.link-card span { color: var(--text-2); font-size: 14px; }
.link-card .arrow { position: absolute; right: 18px; top: 20px; color: var(--muted); transition: transform .3s var(--ease-out), color .3s; }
.link-card:hover .arrow { transform: translateX(4px); color: var(--amber); }

.cta {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 112px 0 120px; text-align: center; border-top: 1px solid var(--line-soft);
}
.cta::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -55%; height: 120%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 100%, rgba(255, 107, 26, .42), rgba(232, 64, 28, .14) 50%, transparent 72%);
  transform-origin: 50% 100%;
  animation: breathe-glow 5s ease-in-out infinite;
}
@keyframes breathe-glow { 0%, 100% { opacity: .8; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.07); } }
.cta-mark {
  position: absolute; left: 50%; top: 50%; z-index: -1; translate: -50% -50%;
  font-size: clamp(90px, 24vw, 300px); font-weight: 900; line-height: 1; letter-spacing: -.02em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 107, 26, .16);
  pointer-events: none; user-select: none;
}
.cta h2 { margin: 0 0 12px; font-size: clamp(28px, 6vw, 48px); font-weight: 850; }
.cta p { margin: 0 auto 32px; max-width: 32em; color: var(--text-2); }
.cta-lava {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--ember), var(--molten), var(--amber), var(--white-hot), var(--amber), var(--molten), var(--ember));
  background-size: 50% 100%;
  box-shadow: 0 0 24px 6px var(--glow);
  animation: lava-flow 4s linear infinite;
}
@keyframes lava-flow { to { background-position: 100% 0; } }

/* ---------- 10. 푸터 ---------- */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--line-soft); background: var(--bg-2); color: var(--muted); font-size: 14px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--amber); }
.footer-links .policy { color: var(--amber); font-weight: 800; } /* 개인정보처리방침은 눈에 띄게 */
.biz { display: grid; gap: 4px 24px; margin: 0 0 20px; }
@media (min-width: 720px) { .biz { grid-template-columns: repeat(3, auto); justify-content: start; } }
.biz div { display: flex; flex-wrap: wrap; gap: 0 8px; }
.biz dt { color: var(--muted); }
.biz dd { margin: 0; color: var(--text-2); }
.copy { margin: 0; font-size: 13px; }

/* ---------- 11. 하위 페이지 ---------- */
.page-head { position: relative; isolation: isolate; overflow: hidden; padding: 56px 0 28px; }
.page-head::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: -60%; height: 170%; z-index: -1;
  background: radial-gradient(40% 50% at 15% 60%, rgba(255, 107, 26, .16), transparent 70%);
}
.page-head h1 { margin: 0 0 12px; font-size: clamp(30px, 6vw, 44px); font-weight: 850; }
.page-head h1::after {
  content: ""; display: block; width: 64px; height: 3px; margin-top: 14px; border-radius: 3px;
  background: linear-gradient(90deg, var(--molten), var(--amber)); box-shadow: 0 0 12px var(--glow);
  transform-origin: 0 50%; animation: underline-in .9s .2s var(--ease-out) both;
}
@keyframes underline-in { from { transform: scaleX(0); } }
.page-head p { margin: 0; max-width: 40em; color: var(--text-2); }
.page-head .meta-line { margin-top: 12px; font-size: 14px; color: var(--muted); }

.doc { padding-bottom: 96px; }
.doc h2 { margin: 56px 0 14px; font-size: 21px; font-weight: 800; }
.doc h2 .no { margin-right: 8px; color: var(--molten); font-variant-numeric: tabular-nums; }
.doc h3 { margin: 28px 0 10px; font-size: 17px; }
.doc p, .doc li { color: var(--text-2); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 4px; }
.doc strong { color: var(--text); }

.draft, .alert {
  margin: 0 0 32px; padding: 14px 18px; border-radius: var(--radius-sm); font-size: 15px;
}
.draft { border: 1px dashed rgba(255, 181, 71, .55); background: rgba(255, 181, 71, .07); color: #ffd99a; }
.alert { border: 1px solid rgba(232, 64, 28, .65); background: rgba(232, 64, 28, .1); color: #ffb9a6; }
.alert ul { margin: 8px 0 0; }
.alert li { color: inherit; }

.toc { margin: 0 0 8px; padding: 20px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.toc strong { display: block; margin-bottom: 8px; font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.3em; }
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 40px; } }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--amber); }

.table-wrap { margin: 16px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap--wide table { min-width: 640px; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); color: var(--text); font-weight: 700; white-space: nowrap; }
tbody th[scope="row"] { color: var(--text); white-space: nowrap; }
td { color: var(--text-2); }
tbody tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 모바일: 여러 열 표를 행마다 카드로 쌓기 (td의 data-label이 항목 이름으로 표시됨) */
@media (max-width: 719px) {
  .table-stack table { min-width: 0; }
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td { display: block; padding: 0; border: 0; }
  .table-stack td::before {
    content: attr(data-label); display: block; margin-top: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted);
  }
  .table-stack td:first-child { color: var(--text); font-weight: 700; }
  .table-stack td:first-child::before { display: none; }
}

.mail-panel {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 6px; margin: 8px 0 40px; padding: 28px 24px;
  border-radius: var(--radius); border: 1px solid rgba(255, 107, 26, .45);
  background: radial-gradient(80% 120% at 0% 100%, rgba(255, 107, 26, .2), transparent 60%), var(--surface);
}
.mail-panel .label { font-size: 13px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.mail-panel a.mail { font-size: clamp(20px, 5vw, 30px); font-weight: 850; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.mail-panel a.mail:hover { color: var(--amber); }
.mail-panel p { margin: 0; color: var(--text-2); font-size: 15px; }
.mail-panel .mail { font-size: clamp(20px, 5vw, 30px); font-weight: 850; color: var(--text); overflow-wrap: anywhere; user-select: all; }
.btn-sm { justify-self: start; min-height: 40px; margin-top: 8px; padding: 0 18px; font-size: 15px; }
.btn.is-copied { box-shadow: 0 0 0 4px rgba(255, 181, 71, .25); }
.card .mail-subject { margin-top: 6px; font-size: 14px; color: var(--muted); }

.cards { display: grid; gap: 16px; margin: 20px 0 0; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  display: flex; flex-direction: column; gap: 8px; padding: 24px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .3s, transform .3s var(--ease-out);
}
.card:hover { border-color: rgba(255, 107, 26, .45); transform: translateY(-2px); }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.card .btn { align-self: flex-start; margin-top: auto; min-height: 42px; padding: 0 18px; font-size: 15px; }
.card .btn:first-of-type { margin-top: 12px; }

/* 확률 정보 */
.prob-game { margin-top: 40px; }
.prob-game > h2 { margin-top: 0; }
.prob-item { margin: 20px 0; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.prob-item h3 { margin: 0 0 14px; font-size: 19px; }
.prob-item h4 { margin: 22px 0 8px; font-size: 15px; color: var(--text-2); }
.prob-item .alert { margin-bottom: 16px; }
.meta-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.meta-grid dt { color: var(--muted); }
.meta-grid dd { margin: 0; color: var(--text); }
.prob-detail { margin-top: 16px; }
.prob-detail summary { padding: 6px 0; color: var(--amber); font-weight: 700; cursor: pointer; }

/* ---------- 12. 404 ---------- */
.notfound { display: grid; place-items: center; min-height: calc(100vh - var(--header-h) - 180px); padding: 64px 0; text-align: center; }
.notfound .furnace { --w: min(180px, 50vw); cursor: default; margin: 0 auto 28px; }
.notfound .furnace:hover { transform: none; }
.notfound h1 { margin: 0 0 12px; font-size: clamp(26px, 6vw, 40px); font-weight: 850; }
.notfound p { margin: 0 0 28px; color: var(--text-2); }

/* ---------- 13. 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .ember-canvas { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
