/* DETONA CONCURSOS — UI moderna + identidade JRPG */
:root {
  --bg: #05070f;
  --bg2: #0a1020;
  --panel: rgba(14, 20, 40, 0.82);
  --panel-hi: rgba(22, 30, 58, 0.9);
  --border: rgba(110, 130, 220, 0.28);
  --border-dark: rgba(40, 50, 90, 0.6);
  --border-light: rgba(160, 180, 255, 0.35);
  --gold: #f0c040;
  --gold-bright: #ffe066;
  --neon: #7c6af5;
  --neon-hi: #a78bfa;
  --neon-cyan: #38bdf8;
  --neon-pink: #e879f9;
  --hp: #e04040;
  --hp-hi: #ff6666;
  --sp: #4080e0;
  --xp: #a78bfa;
  --xp-hi: #c4b5fd;
  --text: #eef2ff;
  --text-dim: #93a0c4;
  --danger: #ff4466;
  --ok: #44dd77;
  --warn: #ffaa33;
  --display: 'Sora', 'Outfit', system-ui, sans-serif;
  --sans: 'Outfit', system-ui, sans-serif;
  --pixel: 'Sora', 'Outfit', system-ui, sans-serif;
  --nav-h: 70px;
  --hud-h: auto;
  --radius: 16px;
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  --glass: blur(14px) saturate(1.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-color: #05070f;
  min-height: 100dvh;
  font-feature-settings: "ss01" on;
  letter-spacing: 0.01em;
}

/* Fundo moderno da app */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(99, 70, 220, 0.32), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 80%, rgba(30, 90, 200, 0.14), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 60%, rgba(180, 60, 200, 0.08), transparent 45%),
    #05070f;
}
.app-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(140, 160, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 160, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}
.app-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}
.app-bg__glow--a {
  width: 280px; height: 280px;
  top: 8%; left: -10%;
  background: #5b21b6;
  animation: floatGlow 12s ease-in-out infinite;
}
.app-bg__glow--b {
  width: 220px; height: 220px;
  bottom: 12%; right: -8%;
  background: #1d4ed8;
  animation: floatGlow 15s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, -18px); }
}
#app { position: relative; z-index: 1; }

/* Window RO style */
.ro-window {
  background: linear-gradient(180deg, var(--panel-hi) 0%, var(--panel) 100%);
  border: 2px solid var(--border);
  border-top-color: var(--border-light);
  border-left-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  border-right-color: var(--border-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.ro-window::before {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255,255,255,.06);
  pointer-events: none;
  border-radius: 2px;
}
.ro-title {
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--gold-bright);
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border-dark);
  background: linear-gradient(180deg, #2a4060, #1e3048);
  text-shadow: 1px 1px 0 #000;
}
.ro-body { padding: 12px; }

