:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-warm: #F4EFE6;
  --navy: #0C1528;
  --navy-soft: #16233E;
  --orange: #F24C0D;
  --orange-dark: #B53100;
  --orange-soft: #FFF1EB;
  --gold: #FFD43B;
  --gold-soft: #FFF8DB;
  --ink: #182030;
  --muted: #5C6578;
  --border: #E7DFD3;
  --border-strong: #D6CBB9;
  --green: #15803D;
  --green-soft: #ECFDF3;
  --green-border: #86EFAC;
  --red: #DC2626;
  --red-soft: #FEF2F2;
  --red-border: #FCA5A5;
  --amber: #B45309;
  --amber-soft: #FFFBEB;
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, select, input {
  font: inherit;
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(12, 21, 40, 0.96);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.09);
}

.nav-link.active {
  background: var(--orange);
  color: #FFFFFF;
}

.hud {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.hud-pill.xp {
  color: var(--gold);
}

.hud-pill.streak {
  color: #FF9F68;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 18px 80px;
}

.loading-box {
  text-align: center;
  padding: 72px 20px;
  color: var(--muted);
  font-weight: 600;
}

.hero {
  background: radial-gradient(circle at 88% 18%, #243863 0%, #0C1528 65%);
  color: #FFFFFF;
  border-radius: 24px;
  padding: 34px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.85fr);
  gap: 24px;
  align-items: center;
  box-shadow: 0 14px 36px rgba(12, 21, 40, 0.14);
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 212, 59, 0.14);
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.08;
  margin: 0 0 12px;
  letter-spacing: -0.025em;
}

.hero p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-level {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 20px;
}

.hero-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.level-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.level-xp {
  font-weight: 800;
  color: var(--gold);
  font-size: 14px;
}

.bar-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.bar-track.light {
  background: var(--surface-warm);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transition: width 0.35s ease;
}

.bar-fill.green {
  background: linear-gradient(90deg, #16A34A, #4ADE80);
}

.hero-level-foot {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  justify-content: space-between;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(2px);
}

.btn-primary {
  background: var(--orange);
  color: #FFFFFF;
  box-shadow: 0 4px 0 var(--orange-dark);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--navy);
  border: 2px solid var(--border);
  box-shadow: 0 3px 0 var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: #FFFDF9;
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-whatsapp {
  background: #16A34A;
  color: #FFFFFF;
  box-shadow: 0 4px 0 #116831;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 11px;
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px;
}

.daily-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #FFF7EB 0%, #FFFFFF 65%);
  border: 2px solid #F7C79F;
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 24px;
}

.daily-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-warm);
  color: var(--ink);
}

