/* OneCatPlz(한냥줍쇼) 홈페이지 공통 스타일 — 모든 페이지가 이 파일 하나를 쓴다.
   밝은 크림·오렌지·핑크 톤 하나로 간다(다크 모드 없음). 색은 로고에서 따왔다:
   오렌지 = 한냥줍쇼 글씨, 핑크 = logo01 발바닥 */
:root {
  --bg: #fffdf9;
  --surface: #ffffff;
  --surface-alt: #fff4e6;
  --text: #2a2420;
  --text-muted: #857a71;
  --border: #f2e7da;
  --accent: #ff9a1f;
  --accent-strong: #e97f00;
  --accent-soft: #fff0dc;
  --pink: #ff8fb3;
  --pink-soft: #ffe9f1;
  --butter: #fff3c4;
  --legendary: #e0559b;
  --radius: 20px;
  --max: 1080px;
  --shadow: 0 10px 30px rgb(255 140 40 / 0.10), 0 2px 6px rgb(42 36 32 / 0.05);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-fun: "Fredoka", "Pretendard Variable", Pretendard, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent-strong); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 언어별로만 보이는 요소 — i18n.js가 <html lang>을 바꾼다 */
html[lang="en"] .only-ko, html:not([lang="en"]) .only-en { display: none !important; }

/* ── 상단 ─────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(255 253 249 / 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; height: 64px; }   /* 로고 | 메뉴(가운데) | 언어 */
.logo {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  font-weight: 800; font-size: 1.12rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em;
}
.logo img { width: 36px; height: 36px; transition: transform 0.3s ease; }
.logo:hover { color: var(--text); }
.logo:hover img { transform: rotate(-10deg) scale(1.08); }
html[lang="en"] .logo span { font-family: var(--font-fun); font-weight: 600; }
.nav { display: flex; gap: 2px; justify-self: center; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

/* 언어 드롭다운 — 평소엔 현재 언어 하나만, 누르면 메뉴가 펼쳐진다 */
.lang-switch { position: relative; justify-self: end; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: 0.88rem; font-weight: 700; color: var(--text);
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lang-toggle:hover, .lang-toggle[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lang-globe { color: var(--accent-strong); }
.lang-caret { color: var(--text-muted); transition: transform 0.2s ease; }
.lang-toggle[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 140px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 14px 34px rgb(42 36 32 / 0.14);
  animation: menu-pop 0.16s ease-out;
}
.lang-menu[hidden] { display: none; }
@keyframes menu-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  font: inherit; font-size: 0.92rem; font-weight: 600; text-align: left; cursor: pointer;
  padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text);
}
.lang-menu button:hover { background: var(--accent-soft); }
.lang-menu button[aria-checked="true"] { color: var(--accent-strong); font-weight: 800; }
.lang-menu button[aria-checked="true"]::after { content: "✓"; }

@media (max-width: 560px) {
  .site-header .container { gap: 6px; }
  .logo span { display: none; }   /* 좁은 화면에선 로고 그림만 */
  .nav a { padding: 6px 9px; font-size: 0.9rem; }
}

/* ── 본문 공통 ─────────────────────────────── */
main { min-height: calc(100vh - 64px - 140px); }
.section { padding: 64px 0; }
.section-title { font-size: clamp(1.4rem, 3.4vw, 1.8rem); margin: 0 0 22px; letter-spacing: -0.02em; }
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 6px; letter-spacing: -0.02em; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.narrow { max-width: 720px; }
.kicker { margin: 0 0 6px; color: var(--accent-strong); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ── 첫 화면 히어로 (logo01 + 한냥줍쇼/OneCatPlz) ── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(56px, 10vw, 104px) 0 clamp(48px, 8vw, 88px); text-align: center;
  background:
    radial-gradient(40% 55% at 15% 25%, var(--butter) 0%, transparent 70%),
    radial-gradient(35% 50% at 85% 20%, var(--pink-soft) 0%, transparent 70%),
    radial-gradient(45% 60% at 60% 95%, var(--accent-soft) 0%, transparent 70%),
    var(--bg);
}
.hero-brand { display: inline-flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 28px); margin-bottom: 18px; }
.hero-mark {
  width: clamp(120px, 22vw, 200px); height: auto;
  filter: drop-shadow(0 12px 18px rgb(42 36 32 / 0.18));
  animation: mark-bob 4s ease-in-out infinite;
}
.hero-wordmark { width: clamp(170px, 34vw, 340px); height: auto; filter: drop-shadow(0 6px 10px rgb(255 140 0 / 0.18)); }
.hero-wordmark-en {
  font-family: var(--font-fun); font-weight: 700; font-size: clamp(2.6rem, 8vw, 5rem); line-height: 1; letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffc23d 0%, #ff9a1f 50%, #ff7a3d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 10px rgb(255 140 0 / 0.18));
}
.hero p { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--text-muted); margin: 0; font-weight: 500; }
@keyframes mark-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }

