/* KAGE_TYPOGRAPHY의 지정 props를 정적 문서에 동일하게 적용한다. */
:root { --vermilion:#e0231c; --ember:#ff5a3c; }
body { font-family:'Onest',system-ui,-apple-system,'Segoe UI',sans-serif; }
body,.body,.body-lg,.num { font-weight:300; }
h1:not(.jp),h2:not(.jp),h3:not(.jp),.display:not(.jp) { font-family:'Onest',system-ui,sans-serif; font-weight:400; }
.display { letter-spacing:-.012em; }
.h-hero { font-size:clamp(26px,3.05vw,46px); }
.h-sec { font-size:clamp(30px,4vw,60px); }
.body-lg { font-size:clamp(14px,1.02vw,17px); }
.body { font-size:14px; }
.brand-tx b { letter-spacing:.07em; text-transform:none; }
.brand-tx i { letter-spacing:.16em; }
.language-switch { display:flex; align-items:center; gap:4px; margin-left:auto; position:relative; z-index:5; }
.language-switch button { padding:8px 10px; font-size:11px; color:var(--bone-dim); border:1px solid transparent; border-radius:30px; white-space:nowrap; }
.language-switch button[aria-pressed=true] { border-color:var(--line); color:var(--bone); background:rgba(223,231,224,.06); }
.nav-links { margin-left:auto; margin-right:24px; }
.language-switch + .nav-burger { margin-left:12px; }
.game-catalog { position:relative; z-index:15; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; margin:42px 0 20px; }
.game-entry { overflow:hidden; border:1px solid var(--line); border-radius:16px; background:rgba(5,7,10,.9); backdrop-filter:blur(12px); }
.game-entry>a { display:block; overflow:hidden; }
.game-art { display:block; width:100%; height:auto; aspect-ratio:1024/500; object-fit:cover; transition:transform .6s var(--ease); }
.game-entry>a:hover .game-art { transform:scale(1.025); }
.game-info { padding:26px; }
.game-info>.eyebrow { color:var(--muted); font-size:9px; }
.game-info h3 { font-size:clamp(20px,1.9vw,28px); line-height:1.3; margin:14px 0 10px; }
.game-info p { color:var(--bone-dim); font-size:14px; margin:0; }
.game-actions { margin-top:24px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; }
.game-actions>a { font-size:11px; letter-spacing:.03em; border-bottom:1px solid var(--line); padding-bottom:4px; }
.game-actions>a:has(img) { border:0; padding:0; }
.store-badge { width:150px; height:auto; }
html:not([data-lang=ko]) [data-badge-lang=ko],html[data-lang=ko] [data-badge-lang=en] { display:none; }
.catalog-note { position:relative; z-index:15; color:var(--bone-dim); font-size:12px; margin:20px 0 64px; }
.scene-label { margin-bottom:28px; color:var(--muted); position:relative; z-index:15; }
body[data-layout-closing=b] .fin h2 { writing-mode:horizontal-tb; font-size:clamp(46px,7vw,100px); }
.fin .cta { font-size:clamp(10px,1vw,13px); letter-spacing:.08em; text-transform:none; overflow-wrap:anywhere; }
:focus-visible { outline:2px solid var(--vermilion); outline-offset:5px; }
html[data-lang=ko] .display { word-break:keep-all; }
html[data-lang=ko] .body,html[data-lang=ko] .body-lg { word-break:keep-all; }
@media(max-width:1100px) { .nav-links { gap:18px; margin-right:10px; } .brand-tx b { font-size:11px; } }
@media(max-width:820px) { .nav-links { margin:0; } .brand-tx i { font-size:7px; } .language-switch { margin-left:auto; } .game-catalog { grid-template-columns:1fr; gap:24px; } .game-info { padding:22px; } }
@media(max-width:480px) { .brand-tx b { font-size:10px; } .brand-tx i { display:none; } .language-switch button { padding:7px; font-size:10px; } .brand svg { width:28px; } .fin .cta { letter-spacing:0; } }

/* 우주 장면: 전경 삽화와 사찰 미리보기를 대신하는 깊이감. */
:root { --vermilion:#83acff; --ember:#b692ff; }
.company-logo { width:210px; height:auto; border-radius:4px; }
.brand { gap:0; }
.pre-mark { width:240px; }
.pre-mark .company-logo { width:100%; }
.foot-brand .company-logo { width:235px; }
.hero::before { background:linear-gradient(90deg,rgba(2,4,13,.5),transparent 72%); }
body[data-layout-hero=b] .hero-top { max-width:min(600px,52vw); }
.hero-sub { max-width:43ch; }
.game-catalog { margin-top:50px; }
.game-entry { background:rgba(5,8,22,.83); border-color:rgba(150,174,234,.2); }
.catalog-note { margin-bottom:0; }
#grain { opacity:.02; }
#vignette { background:radial-gradient(125% 95% at 60% 42%,transparent 40%,rgba(2,4,13,.55) 100%); }
.sec::before { opacity:.65; }
.no-webgl body { background:radial-gradient(ellipse at 80% 14%,#182756 0,transparent 45%),radial-gradient(ellipse at 20% 40%,#21102e 0,transparent 55%),#02040d; }
@media(max-width:820px) { body[data-layout-hero=b] .hero-top { max-width:100%; } .company-logo { width:170px; } }
@media(max-width:480px) { .company-logo { width:140px; } .nav { gap:8px; } .nav-burger { flex-shrink:0; } }
.chapters { grid-template-columns:repeat(3,minmax(0,1fr)); }
.nav-link { white-space:nowrap; }
body[data-layout-closing=b] .fin { min-height:90vh; }
body[data-layout-closing=b] .fin .body-lg { max-width:42ch; }
@media(max-width:640px) { .chapters { grid-template-columns:1fr; gap:22px; } }

/* 심볼 원본을 재생성하지 않고 기존 공식 로고의 아이콘 영역만 표시한다. */
.company-symbol { position:relative; display:block; width:156px; height:180px; overflow:hidden; mask-image:radial-gradient(ellipse at 49% 50%,#000 64%,transparent 99%); }
.company-symbol img { position:absolute; left:0; top:0; height:180px; width:582px; max-width:none; }
/* 원본의 좁은 글자 수 제한과 단어 마스크가 문장을 잘게 나누지 않게 한다. */
html[data-lang=ko] h1,html[data-lang=ko] h2,html[data-lang=ko] h3,
html[data-lang=ko] p,html[data-lang=ko] .chip .tx { word-break:keep-all; overflow-wrap:break-word; }
.display { text-wrap:balance; }
p { text-wrap:pretty; }
body[data-layout-story=b] .gate-grid h2 { max-width:22ch; line-height:1.25; }
body[data-layout-closing=b] .fin h2 { max-width:18ch; line-height:1.22; }
body[data-layout-hero=b] .chapters { grid-template-columns:repeat(3,minmax(0,1fr)); }
body[data-layout-hero=b] .chip .tx { max-width:none; min-width:0; }
body[data-layout-hero=b] .chip b { letter-spacing:.06em; }
body[data-layout-hero=b] .chip p { max-width:none; line-height:1.7; }
.foot-brand p { max-width:42ch; line-height:1.85; }
.foot li a { overflow-wrap:anywhere; }
.game-entry { backdrop-filter:none; }
#grain { display:none; }
.nav { backdrop-filter:none; -webkit-backdrop-filter:none; background:rgba(3,6,15,.94); }
.word-reveal.rv-in .word { will-change:auto; }
@media(max-width:640px) {
  body[data-layout-hero=b] .chapters { grid-template-columns:1fr; gap:18px; }
  body[data-layout-hero=b] .chip { display:flex; gap:18px; align-items:flex-start; }
  body[data-layout-hero=b] .chip .num { min-width:1.5em; font-size:28px; }
  body[data-layout-hero=b] .chip .tx { padding-top:0; }
  body[data-layout-hero=b] .chip b { font-size:12px; }
  body[data-layout-hero=b] .chip p { font-size:12px; }
  .eyebrow { letter-spacing:.08em; line-height:1.8; }
  .h-hero { font-size:clamp(23px,6.8vw,36px); }
  body[data-layout-closing=b] .fin h2 { font-size:clamp(30px,8vw,46px); }
  .company-symbol { width:139px; height:160px; }
  .company-symbol img { height:160px; width:517px; }
}

/* 사찰 원본의 세로 제목·70px 아이콘 그리드를 사용하지 않는 독립 레이아웃. */
body[data-layout-closing=space] #eternity {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
  min-height:70vh; gap:26px; padding:100px var(--pad); text-align:left;
}
body[data-layout-closing=space] #eternity .eyebrow { margin:0; max-width:100%; }
body[data-layout-closing=space] #eternity h2 {
  width:min(100%,760px); max-width:20ch; margin:0;
  font-size:clamp(36px,4.8vw,64px); line-height:1.3; writing-mode:horizontal-tb;
  text-transform:none; text-wrap:balance; word-break:keep-all;
}
body[data-layout-closing=space] #eternity p {
  width:min(100%,680px); max-width:none; margin:0; font-size:17px; line-height:1.9;
}
body[data-layout-footer=space] .foot-grid {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:42px;
}
body[data-layout-footer=space] .foot-brand {
  grid-column:1 / -1; display:grid; grid-template-columns:156px minmax(0,640px);
  align-items:center; column-gap:48px; row-gap:24px;
  padding-bottom:44px; margin-bottom:8px; border-bottom:1px solid var(--line-soft);
}
body[data-layout-footer=space] .foot-brand .company-symbol {
  position:relative; grid-column:1; width:156px; height:180px; flex-shrink:0;
}
body[data-layout-footer=space] .foot-brand p {
  grid-column:2; min-width:0; width:100%; max-width:40ch; margin:0;
  font-size:clamp(17px,1.8vw,23px); line-height:1.85; text-wrap:pretty;
  word-break:keep-all; overflow-wrap:break-word;
}
body[data-layout-footer=space] .foot-grid > div { min-width:0; }
@media(max-width:700px) {
  body[data-layout-closing=space] #eternity { min-height:60vh; gap:22px; padding:76px var(--pad); }
  body[data-layout-closing=space] #eternity h2 { font-size:clamp(30px,7.5vw,42px); }
  body[data-layout-closing=space] #eternity p { font-size:15px; }
  body[data-layout-footer=space] .foot-grid { grid-template-columns:1fr; gap:32px; }
  body[data-layout-footer=space] .foot-brand { grid-template-columns:minmax(0,1fr); gap:26px; }
  body[data-layout-footer=space] .foot-brand p { grid-column:1; font-size:18px; }
}

/* 정적 우주 배경: 이미지 한 장을 합성하고 스크롤 입력 때만 위치를 갱신한다. */
#space-backdrop { position:fixed; z-index:0; inset:-30px 0; pointer-events:none;
  background:#02040d url('company-assets/assets/supernova-backdrop.jpg') 64% center / cover no-repeat;
  will-change:transform; }
.cosmic-word { position:absolute; z-index:1; top:42%; left:var(--pad); right:var(--pad);
  font-family:'Wordmark','Onest',sans-serif; font-weight:600; font-size:clamp(24px,10.5vw,160px);
  line-height:1; letter-spacing:.025em; white-space:nowrap; color:rgba(223,231,224,.55); pointer-events:none; }
.hero-top,.hero-foot { position:relative; z-index:2; }
.game-legal-links { display:flex; flex-wrap:wrap; gap:10px 18px; padding:0 26px 24px; color:var(--bone-dim); font-size:12px; line-height:1.6; }
.game-legal-links a { text-decoration:underline; text-underline-offset:3px; }
#cursor,#grain,#fg-sky { display:none; }
@media(max-width:640px) { #space-backdrop { background-position:64% center; } .cosmic-word { top:34%; } }
@media(prefers-reduced-motion:reduce) { #space-backdrop { will-change:auto; } }

/* 두 작품의 콘텐츠 길이와 배지 형태가 달라도 카드의 각 영역을 맞춘다. */
.game-entry { display:grid; grid-template-rows:auto 1fr auto; }
.game-entry .game-art { width:100%; height:auto; aspect-ratio:1024/500; object-fit:cover; }
.game-entry .game-info { display:flex; flex-direction:column; }
.game-entry .game-info h3 { min-height:2.6em; }
.game-entry .game-info p { min-height:3.4em; line-height:1.7; }
.game-entry .game-actions { display:grid; grid-template-columns:minmax(0,1fr) 150px; align-items:center; gap:16px; min-height:58px; margin-top:auto; padding-top:24px; }
.game-entry .game-actions>a { display:flex; align-items:center; min-height:58px; margin:0; padding:0; border-bottom:0; }
.game-entry #mini-store { justify-content:center; width:150px; border:1px solid var(--line); border-radius:8px; background:rgba(223,231,224,.04); text-align:center; padding:8px; }
.game-entry .game-legal-links { min-height:44px; }
.foot .footer-company-title { display:flex; align-items:center; gap:10px; min-height:32px; }
.footer-company-title .company-symbol { width:26px; height:30px; flex:none; }
.footer-company-title .company-symbol img { height:30px; width:97px; }
@media(max-width:480px) { .game-entry .game-actions { grid-template-columns:minmax(0,1fr) 132px; gap:10px; } .game-entry #mini-store,.game-entry .store-badge { width:132px; } }

/* 앞쪽의 성운·먼지와 먼 배경을 서로 다른 속도로 합성해 깊이감을 만든다. */
#space-backdrop { inset:-70px 0; }
#space-foreground { position:fixed; inset:0; z-index:5; overflow:hidden; pointer-events:none; }
.near-cloud { position:absolute; height:auto; max-width:none; will-change:transform; opacity:.64; }
.near-cloud-left { width:min(760px,70vw); left:-17vw; bottom:-230px; }
.near-cloud-right { width:min(650px,62vw); right:-20vw; top:-260px; opacity:.42; }
.near-dust { position:absolute; width:120%; height:130%; left:-10%; top:-12%; max-width:none; object-fit:cover; opacity:.65; will-change:transform; }
.foot .footer-company-title { min-height:64px; margin-bottom:16px; }
.footer-full-logo { display:block; width:210px; max-width:100%; height:auto; border-radius:3px; }
@media(min-width:701px) { body[data-layout-footer=space] .foot-grid h4 { display:flex; align-items:center; min-height:64px; } }
@media(max-width:640px) { .near-cloud-left { width:110vw; left:-50vw; bottom:-100px; } .near-cloud-right { width:105vw; right:-55vw; top:-180px; } }
@media(prefers-reduced-motion:reduce) { .near-cloud,.near-dust { will-change:auto; } }