/* Bars */
.bar-track {
  height: 14px;
  background: #0a1220;
  border: 1px solid #000;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
}
.bar-fill {
  height: 100%;
  transition: width .4s ease, background .3s;
  position: relative;
}
.bar-fill::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 40%;
  background: rgba(255,255,255,.25);
}
.bar-fill.hp { background: linear-gradient(180deg, var(--hp-hi), var(--hp)); }
.bar-fill.xp { background: linear-gradient(180deg, var(--xp-hi), var(--xp)); }
.bar-fill.edital-red { background: linear-gradient(180deg, #ff5555, #cc2222); }
.bar-fill.edital-orange { background: linear-gradient(180deg, #ffaa44, #dd7722); }
.bar-fill.edital-green { background: linear-gradient(180deg, #66ee88, #22aa44); }
.bar-fill.edital-gold {
  background: linear-gradient(180deg, #fff066, #e0a020);
  animation: goldPulse 1.5s ease infinite;
}
@keyframes goldPulse {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}
.bar-label {
  font-family: var(--pixel);
  font-size: 8px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

/* Buttons */
.btn {
  font-family: var(--pixel);
  font-size: 9px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-top-color: var(--border-light);
  border-left-color: var(--border-light);
  background: linear-gradient(180deg, #3a5580, #2a4060);
  color: var(--text);
  cursor: pointer;
  border-radius: 3px;
  text-shadow: 1px 1px 0 #000;
  transition: transform .08s, filter .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
}
.btn:active { transform: translateY(2px); }
.btn:hover { filter: brightness(1.15); }
.btn-primary {
  background: linear-gradient(180deg, #e8a820, #b07010);
  border-color: #f0c050;
  border-bottom-color: #805010;
  border-right-color: #805010;
  color: #1a1000;
  text-shadow: 0 1px 0 rgba(255,255,255,.3);
}
.btn-danger {
  background: linear-gradient(180deg, #c04040, #802020);
  border-color: #e06060;
}
.btn-ok {
  background: linear-gradient(180deg, #40a060, #287040);
  border-color: #60c080;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-dark);
  color: var(--text-dim);
}
.btn-sm { font-size: 8px; padding: 6px 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* App shell */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: calc(var(--nav-h) + 8px);
  background: transparent;
}
#screen {
  flex: 1;
  padding: 10px 12px 16px;
  overflow: visible;
}
.app-boot {
  width: min(440px, calc(100% - 24px));
  min-height: 148px;
  margin: clamp(72px, 18dvh, 180px) auto 24px;
  padding: 22px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(124, 106, 245, .28);
  border-radius: 20px;
  background: rgba(8, 12, 28, .82);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.app-boot img { width: 64px; height: 64px; border-radius: 16px; }
.app-boot div { min-width: 0; display: grid; gap: 6px; }
.app-boot strong { color: var(--text); font: 700 17px/1.25 var(--display); }
.app-boot span { color: var(--text-dim); font-size: 13px; line-height: 1.45; }
.app-boot i {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(124, 106, 245, .14);
}
.app-boot i::after {
  content: '';
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c6af5, #38bdf8);
  animation: app-boot-progress 1.1s ease-in-out infinite alternate;
}
@keyframes app-boot-progress { to { transform: translateX(138%); } }
@media (max-width: 359px) {
  .app-boot { grid-template-columns: 48px minmax(0, 1fr); padding: 18px; }
  .app-boot img { width: 48px; height: 48px; border-radius: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-boot i::after { animation: none; width: 100%; opacity: .7; }
}
@media (min-width: 540px) {
  #app { max-width: 520px; }
}

/* Bottom nav — mockup dark neon */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: rgba(8, 12, 24, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(100, 120, 220, 0.22);
  display: flex;
  z-index: 100;
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
}
.nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: #6b7498;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 6px 1px;
  border-radius: 12px;
  transition: color .15s, background .15s, box-shadow .15s;
}
.nav-item span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item .nav-ico { font-size: 18px; line-height: 1; filter: grayscale(.3); opacity: .85; }
.nav-item.active {
  color: var(--neon-hi);
  background: rgba(124, 106, 245, 0.12);
  box-shadow: none;
}
.nav-item.active .nav-ico {
  filter: none;
  opacity: 1;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
}
.nav-item:active { transform: scale(.95); }

/* Avatar pixel */
.avatar-box {
  width: 72px;
  height: 72px;
  background: #0a1525;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-sprite {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.4));
  transition: transform .2s;
}
.avatar-box.legend::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 6px;
  background: conic-gradient(from 0deg, #f0c040, #fff, #60e0ff, #f0c040);
  opacity: .5;
  animation: spin 3s linear infinite;
  z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-box.legend { box-shadow: 0 0 16px #f0c040; }

.seal-edital {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 7px;
  background: linear-gradient(180deg, #ffe066, #c09020);
  color: #1a1000;
  padding: 3px 6px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Home */
.home-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.home-info { flex: 1; min-width: 0; }
.home-name {
  font-family: var(--pixel);
  font-size: 11px;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.home-class {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 8px;
}
.home-stats-row {
  display: flex;
  gap: 10px;
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--text-dim);
  margin-top: 8px;
}
.home-stats-row span { color: var(--gold-bright); }

.speech-bubble {
  background: #fff;
  color: #1a2030;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  position: relative;
  margin: 10px 0 14px;
  box-shadow: 2px 2px 0 #0003;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  left: 28px;
  bottom: -8px;
  border: 8px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

.countdown {
  font-family: var(--pixel);
  font-size: 9px;
  text-align: center;
  color: var(--warn);
  padding: 8px;
  background: rgba(255,170,51,.08);
  border: 1px dashed var(--warn);
  border-radius: 4px;
  margin-bottom: 12px;
}

/* Radar */
.radar-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.radar-wrap canvas {
  max-width: 100%;
  height: auto;
}

/* Filter chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.chip {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--sans);
}
.chip.active {
  background: rgba(240,192,64,.2);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* Forms */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  background: #0a1525;
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--border);
  box-shadow: 0 0 0 2px rgba(90,122,168,.3);
}

/* Lists */
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0,0,0,.2);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .15s;
}
.list-item:hover { background: rgba(255,255,255,.04); }
.list-item.disarmed { border-color: #804040; background: rgba(128,40,40,.15); }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item .meta small { color: var(--text-dim); font-size: 11px; }
.badge {
  font-family: var(--pixel);
  font-size: 7px;
  padding: 3px 6px;
  border-radius: 2px;
  background: var(--bg);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge.warn { background: #603010; color: var(--warn); }
.badge.ok { background: #104020; color: var(--ok); }
.badge.danger { background: #501020; color: var(--danger); }

/* Stars */
.stars { display: inline-flex; color: var(--gold-bright); letter-spacing: 1px; font-size: 12px; }
.stars .star { display: inline-block; }
.stars .star.off { opacity: .25; }
.stars .star.half {
  color: transparent;
  background: linear-gradient(90deg, var(--gold-bright) 50%, color-mix(in srgb, var(--gold-bright) 25%, transparent) 50%);
  background-clip: text;
  -webkit-background-clip: text;
}
.mastery-stars-result { display: grid; justify-items: center; gap: 3px; margin: 8px 0; }
.mastery-stars-result > small { color: var(--text-dim); }

/* World map */
.biome {
  margin-bottom: 16px;
}
.biome-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.biome-header h3 {
  font-family: var(--pixel);
  font-size: 9px;
  flex: 1;
  color: var(--gold-bright);
}
.trail {
  padding: 8px 12px 14px;
  display: none;
  position: relative;
}
.biome.open .trail { display: block; }
.trail-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0 0 4px 12px;
  background: rgba(0,0,0,.25);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}
.trail-node::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 10px;
  height: 2px;
  background: var(--border);
}
.trail-node:hover { border-color: var(--border); }
.trail-node .enemy-ico {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #0a1525;
  border-radius: 4px;
  border: 1px solid var(--border-dark);
  position: relative;
}
.temp-quente .enemy-ico { box-shadow: 0 0 8px #ff8844; }
.temp-frio .enemy-ico::after,
.temp-congelado .enemy-ico::after {
  content: '❄️';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 12px;
}
.temp-congelado .enemy-ico { filter: hue-rotate(180deg) brightness(1.2); }

/* Battle arena */
.arena {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arena-stage {
  background: linear-gradient(180deg, #1a3048 0%, #0d2030 60%, #1a4020 100%);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}
.arena-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 8px;
}
.fighter {
  text-align: center;
  transition: transform .15s;
}
.fighter .sprite { font-size: 48px; display: block; line-height: 1; }
.fighter.attack { animation: lunge .25s ease; }
.fighter.hurt { animation: shake .3s ease; }
@keyframes lunge {
  0% { transform: translateX(0); }
  40% { transform: translateX(18px); }
  100% { transform: translateX(0); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.dmg-float {
  position: absolute;
  font-family: var(--pixel);
  font-size: 14px;
  color: #ffe066;
  text-shadow: 2px 2px 0 #000;
  animation: floatUp .8s ease forwards;
  pointer-events: none;
  z-index: 5;
}
.dmg-float.miss { color: #ff4466; }
@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}
.emote-balloon {
  position: absolute;
  top: 8px;
  font-family: var(--pixel);
  font-size: 9px;
  background: #fff;
  color: #222;
  padding: 4px 8px;
  border-radius: 8px;
  animation: pop .4s ease;
  z-index: 6;
}
@keyframes pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.slash-fx {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,0,0,.35) 50%, transparent 60%);
  animation: slash .3s ease forwards;
  pointer-events: none;
  z-index: 4;
}
@keyframes slash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
.critical-banner {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  font-family: var(--pixel);
  font-size: 12px;
  color: #ffee44;
  text-shadow: 0 0 10px #ff8800, 2px 2px 0 #000;
  animation: critPop .8s ease forwards;
  z-index: 10;
  white-space: nowrap;
}
@keyframes critPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

.question-card {
  background: #0e1a2c;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
}
.question-card .q-meta {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.question-card .q-text {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 14px;
  color: #f0f4ff;
}
.answer-grid {
  display: grid;
  gap: 8px;
}
.answer-btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px;
  border: 2px solid var(--border);
  background: linear-gradient(180deg, #2a4060, #1a3048);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.answer-btn:hover { filter: brightness(1.1); }
.answer-btn.certo { border-color: #40a0e0; }
.answer-btn.errado { border-color: #e06060; }
.answer-btn.correct { background: #1a5030; border-color: var(--ok); }
.answer-btn.wrong { background: #502020; border-color: var(--danger); }

.explanation-box {
  margin-top: 10px;
  padding: 12px;
  background: rgba(0,0,0,.3);
  border-left: 3px solid var(--gold);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease;
}
@media (min-width: 480px) {
  .modal-overlay { align-items: center; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 420px;
  max-height: 85dvh;
  overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal .ro-body { padding-bottom: 16px; }

/* Onboarding */
.onboard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 70dvh;
  justify-content: center;
}
.onboard h1 {
  font-family: var(--pixel);
  font-size: 14px;
  text-align: center;
  color: var(--gold-bright);
  line-height: 1.6;
  text-shadow: 2px 2px 0 #000;
}
.onboard .sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.avatar-pick {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.avatar-opt {
  width: 100px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--border-dark);
  border-radius: 6px;
  background: var(--bg2);
}
.avatar-opt.selected {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(240,192,64,.3);
}
.avatar-opt .big { font-size: 48px; }

/* Grimório */
.grim-item {
  padding: 10px;
  border-bottom: 1px solid var(--border-dark);
}
.grim-item .title {
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.35;
}
.grim-item__practice {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(140, 164, 255, .16);
  border-radius: 12px;
  background: rgba(7, 10, 20, .46);
}
.grim-item__battle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.grim-item__battle { flex: 0 0 auto; }
.grim-item__waiting {
  color: var(--warn);
  line-height: 1.45;
}
[data-developer-only="true"][hidden] { display: none !important; }

@media (max-width: 560px) {
  .grim-item__battle-row { align-items: stretch; flex-direction: column; }
  .grim-item__battle { width: 100%; }
}
.spheres {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sphere {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #445;
  background: #1a1a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.sphere.on {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(240,192,64,.5);
  background: radial-gradient(circle at 35% 35%, #ffe066, #c08020);
}
.sphere.combat.on {
  background: radial-gradient(circle at 35% 35%, #ff6666, #a02020);
  border-color: #ff8888;
}
.sphere.review.on {
  background: radial-gradient(circle at 35% 35%, #66aaff, #2060a0);
  border-color: #88ccff;
}
.sphere-label {
  font-size: 10px;
  color: var(--text-dim);
  margin-right: 4px;
}
.sphere-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

/* Expedição */
.path-board {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
}
.path-node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}
.path-node::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: -8px;
  width: 2px;
  background: var(--border-dark);
}
.path-node:last-child::after { display: none; }
.path-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 1;
  flex-shrink: 0;
}
.path-node.cumprido .path-ico { border-color: var(--gold); background: #3a3020; }
.path-node.pendente .path-ico { border-color: var(--ok); animation: blink 1s ease infinite; }
.path-node.perdido .path-ico { border-color: #666; filter: grayscale(1); opacity: .7; }
@keyframes blink {
  0%,100% { box-shadow: 0 0 0 0 rgba(68,221,119,.4); }
  50% { box-shadow: 0 0 0 6px rgba(68,221,119,0); }
}
.campfire {
  text-align: center;
  padding: 16px;
  font-size: 48px;
}
.campfire .label {
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--gold);
  margin-top: 8px;
}

/* Cards album */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mvp-card {
  background: linear-gradient(160deg, #2a2040, #1a1528);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  min-height: 120px;
}
.mvp-card .rarity {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--gold-bright);
  margin-bottom: 6px;
}
.mvp-card .enemy { font-size: 28px; margin: 8px 0; }
.mvp-card .name { font-size: 11px; color: var(--text-dim); }

/* Celebration */
.celebration {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: radial-gradient(circle at center, #2a1a40 0%, #0a0818 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  animation: fadeIn .5s ease;
}
.celebration h1 {
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--gold-bright);
  line-height: 1.8;
  text-shadow: 0 0 20px #f0c040;
  margin: 16px 0;
}
.celebration .big-avatar { font-size: 80px; animation: float 2s ease infinite; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.fw {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: fw 1.5s ease-out forwards;
}
@keyframes fw {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* Toast */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  background: #1a3048;
  border: 2px solid var(--gold);
  color: var(--text);
  font-family: var(--pixel);
  font-size: 8px;
  padding: 12px 16px;
  border-radius: 4px;
  max-width: 90%;
  text-align: center;
  line-height: 1.5;
  box-shadow: var(--shadow);
  animation: slideDown .3s ease;
}
@keyframes slideDown {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Tabs in forge */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.tab {
  flex: 1;
  font-family: var(--pixel);
  font-size: 7px;
  padding: 10px 4px;
  background: var(--bg2);
  border: 1px solid var(--border-dark);
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 3px;
}
.tab.active {
  background: var(--panel-hi);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* Núcleo acadêmico v1 — substitui a apresentação JRPG de Estudar sem alterar regras. */
.study-screen,.study-tree { width:min(1440px,100%); margin:0 auto; padding:clamp(16px,2.5vw,32px); overflow-x:clip; }
.study-screen h1,.study-tree h1 { margin:4px 0 8px; color:var(--ds-text-1); font:800 clamp(28px,4vw,44px)/var(--ds-line-tight) var(--display); }
.study-screen h2,.study-tree h2,.study-screen h3,.study-tree h3 { color:var(--ds-text-1); }
.study-screen progress,.study-tree progress { width:100%; height:8px; overflow:hidden; border:0; border-radius:999px; background:var(--ds-surface-3); accent-color:var(--ds-theme-accent); }
.study-screen progress::-webkit-progress-bar,.study-tree progress::-webkit-progress-bar { background:var(--ds-surface-3); }
.study-screen progress::-webkit-progress-value,.study-tree progress::-webkit-progress-value { border-radius:999px; background:var(--ds-theme-accent); }
.study-screen progress::-moz-progress-bar,.study-tree progress::-moz-progress-bar { border-radius:999px; background:var(--ds-theme-accent); }
.study-hero,.study-tree__header { display:grid; gap:22px; border:1px solid var(--ds-theme-border); border-radius:var(--ds-radius-xl); padding:clamp(20px,3vw,36px); background:linear-gradient(145deg,var(--ds-surface-1),color-mix(in srgb,var(--ds-theme-strong) 12%,var(--ds-surface-2))); box-shadow:var(--ds-shadow-1); }
.study-hero > div:first-child > p,.study-tree__identity p { max-width:680px; margin:0; color:var(--ds-text-2); font-size:var(--ds-font-size-md); }
.study-summary,.study-tree__summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.study-summary article,.study-tree__summary article { min-width:0; padding:14px; border:1px solid var(--ds-border); border-radius:var(--ds-radius-lg); background:var(--ds-surface-2); }
.study-summary span,.study-tree__summary span { display:block; color:var(--ds-text-3); font:700 var(--ds-type-micro)/var(--ds-line-normal) var(--body); text-transform:uppercase; letter-spacing:.04em; }
.study-summary strong,.study-tree__summary strong { display:block; margin-top:6px; color:var(--ds-text-1); font:800 var(--ds-font-size-xl)/1 var(--display); }
.study-catalog { margin-top:24px; }
.study-catalog__heading { display:flex; align-items:end; justify-content:space-between; gap:18px; }
.study-catalog__heading h2 { margin:4px 0 0; font:800 var(--ds-type-section)/var(--ds-line-tight) var(--display); }
.study-search { width:min(360px,100%); color:var(--ds-text-2); font:700 var(--ds-type-label)/var(--ds-line-normal) var(--body); }
.study-search span { display:block; margin-bottom:6px; }
.study-search input { width:100%; min-height:var(--ds-touch-target); border:1px solid var(--ds-border); border-radius:var(--ds-radius-md); padding:0 14px; background:var(--ds-surface-1); color:var(--ds-text-1); font:500 var(--ds-font-size-md)/1 var(--body); }
.study-filters { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.study-filter { min-height:var(--ds-touch-target); border:1px solid var(--ds-border); border-radius:999px; padding:0 16px; background:var(--ds-surface-2); color:var(--ds-text-2); font:750 var(--ds-type-label)/1 var(--body); cursor:pointer; }
.study-filter:hover,.study-filter[aria-pressed="true"] { border-color:var(--ds-theme-border); background:color-mix(in srgb,var(--ds-theme-accent) 16%,var(--ds-surface-2)); color:var(--ds-text-1); }
.study-results { min-height:20px; margin:12px 0; color:var(--ds-text-3); font-size:var(--ds-type-micro); }
.study-discipline-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:12px; }
.study-discipline-card { min-width:0; min-height:250px; display:flex; flex-direction:column; align-items:stretch; gap:9px; border:1px solid var(--ds-border); border-radius:var(--ds-radius-xl); padding:16px; background:var(--ds-surface-1); color:var(--ds-text-1); text-align:left; cursor:pointer; box-shadow:var(--ds-shadow-1); transition:transform var(--ds-duration-fast),border-color var(--ds-duration-fast),background var(--ds-duration-fast); }
.study-discipline-card:hover { transform:translateY(-2px); border-color:var(--ds-theme-border); background:color-mix(in srgb,var(--ds-theme-accent) 6%,var(--ds-surface-1)); }
.study-discipline-card__top,.study-progress-copy,.study-discipline-card__stats { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.study-discipline-card__icon { width:44px; height:44px; display:grid; place-items:center; border:1px solid var(--ds-theme-border); border-radius:var(--ds-radius-md); background:color-mix(in srgb,var(--ds-theme-accent) 14%,transparent); color:var(--ds-theme-accent); }
.study-state { display:inline-flex; width:max-content; align-items:center; min-height:26px; border:1px solid var(--ds-border); border-radius:999px; padding:3px 9px; color:var(--ds-text-2); font:750 var(--ds-type-micro)/1 var(--body); }
.study-state--active { border-color:var(--ds-border-active); color:var(--ds-data-400); }
.study-state--danger { border-color:var(--ds-border-danger); color:var(--ds-danger-400); }
.study-state--good,.study-state--success { border-color:var(--ds-border-positive); color:var(--ds-success-400); }
.study-discipline-card__name { font:800 clamp(20px,2vw,27px)/1.12 var(--display); overflow-wrap:normal; word-break:normal; hyphens:auto; }
.study-discipline-card__meta,.study-subtopic__action p { color:var(--ds-text-3); font-size:var(--ds-type-micro); }
.study-progress-copy { margin-top:auto; color:var(--ds-text-2); font-size:var(--ds-type-label); }
.study-progress-copy strong { color:var(--ds-text-1); }
.study-discipline-card__stats { align-items:stretch; }
.study-discipline-card__stats > span { flex:1; padding:8px 9px; border-radius:var(--ds-radius-md); background:var(--ds-surface-2); }
.study-discipline-card__stats small { display:block; color:var(--ds-text-3); font-size:var(--ds-type-micro); }
.study-discipline-card__stats strong { display:block; margin-top:3px; font-size:var(--ds-font-size-md); }
.study-discipline-card__action { min-height:var(--ds-touch-target); display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--ds-border); color:var(--ds-theme-accent); font:800 var(--ds-type-label)/1 var(--body); }
.study-empty { grid-column:1/-1; }
.study-back { width:max-content; min-height:var(--ds-touch-target); display:inline-flex; align-items:center; gap:8px; border:0; padding:0; background:transparent; color:var(--ds-theme-accent); font:750 var(--ds-type-label)/1 var(--body); cursor:pointer; }
.study-tree__identity { display:flex; align-items:center; gap:16px; }
.study-tree__icon { width:56px; height:56px; display:grid; flex:0 0 auto; place-items:center; border:1px solid var(--ds-theme-border); border-radius:var(--ds-radius-lg); background:color-mix(in srgb,var(--ds-theme-accent) 14%,transparent); color:var(--ds-theme-accent); }
.study-topics { display:grid; gap:12px; margin-top:18px; }
.study-topic { overflow:hidden; border:1px solid var(--ds-border); border-radius:var(--ds-radius-xl); background:var(--ds-surface-1); box-shadow:var(--ds-shadow-1); }
.study-topic.is-expanded { border-color:var(--ds-theme-border); }
.study-topic > h2 { margin:0; }
.study-topic__toggle { width:100%; min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:18px; border:0; padding:14px 18px; background:transparent; color:var(--ds-text-1); text-align:left; cursor:pointer; }
.study-topic__toggle:hover { background:color-mix(in srgb,var(--ds-theme-accent) 7%,transparent); }
.study-topic__toggle strong,.study-topic__toggle small { display:block; }
.study-topic__toggle strong { font:800 var(--ds-font-size-lg)/var(--ds-line-tight) var(--display); }
.study-topic__toggle small { margin-top:5px; color:var(--ds-text-3); font:600 var(--ds-type-micro)/var(--ds-line-normal) var(--body); }
.study-topic__panel { display:grid; gap:10px; padding:0 14px 14px; }
.study-topic__panel[hidden] { display:none; }
.study-subtopic { display:grid; grid-template-columns:minmax(220px,1.3fr) minmax(300px,1fr) minmax(220px,.8fr); align-items:center; gap:18px; border:1px solid var(--ds-border); border-radius:var(--ds-radius-lg); padding:16px; background:var(--ds-surface-2); }
.study-subtopic__main { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.study-subtopic__number { min-width:42px; min-height:32px; display:grid; place-items:center; border-radius:var(--ds-radius-sm); background:color-mix(in srgb,var(--ds-theme-accent) 12%,transparent); color:var(--ds-theme-accent); font:800 var(--ds-type-label)/1 var(--body); }
.study-subtopic h3 { margin:0 0 7px; font:750 var(--ds-font-size-md)/var(--ds-line-normal) var(--body); overflow-wrap:break-word; }
.study-subtopic__metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.study-subtopic__metrics > span { min-width:0; }
.study-subtopic__metrics small,.study-subtopic__metrics strong { display:block; }
.study-subtopic__metrics small { color:var(--ds-text-3); font-size:var(--ds-type-micro); }
.study-subtopic__metrics strong { margin-top:3px; color:var(--ds-text-1); font-size:var(--ds-type-label); }
.study-subtopic__metrics .stars { white-space:nowrap; }
.study-subtopic__action { display:flex; flex-direction:column; align-items:stretch; gap:8px; }
.study-subtopic__action p { margin:0; }
.study-subtopic__action .ds-button { width:100%; min-height:var(--ds-touch-target); }
.study-topic__empty { margin:8px; }
.study-prep nav { display:flex; flex-wrap:wrap; gap:6px; color:var(--ds-text-3); font-size:var(--ds-type-micro); }
.study-prep nav span::after { content:"/"; margin-left:6px; color:var(--ds-border-strong); }
.study-prep nav strong { color:var(--ds-text-1); }
.study-prep__summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:18px; }
.study-prep__summary article { padding:12px; border:1px solid var(--ds-border); border-radius:var(--ds-radius-md); background:var(--ds-surface-2); }
.study-prep__summary span,.study-prep__summary strong { display:block; }
.study-prep__summary span { color:var(--ds-text-3); font-size:var(--ds-type-micro); }
.study-prep__summary strong { margin-top:4px; color:var(--ds-text-1); font-size:var(--ds-font-size-lg); }
.study-prep__mode { margin-top:14px; padding:14px; border:1px solid var(--ds-theme-border); border-radius:var(--ds-radius-lg); background:color-mix(in srgb,var(--ds-theme-accent) 8%,var(--ds-surface-2)); }
.study-prep__mode span,.study-prep__mode strong { display:block; }
.study-prep__mode span { color:var(--ds-theme-accent); font:750 var(--ds-type-micro)/1 var(--body); text-transform:uppercase; }
.study-prep__mode strong { margin-top:7px; color:var(--ds-text-1); }
.study-prep__mode p,.study-prep--empty p { margin:6px 0 0; color:var(--ds-text-2); font-size:var(--ds-type-micro); }
.study-prep__error { margin:12px 0 0; border:1px solid var(--ds-border-danger); border-radius:var(--ds-radius-md); padding:10px; background:rgba(251,113,133,.1); color:var(--ds-danger-400); font-size:var(--ds-type-label); }
.study-prep--empty dl { margin:16px 0 0; }
.study-prep--empty dl div { display:grid; grid-template-columns:110px 1fr; gap:10px; padding:8px 0; border-top:1px solid var(--ds-border); }
.study-prep--empty dt { color:var(--ds-text-3); }
.study-prep--empty dd { margin:0; color:var(--ds-text-1); }

@media (max-width:1100px) {
  .study-discipline-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .study-summary,.study-tree__summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .study-subtopic { grid-template-columns:1fr 1fr; }
  .study-subtopic__action { grid-column:1/-1; }
}
@media (max-width:720px) {
  .study-screen,.study-tree { padding:14px; }
  .study-hero,.study-tree__header { padding:18px; }
  .study-summary,.study-tree__summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .study-catalog__heading { align-items:stretch; flex-direction:column; }
  .study-search { width:100%; }
  .study-filters { flex-wrap:nowrap; overflow-x:auto; padding-bottom:5px; scrollbar-width:thin; }
  .study-filter { flex:0 0 auto; }
  .study-discipline-grid { grid-template-columns:1fr; }
  .study-discipline-card { min-height:0; }
  .study-tree__identity { align-items:flex-start; }
  .study-subtopic { grid-template-columns:1fr; gap:12px; }
  .study-subtopic__action { grid-column:auto; }
  .study-prep__summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:390px) {
  .study-screen,.study-tree { padding:10px; }
  .study-hero,.study-tree__header,.study-discipline-card { padding:15px; }
  .study-summary,.study-tree__summary { grid-template-columns:1fr 1fr; gap:7px; }
  .study-summary article,.study-tree__summary article { padding:10px; }
  .study-discipline-card__stats,.study-subtopic__metrics { grid-template-columns:1fr 1fr; }
  .study-topic__toggle { min-height:64px; padding:12px; }
  .study-topic__panel { padding:0 8px 8px; }
  .study-subtopic { padding:12px; }
}
@media (max-width:320px) {
  .study-tree__identity { display:block; }
  .study-tree__icon { margin-bottom:10px; }
  .study-summary,.study-tree__summary,.study-prep__summary { grid-template-columns:1fr; }
}

/* Administração segura de alunos e acessos */
.admin-access {
  display: grid;
  gap: 14px;
}
.admin-access__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.admin-access__header h3 { margin-bottom: 4px; }
.admin-access__search {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: min(100%, 480px);
}
.admin-access__search input { min-width: 0; flex: 1; }
.admin-access__list {
  display: grid;
  gap: 8px;
}
.admin-access-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}
.admin-access-card__identity,
.admin-access-card__status {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.admin-access-card__identity span,
.admin-access-card__status small {
  overflow-wrap:break-word;
  color: var(--text-dim);
  font-size: 12px;
}
.admin-access-card__status .badge { width: fit-content; }
.admin-access__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 720px) {
  .admin-access__header {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-access__search { width: 100%; }
  .admin-access-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .admin-access-card__status { grid-column: 1; }
  .admin-access-card__action {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 440px) {
  .admin-access__search { flex-direction: column; }
  .admin-access-card { grid-template-columns: 1fr; }
  .admin-access-card__status,
  .admin-access-card__action {
    grid-column: 1;
    grid-row: auto;
  }
  .admin-access-card__action { width: 100%; }
  .admin-access__pagination {
    align-items: stretch;
    flex-wrap: wrap;
  }
}

.section-title {
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--gold-bright);
  margin: 16px 0 10px;
  text-shadow: 1px 1px 0 #000;
}
.muted { color: var(--text-dim); font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-8 { margin-bottom: 8px; }
.text-center { text-align: center; }
.gap-8 { gap: 8px; }

/* Result screen */
.result-stars {
  font-size: 28px;
  text-align: center;
  letter-spacing: 4px;
  margin: 12px 0;
}
.result-xp {
  font-family: var(--pixel);
  font-size: 12px;
  text-align: center;
  color: var(--xp-hi);
  margin: 8px 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }

@media (min-width: 768px) {
  #app { max-width: 520px; box-shadow: 0 0 60px rgba(0,0,0,.5); }
}

/* ============================================================
   DASHBOARD — identidade artística (mockup JRPG + herói lápis)
   ============================================================ */
.dash {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

/* Top HUD pills */
.dash-top {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dash-top::-webkit-scrollbar { display: none; }
.dash-icon-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(120,140,220,.25);
  background: rgba(16, 22, 44, 0.9);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.dash-pill {
  position: relative;
  flex: 1 1 auto;
  min-width: 72px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(14, 20, 40, 0.92);
  border: 1px solid rgba(100, 120, 200, 0.2);
  white-space: nowrap;
}
.dash-pill small {
  display: block;
  font-size: 8px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.dash-pill strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.dash-pill-ico { font-size: 14px; line-height: 1; }
.dash-pill--fire strong { color: #fb923c; }
.dash-pill--energy strong { color: #facc15; }
.dash-pill--xp strong { color: var(--neon-hi); }
.dash-pill--trophy { cursor: pointer; }
.dash-pill--trophy strong { color: #fbbf24; }
.dash-badge-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

/* Hero stage + radar */
.dash-hero-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 10px;
  align-items: stretch;
}
@media (max-width: 380px) {
  .dash-hero-row { grid-template-columns: 1fr; }
}
.dash-hero-stage {
  position: relative;
  min-height: 210px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(90, 60, 200, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(20, 24, 50, 0.5), rgba(8, 10, 22, 0.2));
  border: 1px solid rgba(120, 100, 255, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 6px 10px;
}
.magic-circle {
  position: absolute;
  width: 160px;
  height: 160px;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(140, 110, 255, 0.35);
  box-shadow:
    0 0 40px rgba(120, 80, 255, 0.35),
    inset 0 0 30px rgba(100, 60, 255, 0.2);
  background:
    repeating-conic-gradient(from 0deg, rgba(160,130,255,.12) 0 8deg, transparent 8deg 16deg);
  animation: magicSpin 18s linear infinite;
  pointer-events: none;
}
.magic-circle::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(180, 160, 255, 0.4);
}
@keyframes magicSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.dash-level-badge {
  position: absolute;
  left: 6px;
  top: 8px;
  z-index: 3;
  width: 64px;
  text-align: center;
  pointer-events: none;
}
.dash-level-badge--art {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
.level-badge-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.55));
  display: block;
  margin: 0 auto;
}
.dash-level-text {
  margin-top: -10px;
  position: relative;
  z-index: 1;
}
.dash-level-badge small {
  display: block;
  font-size: 7px;
  color: #f0e6c0;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px #000, 0 0 6px rgba(0,0,0,.8);
  font-weight: 700;
}
.dash-level-badge strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.65), 0 2px 4px #000;
}

.dash-hero-figure {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 286px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dash-hero-stage {
  min-height: 326px;
}
.hero-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.55));
  user-select: none;
  pointer-events: none;
}
.hero-img--home {
  flex: 0 0 286px;
  height: 286px;
  max-width: none;
  width: 286px;
  animation: heroIdle 2.6s ease-in-out infinite;
}
.hero-img--profile {
  height: 96px;
  animation: heroPortraitIdle 2.8s ease-in-out infinite;
}
.hero-img--battle { height: 118px; /* ~64% maior que 72 */ }
.hero-img--onboard { height: 120px; }
.dash-hero-figure.is-legend .hero-img,
.hero-aura-legend {
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.75)) drop-shadow(0 8px 16px rgba(0,0,0,.5));
}
.hero-aura-mid {
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.55)) drop-shadow(0 8px 16px rgba(0,0,0,.5));
}
@keyframes heroIdle {
  0%, 100% { transform: translateY(0) rotate(-.4deg) scale(1); }
  50% { transform: translateY(-8px) rotate(.5deg) scale(1.018); }
}
@keyframes heroPortraitIdle {
  0%, 100% { transform: translateY(0) rotate(-.3deg) scale(1); }
  50% { transform: translateY(-4px) rotate(.4deg) scale(1.015); }
}
@keyframes heroPortraitIdleFlip {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(-.3deg) scale(1); }
  50% { transform: scaleX(-1) translateY(-4px) rotate(.4deg) scale(1.015); }
}
.hero-img--profile.hero-flip {
  animation-name: heroPortraitIdleFlip;
}

.dash-hero-name {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-top: 2px;
}
.dash-hero-name strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.dash-hero-name span {
  display: block;
  font-size: 10px;
  color: var(--neon-hi);
  margin-top: 1px;
}

/* Cards */
.dash-card {
  background: rgba(12, 18, 36, 0.88);
  border: 1px solid rgba(90, 110, 200, 0.22);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.dash-radar-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
}
.dash-card-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c4cbe8;
  margin-bottom: 8px;
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dash-card-head .dash-card-title { margin-bottom: 0; }
.dash-link {
  background: none;
  border: none;
  color: var(--neon-hi);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}
.dash-radar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

/* Quick actions */
.dash-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.dash-qbtn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(100, 120, 220, 0.2);
  background: linear-gradient(180deg, rgba(28, 36, 70, 0.95), rgba(14, 20, 40, 0.95));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform .1s, border-color .15s, box-shadow .15s;
}
.dash-qbtn:active { transform: scale(.97); }
.dash-qbtn:hover {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 16px rgba(124, 106, 245, 0.15);
}
.dash-qico { font-size: 16px; line-height: 1; margin-bottom: 2px; }
.dash-qbtn strong {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #e8ecff;
}
.dash-qbtn small {
  font-size: 8px;
  color: var(--text-dim);
  line-height: 1.2;
}

/* Mid columns */
.dash-mid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 420px) {
  .dash-mid { grid-template-columns: 1.1fr 0.95fr; }
}
.dash-mid-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-disc-list { display: flex; flex-direction: column; gap: 8px; }
.dash-disc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-disc-ico { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.dash-disc-meta { flex: 1; min-width: 0; }
.dash-disc-name {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #d0d6f0;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-disc-pct {
  font-size: 11px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}
.dash-bar-track {
  height: 6px;
  background: rgba(0,0,0,.45);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.04);
}
.dash-bar-track--tall { height: 10px; }
.dash-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
  box-shadow: 0 0 8px currentColor;
}
.dash-bar-fill--xp {
  background: linear-gradient(90deg, #6d28d9, #a78bfa, #c4b5fd);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.55);
}
.dash-ghost-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(100, 120, 220, 0.2);
  background: rgba(255,255,255,.03);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.dash-ghost-btn:hover { color: var(--neon-hi); border-color: rgba(167,139,250,.35); }

.dash-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.dash-stat small {
  display: block;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.dash-stat-lvl {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.dash-stat-xp {
  font-size: 16px;
  font-weight: 800;
  color: var(--neon-hi);
  line-height: 1.4;
}
.dash-xp-block small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-dim);
}
.dash-status-footer {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.dash-rank {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,.25);
}
.dash-rank small {
  display: block;
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.dash-rank strong {
  display: block;
  font-size: 11px;
  color: #fbbf24;
}
.dash-edital-mini { margin-top: 10px; }
.dash-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

/* Mission */
.dash-mission-body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.dash-mission-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--neon-hi);
  margin-bottom: 4px;
}
.dash-mission-body p {
  font-size: 12px;
  line-height: 1.4;
  color: #d8def5;
}
.dash-mission-body p strong { color: #fff; }
.dash-chest {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.4));
  flex-shrink: 0;
}
.dash-cta {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #5b21b6, #7c3aed, #6366f1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .1s, filter .15s;
}
.dash-cta:hover { filter: brightness(1.08); }
.dash-cta:active { transform: scale(.98); }

.dash-countdown {
  text-align: center;
  font-size: 12px;
  color: #fbbf24;
  padding: 10px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px dashed rgba(251, 191, 36, 0.35);
}

.dash-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(100, 120, 220, 0.22);
  background: rgba(20, 28, 52, 0.9);
  color: #c8d0f0;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.dash-chip:hover {
  border-color: rgba(167, 139, 250, 0.5);
  color: #fff;
}
.dash-spec-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 400px) {
  .dash-spec-row { grid-template-columns: repeat(3, 1fr); }
}
.dash-spec {
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(80, 100, 180, 0.15);
}
.dash-spec-name {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #c8d0f0;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-spec small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.dash-speech {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  color: #1a2035;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  position: relative;
}
.dash-speech--pulse {
  animation: speechPulse .5s ease;
}
@keyframes speechPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.02); box-shadow: 0 0 20px rgba(167,139,250,.4); }
  100% { transform: scale(1); }
}

/* Profile / battle hero slots */
.avatar-box--art {
  width: 96px;
  height: 110px;
  background: radial-gradient(ellipse at 50% 70%, rgba(100,70,200,.35), #0a1020 70%);
  border: 1px solid rgba(140, 120, 255, 0.35);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-box--art .hero-img { height: 100px; }

.fighter .hero-img--battle {
  height: 118px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.55));
  animation: heroBattleIdle 2.25s ease-in-out infinite;
}
@keyframes heroBattleIdle {
  0%, 100% { transform: translateY(0) rotate(-.6deg) scale(1); }
  50% { transform: translateY(-6px) rotate(.7deg) scale(1.025); }
}
@keyframes heroBattleIdleFlip {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(-.6deg) scale(1); }
  50% { transform: scaleX(-1) translateY(-6px) rotate(.7deg) scale(1.025); }
}
.fighter .hero-img--battle.hero-flip {
  animation-name: heroBattleIdleFlip;
}
.arena-row {
  min-height: 150px !important;
}
.fighter-glow {
  width: 90px !important;
  height: 28px !important;
  bottom: 28px !important;
}

/* Onboarding art */
.onboard-hero {
  display: flex;
  justify-content: center;
  margin: 4px 0 8px;
}
.onboard-hero .hero-img {
  height: 140px;
  filter: drop-shadow(0 8px 20px rgba(100, 80, 220, 0.4));
}
.avatar-opt .hero-thumb {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.avatar-opt.selected {
  border-color: var(--neon-hi);
  box-shadow: 0 0 16px rgba(124, 106, 245, 0.35);
}

/* Primary buttons lean neon on global */
.btn-primary {
  background: linear-gradient(90deg, #6d28d9, #7c3aed, #4f46e5);
  border-color: #8b7cff;
  border-bottom-color: #3b1d8a;
  border-right-color: #3b1d8a;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.ro-window {
  border-radius: 14px;
  border-color: rgba(90, 110, 200, 0.28);
  background: linear-gradient(180deg, rgba(22, 30, 55, 0.95), rgba(12, 18, 36, 0.95));
  box-shadow: var(--shadow);
}
.ro-title {
  background: linear-gradient(180deg, rgba(40, 48, 90, 0.95), rgba(24, 32, 60, 0.95));
  color: var(--neon-hi);
  border-bottom-color: rgba(60, 70, 120, 0.5);
  border-radius: 12px 12px 0 0;
}

/* ============================================================
   VISUAL UPGRADE v5 — ícones, arena, inimigos, tipografia
   ============================================================ */
.ico {
  display: inline-block;
  vertical-align: -0.15em;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}
.ico--rpg {
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .52)) drop-shadow(0 0 4px rgba(168, 85, 247, .2));
  transform: translateZ(0);
  transition: filter 160ms ease, transform 160ms ease;
}
.ico--rpg .ico__plate { transition: stroke-width 160ms ease, opacity 160ms ease; }
.ico--rpg .ico__glyph { transform-origin: center; transition: transform 160ms ease; }
.ico--energy { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .52)) drop-shadow(0 0 4px rgba(249, 115, 22, .28)); }
.ico--data { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .52)) drop-shadow(0 0 4px rgba(37, 99, 235, .25)); }
.ico--gold { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .52)) drop-shadow(0 0 4px rgba(245, 158, 11, .28)); }
.ico--danger { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .52)) drop-shadow(0 0 4px rgba(220, 38, 38, .25)); }
.ico--nature { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .52)) drop-shadow(0 0 4px rgba(22, 163, 74, .25)); }
button:hover:not(:disabled) .ico--rpg,
a:hover .ico--rpg {
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .58)) drop-shadow(0 0 7px rgba(192, 132, 252, .42));
  transform: translateY(-1px) scale(1.04);
}
button:active:not(:disabled) .ico--rpg,
a:active .ico--rpg { transform: translateY(0) scale(.97); }
button:hover:not(:disabled) .ico--rpg .ico__plate,
a:hover .ico--rpg .ico__plate { stroke-width: 1.15; }
button:hover:not(:disabled) .ico--rpg .ico__glyph,
a:hover .ico--rpg .ico__glyph { transform: scale(1.035); }
.ico--nav { width: 22px; height: 22px; }
.ico--sm { width: 14px; height: 14px; }
.ico--lg { width: 36px; height: 36px; color: var(--gold-bright); }
.ico--inline { margin-right: 6px; color: var(--neon-hi); width: 1em; height: 1em; }
.ico--utility { overflow:visible; filter:none; transition:transform 140ms ease,opacity 140ms ease; }
.ico--control { width:14px; height:14px; vertical-align:-.12em; }
.ico--state { width:12px; height:12px; vertical-align:-.12em; }
.ico--indicator { width:13px; height:13px; vertical-align:-.12em; }
.ico--inline.ico--rpg .ico__plate,.ico--indicator.ico--rpg .ico__plate { opacity:.38; }
.ico--enemy-fallback { width:48px; height:48px; }
button:hover:not(:disabled) .ico--utility { transform:translateY(-1px); }
button:active:not(:disabled) .ico--utility { transform:translateY(0) scale(.96); }

.dash-pill-ico--svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: inherit;
  font-size: 18px;
}
.dash-pill--fire .dash-pill-ico--svg { color: #fb923c; }
.dash-pill--energy .dash-pill-ico--svg { color: #facc15; }
.dash-pill--xp .dash-pill-ico--svg { color: var(--neon-hi); }
.dash-pill--trophy .dash-pill-ico--svg { color: #fbbf24; }

.dash-qico--svg {
  font-size: 20px;
  color: var(--neon-hi);
  margin-bottom: 4px;
  display: flex;
}
.dash-qico--svg .ico { width: 22px; height: 22px; }

.dash-chest .ico { filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.45)); }

/* Nav icons */
.nav-item .nav-ico {
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #6b7498;
  filter: none;
  opacity: 1;
}
.nav-item .nav-ico .ico { width: 22px; height: 22px; }
.nav-item.active .nav-ico {
  color: var(--neon-hi);
  filter: none;
  text-shadow: none;
}
.nav-item.active .nav-ico .ico--rpg {
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)) drop-shadow(0 0 8px rgba(167, 139, 250, .66));
  transform: translateY(-1px) scale(1.06);
}
.nav-item span:last-child {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Titles */
.ro-title {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dash-card-title {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
}
.btn {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 12px;
  text-shadow: none;
}
.dash-cta, .btn-primary {
  font-family: var(--display);
  border-radius: 999px;
}

/* Glass cards */
.dash-card, .ro-window {
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}
.dash-card {
  background: linear-gradient(165deg, rgba(24, 32, 64, 0.75), rgba(10, 14, 30, 0.82));
  border: 1px solid rgba(130, 150, 255, 0.16);
  box-shadow: 0 8px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
}
.dash-pill {
  backdrop-filter: blur(10px);
  background: rgba(12, 18, 40, 0.75);
  border: 1px solid rgba(120, 140, 220, 0.22);
}
.dash-hero-stage {
  border: 1px solid rgba(140, 120, 255, 0.22);
  box-shadow: 0 12px 40px rgba(40, 20, 100, 0.25), inset 0 0 40px rgba(100, 80, 255, 0.08);
}

/* Enemy sprites */
.enemy-img {
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.5));
  user-select: none;
  pointer-events: none;
  max-width: 100%;
}
.enemy-img--sm { width: 40px; height: 40px; }
.enemy-img--md { width: 72px; height: 72px; }
.enemy-img--lg { width: 120px; height: 130px; }
.enemy-img--battle {
  width: 120px;
  height: 130px;
  animation: enemyIdle 2.8s ease-in-out infinite;
  /* fundo já transparente no PNG */
  background: transparent !important;
}
@keyframes enemyIdle {
  0%, 100% { transform: translateY(0) scaleX(-1); }
  50% { transform: translateY(-4px) scaleX(-1); }
}
.fighter--enemy .enemy-img { transform: scaleX(-1); }
.fighter--enemy.attack .enemy-img { animation: enemyLunge .28s ease; }
.fighter--enemy.hurt .enemy-img { animation: enemyHurt .35s ease; }
@keyframes enemyLunge {
  0% { transform: scaleX(-1) translateX(0); }
  40% { transform: scaleX(-1) translateX(-16px); }
  100% { transform: scaleX(-1) translateX(0); }
}
@keyframes enemyHurt {
  0%, 100% { transform: scaleX(-1) translateX(0); filter: drop-shadow(0 0 0 transparent); }
  30% { transform: scaleX(-1) translateX(6px); filter: brightness(1.4) drop-shadow(0 0 8px #f66); }
}

.enemy-ico--art {
  width: 44px !important;
  height: 44px !important;
  padding: 2px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 70%, rgba(80,60,160,.35), #0a1020 70%) !important;
}
.enemy-ico--art .enemy-img { width: 100%; height: 100%; }
.prep-enemy {
  display: flex;
  justify-content: center;
  margin: 8px 0 4px;
  min-height: 130px;
  align-items: flex-end;
}
.prep-enemy .enemy-img { width: 130px; height: 140px; }
.prep-enemy-name {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 8px;
}

/* Arena v2 */
.arena--v2 { gap: 12px; }
.arena-stage {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(140, 150, 255, 0.25);
  min-height: 240px;
  overflow: hidden;
  padding: 12px !important;
  background: #0a1020 !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.arena-stage__bg {
  position: absolute;
  inset: 0;
  background-image: var(--arena-bg);
  background-size: cover;
  background-position: center 60%;
  transform: scale(1.05);
  filter: saturate(1.1) brightness(0.72);
  z-index: 0;
}
.arena-stage__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5,8,18,.55) 0%, transparent 35%, transparent 55%, rgba(5,8,18,.75) 100%),
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 30%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}
.arena-hud,
.arena-row,
.arena-meta {
  position: relative;
  z-index: 2;
}
.arena-hud { margin-bottom: 8px; }
.arena-enemy-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.arena-hp-track { height: 12px !important; border-radius: 99px; }
.arena-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 130px;
  padding: 0 4px;
}
.fighter {
  position: relative;
  text-align: center;
  flex: 1;
  max-width: 42%;
}
.fighter-glow {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 70px;
  height: 24px;
  border-radius: 50%;
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}
.fighter-glow--hero { background: rgba(120, 100, 255, 0.55); }
.fighter-glow--enemy { background: rgba(255, 80, 100, 0.45); }
.fighter .hero-img,
.fighter .enemy-img { position: relative; z-index: 1; }
.fighter-tag {
  position: relative;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  color: #e8ecff;
  text-shadow: 0 1px 4px #000;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fighter-mini-hp {
  width: 72px !important;
  height: 6px !important;
  margin: 4px auto 0 !important;
  border-radius: 99px;
}
.arena-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-bottom: 36px;
  z-index: 2;
}
.arena-vs span {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: var(--gold-bright);
  text-shadow: 0 0 12px rgba(240, 192, 64, 0.6);
}
.arena-vs small {
  font-size: 10px;
  color: rgba(255,255,255,.7);
  background: rgba(0,0,0,.35);
  padding: 2px 8px;
  border-radius: 99px;
}
.arena-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  text-shadow: 0 1px 4px #000;
}
.arena-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,.35);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,.08);
}