@media (max-width: 480px) {
  .hero-brand { flex-direction: column; gap: 8px; }
}

/* ── 게임 배너 (첫 화면) ───────────────────── */
.games-section { padding: 0 0 72px; }
.games-section .section-title { margin-top: 48px; }
.game-banner {   /* 화면 폭 가득(좌우 끝까지) */
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(460px, 80vh, 860px);
  display: flex; align-items: flex-end;
  background: #3a312b; color: #fff;
}
.game-banner-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%;   /* 좁은 화면에선 고양이 얼굴 쪽을 남긴다 */
  transform: scale(1.04); animation: banner-zoom 18s ease-out forwards;
  transition: filter 0.35s ease;
}
.game-banner::after {   /* 글자가 읽히도록 왼쪽 아래만 살짝 어둡게 */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgb(30 20 12 / 0.66) 0%, rgb(30 20 12 / 0.22) 40%, transparent 65%),
    linear-gradient(to right, rgb(30 20 12 / 0.30) 0%, transparent 50%);
}
@media (hover: hover) {   /* 마우스를 올리면 배경을 어둡게 — 터치 기기에선 적용 안 함 */
  .game-banner:hover .game-banner-bg { filter: brightness(0.6); }
}
@keyframes banner-zoom { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .game-banner-bg { animation: none; transform: none; }
  .hero-mark { animation: none; }
}

.game-banner-content { padding-top: 40px; padding-bottom: clamp(36px, 6vw, 64px); }
.banner-link { color: inherit; text-decoration: none; }
.banner-link::after { content: ""; position: absolute; inset: 0; }   /* 배너 전체를 상세 페이지 링크로 */
.banner-link:hover { color: inherit; }
.game-banner .store-links .btn { position: relative; z-index: 1; }   /* 버튼은 배너 링크 위에서 따로 눌린다 */
.game-icon {
  display: block; width: 88px; height: 88px; border-radius: 22px; margin-bottom: 14px;
  object-fit: cover; box-shadow: 0 8px 22px rgb(0 0 0 / 0.3); border: 3px solid rgb(255 255 255 / 0.9);
}
.game-banner h3 {
  margin: 0 0 6px; font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.1;
  letter-spacing: -0.03em; text-shadow: 0 2px 12px rgb(0 0 0 / 0.35);
}
.game-banner p { margin: 0 0 20px; font-size: clamp(1rem, 2.2vw, 1.2rem); color: rgb(255 255 255 / 0.92); font-weight: 500; }

@media (max-width: 560px) {
  .game-banner-content { padding-bottom: 28px; }
  .game-icon { width: 68px; height: 68px; border-radius: 17px; }
}

