* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", system-ui, sans-serif;
  background: #000;
  color: #fff;
  transition: background 0.35s ease, color 0.35s ease;
}

/* —— Céu espacial —— */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #000;
  pointer-events: none;
  contain: paint;
}

.sky__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.sky__glow--a {
  width: 55vw;
  height: 55vw;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(91, 44, 255, 0.4) 0%, transparent 68%);
  opacity: 0.9;
}

.sky__glow--b {
  width: 45vw;
  height: 45vw;
  right: -8%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(255, 45, 138, 0.32) 0%, transparent 68%);
  opacity: 0.85;
}

.sky__glow--sun {
  display: none;
}

/* —— Toggle dia/noite —— */
.theme-toggle {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top));
  right: max(0.85rem, env(safe-area-inset-right));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 10, 24, 0.75);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.theme-toggle:hover {
  border-color: rgba(255, 200, 80, 0.55);
  transform: scale(1.05);
}

.theme-toggle:focus-visible {
  outline: 2px solid #ffc850;
  outline-offset: 3px;
}

.theme-toggle__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.theme-toggle__icon--sun {
  display: none;
}

.theme-toggle__icon--moon {
  display: inline;
}

body.theme-day .theme-toggle__icon--sun {
  display: inline;
}

body.theme-day .theme-toggle__icon--moon {
  display: none;
}

/* —— Modo dia (céu claro + sol suave) —— */
body.theme-day {
  background: #eef2ff;
  color: #1e1b2e;
}

body.theme-day .sky {
  background: linear-gradient(
    180deg,
    #dbeafe 0%,
    #eef2ff 38%,
    #f5f3ff 72%,
    #faf8ff 100%
  );
}

body.theme-day .sky__glow--a {
  width: 50vw;
  height: 50vw;
  top: -18%;
  left: -12%;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.55) 0%, transparent 70%);
  opacity: 1;
}

body.theme-day .sky__glow--b {
  width: 42vw;
  height: 42vw;
  right: -10%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.4) 0%, transparent 70%);
  opacity: 1;
}

body.theme-day .sky__glow--sun {
  display: block;
  width: min(22vw, 180px);
  height: min(22vw, 180px);
  top: 3%;
  right: 6%;
  background: radial-gradient(
    circle,
    #fff7d6 0%,
    #fde68a 42%,
    rgba(251, 191, 36, 0.28) 62%,
    transparent 74%
  );
  box-shadow: 0 0 48px rgba(251, 191, 36, 0.28);
  opacity: 0.95;
}

body.theme-day .stars {
  display: none;
}

body.theme-day .sky__astronaut {
  opacity: 0.18;
  filter: drop-shadow(0 8px 18px rgba(99, 102, 241, 0.15));
}

body.theme-day .theme-toggle {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.22);
  color: #b45309;
  box-shadow: 0 8px 22px rgba(30, 27, 46, 0.08);
}

body.theme-day .hero__title {
  color: #1e1b2e;
}

body.theme-day .hero__sub {
  color: rgba(30, 27, 46, 0.62);
}

body.theme-day .hero__cta {
  box-shadow: 0 12px 32px rgba(30, 27, 46, 0.14);
}

