/* play-room.it — 런처형 레이아웃: PC는 왼쪽 게임 목록 + 오른쪽 상세, 모바일은 위 목록(2×2, 펼치기) + 아래 상세 */
:root {
  --bg: #111318;
  --side: #0b0c10;
  --fg: #eef0f4;
  --fg2: #cdd1db;
  --muted: #8a90a0;
  --dim: #6b7080;
  --line: #ffffff10;
  --ac: #46e0a0;
  --on-ac: #06281a;
  --chip: #46e0a01a;
  --chip-fg: #7af0bf;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.logo { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; text-decoration: none; color: #fff; }
.logo span { color: var(--ac); }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--chip); color: var(--chip-fg); font-size: 12px; font-weight: 600; margin: 0 4px 4px 0; }
.new { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--ac); color: var(--on-ac); letter-spacing: .04em; vertical-align: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 0; transition: .2s; }
.btn.play { background: var(--ac); color: var(--on-ac); padding: 17px 64px; font-size: 17px; letter-spacing: .08em; box-shadow: 0 8px 30px #46e0a033; }
.btn.play:hover { background: #64f0b6; transform: translateY(-1px); }

/* ── 레이아웃 ── */
.layout { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }

/* 왼쪽: 로고 · 메뉴 · 게임 목록 · 문의 */
.side { position: sticky; top: 0; height: 100vh; background: var(--side); border-right: 1px solid var(--line); padding: 26px 14px 16px; display: flex; flex-direction: column; }
.side .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 10px; margin-bottom: 30px; }
.lang select { appearance: none; -webkit-appearance: none; background: #ffffff08 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a90a0' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 9px center; border: 1px solid #ffffff14; border-radius: 8px; color: var(--fg); font: inherit; font-size: 12px; padding: 6px 26px 6px 10px; cursor: pointer; }
.lang select:hover { border-color: #ffffff30; }
.lang option { background: var(--side); color: var(--fg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error { padding: 40px 16px; text-align: center; color: var(--muted); }
.label { font-size: 11px; letter-spacing: .16em; color: var(--dim); font-weight: 700; padding: 0 10px; margin-bottom: 10px; }
.list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; text-decoration: none; position: relative; transition: .15s; }
.item:hover { background: #ffffff08; }
.item.on { background: #ffffff12; }
.item.on::before { content: ""; position: absolute; left: -14px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ac); }
.item .ic { width: 50px; height: 50px; border-radius: 12px; overflow: hidden; flex: none; }
.item .tx { min-width: 0; }
.item b { display: block; font-size: 15px; }
.item small { display: block; color: var(--muted); font-size: 12px; }
.item i { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 800; color: var(--on-ac); background: var(--ac); padding: 2px 6px; border-radius: 5px; flex: none; }
.more { display: none; width: 100%; margin-top: 10px; padding: 11px; border-radius: 10px; background: #ffffff08; border: 1px solid #ffffff14; color: var(--fg); font-size: 14px; font-weight: 600; }
.more:active { background: #ffffff14; }
.contact { margin-top: auto; padding: 14px 10px 4px; font-size: 12px; color: var(--muted); text-decoration: none; border-top: 1px solid #ffffff0d; }
.contact:hover { color: #fff; }
.contact small { display: block; color: #5d6272; margin-bottom: 2px; }

/* 오른쪽: 게임 상세 */
.main { min-width: 0; display: flex; flex-direction: column; }
/* 배너: 게임 이미지를 자르지 않고 전부 보여주고, 남는 양옆은 같은 이미지를 흐리게 채움 */
.banner { position: relative; aspect-ratio: 1200 / 630; max-height: 480px; width: 100%; overflow: hidden; background: #000; }
.banner .bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.45); }
.banner .fg { position: relative; z-index: 1; object-fit: contain; animation: fadeIn .55s ease; }
.banner::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, #111318e6 0%, #11131866 22%, transparent 42%); }
.banner .t { position: absolute; left: 44px; right: 24px; bottom: 24px; z-index: 2; animation: fadeUp .5s ease; text-shadow: 0 2px 16px #000a; }
.banner .tag { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--ac); }
.banner h1 { font-size: clamp(36px, 4.5vw, 60px); letter-spacing: -0.035em; font-weight: 800; margin-top: 6px; line-height: 1.1; }
.banner p { color: #c5cad6; margin-top: 4px; font-size: 17px; }
.actbar { display: flex; align-items: center; gap: 22px; padding: 6px 44px 24px; flex-wrap: wrap; }
.status { font-size: 14px; color: var(--muted); line-height: 1.5; }
.status b { color: var(--fg); }
.tabs { display: flex; padding: 0 44px; border-bottom: 1px solid var(--line); }
.tabs a { display: block; text-decoration: none; background: none; border: 0; color: var(--muted); padding: 14px 2px; margin-right: 26px; font-weight: 600; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: #fff; }
.tabs a.on { color: #fff; border-color: var(--ac); }
.content { padding: 30px 44px 40px; flex: 1; animation: fadeUp .35s ease; }
.grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; }
.content h3 { font-size: 13px; color: var(--muted); letter-spacing: .06em; margin-bottom: 14px; font-weight: 700; }
.desc { font-size: 16px; line-height: 1.85; color: var(--fg2); }
.boxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 28px; }
.box { background: #ffffff06; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.box b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.box .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.news { background: #ffffff06; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.news .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.news .h b { font-size: 17px; }
.news .h span { font-size: 13px; color: var(--muted); }
.news ul { padding-left: 18px; line-height: 1.85; margin-top: 8px; font-size: 15px; color: var(--fg2); }
.link { display: inline-block; text-decoration: none; background: none; border: 0; color: var(--ac); font-weight: 600; font-size: 14px; margin-top: 14px; padding: 0; }
.link:hover { text-decoration: underline; }

/* 스크린샷 줄 */
.shots { margin-bottom: 36px; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
.shot { flex: none; width: 300px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); background: #ffffff06; padding: 0; cursor: zoom-in; }
.shot img { transition: transform .4s; }
.shot:hover img { transform: scale(1.04); }
.shot.vid { position: relative; cursor: pointer; }
.shot video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.shot .play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: #000000a0; box-shadow: 0 0 0 2px #ffffffcc inset; transition: transform .2s, background .2s; }
.shot .play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.shot.vid:hover .play { transform: scale(1.08); background: var(--ac); }
.shot.empty { display: grid; place-items: center; border: 1px dashed #ffffff26; color: var(--dim); font-size: 13px; cursor: default; }

/* 스크린샷 크게 보기 */
.lb { position: fixed; inset: 0; z-index: 100; background: #000000eb; display: flex; align-items: center; justify-content: center; padding: 64px 80px; animation: fadeIn .2s ease; }
.lb img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px #000c; }
.lb .vf, .lb video { width: min(100%, (100vh - 128px) * 16 / 9); aspect-ratio: 16 / 9; border-radius: 8px; background: #000; box-shadow: 0 20px 60px #000c; }
.lb .vf iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.lb button { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #ffffff16; color: #fff; font-size: 26px; line-height: 1; }
.lb button:hover { background: #ffffff2a; }
.lb .x { top: 16px; right: 16px; font-size: 18px; }
.lb .prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb .count { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; color: #9aa0b0; font-size: 13px; font-variant-numeric: tabular-nums; }

/* 업데이트 내역 타임라인 */
.tl { list-style: none; padding: 0; border-left: 2px solid #ffffff14; margin-left: 6px; }
.tl > li { position: relative; padding: 0 0 30px 28px; }
.tl > li:last-child { padding-bottom: 4px; }
.tl > li::before { content: ""; position: absolute; left: -8px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ac); }
.tl > li.latest::before { background: var(--ac); box-shadow: 0 0 0 5px #46e0a038; }
.tl .h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tl .h b { font-size: 17px; }
.tl .h span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tl ul { margin-top: 8px; padding-left: 18px; line-height: 1.85; color: var(--fg2); font-size: 15px; }


.foot { padding: 22px 44px; border-top: 1px solid #ffffff0d; font-size: 13px; color: var(--dim); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: #fff; }

/* ── 모바일 ── */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; position: static; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .contact { display: none; }
  .side .top { margin-bottom: 18px; }

  /* 게임 목록: 2열 × 2줄까지 보이고, 더 많으면 버튼으로 펼치기 */
  .list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible; }
  .list:not(.open) .item:nth-child(n+5) { display: none; }
  .list.open .item:nth-child(n+5) { animation: fadeUp .3s ease; }
  .more { display: block; }
  .item { height: 64px; padding: 8px; gap: 10px; background: #ffffff06; border: 1px solid #ffffff0d; }
  .item.on { box-shadow: inset 0 0 0 1px var(--ac); }
  .item.on::before { display: none; }
  .item b, .item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .item b { font-size: 14px; }
  .item .ic { width: 44px; height: 44px; border-radius: 9px; }
  .item i { position: absolute; top: 5px; right: 5px; font-size: 9px; padding: 1px 5px; }

  /* 모바일: 이미지는 온전히 보이고 제목은 이미지 아래로 */
  .banner { aspect-ratio: auto; max-height: none; overflow: visible; background: none; }
  .banner .fg { aspect-ratio: 1200 / 630; height: auto; }
  .banner .bg, .banner::after { display: none; }
  .banner .t { position: static; padding: 16px 16px 4px; text-shadow: none; }
  .banner h1 { font-size: 32px; }
  .actbar, .tabs, .content, .foot { padding-left: 16px; padding-right: 16px; }
  .actbar .btn.play { flex: 1; }
  .grid { grid-template-columns: 1fr; }
  .shot { width: 78%; }
  .lb { padding: 64px 8px; }
  .lb .prev, .lb .next { top: auto; bottom: 10px; transform: none; }
}

/* ── 개인정보처리방침 같은 글 페이지 (/<언어>/privacy/) ── */
.foot .links { display: flex; gap: 18px; flex-wrap: wrap; }
.doc-page { min-height: 100vh; display: flex; flex-direction: column; }
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); background: var(--side); border-bottom: 1px solid #ffffff0d; }
.doc-langs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.doc-langs a, .doc-langs b { padding: 5px 10px; border-radius: 8px; border: 1px solid #ffffff14; text-decoration: none; color: var(--muted); font-weight: 500; }
.doc-langs a:hover { color: #fff; border-color: #ffffff30; }
.doc-langs b { color: var(--chip-fg); background: var(--chip); border-color: transparent; }
.doc { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 36px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); line-height: 1.75; }
.doc-back { font-size: 13px; color: var(--muted); text-decoration: none; }
.doc-back:hover { color: #fff; }
.doc h1 { font-size: 30px; letter-spacing: -0.02em; margin-top: 18px; text-wrap: balance; }
.doc-date { font-size: 13px; color: var(--dim); margin-top: 4px; }
.doc-intro { color: var(--fg2); margin-top: 22px; padding: 16px 18px; background: #ffffff06; border: 1px solid var(--line); border-radius: 12px; }
.doc section { margin-top: 34px; }
.doc h2 { font-size: 17px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc ul { margin-top: 12px; padding-left: 20px; display: grid; gap: 8px; color: var(--fg2); font-size: 15px; }
.doc li::marker { color: var(--ac); }
.doc b { color: var(--fg); font-weight: 600; }
.doc a { color: var(--chip-fg); text-underline-offset: 3px; word-break: break-all; }
.doc-foot { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ── 조작법 · 게임 팁 탭 ── */
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.gcard { background: #ffffff06; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.gcard h3 { font-size: 15px; margin-bottom: 12px; }
.gcard ul { padding-left: 18px; line-height: 1.75; font-size: 15px; color: var(--fg2); display: grid; gap: 6px; }
.gcard li::marker { color: var(--ac); }
.keys { display: grid; gap: 10px; }
.keys > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.keys > div:last-child { border-bottom: 0; padding-bottom: 0; }
.keys dt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.keys dd { margin: 0; font-size: 14px; color: var(--fg2); line-height: 1.6; }
.keys .or { color: var(--dim); font-size: 12px; }
kbd { display: inline-block; font: 600 12px/1.3 inherit; font-family: inherit; white-space: normal; text-align: left; color: var(--fg); background: #ffffff0f; border: 1px solid #ffffff1f; border-bottom-width: 2px; border-radius: 6px; padding: 4px 8px; }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 860px) { .tabs a { margin-right: 20px; } }
@media (max-width: 520px) { .keys > div { grid-template-columns: 1fr; gap: 6px; } }

/* 소개 탭: 게임 이야기 · 게임 도감 */
.world, .dex { margin-top: 48px; }
.world h3, .dex > h3 { margin-bottom: 14px; }
.world { display: grid; gap: 14px; max-width: 72ch; }
.world p { font-size: 16px; line-height: 1.85; color: var(--fg2); }
.defs { display: grid; gap: 10px; }
.defs > div { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.defs > div:last-child { border-bottom: 0; padding-bottom: 0; }
.defs dt { font-weight: 700; font-size: 15px; }
.defs dd { margin: 0; color: var(--fg2); font-size: 15px; line-height: 1.7; }

/* 업데이트 내역의 개발 이야기 */
.tl .story { margin-top: 10px; color: var(--fg2); font-size: 15px; line-height: 1.8; display: grid; gap: 10px; max-width: 68ch; }
.tl .story + ul { margin-top: 10px; }
