:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5f6368;
  --line: #d8dee4;
  --paper: #ffffff;
  --surface: #f6f8fa;
  --accent: #1f7a8c;
  --accent-dark: #14515d;
  --ok: #16794c;
  --fail: #b42318;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 12px 30px rgb(16 24 40 / 8%);
  --shadow-soft: 0 6px 18px rgb(16 24 40 / 7%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #b7c0cc;
  --line: #344054;
  --paper: #151b24;
  --surface: #0b1118;
  --accent: #35b6c8;
  --accent-dark: #7ddce8;
  --ok: #5bd28f;
  --fail: #ff8a80;
  --shadow: 0 14px 34px rgb(0 0 0 / 28%);
  --shadow-soft: 0 8px 22px rgb(0 0 0 / 22%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 10%, transparent), transparent 32rem),
    var(--surface);
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem clamp(0.75rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

.logo-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo-brand img {
  display: block;
  width: min(340px, 62vw);
  height: auto;
  max-height: 82px;
}

.logo-brand .logo-dark {
  display: none;
}

:root[data-theme="dark"] .logo-brand .logo-light {
  display: none;
}

:root[data-theme="dark"] .logo-brand .logo-dark {
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

nav a {
  border-radius: 999px;
  padding: 0.5rem 0.72rem;
  text-decoration: none;
  font-weight: 700;
}

nav a:hover {
  background: var(--surface);
}

.sound-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: var(--paper);
  color: var(--accent-dark);
}

.sound-toggle:hover {
  background: var(--surface);
}

.sound-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-toggle .sound-off,
.sound-toggle.is-muted .sound-on {
  display: none;
}

.sound-toggle.is-muted {
  color: var(--fail);
}

.sound-toggle.is-muted .sound-off {
  display: block;
}

.nav-user {
  font-weight: 800;
  color: var(--accent-dark);
}

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.25rem) 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: end;
  padding: clamp(1.25rem, 4vw, 2.75rem) 0;
}

.hero h1 {
  max-width: 720px;
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
}

.hero h1 span {
  font-size: clamp(1.35rem, 4vw, 2.6rem);
  font-weight: 650;
}

.hello {
  margin: 0 0 0.5rem;
  color: var(--accent-dark);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 800;
}

.hero-pimpams {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.hero-pimpams h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.hero-pimpams ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pimpam-compact-list {
  gap: 0.5rem;
}

.pimpam-compact-item {
  display: grid;
  grid-template-columns: minmax(78px, 0.55fr) minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  border: 1px solid color-mix(in srgb, currentColor 32%, var(--line));
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 13%, transparent), transparent 68%),
    var(--surface);
  overflow: hidden;
}

.pimpam-count-copy {
  display: grid;
  gap: 0.05rem;
}

.pimpam-count-copy strong {
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 950;
  line-height: 1;
}

.pimpam-count-copy span {
  color: currentColor;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
}

.pimpam-count-samples {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  padding-right: 0.25rem;
}

.pimpam-count-samples .mini-pimpam {
  width: 44px;
  height: 44px;
  margin-left: -0.55rem;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.pimpam-count-samples .mini-pimpam:first-child {
  margin-left: 0;
}

.pimpam-count-samples .pimpam-creature {
  width: 78px;
  height: 78px;
  transform: scale(0.52);
  transform-origin: center;
}

.pimpam-summary-link {
  margin-top: 0.75rem;
}

.rarity-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.75rem;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
}

.rarity-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rarity-line strong {
  font-size: 1.2rem;
}

.rarity-line small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.mini-pimpams {
  display: flex;
  grid-column: 1 / -1;
  gap: 0.45rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.1rem 0 0.35rem;
  scrollbar-gutter: stable;
}

.mini-pimpam {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
}

.mini-pimpam .pimpam-creature {
  width: 86px;
  height: 86px;
  transform: scale(0.55);
  transform-origin: center;
}

.mini-pimpam .motion-0,
.mini-pimpam .motion-1,
.mini-pimpam .motion-2,
.mini-pimpam .motion-3,
.mini-pimpam .motion-4,
.mini-pimpam .motion-5 {
  animation: none;
}

.rarity-text-5 {
  color: #b42318;
}

.rarity-text-4 {
  color: #8a5a00;
}

.rarity-text-3 {
  color: #7b248f;
}

.rarity-text-2 {
  color: #145ea8;
}

.rarity-text-1 {
  color: #16794c;
}

.hero p,
.meta,
.message {
  color: var(--muted);
  font-size: 1.1rem;
}

