:root {
  color-scheme: light;
  --ink: #142033;
  --muted: #536174;
  --paper: #fbfcfe;
  --surface: #fff;
  --line: #e0e6ee;
  --tint: #edf2f8;
  --night: #142235;
  --gold: #ffd674;
  --gutter: clamp(16px, 4.8vw, 56px);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
html[lang="ko"] [data-lang="en"],
html[lang="en"] [data-lang="ko"] { display: none; }

:focus-visible {
  outline: 3px solid #2f65a0;
  outline-offset: 3px;
}

.shell {
  width: min(100% - 2 * var(--gutter), 1080px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset: 8px auto auto 8px;
  z-index: 2;
  padding: 12px 16px;
  transform: translateY(calc(-100% - 8px));
  background: var(--gold);
  color: var(--night);
  font-weight: 750;
}

.skip-link:focus { transform: none; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner,
.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: 68px;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  flex-shrink: 0;
  gap: 10px;
  min-height: 44px;
  font-size: 1.26rem;
  font-weight: 850;
  letter-spacing: -.043em;
  white-space: nowrap;
}

.brand img { width: 32px; height: 32px; }

.site-nav {
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: .94rem;
  font-weight: 650;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--ink); }

#language-switch {
  min-width: 48px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

#language-switch:hover { background: var(--tint); }

.spotlight {
  padding-top: clamp(31px, 5vw, 58px);
}

.section-heading { margin-bottom: 21px; }

.section-heading h1,
.catalog h2,
.studio h2 {
  font-size: clamp(1.82rem, 3.65vw, 2.78rem);
  font-weight: 850;
  letter-spacing: -.058em;
  line-height: 1.08;
  word-break: keep-all;
}

.section-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(.91rem, 1.5vw, 1.08rem);
  line-height: 1.45;
  word-break: keep-all;
}

.spotlight-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr);
  gap: 14px;
}

.spotlight-game {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  overflow: hidden;
  min-height: clamp(213px, 26vw, 270px);
  border-radius: 15px;
  background: #182c42;
  color: #fff;
}

.spotlight-game img,
.spotlight-game::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.spotlight-game img {
  z-index: -2;
  object-fit: cover;
  object-position: center top;
}

.spotlight-game::after {
  z-index: -1;
  content: "";
  background:
    linear-gradient(0deg, rgb(8 17 29 / 97%), rgb(8 17 29 / 60%) 33%, transparent 77%),
    linear-gradient(90deg, rgb(8 17 29 / 25%), transparent 67%);
}

.spotlight-game:hover .spotlight-action { text-decoration: underline; }
.spotlight-game:focus-visible { outline-offset: 2px; }

.spotlight-copy {
  display: grid;
  gap: 5px;
  padding: 20px 23px;
}

.spotlight-kind {
  color: #e2e9f2;
  font-size: .8rem;
  font-weight: 700;
}

.spotlight-copy strong {
  font-size: clamp(1.55rem, 3vw, 2.34rem);
  font-weight: 840;
  letter-spacing: -.057em;
  line-height: 1.1;
  word-break: keep-all;
}

.spotlight-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 4px;
  color: var(--gold);
  font-size: .86rem;
  font-weight: 760;
}

.arrow {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.arrow::before,
.arrow::after {
  position: absolute;
  content: "";
}

.arrow::before {
  top: 7px;
  left: 1px;
  width: 12px;
  height: 1.5px;
  background: currentColor;
}

.arrow::after {
  top: 4px;
  right: 2px;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.quick-links {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 66px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.quick-links a:hover {
  border-color: #adc0d4;
  background: var(--tint);
}

.quick-links strong {
  display: block;
  font-size: .95rem;
  font-weight: 780;
  word-break: keep-all;
}

.quick-links div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.25;
  word-break: keep-all;
}

.quick-links .arrow { color: #325577; }

.catalog {
  padding-block: clamp(42px, 6vw, 70px);
  scroll-margin-block-start: 20px;
}

.catalog-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.catalog h2,
.studio h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }

.catalog-sort:not([hidden]) {
  display: flex;
  gap: 3px;
}

.catalog-sort button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
}

.catalog-sort button:hover { color: var(--ink); }

.catalog-sort button[aria-pressed="true"] {
  background: var(--tint);
  color: #244767;
}

.game-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 18px;
  padding-block: 13px;
  border-bottom: 1px solid var(--line);
  scroll-margin-block-start: 18px;
}

