:root {
  --bg: #05090d;
  --deck: #081018;
  --surface: rgba(12, 20, 29, 0.78);
  --surface-2: rgba(18, 30, 42, 0.86);
  --line: rgba(214, 232, 255, 0.14);
  --line-strong: rgba(214, 232, 255, 0.28);
  --text: #edf6ff;
  --muted: #8da0b3;
  --dim: #5e7185;
  --accent: #35d0ba;
  --accent-2: #78a6ff;
  --warning: #f1d06a;
  --danger: #ff6f7b;
  --ok: #76e09f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(53, 208, 186, 0.16), transparent 34rem),
    radial-gradient(circle at 78% 6%, rgba(120, 166, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 70% 92%, rgba(241, 208, 106, 0.08), transparent 30rem),
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(140deg, #03060a 0%, #071017 48%, #04070b 100%);
  background-size: auto, auto, auto, 44px 44px, 44px 44px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 19%, rgba(53, 208, 186, 0.045) 19% 19.3%, transparent 19.3% 57%, rgba(120, 166, 255, 0.04) 57% 57.3%, transparent 57.3%),
    radial-gradient(circle at 50% 50%, transparent 0 52%, rgba(0, 0, 0, 0.36) 100%);
  pointer-events: none;
}

body.drawer-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(53, 208, 186, 0.58);
  background: rgba(53, 208, 186, 0.13);
  box-shadow: 0 0 0 1px rgba(53, 208, 186, 0.08), 0 12px 32px rgba(0, 0, 0, 0.25);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(248px, 292px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(8, 14, 22, 0.96), rgba(6, 10, 15, 0.88)),
    rgba(7, 12, 17, 0.88);
  backdrop-filter: blur(18px);
}

.brand-block h1,
.hero h2,
.map-header h3 {
  margin: 5px 0 8px;
  letter-spacing: 0;
  line-height: 1.05;
}

.brand-block h1 {
  font-size: 30px;
}

.brand-block p,
.hero p,
.map-header p,
#drawerIntent,
#nextIntent {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 850;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--surface);
  box-shadow: var(--shadow);
}

.profile-panel,
.powers-panel,
.robot-stage,
.archetype-panel,
.profile-actions {
  margin-top: 10px;
  padding: 11px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 850;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

input,
select {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #081019;
  padding: 0 11px;
}

input[type="color"] {
  padding: 4px;
}

.robot-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 11px;
  overflow: hidden;
}

.robot-orbit {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(53, 208, 186, 0.13);
  border-radius: 50%;
  transform: rotate(-18deg) scaleY(0.38);
  box-shadow: 0 0 32px rgba(53, 208, 186, 0.08);
}

.robot-frame {
  width: min(150px, 62vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(53, 208, 186, 0.24);
  border-radius: 26px;
  background:
    radial-gradient(circle, rgba(53, 208, 186, 0.18), transparent 59%),
    conic-gradient(from 180deg, transparent, rgba(120, 166, 255, 0.18), transparent, rgba(53, 208, 186, 0.22), transparent),
    rgba(4, 8, 12, 0.55);
  overflow: visible;
  isolation: isolate;
}

.robot-frame::before {
  content: "";
  position: absolute;
  width: 72%;
  height: 18%;
  bottom: 11%;
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--robot-color, var(--accent)), transparent 48%), transparent 72%);
  filter: blur(10px);
  z-index: -1;
}

.robot-frame img {
  width: 108%;
  height: 108%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--robot-color, var(--accent)), transparent 58%));
}

.robot-frame img[data-style="neon"] {
  filter: saturate(1.16) drop-shadow(0 0 30px color-mix(in srgb, var(--robot-color, var(--accent)), transparent 40%));
}

.robot-frame img[data-style="commander"] {
  filter: contrast(1.08) drop-shadow(0 0 18px rgba(241, 208, 106, 0.5));
}

.robot-meta {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.robot-meta strong {
  font-size: 18px;
}

.robot-meta span {
  color: var(--accent-2);
  font-weight: 850;
}

.archetype-card {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
}

.archetype-card.selected {
  border-color: rgba(53, 208, 186, 0.55);
  background: rgba(53, 208, 186, 0.12);
}

.locked-archetypes {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.locked-archetypes span {
  padding: 9px;
  border: 1px dashed rgba(221, 237, 255, 0.13);
  border-radius: 8px;
  color: var(--dim);
  font-size: 12px;
}

.powers-list {
  display: grid;
  gap: 7px;
}

.power-chip {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: left;
}

.power-chip.unlocked {
  color: var(--text);
  border-color: rgba(241, 208, 106, 0.42);
  background: rgba(241, 208, 106, 0.10);
}

.power-chip.active {
  color: #06110f;
  border-color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--warning));
}

.profile-actions {
  display: grid;
  gap: 8px;
}

