:root {
  --paper: #f5f5f0;
  --white: #ffffff;
  --ink: #171a16;
  --muted: #525751;
  --line: #d8dcd2;
  --night: #141613;
  --night-text: #f5f5ee;
  --night-muted: #c1c5b9;
  --accent: #d9e7ba;
  --focus: #357144;
  --radius: 1.125rem;
  --max: 75rem;
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 100%;
  line-height: 1.65;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 18rem; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.055em; }
a:focus-visible, video:focus-visible { outline: 0.1875rem solid var(--focus); outline-offset: 0.25rem; }
.wrap { width: min(var(--max), calc(100% - 4rem)); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 4;
  top: 0.4rem;
  left: 0.75rem;
  transform: translateY(-160%);
  padding: 0.65rem 1rem;
  border-radius: 0.4rem;
  background: var(--accent);
  color: var(--ink);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  background: var(--night);
  color: var(--night-text);
  border-bottom: 1px solid #393c35;
}
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 4.75rem; }
.wordmark { display: flex; flex-shrink: 0; width: 8.5rem; }
.wordmark img { width: 100%; height: auto; mix-blend-mode: screen; }
.global-nav { display: flex; gap: 1.5rem; align-items: center; }
.global-nav a { line-height: 1.35; padding-block: 0.6rem; }
.global-nav a:hover, .global-nav [aria-current] { color: var(--accent); }
.draft-label {
  margin-left: auto;
  color: var(--night-muted);
  padding: 0.23rem 0.72rem;
  border: 1px solid #51554b;
  border-radius: 20rem;
  font-size: 0.875rem;
  white-space: nowrap;
}
.site-header a:focus-visible, .home-hero a:focus-visible, .intro video:focus-visible { outline-color: var(--accent); }