body.theme-day .panel {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(99, 102, 241, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 36px rgba(30, 27, 46, 0.07);
}

body.theme-day .panel__title {
  color: #1e1b2e;
}

body.theme-day .field label {
  color: rgba(30, 27, 46, 0.58);
}

body.theme-day .field input,
body.theme-day .field select,
body.theme-day .btn-step {
  background: #ffffff;
  border-color: rgba(30, 27, 46, 0.12);
  color: #1e1b2e;
}

body.theme-day .field input:focus,
body.theme-day .field select:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

body.theme-day .btn-step:hover {
  background: #eef2ff;
  border-color: rgba(99, 102, 241, 0.35);
}

body.theme-day .preset {
  border-color: rgba(124, 58, 237, 0.28);
  color: #6d28d9;
  background: #ffffff;
}

body.theme-day .preset:hover,
body.theme-day .preset.is-active {
  background: linear-gradient(90deg, rgba(126, 200, 255, 0.25), rgba(192, 132, 252, 0.28));
  border-color: rgba(124, 58, 237, 0.45);
  color: #1e1b2e;
}

body.theme-day .btn-reset {
  border-color: rgba(30, 27, 46, 0.14);
  background: #ffffff;
  color: rgba(30, 27, 46, 0.75);
}

body.theme-day .hint {
  color: rgba(30, 27, 46, 0.45);
}

body.theme-day .muted-label {
  color: rgba(30, 27, 46, 0.5);
}

body.theme-day .total-line {
  color: #0284c7;
}

body.theme-day .rank-row__name,
body.theme-day .rank-row__value {
  color: #1e1b2e;
}

body.theme-day .rank-row__bar-wrap {
  background: rgba(30, 27, 46, 0.06);
}

body.theme-day .rank-row--ref .rank-row__name {
  color: #db2777;
}

body.theme-day .winner-banner {
  background: linear-gradient(90deg, rgba(126, 200, 255, 0.18), rgba(192, 132, 252, 0.18));
  border-color: rgba(124, 58, 237, 0.22);
  color: #1e1b2e;
}

body.theme-day .winner-banner span {
  color: #0284c7;
}

body.theme-day .duel-card {
  background: #ffffff;
  border-color: rgba(30, 27, 46, 0.1);
}

body.theme-day .duel-meta--secondary {
  border-top-color: rgba(30, 27, 46, 0.1);
}

body.theme-day .duel-meta__row--total {
  border-top-color: rgba(30, 27, 46, 0.14);
  color: rgba(30, 27, 46, 0.75);
}

body.theme-day .duel-card--cdb .duel-meta__row--total strong {
  color: #0284c7;
}

body.theme-day .duel-card--tesouro .duel-meta__row--total strong {
  color: #7c3aed;
}

body.theme-day .duel-card__gain {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.22);
  color: #1e1b2e;
}

body.theme-day .duel-card__gain strong {
  color: #15803d;
}

body.theme-day .duel-card__gain-note {
  color: rgba(30, 27, 46, 0.5);
}

body.theme-day .duel-card__net {
  color: #1e1b2e;
}

body.theme-day .duel-card.is-winner {
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2), 0 10px 28px rgba(14, 165, 233, 0.12);
}

body.theme-day .duel-meta__row {
  color: rgba(30, 27, 46, 0.58);
}

body.theme-day .duel-meta__row strong {
  color: #1e1b2e;
}

body.theme-day .duel-meta__row--gain strong {
  color: #15803d;
}

body.theme-day .tab {
  border-color: rgba(30, 27, 46, 0.12);
  color: rgba(30, 27, 46, 0.6);
  background: #ffffff;
}

body.theme-day .tab.is-active {
  background: #eef2ff;
  border-color: rgba(99, 102, 241, 0.4);
  color: #1e1b2e;
}

body.theme-day .table-wrap {
  border-color: rgba(30, 27, 46, 0.1);
  background: #ffffff;
}

body.theme-day .sim-table thead th,
body.theme-day .diff-table thead th {
  background: #eef2ff;
  color: rgba(30, 27, 46, 0.7);
}

body.theme-day .sim-table th,
body.theme-day .sim-table td,
body.theme-day .diff-table th,
body.theme-day .diff-table td {
  border-bottom-color: rgba(30, 27, 46, 0.08);
  color: #1e1b2e;
}

body.theme-day .sim-table tbody tr:nth-child(even),
body.theme-day .diff-table tbody tr:nth-child(even) td {
  background: rgba(238, 242, 255, 0.55);
}

body.theme-day .sim-table tbody tr:hover {
  background: rgba(196, 181, 253, 0.18);
}

body.theme-day .diff-table tbody th {
  background: #f5f3ff;
  color: rgba(30, 27, 46, 0.7);
}

body.theme-day .diff-table thead th:nth-child(2) {
  color: #7c3aed;
}

body.theme-day .diff-table thead th:nth-child(3) {
  color: #0284c7;
}

body.theme-day .diff-yes {
  color: #15803d;
}

body.theme-day .diff-no {
  color: #b91c1c;
}

body.theme-day .footer-brand {
  color: rgba(30, 27, 46, 0.4);
}

