/* Componentes da interface: cartões, botões, modos, temas, conquistas, perguntas, resultados, personalizador, toasts e regras responsivas. */

/* Components */
.card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sec { margin-top: 36px; display: flex; flex-direction: column; gap: 16px; }

/* Interactive Mascot Character Banner in Bento Grid */
.mascot-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.mascot-art-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.mascot-art-wrap:hover {
  transform: scale(1.06) rotate(-3deg);
}
.pixel-avatar-svg {
  width: 60px;
  height: 60px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  animation: pixelIdle 2.2s infinite ease-in-out;
}
@keyframes pixelIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.mascot-speech {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.speech-bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: inline-block;
  max-width: fit-content;
}
.speech-bubble::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mascot-action-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.mascot-action-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Pixel Level Badge Visuals */
.pixel-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--line);
  font-family: 'Atkinson Hyperlegible Next', sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.pixel-level-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: grid;
  place-items: center;
}

/* Buttons with Spring Micro-interactions */
.btn {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 0;
  background: var(--btn);
  color: var(--btnink);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  position: relative;
  overflow: hidden;
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}
.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.97);
}
.btn.primary {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}
.btn.primary:hover:not(:disabled) {
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.45);
}
.btn.ghost {
  background: var(--surface2);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover:not(:disabled) {
  background: var(--surface3);
  border-color: var(--line-hover);
  box-shadow: var(--shadow-sm);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn:focus-visible, .opt:focus-visible, .cat:focus-visible, .mode:focus-visible, .piece:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
kbd {
  font-family: 'Atkinson Hyperlegible Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--ink2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Bento Hero Section */
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.hero-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.hero-main::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.exam-countdown-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  position: relative;
}
.ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 10px 0;
}
.ring-container svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}
.ring-bg {
  fill: none;
  stroke: var(--surface3);
  stroke-width: 8;
}
.ring-progress {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339;
  stroke-dashoffset: 60;
  transition: stroke-dashoffset 1s ease;
}
.ring-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.ring-days {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
}
.ring-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 2px;
}

/* Level & Stats Section */
.lvl-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
}
.bar {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--surface3);
  overflow: hidden;
  position: relative;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
  position: relative;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bar > i::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat {
  background: var(--surface2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.stat:hover {
  transform: translateY(-2px);
  background: var(--surface3);
}
.stat b {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--ink);
}
.stat span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Streak Flame Component */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 13.5px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #EA580C;
}
.flame-icon {
  display: inline-block;
  animation: flameWiggle 1.4s infinite ease-in-out;
  transform-origin: 50% 90%;
}
@keyframes flameWiggle {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.12); }
}

