:root {
  --bg: #f7fbff;
  --bg-warm: #fff8df;
  --bg-soft: #edf6ff;
  --panel: #ffffff;
  --panel-tint: #fffef6;
  --text: #172033;
  --muted: #4f607a;
  --dim: #748096;
  --line: rgba(37, 92, 153, 0.16);
  --line-strong: rgba(37, 92, 153, 0.28);
  --yellow: #ffcb05;
  --yellow-soft: #fff1a6;
  --blue: #2a75bb;
  --blue-strong: #184f92;
  --red: #e3352f;
  --green: #33a85b;
  --ink: #111827;
  --shadow: 0 22px 54px rgba(24, 79, 146, 0.14);
  --soft-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  --focus: 0 0 0 4px rgba(255, 203, 5, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, #fff8df 0, #f7fbff 340px, #f7fbff 100%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
  margin: 0;
  overflow-x: hidden;
}

body::before {
  background-image:
    linear-gradient(rgba(42, 117, 187, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 117, 187, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a {
  color: inherit;
}

a,
button {
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  box-shadow: var(--focus);
  outline: 0;
}

.container {
  max-width: 1180px;
  padding-left: 1rem;
  padding-right: 1rem;
  width: min(1180px, 100%);
}

.narrow-container {
  max-width: 900px;
}

.site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(37, 92, 153, 0.14);
  box-shadow: 0 10px 30px rgba(24, 79, 146, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
}

.navbar {
  padding: 0.68rem 0;
}

.navbar-brand,
.footer-brand {
  align-items: center;
  color: var(--blue-strong);
  display: inline-flex;
  font-weight: 900;
  gap: 0.58rem;
  letter-spacing: 0;
  text-decoration: none;
}

.navbar-brand img,
.footer-brand img {
  background: var(--yellow-soft);
  border: 1px solid rgba(255, 203, 5, 0.8);
  border-radius: 8px;
  image-rendering: pixelated;
  padding: 2px;
}

.navbar-brand:hover,
.footer-brand:hover {
  color: var(--red);
}

.navbar-toggler {
  border-color: rgba(37, 92, 153, 0.22);
  border-radius: 8px;
  margin-left: auto;
  min-height: 44px;
}

.navbar-toggler:focus {
  box-shadow: var(--focus);
}

.navbar-toggler-icon {
  filter: none;
}

.nav-link {
  align-items: center;
  border-radius: 8px;
  color: #264363;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 800;
  gap: 0.42rem;
  min-height: 44px;
  padding: 0.52rem 0.72rem !important;
}

.nav-link i {
  color: var(--blue);
  width: 1.05rem;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 203, 5, 0.24);
  color: var(--blue-strong);
}

.nav-link.active i {
  color: var(--red);
}

.lang-btn,
.nav-play-btn,
.primary-btn,
.secondary-btn {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 850;
  gap: 0.48rem;
  justify-content: center;
  letter-spacing: 0;
  min-height: 44px;
  white-space: nowrap;
}

.lang-btn,
.secondary-btn {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--blue-strong);
}

.lang-btn:hover,
.secondary-btn:hover {
  background: #fff8df;
  border-color: rgba(255, 203, 5, 0.9);
  color: var(--red);
}

.nav-play-btn,
.primary-btn {
  background: var(--yellow);
  border: 1px solid #e3ad00;
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(255, 203, 5, 0.22);
}

.nav-play-btn:hover,
.primary-btn:hover {
  background: #ffd84d;
  color: var(--ink);
  transform: translateY(-1px);
}

.dropdown-menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  padding: 0.45rem;
}

.dropdown-item {
  border-radius: 7px;
  color: var(--blue-strong);
  font-weight: 700;
  min-height: 40px;
  padding: 0.52rem 0.72rem;
}

.dropdown-item:hover {
  background: rgba(255, 203, 5, 0.22);
  color: var(--red);
}

.hero-section {
  background:
    linear-gradient(180deg, rgba(255, 248, 223, 0.92), rgba(247, 251, 255, 0.96) 58%, #ffffff 100%);
  padding: clamp(1.85rem, 4.5vw, 3.6rem) 0 clamp(2.8rem, 5vw, 4.5rem);
  position: relative;
}

.hero-copy,
.play-heading,
.section-heading {
  margin: 0 auto 1.65rem;
  max-width: 880px;
  text-align: center;
}

.eyebrow,
.section-heading p {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 0.62rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  color: var(--blue-strong);
  font-size: clamp(2.2rem, 6.5vw, 4.65rem);
  font-weight: 950;
  line-height: 1.03;
  margin: 0 0 0.95rem;
  text-wrap: balance;
}

h2 {
  color: var(--blue-strong);
  font-size: clamp(1.55rem, 3vw, 2.65rem);
  font-weight: 920;
  line-height: 1.15;
  margin-bottom: 0.86rem;
  text-wrap: balance;
}

h3 {
  color: var(--blue-strong);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.3;
}

.hero-lead,
.article-hero p,
.play-heading p,
.section-heading span,
.seo-copy p,
.article-section p,
.article-section li,
.quick-card p,
.version-card p,
.game-note,
.content-band p,
.media-section p {
  color: var(--muted);
}

.hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  margin: 0 auto;
  max-width: 790px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.35rem 0 0;
}

.primary-btn,
.secondary-btn {
  padding: 0.78rem 1.08rem;
}

.game-stage {
  background: #ffffff;
  border: 1px solid rgba(37, 92, 153, 0.2);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 980px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.game-stage::before {
  background: linear-gradient(90deg, var(--yellow), #ffffff 38%, var(--blue));
  content: "";
  display: block;
  height: 6px;
}

.game-toolbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid rgba(37, 92, 153, 0.14);
  color: var(--blue-strong);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.72rem 0.86rem;
}

.game-toolbar > div {
  align-items: center;
  display: inline-flex;
  min-width: 0;
}

.game-toolbar strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.game-toolbar a {
  color: var(--blue-strong);
  font-weight: 800;
  text-decoration: none;
}

.game-fullscreen-btn {
  align-items: center;
  background: var(--blue-strong);
  border: 1px solid var(--blue-strong);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  gap: 0.42rem;
  min-height: 42px;
  padding: 0.48rem 0.78rem;
  white-space: nowrap;
}

.game-fullscreen-btn:hover,
.game-fullscreen-btn:focus-visible {
  background: var(--blue);
  color: #ffffff;
}

.status-dot {
  background: var(--green);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(51, 168, 91, 0.18);
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  height: 0.72rem;
  margin-right: 0.48rem;
  width: 0.72rem;
}

.game-frame-wrap {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(180deg, #f9fcff, #ffffff);
  border: 10px solid #f0f6ff;
  border-top-width: 8px;
  overflow: hidden;
  position: relative;
}

.game-frame-wrap::after {
  border: 1px solid rgba(37, 92, 153, 0.12);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.game-frame-wrap.tall {
  aspect-ratio: 4 / 3;
}

.game-frame-wrap iframe {
  background: #ffffff;
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.game-note {
  background: #fff8df;
  border-top: 1px solid rgba(37, 92, 153, 0.12);
  font-size: 0.92rem;
  margin: 0;
  padding: 0.78rem 0.95rem;
}

.game-stage:fullscreen {
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: none;
  width: 100vw;
}

.game-stage:fullscreen::before {
  display: none;
}

.game-stage:fullscreen .game-toolbar {
  flex: 0 0 auto;
}

.game-stage:fullscreen .game-frame-wrap {
  aspect-ratio: auto;
  border: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.game-stage:fullscreen .game-note {
  display: none;
}

.game-stage:fullscreen iframe {
  height: 100%;
}

.hero-facts {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 1rem auto 0;
  max-width: 980px;
  padding: 0;
}

.hero-facts li,
.quick-card,
.version-card,
.table-panel,
.screenshot-panel,
.article-section,
.faq-list details {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.hero-facts li {
  padding: 0.82rem 0.95rem;
}

.hero-facts span {
  color: var(--dim);
  display: block;
  font-size: 0.8rem;
  font-weight: 750;
}

.hero-facts strong {
  color: var(--blue-strong);
  display: block;
  font-size: 1rem;
  margin-top: 0.12rem;
}

.quick-section,
.content-band,
.media-section,
.versions-section,
.seo-copy,
.faq-section,
.article-body,
.article-hero,
.play-hero,
.simple-hero {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.quick-section,
.versions-section,
.article-body {
  background: var(--bg-soft);
}

.content-band,
.seo-copy {
  background: #ffffff;
}

.media-section,
.faq-section {
  background: var(--panel-tint);
}

.quick-grid,
.version-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-card,
.version-card {
  padding: 1.15rem;
}

.quick-card {
  border-top: 4px solid var(--yellow);
}

.version-card {
  border-top: 4px solid var(--blue);
}

.quick-card i {
  align-items: center;
  background: rgba(227, 53, 47, 0.1);
  border-radius: 8px;
  color: var(--red);
  display: inline-flex;
  font-size: 1.12rem;
  height: 40px;
  justify-content: center;
  margin-bottom: 0.85rem;
  width: 40px;
}

.split-layout {
  align-items: center;
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
}

.split-layout.reverse {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1fr);
}

.table-panel {
  overflow: hidden;
  padding: 0.3rem 1rem 0.8rem;
}

table {
  border-collapse: collapse;
  width: 100%;
}

caption {
  color: var(--blue-strong);
  caption-side: top;
  font-weight: 900;
  margin-bottom: 0.32rem;
  padding-top: 0.55rem;
}

th,
td {
  border-bottom: 1px solid rgba(37, 92, 153, 0.12);
  color: var(--muted);
  padding: 0.72rem 0.4rem;
  vertical-align: top;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--blue-strong);
  width: 34%;
}

.text-link,
.version-card a,
.footer-email {
  color: var(--blue-strong);
  font-weight: 850;
  text-decoration: none;
}

.text-link::after,
.version-card a::after {
  content: " ->";
}

.text-link:hover,
.version-card a:hover,
.footer-email:hover {
  color: var(--red);
}

.screenshot-panel {
  margin: 0;
  overflow: hidden;
}

.screenshot-panel img {
  aspect-ratio: 16 / 10;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.screenshot-panel figcaption {
  color: var(--dim);
  font-size: 0.86rem;
  padding: 0.74rem 0.9rem;
}

.seo-copy article,
.article-section {
  margin: 0 auto;
  max-width: 940px;
}

.seo-copy article {
  background: #ffffff;
  border-left: 5px solid var(--yellow);
  padding-left: clamp(1rem, 3vw, 1.5rem);
}

.seo-copy p,
.article-section p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.article-section {
  margin-bottom: 1rem;
  padding: clamp(1.15rem, 3vw, 2rem);
}

.article-section ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
  margin: 0 auto;
  max-width: 900px;
}

.faq-list details {
  padding: 0.95rem 1rem;
}

.faq-list summary {
  color: var(--blue-strong);
  cursor: pointer;
  font-weight: 850;
  list-style-position: outside;
}

.faq-list p {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.play-hero,
.article-hero,
.simple-hero {
  background:
    linear-gradient(180deg, rgba(255, 248, 223, 0.92), rgba(247, 251, 255, 0.96));
}

.article-hero {
  text-align: center;
}

.full-game {
  max-width: 1180px;
}

.site-footer {
  background: #153f73;
  border-top: 5px solid var(--yellow);
  padding: 3.2rem 0 1.6rem;
}

.site-footer .footer-brand {
  color: #ffffff;
}

.site-footer h2 {
  color: var(--yellow-soft);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 0.7fr 0.7fr;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: rgba(255, 255, 255, 0.84);
}

.site-footer h2 {
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.48rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--yellow-soft);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  padding-top: 1rem;
}

.footer-bottom p {
  font-size: 0.84rem;
  margin: 0.2rem 0;
}

.site-footer .footer-email {
  color: var(--yellow-soft);
}

section[id] {
  scroll-margin-top: 76px;
}

@media (max-width: 991.98px) {
  .hero-facts,
  .quick-grid,
  .version-grid,
  .footer-grid,
  .split-layout,
  .split-layout.reverse {
    grid-template-columns: 1fr 1fr;
  }

  .split-layout,
  .split-layout.reverse {
    align-items: start;
  }

  .navbar-nav {
    gap: 0.25rem;
    padding-top: 0.6rem;
  }

  .navbar-collapse .d-flex {
    align-items: stretch !important;
    flex-direction: column;
  }

  .lang-btn,
  .nav-play-btn {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  body::before {
    opacity: 0.24;
  }

  .hero-section {
    padding-top: 1.35rem;
  }

  .hero-section .container,
  .article-hero .container,
  .play-hero .container {
    max-width: 430px;
    overflow: hidden;
    width: 100%;
  }

  .hero-copy,
  .play-heading {
    max-width: 350px;
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2.08rem);
    line-height: 1.14;
    margin-left: auto;
    margin-right: auto;
    max-width: 350px;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: clamp(1.42rem, 7vw, 1.82rem);
  }

  .hero-lead,
  .article-hero p,
  .play-heading p {
    font-size: 0.97rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 350px;
    overflow-wrap: anywhere;
  }

  .hero-facts,
  .quick-grid,
  .version-grid,
  .footer-grid,
  .split-layout,
  .split-layout.reverse {
    grid-template-columns: 1fr;
  }

  .game-stage {
    max-width: 100%;
  }

  .game-frame-wrap,
  .game-frame-wrap.tall {
    aspect-ratio: 1 / 1.02;
    border-width: 6px;
  }

  .game-toolbar {
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem;
  }

  .game-toolbar strong {
    font-size: 0.9rem;
  }

  .game-fullscreen-btn {
    min-height: 40px;
    padding: 0.44rem 0.6rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    justify-content: center;
    width: 100%;
  }

  .quick-section,
  .content-band,
  .media-section,
  .versions-section,
  .seo-copy,
  .faq-section,
  .article-body,
  .article-hero,
  .play-hero,
  .simple-hero {
    padding: 2.75rem 0;
  }

  th,
  td {
    display: block;
    width: 100%;
  }

  th {
    border-bottom: 0;
    padding-bottom: 0.1rem;
  }

  td {
    padding-top: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
