/* ==========================================================
   STUDIOS NooY — main stylesheet
   ========================================================== */

:root {
  --ink: #1a1a1a;          /* 로고 배경색 */
  --ink-2: #242424;
  --ink-3: #2e2e2e;
  --paper: #ffffff;
  --paper-2: #f5f4f1;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(26, 26, 26, 0.12);
  --muted-dark: rgba(255, 255, 255, 0.62);
  --muted-light: rgba(26, 26, 26, 0.62);
  /* 본문(설명) 글자색 — 제목보다 한 단계 약하고, muted 보다 진하게 */
  --text-light: rgba(26, 26, 26, 0.76);
  --text-dark: rgba(255, 255, 255, 0.74);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;

  --radius: 1.75rem;          /* 카드 */
  --radius-sm: 1.25rem;       /* 카드 안의 작은 상자, 안내 박스 */
  --radius-xs: 0.75rem;       /* 목록 링크 등 */
  --pill: 999px;
  --card-pad: clamp(1.75rem, 3.4vw, 2.5rem);
  --ease-pop: cubic-bezier(.3, 1.6, .5, 1);
  --wrap: 72.5rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 4.5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* 크기는 rem 으로 적어 두고, 데스크톱에서는 화면 폭에 맞춰 전체를 함께 줄인다.
   2560px 이상 = 원래 크기(16px), 1920px ≈ 0.9배, 1536px 이하 = 0.85배 */
/* 당겨서 새로고침·바운스 스크롤 때 드러나는 바깥 영역도 헤더·푸터와 같은 검은색으로 */
html {
  background: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}
/* 다른 페이지로 넘어가는 동안 지금 페이지를 가린다 (두 페이지 모두 상단이 검은색) */
@media (min-width: 861px) {
  html { font-size: clamp(13.6px, calc(10px + 0.2344vw), 16px); }
}
html.is-leaving { background: var(--ink); }
html.is-leaving body { visibility: hidden; }
/* 한국어가 아닌 언어로 열 때 번역이 끝날 때까지 가린다 (스크립트가 실패해도 잠시 뒤 보이게) */
html.i18n-wait body { visibility: hidden; animation: i18n-show 0s 1.2s forwards; }
@keyframes i18n-show { to { visibility: visible; } }

/* 일본어: 가나 글꼴을 앞에 두고, 띄어쓰기가 없으므로 글자 단위 줄바꿈 */
html[lang="ja"] {
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", YuGothic, Meiryo,
    "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
html[lang="ja"] body { word-break: normal; line-break: strict; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  /* 사파리는 바깥(바운스) 영역 색을 html 배경 위에 body 배경을 겹쳐 정하므로 body 도 검은색으로 두고,
     흰 바탕은 본문(main)에만 칠한다 */
  background: var(--ink);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

main { background: var(--paper); }

/* 카카오톡 등 인앱 브라우저는 당겨서 새로고침할 때 바깥 영역을 앱 자체 색(흰색)으로 칠해서
   위 배경색이 먹히지 않는다. 화면에 고정된 검은 층을 맨 뒤에 깔아 두면 본문이 밀려 내려가도
   헤더 아래 틈이 이 층으로 채워진다 (main 의 흰 바탕은 이 층 위에 그려진다) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--ink); pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.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: 1rem; top: -3.75rem; z-index: 200;
  background: var(--paper); color: var(--ink);
  padding: 0.625rem 1rem; border-radius: var(--pill); font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

:focus-visible { outline: 0.1875rem solid #7aa7ff; outline-offset: 0.1875rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0 1.625rem;
  border-radius: var(--pill);
  font: inherit; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.125rem; height: 1.125rem; flex: none; }

.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #e9e9e9; }
.btn--ghost-light { border-color: rgba(255,255,255,.4); color: var(--paper); }
.btn--ghost-light:hover { border-color: var(--paper); background: rgba(255,255,255,.06); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: #000; }
.btn--ghost-dark { border-color: rgba(26,26,26,.25); color: var(--ink); }
.btn--ghost-dark:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line-dark); }

.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; gap: 1.5rem;
}

.brand { margin-right: auto; display: inline-flex; align-items: center; gap: 0.625rem; text-decoration: none; color: var(--paper); }
.brand img { height: 2.75rem; width: auto; }

.nav ul { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  display: block; padding: 0.5rem 0.875rem; border-radius: var(--pill);
  color: var(--muted-dark); text-decoration: none;
  font-size: 0.9375rem; font-weight: 600;
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover,
.nav a[aria-current="true"],
.nav a[aria-current="page"] { color: var(--paper); background: rgba(255,255,255,.08); }

/* 메타볼 하이라이트 (JS가 .nav-goo SVG를 넣음, 데스크톱 전용) */
.nav ul { position: relative; }
.nav-goo { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.nav-goo-tint { opacity: .08; }
.nav.has-goo li { position: relative; z-index: 1; }
.nav.has-goo a:hover,
.nav.has-goo a[aria-current="true"],
.nav.has-goo a[aria-current="page"] { background: transparent; }

.nav-toggle {
  display: none;
  width: 2.75rem; height: 2.75rem; margin-right: -0.5rem;
  border: 0; background: none; color: var(--paper); cursor: pointer;
  position: relative; order: 3;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute; left: 50%; width: 1.375rem; height: 2px; margin-left: -0.6875rem;
  background: currentColor; border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle span::before { transform: translateY(-0.4375rem); }
.nav-toggle span::after { transform: translateY(0.4375rem); }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: rotate(45deg); background: var(--paper); }
.nav-open .nav-toggle span::after { transform: rotate(-45deg); background: var(--paper); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line-dark);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-0.5rem); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .nav-open .nav {
    transform: none; opacity: 1; visibility: visible;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { padding: 0.875rem 0.75rem; font-size: 1.125rem; border-radius: var(--radius-xs); }
  .nav-goo { display: none; }
  .nav.has-goo a:hover,
  .nav.has-goo a[aria-current="true"],
  .nav.has-goo a[aria-current="page"] { background: rgba(255,255,255,.08); }
}

/* ---------- 언어 선택 (오른쪽 위) ---------- */
html:not(.js) .lang { display: none; }
.lang { position: relative; order: 2; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  height: 2.375rem; padding: 0 0.75rem 0 0.6875rem;
  border: 1px solid var(--line-dark); border-radius: var(--pill);
  background: none; color: var(--muted-dark); cursor: pointer;
  font: inherit; font-size: 0.875rem; font-weight: 600;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.lang-btn:hover,
.lang.is-open .lang-btn { color: var(--paper); border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.06); }
.lang-globe { width: 1.0625rem; height: 1.0625rem; flex: none; }
.lang-chev { width: 0.8125rem; height: 0.8125rem; flex: none; transition: transform .2s ease; }
.lang.is-open .lang-chev { transform: rotate(90deg); }

.lang-menu {
  position: absolute; top: calc(100% + 0.625rem); right: 0; z-index: 10;
  min-width: 9.75rem; padding: 0.375rem;
  background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: 1.125rem;
  box-shadow: 0 1.125rem 2.5rem rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transform: translateY(-0.375rem) scale(.98); transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.lang.is-open .lang-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .18s ease, transform .22s var(--ease-pop);
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.625rem 0.75rem; border-radius: var(--radius-xs);
  color: var(--muted-dark); text-decoration: none; font-size: 0.9375rem; font-weight: 600; line-height: 1.4;
  transition: color .15s ease, background-color .15s ease;
}
.lang-menu a:hover,
.lang-menu a:focus-visible { color: var(--paper); background: rgba(255,255,255,.08); }
.lang-menu a:focus-visible { outline-offset: -0.125rem; }
.lang-menu a[aria-current] { color: var(--paper); }
.lang-menu a[aria-current]::after {
  content: ""; width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--paper); flex: none;
}

@media (max-width: 860px) {
  .site-header .wrap { gap: 0.5rem; }
}

/* ---------- Sections (common) ---------- */
.section { padding: clamp(5.5rem, 12vw, 9.25rem) 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--soft { background: var(--paper-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted-light);
  margin-bottom: 1.125rem;
}
/* 로고의 OO 실루엣(눈·입 제외) */
.eyebrow::before {
  content: ""; width: 1.375rem; height: 0.75rem;
  background: currentColor; opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='783.76 405.62 377.69 204.15'%3E%3Cpath d='M1069.59,426.05c-25.24,0-48.1,10.19-64.7,26.67h0c-10.19,10.1-27.04,8.56-35.23-3.23v.02c-18.44-26.51-49.1-43.87-83.83-43.87-56.37,0-102.07,45.7-102.07,102.07s45.7,102.07,102.07,102.07c30.67,0,58.16-13.55,76.87-34.97v.04c9.44-10.81,26.36-10.48,35.37.7v-.02c16.84,20.88,42.62,34.24,71.53,34.24,50.73,0,91.86-41.13,91.86-91.86s-41.13-91.86-91.86-91.86Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='783.76 405.62 377.69 204.15'%3E%3Cpath d='M1069.59,426.05c-25.24,0-48.1,10.19-64.7,26.67h0c-10.19,10.1-27.04,8.56-35.23-3.23v.02c-18.44-26.51-49.1-43.87-83.83-43.87-56.37,0-102.07,45.7-102.07,102.07s45.7,102.07,102.07,102.07c30.67,0,58.16-13.55,76.87-34.97v.04c9.44-10.81,26.36-10.48,35.37.7v-.02c16.84,20.88,42.62,34.24,71.53,34.24,50.73,0,91.86-41.13,91.86-91.86s-41.13-91.86-91.86-91.86Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.section--dark .eyebrow { color: var(--muted-dark); }

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.035em;
}
.section-lead {
  margin-top: 1.25rem; max-width: 40rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted-light);
}
.section--dark .section-lead { color: var(--muted-dark); }

.section-head { margin-bottom: clamp(2.75rem, 6vw, 4.5rem); }
.section-head--tight { margin-bottom: 2rem; }
.section-head--flush { margin-bottom: 0; }

/* ---------- Cards (common) ----------
   About · Games · Apps · Contact 의 카드가 같은 모서리·테두리·여백·호버를 쓴다 */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: var(--card-pad);
  transition: border-color .2s ease;
}
/* 호버 반응은 눌러서 어딘가로 가는 카드(링크)에만 준다. 면이 플랫하므로 그림자 없이 테두리만 진해진다 */
a.card:hover { border-color: var(--ink); }
.section--dark .card { background: var(--ink-2); border-color: var(--line-dark); }
.section--dark a.card:hover { border-color: var(--paper); }

/* 모든 카드 공통 구조: 머리(아이콘 + 제목 + 한 줄 소개) → 태그 → 설명 */
.card-head { display: flex; align-items: center; gap: 1.125rem; margin-bottom: 1.25rem; }
.card-title { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.card-title-note { font-size: .62em; font-weight: 600; color: var(--muted-light); letter-spacing: 0; vertical-align: middle; }
.card-sub { margin-top: 0.25rem; font-size: 0.9375rem; font-weight: 600; line-height: 1.5; color: var(--muted-light); }
.section--dark .card-title-note,
.section--dark .card-sub { color: var(--muted-dark); }
.card-head + .tags { margin-bottom: 1.25rem; }
.card-text { font-size: 1rem; line-height: 1.7; color: var(--text-light); }
.card-text p + p { margin-top: .7em; }
.card-text strong { font-weight: 700; color: var(--ink); }
.section--dark .card-text strong { color: var(--paper); }
.section--dark .card-text { color: var(--text-dark); }

/* 카드 아이콘: 블롭(About)과 앱 아이콘(Apps)을 같은 크기로 */
.card-icon { width: 3.5rem; height: 3.5rem; flex: none; }

/* 작은 라벨 (메타 정보 이름, 문의 카드 이름 등) */
.label { display: block; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0; color: var(--muted-light); }
.section--dark .label { color: var(--muted-dark); }

/* 태그 — 게임·앱 공통. 상태 태그는 캐릭터 색 점으로 구분 */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.375rem;
  min-height: 1.875rem; padding: 0 0.75rem; border-radius: var(--pill);
  font-size: 0.8125rem; font-weight: 700; line-height: 1;
  background: var(--paper-2); color: var(--ink);
}
.section--dark .tag { background: rgba(255, 255, 255, 0.1); color: var(--paper); }
.tag svg { width: 0.875rem; height: 0.875rem; margin-top: -2px; }
.tag--status { background: var(--ink); color: var(--paper); }
.section--dark .tag--status { background: var(--paper); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--paper);
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 4rem) 0 6rem;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.25fr .9fr; align-items: center; gap: 3rem;
}
.hero-title {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-weight: 800; line-height: 1.16; letter-spacing: -0.04em;
}
.hero-title .line { display: block; }
.hero-desc {
  margin-top: 1.75rem; max-width: 32.5rem;
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem); color: var(--muted-dark);
}
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-stage {
  position: relative; width: 100%; max-width: min(33.75rem, 62vh); margin: 0 auto;
  aspect-ratio: 1; touch-action: pan-y;
}
.hero-stage svg { width: 100%; height: 100%; overflow: visible; display: block; }
.hero-stage .hint {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  font-size: 0.75rem; letter-spacing: .2em; color: rgba(255,255,255,.38); white-space: nowrap;
  transition: opacity .4s ease;
}
.hero-stage.touched .hint { opacity: 0; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.875rem); } }

