/* 샤봇게임즈 공통 디자인 */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #eef1f8;
  --line: #e2e6f0;
  --ink: #1c2140;
  --ink-2: #4a5170;
  --muted: #8a90a8;
  --main: #4f5bea;
  --main-ink: #3640c4;
  --main-soft: #e9ebff;
  --pop: #ff6b5a;
  --mint: #17b39b;
  --sun: #ffc83d;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 33, 64, 0.05), 0 12px 30px rgba(28, 33, 64, 0.07);
  --font: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --title: 'Do Hyeon', var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
main.wrap { padding-bottom: 64px; min-height: 60vh; }

/* ── 머리 ── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-name { font-family: var(--title); font-size: 26px; line-height: 1; display: flex; flex-direction: column; gap: 3px; }
.brand-name small { font-family: var(--font); font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.brand-promise { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-2); }
.brand-promise b { color: var(--main-ink); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a, .nav-search { font-family: var(--title); font-size: 17px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); background: none; border: 0; display: inline-flex; align-items: center; }
.nav a:hover, .nav-search:hover { background: var(--panel-2); color: var(--ink); }

/* ── 검색 창 ── */
.search-layer { position: fixed; inset: 0; z-index: 50; background: rgba(20, 24, 48, 0.45); display: flex; justify-content: center; align-items: flex-start; padding: 80px 16px 16px; }
.search-layer[hidden] { display: none; }
.search-box { position: relative; width: min(560px, 100%); background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.search-box input { width: 100%; font: inherit; font-size: 17px; padding: 12px 44px 12px 14px; border: 2px solid var(--line); border-radius: 12px; outline: none; }
.search-box input:focus { border-color: var(--main); }
.search-close { position: absolute; top: 22px; right: 24px; border: 0; background: none; font-size: 18px; color: var(--muted); }
.search-results { list-style: none; margin: 8px 0 0; padding: 0; max-height: 60vh; overflow: auto; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.search-results a:hover, .search-results a:focus { background: var(--panel-2); outline: none; }
.search-results img { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; }
.search-results small { display: block; color: var(--muted); font-size: 12px; }
.search-results .none { padding: 12px 8px; color: var(--muted); }

/* ── 첫 화면 ── */
.hero { margin: 28px 0 8px; display: flex; align-items: center; gap: 24px; padding: 32px 36px; border-radius: 26px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #6d78ff 0%, #4f5bea 45%, #3a3fc0 100%); box-shadow: var(--shadow); overflow: hidden; }
.hero-text { flex: 1; min-width: 0; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 8px; }
.hero p { margin: 0 0 16px; opacity: 0.9; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 20px; }
.badges li { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.hero-bot { width: 220px; flex: none; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.2)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--title); font-size: 18px; padding: 12px 22px; border-radius: 14px; border: 0; transition: transform 0.12s; }
.btn:active { transform: scale(0.97); }
.btn-main { background: var(--sun); color: #3a2a00; }
.btn-sub { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.notfound .btn-sub { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }

/* ── 선반 · 카드 ── */
.shelf { margin-top: 40px; }
.shelf-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 4px 14px; padding-bottom: 10px; margin-bottom: 16px; border-bottom: 2px solid var(--line); }
.shelf-head h2 { margin: 0; font-size: 26px; }
.shelf-head p { margin: 0; color: var(--muted); font-size: 14px; padding-bottom: 3px; }
.shelf-more { margin-left: auto; font-size: 14px; color: var(--main-ink); font-weight: 600; padding-bottom: 3px; }
.count { font-family: var(--font); font-size: 0.55em; font-weight: 700; color: var(--main); margin-left: 6px; vertical-align: 0.35em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card[hidden] { display: none; }
.shot { position: relative; aspect-ratio: 16 / 10; background: var(--panel-2); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--ink-2); }
.tag-new { background: var(--pop); color: #fff; }
.cbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.cbody b { font-size: 16.5px; }
.cbody i { font-style: normal; font-size: 12.5px; color: var(--muted); }

/* ── 게임 목록 거르기 ── */
.page-head { margin: 32px 0 20px; }
.page-head h1 { font-size: 34px; margin: 4px 0; }
.page-head p { margin: 0; color: var(--ink-2); }
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.filter-q, .filter-sort { font: inherit; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); outline: none; }
.filter-q { flex: 1 1 240px; }
.filter-q:focus, .filter-sort:focus { border-color: var(--main); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--ink-2); }
.chip.on { background: var(--main); border-color: var(--main); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ── 게임 소개 ── */
.game-page, .prose { max-width: 780px; margin: 28px auto 0; }
.back { display: inline-block; font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.back:hover { color: var(--main-ink); }
.game-hero { position: relative; display: block; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 10; background: var(--panel-2); }
.game-hero img { width: 100%; height: 100%; object-fit: cover; }
.play-overlay { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--main); font-size: 34px; display: grid; place-items: center; padding-left: 6px; box-shadow: var(--shadow); transition: transform 0.15s; }
.game-hero:hover .play-overlay { transform: scale(1.08); }
.game-page h1 { font-size: 38px; margin: 22px 0 6px; }
.game-page h1 small { font-size: 0.5em; color: var(--muted); letter-spacing: 0.06em; margin-left: 4px; }
.genre-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.genre-line span { font-size: 13px; background: var(--main-soft); color: var(--main-ink); border-radius: 999px; padding: 3px 10px; }
.btn-play { background: var(--main); color: #fff; font-size: 22px; padding: 14px 30px; box-shadow: 0 10px 24px rgba(79, 91, 234, 0.3); }
.btn-play:hover { background: var(--main-ink); }
.lead { font-size: 18px; font-weight: 600; margin-top: 24px; }
.game-page p, .prose p { color: var(--ink-2); }
.game-page h2, .prose h2 { font-size: 24px; margin: 36px 0 10px; }
.howto ol { padding-left: 22px; color: var(--ink-2); }
.update ul { color: var(--ink-2); }
.faq { margin-top: 40px; }
.faq h2 { font-size: 24px; margin-bottom: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 10px; font-size: 22px; color: var(--main); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }
.home .faq { max-width: 780px; }

/* ── 뉴스 · 글 ── */
.news-list { display: grid; gap: 14px; max-width: 780px; }
.news-item { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: box-shadow 0.15s; }
.news-item:hover { box-shadow: var(--shadow); }
.news-item time, .prose time { font-size: 13px; color: var(--muted); }
.news-item b { font-family: var(--title); font-weight: 400; font-size: 22px; }
.news-item span { color: var(--ink-2); }
.news-item em { font-style: normal; color: var(--main-ink); font-weight: 600; font-size: 14px; }
.prose h1 { font-size: 36px; margin: 6px 0 18px; }
.prose ul { color: var(--ink-2); }
.prose a:not(.back) { color: var(--main-ink); text-decoration: underline; }
.mail { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }

/* ── 404 ── */
.notfound { text-align: center; padding: 60px 0; }
.notfound img { margin: 0 auto 10px; }
.notfound h1 { font-size: 34px; margin: 0 0 6px; }
.notfound .hero-btns { justify-content: center; }

/* ── 바닥 ── */
.foot { background: var(--panel); border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--ink-2); }
.foot-in { display: grid; gap: 16px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand b { font-family: var(--title); font-weight: 400; font-size: 20px; color: var(--ink); }
.foot-brand span { color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a:hover { color: var(--main-ink); }
.install-btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 2px 12px; font-size: 13px; }
.copy { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ── 폰 ── */
@media (max-width: 860px) {
  .brand-promise { display: none; }
}
@media (max-width: 640px) {
  .top-in { height: 58px; gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: 21px; }
  .nav a, .nav-search { font-size: 15px; padding: 8px 8px; }
  .hero { flex-direction: column-reverse; align-items: flex-start; padding: 24px 20px; margin-top: 16px; gap: 8px; }
  .hero { position: relative; }
  .hero-bot { position: absolute; top: 10px; right: 10px; width: 78px; }
  .hero h1 { padding-right: 70px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cbody { padding: 10px 11px 12px; }
  .cbody b { font-size: 15px; }
  .shelf-head h2 { font-size: 22px; }
  .game-page h1 { font-size: 30px; }
  .btn-play { width: 100%; }
}