.statement-box {
  position: relative;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.35rem clamp(7.4rem, 15vw, 9.2rem);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.exercise-instruction {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.answers-box {
  position: relative;
  padding: 0 clamp(7.4rem, 15vw, 9.2rem);
}

.statement {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.55;
  font-weight: 520;
}

.exercise-arrow {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 6.5rem;
  min-height: 3rem;
  border: 2px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 999px;
  padding: 0.65rem 0.85rem;
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
  color: var(--accent-dark);
  font-size: 0.98rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transform: translateY(-50%);
}

.exercise-arrow:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.03);
}

.exercise-arrow .arrow-symbol {
  font-size: 1.45rem;
  line-height: 1;
}

.exercise-arrow.previous {
  left: 0.85rem;
}

.exercise-arrow.next {
  right: 0.85rem;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.exercise-image {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.exercise-image img {
  display: block;
  width: 100%;
  max-height: min(460px, 55vh);
  object-fit: contain;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.25rem;
  overflow-x: auto;
}

.tabs a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 1px 0 rgb(0 0 0 / 4%);
}

.tabs a.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-soft);
}

.card,
fieldset {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(0.9rem, 2vw, 1.15rem);
  box-shadow: var(--shadow-soft);
}

.tree {
  padding-left: 1.2rem;
}

.tree ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}

.status-done {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--ok);
  font-size: 0.9rem;
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stats.compact {
  grid-template-columns: minmax(180px, 260px);
}

.stats strong {
  display: block;
  font-size: 2rem;
}

.stats span {
  color: var(--muted);
}

.result-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 0;
  list-style: none;
}

.result-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(150px, 0.45fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.results-user {
  margin: -0.35rem 0 0.85rem;
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 850;
}

.metric-heading {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.metric-heading strong {
  font-size: 2.2rem;
  line-height: 1;
}

.metric-heading span {
  color: var(--muted);
  font-weight: 700;
}

.waffle,
.star-waffle {
  display: grid;
  gap: 5px;
  align-items: start;
}

.waffle {
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--waffle-rows), 18px);
  grid-auto-columns: 18px;
  width: fit-content;
  max-width: 100%;
}

.waffle span {
  width: 18px;
  height: 18px;
  border: 2px solid var(--category-color);
  border-radius: 5px;
  background:
    conic-gradient(var(--category-color) var(--score-pct), transparent 0);
  box-shadow: inset 0 0 0 2px var(--paper);
}

.star-waffle {
  grid-template-columns: repeat(10, 13px);
}

.star-waffle span {
  width: 13px;
  height: 13px;
  color: #f9a825;
  font-size: 13px;
  font-weight: 300;
  line-height: 1;
}

.average-card {
  display: flex;
  align-items: flex-start;
}

.top-player-banner {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(130px, 0.5fr) minmax(190px, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, #f9a825 24%, transparent), transparent 58%),
    color-mix(in srgb, var(--accent) 8%, var(--paper));
  box-shadow: var(--shadow-soft);
}

.top-player-banner span {
  color: var(--muted);
  font-weight: 900;
}

.top-player-banner strong {
  color: var(--accent-dark);
  font-size: 1.25rem;
  font-weight: 950;
}

.top-player-banner em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.legend {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--waffle-color);
}

.result-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.result-list span {
  color: var(--muted);
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.history-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.history-heading {
  margin: 1.2rem 0 0.7rem;
  font-size: 1.2rem;
}

.history-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.history-table th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.history-table tbody tr:last-child td {
  border-bottom: 0;
}

.history-pimpam {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent-dark);
  font-weight: 850;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.pagination span {
  color: var(--muted);
  font-weight: 800;
}

.drawer {
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.drawer summary {
  cursor: pointer;
  font-weight: 800;
}

.drawer.level {
  margin: 0.75rem 0 0 1rem;
  background: var(--surface);
}

.content-selector {
  margin-bottom: 1rem;
}

.content-selector > summary {
  display: inline-block;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.content-selector[open] > summary {
  margin-bottom: 1rem;
}

.content-selector-form {
  display: grid;
  gap: 1rem;
}

.content-selector-form fieldset {
  padding: 0.85rem;
}

.content-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.content-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: var(--surface);
  font-weight: 650;
}

.content-options input {
  width: auto;
}

.content-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.selection-note {
  color: var(--muted);
}

.collection-summary {
  color: var(--muted);
  font-size: 1.1rem;
}

.pimpam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.pimpam-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 1rem;
  border: 2px solid var(--pimpam-accent, var(--line));
  border-radius: var(--radius);
  padding: 1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pimpam-color, white) 12%, white), var(--paper) 56%);
}

