:root{
  --bg-top: #1E2740;
  --bg-bottom: #2B3856;
  --sage: #A9C79A;
  --lavender: #C9BEE0;
  --coral: #EFA15E;
  --pink: #F3C4CE;
  --cream: #F6F1E4;
  --muted: rgba(246,241,228,0.68);
  --faint: rgba(246,241,228,0.45);
  --line: rgba(246,241,228,0.16);
  --panel: rgba(255,255,255,0.05);
  --content-w: min(560px, 88vw);
  --page-w: min(920px, 90vw);
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html[data-lang="en"] .t-ko{ display: none !important; }
html[data-lang="ko"] .t-en{ display: none !important; }

body{
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: var(--cream);
  font-family: 'Noto Sans KR', sans-serif;
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}
html{ background: var(--bg-bottom); }

html[data-lang="ko"] body{
  word-break: keep-all;
  overflow-wrap: break-word;
}

a{ color: var(--sage); }
a:focus-visible, button:focus-visible{
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

/* ---------- top navigation ---------- */
.site-nav{
  width: var(--page-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0 0.6rem;
  position: relative;
  z-index: 2;
}
.nav-brand{
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cream);
  text-decoration: none;
}
.nav-right{
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.nav-links{
  display: flex;
  gap: 0.3rem;
}
.nav-links a{
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.45em 1em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover{ color: var(--cream); background: rgba(255,255,255,0.06); }
.nav-links a[aria-current="page"]{
  color: var(--cream);
  background: rgba(255,255,255,0.09);
  border-color: var(--line);
}
.lang-toggle{
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button{
  font: inherit;
  font-size: 0.78rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0.4em 0.85em;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"]{
  color: var(--bg-top);
  background: var(--cream);
  font-weight: 700;
}

/* ---------- home ---------- */
main{
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.home{
  justify-content: center;
  padding: 3vh 6vw 4vh;
}

.eyebrow{
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin: 0 0 2.2rem;
  text-align: center;
  line-height: 1.9;
}

.logo-wrap{
  position: relative;
  width: min(420px, 78vw);
  margin: 0 auto 0.4rem;
}
.logo-wrap img{
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
}

.particles{
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.petal{
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  opacity: 0;
  animation: drift 6s ease-in-out infinite;
}
.petal--1{ left: 30%; top: 28%; background: var(--pink); animation-delay: 0s; }
.petal--2{ left: 68%; top: 40%; background: var(--coral); animation-delay: 2s; }
.petal--3{ left: 52%; top: 22%; background: var(--lavender); animation-delay: 4s; }

@keyframes drift{
  0%   { opacity: 0; transform: translateY(0) translateX(0) rotate(0deg); }
  16%  { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-70px) translateX(18px) rotate(60deg); }
}

.desc{
  max-width: var(--content-w);
  text-align: center;
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.98rem;
  margin: 1.6rem 0 1rem;
}

/* ---------- games page ---------- */
.games{
  width: var(--page-w);
  padding: 1.5rem 0 1rem;
}
.page-title{
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin: 1rem 0 1.6rem;
  line-height: 1.8;
}
.game-card{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 2rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.game-card .cover{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  image-rendering: auto;
}
.game-info h2{
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
  line-height: 1.25;
  color: var(--cream);
}
.badge{
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.5em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  font-size: 0.8rem;
  color: var(--cream);
  margin-bottom: 1rem;
}
.badge::before{
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 8px var(--sage);
  flex: none;
}
.game-info p{
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.97rem;
}

.stores{
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 0.8em 1.5em;
  border-radius: 10px;
  letter-spacing: 0.01em;
}
.btn--primary{
  color: var(--bg-top);
  background: var(--sage);
  box-shadow: 0 4px 0 #7a9a6c;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn--primary:hover{ transform: translateY(-2px); }
.btn--primary:active{ transform: translateY(2px); box-shadow: 0 1px 0 #7a9a6c; }
.btn--soon{
  color: var(--faint);
  border: 1px dashed var(--line);
  background: transparent;
  cursor: default;
  font-weight: 500;
}
.btn small{
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
}

.section-title{
  font-size: 1.05rem;
  margin: 2.4rem 0 1rem;
  color: var(--coral);
}
.features{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.features li{
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.93rem;
}
.features li:last-child:nth-child(odd){ grid-column: 1 / -1; }
.features strong{
  display: block;
  color: var(--cream);
  margin-bottom: 0.2rem;
  font-size: 0.98rem;
}

.shots{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.shots a{
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.shots img{
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}
.shots a:hover img{ transform: scale(1.02); }

/* ---------- document pages (privacy) ---------- */
.doc{
  width: min(760px, 90vw);
  padding: 1.5rem 0 1rem;
}
.doc-title{
  font-size: 1.9rem;
  line-height: 1.3;
  margin: 1rem 0 0.4rem;
  color: var(--cream);
}
.doc-meta{
  margin: 0 0 1.8rem;
  color: var(--faint);
  font-size: 0.85rem;
}
.doc h2{
  font-size: 1.05rem;
  color: var(--coral);
  margin: 2rem 0 0.5rem;
}
.doc p{
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.98rem;
}
.doc strong{ color: var(--cream); }

/* ---------- footer ---------- */
footer{
  margin-top: 3.2rem;
  padding: 0 6vw 2.4rem;
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.9;
}
footer a{ text-decoration: none; }
footer a:hover{ text-decoration: underline; }
.footer-contact{ color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 760px){
  .site-nav{ flex-wrap: wrap; row-gap: 0.6rem; }
  .game-card{ grid-template-columns: 1fr; gap: 1.2rem; padding: 1rem; }
  .features, .shots{ grid-template-columns: 1fr; }
  .game-info h2{ font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce){
  .petal{ animation: none; opacity: 0.22; }
  .btn--primary, .shots img{ transition: none; }
}