/* Modes Grid */
.modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.mode {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.mode:hover:not([aria-disabled="true"]) {
  transform: translateY(-4px);
  border-color: var(--line-hover);
  box-shadow: var(--shadow-hover);
}
.mode:active:not([aria-disabled="true"]) {
  transform: translateY(-1px) scale(0.99);
}
.mode.main {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: #FFFFFF;
  border-color: #334155;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.3);
}
[data-theme="dark"] .mode.main {
  background: linear-gradient(135deg, #1E1B4B, #312E81);
  border-color: #4338CA;
}
.mode.main .eyebrow { color: #A5B4FC; }
.mode.main .muted { color: #CBD5E1; }
.mode[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--shadow-sm);
}
.mode-icon-top {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface2);
  color: var(--primary);
  margin-bottom: 4px;
  font-size: 20px;
  transition: transform 0.25s ease;
}
.mode.main .mode-icon-top {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}
.mode:hover .mode-icon-top {
  transform: scale(1.1) rotate(5deg);
}

/* Category Topics */
.theme { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.theme-h { display: flex; align-items: center; gap: 12px; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--c);
  box-shadow: 0 2px 8px -2px var(--c);
}
.cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cat {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-left: 5px solid var(--c);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cat:hover {
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat .top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.cat .nm { font-weight: 700; font-size: 15.5px; }
.cat .lab {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cat .bar > i { background: var(--c); }
.cat .sub { font-size: 13px; color: var(--muted); }

/* Badges & Achievements */
/* Metal tiers: shared by the achievement cards and the results-screen trophy */
.badge.on,
.tier-gold {
  --tier: #F59E0B;
  --tier-hi: #FDE047;
  --tier-lo: #B45309;
}
.badge.on.tier-silver,
.tier-silver {
  --tier: #94A3B8;
  --tier-hi: #F8FAFC;
  --tier-lo: #475569;
}
.badge.on.tier-bronze,
.tier-bronze {
  --tier: #EA580C;
  --tier-hi: #FDBA74;
  --tier-lo: #9A3412;
}
.badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.badge {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px dashed var(--line-hover);
  background: var(--surface-glass);
  color: var(--muted);
}
.badge.on {
  border: 2px solid color-mix(in srgb, var(--tier) 60%, var(--line));
  background: color-mix(in srgb, var(--tier) 9%, var(--surface));
  color: var(--ink2);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tier-lo) 45%, transparent);
}
.badge b { display: block; font-size: 14px; font-weight: 700; }
.badge span { font-size: 12px; line-height: 1.35; display: block; }
.badge.on b { color: var(--ink); }

/* Pixel display case: notched 2px frame, dark velvet inside, hard drop shadow */
.badge .medal {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  margin: 2px 2px 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(#0000 0 44px, rgba(255, 255, 255, 0.06) 44px 46px, #0000 46px),
    radial-gradient(circle at 50% 42%, #2A2340 0 14px, #211B33 14px 22px, #1A1528 22px);
  box-shadow:
    0 -2px 0 0 #3B3352,
    0 2px 0 0 #3B3352,
    -2px 0 0 0 #3B3352,
    2px 0 0 0 #3B3352,
    0 6px 0 0 rgba(15, 23, 42, 0.28),
    inset 0 2px 0 0 rgba(255, 255, 255, 0.08);
}
.badge .medal svg {
  position: relative;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}
.badge:not(.on) .medal {
  background: var(--surface3);
  box-shadow:
    0 -2px 0 0 var(--line-hover),
    0 2px 0 0 var(--line-hover),
    -2px 0 0 0 var(--line-hover),
    2px 0 0 0 var(--line-hover),
    0 6px 0 0 var(--line);
}
.badge:not(.on) .medal svg {
  filter: grayscale(0.6);
  opacity: 0.75;
}
.badge.on .medal {
  box-shadow:
    0 -2px 0 0 var(--tier-lo),
    0 2px 0 0 var(--tier-lo),
    -2px 0 0 0 var(--tier-lo),
    2px 0 0 0 var(--tier-lo),
    0 6px 0 0 color-mix(in srgb, var(--tier-lo) 55%, transparent),
    inset 0 2px 0 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 0 rgba(0, 0, 0, 0.3);
}
.badge.on .medal svg { width: 48px; height: 48px; }
/* Diagonal glass glint sweeping across the case in 8 hard frames, then resting off-screen */
.badge.on .medal::after {
  content: '';
  position: absolute;
  top: -16px;
  bottom: -16px;
  left: 0;
  width: 8px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 12px 0 0 -2px rgba(255, 255, 255, 0.16);
  transform: translateX(-48px) skewX(-20deg);
  animation: medalShine 4.8s steps(8, end) infinite;
}
.badge.on:nth-child(3n + 2) .medal::after { animation-delay: -1.6s; }
.badge.on:nth-child(3n + 3) .medal::after { animation-delay: -3.2s; }
@keyframes medalShine {
  0% { transform: translateX(-48px) skewX(-20deg); }
  20%, 100% { transform: translateX(80px) skewX(-20deg); }
}

/* Question Screen */
.qtop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.prog-wrap {
  margin-bottom: 20px;
}
.prog {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface3);
  overflow: hidden;
  position: relative;
}
.prog > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4F46E5, #06B6D4);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.chip.fire {
  border-color: rgba(245, 158, 11, 0.4);
  background: var(--goldbg);
  color: #D97706;
}

.qcard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.qhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qprompt {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

/* Option Cards */
.opts { display: grid; gap: 12px; }
.opt {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.opt:hover:not([aria-disabled="true"]) {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  background: var(--surface2);
}
.opt:active:not([aria-disabled="true"]) {
  transform: translateY(0) scale(0.99);
}
.opt .k {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface2);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink2);
  transition: all 0.2s ease;
}
.opt:hover:not([aria-disabled="true"]) .k {
  background: var(--primary);
  color: #FFFFFF;
}
.opt .t {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding-top: 4px;
  font-size: 15.5px;
  font-weight: 500;
}
.opt.mono .t {
  font-family: 'Atkinson Hyperlegible Mono', monospace;
  font-size: 15px;
}
.opt.right {
  border-color: var(--ok) !important;
  background: var(--okbg) !important;
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.25) !important;
  animation: correctPulse 0.4s ease;
}
@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.opt.right .k {
  background: var(--ok) !important;
  color: #FFFFFF !important;
}
.opt.wrong {
  border-color: var(--bad) !important;
  background: var(--badbg) !important;
  animation: shakeWrong 0.35s ease;
}
@keyframes shakeWrong {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.opt.wrong .k {
  background: var(--bad) !important;
  color: #FFFFFF !important;
}
.opt.dim { opacity: 0.45; }
.opt[aria-disabled="true"] { cursor: default; }

/* Feedback Callout */
.fb {
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: popBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popBounce {
  0% { transform: translateY(8px) scale(0.97); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.fb.good {
  background: var(--okbg);
  border: 1.5px solid var(--ok);
  color: #064E3B;
}
[data-theme="dark"] .fb.good { color: #A7F3D0; }
.fb.bad {
  background: var(--badbg);
  border: 1.5px solid var(--bad);
  color: #7F1D1D;
}
[data-theme="dark"] .fb.bad { color: #FECACA; }
.fb.neutral {
  background: var(--surface2);
  border: 1.5px solid var(--line);
}
.fb h3 { font-size: 24px; }
.fb.good h3 { color: var(--ok); }
.fb.bad h3 { color: var(--bad); }
.fb .ans {
  font-family: 'Atkinson Hyperlegible Mono', monospace;
  font-weight: 700;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}
.hint { font-size: 13.5px; color: var(--muted); }

.fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  width: fit-content;
}
.fb-badge.good { background: rgba(16, 185, 129, 0.18); color: var(--ok); border: 1px solid rgba(16, 185, 129, 0.35); }
.fb-badge.bad { background: rgba(239, 68, 68, 0.18); color: var(--bad); border: 1px solid rgba(239, 68, 68, 0.35); }
.fb-why-box {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.fb-why-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
}

/* Code Display (One Dark Pro) */
.code-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.code-header {
  background: #21252B;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333842;
}
.code-dots {
  display: flex;
  gap: 6px;
}
.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dot.red { background: #FF5F56; }
.code-dot.yellow { background: #FFBD2E; }
.code-dot.green { background: #27C93F; }
.copy-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  font-family: 'Atkinson Hyperlegible Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #ABB2BF;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 5px;
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}
.code {
  margin: 0;
  padding: 16px 18px;
  background: #282C34;
  color: #ABB2BF;
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, Menlo, monospace;
  font-size: 15px;
  line-height: 1.65;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  overflow-x: auto;
}
.lnum {
  padding-right: 16px;
  text-align: right;
  color: #5C6370;
  user-select: none;
  border-right: 1px solid #3E4451;
  margin-right: 16px;
}
.lcode { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.65em; }
.kw { color: #C678DD; font-weight: 700; }
.kd { color: #E5C07B; }
.bi { color: #56B6C2; }
.fn { color: #61AFEF; }
.var { color: #E06C75; }
.str { color: #98C379; }
.num { color: #D19A66; }
.mod { color: #E5C07B; }
.op { color: #56B6C2; }
.pu { color: #ABB2BF; }
.cm { color: #7F848E; font-style: italic; }

/* Parsons Reordering Mode */
.zone {
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 64px;
}
.zone.dest {
  background: var(--surface2);
  border: 2px dashed var(--line-hover);
}
.zone .empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}
.piece {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #282C34;
  color: #ABB2BF;
  font-family: 'Atkinson Hyperlegible Mono', monospace;
  font-size: 14.5px;
  line-height: 1.5;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.piece:hover {
  border-color: #61AFEF;
  transform: translateY(-2px);
}
.piece .n { color: #5C6370; font-size: 12px; font-weight: 700; }
.piece .c { white-space: pre-wrap; overflow-wrap: anywhere; }
.piece.ok { border-color: #5BD98A; background: #1C2D27; }
.piece.no { border-color: #FF8A8A; background: #2E1B1E; }
.ind { display: inline-block; width: 4ch; border-left: 1.5px dashed #4B5263; height: 1.2em; vertical-align: middle; }

/* Handwriting Textarea */
textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible Mono', monospace;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  tab-size: 4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.selfgrade {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.selfgrade .btn { border-radius: var(--radius-md); }
.g1 { background: var(--ok) !important; color: #FFFFFF !important; }
.g2 { background: var(--gold) !important; color: #FFFFFF !important; }
.g3 { background: var(--bad) !important; color: #FFFFFF !important; }

/* Results Screen */
.grade {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.grade .big {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 84px;
  font-weight: 800;
  line-height: 0.9;
}
.grade .big small { font-size: 30px; color: var(--muted); }
.brk {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}
.brk div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.rev {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.rev .lbl {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.rev .mine { color: var(--bad); font-weight: 700; }
.rev .good { color: var(--ok); font-weight: 700; }

/* Customizer Pixel Modal */
.pixel-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 18px;
  animation: fadeIn 0.25s ease;
}
.pixel-modal-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 660px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 92vh;
  overflow-y: auto;
  animation: scalePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.customizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.customizer-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 620px) {
  .customizer-body {
    grid-template-columns: 1fr;
  }
}
.customizer-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  overflow-x: auto;
}
.customizer-tab-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 8px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  color: var(--muted);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.customizer-tab-btn:hover {
  color: var(--fg);
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .customizer-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}
.customizer-tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.customizer-panel {
  min-height: 170px;
}
.customizer-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
  border: 2px dashed var(--line-hover);
  position: relative;
}
.preview-avatar-large {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: pixelIdle 2s infinite ease-in-out;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.15));
}
.customizer-section-title {
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
}
.select-item-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--surface2);
  border: 2px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.select-item-btn:hover:not([disabled]) {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--surface);
}
.select-item-btn.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.select-item-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(1);
}
.lock-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.color-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.color-swatch-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}
.color-swatch-btn:hover {
  transform: scale(1.18);
}
.color-swatch-btn.selected {
  box-shadow: 0 0 0 3px var(--primary);
  transform: scale(1.15);
}

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  z-index: 430; /* above the celebration overlay (420) */
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  background: var(--btn);
  color: var(--btnink);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  animation: popToast 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
@keyframes popToast {
  from { transform: translateY(20px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
/* XP already shown as a floating label: keep the toast for screen readers only */
.toasts .toast.xp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  animation: none;
}
.toast.xp {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

/* Footer & Advice */
.tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tip {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.5;
}
.tip b {
  display: block;
  margin-bottom: 4px;
  font-size: 15.5px;
  color: var(--ink);
}
.foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.linkbtn {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 14px;
  transition: color 0.2s ease;
}
.foot-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.heart-anim {
  display: inline-block;
  color: #EF4444;
  animation: heartBeat 1.4s infinite ease-in-out;
  transform-origin: center;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.3); }
  60% { transform: scale(1); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scalePop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Results-screen trophy: bobbing cup over a stepped pedestal glow */
.grade-trophy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.grade:has(> .grade-trophy) > .stack {
  flex: 1 1 240px;
  min-width: 0;
}
.grade-trophy-art {
  position: relative;
  width: 144px;
  height: 128px;
  display: grid;
  place-items: center;
}
/* Glow in hard-stop rings with slowly turning pixel rays */
.grade-trophy-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--tier-hi) 42%, transparent) 0 28px, color-mix(in srgb, var(--tier) 24%, transparent) 28px 44px, color-mix(in srgb, var(--tier) 12%, transparent) 44px 58px, #0000 58px),
    repeating-conic-gradient(from 0deg at 50% 46%, color-mix(in srgb, var(--tier) 18%, transparent) 0 12deg, #0000 12deg 30deg);
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 0 64px, #0000 64px);
  mask-image: radial-gradient(circle at 50% 46%, #000 0 64px, #0000 64px);
  transform-origin: 50% 46%;
  animation: trophyRays 6s steps(12, end) infinite;
}
/* Floor shadow that shrinks while the cup is lifted */
.grade-trophy-art::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 72px;
  height: 8px;
  margin-left: -36px;
  background:
    linear-gradient(rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.22)) 8px 0 / calc(100% - 16px) 4px no-repeat,
    linear-gradient(rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.22)) 0 4px / 100% 4px no-repeat;
  animation: trophyShadow 1.2s steps(1, end) infinite;
}
.grade-trophy-art svg {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  animation: trophyBob 1.2s steps(1, end) infinite;
}
.grade-trophy-label {
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-size: 8px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 6px 10px;
  color: #1C1626;
  background: var(--tier);
  box-shadow:
    0 -2px 0 0 var(--tier-lo),
    0 2px 0 0 var(--tier-lo),
    -2px 0 0 0 var(--tier-lo),
    2px 0 0 0 var(--tier-lo),
    0 6px 0 0 color-mix(in srgb, var(--tier-lo) 50%, transparent),
    inset 0 2px 0 0 color-mix(in srgb, var(--tier-hi) 70%, transparent);
}
.grade-trophy.tier-gold .grade-trophy-label { background: #FBBF24; }
.grade-trophy.tier-silver .grade-trophy-label { background: #CBD5E1; }
.grade-trophy.tier-bronze .grade-trophy-label { background: #FB923C; }
@keyframes trophyBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
/* Shrinks by clipping 8px per side: paint only, no layout, edges stay on the pixel grid */
@keyframes trophyShadow {
  0%, 100% { clip-path: polygon(8px 0, 64px 0, 64px 4px, 72px 4px, 72px 8px, 0 8px, 0 4px, 8px 4px); }
  50% { clip-path: polygon(16px 0, 56px 0, 56px 4px, 64px 4px, 64px 8px, 8px 8px, 8px 4px, 16px 4px); }
}
@keyframes trophyRays {
  to { transform: rotate(30deg); }
}

/* Simulado em curso (página inicial) */
.sim-resume {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border: 2px solid color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--primary) 35%, transparent), var(--shadow);
}
.sim-resume b { font-size: 15px; }

/* Relatório cumulativo */
.rep-note { font-size: 14px; margin-top: 12px; }
.rep-sub { font-size: 16px; line-height: 1.6; margin: 0 0 12px; }
.rep-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rep-status {
  display: inline-block;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-size: 8px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 4px;
  white-space: nowrap;
  vertical-align: middle;
}
.rep-status.rep-bad { color: var(--bad); background: var(--badbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 45%, transparent); }
.rep-status.rep-ok { color: var(--ok); background: var(--okbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent); }
.rep-status.rep-gold { color: color-mix(in srgb, var(--gold) 70%, var(--ink)); background: var(--goldbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.rep-status.rep-muted { color: var(--muted); background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
p.rep-good, p.rep-bad { display: flex; align-items: center; gap: 8px; }
p.rep-good { color: var(--ok); }
p.rep-bad { color: var(--bad); }
/* Light theme: the brand green/red/gold are too light for small text on pale backgrounds */
:root:not([data-theme="dark"]) p.rep-good,
:root:not([data-theme="dark"]) .rep-status.rep-ok { color: #047857; }
:root:not([data-theme="dark"]) p.rep-bad,
:root:not([data-theme="dark"]) .rep-status.rep-bad { color: #B91C1C; }
:root:not([data-theme="dark"]) .rep-status.rep-gold { color: #92400E; }
.rep-status.rep-muted { color: var(--ink2); }
.rep-update { display: flex; flex-direction: column; gap: 10px; }

.rep-prio { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rep-prio-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 4px solid var(--c);
}
.rep-prio-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-prio-head h3 { flex: 1; min-width: 160px; font-size: 16px; }
.rep-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-size: 16px;
  color: var(--bg);
  background: var(--ink);
  box-shadow: 0 4px 0 var(--c);
}
.rep-tips, .rep-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; }
.rep-concepts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rep-concepts .lbl { margin-right: 4px; }
.rep-chip {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface2);
  border: 1px solid var(--line);
  color: var(--ink2);
}

.rep-hist { display: flex; gap: 8px; align-items: flex-end; min-height: 140px; overflow-x: auto; }
.rep-bar {
  flex: 1;
  min-width: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.rep-bar .mono { color: var(--ink); font-weight: 700; }
.rep-bar i { display: block; width: 100%; max-width: 38px; border-radius: 4px 4px 0 0; }
.rep-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.rep-table-wrap { padding: 8px 12px; overflow-x: auto; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rep-table th, .rep-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rep-table thead th { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.rep-table tbody th { font-weight: 700; }
.rep-table tr:last-child th, .rep-table tr:last-child td { border-bottom: 0; }
.rep-table td.mono { white-space: nowrap; }

.rep-phases { display: flex; flex-direction: column; gap: 12px; }
.rep-phase { padding: 0; }
.rep-phase > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}
.rep-phase > summary::-webkit-details-marker { display: none; }
.rep-phase > summary::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 10px;
  background: var(--primary);
  clip-path: polygon(0 0, 2px 0, 2px 2px, 4px 2px, 4px 4px, 6px 4px, 6px 6px, 4px 6px, 4px 8px, 2px 8px, 2px 10px, 0 10px);
}
.rep-phase[open] > summary::before { rotate: 90deg; }
.rep-phase > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; border-radius: var(--radius-lg); }
.rep-phase-n { font-family: 'Press Start 2P', ui-monospace, monospace; font-size: 8px; line-height: 2; }
.rep-phase-body { display: flex; flex-direction: column; gap: 14px; padding: 0 22px 22px; }
.rep-phase-brk { font-size: 14px; }

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .lvl-card { grid-template-columns: 1fr; }
  .modes, .tips { grid-template-columns: 1fr; }
  .cats, .brk { grid-template-columns: 1fr; }
  .mascot-banner { grid-template-columns: auto 1fr; }
  .mascot-banner .mascot-action-btn { grid-column: 1 / -1; justify-content: center; }
  .qprompt { font-size: 20px; }
  .code { font-size: 14px; }
  .grade .big { font-size: 64px; }
  .grade-trophy { margin: 0 auto; }
  .rep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-cols { grid-template-columns: 1fr; }
  .rep-phase > summary, .rep-phase-body { padding-left: 16px; padding-right: 16px; }
  .rep-table { font-size: 13.5px; }
  .rep-table th, .rep-table td { padding: 8px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::after, ::before { animation: none !important; transition: none !important; }
}
