:root {
  --cream: #fbf5ea;
  --cream-deep: #f4ead8;
  --paper: #fffdf8;
  --ink: #4a3a2c;
  --ink-soft: #7a6654;
  --leaf: #6f9d58;
  --leaf-deep: #4f7d3d;
  --leaf-pale: #e5efd8;
  --blush: #f3b9b0;
  --blush-pale: #fbe3dd;
  --honey: #f2c76b;
  --honey-pale: #fcefd0;
  --line: rgba(74, 58, 44, 0.12);
  --shadow: 0 18px 40px -22px rgba(92, 64, 36, 0.45);
  --shadow-soft: 0 10px 26px -18px rgba(92, 64, 36, 0.4);
  --radius-lg: 32px;
  --radius-md: 22px;
  --font-title: "Jua", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}

html:lang(ko) {
  --font-body: "Gowun Dodum", "Nunito", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(60rem 30rem at 92% -6%, var(--blush-pale), transparent 70%),
    radial-gradient(50rem 28rem at -10% 18%, var(--leaf-pale), transparent 70%),
    var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
  border-radius: 8px;
}

.page-width {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  fill: var(--blush);
}

.brand__mark .brand__core {
  fill: var(--honey);
}

.brand__name {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

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

.language-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.language-switch button {
  min-height: 34px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  background: var(--leaf);
  color: #fff;
}

/* Shared bits */

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--honey-pale);
  color: #9a6a22;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--leaf);
  box-shadow: 0 6px 0 var(--leaf-deep), var(--shadow-soft);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--leaf-deep), var(--shadow-soft);
}

.button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--leaf-deep), var(--shadow-soft);
}

.button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--small {
  min-height: 44px;
  padding: 8px 20px;
  font-size: 0.95rem;
}

.section-heading {
  margin-bottom: 36px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 56px;
  padding-block: 48px 96px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4rem);
}

.hero__lead {
  max-width: 30em;
  margin-block: 20px 32px;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.hero__art {
  position: relative;
  margin: 0;
  padding: 24px 24px 40px;
}

.hero__frame {
  overflow: hidden;
  border: 10px solid var(--paper);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(-2.5deg);
}

.hero__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  border-radius: 20px;
}

.hero__sticker {
  position: absolute;
  right: -4px;
  bottom: -6px;
  width: clamp(96px, 26%, 150px);
  height: auto;
  border: 6px solid var(--paper);
  border-radius: 30%;
  box-shadow: var(--shadow);
  transform: rotate(6deg);
  animation: bob 5s ease-in-out infinite;
}

.hero__leaf {
  position: absolute;
  border-radius: 0 70% 0 70%;
  background: var(--leaf-pale);
  box-shadow: inset 0 0 0 2px rgba(111, 157, 88, 0.25);
}

.hero__leaf--one {
  top: -6px;
  left: 2px;
  width: 64px;
  height: 64px;
  transform: rotate(-20deg);
}

.hero__leaf--two {
  bottom: 18px;
  left: 30px;
  width: 38px;
  height: 38px;
  background: var(--blush-pale);
  box-shadow: inset 0 0 0 2px rgba(243, 185, 176, 0.5);
  transform: rotate(30deg);
}

/* Games */

.games {
  padding-block: 88px 40px;
  border-radius: 56px 56px 0 0;
  background: var(--paper);
  box-shadow: 0 -1px 0 var(--line);
}

.game-list {
  display: grid;
  gap: 40px;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: rise 0.6s both;
}

.game-card--flip .game-card__media {
  order: 2;
}

.game-card--loading {
  min-height: 300px;
  background: linear-gradient(100deg, var(--cream) 30%, var(--cream-deep) 50%, var(--cream) 70%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.game-card__media {
  min-height: 260px;
  background: var(--cream-deep);
}

.game-card__banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 36px 40px;
}

.game-card__heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.game-card__icon {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.game-card h3 {
  font-size: 2rem;
}

.game-card__tagline {
  color: var(--ink-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 700;
}

.game-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--blush-pale);
  color: #a8503f;
  font-weight: 800;
  font-size: 0.95rem;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

.text-link {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--leaf-deep);
}

.feed-error {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px 24px;
  border-radius: var(--radius-lg);
  background: var(--cream);
  color: var(--ink-soft);
  text-align: center;
}

.is-missing {
  visibility: hidden;
}

/* About */

.about {
  padding-block: 56px 104px;
  background: var(--paper);
}

.value-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-card {
  padding: 32px 28px;
  border-radius: var(--radius-md);
  background: var(--leaf-pale);
}

.value-card--heart {
  background: var(--blush-pale);
}

.value-card--sprout {
  background: var(--honey-pale);
}

.value-card svg {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-card h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.value-card p {
  color: var(--ink-soft);
}

/* Footer */

.site-footer {
  padding-block: 48px;
  background: var(--cream-deep);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__tagline {
  margin-top: 6px;
  color: var(--ink-soft);
}

.site-footer__links {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer__links a {
  font-weight: 700;
  text-underline-offset: 4px;
}

.site-footer__biz {
  flex-basis: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.site-footer__biz p {
  margin: 0;
}

.site-footer__biz a {
  font-weight: 700;
  text-underline-offset: 3px;
}

/* Document pages (privacy policy) */

.doc {
  padding-block: 24px 96px;
}

.doc__card {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(28px, 6vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
}

.doc__meta {
  margin-block: 16px 28px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.doc__meta p + p {
  margin-top: 2px;
}

.doc__summary {
  margin-bottom: 36px;
  padding: 22px 26px;
  border-radius: var(--radius-md);
  background: var(--leaf-pale);
}

.doc h2 {
  margin-block: 36px 12px;
  font-size: 1.45rem;
}

.doc__summary h2 {
  margin-block: 0 8px;
  font-size: 1.3rem;
}

.doc p + p,
.doc p + ul,
.doc ul + p {
  margin-top: 12px;
}

.doc ul {
  margin: 0;
  padding-left: 1.3em;
}

.doc li + li {
  margin-top: 6px;
}

.doc a {
  color: var(--leaf-deep);
  font-weight: 700;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc__langs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.doc__langs a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
}

.doc__divider {
  height: 1px;
  margin-block: 56px;
  border: 0;
  background: var(--line);
}

/* Motion */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes bob {
  50% {
    transform: rotate(3deg) translateY(-8px);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Layout breakpoints */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 24px 72px;
  }

  .game-card,
  .game-card--flip {
    grid-template-columns: 1fr;
  }

  .game-card--flip .game-card__media {
    order: 0;
  }

  .game-card__media {
    min-height: 0;
    aspect-ratio: 5 / 2;
  }

  .value-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .language-switch {
    margin-left: auto;
  }

  .games {
    padding-block: 64px 24px;
    border-radius: 36px 36px 0 0;
  }

  .game-card__body {
    padding: 26px 22px 30px;
  }

  .game-card__icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }

  .game-card h3 {
    font-size: 1.65rem;
  }

  .about {
    padding-block: 40px 72px;
  }
}