.question-card--v2 {
  background: linear-gradient(180deg, rgba(16, 22, 44, 0.95), rgba(10, 14, 28, 0.98));
  border: 1px solid rgba(120, 140, 220, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
  backdrop-filter: blur(12px);
}
.q-badge {
  display: inline-block;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--neon-hi);
  background: rgba(124, 106, 245, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 4px 10px;
  border-radius: 99px;
}
.question-card .q-text {
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
  color: #f2f4ff;
}
.answer-btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(120, 140, 220, 0.3);
  background: linear-gradient(180deg, rgba(40, 52, 90, 0.9), rgba(22, 30, 55, 0.95));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  transition: transform .1s, border-color .15s, box-shadow .15s;
}
.answer-btn:hover {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 16px rgba(100, 80, 220, 0.15);
}
.ans-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(124, 106, 245, 0.2);
  color: var(--neon-hi);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.answer-btn.correct {
  background: linear-gradient(180deg, #1a5030, #0f3020);
  border-color: var(--ok);
}
.answer-btn.wrong {
  background: linear-gradient(180deg, #502020, #301010);
  border-color: var(--danger);
}

.result-list {
  list-style: none;
  font-size: 13px;
  line-height: 1.8;
  margin: 12px 0;
}
.result-list .hi { color: var(--gold-bright); }
.result-list .warn { color: var(--warn); }

/* Map polish */
.trail-node {
  border-radius: 12px;
  background: rgba(8, 12, 28, 0.55);
  border: 1px solid rgba(100, 120, 200, 0.18);
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.trail-node:hover {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 4px 16px rgba(80, 60, 180, 0.2);
  transform: translateX(2px);
}
.biome-header h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Modal polish */
.modal.ro-window {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(140, 150, 255, 0.28);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

/* Toast modern */
.toast {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  background: rgba(16, 22, 44, 0.95);
  backdrop-filter: blur(12px);
}

/* Home name */
.home-name, .dash-hero-name strong {
  font-family: var(--display);
  font-weight: 700;
}
.bar-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* Bottom nav glass */
.bottom-nav {
  background: rgba(6, 10, 22, 0.88) !important;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid rgba(120, 140, 255, 0.16) !important;
}

/* Onboarding modern title */
.onboard h1 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 20%, var(--neon-hi) 60%, var(--gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

/* Tópicos principais (Conhecimentos Gerais / Específicos) */
.dash-topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dash-topic {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(100, 120, 220, 0.18);
  background: rgba(8, 12, 28, 0.45);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.dash-topic:hover {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 4px 14px rgba(80, 60, 180, 0.15);
}
.dash-topic:active { transform: scale(.98); }
.dash-topic-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dash-topic-ico { font-size: 14px; flex-shrink: 0; }
.dash-topic-name {
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e4e8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-topic-pct {
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Status + Desafio lado a lado */
.dash-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
@media (max-width: 380px) {
  .dash-duo { grid-template-columns: 1fr; }
}
.dash-duo-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}
.dash-mission-body--grow {
  flex: 1;
  align-items: flex-start;
}
.dash-duo-card .dash-cta {
  margin-top: auto;
}

/* Edital unificado */
.dash-edital-card { margin-top: 0; }
.dash-edital-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(100, 120, 200, 0.15);
}
.dash-edital-block:first-of-type {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}
.dash-edital-block-title {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--neon-hi);
  margin: 0 0 10px;
}
.dash-disc-row--btn {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 4px;
}
.dash-disc-row--btn:hover {
  background: rgba(124, 106, 245, 0.08);
}
.dash-disc-name {
  text-transform: none !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}
/* esconde layout antigo de 2 colunas mid */
.dash-mid { display: none !important; }
.dash-subjects { display: none !important; }
/* Fim do CSS */

/* ========== 14.x Meta Diária HUD + Metas + Bem-estar ========== */
.dash-pill--meta {
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.dash-pill--meta.is-complete {
  border-color: rgba(240, 192, 64, 0.55);
  box-shadow: 0 0 12px rgba(240, 192, 64, 0.25);
}
.dash-pill--meta.is-complete strong { color: var(--gold-bright); }
.meta-ring {
  --p: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--neon-hi) calc(var(--p) * 1%), rgba(80, 90, 130, 0.35) 0);
  position: relative;
}
.dash-pill--meta.is-complete .meta-ring {
  background: conic-gradient(var(--gold) 100%, var(--gold) 0);
}
.meta-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0c1224;
}
.meta-ring__center {
  position: relative;
  z-index: 1;
  font-size: 11px;
  line-height: 1;
  display: flex;
  color: var(--neon-hi);
}
.dash-pill--meta.is-complete .meta-ring__center { color: var(--gold-bright); }

/* Semana horizontal Metas */
.meta-week-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-week-summary small {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.meta-week-summary strong {
  font-family: var(--display);
  font-size: 15px;
}
.meta-week-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.meta-day-card {
  flex: 0 0 108px;
  scroll-snap-align: start;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(100, 120, 200, 0.2);
  background: rgba(8, 12, 28, 0.55);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 140px;
}
.meta-day-card.is-today {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 16px rgba(124, 106, 245, 0.2);
}
.meta-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.meta-day-head strong { font-size: 13px; }
.meta-day-head small { font-size: 10px; color: var(--text-dim); }
.meta-day-goal { font-size: 12px; font-weight: 700; color: #e8ecff; }
.meta-day-focus, .meta-day-time { font-size: 10px; }
.meta-day-bar { height: 5px !important; margin-top: auto; }
.meta-day-status {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.meta-day-card.status-cumprido .meta-day-status { color: var(--ok); }
.meta-day-card.status-parcial .meta-day-status { color: var(--warn); }
.meta-day-card.status-perdido .meta-day-status { color: var(--danger); }
.meta-day-card.status-pendente .meta-day-status { color: var(--neon-hi); }
.meta-day-card.status-off { opacity: 0.55; }
.status-fill-cumprido { background: linear-gradient(90deg, #22c55e, #4ade80) !important; }
.status-fill-parcial { background: linear-gradient(90deg, #f59e0b, #fbbf24) !important; }
.status-fill-perdido { background: linear-gradient(90deg, #ef4444, #f87171) !important; }
.status-fill-pendente, .status-fill-planejado { background: linear-gradient(90deg, #7c3aed, #a78bfa) !important; }
.status-fill-off { background: transparent !important; }

.meta-edit-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(80, 100, 160, 0.15);
}
.meta-edit-day {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.meta-edit-fields {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 6px;
}
.meta-edit-fields select,
.meta-edit-fields input {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-dark);
  background: #0a1525;
  color: var(--text);
  font-size: 12px;
}
.meta-edit-fields select[data-f="focus_discipline_id"],
.meta-edit-fields input[type="time"] {
  grid-column: span 1;
}
@media (min-width: 400px) {
  .meta-edit-fields {
    grid-template-columns: 1fr 70px 1fr 70px 70px;
  }
}

/* Bem-estar */
.wb-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.wb-badge-ok {
  font-size: 11px;
  font-weight: 700;
  color: var(--ok);
  background: rgba(68, 221, 119, 0.12);
  padding: 4px 8px;
  border-radius: 99px;
}
.wb-list { display: flex; flex-direction: column; gap: 10px; }
.wb-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.wb-ico { font-size: 24px; }
.wb-meta { flex: 1; min-width: 0; }
.wb-meta strong { display: block; font-size: 14px; }
.wb-meta small { color: var(--text-dim); font-size: 11px; }
.wb-check { font-size: 16px; }
.wb-card--done { border-color: rgba(68, 221, 119, 0.35); }
.wb-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.wb-btn { flex: 1; min-width: 80px; }

/* ========== Árvore de subtópicos (topic tree) ========== */
.tree-screen { padding-bottom: 8px; }
.tree-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tree-stats small {
  display: block;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tree-stats strong {
  font-family: var(--display);
  font-size: 15px;
  color: #fff;
}
.tree-path {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 8px;
}
.tree-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.tree-connector {
  width: 3px;
  height: 18px;
  margin: 0 auto;
  background: rgba(100, 120, 180, 0.35);
  border-radius: 2px;
}
.tree-connector.is-lit {
  background: linear-gradient(180deg, var(--neon-hi), var(--gold));
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}
.tree-node {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(120, 140, 220, 0.22);
  background: linear-gradient(165deg, rgba(22, 30, 58, 0.9), rgba(10, 14, 30, 0.92));
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.tree-node:hover:not(.locked) {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 6px 20px rgba(80, 60, 180, 0.2);
  transform: translateY(-1px);
}
.tree-node.locked {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.tree-step.is-mastered .tree-node {
  border-color: rgba(68, 221, 119, 0.35);
}
.tree-node-art {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 70%, rgba(90, 70, 180, 0.35), #0a1020 70%);
  border: 1px solid rgba(100, 120, 200, 0.25);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.tree-node-art .enemy-img {
  width: 52px;
  height: 52px;
}
.tree-lock { font-size: 22px; align-self: center; margin-bottom: 8px; }
.tree-badge-ok {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ok);
  color: #042;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tree-node-body { flex: 1; min-width: 0; }
.tree-num {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-hi);
  letter-spacing: 0.04em;
}
.tree-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #eef2ff;
  line-height: 1.25;
  margin: 2px 0 4px;
}
.tree-stars { font-size: 12px; }
.tree-chevron {
  font-size: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}
.tree-end {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  padding: 12px 0 4px;
  font-weight: 600;
}
.tree-step.temp-quente .tree-node-art {
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.45);
}
.tree-step.temp-frio .tree-node-art,
.tree-step.temp-congelado .tree-node-art {
  box-shadow: inset 0 0 12px rgba(120, 180, 255, 0.25);
}

/* Galeria de evolução do avatar */
.evo-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
@media (max-width: 400px) {
  .evo-gallery { grid-template-columns: repeat(3, 1fr); }
}
.evo-card {
  text-align: center;
  padding: 6px 4px;
  border-radius: 12px;
  border: 1px solid rgba(100, 120, 200, 0.2);
  background: rgba(8, 12, 28, 0.5);
}
.evo-card.is-locked {
  opacity: 0.4;
  filter: grayscale(0.7);
}
.evo-card.is-active {
  border-color: rgba(240, 192, 64, 0.55);
  box-shadow: 0 0 12px rgba(240, 192, 64, 0.25);
}
.evo-thumb {
  width: 100%;
  height: 64px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.evo-card small {
  display: block;
  font-size: 9px;
  color: var(--neon-hi);
  font-weight: 700;
}
.evo-card span {
  display: block;
  font-size: 8px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-img.hero-flip { transform: scaleX(-1); }
.hero-img.hero-img--home.hero-flip {
  animation: heroIdleFlip 2.6s ease-in-out infinite;
}
@keyframes heroIdleFlip {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(-.4deg) scale(1); }
  50% { transform: scaleX(-1) translateY(-8px) rotate(.5deg) scale(1.018); }
}
.fighter .hero-img.hero-flip.attack {
  animation: lungeFlip .25s ease;
}
@keyframes lungeFlip {
  0% { transform: scaleX(-1) translateX(0); }
  40% { transform: scaleX(-1) translateX(-18px); }
  100% { transform: scaleX(-1) translateX(0); }
}
/* ========================================================================== */
/* FASE 1 — APP SHELL RESPONSIVO                                              */
/* Breakpoints: celular < 768 | tablet 768–1023 | desktop 1024+ | wide 1440+ */
/* Esta seção é aditiva e mantém os estilos históricos das telas.             */
/* ========================================================================== */

html,
body {
  overflow-x: hidden;
}

.app-shell--auth .app-sidebar,
.app-shell--auth .app-topbar,
.app-shell--auth .bottom-nav { display: none !important; }
.app-shell--auth .app-shell__main { width: 100%; }
.app-shell--auth .app-content { min-height: 100dvh; }
.auth-screen {
  min-height: calc(100dvh - 32px);
  display: grid;
  place-items: center;
  padding: 24px 0;
}
.auth-card { width: min(100%, 430px); padding: 28px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand span {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; background: var(--neon); font-weight: 800;
}
.auth-card h1 { margin-bottom: 6px; }
.auth-form { margin-top: 22px; }
.auth-error { color: var(--danger); min-height: 22px; margin-bottom: 8px; }
.auth-demo-note {
  margin-top: 18px; color: var(--text-dim); font-size: 11px; line-height: 1.5;
  border-top: 1px solid var(--border-dark); padding-top: 14px;
}

/* SaaS entry + contest library */
.app-shell--auth { max-width: none !important; padding-bottom: 0 !important; }
.app-shell--auth #screen { padding: 0; overflow: visible; }
.saas-auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); background: #050713; }
.saas-auth__story { position: relative; overflow: hidden; padding: clamp(32px, 6vw, 80px); display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 20% 80%, rgba(56,189,248,.2), transparent 36%), radial-gradient(circle at 75% 20%, rgba(124,106,245,.28), transparent 40%), linear-gradient(145deg,#080b1c,#0b1230); }
.saas-auth__story::after { content:''; position:absolute; inset:0; pointer-events:none; opacity:.17; background-image:linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px); background-size:48px 48px; mask-image:linear-gradient(to bottom,transparent,#000,transparent); }
.saas-brand { display:flex; align-items:center; gap:12px; position:relative; z-index:1; }
.saas-brand>span,.saas-brand__mark { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; color:white; font:800 14px var(--display); background:linear-gradient(145deg,var(--neon),#4f46e5); box-shadow:0 10px 30px rgba(124,106,245,.35); object-fit:cover; flex:0 0 auto; }
.saas-brand strong { font:700 15px var(--display); letter-spacing:.08em; }
.saas-brand em { color:var(--neon-hi); font-style:normal; }
.saas-auth__headline { position:relative; z-index:1; max-width:720px; margin:70px 0; }
.saas-kicker { display:block; color:var(--neon-hi); text-transform:uppercase; letter-spacing:.18em; font-size:11px; font-weight:800; margin-bottom:14px; }
.saas-auth__headline h1 { font:700 clamp(42px,5.5vw,78px)/1.02 var(--display); letter-spacing:-.05em; margin-bottom:24px; }
.saas-auth__headline h1 b { color:transparent; background:linear-gradient(90deg,#fff,var(--neon-hi),var(--neon-cyan)); background-clip:text; }
.saas-auth__headline p { max-width:580px; color:#b6c0df; font-size:18px; line-height:1.65; }
.saas-auth__benefits { position:relative; z-index:1; display:flex; gap:26px; flex-wrap:wrap; color:#c7cfea; font-size:12px; }
.saas-auth__benefits span { display:flex; align-items:center; gap:8px; }
.saas-auth__benefits b { color:var(--neon-cyan); font-size:10px; }
.saas-auth__panel { display:grid; place-items:center; padding:40px; background:linear-gradient(180deg,#0b0f20,#080a14); }
.saas-auth__form-wrap { width:min(100%,430px); }
.saas-auth__form-wrap h2 { font:700 34px var(--display); margin-bottom:8px; }
.saas-auth__form-wrap>p { color:var(--text-dim); margin-bottom:28px; }
.saas-auth__form-wrap .field input { border-radius:10px; padding:14px; background:#0e1427; }
.auth-submit { min-height:50px; border-radius:10px; font-size:11px; }
.auth-switch { width:100%; border:0; background:none; color:var(--neon-hi); padding:17px; cursor:pointer; font-weight:700; }
.library-page { min-height:100dvh; background:radial-gradient(circle at 85% 0,rgba(124,106,245,.16),transparent 30%),#070a13; padding-bottom:80px; }
.library-header { height:82px; padding:0 max(28px,calc((100vw - 1280px)/2)); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(130,145,220,.15); background:rgba(7,10,19,.75); backdrop-filter:blur(18px); }
.library-account { display:flex; align-items:center; gap:10px; }
.library-account>span { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:linear-gradient(145deg,var(--neon),#4338ca); font-weight:800; }
.library-account div { display:flex; flex-direction:column; }
.library-account small { color:var(--text-dim); }
.library-account button { margin-left:10px; border:0; background:none; color:var(--text-dim); cursor:pointer; }
.library-hero { max-width:1280px; margin:0 auto; padding:72px 28px 54px; display:flex; justify-content:space-between; align-items:end; gap:32px; }
.library-hero h1 { font:700 clamp(34px,5vw,62px)/1.05 var(--display); letter-spacing:-.04em; margin-bottom:14px; }
.library-hero p { color:var(--text-dim); font-size:17px; }
.library-summary { flex:0 0 auto; padding:22px 28px; border:1px solid var(--border); border-radius:18px; background:rgba(19,25,48,.7); display:flex; align-items:center; gap:12px; }
.library-summary strong { color:var(--neon-hi); font-size:34px; }
.library-summary span { color:var(--text-dim); }
.library-section { max-width:1280px; margin:0 auto; padding:22px 28px 38px; }
.library-section--catalog { margin-top:20px; padding-top:42px; border-top:1px solid rgba(130,145,220,.12); }
.library-section__title { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:22px; }
.library-section__title h2 { font:700 26px var(--display); }
.library-section__title>p { color:var(--text-dim); font-size:12px; }
.contest-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.contest-card { min-width:0; overflow:hidden; border:1px solid rgba(130,145,220,.18); border-radius:20px; background:linear-gradient(155deg,rgba(22,29,53,.96),rgba(10,14,28,.96)); transition:transform .2s,border-color .2s; }
.contest-card:hover { transform:translateY(-3px); border-color:var(--contest); }
.contest-card__visual { min-height:118px; padding:22px; display:flex; align-items:start; justify-content:space-between; background:radial-gradient(circle at 10% 100%,var(--contest),transparent 55%),linear-gradient(120deg,rgba(255,255,255,.06),transparent); }
.contest-card__visual span { width:58px; height:58px; display:grid; place-items:center; border-radius:16px; background:rgba(5,8,18,.72); border:1px solid var(--contest-accent); color:var(--contest-accent); font-weight:800; }
.contest-card__visual small { padding:6px 9px; border-radius:20px; background:rgba(5,8,18,.7); color:#d8def4; }
.contest-card__body { padding:24px; }
.contest-card__code { color:var(--contest-accent); font-size:10px; font-weight:800; letter-spacing:.15em; }
.contest-card h3 { font:700 21px var(--display); margin:7px 0 2px; }
.contest-card__role { color:#c8d0e8 !important; font-weight:600; }
.contest-card__body>p { color:var(--text-dim); font-size:13px; line-height:1.55; margin-top:12px; min-height:40px; }
.contest-card__footer { margin-top:22px; padding-top:18px; border-top:1px solid rgba(130,145,220,.13); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.contest-card__footer>div { display:flex; flex-direction:column; }
.contest-card__footer small { color:var(--text-dim); }
.contest-card__footer strong { font-size:17px; }
.contest-card__footer .btn { border-radius:9px; }
.library-empty { color:var(--text-dim); padding:30px; border:1px dashed var(--border); border-radius:16px; }
@media(max-width:900px){.saas-auth{grid-template-columns:1fr}.saas-auth__story{min-height:430px}.saas-auth__benefits{display:none}.contest-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-account div{display:none}}
@media(max-width:620px){.saas-auth__story{padding:28px;min-height:390px}.saas-auth__panel{padding:36px 22px}.saas-auth__headline{margin:48px 0}.contest-grid{grid-template-columns:1fr}.library-hero{align-items:start;flex-direction:column;padding-top:45px}.library-section__title{align-items:start;flex-direction:column}.library-header{padding:0 18px}.library-account button{margin-left:2px}}

.app-shell,
.app-shell__main,
.app-content,
.page-container,
.desktop-grid {
  min-width: 0;
}

.app-sidebar,
.app-topbar {
  display: none;
}

.app-shell__main {
  width: 100%;
}

.app-content {
  width: 100%;
}

.page-container {
  width: 100%;
  margin-inline: auto;
}

.section-header,
.stats-panel {
  display: none;
}

.desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

:where(.nav-item, .app-sidebar__item, .app-topbar__profile, button, a):focus-visible {
  outline: 3px solid var(--gold, #ffd166);
  outline-offset: 3px;
}

img,
canvas,
svg {
  max-width: 100%;
}

@media (min-width: 768px) {
  #app.app-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding-bottom: 0;
  }

  .bottom-nav {
    display: none !important;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: 80px;
    flex-direction: column;
    padding: 18px 10px;
    border-right: 1px solid rgba(140, 164, 255, .18);
    background: rgba(6, 8, 18, .96);
    box-shadow: 12px 0 36px rgba(0, 0, 0, .24);
  }

  .app-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-bottom: 18px;
  }

  .app-sidebar__mark {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: cover;
    border: 1px solid rgba(255, 209, 102, .55);
    border-radius: 13px;
    background: rgba(255, 209, 102, .08);
    box-shadow: 0 0 16px rgba(251, 146, 60, .18);
    flex: 0 0 auto;
  }

  .app-sidebar__brand-copy,
  .app-sidebar__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .app-sidebar__nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
  }

  .app-sidebar__item {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 13px;
    color: var(--muted, #98a2bd);
    background: transparent;
    cursor: pointer;
  }

  .app-sidebar__item:hover,
  .app-sidebar__item.active {
    color: var(--gold, #ffd166);
    border-color: rgba(255, 209, 102, .22);
    background: rgba(255, 209, 102, .09);
  }

  .app-sidebar__icon,
  .app-sidebar__icon svg {
    width: 22px;
    height: 22px;
  }

  .app-shell__main {
    margin-left: 80px;
    width: calc(100% - 80px);
  }

  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 24px;
    border-bottom: 1px solid rgba(140, 164, 255, .16);
    background: rgba(6, 8, 18, .88);
    backdrop-filter: blur(18px);
  }

  .app-topbar small {
    display: block;
    color: var(--muted, #98a2bd);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  .app-topbar strong {
    display: block;
    margin-top: 2px;
    color: var(--text, #f7f8ff);
    font-size: 13px;
  }

  .app-topbar__stats {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .app-topbar__profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 0;
    border-radius: 12px;
    color: inherit;
    background: transparent;
    cursor: pointer;
  }

  #shell-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    color: #111522;
    background: linear-gradient(135deg, var(--gold, #ffd166), #ff9f43);
    font-weight: 800;
  }

  #screen {
    width: 100%;
    padding: 22px 24px 40px;
    overflow: visible;
  }

  .page-container {
    max-width: 1180px;
  }

  .section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
  }

  .section-header__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--gold, #ffd166);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .section-header__title {
    margin: 0;
    color: var(--text, #f7f8ff);
    font: 700 25px/1.2 Sora, sans-serif;
  }

  .section-header__subtitle {
    margin: 6px 0 0;
    color: var(--muted, #98a2bd);
    font-size: 13px;
  }

  .stats-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
  }

  .stats-panel__item {
    padding: 14px 16px;
    border: 1px solid rgba(140, 164, 255, .16);
    border-radius: 14px;
    background: rgba(16, 20, 39, .72);
  }

  .stats-panel__item span,
  .stats-panel__item strong {
    display: block;
  }

  .stats-panel__item span {
    color: var(--muted, #98a2bd);
    font-size: 11px;
  }

  .stats-panel__item strong {
    margin-top: 5px;
    color: var(--text, #f7f8ff);
    font: 700 17px Sora, sans-serif;
  }

  .desktop-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-container--profile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .page-container--profile > .section-header,
  .page-container--profile > .stats-panel,
  .page-container--profile > :last-child {
    grid-column: 1 / -1;
  }

  .page-container--home .dash-hero-row,
  .page-container--home .dash-duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-container--home .dash-quick {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-shell--immersive .app-sidebar,
  .app-shell--immersive .app-topbar {
    display: none;
  }

  .app-shell--immersive .app-shell__main {
    width: 100%;
    margin-left: 0;
  }
}

@media (min-width: 1024px) {
  .app-sidebar {
    width: 240px;
    padding: 22px 16px;
  }

  .app-sidebar__brand {
    justify-content: flex-start;
    gap: 11px;
    padding-inline: 8px;
  }

  .app-sidebar__brand-copy,
  .app-sidebar__label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .app-sidebar__brand-copy strong,
  .app-sidebar__brand-copy small {
    display: block;
  }

  .app-sidebar__brand-copy strong {
    color: var(--text, #f7f8ff);
    font: 800 15px Sora, sans-serif;
  }

  .app-sidebar__brand-copy small {
    color: var(--gold, #ffd166);
    font-size: 9px;
    letter-spacing: .18em;
  }

  .app-sidebar__item {
    justify-content: flex-start;
    gap: 13px;
    padding: 0 15px;
  }

  .app-sidebar__label {
    font-size: 14px;
    font-weight: 700;
  }

  .app-shell__main {
    width: calc(100% - 240px);
    margin-left: 240px;
  }

  .app-topbar {
    padding-inline: 32px;
  }

  #screen {
    padding: 28px 32px 48px;
  }

  .page-container {
    max-width: 1320px;
  }

  .desktop-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .app-sidebar {
    width: 264px;
  }

  .app-shell__main {
    width: calc(100% - 264px);
    margin-left: 264px;
  }

  .app-topbar {
    padding-inline: 40px;
  }

  #screen {
    padding-inline: 40px;
  }

  .page-container {
    max-width: 1500px;
  }
}

.dash-hero-row--solo { grid-template-columns:1fr !important; }
.dash-hero-row--solo .dash-hero-stage { width:100%; max-width:680px; margin-inline:auto; }
.dash-edital-card[hidden] { display:none !important; }

@media (max-width: 620px) {
  .dash-hero-figure { height: 252px; }
  .dash-hero-stage { min-height: 292px; }
  .hero-img--home { flex-basis: 252px; height: 252px; width: 252px; }
}

/* FASE 2 — Shell e Navegação v1 */
.skip-link {
  position:fixed;
  z-index:400;
  top:8px;
  left:12px;
  min-height:var(--ds-touch-target);
  display:flex;
  align-items:center;
  padding:8px 14px;
  border:1px solid var(--ds-border-active);
  border-radius:var(--ds-radius-md);
  color:var(--ds-text-1);
  background:var(--ds-surface-3);
  box-shadow:var(--ds-shadow-focus);
  transform:translateY(-150%);
}
.skip-link:focus { transform:translateY(0); }

main:focus { outline:none; }
main:focus-visible { outline:3px solid var(--ds-theme-accent); outline-offset:-3px; }

#app .app-topbar__contest,
#app .app-topbar__profile {
  min-width:0;
  min-height:var(--ds-touch-target);
  border:1px solid transparent;
  color:var(--ds-text-1);
  background:transparent;
  font:inherit;
  cursor:pointer;
}
#app .app-topbar__contest { text-align:left; }
#app .app-topbar__contest strong,
#app .app-topbar__profile strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#app .app-topbar__contest:hover,
#app .app-topbar__profile:hover,
#app .app-topbar__contest.active,
#app .app-topbar__profile.active {
  border-color:var(--ds-theme-border);
  background:var(--ds-theme-wash);
}

.app-sidebar__nav { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.app-sidebar__group { display:grid; gap:4px; }
#app .app-sidebar__section {
  margin:12px 10px 4px;
  color:var(--ds-text-4);
  font:750 var(--ds-type-micro)/1.2 var(--sans);
  letter-spacing:.12em;
  text-transform:uppercase;
}
.app-sidebar__item { position:relative; }
#app .app-sidebar__item.active::before {
  content:"";
  position:absolute;
  inset:10px auto 10px 0;
  width:3px;
  border-radius:var(--ds-radius-pill);
  background:var(--ds-theme-accent);
}
#app .app-sidebar__item.active { border-color:var(--ds-theme-border); background:var(--ds-theme-wash); color:var(--ds-text-1); box-shadow:none; }
.app-sidebar__session { padding-top:12px; border-top:1px solid var(--ds-border); }
.app-sidebar__active-journey { display:grid; gap:6px; margin-bottom:10px; padding:12px; border:1px solid var(--ds-theme-border); border-radius:var(--ds-radius-md); background:var(--ds-theme-wash); }
.app-sidebar__active-journey[hidden] { display:none; }
.app-sidebar__active-journey small { color:var(--ds-text-4); font:800 9px/1.2 var(--sans); letter-spacing:.12em; }
.app-sidebar__active-journey strong { color:var(--ds-text-1); font:800 15px/1.2 var(--display); }
#app .app-sidebar__active-journey button { min-height:var(--ds-touch-target); padding:0; border:0; color:var(--ds-theme-accent); background:transparent; text-align:left; font:750 12px/1.2 var(--sans); cursor:pointer; }
.app-shell--private-library .app-topbar__stats,
.app-shell--private-library .app-sidebar__group[data-nav-group="journey"],
.app-shell--private-library .app-sidebar__group[data-nav-group="evolution"] { display:none; }
#app .app-sidebar__logout {
  width:100%;
  min-height:var(--ds-touch-target);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px solid transparent;
  border-radius:var(--ds-radius-md);
  color:var(--ds-text-3);
  background:transparent;
  font:700 var(--ds-type-label)/1.2 var(--sans);
  cursor:pointer;
}
#app .app-sidebar__logout svg { width:20px; height:20px; }
#app .app-sidebar__logout:hover { border-color:var(--ds-border-danger); color:var(--ds-text-critical); background:rgba(251,113,133,.08); }

.bottom-nav { max-width:none; border-color:var(--ds-border); background:rgba(7,9,20,.96); }
.nav-item { position:relative; min-height:var(--ds-touch-target); color:var(--ds-text-3); }
#app .nav-item.active { color:var(--ds-theme-accent); background:var(--ds-theme-wash); }
#app .nav-item.active::before {
  content:"";
  position:absolute;
  top:2px;
  width:22px;
  height:3px;
  border-radius:var(--ds-radius-pill);
  background:var(--ds-theme-accent);
}
.nav-item .nav-ico { width:22px; height:22px; }
.nav-item .nav-ico svg { width:100%; height:100%; }

.mobile-more[hidden] { display:none; }
.mobile-more {
  position:fixed;
  z-index:250;
  inset:0;
  display:grid;
  align-items:end;
}
.mobile-more__backdrop {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:var(--ds-overlay);
  cursor:pointer;
}
.mobile-more__panel {
  position:relative;
  z-index:1;
  width:100%;
  max-height:min(82dvh,720px);
  display:flex;
  flex-direction:column;
  border-radius:var(--ds-radius-xl) var(--ds-radius-xl) 0 0;
  padding-bottom:env(safe-area-inset-bottom,0px);
}
.mobile-more__header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 18px 12px;
  border-bottom:1px solid var(--ds-border);
}
.mobile-more__header h2 { margin:3px 0 0; font:750 var(--ds-type-section)/1.2 var(--display); }
.mobile-more__close { flex:0 0 auto; font-size:22px; }
.mobile-more__body { display:grid; gap:18px; min-height:0; overflow-y:auto; padding:16px 18px; }
.mobile-more__group { display:grid; gap:8px; }
.mobile-more__group h3 { color:var(--ds-text-3); font:750 var(--ds-type-label)/1.2 var(--sans); letter-spacing:.1em; text-transform:uppercase; }
.mobile-more__items { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.mobile-more__item {
  position:relative;
  min-width:0;
  min-height:58px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--ds-border);
  border-radius:var(--ds-radius-md);
  color:var(--ds-text-2);
  background:var(--ds-surface-interactive);
  font:700 var(--ds-type-label)/1.2 var(--sans);
  text-align:left;
  cursor:pointer;
}
.mobile-more__item__icon { width:30px; height:30px; display:grid; place-items:center; }
.mobile-more__item__icon svg { width:22px; height:22px; }
.mobile-more__item__label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mobile-more__item:hover,
.mobile-more__item.active { border-color:var(--ds-theme-accent); color:var(--ds-text-1); background:var(--ds-theme-wash); }
.mobile-more__item.active::after {
  content:"";
  position:absolute;
  inset:8px 8px auto auto;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--ds-theme-accent);
}
.mobile-more__footer { padding:12px 18px 14px; border-top:1px solid var(--ds-border); }
.mobile-more__logout { width:100%; }
.mobile-more__logout svg { width:20px; height:20px; }
body.has-open-more { overflow:hidden; }

.library-page--embedded { min-height:100%; padding-bottom:calc(var(--nav-h) + 24px); background:transparent; }

@media (max-width:767px) {
  .app-topbar {
    position:sticky;
    top:0;
    z-index:20;
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:7px 10px;
    border-bottom:1px solid var(--ds-border);
    background:rgba(6,8,18,.94);
    backdrop-filter:blur(16px);
  }
  .app-topbar__contest { flex:1 1 auto; padding:4px 8px; }
  .app-topbar__contest small,
  .app-topbar__profile small { display:block; color:var(--ds-text-4); font-size:9px; letter-spacing:.08em; text-transform:uppercase; }
  .app-topbar__contest strong,
  .app-topbar__profile strong { display:block; max-width:126px; margin-top:2px; font-size:12px; }
  .app-topbar__stats { display:none; }
  .app-topbar__profile { flex:0 1 auto; display:flex; align-items:center; gap:7px; padding:4px 7px; border-radius:var(--ds-radius-md); }
  .app-topbar__identity { min-width:0; }
  .app-topbar__avatar { width:34px; height:34px; display:grid; flex:0 0 auto; place-items:center; border-radius:50%; color:var(--ds-text-inverse); background:var(--ds-theme-accent); font-weight:800; }
  .app-content { min-height:calc(100dvh - 58px); }
  .app-shell--immersive .app-topbar { display:none; }
}

@media (max-width:360px) {
  .app-topbar__profile strong { max-width:86px; }
  .mobile-more__items { grid-template-columns:1fr; }
}

@media (min-width:768px) {
  .mobile-more { display:none; }
  .library-page--embedded { padding-bottom:32px; }
  #app .app-sidebar__section {
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
  }
  #app .app-sidebar__logout span {
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
  }
}

@media (min-width:1024px) {
  #app .app-sidebar__section {
    position:static;
    width:auto;
    height:auto;
    margin:12px 10px 4px;
    overflow:visible;
    clip:auto;
    white-space:normal;
  }
  #app .app-sidebar__logout { justify-content:flex-start; padding-inline:15px; }
  #app .app-sidebar__logout span { position:static; width:auto; height:auto; overflow:visible; clip:auto; white-space:normal; }
}