.profile-actions button {
  min-height: 40px;
}

.danger {
  color: #ffe7ea;
  border-color: rgba(255, 111, 123, 0.34);
}

.main {
  min-width: 0;
  padding: 16px 20px 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 490px);
  gap: 18px;
  align-items: end;
  margin-bottom: 10px;
}

.hero h2 {
  max-width: 850px;
  font-size: clamp(28px, 2.55vw, 38px);
}

.hero-copy p {
  max-width: 760px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.stat {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(9, 16, 25, 0.78);
}

.stat span,
.mission-strip span,
.drawer-progress span,
.power-unlock span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.stat strong {
  font-size: 24px;
}

.mission-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 26%) auto;
  gap: 16px;
  align-items: center;
  padding: 10px 13px;
  margin-bottom: 9px;
}

.mission-strip div:first-child {
  display: grid;
  gap: 5px;
}

#nextTitle {
  font-size: 17px;
}

#nextIntent {
  font-size: 12px;
}

.primary-cta {
  min-height: 40px;
  padding: 0 16px;
  color: #03100e;
  border-color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--warning));
  font-weight: 900;
  white-space: nowrap;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--warning));
  box-shadow: 0 0 18px rgba(53, 208, 186, 0.35);
}

.journey-board {
  min-height: calc(100vh - 175px);
  border: 1px solid rgba(221, 237, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 78%, rgba(53, 208, 186, 0.13), transparent 18rem),
    radial-gradient(circle at 72% 34%, rgba(120, 166, 255, 0.13), transparent 20rem),
    rgba(6, 10, 16, 0.68);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  padding: 12px 18px 2px;
}

.map-header h3 {
  font-size: 21px;
}

.map-header p {
  max-width: 410px;
  font-size: 13px;
}

.map-canvas {
  position: relative;
  min-height: calc(100vh - 255px);
  margin: 8px 14px 14px;
  border: 1px solid rgba(221, 237, 255, 0.11);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.055), transparent 2rem),
    radial-gradient(circle at 10% 72%, rgba(53, 208, 186, 0.22), transparent 7rem),
    radial-gradient(circle at 34% 23%, rgba(120, 166, 255, 0.18), transparent 8rem),
    radial-gradient(circle at 82% 48%, rgba(241, 208, 106, 0.12), transparent 9rem),
    conic-gradient(from 210deg at 48% 51%, transparent 0deg, rgba(53, 208, 186, 0.055) 58deg, transparent 116deg, rgba(120, 166, 255, 0.05) 205deg, transparent 310deg),
    linear-gradient(115deg, transparent 0 15%, rgba(53, 208, 186, 0.05) 15% 15.4%, transparent 15.4% 43%, rgba(120, 166, 255, 0.045) 43% 43.4%, transparent 43.4%),
    #061019;
  overflow: hidden;
}

.map-canvas::before,
.map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-canvas::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.038) 1px, transparent 1px),
    radial-gradient(circle, rgba(237, 246, 255, 0.26) 1px, transparent 1.5px);
  background-size: 38px 38px, 38px 38px, 92px 92px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 82%);
}

.map-canvas::after {
  border: 1px solid rgba(53, 208, 186, 0.08);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.55), inset 0 0 120px rgba(53, 208, 186, 0.045);
}

.map-region {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: end start;
  padding: 14px;
  border: 1px solid rgba(221, 237, 255, 0.06);
  border-radius: 50%;
  color: rgba(237, 246, 255, 0.18);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  pointer-events: none;
}

.region-a {
  left: -6%;
  top: 43%;
  width: 35%;
  height: 45%;
  background: radial-gradient(circle, rgba(53, 208, 186, 0.13), transparent 70%);
}

.region-b {
  left: 16%;
  top: 8%;
  width: 34%;
  height: 44%;
  background: radial-gradient(circle, rgba(120, 166, 255, 0.13), transparent 70%);
}

.region-c {
  left: 42%;
  top: 14%;
  width: 35%;
  height: 45%;
  background: radial-gradient(circle, rgba(53, 208, 186, 0.11), transparent 70%);
}

.region-d {
  right: -3%;
  bottom: 4%;
  width: 39%;
  height: 56%;
  background: radial-gradient(circle, rgba(241, 208, 106, 0.10), transparent 72%);
}

.route-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.route-line-glow,
.route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.route-line-glow {
  stroke: rgba(53, 208, 186, 0.25);
  stroke-width: 20;
  filter: url(#route-blur);
}

.route-line {
  stroke: url(#route-gradient);
  stroke-width: 4;
  stroke-dasharray: 12 8;
}

.route-ping {
  fill: #edf6ff;
  opacity: 0.55;
  filter: drop-shadow(0 0 8px rgba(53, 208, 186, 0.9));
}

.map-landmark {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 3px;
  transform: translate(-50%, -50%);
  color: rgba(237, 246, 255, 0.62);
  pointer-events: none;
}

.map-landmark strong {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 237, 255, 0.16);
  border-radius: 50%;
  color: rgba(237, 246, 255, 0.72);
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.09), transparent 58%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 22px rgba(53, 208, 186, 0.06);
  font-size: 13px;
  font-weight: 950;
}

