/* The public site (plan 0-49): the game's night palette (src/ui/theme.ts). */
:root {
  --bg: #17142e;
  --paper: #302849;
  --pale: #3c3255;
  --border: #53416b;
  --ink: #fff8e9;
  --sub: #bbb2cf;
  --gold: #ffd984;
  --gold-ink: #4e3044;
  --radius: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--gold); }
img { max-width: 100%; display: block; }
.wrap { width: min(1040px, 100% - 32px); margin: 0 auto; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.langs { display: flex; gap: 4px; font-size: 14px; }
.langs a { color: var(--sub); text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.langs a[aria-current="true"] { color: var(--ink); background: var(--pale); }

/* One page, two languages: the <html lang> picks (lang.js; Korean without JS). */
html[lang="ko"] [lang="en"]:not(html) { display: none !important; }
html[lang="en"] [lang="ko"]:not(html) { display: none !important; }

/* Buttons */
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 16px; font-weight: 700; font-size: 16px; text-decoration: none; }
.button.gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 4px 0 #c79a45; }
.button.gold:active { transform: translateY(2px); box-shadow: 0 2px 0 #c79a45; }
.button.store { background: var(--paper); color: var(--ink); border: 1px solid var(--border); }
.button.store small { color: var(--sub); font-weight: 600; font-size: 13px; }
.button.store[aria-disabled="true"] { cursor: default; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero .sky { position: absolute; inset: 0; background: center / cover no-repeat url("/img/regions/dark.webp"); opacity: .55; }
.hero .sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(23 20 46 / .2) 0%, rgb(23 20 46 / .75) 70%, var(--bg) 100%); }
.hero .wrap { position: relative; padding: 64px 0 40px; text-align: center; }
.hero h1 { margin: 0; font-size: clamp(44px, 10vw, 76px); line-height: 1.1; color: var(--gold); letter-spacing: -0.02em; }
.hero .en-name { margin: 8px 0 0; font-weight: 700; font-size: clamp(16px, 3.5vw, 22px); }
.hero .lead { margin: 16px auto 28px; max-width: 34em; color: var(--sub); font-size: clamp(16px, 3.6vw, 19px); }
.hero .cta { justify-content: center; }
.parade { display: flex; justify-content: center; gap: clamp(0px, 1.5vw, 12px); margin: 36px auto 0; max-width: 820px; }
.parade img { width: clamp(52px, 14vw, 120px); height: auto; animation: bob 3.2s ease-in-out infinite; }
.parade img:nth-child(2n) { animation-delay: -1.6s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .parade img { animation: none; } }

/* Sections */
section { padding: 56px 0; }
h2 { margin: 0 0 8px; font-size: clamp(26px, 5.5vw, 34px); line-height: 1.3; }
.section-lead { margin: 0 0 28px; color: var(--sub); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--sub); font-size: 15px; }
.card .emoji { font-size: 26px; line-height: 1; margin-bottom: 10px; display: block; }

.spirits { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.spirit { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.spirit .stages { display: flex; align-items: flex-end; gap: 4px; }
.spirit .stages img { width: 30%; height: auto; }
.spirit .stages .arrow { color: var(--sub); font-size: 18px; padding-bottom: 12%; }
.spirit h3 { margin: 10px 0 2px; font-size: 18px; }
.spirit p { margin: 0; color: var(--sub); font-size: 14px; }
.mixed { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.mixed figure { margin: 0; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; }
.mixed figcaption { margin-top: 6px; font-weight: 700; font-size: 15px; }

.play-band { background: linear-gradient(135deg, #3a2d63, #2a2148); border: 1px solid var(--border); border-radius: 24px; padding: 28px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.play-band p { margin: 4px 0 0; color: var(--sub); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--sub); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
footer nav a { color: var(--ink); text-decoration: none; }
footer p { margin: 4px 0; }

/* Documents: policy, terms, support, account deletion */
.doc { padding: 36px 0 56px; }
.doc .wrap { width: min(760px, 100% - 32px); }
.doc h1 { margin: 0 0 6px; font-size: clamp(28px, 6vw, 36px); line-height: 1.3; }
.doc .meta { color: var(--sub); font-size: 14px; margin: 0 0 24px; }
.doc h2 { margin: 36px 0 10px; font-size: 21px; }
.doc h2 .no { color: var(--gold); margin-right: 8px; }
.doc h3 { margin: 22px 0 6px; font-size: 17px; }
.doc p, .doc li { font-size: 16px; }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.summary { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 8px; }
.summary h2 { margin-top: 0; }
.table { width: 100%; overflow-x: auto; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--pale); font-weight: 700; }
.note { background: color-mix(in srgb, var(--gold) 12%, var(--paper)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--border)); border-radius: 16px; padding: 14px 16px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; min-height: 30px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.faq details { background: var(--paper); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--sub); }
/* Phones: tables wrap in place instead of scrolling sideways. */
@media (max-width: 560px) {
  table { min-width: 0; font-size: 14px; }
  th, td { padding: 8px 9px; }
}
/* One recipient per table: labels on the left. */
table.pairs { min-width: 0; }
table.pairs th { width: 30%; white-space: nowrap; }
@media (max-width: 560px) { table.pairs th { white-space: normal; width: 34%; } }