body.theme-day .footer-brand a {
  color: #7c3aed;
}

.stars {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background-repeat: repeat;
}

.stars--far {
  background-image:
    radial-gradient(1px 1px at 8% 12%, #fff, transparent),
    radial-gradient(1px 1px at 22% 38%, #fff, transparent),
    radial-gradient(1px 1px at 41% 18%, #cde7ff, transparent),
    radial-gradient(1px 1px at 57% 62%, #fff, transparent),
    radial-gradient(1px 1px at 73% 28%, #fff, transparent),
    radial-gradient(1px 1px at 88% 74%, #fff, transparent),
    radial-gradient(1px 1px at 14% 81%, #fff, transparent),
    radial-gradient(1px 1px at 33% 55%, #fff, transparent),
    radial-gradient(1px 1px at 66% 8%, #fff, transparent),
    radial-gradient(1px 1px at 91% 44%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 48% 90%, #fff, transparent),
    radial-gradient(1px 1px at 5% 48%, #fff, transparent);
  background-size: 320px 320px;
  opacity: 0.55;
}

.stars--near {
  background-image:
    radial-gradient(2px 2px at 18% 40%, #fff, transparent),
    radial-gradient(2px 2px at 52% 22%, #fff, transparent),
    radial-gradient(2px 2px at 70% 70%, #fff, transparent),
    radial-gradient(2px 2px at 86% 16%, #fff, transparent),
    radial-gradient(2.5px 2.5px at 40% 78%, #fff, transparent),
    radial-gradient(2px 2px at 8% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 63% 48%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 28% 68%, #a8d8ff, transparent);
  background-size: 480px 480px;
  opacity: 0.75;
}

.sky__astronaut {
  position: absolute;
  left: max(0.25rem, env(safe-area-inset-left));
  bottom: 0;
  width: min(100px, 22vw);
  height: auto;
  opacity: 0.4;
  transform: scaleX(-1) translateZ(0);
  filter: drop-shadow(0 0 12px rgba(126, 200, 255, 0.18));
  user-select: none;
  pointer-events: none;
}

@keyframes twinkle {
  from { opacity: 0.55; }
  to { opacity: 0.95; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-8%, -5%, 0); }
}

@keyframes pulse-win {
  0%, 100% { box-shadow: 0 0 0 1px rgba(126, 200, 255, 0.35), 0 0 32px rgba(126, 200, 255, 0.2); }
  50% { box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.55), 0 0 40px rgba(192, 132, 252, 0.35); }
}

/* —— Layout —— */
.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3.5rem;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 1rem;
}

.logo {
  display: block;
  width: min(220px, 60vw);
  height: auto;
  margin: 0;
  filter: drop-shadow(0 0 18px rgba(120, 90, 255, 0.25));
}

.logo--day {
  display: none;
}

body.theme-day .logo-wrap__night {
  display: none;
}

body.theme-day .logo--day {
  display: block;
  filter: drop-shadow(0 8px 18px rgba(99, 102, 241, 0.12));
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 4.5vw, 2.15rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.hero__title span {
  background: linear-gradient(90deg, #7ec8ff 0%, #c084fc 45%, #ff6bb5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
}

.hero__cta {
  display: block;
  margin: 1.25rem auto 0;
  max-width: min(100%, 52rem);
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  text-decoration: none;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(255, 120, 40, 0.28);
}

.hero__cta:active {
  transform: translateY(0);
}

.hero__cta-img {
  display: block;
  width: 100%;
  height: auto;
}

/* —— Painéis —— */
.panel {
  background: rgba(12, 10, 24, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.28);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  /* sem backdrop-filter: evita flicker/GPU stutter */
}

.sim-top {
  align-items: stretch;
}

.sim-top > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sim-top > .panel .winner-banner {
  margin-top: auto;
}

.panel__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.panel__title--grad {
  background: linear-gradient(90deg, #7ec8ff, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* —— Inputs —— */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
}

.field-note {
  font-weight: 500;
  opacity: 0.55;
  text-transform: none;
  letter-spacing: 0;
}

.field input,
.field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-variant-numeric: tabular-nums;
}

.field input.input-money {
  letter-spacing: 0.01em;
}

.field input:focus,
.field select:focus {
  border-color: rgba(126, 200, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(126, 200, 255, 0.15);
}

.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.period-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.period-row input {
  flex: 1;
}

.period-row select {
  width: auto;
  min-width: 6.5rem;
}

.btn-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-height: 2.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-step:hover {
  background: rgba(126, 200, 255, 0.15);
  border-color: rgba(126, 200, 255, 0.4);
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.preset {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.4);
  background: transparent;
  color: #e9d5ff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.preset:hover,
.preset.is-active {
  background: linear-gradient(90deg, rgba(126, 200, 255, 0.2), rgba(192, 132, 252, 0.25));
  border-color: rgba(126, 200, 255, 0.55);
  color: #fff;
}

.btn-reset {
  margin-top: 1rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hint a {
  color: #7ec8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.theme-day .btn-reset {
  border-color: rgba(30, 27, 46, 0.14);
  background: #ffffff;
  color: rgba(30, 27, 46, 0.75);
}

body.theme-day .hint a {
  color: #0284c7;
}

.hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

/* —— Total + ranking —— */
.total-line {
  font-size: 1.05rem;
  font-weight: 700;
  color: #7ec8ff;
  margin: 0 0 1rem;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.rank-row__name {
  font-size: 0.85rem;
  font-weight: 700;
}

.rank-row__bar-wrap {
  height: 1.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.rank-row__bar {
  height: 100%;
  border-radius: 8px;
  min-width: 4px;
  transition: width 0.45s ease;
}

.rank-row__value {
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rank-row--ref .rank-row__name {
  color: #ff6bb5;
}

.rank-row--ref .rank-row__bar {
  opacity: 0.85;
}

body.theme-day .rank-row--ref .rank-row__name {
  color: #c2410c;
}

.ref-line {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.ref-line strong {
  color: #ff6bb5;
  font-weight: 700;
}

.winner-banner {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(126, 200, 255, 0.12), rgba(192, 132, 252, 0.15));
  border: 1px solid rgba(192, 132, 252, 0.35);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.winner-banner span {
  color: #7ec8ff;
}

/* —— Cards duelo —— */
.duel-card {
  position: relative;
  background: rgba(12, 10, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.25rem;
  transition: border-color 0.25s, transform 0.25s;
}

.duel-card.is-winner {
  border-color: rgba(126, 200, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(126, 200, 255, 0.35), 0 0 28px rgba(126, 200, 255, 0.18);
}

.duel-card__badge {
  position: absolute;
  top: -0.65rem;
  right: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ec8ff, #c084fc);
  color: #0a0614;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.duel-card.is-winner .duel-card__badge {
  opacity: 1;
  transform: translateY(0);
}

.duel-card__name {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.duel-card--cdb .duel-card__name {
  color: #7ec8ff;
}

.duel-card--tesouro .duel-card__name {
  color: #c084fc;
}

.duel-card__net {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.duel-meta {
  display: grid;
  gap: 0.45rem;
}

.duel-meta--secondary {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.85;
}

.duel-meta__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

.duel-meta__row strong {
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.duel-meta__row--total {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.duel-meta__row--total strong {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.duel-card--cdb .duel-meta__row--total strong {
  color: #7ec8ff;
}

.duel-card--tesouro .duel-meta__row--total strong {
  color: #c084fc;
}

.duel-card__gain {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(134, 239, 172, 0.1);
  border: 1px solid rgba(134, 239, 172, 0.28);
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
}

.duel-card__gain strong {
  color: #86efac;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.duel-card__gain-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.duel-meta__row--gain strong {
  color: #86efac;
}

/* —— Charts —— */
.chart-box {
  position: relative;
  height: 260px;
  margin-top: 0.5rem;
}

/* —— Tabela —— */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.tab.is-active {
  background: rgba(126, 200, 255, 0.15);
  border-color: rgba(126, 200, 255, 0.45);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

table.sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.sim-table th,
.sim-table td {
  padding: 0.55rem 0.65rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sim-table th:first-child,
.sim-table td:first-child,
.sim-table th:nth-child(2),
.sim-table td:nth-child(2) {
  text-align: center;
}

.sim-table thead th {
  position: sticky;
  top: 0;
  background: #120e1f;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  z-index: 1;
}

.sim-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.sim-table tbody tr:hover {
  background: rgba(126, 200, 255, 0.08);
}

.muted-label {
  color: rgba(255, 255, 255, 0.5);
}

/* —— Diff table —— */
.diff-wrap {
  max-height: none;
  overflow-y: visible;
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.diff-table th,
.diff-table td {
  padding: 0.85rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.45;
}

.diff-table thead th {
  position: sticky;
  top: 0;
  background: #120e1f;
  color: #fff;
  font-weight: 800;
  z-index: 1;
}

.diff-table thead th:nth-child(2) {
  color: #c084fc;
}

.diff-table thead th:nth-child(3) {
  color: #7ec8ff;
}

.diff-table tbody th {
  width: 28%;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.diff-table tbody td {
  color: rgba(255, 255, 255, 0.92);
}

.diff-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.diff-yes {
  color: #86efac;
  font-weight: 700;
}

.diff-no {
  color: #fca5a5;
  font-weight: 700;
}

body.theme-day .diff-yes {
  color: #15803d;
}

body.theme-day .diff-no {
  color: #b91c1c;
}

body.theme-day .diff-table thead th:nth-child(2) {
  color: #7c3aed;
}

body.theme-day .diff-table thead th:nth-child(3) {
  color: #0369a1;
}

/* —— Tabela IR —— */
.ir-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .ir-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .ir-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ir-card {
  padding: 1.15rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(192, 132, 252, 0.28);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.ir-card__rate {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #7ec8ff, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ir-card__period {
  margin: 0.45rem 0 0.2rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.ir-card__hint {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

.ir-card--best {
  border-color: rgba(134, 239, 172, 0.4);
  background: rgba(134, 239, 172, 0.08);
  box-shadow: 0 0 24px rgba(134, 239, 172, 0.08);
}

.ir-card--best .ir-card__rate {
  background: linear-gradient(90deg, #86efac, #7ec8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.theme-day .ir-card {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.16);
}

body.theme-day .ir-card__period {
  color: #1e1b2e;
}

body.theme-day .ir-card__hint {
  color: rgba(30, 27, 46, 0.45);
}

body.theme-day .ir-card--best {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.06);
}

/* —— Intro SEO —— */
.seo-intro {
  margin-bottom: 0;
}

.seo-intro__body {
  display: grid;
  gap: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.seo-intro__body p {
  margin: 0;
}

body.theme-day .seo-intro__body {
  color: rgba(30, 27, 46, 0.78);
}

/* —— FAQ —— */
.faq {
  display: grid;
  gap: 0.65rem;
}

.faq__item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.15rem 0.95rem 0.15rem;
}

.faq__q {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0.85rem 0;
  color: #fff;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::after {
  content: "+";
  float: right;
  color: rgba(192, 132, 252, 0.95);
  font-weight: 800;
}

.faq__item[open] .faq__q::after {
  content: "–";
}

.faq__a {
  margin: 0 0 0.95rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

body.theme-day .faq__item {
  border-color: rgba(30, 27, 46, 0.12);
  background: rgba(255, 255, 255, 0.55);
}

body.theme-day .faq__q {
  color: #1e1b2e;
}

body.theme-day .faq__a {
  color: rgba(30, 27, 46, 0.72);
}

/* —— Footer —— */
.footer-brand {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-brand a {
  color: #c084fc;
  text-decoration: none;
  font-weight: 600;
}

.footer-brand a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .page {
    padding: 2.25rem 1.5rem 4rem;
  }

  .logo {
    width: 260px;
  }

  .sky__astronaut {
    width: 140px;
    opacity: 0.55;
    left: 1rem;
  }

  .panel {
    padding: 1.5rem;
  }
}

@media (min-width: 960px) {
  .sky__astronaut {
    width: 160px;
    opacity: 0.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stars--far,
  .stars--near,
  .duel-card.is-winner {
    animation: none;
  }

  .rank-row__bar {
    transition: none;
  }
}