.hero-scroll {
  position: absolute; left: 50%; bottom: 1.75rem; transform: translateX(-50%);
  font-size: 0.75rem; letter-spacing: .3em; color: var(--muted-dark); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 0.625rem;
}
.hero-scroll::after {
  content: ""; width: 1px; height: 2.25rem; background: linear-gradient(var(--muted-dark), transparent);
}

@media (max-width: 860px) {
  .hero { min-height: auto; padding: calc(var(--header-h) + 3rem) 0 6.5rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 3.5rem; }
  .hero-stage { order: -1; max-width: 22.5rem; margin: -1.5rem auto -2rem; }
  .hero-scroll { display: none; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about-body p + p { margin-top: 1.1em; }
.about-body p { color: var(--text-light); font-size: 1.125rem; }
.about-body p:first-child {
  color: var(--ink); font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 700;
  line-height: 1.55; letter-spacing: -0.02em;
}

.pillars {
  margin-top: clamp(4rem, 8vw, 6.5rem);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
}


@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- Rail (가로 카드 줄) ----------
   Games · Apps 카드를 세로 카드로 가로로 늘어놓고, 아래 < > 버튼 또는 드래그로 넘긴다.
   줄은 본문 왼쪽 선에서 시작해 화면 오른쪽 끝까지 이어진다 */
.has-rail { overflow-x: clip; }
.rail { --rail-w: 23.25rem; --rail-gap: 1.25rem; }
.rail-track {
  display: flex; gap: var(--rail-gap);
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
  /* scroll-padding 의 %는 기준이 달라서 근사값을 두고, main.js 에서 실제 여백으로 맞춘다 */
  scroll-padding-inline: max(var(--gutter), (100vw - var(--wrap)) / 2);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track:focus-visible { outline: 2px solid currentColor; outline-offset: 0.25rem; }
.rail-item { flex: 0 0 min(var(--rail-w), 84vw); scroll-snap-align: start; }
@media (hover: hover) and (pointer: fine) {
  .rail:not(.is-static) .rail-track { cursor: grab; }
}
/* 끄는 동안에는 스냅을 풀고, 글자 선택·링크 반응을 막는다 */
.rail-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; -webkit-user-select: none; }
.rail-track.is-dragging * { pointer-events: none; }
/* 버튼·드래그 후 한 장씩 미끄러지는 동안에도 스냅을 풀어 둔다 */
.rail-track.is-moving { scroll-snap-type: none; }
/* 카드가 화면에 다 들어가면 가운데 정렬하고 버튼은 숨긴다 */
.rail.is-static .rail-track { justify-content: center; padding-inline: var(--gutter); }
.rail.is-static .rail-nav { display: none; }

.rail-nav { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; }
.rail-btn {
  width: 2.5rem; height: 2.5rem; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(26, 26, 26, 0.08); color: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}
.rail-btn svg { width: 1.125rem; height: 1.125rem; }
.rail-btn:hover:not(:disabled) { background: rgba(26, 26, 26, 0.14); }
.rail-btn:disabled { opacity: .35; cursor: default; }
.section--dark .rail-btn { background: rgba(255, 255, 255, 0.12); color: var(--paper); }
.section--dark .rail-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }

/* ---------- Games ---------- */
.rail--games { --rail-w: 32.5rem; }
.game {
  display: flex; flex-direction: column;
  padding: 0; overflow: hidden;
}
.game-visual {
  position: relative; flex: none; aspect-ratio: 460 / 215;
  background:
    radial-gradient(120% 90% at 20% 10%, #3b3329 0%, transparent 60%),
    radial-gradient(90% 80% at 90% 100%, #2b2a33 0%, transparent 60%),
    #171717;
  display: grid; place-items: center; overflow: hidden;
}
.game-visual img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-user-drag: none;
}
.game-visual .fallback {
  text-align: center; color: rgba(255,255,255,.9);
}
.game-visual .fallback strong {
  display: block; font-size: 2.5rem; font-weight: 900; letter-spacing: .08em;
}
.game-visual .fallback span { font-size: 0.8125rem; letter-spacing: .4em; color: var(--muted-dark); }
.game-visual .gear {
  position: absolute; color: rgba(255,255,255,.06);
  animation: spin 40s linear infinite;
}
.game-visual .gear--a { width: 12.5rem; left: -3.75rem; top: -3.75rem; }
.game-visual .gear--b { width: 8.75rem; right: -1.875rem; bottom: -2.5rem; animation-direction: reverse; animation-duration: 30s; }
@keyframes spin { to { transform: rotate(360deg); } }
.game--packit .game-visual {
  background:
    radial-gradient(110% 90% at 15% 15%, #3a4a5e 0%, transparent 60%),
    radial-gradient(90% 80% at 90% 95%, #5a3f52 0%, transparent 60%),
    #1d1d24;
}

.game-info { flex: 1; display: flex; flex-direction: column; padding: var(--card-pad); }
.game-title { font-size: clamp(1.5rem, 2.6vw, 1.75rem); }

.meta {
  margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.5rem;
}
.meta dt { font-size: 0.8125rem; font-weight: 600; color: var(--muted-dark); }
.meta dd { margin: 2px 0 0; font-weight: 600; font-size: 1rem; }
/* 버튼은 카드 맨 아래에 붙여서, 옆 카드와 버튼 높이가 맞도록 */
.game-actions { margin-top: auto; padding-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.625rem; }
.game-actions .btn { flex: 1 1 100%; }

/* ---------- Apps ---------- */
.app { display: flex; flex-direction: column; }
.app-icon {
  display: block; border-radius: 22.5%; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
  -webkit-user-drag: none;
}

.notice {
  width: fit-content; margin: 1.5rem auto 0;
  color: var(--muted-light); font-size: 0.9375rem;
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.notice svg { width: 1.25rem; height: 1.25rem; flex: none; margin-top: 0.1875rem; }

/* ---------- What's next ---------- */
.next {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.next-body p { color: var(--text-dark); font-size: 1.125rem; }
.next-body p + p { margin-top: 1em; }
.next-body p:first-child { color: var(--paper); font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 700; line-height: 1.55; }

.next-list { margin-top: 2.25rem; display: grid; gap: 0.625rem; }
.next-list li {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-dark);
  font-weight: 600;
}
.next-list li span {
  width: 2rem; height: 2rem; border-radius: 0.625rem; flex: none;
  background: rgba(255,255,255,.08); display: grid; place-items: center;
}
.next-list svg { width: 1.125rem; height: 1.125rem; }

@media (max-width: 860px) { .next { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.contact-cards { display: grid; gap: 0.875rem; }
.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem clamp(1.5rem, 3vw, 2rem); text-decoration: none;
}
.contact-card strong { display: block; margin-top: 2px; font-size: clamp(1.0625rem, 2vw, 1.25rem); font-weight: 700; word-break: break-all; }
.contact-card .arrow {
  width: 2.75rem; height: 2.75rem; flex: none; border-radius: 50%;
  background: var(--ink); color: var(--paper); display: grid; place-items: center;
  transition: transform .35s var(--ease-pop);
}
.contact-card:hover .arrow { transform: rotate(45deg); }
.contact-card .arrow svg { width: 1.125rem; height: 1.125rem; }

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--muted-dark);
  padding: 4.5rem 0 2.5rem; font-size: 0.875rem; line-height: 1.8;
  border-top: 1px solid var(--line-dark);
}
.footer-top {
  display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap;
  padding-bottom: 2.5rem; border-bottom: 1px solid var(--line-dark);
}
.footer-logo img { width: 9.375rem; height: auto; }
.footer-info { margin-top: 1.5rem; display: grid; gap: 2px; }
.footer-info div { display: flex; gap: 0.625rem; }
.footer-info dt { min-width: 6.5rem; color: rgba(255,255,255,.42); }
.footer-info dd { margin: 0; color: var(--muted-dark); }
.footer-links { display: flex; gap: 0.5rem; align-self: flex-start; flex-wrap: wrap; }
.footer-links a {
  padding: 0.625rem 1rem; border-radius: var(--pill);
  border: 1px solid var(--line-dark); text-decoration: none; color: var(--paper); font-weight: 600;
}
.footer-links a:hover { background: rgba(255,255,255,.08); }
.footer-bottom { padding-top: 1.75rem; color: rgba(255,255,255,.42); font-size: 0.8125rem; }

@media (max-width: 480px) {
  .footer-info div { flex-direction: column; gap: 0; margin-bottom: 0.5rem; }
}

/* ---------- Document pages (privacy) ---------- */
.doc-hero {
  background: var(--ink); color: var(--paper);
  padding: calc(var(--header-h) + 4.5rem) 0 4.5rem;
}
.doc-hero .section-lead { color: var(--muted-dark); }
.doc { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(5.5rem, 10vw, 8rem); }
.doc-layout { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.doc-toc { position: sticky; top: calc(var(--header-h) + 2rem); font-size: 0.875rem; }
.doc-toc strong { display: block; font-size: 0.75rem; letter-spacing: .2em; color: var(--muted-light); margin-bottom: 0.75rem; }
.doc-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.doc-toc a {
  display: block; padding: 0.375rem 0.625rem; border-radius: var(--radius-xs); text-decoration: none; color: var(--muted-light);
}
.doc-toc a:hover { background: var(--paper-2); color: var(--ink); }

.doc-body { max-width: 47.5rem; }
.doc-body .doc-note { margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--muted-light); }
.doc-body .summary {
  padding: 1.5rem 1.75rem; border-radius: var(--radius-sm);
  background: var(--paper-2); margin-bottom: 3rem;
}
.doc-body .summary strong { display: block; font-size: 1.125rem; margin-bottom: 0.375rem; }
.doc-body h2 {
  font-size: clamp(1.3125rem, 2.4vw, 1.625rem); font-weight: 800; letter-spacing: -0.02em;
  margin: 3.5rem 0 1rem; padding-top: 0.5rem;
}
.doc-body h2:first-of-type { margin-top: 0; }
.doc-body h3 { font-size: 1.125rem; font-weight: 700; margin: 1.625rem 0 0.5rem; }
.doc-body p, .doc-body li { color: var(--text-light); }
.doc-body p + p { margin-top: .8em; }
.doc-body ul { margin: 0.75rem 0; padding-left: 0; display: grid; gap: 0.375rem; }
.doc-body ul li { position: relative; padding-left: 1.125rem; }
.doc-body ul li::before {
  content: ""; position: absolute; left: 2px; top: .72em;
  width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--ink);
}
.doc-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9375rem; }
.doc-body th, .doc-body td { text-align: left; padding: 0.75rem 0.875rem; border-bottom: 1px solid var(--line-light); vertical-align: top; }
.doc-body th { background: var(--paper-2); font-weight: 700; }
.doc-body .table-wrap { overflow-x: auto; }
.doc-body .dates { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-light); color: var(--muted-light); font-size: 0.9375rem; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { position: static; padding: 1.25rem; border-radius: var(--radius-sm); background: var(--paper-2); }
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 100vh; min-height: 100svh;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; text-align: center;
  padding: calc(var(--header-h) + 2.5rem) var(--gutter) 4rem;
}
.not-found img { width: 12.5rem; margin: 0 auto 2.25rem; animation: bob 5s ease-in-out infinite; }
.not-found .code { font-size: 0.875rem; font-weight: 700; letter-spacing: .3em; color: var(--muted-dark); }
.not-found h1 { margin-top: 0.75rem; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; }
.not-found p { margin-top: 0.875rem; color: var(--muted-dark); }
.not-found .btn { margin-top: 2.25rem; }

/* ---------- 맨 위로 버튼 ---------- */
.to-top {
  position: fixed; z-index: 150;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  width: 3.25rem; height: 3.25rem; padding: 0;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%;
  background: var(--ink); color: var(--paper);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.to-top:hover { background: #000; transform: translateY(-0.1875rem); }
.to-top:active { transform: translateY(0); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), border-color .2s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* ==========================================================
   Characters — 표정 블롭 & 빼꼼 캐릭터
   ========================================================== */
:root {
  --mint: #57b89d;
  --sky: #5ec2e2;
  --coral: #f2917f;
  --butter: #f4c95d;
}

.blob {
  --c: var(--mint);
  position: relative; display: grid; place-items: center;
  width: 100%; aspect-ratio: 1;
  background: var(--c); color: var(--ink);
  border-radius: 58% 42% 52% 48% / 52% 58% 42% 48%;
}
.blob:nth-child(3n+2) { border-radius: 46% 54% 40% 60% / 58% 44% 56% 42%; }
.blob:nth-child(3n)   { border-radius: 62% 38% 56% 44% / 44% 52% 48% 56%; }
.blob svg { width: 78%; height: 78%; }
.blob--mint  { --c: var(--mint); }
.blob--sky   { --c: var(--sky); }
.blob--coral { --c: var(--coral); }
.blob--butter{ --c: var(--butter); }
.blob--white { --c: var(--paper); }
.face { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.face .fill { fill: currentColor; stroke: none; }
.face .eye { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.blob:nth-child(2n) .face .eye { animation-delay: 1.7s; }
.blob:nth-child(3n) .face .eye { animation-delay: 3.1s; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

/* What's Next — 표정 모음 (메타볼, assets/js/main.js 에서 움직임) */
.faces-grid { padding: clamp(0px, 1vw, 0.75rem); touch-action: pan-y; }
.moods { display: block; width: 100%; height: auto; overflow: visible; }
.moods-blobs { fill: var(--paper); }
/* 로고 얼굴과 같은 그림체: 점 눈 + 반달 입, 선은 4.5 */
.moods .face { fill: var(--ink); stroke: none; }
.moods .face .line { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.moods .face .eye { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.moods .mood:nth-child(2n) .eye { animation-delay: 1.7s; }
.moods .mood:nth-child(3n) .eye { animation-delay: 3.1s; }
@media (max-width: 860px) { .faces-grid { max-width: 440px; } }

/* 빼꼼 캐릭터 */
.peeker { display: block; width: 100%; max-width: 17.5rem; height: auto; overflow: visible; color: var(--ink); }
.peeker .body { transform: translateY(4.375rem); transition: transform .9s cubic-bezier(.3,1.5,.5,1); }
.peeker.is-up .body,
.no-io .peeker .body { transform: none; }
.peeker .ground { stroke: currentColor; stroke-width: 7; stroke-linecap: round; }
.peeker .pupils { transition: transform .12s linear; }
.peeker .lids { transform-box: fill-box; transform-origin: center; animation: blink 4.8s infinite; }
.section--dark .peeker,
.not-found .peeker { color: var(--paper); }

.not-found .peeker { margin: 0 auto 2.25rem; max-width: 16.25rem; }

/* ==========================================================
   Metaball drip — 섹션 경계에서 위 섹션 색이 흘러내림
   ========================================================== */
.has-drip { position: relative; }
.site-footer.has-drip { border-top: 0; }
.drip {
  position: absolute; left: 0; right: 0; top: -1px; height: 7.5rem;
  pointer-events: none; overflow: hidden; z-index: 1;
}
.drip canvas { width: 100%; height: 100%; display: block; }
.has-drip > .wrap { position: relative; z-index: 2; }

/* About 카드 아이콘: 동그라미, 로고처럼 검은 바탕에 흰 선 */
.pillar-icon {
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink); color: var(--paper);
}
.pillar-icon svg { width: 1.625rem; height: 1.625rem; }
.section--dark .peeker,
.not-found .peeker { --peek-shine: var(--ink); }