.pill.orange {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.pill.gold {
  background: var(--gold-soft);
  color: #8A5A00;
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.pill.navy {
  background: var(--navy);
  color: #FFFFFF;
}

.daily-snippet {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.exam-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exam-phase {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.exam-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exam-card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.exam-card-actions .btn {
  flex: 1;
}

.resume-banner {
  background: var(--navy);
  color: #FFFFFF;
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.resume-banner strong {
  font-family: var(--font-display);
  font-size: 18px;
  display: block;
}

.resume-banner small {
  color: rgba(255, 255, 255, 0.76);
}

.resume-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.custom-builder {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.builder-group label.group-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 13px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chip:hover {
  border-color: var(--border-strong);
}

.chip.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

.chip.orange-selected.selected {
  background: var(--orange);
  border-color: var(--orange);
}

.builder-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.builder-count {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.goal-card {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.goal-card strong {
  font-family: var(--font-display);
  font-size: 20px;
  display: block;
  color: var(--orange);
}

.goal-card span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.filter-select {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-weight: 700;
  font-size: 14px;
}

.filter-summary {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.q-nav-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
}

.q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.q-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.q-number {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.q-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.base-texts {
  margin-bottom: 18px;
}

.base-box {
  background: #FBF8F1;
  border: 1px solid #EAE0CD;
  border-left: 4px solid var(--orange);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.base-toggle {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
}

.blk-p {
  margin: 0 0 11px;
}

.blk-p:last-child {
  margin-bottom: 0;
}

.blk-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  text-align: center;
  margin: 8px 0 12px;
}

.blk-source {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin: 6px 0 10px;
  word-break: break-word;
}

.blk-box {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  background: #FFFFFF;
}

.blk-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 10px 0;
}

.blk-verses {
  padding-left: 12px;
  margin: 10px 0;
}

.blk-stanza {
  margin-bottom: 12px;
}

.blk-stanza p {
  margin: 0;
}

.blk-fig {
  margin: 14px 0;
  text-align: center;
}

.blk-fig img {
  max-width: 100%;
  max-height: 460px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  cursor: zoom-in;
}

.blk-fig figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  word-break: break-word;
}

.blk-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}

.blk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #FFFFFF;
}

.blk-table th,
.blk-table td {
  border: 1px solid var(--border-strong);
  padding: 8px 10px;
  text-align: left;
}

.blk-table th {
  background: var(--surface-warm);
  font-weight: 800;
}

.enunciado {
  font-size: 16px;
  margin-bottom: 20px;
}

.alts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alt-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 2px solid var(--border);
  border-bottom-width: 3px;
  border-radius: 14px;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, opacity 0.12s;
  position: relative;
}

.alt-item:hover {
  border-color: var(--border-strong);
  background: #FFFDF9;
}

.alt-item.selected {
  border-color: var(--navy);
  background: #F1F5FB;
}

.alt-item.correct {
  border-color: var(--green);
  background: var(--green-soft);
}

.alt-item.wrong {
  border-color: var(--red);
  background: var(--red-soft);
}

.alt-item.struck {
  opacity: 0.45;
}

.alt-item.struck .alt-body {
  text-decoration: line-through;
}

.alt-letter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-warm);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.alt-item.selected .alt-letter {
  background: var(--navy);
  color: #FFFFFF;
}

.alt-item.correct .alt-letter {
  background: var(--green);
  color: #FFFFFF;
}

.alt-item.wrong .alt-letter {
  background: var(--red);
  color: #FFFFFF;
}

.alt-body {
  flex: 1;
  min-width: 0;
  padding-top: 3px;
}

.alt-strike-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

.alt-strike-btn:hover {
  opacity: 1;
  background: var(--surface-warm);
}

.feedback-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-banner.correct {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.feedback-banner.wrong {
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.feedback-banner.annulled {
  background: var(--amber-soft);
  border: 1px solid #FCD34D;
  color: var(--amber);
}

.q-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.q-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.q-source-links a {
  text-decoration: underline;
}

.sim-topbar {
  background: var(--navy);
  color: #FFFFFF;
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.sim-title-block strong {
  font-family: var(--font-display);
  font-size: 17px;
  display: block;
}

.sim-title-block small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.sim-clock {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.sim-clock.urgent {
  color: #FF7B7B;
}

.sim-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 256px;
  gap: 18px;
  align-items: start;
}

.sim-map-card {
  position: sticky;
  top: 76px;
}

.sim-map-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
}

.sim-map-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.map-cell {
  height: 36px;
  border-radius: 9px;
  border: 2px solid var(--border);
  background: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}

.map-cell.answered {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

.map-cell.current {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(242, 76, 13, 0.25);
}

.map-cell.flagged::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid var(--navy);
  position: absolute;
  top: -3px;
  right: -3px;
}

.result-hero {
  background: radial-gradient(circle at 80% 20%, #20345D 0%, #0C1528 65%);
  color: #FFFFFF;
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  margin-bottom: 22px;
}

.result-score {
  font-family: var(--font-display);
  font-size: clamp(54px, 10vw, 84px);
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
  margin: 8px 0 4px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.stat-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 10px;
}

.stat-box strong {
  font-family: var(--font-display);
  font-size: 22px;
  display: block;
}

.stat-box span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
}

.kpi-card strong {
  font-family: var(--font-display);
  font-size: 28px;
  display: block;
  line-height: 1.1;
}

.kpi-card span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.subject-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subject-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 86px auto;
  align-items: center;
  gap: 12px;
}

.subject-name {
  font-weight: 800;
  font-size: 14px;
}

.subject-pct {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  color: var(--muted);
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #FFFFFF;
  overflow: hidden;
}

.review-item summary {
  list-style: none;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.review-item summary::-webkit-details-marker {
  display: none;
}

.review-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.history-row strong {
  display: block;
  font-size: 15px;
}

.history-row small {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 18px 90px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-mobile {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 21, 40, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 96vw;
  max-height: 90vh;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 6px;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #FFFFFF;
  color: var(--navy);
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 21, 40, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.modal-card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 22px;
}

.modal-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-stack {
  position: fixed;
  bottom: 80px;
  right: 18px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--navy);
  color: var(--gold);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 10px 26px rgba(12, 21, 40, 0.28);
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }
  .exam-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sim-layout {
    grid-template-columns: 1fr;
  }
  .sim-map-card {
    position: static;
  }
  .goals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #FFFFFF;
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .nav-mobile a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
  }
  .nav-mobile a.active {
    color: var(--orange);
    background: var(--orange-soft);
  }
  .exam-grid {
    grid-template-columns: 1fr;
  }
  .daily-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .resume-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .q-card {
    padding: 18px 16px;
  }
  .subject-row {
    grid-template-columns: 110px minmax(0, 1fr) 68px;
  }
  .subject-row .btn {
    display: none;
  }
}
