@font-face {
  font-family: "Nanum Brush Script";
  src: url("NanumBrushScript-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  font-family: "Nanum Brush Script", Arial, Helvetica, sans-serif;
  background-color: #F7C9D4;
  margin: 1rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 1rem auto 2rem;
}

.site-nav a {
  flex: 0 1 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-nav img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.sim-card { margin-bottom: 2rem; }

.portrait {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-block: 1rem;
}

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.traits li { text-align: center; }

.trait-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0 auto 0.25rem;
}

.sim-card iframe {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  margin-block: 1rem;
}

.download-card {
  max-width: 500px;
  padding: 1rem;
  background-color: white;
  border-radius: 0.75rem;
}

.download-preview {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.download-button {
  display: inline-block;
  background-color: #7A3550;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.chapter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.chapter-list a img {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
}

.family-tree-frame {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: min(80vh, 900px);
  min-height: 450px;
  border: 0;
  margin: 1rem auto;
}

@media (max-width: 600px) {
  .site-nav { gap: 0.75rem; }
  .site-nav a { flex-basis: 110px; }
}