.home-hero {
  color: var(--night-text);
  background:
    radial-gradient(ellipse at 84% -22%, #373d31 0%, transparent 59%),
    linear-gradient(155deg, #1d211b, var(--night) 77%);
}
.hero-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5.6vw, 5.2rem);
  align-items: center;
  padding-block: clamp(3rem, 5.8vw, 6.1rem);
}
.hero-copy h1 {
  font-size: clamp(3.35rem, 6.6vw, 6.1rem);
  font-weight: 780;
  line-height: 0.99;
  letter-spacing: -0.075em;
}
.hero-copy p {
  max-width: 22rem;
  margin-top: 1.65rem;
  color: var(--night-muted);
  line-height: 1.72;
  font-size: 1.125rem;
  word-break: keep-all;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.75rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: 0.66rem 1.05rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-weight: 700;
  line-height: 1.4;
  transition: background 140ms ease, border-color 140ms ease;
}
.button.primary { background: var(--accent); color: var(--ink); }
.button.primary:hover { background: #edf4d9; }
.button.secondary { color: var(--night-text); border-color: #565c50; }
.button.secondary:hover { background: #31362d; border-color: #a4ad97; }
.intro { min-width: 0; }
.intro video {
  width: 100%;
  height: auto;
  aspect-ratio: 64 / 37;
  border-radius: var(--radius);
  border: 1px solid #464a42;
  background: #0a0a0a;
  box-shadow: 0 1.2rem 2.5rem #0004;
}
.intro figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  color: var(--night-muted);
  font-size: 0.875rem;
}

.games-section { padding-block: 2.8rem 4rem; }
.section-heading { margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.section-heading h2 { font-size: clamp(1.65rem, 3.3vw, 2.3rem); }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.game-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.image-link { display: block; }
.image-link:focus-visible { outline-offset: -0.3rem; }
.game-visual { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: #202722; }
.battle-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.game-card-body { padding: 1.25rem 1.45rem 1.5rem; }
.game-card-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 0.8rem; }
.game-card h3 { font-size: clamp(1.65rem, 3vw, 2.2rem); }
.platform { color: #474f41; font-size: 0.875rem; font-weight: 700; }
.game-card p { margin-block: 0.72rem 0.82rem; color: var(--muted); word-break: keep-all; }
.text-link { color: #2f623f; font-weight: 700; text-decoration: underline; text-underline-offset: 0.25em; }
.text-link:hover, .game-card h3 a:hover { color: #225a34; }
.pixel-visual {
  display: flex;
  justify-content: center;
  align-items: end;
  padding-bottom: 7%;
  gap: 2%;
  background:
    linear-gradient(transparent 71%, #101a188c 71%, #101a18 100%),
    radial-gradient(ellipse at 50% 58%, #404d42 0%, #283532 51%, #192521 100%);
}
.sprite {
  display: block;
  width: 23%;
  aspect-ratio: 1 / 1;
  background: url("/assets/dungeondam-sprites.png") no-repeat;
  background-size: 300% 200%;
  image-rendering: pixelated;
  filter: drop-shadow(0 0.55rem 0.35rem #111a15);
}
.miner { background-position: 0 0; }
.bat { background-position: 50% 0; transform: translateY(-17%); }
.slime { background-position: 100% 0; }

.inner-main { padding-block: 2rem 4.2rem; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  color: var(--muted);
  margin-bottom: 2.2rem;
  font-size: 0.875rem;
}
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 0.23em; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 700; }
.inner-main h1 { font-size: clamp(2.2rem, 5.5vw, 4.15rem); letter-spacing: -0.07em; }
.lead { color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.2rem); line-height: 1.72; word-break: keep-all; }
.game-intro { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: clamp(1rem, 4vw, 3.3rem); }
.game-intro h1 { margin-top: 0.5rem; }
.english-name { color: #424c40; font-weight: 700; margin-block: 0.35rem 1rem; }
.game-intro .game-visual { border-radius: var(--radius); border: 1px solid #354039; }
.features {
  margin-block: 2.2rem 3.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.features div { padding: 1.3rem 1.35rem; }
.features div:first-child { padding-left: 0; }
.features div + div { border-left: 1px solid var(--line); }
.features h2 { font-size: 1.23rem; margin-bottom: 0.6rem; }
.features p { color: var(--muted); word-break: keep-all; }
.document-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.document-links a {
  min-height: 6.3rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.document-links a:hover { border-color: #8b9f88; background: #fbfdf7; }
.document-links strong { font-size: 1.15rem; }
.document-links span { color: var(--muted); word-break: keep-all; }

.support-index .lead { margin-block: 1rem 1.4rem; }
.support-index .document-links { max-width: 52rem; }
.document-layout {
  display: grid;
  grid-template-columns: minmax(0, 48rem) minmax(11rem, 1fr);
  gap: clamp(1.5rem, 4.3vw, 4rem);
  align-items: start;
}
.document-game { color: #465044; font-weight: 700; margin-bottom: 0.45rem; }
.document-body .lead { margin-top: 1rem; }
.document-status {
  display: grid;
  gap: 0.25rem;
  background: #eeeee3;
  border-left: 0.25rem solid #899675;
  color: #373c31;
  border-radius: 0 0.45rem 0.45rem 0;
  padding: 0.85rem 1.05rem;
  margin-top: 1.35rem;
}
.document-section { margin-top: 1.65rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.document-section h2 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.document-section p { color: #30362d; word-break: keep-all; }
.document-section p + p { margin-top: 0.6rem; }
.related-links { border: 1px solid var(--line); border-radius: 0.75rem; padding: 1rem 1.1rem; background: var(--white); }
.related-links h2 { font-size: 1.1rem; padding-bottom: 0.65rem; }
.related-links a { display: block; padding-block: 0.55rem; border-top: 1px solid var(--line); color: #3a5240; }
.related-links a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 4.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand { font-weight: 750; }
.footer-inner nav { display: flex; gap: 0.8rem 1.4rem; flex-wrap: wrap; color: var(--muted); }
.footer-inner nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 52rem) {
  .wrap { width: calc(100% - 2.75rem); }
  .hero-layout { gap: 2rem; }
  .hero-copy h1 { font-size: clamp(3rem, 8vw, 4.5rem); }
  .hero-copy p { font-size: 1rem; }
  .document-layout { grid-template-columns: 1fr; }
  .related-links { margin-top: 0.65rem; }
}

@media (max-width: 37.5rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { gap: 0.75rem; flex-wrap: wrap; padding-block: 0.65rem; }
  .wordmark { width: 6.15rem; }
  .global-nav { order: 3; flex-basis: 100%; gap: 1rem; }
  .global-nav a { padding-block: 0.16rem; }
  .hero-layout { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 2.2rem; }
  .hero-copy h1 { font-size: clamp(2.85rem, 13vw, 4rem); }
  .hero-copy p { margin-top: 1rem; }
  .hero-actions { margin-top: 1.15rem; }
  .games-section { padding-block: 2rem 2.75rem; }
  .game-grid, .game-intro, .features, .document-links { grid-template-columns: 1fr; }
  .game-card-body { padding: 1.05rem 1.1rem 1.2rem; }
  .breadcrumbs { margin-bottom: 1.4rem; }
  .features { margin-block: 2rem; }
  .features div { padding: 1rem 0; }
  .features div + div { border-left: 0; border-top: 1px solid var(--line); }
  .footer-inner { align-items: start; flex-direction: column; padding-block: 1.05rem; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