.game-row:target {
  background: #f1f5fa;
}

.game-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 21%;
}

.game-name {
  font-size: clamp(1.06rem, 1.7vw, 1.33rem);
  font-weight: 830;
  letter-spacing: -.045em;
  line-height: 1.14;
  word-break: keep-all;
}

.game-kind,
.game-summary {
  color: var(--muted);
  line-height: 1.45;
  word-break: keep-all;
}

.game-kind {
  margin-top: 4px;
  font-size: .79rem;
  font-weight: 680;
}

.game-summary {
  margin-top: 5px;
  font-size: .91rem;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.store-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid #d8e0e9;
  border-radius: 6px;
  background: var(--surface);
  color: #28394d;
  font-size: .8rem;
  font-weight: 750;
  white-space: nowrap;
}

.store-links a:hover {
  border-color: #97afc5;
  background: var(--tint);
}

.studio {
  padding-block: clamp(36px, 5vw, 65px);
  border-top: 1px solid var(--line);
  background: var(--tint);
}

.studio-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.studio p {
  max-width: 560px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  word-break: keep-all;
}

.studio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: .89rem;
  font-weight: 760;
}

.button-primary {
  background: var(--gold);
  color: var(--night);
}

.button-primary:hover { background: #ffe298; }

.button-secondary {
  border-color: #c5d1df;
  background: var(--surface);
}

.button-secondary:hover { border-color: #7e9ab4; }

.site-footer {
  padding-block: 22px;
  background: var(--night);
  color: #c8d3df;
}

.site-footer :focus-visible { outline-color: var(--gold); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px 15px;
  font-size: .8rem;
  line-height: 1.55;
}

.footer-inner > :first-child {
  color: #fff;
  font-weight: 750;
  white-space: nowrap;
}

.footer-inner p { word-break: keep-all; }
.footer-inner a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .spotlight-layout { grid-template-columns: minmax(0, 1fr); }

  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .game-row {
    grid-template-columns: clamp(64px, 19.5vw, 86px) minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
  }

  .game-icon { grid-row: 1 / 3; }
  .store-links { grid-column: 2; }
}

@media (max-width: 570px) {
  .header-inner { min-height: 61px; gap: 8px; }
  .brand { gap: 7px; font-size: 1.06rem; }
  .brand img { width: 28px; height: 28px; }
  .site-nav { gap: 10px; font-size: .84rem; }
  .site-nav a[href="#studio"] { display: none; }
  #language-switch { min-width: 43px; padding-inline: 6px; }

  .section-heading { margin-bottom: 15px; }

  .spotlight-layout { gap: 10px; }
  .spotlight-game { min-height: clamp(183px, 56vw, 235px); }
  .spotlight-copy { padding: 15px; }
  .quick-links { gap: 7px; }

  .quick-links a { padding: 9px; }
  .quick-links strong { font-size: .85rem; }
  .quick-links div > span { font-size: .73rem; }

  .catalog-heading { padding-bottom: 7px; }
  .game-summary { font-size: .85rem; }
  .store-links a { padding-inline: 6px; font-size: .75rem; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 355px) {
  .site-nav { gap: 7px; }
  .brand { font-size: 1rem; }
  .quick-links div > span { font-size: .69rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

.store-links .game-detail-link {
  border-color: #cad7e6;
  background: var(--tint);
  color: #244767;
}