.map-landmark span,
.map-landmark em {
  max-width: 104px;
  color: rgba(145, 164, 183, 0.84);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.map-landmark em {
  color: rgba(53, 208, 186, 0.58);
}

.map-deco {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  pointer-events: none;
  color: rgba(237, 246, 255, 0.36);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-deco span {
  position: relative;
  z-index: 1;
  padding: 4px 7px;
  border: 1px solid rgba(221, 237, 255, 0.12);
  border-radius: 999px;
  background: rgba(3, 8, 12, 0.52);
  box-shadow: 0 0 28px rgba(53, 208, 186, 0.08);
}

.deco-radar,
.deco-core,
.deco-gate {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 1px solid rgba(53, 208, 186, 0.12);
  box-shadow: inset 0 0 34px rgba(53, 208, 186, 0.045), 0 0 32px rgba(53, 208, 186, 0.055);
}

.deco-radar::before,
.deco-core::before,
.deco-gate::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  border: 1px dashed rgba(120, 166, 255, 0.16);
}

.deco-satellite {
  width: 94px;
  height: 32px;
  border: 1px solid rgba(120, 166, 255, 0.16);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(120, 166, 255, 0.07), transparent);
}

.deco-risk {
  width: 150px;
  height: 92px;
  border: 1px solid rgba(255, 111, 123, 0.16);
  border-radius: 20px;
  background: repeating-linear-gradient(135deg, rgba(255, 111, 123, 0.035) 0 8px, transparent 8px 16px);
}

.map-landmark.concluido strong {
  border-color: rgba(118, 224, 159, 0.58);
  color: #06110f;
  background: linear-gradient(180deg, var(--ok), rgba(53, 208, 186, 0.8));
}

.map-node {
  position: absolute;
  z-index: 4;
  width: clamp(74px, 7vw, 96px);
  aspect-ratio: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(18, 31, 44, 0.98), rgba(6, 11, 18, 0.92));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34), inset 0 0 24px rgba(255, 255, 255, 0.035);
}

.map-node::before,
.map-node::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.map-node::before {
  inset: -7px;
  border: 1px solid rgba(53, 208, 186, 0.18);
}

.map-node::after {
  inset: 12px;
  border: 1px dashed rgba(221, 237, 255, 0.16);
}

.map-node strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06100e;
  background: var(--accent);
  font-size: 14px;
  font-weight: 950;
}

.map-node small {
  max-width: 86%;
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.map-node i {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  overflow: hidden;
}

.map-node i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--warning));
}

.map-node .flag {
  position: absolute;
  top: -16px;
  right: -7px;
  min-width: 54px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 237, 255, 0.2);
  border-radius: 999px;
  color: var(--accent);
  background: #071019;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.map-node.concluido {
  border-color: rgba(118, 224, 159, 0.74);
  background: linear-gradient(180deg, rgba(28, 86, 63, 0.98), rgba(10, 35, 29, 0.94));
}

.map-node.concluido::before {
  border-color: rgba(118, 224, 159, 0.48);
  box-shadow: 0 0 24px rgba(118, 224, 159, 0.18);
}

.map-node.ativo,
.map-node.current {
  border-color: rgba(241, 208, 106, 0.84);
  background: linear-gradient(180deg, rgba(69, 56, 22, 0.98), rgba(19, 20, 15, 0.94));
}

.map-node.current::before {
  border-color: rgba(241, 208, 106, 0.66);
  box-shadow: 0 0 34px rgba(241, 208, 106, 0.25);
}

.map-node.bloqueado {
  color: var(--muted);
  border-color: rgba(221, 237, 255, 0.08);
  background: linear-gradient(180deg, rgba(20, 26, 34, 0.78), rgba(8, 12, 18, 0.72));
  filter: grayscale(0.45);
}

.map-node.bloqueado strong {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.12);
}

.map-robot {
  position: absolute;
  z-index: 5;
  width: clamp(76px, 7.2vw, 112px);
  height: clamp(76px, 7.2vw, 112px);
  object-fit: contain;
  transform: translate(-50%, -116%);
  transition: left 520ms cubic-bezier(.2,.8,.2,1), top 520ms cubic-bezier(.2,.8,.2,1), filter 180ms ease;
  filter: drop-shadow(0 0 30px color-mix(in srgb, var(--robot-color, var(--accent)), transparent 36%)) drop-shadow(0 18px 14px rgba(0,0,0,0.35));
  pointer-events: none;
}

