:root {
  --mat: #d6f2e4;
  --mat-line: #b5e3cd;
  --paper: #ffffff;
  --ink: #3a2e5f;
  --muted: #6f6790;
  --edge: #3a2e5f;
  --round: "Jua", "Gowun Dodum", system-ui, sans-serif;
  --body: "Gowun Dodum", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mat: #1b3830;
    --mat-line: #24493f;
    --paper: #2b2545;
    --ink: #f1ecff;
    --muted: #b6aedc;
    --edge: #0f0c1c;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--mat);
  /* 커팅 매트 같은 모눈 */
  background-image:
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

.top { padding: 40px 16px 8px; text-align: center; }
.logo { margin: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; font-family: var(--round); font-weight: 400; }
.logo span {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.5rem;
  font-size: 1.6rem;
  background: #ffd23f; color: #2a2145;
  border: 3px solid var(--edge); border-radius: 8px;
  box-shadow: 0 4px 0 var(--edge);
}
.logo span:nth-child(3n+2) { background: #ff7aa8; }
.logo span:nth-child(3n) { background: #5cc8ff; }
.logo .dash { width: 1.2rem; background: transparent; border-color: transparent; box-shadow: none; color: var(--ink); }
.sub { margin: 18px 0 0; font-size: 1.05rem; color: var(--muted); }

main { flex: 1; width: min(960px, 100%); margin: 0 auto; padding: 28px 16px 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }

.card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 0 0 16px;
  background: var(--paper); color: inherit; text-decoration: none;
  border: 3px solid var(--edge); border-radius: 18px;
  box-shadow: 0 6px 0 var(--edge);
  overflow: hidden;
  transition: translate 0.12s, box-shadow 0.12s;
}
.card .pic {
  display: grid; place-items: center;
  height: 112px; font-size: 3.4rem;
  background: var(--c);
  border-bottom: 3px solid var(--edge);
}
.card h2 { margin: 6px 16px 0; font-family: var(--round); font-weight: 400; font-size: 1.35rem; }
.card p { margin: 0 16px; line-height: 1.55; color: var(--muted); }
.card .go {
  margin: auto 16px 0; align-self: flex-start;
  padding: 6px 16px; font-family: var(--round);
  background: #ffd23f; color: #2a2145;
  border: 3px solid var(--edge); border-radius: 999px;
  box-shadow: 0 3px 0 var(--edge);
}
a.card:hover { translate: 0 -3px; box-shadow: 0 9px 0 var(--edge); }
a.card:active { translate: 0 3px; box-shadow: 0 3px 0 var(--edge); }
a.card:focus-visible { outline: 4px solid #ff7aa8; outline-offset: 4px; }
.card.soon { border-style: dashed; box-shadow: none; }
.card.soon .pic { opacity: 0.75; }
.card.soon .go { background: transparent; box-shadow: none; border-style: dashed; color: var(--muted); }

.legal { padding: 8px 16px 22px; text-align: center; font-size: 0.8rem; color: var(--muted); }
.legal p { margin: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 520px) {
  .logo span { width: 1.7rem; height: 2.1rem; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