.pimpam-card:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: var(--shadow);
}

.rarity-badge {
  position: absolute;
  right: 0.45rem;
  bottom: 0.4rem;
  border-radius: 999px;
  padding: 0.18rem 0.42rem;
  background: rgb(255 255 255 / 88%);
  color: #202124;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 4px rgb(0 0 0 / 18%);
}

:root[data-theme="dark"] .rarity-badge {
  background: rgb(0 0 0 / 62%);
  color: white;
}

.pimpam-card h3 {
  margin: 0 0 0.25rem;
}

.pimpam-card p {
  margin: 0.25rem 0;
}

.pimpam-card small {
  color: var(--muted);
}

.pimpam-card.locked {
  opacity: 0.58;
  filter: grayscale(0.85);
  transition: filter 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.pimpam-card.locked:hover,
.pimpam-card.locked:focus-within {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-2px);
}

.pimpam-creature {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 45% 55% 50% 50%;
  background:
    radial-gradient(circle at 30% 20%, rgb(255 255 255 / 50%) 0 10%, transparent 11%),
    radial-gradient(circle at 74% 82%, var(--pimpam-secondary, transparent) 0 18%, transparent 19%),
    var(--pimpam-color);
  box-shadow:
    inset -12px -14px 0 rgb(0 0 0 / 14%),
    0 8px 14px rgb(0 0 0 / 12%);
}

.pimpam-creature .ear {
  position: absolute;
  top: -10px;
  width: 24px;
  height: 28px;
  border-radius: 70% 70% 35% 35%;
  background: var(--pimpam-secondary, var(--pimpam-color));
  z-index: -1;
}

.pimpam-creature .ear.left {
  left: 8px;
  transform: rotate(-20deg);
}

.pimpam-creature .ear.right {
  right: 8px;
  transform: rotate(20deg);
}

.pimpam-creature .eye {
  position: absolute;
  top: 33px;
  width: 9px;
  height: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: inset 0 -4px 0 rgb(0 0 0 / 45%);
}

.pimpam-creature .eye.left {
  left: 26px;
}

.pimpam-creature .eye.right {
  right: 26px;
}

.pimpam-creature .nose {
  position: absolute;
  left: 38px;
  top: 51px;
  width: 10px;
  height: 7px;
  border-radius: 50%;
  background: rgb(0 0 0 / 42%);
}

.pimpam-creature .mark {
  position: absolute;
  background: rgb(255 255 255 / 48%);
}

.pimpam-creature .belly,
.pimpam-creature .tail,
.pimpam-creature .wing,
.pimpam-creature .horn,
.pimpam-creature .fin {
  position: absolute;
}

.pimpam-creature .belly {
  left: 25px;
  bottom: 10px;
  width: 36px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pimpam-secondary, white) 42%, white);
  opacity: 0.72;
}

.pimpam-creature .tail,
.pimpam-creature .wing,
.pimpam-creature .horn,
.pimpam-creature .fin {
  display: none;
}

.pimpam-creature .initial {
  position: absolute;
  right: 9px;
  bottom: 6px;
  color: rgb(255 255 255 / 86%);
  font-size: 0.9rem;
  font-weight: 900;
}

.shape-6 {
  border-radius: 68% 32% 44% 56%;
  transform: rotate(-3deg);
}

.shape-7 {
  border-radius: 38% 62% 64% 36%;
  transform: rotate(3deg);
}

.shape-8 {
  border-radius: 48% 52% 35% 65%;
}

.shape-9 {
  border-radius: 60% 40% 40% 60%;
}

.ears-5 .ear {
  width: 34px;
  height: 14px;
  top: 3px;
  border-radius: 999px;
}

.ears-6 .ear {
  width: 16px;
  height: 42px;
  top: -22px;
  border-radius: 999px 999px 40% 40%;
}