.map-robot[data-style="neon"] {
  filter: saturate(1.18) drop-shadow(0 0 32px color-mix(in srgb, var(--robot-color, var(--accent)), transparent 30%));
}

.map-robot[data-style="commander"] {
  filter: contrast(1.08) drop-shadow(0 0 24px rgba(241, 208, 106, 0.56));
}

.power-fired .map-robot {
  animation: jump-pulse 720ms ease;
}

@keyframes jump-pulse {
  0%, 100% { transform: translate(-50%, -116%) scale(1); }
  40% { transform: translate(-50%, -138%) scale(1.08); }
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.62);
}

.module-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  width: min(640px, 100vw);
  height: 100vh;
  padding: 20px;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 12%, rgba(53, 208, 186, 0.12), transparent 20rem),
    rgba(7, 12, 18, 0.985);
  box-shadow: -22px 0 60px rgba(0, 0, 0, 0.44);
  overflow-y: auto;
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.module-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

.drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.drawer-head h3 {
  margin: 6px 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.drawer-status {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gate-box {
  margin: 15px 0 0;
  padding: 12px;
  border: 1px solid rgba(241, 208, 106, 0.38);
  border-radius: 8px;
  color: #f6e8bd;
  background: rgba(241, 208, 106, 0.09);
}

.gate-box[hidden] {
  display: none;
}

.drawer-progress,
.power-unlock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 36%);
  gap: 15px;
  align-items: center;
  margin-top: 15px;
}

.drawer-progress {
  padding: 13px 0;
}

.drawer-progress div:first-child,
.power-unlock div {
  display: grid;
  gap: 5px;
}

.power-unlock {
  padding: 14px;
  border-color: rgba(241, 208, 106, 0.24);
  background:
    radial-gradient(circle at 8% 18%, rgba(241, 208, 106, 0.10), transparent 13rem),
    rgba(255, 255, 255, 0.045);
}

.power-unlock p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.power-unlock button {
  min-height: 42px;
  padding: 0 12px;
  font-weight: 950;
}

.drawer-items {
  display: grid;
  gap: 10px;
  margin-top: 15px;
  padding-bottom: 30px;
}

.lesson-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.lesson-row.done {
  border-color: rgba(53, 208, 186, 0.52);
  background: rgba(53, 208, 186, 0.09);
}

.lesson-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
}

.check {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.lesson-main h4 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.25;
}

.lesson-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.xp {
  color: var(--warning);
  white-space: nowrap;
}

details {
  border-top: 1px solid rgba(221, 237, 255, 0.08);
}

summary {
  padding: 10px 13px;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
}

.lesson-detail {
  display: grid;
  gap: 10px;
  padding: 0 13px 14px;
}

.lesson-detail p {
  margin: 0;
  color: #cbd9e6;
  line-height: 1.5;
}

.language-note {
  color: var(--warning) !important;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.load-error {
  position: absolute;
  inset: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 25, 35, 0.78);
}

dialog {
  border: none;
  padding: 0;
  color: var(--text);
  background: transparent;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
}

.dialog-card {
  width: min(420px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--deck);
}

.dialog-card h3 {
  margin: 0 0 10px;
}

.dialog-card menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
}

.dialog-card button {
  min-height: 40px;
  padding: 0 14px;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .brand-block {
    grid-column: 1 / -1;
  }

  .profile-panel,
  .powers-panel,
  .robot-stage,
  .archetype-panel,
  .profile-actions {
    margin-top: 0;
  }

  .hero,
  .mission-strip {
    grid-template-columns: 1fr;
  }

  .map-header {
    align-items: start;
    flex-direction: column;
  }

  .journey-board {
    min-height: 690px;
  }

  .map-canvas {
    min-height: 600px;
  }
}

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 14px;
  }

  .sidebar {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    min-height: auto;
  }

  .brand-block,
  .sidebar .panel {
    flex: 0 0 240px;
  }

  .robot-stage {
    flex-basis: 190px;
  }

  .robot-frame {
    width: 112px;
  }

  .robot-meta strong {
    font-size: 16px;
  }

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

  .stat {
    min-height: 58px;
    padding: 9px;
  }

  .stat strong {
    font-size: 19px;
  }

  .mission-strip {
    gap: 12px;
  }

  .hero h2 {
    font-size: 30px;
  }

  .journey-board {
    min-height: 720px;
  }

  .map-header {
    padding: 14px 14px 0;
  }

  .map-canvas {
    min-height: 620px;
    overflow-x: auto;
  }

  .map-node {
    width: 78px;
  }

  .map-landmark span,
  .map-landmark em {
    display: none;
  }

  .module-drawer {
    padding: 16px;
  }

  .drawer-progress,
  .power-unlock,
  .lesson-main {
    grid-template-columns: 1fr;
  }

  .check {
    order: -1;
  }
}