/* ── 버튼 ─────────────────────────────────── */
.store-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; font-size: 0.92rem; font-weight: 700;
  text-decoration: none; border: 1px solid var(--border); color: var(--text); background: var(--surface);
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent-strong); }
.btn[aria-disabled="true"] { color: var(--text-muted); pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, #ffb238, #ff8a1f); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgb(255 138 31 / 0.35); }
.btn-primary:hover { color: #fff; border-color: transparent; }
.btn-primary[aria-disabled="true"] { background: var(--surface-alt); border-color: var(--border); color: var(--text-muted); box-shadow: none; }
.btn-light { background: rgb(255 255 255 / 0.95); border-color: transparent; color: var(--text); }
.btn-light:hover { background: #fff; border-color: transparent; }
.btn-light[aria-disabled="true"] { background: rgb(255 255 255 / 0.2); color: rgb(255 255 255 / 0.85); backdrop-filter: blur(4px); }
.btn-light.btn-more { background: linear-gradient(135deg, #ffb238, #ff8a1f); color: #fff; box-shadow: 0 6px 16px rgb(255 138 31 / 0.4); }
.btn-light.btn-more:hover { color: #fff; }

/* ── 하단 (게임듀오 참고: 검정 바탕, 왼쪽 로고·사업자 정보 / 오른쪽 링크 열) ── */
.site-footer { background: #15110e; color: #a39a92; padding: 48px 0 40px; font-size: 0.875rem; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 40px; }
.footer-logo {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem;
}
.footer-logo:hover { color: #fff; opacity: 0.85; }
html[lang="en"] .footer-logo span { font-family: var(--font-fun); font-weight: 600; }
.business-info { font-size: 0.8rem; line-height: 1.9; }
.business-info p, .business-info address { margin: 0; font-style: normal; }
.business-info .sep { margin: 0 8px; color: #5a514a; }
.business-info a { color: inherit; }
.business-info a:hover { color: #fff; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-content: start; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col a { display: inline-flex; align-items: center; gap: 4px; width: max-content; color: #d8d0c8; text-decoration: none; font-weight: 600; }
.footer-col a:hover { color: #fff; }
.footer-soon { color: #6f665f; }
.footer-col a.footer-privacy { color: #fff; font-weight: 800; }   /* 개인정보 처리방침은 눈에 띄게(관례) */
.footer-note { color: #6f665f; font-size: 0.8rem; }
.copyright { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 20px; border-top: 1px solid #2a2420; font-size: 0.8rem; color: #6f665f; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-row: 2; }
  .footer-brand { grid-row: 1; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* ── 확률 정보 ─────────────────────────────── */
.banner-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.banner-tabs button {
  font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.banner-tabs button:hover { border-color: var(--accent); }
.banner-tabs button[aria-selected="true"] { background: linear-gradient(135deg, #ffb238, #ff8a1f); border-color: transparent; color: #fff; }

.banner-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 20px; }
.banner-meta div { background: var(--surface-alt); border-radius: 14px; padding: 12px 16px; }
.banner-meta dt { font-size: 0.8rem; color: var(--text-muted); }
.banner-meta dd { margin: 0; font-weight: 800; }

.grade-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 8px; }
.grade-head h3 { margin: 0; font-size: 1.1rem; }
.grade-head .total { font-weight: 800; }
.grade-legendary .grade-head h3, .grade-legendary .total { color: var(--legendary); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
table.prob { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.prob th, table.prob td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.prob tr:last-child td { border-bottom: 0; }
table.prob tbody tr:hover { background: var(--accent-soft); }
table.prob th { background: var(--surface-alt); font-weight: 700; font-size: 0.85rem; color: var(--text-muted); }
table.prob td.rate, table.prob th.rate { text-align: right; font-variant-numeric: tabular-nums; }
.grade-legendary table.prob td:first-child { color: var(--legendary); font-weight: 800; }

.rules { margin-top: 36px; }
.rules h2 { font-size: 1.15rem; margin: 0 0 10px; }
.rules ul { margin: 0; padding-left: 1.2em; }
.rules li { margin: 4px 0; }
.notice { margin-top: 20px; }

/* ── 게임 상세 (games/*.html) ───────────────── */
.game-page { animation: page-rise 0.5s cubic-bezier(.2,.8,.2,1); }
@keyframes page-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .game-page { animation: none; } }

.game-top {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(380px, 62vh, 680px); display: flex; align-items: flex-end;
  background: #3a312b; color: #fff;
}
.game-top-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.game-top::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(30 20 12 / 0.7) 0%, rgb(30 20 12 / 0.2) 45%, transparent 70%);
}
.game-top-content { padding-top: 40px; padding-bottom: 44px; }
.game-top h1 { margin: 0 0 6px; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.1; letter-spacing: -0.03em; text-shadow: 0 2px 12px rgb(0 0 0 / 0.35); }
.game-tagline { margin: 0; font-size: clamp(1rem, 2.4vw, 1.25rem); color: rgb(255 255 255 / 0.92); font-weight: 500; }
.back-link {
  display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  background: rgb(255 255 255 / 0.22); backdrop-filter: blur(4px);
  color: #fff; text-decoration: none; font-size: 0.85rem; font-weight: 700;
}
.back-link:hover { background: rgb(255 255 255 / 0.35); color: #fff; }

.game-intro {
  padding: 64px 0; text-align: center;
  background: var(--surface) url("/img/note-lines.jpg") center / cover;
}
.game-intro .container { background: rgb(255 255 255 / 0.9); border-radius: var(--radius); padding: 30px 22px; box-shadow: var(--shadow); }
.game-intro h2 { margin: 0 0 14px; font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: -0.02em; }
.game-intro p { margin: 0 0 10px; font-size: 1.05rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:nth-child(4n+1) { background: linear-gradient(160deg, var(--butter), var(--surface) 60%); }
.feature:nth-child(4n+2) { background: linear-gradient(160deg, var(--pink-soft), var(--surface) 60%); }
.feature:nth-child(4n+3) { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); }
.feature:nth-child(4n+4) { background: linear-gradient(160deg, #e8f6ff, var(--surface) 60%); }
.feature:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgb(255 140 40 / 0.16); }
.feature-emoji { font-size: 2rem; }
.feature h3 { margin: 8px 0 6px; font-size: 1.12rem; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.story-teaser { background: linear-gradient(180deg, var(--pink-soft), var(--bg)); }
.story-teaser h2 { margin: 0 0 20px; font-size: 1.6rem; letter-spacing: -0.02em; }
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.bubble {
  align-self: flex-start; max-width: 85%; margin: 0;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 4px 12px rgb(224 85 155 / 0.08);
  padding: 10px 16px; border-radius: 18px 18px 18px 4px; font-weight: 600;
}
.narration { margin: 6px 0 0; color: var(--text-muted); font-style: italic; text-align: center; }

.game-cta { text-align: center; }
.game-cta h2 { margin: 0 0 18px; font-size: 1.5rem; letter-spacing: -0.02em; }
.game-cta .store-links { justify-content: center; }

/* ── 정책 문서 (privacy.html 등) ─────────────── */
.narrow-policy { max-width: 860px; padding-bottom: 64px; }
.policy > p, .policy li { font-size: 0.97rem; }
.policy section { scroll-margin-top: 84px; }
.policy h2 { font-size: 1.2rem; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); letter-spacing: -0.01em; }
.policy ul { padding-left: 1.2em; }
.policy li { margin: 6px 0; }
.policy-toc { margin: 24px 0 8px; padding: 20px 24px; }
.policy-toc-title { margin: 0 0 8px; font-weight: 800; }
.policy-toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.policy-toc li { margin: 4px 0; break-inside: avoid; font-size: 0.92rem; }
.policy-toc a { color: var(--text); text-decoration: none; }
.policy-toc a:hover { color: var(--accent-strong); text-decoration: underline; }
table.policy-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.policy-table th, table.policy-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.policy-table tr:last-child th, table.policy-table tr:last-child td { border-bottom: 0; }
table.policy-table thead th { background: var(--surface-alt); color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
table.policy-table tbody th { background: var(--surface-alt); width: 26%; font-weight: 700; white-space: nowrap; }
table.policy-table td:first-child { font-weight: 600; }
@media (max-width: 560px) {
  .policy-toc ol { columns: 1; }
  table.policy-table tbody th { white-space: normal; }
}
