:root {
  font-family: Fredoka, system-ui, sans-serif;
  color: #f8fafc;
  background: #160b3a;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at 10% 10%, #3b1d8a 0%, transparent 32%),
    radial-gradient(circle at 90% 0%, #9f1239 0%, transparent 28%),
    linear-gradient(#1a0b3c, #0b1220 70%);
}

button {
  font: inherit;
  cursor: pointer;
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand {
  background: transparent;
  border: 0;
  padding: 0;
}

.logo {
  display: block;
  height: 92px;
  width: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.quiz-btn,
.learn-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: #facc15;
  color: #111827;
  font-weight: 700;
}

.back {
  border: 2px solid #ffffff66;
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: #f8fafc;
  font-weight: 700;
  margin-block: 24px;
}

.back:hover,
.back:focus-visible {
  background: #ffffff14;
  border-color: #ffffffaa;
}

.hero {
  margin: 10px 0 18px;
  text-align: center;
}

.quiz-btn {
  white-space: nowrap;
  flex: 0 0 auto;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #facc15;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}

h1 {
  font-family: Bangers, cursive;
  font-size: clamp(46px, 6.5vw, 80px);
  line-height: 0.95;
  margin: 0 0 10px;
  letter-spacing: 1px;
}

.lede {
  font-size: 20px;
  line-height: 1.45;
  max-width: 720px;
}

.hero .lede {
  margin-inline: auto;
}

.description .about {
  font-size: 22px;
  line-height: 1.55;
  max-width: 720px;
  margin: 0;
}

.read-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-block: 24px;
}

.word {
  border-radius: 6px;
  padding: 0 0.08em;
}

.word.on {
  background: #facc15;
  color: #111827;
}

.catch .word.on {
  background: #facc15;
  color: #111827;
}

.home-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  margin: 18px 0 22px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
}

.chip {
  border: 2px solid #ffffff33;
  background: #ffffff14;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
}

.chip.on {
  background: #ef4444;
  border-color: #ef4444;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 220px));
  gap: 18px;
}

.portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  background: #f7f8fc;
}

.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 16px;
  border: 0;
  border-radius: 28px;
  background: color-mix(in srgb, var(--card-color, #1d4ed8) 38%, #0b1220);
  color: #fff;
  transition: transform 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card strong {
  font-size: 20px;
}

.card span {
  opacity: 0.8;
  font-size: 13px;
}

.profile {
  background: color-mix(in srgb, var(--card-color) 28%, #0b1220);
  border-radius: 36px;
  padding: 28px;
  box-shadow: 0 18px 0 #00000055;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 24px;
  align-items: center;
}

.catch {
  display: block;
  margin: 24px 0 0;
  padding: 0;
  background: none;
  border-radius: 0;
  color: #facc15;
  font-weight: 700;
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  cursor: default;
}

.catch::before {
  content: "“";
}

.catch::after {
  content: "”";
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.panels section {
  background: #ffffff14;
  border-radius: 24px;
  padding: 16px 18px;
}

.panels h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.panels ul {
  margin: 0;
  padding-left: 18px;
  font-size: 17px;
  line-height: 1.5;
}

.learn-btn {
  font-size: 20px;
}

#read-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sound-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: 0 0 auto;
}

.quiz h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  max-width: 900px;
  margin-bottom: 0;
}

.quiz h1 .word {
  display: inline-block;
}

.card.good {
  outline: 5px solid #4ade80;
}

.card.bad {
  outline: 5px solid #f87171;
  opacity: 0.7;
}

.quiz-next {
  margin-top: 22px;
  font-size: 22px;
  font-weight: 700;
}

.finish {
  background: #ffffff14;
  border-radius: 32px;
  padding: 32px;
}

@media (max-width: 700px) {
  .logo {
    height: 88px;
  }

  .grid,
  .quiz-grid {
    gap: 28px;
  }

  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .back-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    margin: 0;
    padding: 28px 24px calc(16px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      to top,
      #0b1220 0%,
      rgba(11, 18, 32, 0.96) 58%,
      rgba(11, 18, 32, 0) 100%
    );
  }

  .back-bar .back {
    margin-block: 0;
  }

  .detail,
  .quiz {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
}