.ears-7 .ear {
  width: 26px;
  height: 26px;
  top: -8px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.feature-0 .tail,
.feature-5 .tail {
  display: block;
  right: -16px;
  bottom: 18px;
  width: 28px;
  height: 18px;
  border-radius: 50%;
  background: var(--pimpam-secondary, var(--pimpam-color));
  transform: rotate(-22deg);
  z-index: -1;
}

.feature-1 .wing,
.feature-6 .wing {
  display: block;
  top: 36px;
  width: 22px;
  height: 34px;
  border-radius: 80% 20% 80% 20%;
  background: color-mix(in srgb, var(--pimpam-accent, white) 75%, white);
  opacity: 0.88;
  z-index: -1;
}

.feature-1 .wing.left,
.feature-6 .wing.left {
  left: -10px;
  transform: rotate(-26deg);
}

.feature-1 .wing.right,
.feature-6 .wing.right {
  right: -10px;
  transform: rotate(26deg) scaleX(-1);
}

.feature-2 .horn,
.feature-7 .horn {
  display: block;
  left: 36px;
  top: -18px;
  width: 16px;
  height: 30px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: var(--pimpam-accent, white);
}

.feature-3 .fin,
.feature-8 .fin {
  display: block;
  left: 33px;
  top: -12px;
  width: 22px;
  height: 32px;
  border-radius: 70% 30% 60% 40%;
  background: var(--pimpam-secondary, var(--pimpam-color));
  transform: rotate(8deg);
  z-index: -1;
}

.feature-4 .tail,
.feature-9 .tail {
  display: block;
  left: -14px;
  bottom: 16px;
  width: 26px;
  height: 36px;
  border-radius: 999px 999px 10px 10px;
  background: var(--pimpam-accent, var(--pimpam-color));
  transform: rotate(24deg);
  z-index: -1;
}

.pattern-0 .mark {
  left: 13px;
  top: 13px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pimpam-accent, white);
}

.pattern-1 .mark {
  left: 9px;
  top: 48px;
  width: 48px;
  height: 8px;
  border-radius: 999px;
  transform: rotate(-20deg);
  background: var(--pimpam-accent, white);
}

.pattern-2 .mark {
  right: 10px;
  top: 12px;
  width: 12px;
  height: 48px;
  border-radius: 999px;
  transform: rotate(25deg);
  background: var(--pimpam-secondary, white);
}

.pattern-3 .mark {
  left: 32px;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  transform: rotate(45deg);
  background: var(--pimpam-accent, white);
}

.pattern-4 .mark {
  left: 12px;
  bottom: 16px;
  width: 38px;
  height: 15px;
  border-radius: 50%;
  background: var(--pimpam-secondary, white);
}

.pattern-5 .mark {
  right: 13px;
  bottom: 22px;
  width: 21px;
  height: 21px;
  clip-path: polygon(50% 0, 61% 36%, 98% 36%, 68% 57%, 80% 94%, 50% 72%, 20% 94%, 32% 57%, 2% 36%, 39% 36%);
  background: var(--pimpam-accent, white);
}

.pattern-6 .mark {
  left: 19px;
  top: 8px;
  width: 38px;
  height: 38px;
  border: 6px solid var(--pimpam-accent, white);
  border-radius: 50%;
  background: transparent;
}

.pattern-7 .mark {
  left: 14px;
  top: 15px;
  width: 58px;
  height: 44px;
  background:
    radial-gradient(circle at 20% 30%, var(--pimpam-accent, white) 0 11%, transparent 12%),
    radial-gradient(circle at 55% 18%, color-mix(in srgb, var(--pimpam-secondary, white) 70%, white) 0 9%, transparent 10%),
    radial-gradient(circle at 72% 66%, var(--pimpam-accent, white) 0 10%, transparent 11%);
}

.pattern-8 .mark {
  inset: 12px 14px auto auto;
  width: 46px;
  height: 44px;
  background:
    linear-gradient(90deg, transparent 0 26%, rgb(255 255 255 / 48%) 27% 38%, transparent 39% 56%, rgb(255 255 255 / 48%) 57% 68%, transparent 69%);
  transform: rotate(18deg);
}

.motion-0 {
  animation: pimpam-bob 2.8s ease-in-out infinite;
}

.motion-1 {
  animation: pimpam-wiggle 3.2s ease-in-out infinite;
}

.motion-2 {
  animation: pimpam-hop 2.6s ease-in-out infinite;
}

.motion-3 {
  animation: pimpam-float 3.6s ease-in-out infinite;
}

.motion-4 {
  animation: pimpam-sway 3s ease-in-out infinite;
}

.motion-5 {
  animation: pimpam-pulse 2.4s ease-in-out infinite;
}

.shape-0 {
  border-radius: 45% 55% 50% 50%;
}

.shape-1 {
  border-radius: 58% 42% 48% 52%;
}

.shape-2 {
  border-radius: 52% 48% 62% 38%;
}

