:root {
  color-scheme: dark;
  --bg: #111216;
  --panel: #1a1c21;
  --panel-strong: #22242a;
  --text: #f7f8fa;
  --muted: #a6a8b0;
  --line: rgba(255, 255, 255, 0.09);
  --blue: #43b8e9;
  --blue-strong: #2c9fd2;
  --blue-soft: rgba(67, 184, 233, 0.12);
  --board: #f4ead8;
  --board-line: #8d877c;
  --danger: #ff7448;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 2%, rgba(42, 159, 210, 0.16), transparent 28rem),
    radial-gradient(circle at 4% 38%, rgba(67, 184, 233, 0.08), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 18, 22, 0.82);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #20242a, #101116);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 1px rgba(67,184,233,.05);
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.brand-mark::before { left: 6px; background: #15171b; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.brand-mark::after { right: 5px; background: #f6f1e8; border: 1px solid #a9a398; }

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
.nav-links > a { color: #c8cbd2; text-decoration: none; }
.nav-links > a:hover { color: var(--text); }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}
.lang-switch button {
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  color: #7d818b;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.lang-switch button.active { color: #07141b; background: var(--blue); }

main { min-height: 70vh; }
.hero {
  min-height: 690px;
  padding: 88px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  align-items: center;
  gap: 70px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #89d7f5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 18px rgba(67,184,233,.8); }
h1 {
  margin: 18px 0 20px;
  font-size: clamp(52px, 7vw, 82px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}
h1 span { color: var(--blue); }
.hero-copy { max-width: 650px; margin: 0; color: var(--muted); font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #e7e9ed;
  background: rgba(255,255,255,.04);
  text-decoration: none;
  font-weight: 750;
}
.button.primary { border-color: transparent; color: #06131a; background: var(--blue); }
.button:hover { transform: translateY(-1px); }
.hero-note { margin-top: 18px; color: #747984; font-size: 13px; }

.game-card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 30px;
  background: #17191e;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 20%);
}
.game-nav {
  position: relative;
  z-index: 1;
  min-height: 46px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  margin-bottom: 18px;
}
.game-nav-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
}
.game-nav-more {
  justify-self: end;
  font-size: 19px;
  letter-spacing: 2px;
  transform: translateY(-3px);
}
.game-mode {
  color: #9b9ea7;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
}
.player-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  color: #f4f5f7;
  font-size: 17px;
}
.player-ai { margin: 0 0 14px 2px; }
.player-you { margin: 14px 0 0 2px; }
.stone {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.stone-white {
  background: #f7f3eb;
  border: 1px solid #b4aea3;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
}
.stone-black {
  background: #17191d;
  border: 1px solid #565960;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.board-shell {
  position: relative;
  z-index: 1;
  padding: 18px;
  border-radius: 18px;
  background: var(--board);
  box-shadow: inset 0 0 0 1px rgba(72,66,55,.16), 0 14px 34px rgba(0,0,0,.18);
}
.board-svg { display: block; width: 100%; height: auto; }
.black-stone { fill: #17191d; }
.white-stone { fill: #f8f5ee; stroke: #aaa398; stroke-width: 1.15; }
.last-move-dot { fill: #6d6f73; }
.turn-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(67,184,233,.32);
}
.game-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.game-action {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 13px;
  background: #303238;
  color: var(--blue);
  text-align: center;
  font-weight: 780;
}
.game-action:last-child { background: #2a2c31; }

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-head h2, .content h1 { margin: 10px 0 12px; font-size: clamp(34px, 5vw, 52px); line-height: 1.13; letter-spacing: -0.045em; }
.section-head p, .lead { margin: 0; color: var(--muted); font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.035);
}
.card.featured { border-color: rgba(67,184,233,.35); background: linear-gradient(180deg, rgba(67,184,233,.09), rgba(255,255,255,.035)); }
.card .icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--blue); background: var(--blue-soft); font-size: 20px; font-weight: 800; }
.card h3 { margin: 18px 0 8px; font-size: 20px; letter-spacing: -.025em; }
.card p { margin: 0; color: var(--muted); }

.rule-band { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rule-card { padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); }
.rule-card h3 { margin: 0 0 8px; font-size: 24px; }
.rule-card p { margin: 0; color: var(--muted); }
.rule-badge { display: inline-flex; margin-bottom: 16px; padding: 7px 10px; border-radius: 999px; background: var(--blue-soft); color: #9eddf6; font-size: 12px; font-weight: 800; }

.cta {
  margin: 0 auto 78px;
  padding: 34px;
  border-radius: 26px;
  border: 1px solid rgba(67,184,233,.22);
  background: linear-gradient(135deg, rgba(67,184,233,.10), rgba(255,255,255,.025));
  display: flex;
  align-items: center;
  gap: 24px;
}
.cta h2 { margin: 0 0 5px; font-size: 28px; }
.cta p { margin: 0; color: var(--muted); }
.cta .button { margin-left: auto; flex: 0 0 auto; }

.content { max-width: 860px; padding: 70px 0 90px; }
.content h1 { margin-bottom: 10px; }
.content h2 { margin-top: 44px; margin-bottom: 10px; font-size: 24px; letter-spacing: -.025em; }
.content h3 { margin-top: 30px; font-size: 18px; }
.content p, .content li { color: var(--muted); }
.content ul { padding-left: 22px; }
.content a { color: #98daf3; }
.notice { margin: 28px 0; padding: 18px 20px; border: 1px solid rgba(67,184,233,.25); border-radius: 16px; background: var(--blue-soft); color: #c8edfb; }
.contact-box { margin-top: 28px; padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); }
.contact-box p { margin: 6px 0 0; }
.faq { margin-top: 18px; border-top: 1px solid var(--line); }
.faq details { padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 780; }
.faq p { margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); color: #7e838d; font-size: 13px; }
.footer-inner { min-height: 92px; display: flex; align-items: center; gap: 18px; }
.footer-inner nav { margin-left: auto; display: flex; gap: 16px; }
.footer-inner a { color: #a1a5ae; text-decoration: none; }

[data-lang] { display: none; }
html[data-language="ko"] [data-lang="ko"], html[data-language="en"] [data-lang="en"] { display: block; }
span[data-lang] { display: none; }
html[data-language="ko"] span[data-lang="ko"], html[data-language="en"] span[data-lang="en"] { display: inline; }

@media (max-width: 900px) {
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 42px; padding-top: 56px; }
  .game-card { max-width: 560px; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 28px, 1120px); }
  .nav { min-height: 64px; }
  .nav-links > a { display: none; }
  h1 { font-size: 52px; }
  .hero-copy { font-size: 17px; }
  .game-card { padding: 18px; border-radius: 24px; }
  .board-shell { padding: 14px; }
  .grid, .rule-band { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
  .cta { align-items: flex-start; flex-direction: column; }
  .cta .button { margin-left: 0; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding: 24px 0; }
  .footer-inner nav { margin-left: 0; flex-wrap: wrap; }
}
