:root {
  --navy: #011027;
  --navy-2: #0b2147;
  --ink: #16202f;
  --muted: #5a6577;
  --line: #e3e7ee;
  --bg: #ffffff;
  --soft: #f5f7fb;
  --accent: #1f6fe5;
  --orange: #f08a1c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* header */
.top { background: var(--navy); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .14em; font-size: 22px; }
.brand small { display: block; font-weight: 500; letter-spacing: .16em; font-size: 10px; opacity: .75; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: #dbe5f7; text-decoration: none; font-size: 14px; }
.nav a:hover { color: #fff; }

/* hero */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 64px 0 72px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.25; margin: 0 0 14px; letter-spacing: -.01em; }
.hero p { font-size: 17px; color: #c9d6ee; margin: 0; max-width: 640px; }
.hero .en { margin-top: 10px; font-size: 14px; color: #93a6c8; }

section { padding: 56px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h2 { font-size: 24px; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 28px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.card .tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: #eaf2ff; border-radius: 999px; padding: 2px 10px; align-self: flex-start; }
.card .tag.game { color: #b25e00; background: #fff1e0; }
.card h3 { margin: 0; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .links { margin-top: auto; padding-top: 6px; font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.card img.icon { width: 64px; height: 64px; border-radius: 16px; }
.studio { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.studio img { height: 72px; width: auto; }

/* info table */
.info { width: 100%; border-collapse: collapse; font-size: 15px; }
.info th, .info td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info th { width: 34%; color: var(--muted); font-weight: 600; }

/* document pages */
.doc { padding: 40px 0 64px; }
.doc h1 { font-size: clamp(24px, 4vw, 32px); margin: 0 0 6px; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.doc h2 { font-size: 19px; margin: 32px 0 8px; }
.doc p, .doc li { font-size: 15.5px; }
.doc ul { padding-left: 20px; }
.box { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.langs { display: flex; gap: 10px; margin: 0 0 24px; flex-wrap: wrap; }
.langs a { font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; text-decoration: none; color: var(--ink); }
.langs a:hover { border-color: var(--accent); color: var(--accent); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

.game-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.game-hero img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 6px 20px rgba(1,16,39,.18); }

footer { background: var(--navy); color: #a9b7cf; font-size: 13px; padding: 28px 0 36px; }
footer a { color: #dbe5f7; }
footer .row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }

@media (max-width: 560px) {
  .info th { width: 40%; }
  section { padding: 44px 0; }
  .hero { padding: 48px 0 56px; }
}

/* v2: 4 pages */
.nav a.on { color: #fff; font-weight: 700; border-bottom: 2px solid var(--orange); padding-bottom: 2px; }
.hero.coin { background: linear-gradient(160deg, #04122b 0%, #0d3b66 100%); }
.hero.house { background: linear-gradient(160deg, #0b2a3c 0%, #127a6a 100%); }
.hero.game { background: linear-gradient(160deg, #1d0f3a 0%, #3a1c78 60%, #e8641e 160%); }
.hero .badge { display: inline-block; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 3px 12px; margin-bottom: 14px; color: #fff; }
.hero .heroimg { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.hero .heroimg img { height: 72px; width: auto; border-radius: 18px; background: #fff; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feat .f { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feat .f b { display: block; font-size: 16px; margin-bottom: 4px; }
.feat .f p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feat .f .n { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.gallery { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.gallery figure img { display: block; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(1,16,39,.10); }
.gallery.wide figure img { height: 260px; width: auto; }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.phone { width: 180px; height: 360px; border-radius: 26px; border: 8px solid #1b2433; background: linear-gradient(180deg, #f3f6fb, #e6ecf5); display: flex; align-items: center; justify-content: center; text-align: center; color: #8a96a8; font-size: 13px; padding: 16px; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.phone.has { padding: 0; }
.note { font-size: 13.5px; color: var(--muted); background: #fffaf0; border: 1px solid #f3e2c4; border-radius: 12px; padding: 12px 14px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.cta { display: inline-block; background: var(--orange); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 10px; margin-top: 18px; }
.cta.ghost { background: transparent; border: 1px solid rgba(255,255,255,.5); margin-left: 8px; }
@media (max-width: 560px) { .gallery.wide figure img { height: 170px; } .phone { width: 150px; height: 300px; } }
.phone.has img { object-position: top; }
.gallery.square figure img { width: 300px; height: 300px; }
@media (max-width: 560px) { .gallery.square figure img { width: 250px; height: 250px; } }
.hero.coin { background: linear-gradient(160deg, #1b1f2e 0%, #2b2f45 55%, #f0802f 170%); }
.hero.house { background: linear-gradient(160deg, #0f2b2a 0%, #1f6b5f 100%); }
.gallery figure:has(.phone) { width: 180px; }
@media (max-width: 560px) { .gallery figure:has(.phone) { width: 150px; } }

/* 페이지 넘기기 */
body { transition: transform .17s ease, opacity .17s ease; }
body.fb-out-left { transform: translateX(-6%); opacity: 0; }
body.fb-out-right { transform: translateX(6%); opacity: 0; }
body.fb-in-right { transform: translateX(6%); opacity: 0; transition: none; }
body.fb-in-left { transform: translateX(-6%); opacity: 0; transition: none; }
html { overflow-x: hidden; }
.fb-dots { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(8,18,40,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.fb-dot { display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 10px; border-radius: 999px; text-decoration: none; color: #b9c6dc; font-size: 13px; }
.fb-dot span { white-space: nowrap; }
.fb-dot.on { background: #fff; color: #0a1630; font-weight: 700; }
.fb-arrow { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.fb-arrow:disabled { opacity: .25; cursor: default; }
.fb-dot:focus-visible, .fb-arrow:focus-visible { outline: 2px solid #c9a96a; outline-offset: 2px; }
@media (max-width: 560px) {
  .fb-dot { padding: 0; width: 10px; height: 10px; background: rgba(255,255,255,.35); }
  .fb-dot span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fb-dot.on { width: 26px; background: #fff; }
  .fb-dots { gap: 8px; padding: 4px 10px; }
}
.fb-hint { position: fixed; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 51; background: #fff; color: #0a1630; font-size: 14px; padding: 8px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .4s; white-space: nowrap; }
.fb-hint.gone { opacity: 0; pointer-events: none; }
footer { padding-bottom: 76px; }
@media (prefers-reduced-motion: reduce) { body { transition: none; } }