.shape-3 {
  border-radius: 40% 60% 42% 58%;
}

.shape-4 {
  border-radius: 50% 50% 38% 62%;
}

.shape-5 {
  border-radius: 62% 38% 58% 42%;
}

.ears-0 .ear {
  height: 28px;
}

.ears-1 .ear {
  width: 18px;
  height: 36px;
  top: -18px;
}

.ears-2 .ear {
  width: 30px;
  height: 18px;
  top: -4px;
  border-radius: 50%;
}

.ears-3 .ear {
  width: 20px;
  height: 20px;
  top: -6px;
  border-radius: 30% 70% 45% 55%;
}

.ears-4 .ear {
  width: 28px;
  height: 34px;
  top: -16px;
  border-radius: 10% 90% 45% 55%;
}

.mark-0 .mark {
  left: 12px;
  top: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.mark-1 .mark {
  left: 9px;
  top: 40px;
  width: 36px;
  height: 7px;
  border-radius: 999px;
  transform: rotate(-20deg);
}

.mark-2 .mark {
  right: 10px;
  top: 13px;
  width: 10px;
  height: 38px;
  border-radius: 999px;
  transform: rotate(25deg);
}

.mark-3 .mark {
  left: 27px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  transform: rotate(45deg);
}

.mark-4 .mark {
  left: 14px;
  bottom: 11px;
  width: 26px;
  height: 12px;
  border-radius: 50%;
}

.mark-5 .mark {
  right: 12px;
  bottom: 18px;
  width: 18px;
  height: 18px;
  clip-path: polygon(50% 0, 61% 36%, 98% 36%, 68% 57%, 80% 94%, 50% 72%, 20% 94%, 32% 57%, 2% 36%, 39% 36%);
}

.mark-6 .mark {
  left: 18px;
  top: 8px;
  width: 30px;
  height: 30px;
  border: 5px solid rgb(255 255 255 / 48%);
  border-radius: 50%;
  background: transparent;
}

.mood-0 .eye {
  height: 12px;
}

.mood-1 .eye {
  height: 8px;
  border-radius: 999px;
}

.mood-2 .eye.left {
  top: 25px;
}

.mood-2 .eye.right {
  top: 31px;
}

.mood-3 .nose {
  width: 16px;
  left: 28px;
  border-radius: 999px;
}

.rarity-1 {
  --pimpam-color: #43a047;
  border-color: #43a047;
}

.rarity-2 {
  --pimpam-color: #1e88e5;
  border-color: #1e88e5;
}

.rarity-3 {
  --pimpam-color: #8e24aa;
  border-color: #8e24aa;
}

.rarity-4 {
  --pimpam-color: #f9a825;
  border-color: #f9a825;
}

.rarity-5 {
  --pimpam-color: #e53935;
  border-color: #e53935;
}

.award {
  margin: 1.5rem 0;
}

.login-notice {
  margin: 1rem 0;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.login-notice h2 {
  margin-top: 0;
}

.hidden-before-celebration {
  visibility: hidden;
}

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgb(255 255 255 / 16%), transparent 26%),
    rgb(5 10 18 / 92%);
  color: white;
  cursor: pointer;
}

.celebration-overlay.done {
  pointer-events: none;
  animation: celebration-out 420ms ease forwards;
}

.fireworks span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  box-shadow:
    0 -54px 0 var(--c),
    38px -38px 0 var(--c),
    54px 0 0 var(--c),
    38px 38px 0 var(--c),
    0 54px 0 var(--c),
    -38px 38px 0 var(--c),
    -54px 0 0 var(--c),
    -38px -38px 0 var(--c);
  animation: firework-pop 1.35s ease-out infinite;
}

.fireworks span:nth-child(1) {
  --x: 18%;
  --y: 22%;
  --c: #ff4d8d;
}

.fireworks span:nth-child(2) {
  --x: 76%;
  --y: 20%;
  --c: #ffd166;
  animation-delay: 180ms;
}

.fireworks span:nth-child(3) {
  --x: 32%;
  --y: 70%;
  --c: #35d0ff;
  animation-delay: 320ms;
}

.fireworks span:nth-child(4) {
  --x: 82%;
  --y: 68%;
  --c: #7cff6b;
  animation-delay: 460ms;
}

.fireworks span:nth-child(5) {
  --x: 50%;
  --y: 18%;
  --c: #b67cff;
  animation-delay: 620ms;
}

.fireworks span:nth-child(6) {
  --x: 50%;
  --y: 78%;
  --c: #ff7b54;
  animation-delay: 760ms;
}

.celebration-prize {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 1rem;
  max-width: min(520px, calc(100vw - 2rem));
  text-align: center;
  animation: prize-arrive 900ms cubic-bezier(.2, 1.4, .35, 1) 900ms both;
}

.celebration-prize > p {
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 3rem);
  font-weight: 900;
}

.prize-stars {
  margin-top: -0.75rem;
  color: #ffd166;
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 900;
}

.celebration-prize .pimpam-card {
  color: var(--ink);
  transform: scale(1.12);
}

.zero-demon {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 44% 56% 48% 52%;
  background:
    radial-gradient(circle at 30% 24%, rgb(255 255 255 / 20%) 0 11%, transparent 12%),
    radial-gradient(circle at 72% 78%, #ff6b35 0 18%, transparent 19%),
    #d00000;
  box-shadow:
    inset -18px -20px 0 rgb(0 0 0 / 20%),
    0 18px 32px rgb(0 0 0 / 32%),
    0 0 36px rgb(255 37 37 / 35%);
  animation: demon-laugh 420ms ease-in-out infinite;
}

.zero-demon .horn {
  position: absolute;
  top: -25px;
  width: 34px;
  height: 48px;
  background: #ffd166;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.zero-demon .horn.left {
  left: 18px;
  transform: rotate(-18deg);
}

.zero-demon .horn.right {
  right: 18px;
  transform: rotate(18deg);
}

.zero-demon .eye {
  position: absolute;
  top: 48px;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 -5px 0 #1f0305;
  transform: rotate(-14deg);
}

.zero-demon .eye.left {
  left: 38px;
}

.zero-demon .eye.right {
  right: 38px;
  transform: rotate(14deg);
}

.zero-demon .mouth {
  position: absolute;
  left: 38px;
  top: 79px;
  width: 58px;
  height: 28px;
  border-bottom: 8px solid #1f0305;
  border-radius: 0 0 999px 999px;
  transform: rotate(-4deg);
}

.zero-demon .mouth::before,
.zero-demon .mouth::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 12px solid white;
}

.zero-demon .mouth::before {
  left: 16px;
}

.zero-demon .mouth::after {
  right: 16px;
}

.zero-demon strong {
  position: absolute;
  inset: auto 0 8px;
  color: rgb(255 255 255 / 72%);
  font-size: 1.8rem;
}

@keyframes pimpam-bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes pimpam-wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-4deg);
  }
  75% {
    transform: rotate(4deg);
  }
}

@keyframes pimpam-hop {
  0%, 100% {
    transform: translateY(0) scaleY(1);
  }
  45% {
    transform: translateY(-8px) scaleY(1.04);
  }
  60% {
    transform: translateY(1px) scaleY(0.96);
  }
}

@keyframes pimpam-float {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(4px, -6px);
  }
}

@keyframes pimpam-sway {
  0%, 100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-4px);
  }
}

@keyframes pimpam-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes firework-pop {
  0% {
    opacity: 0;
    transform: scale(0.1);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes prize-arrive {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(-8deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.08) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes celebration-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes demon-laugh {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}

.form {
  display: grid;
  gap: 1rem;
  max-width: 780px;
}

.simple-login {
  display: grid;
  gap: 0.5rem;
  max-width: 360px;
}

.simple-login label {
  font-weight: 700;
}

.form p {
  display: grid;
  gap: 0.35rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

button {
  width: fit-content;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 650;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

button,
.button-link {
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 3px;
}

.theme-toggle {
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
  background: var(--surface);
  color: var(--ink);
}

.button-link {
  display: inline-block;
  width: fit-content;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.button-link.secondary {
  border: 1px solid var(--accent);
  background: var(--paper);
  color: var(--accent-dark);
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 1rem 0 1.5rem;
}

.result-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  order: 99;
  padding: 0.95rem 1.25rem;
  background: var(--accent);
  color: white;
  font-size: 1.08rem;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.result-primary-action span {
  font-size: 1.35rem;
  line-height: 1;
}

.empty-pimpams {
  max-width: 680px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: clamp(1rem, 4vw, 2.4rem);
  align-items: stretch;
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

.landing-hero-copy {
  display: grid;
  align-content: center;
  min-height: clamp(430px, 62vh, 620px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 5vw, 3.2rem);
  background:
    linear-gradient(135deg, color-mix(in srgb, #ff7f66 16%, transparent), transparent 42%),
    linear-gradient(35deg, transparent 54%, color-mix(in srgb, #35b6c8 18%, transparent)),
    var(--paper);
  box-shadow: var(--shadow);
}

.landing-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 6.7rem);
  line-height: 0.92;
}

.landing-subtitle {
  max-width: 58ch;
  margin: 1rem 0 1.25rem;
  color: var(--ink);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  line-height: 1.45;
  font-weight: 620;
}

.landing-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.25rem;
}

.landing-primary {
  min-height: 3.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.2rem;
  font-size: 1.08rem;
  font-weight: 900;
}

.landing-secondary {
  min-height: 3.15rem;
}

.no-register-note {
  width: fit-content;
  margin: 1rem 0 0;
  border: 1px solid color-mix(in srgb, var(--ok) 34%, var(--line));
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  background: color-mix(in srgb, var(--ok) 10%, var(--paper));
  color: var(--ok);
  font-weight: 900;
}

.landing-prize-panel {
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.55rem);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.landing-prize-panel h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.landing-prize-panel p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.5;
}

.landing-pimpams {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 0.75rem;
}

.landing-pimpams .mini-pimpam {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
}

.landing-pimpams .mini-pimpam:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.landing-pimpams .mini-pimpam:first-child .pimpam-creature {
  width: min(128px, 100%);
  height: min(128px, 100%);
}

.landing-section {
  margin-top: clamp(1.35rem, 4vw, 2.75rem);
}

.landing-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.landing-category-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.landing-category-card:nth-child(3n + 1) .category-icon {
  background: #ff7f66;
}

.landing-category-card:nth-child(3n + 2) .category-icon {
  background: #35b6c8;
}

.landing-category-card:nth-child(3n) .category-icon {
  background: #f9a825;
  color: #24210d;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 14px;
  color: white;
  font-size: 1.55rem;
  font-weight: 950;
  box-shadow: var(--shadow-soft);
}

.landing-category-copy h3 {
  margin: 0 0 0.35rem;
  font-size: 1.28rem;
}

.landing-category-copy p {
  margin: 0 0 0.45rem;
  color: var(--muted);
  line-height: 1.45;
}

.landing-category-copy span {
  color: var(--accent-dark);
  font-weight: 850;
}

.landing-level-links {
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.landing-level-links a {
  min-height: 4.4rem;
}

.logged-question-section {
  margin-top: 0;
}

.question-card-details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.question-card-details summary {
  width: fit-content;
  border-radius: 999px;
  padding: 0.48rem 0.7rem;
  background: var(--surface);
  color: var(--accent-dark);
  font-weight: 850;
  cursor: pointer;
}

.question-card-details ul {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.question-card-details li {
  line-height: 1.35;
}

.landing-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 1rem;
  align-items: stretch;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.steps-list li {
  counter-increment: steps;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.steps-list li::before {
  content: counter(steps);
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 950;
}

.steps-list strong,
.steps-list span {
  display: block;
}

.steps-list strong {
  margin-bottom: 0.25rem;
  font-size: 1.12rem;
}

.steps-list span {
  color: var(--muted);
  line-height: 1.42;
}

.optional-login-card,
.family-teacher-note {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.35rem);
  background:
    linear-gradient(135deg, color-mix(in srgb, #f9a825 14%, transparent), transparent 62%),
    var(--paper);
  box-shadow: var(--shadow-soft);
}

.optional-login-card h2 {
  margin: 0 0 0.75rem;
}

.optional-login-card ul {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.family-teacher-note {
  max-width: 920px;
}

.family-teacher-note p {
  max-width: 72ch;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.anonymous-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: start;
}

.anonymous-hero {
  margin-bottom: clamp(1.15rem, 3vw, 1.8rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 46%),
    var(--paper);
  box-shadow: var(--shadow);
}

.anonymous-hero h1 {
  max-width: 11ch;
  margin: 0 0 0.8rem;
  font-size: clamp(2.35rem, 7vw, 4.8rem);
  line-height: 0.96;
}

.anonymous-hero h1 span {
  display: block;
  margin-top: 0.5rem;
  color: var(--accent-dark);
  font-size: clamp(1.2rem, 3.2vw, 1.85rem);
  line-height: 1.12;
}

.anonymous-hero p {
  max-width: 58ch;
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.anonymous-cta {
  margin-top: 0.55rem;
  font-size: 1.03rem;
}

.try-exercises,
.anonymous-categories {
  margin-top: clamp(1rem, 3vw, 1.6rem);
}

.section-heading {
  margin-bottom: 0.85rem;
}

.section-heading p {
  margin: 0 0 0.2rem;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.try-copy {
  max-width: 58ch;
  margin: -0.25rem 0 0.9rem;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.category-choice-grid {
  display: grid;
  gap: 0.85rem;
}

.category-choice {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(0, 1.25fr);
  gap: 0.9rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.category-choice h3 {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
}

.category-choice p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.level-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.55rem;
}

.level-links a {
  display: grid;
  gap: 0.15rem;
  min-height: 4rem;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--radius-sm);
  padding: 0.62rem 0.72rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--ink);
  text-decoration: none;
}

.level-links a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.level-links span {
  font-weight: 900;
}

.level-links small {
  color: inherit;
  font-weight: 650;
  opacity: 0.78;
}

.catalog-preview {
  position: sticky;
  top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.45rem);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.catalog-preview h2 {
  margin-top: 0;
}

.pimpam-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-height: calc(100vh - 13rem);
  overflow: auto;
  padding-right: 0.2rem;
}

.pimpam-catalog-grid .pimpam-card {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.9rem 0.5rem 1.4rem;
  text-align: center;
}

.pimpam-catalog-grid .pimpam-card h3 {
  margin: 0;
  font-size: 0.9rem;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.choice input {
  width: auto;
}

.score {
  font-size: 1.4rem;
  font-weight: 700;
}

.answers li {
  margin-bottom: 1rem;
}

.ok {
  color: var(--ok);
}

.fail {
  color: var(--fail);
}

@media (max-width: 980px) {
  .result-visuals {
    grid-template-columns: 1fr 1fr;
  }

  .landing-hero,
  .landing-split {
    grid-template-columns: 1fr;
  }

  .landing-hero-copy {
    min-height: auto;
  }

  .landing-prize-panel {
    align-content: start;
  }

  .landing-pimpams {
    grid-template-columns: repeat(5, minmax(58px, 1fr));
  }

  .landing-pimpams .mini-pimpam:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .landing-pimpams .mini-pimpam:first-child .pimpam-creature {
    width: 58px;
    height: 58px;
  }

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

  .anonymous-layout {
    grid-template-columns: 1fr;
  }

  .catalog-preview {
    position: static;
  }

  .pimpam-catalog-grid {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  nav {
    width: 100%;
    gap: 0.25rem;
  }

nav a,
.sound-toggle,
.theme-toggle {
  padding: 0.48rem 0.62rem;
  font-size: 0.95rem;
}

  .sound-toggle {
    width: 2.3rem;
    height: 2.3rem;
    padding: 0;
  }

  .logo-brand img {
    width: min(300px, 82vw);
    max-height: 72px;
  }

  .landing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-primary,
  .landing-secondary {
    width: 100%;
  }

  .landing-category-card {
    grid-template-columns: 1fr;
  }

  .category-icon {
    width: 3rem;
    height: 3rem;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pimpam-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-choice {
    grid-template-columns: 1fr;
  }

  .result-list li {
    display: grid;
  }

  .statement-box,
  .answers-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
  }

  .statement,
  .answers {
    flex: 1 0 100%;
    order: 2;
  }

  .exercise-arrow {
    position: static;
    flex: 1 1 8rem;
    order: 1;
    transform: none;
  }

  .exercise-arrow:hover {
    transform: translateY(-1px);
  }

  .exercise-arrow.next {
    margin-left: auto;
  }

  .result-visuals {
    grid-template-columns: 1fr;
  }

  .top-player-banner {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .result-list span {
    white-space: normal;
  }
}

@media (max-width: 460px) {
  .page {
    width: min(100% - 1rem, 1180px);
  }

  .landing-hero-copy,
  .landing-prize-panel,
  .landing-category-card,
  .optional-login-card,
  .family-teacher-note {
    border-radius: var(--radius-sm);
  }

  .landing-hero h1 {
    font-size: 3rem;
  }

  .landing-pimpams {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero h1 span {
    font-size: 1.28rem;
  }

  .anonymous-hero {
    padding: 1rem;
  }

  .anonymous-hero h1 {
    font-size: 2.35rem;
  }

  .level-links {
    grid-template-columns: 1fr;
  }

  .tabs {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding: 0 0.25rem 0.45rem;
  }

  .pimpam-catalog-grid {
    gap: 0.55rem;
  }

  .pimpam-card {
    grid-template-columns: 76px 1fr;
    gap: 0.75rem;
  }

  .pimpam-catalog-grid .pimpam-card {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
