:root {
  --bg: #05070d;
  --bg-soft: #080d18;
  --surface: #0a1220;
  --surface-2: #0d1728;
  --line: rgba(126, 176, 255, 0.16);
  --line-strong: rgba(126, 176, 255, 0.28);
  --text: #edf5ff;
  --muted: #9fb0ca;
  --muted-2: #7486a3;
  --cyan: #3ddcff;
  --blue: #168cff;
  --violet: #8b5cf6;
  --green: #67e8b0;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --container: 1160px;
  --header-h: 74px;
  color-scheme: dark;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(22, 140, 255, 0.1), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(139, 92, 246, 0.09), transparent 36%),
    linear-gradient(180deg, #05070d 0%, #060a13 55%, #05070d 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

::selection {
  background: rgba(61, 220, 255, 0.3);
  color: #fff;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--cyan);
  color: #021018;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(61, 220, 255, 0.35);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(61, 220, 255, 0.18), rgba(22, 140, 255, 0.06));
  box-shadow: inset 0 0 22px rgba(61, 220, 255, 0.12);
  color: var(--cyan);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

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

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.brand-text small {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 0.54rem;
  letter-spacing: 0.22em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.primary-nav a {
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.primary-nav a:not(.nav-play):hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

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

.nav-github svg {
  width: 15px;
  height: 15px;
}

.primary-nav .nav-play {
  margin-left: 8px;
}

.primary-nav a.nav-play {
  color: #021018;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 18, 32, 0.6);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.site-header.nav-open .nav-toggle span {
  background: transparent;
}

.site-header.nav-open .nav-toggle span::before {
  transform: translateY(6px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span::after {
  transform: translateY(-6px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #1a9bff 0%, #3ddcff 100%);
  box-shadow: 0 10px 28px rgba(22, 140, 255, 0.28);
  color: #021018;
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(22, 140, 255, 0.4);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(10, 18, 32, 0.55);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: rgba(61, 220, 255, 0.55);
  background: rgba(17, 31, 54, 0.75);
}

.btn-lg {
  padding: 16px 26px;
  border-radius: 14px;
  font-size: 1rem;
}

.hero {
  position: relative;
  display: flex;
  min-height: max(760px, 100svh);
  align-items: flex-end;
  padding: calc(var(--header-h) + 72px) 0 88px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  animation: heroZoom 26s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.09);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, #05070d 0%, rgba(5, 7, 13, 0.96) 18%, rgba(5, 7, 13, 0.76) 42%, rgba(5, 7, 13, 0.3) 70%, rgba(5, 7, 13, 0.12) 100%),
    linear-gradient(180deg, rgba(5, 7, 13, 0.7) 0%, transparent 28%, transparent 58%, #05070d 100%);
}

@media (min-width: 901px) {
  .hero-overlay {
    background:
      linear-gradient(90deg, #05070d 0%, #05070d 36%, rgba(5, 7, 13, 0.96) 50%, rgba(5, 7, 13, 0.68) 66%, rgba(5, 7, 13, 0.3) 82%, rgba(5, 7, 13, 0.12) 100%),
      linear-gradient(180deg, rgba(5, 7, 13, 0.8) 0%, transparent 32%, transparent 58%, #05070d 100%);
  }
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.3;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(103, 232, 176, 0.12), 0 0 18px rgba(103, 232, 176, 0.75);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.6;
    transform: scale(0.75);
  }
}

.hero h1 {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 12%, #d6f6ff 55%, #71d5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: clamp(4.1rem, 11vw, 8.8rem);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 0.85;
  text-transform: uppercase;
  filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.55));
}

.hero-tagline {
  max-width: 590px;
  margin: 24px 0 0;
  color: #c9d7e8;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.7;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

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

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}

.hero-facts strong {
  color: var(--text);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-facts span {
  color: var(--muted);
  font-size: 0.8rem;
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: flex;
  width: 28px;
  height: 44px;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  text-decoration: none;
  transform: translateX(-50%);
}

.scroll-cue span {
  width: 3px;
  height: 9px;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--cyan);
  animation: scrollCue 1.8s ease-in-out infinite;
}

@keyframes scrollCue {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  70% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 0;
  }
}

.section {
  position: relative;
  padding: 96px 0;
}

.section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-heading h2,
.showcase-copy h2,
.download-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-heading > p:last-child,
.showcase-copy > p,
.download-copy > p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

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

.feature-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 24, 42, 0.9), rgba(8, 13, 24, 0.7));
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 160px at 20% 0%, rgba(61, 220, 255, 0.11), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.feature-card:hover {
  border-color: rgba(61, 220, 255, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid rgba(61, 220, 255, 0.22);
  border-radius: 13px;
  background: rgba(61, 220, 255, 0.08);
  color: var(--cyan);
}

.feature-icon svg {
  width: 23px;
  height: 23px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.showcase {
  border-block: 1px solid rgba(126, 176, 255, 0.08);
  background: linear-gradient(180deg, transparent, rgba(10, 18, 32, 0.5) 18%, rgba(10, 18, 32, 0.5) 82%, transparent);
}

.showcase-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.showcase-copy > p {
  font-size: 0.98rem;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: #c8d6e8;
  font-size: 0.94rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(103, 232, 176, 0.35);
  border-radius: 50%;
  background: rgba(103, 232, 176, 0.12);
}

.check-list li::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 6px;
  height: 3px;
  border-bottom: 2px solid var(--green);
  border-left: 2px solid var(--green);
  transform: rotate(-45deg);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.text-link:hover svg {
  transform: translateX(4px);
}

.showcase-media {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.95), rgba(6, 10, 18, 0.95));
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-2deg);
  transition: transform 0.4s ease;
}

.showcase-media:hover {
  transform: perspective(1200px) rotateY(0deg) translateY(-4px);
}

.showcase-media img {
  border-radius: 14px;
}

.showcase-media figcaption {
  padding: 12px 10px 4px;
  color: var(--muted-2);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.download {
  padding-top: 80px;
}

.download-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  overflow: hidden;
  padding: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    radial-gradient(700px 300px at 10% 0%, rgba(22, 140, 255, 0.16), transparent 65%),
    linear-gradient(135deg, rgba(13, 24, 43, 0.95), rgba(7, 12, 22, 0.95));
  box-shadow: var(--shadow);
}

.download-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(126, 176, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 176, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(600px 300px at 80% 20%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(600px 300px at 80% 20%, #000, transparent 70%);
}

.download-copy,
.download-card {
  position: relative;
  z-index: 1;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.download-meta {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.fine-print {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 0.78rem;
  line-height: 1.6;
}

.fine-print a {
  color: var(--cyan);
  text-decoration: none;
}

.fine-print a:hover {
  text-decoration: underline;
}

.download-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 10, 18, 0.6);
  backdrop-filter: blur(10px);
}

.download-card h3 {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.download-card ul {
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.download-card ul:last-child {
  margin-bottom: 0;
}

.download-card li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.download-card li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

.online-note {
  padding-top: 20px;
}

.online-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), rgba(22, 140, 255, 0.05));
}

.online-card h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.online-card p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.online-card .btn {
  flex: none;
}

.site-footer {
  margin-top: 40px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand b {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
}

.footer-brand span {
  color: var(--muted-2);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cyan);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-grid {
    gap: 40px;
  }

  .download-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(5, 10, 20, 0.97);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
  }

  .site-header.nav-open .primary-nav {
    display: flex;
  }

  .primary-nav a {
    padding: 12px 14px;
  }

  .primary-nav .nav-play {
    margin: 6px 0 0;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-media {
    transform: none;
  }

  .showcase-copy {
    order: 1;
  }

  .showcase-media {
    order: 2;
  }

  .online-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 100svh;
    align-items: center;
    padding: calc(var(--header-h) + 44px) 0 76px;
  }

  .hero-media img {
    object-position: 68% center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(5, 7, 13, 0.82) 0%, rgba(5, 7, 13, 0.42) 34%, rgba(5, 7, 13, 0.84) 72%, #05070d 100%),
      linear-gradient(90deg, rgba(5, 7, 13, 0.42), rgba(5, 7, 13, 0.12));
  }

  .hero h1 {
    font-size: clamp(3.4rem, 17vw, 5.6rem);
  }

  .hero-tagline {
    font-size: 0.98rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-facts {
    gap: 12px 20px;
  }

  .scroll-cue {
    display: none;
  }

  .section {
    padding: 72px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    gap: 32px;
  }

  .download-panel {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .download-actions .btn {
    width: 100%;
  }

  .online-card {
    padding: 26px 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------------------
   Hero con editor de avatar
   --------------------------------------------------------------------------- */

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 390px);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  width: 100%;
}

.hero-content {
  min-width: 0;
}

.avatar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(126, 176, 255, 0.28);
  background:
    radial-gradient(circle at 15% 0%, rgba(61, 220, 255, 0.1), transparent 40%),
    linear-gradient(160deg, rgba(10, 18, 32, 0.94), rgba(5, 10, 20, 0.9));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.avatar-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.avatar-card-head .eyebrow {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
}

.avatar-sub {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.avatar-editor-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.avatar-controls {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.avatar-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 176, 0.4);
  background: rgba(103, 232, 176, 0.08);
  color: var(--green);
  font: 700 0.58rem/1 monospace;
  letter-spacing: 0.14em;
}

.avatar-preview-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(126, 176, 255, 0.14);
  background:
    radial-gradient(circle at 50% 35%, rgba(61, 220, 255, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(5, 10, 20, 0.5), rgba(10, 20, 36, 0.55));
  overflow: hidden;
}

#avatar-preview {
  width: 100%;
  max-width: 104px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
}

.avatar-atlas {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid rgba(126, 176, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
  opacity: 0.85;
}

.avatar-name {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.avatar-name input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(126, 176, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: none;
}

.avatar-name input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(61, 220, 255, 0.12);
}

.avatar-fields {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.avatar-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.avatar-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.avatar-field-inline {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.avatar-field-label {
  color: var(--muted-2);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.avatar-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(126, 176, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: 600 0.72rem/1.2 'Segoe UI', system-ui, sans-serif;
}

.avatar-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(61, 220, 255, 0.1);
}

.avatar-select option {
  background: #0a1220;
  color: var(--text);
}

.avatar-field .avatar-color {
  width: 28px;
  height: 28px;
}

.avatar-field .avatar-upload {
  padding: 6px 7px;
}

.avatar-field .avatar-clear {
  width: 24px;
  height: 24px;
}

.avatar-color {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}

.avatar-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.avatar-color::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.avatar-upload {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(126, 176, 255, 0.28);
  background: rgba(22, 140, 255, 0.12);
  color: #cfe8ff;
  font: 700 0.6rem monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.avatar-upload:hover {
  border-color: var(--cyan);
}

.avatar-clear {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(255, 120, 120, 0.35);
  background: rgba(255, 80, 80, 0.12);
  color: #ffb3b3;
  font: 700 0.8rem/1 monospace;
  cursor: pointer;
}

.avatar-clear[hidden],
.avatar-thumb[hidden] {
  display: none;
}

.avatar-thumb {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  image-rendering: pixelated;
}

.avatar-tools {
  display: flex;
  gap: 8px;
}

.btn-mini {
  flex: 1;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(126, 176, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: 700 0.62rem monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-mini:hover {
  color: var(--text);
  border-color: rgba(126, 176, 255, 0.4);
}

.avatar-continue {
  width: 100%;
  justify-content: center;
}

.avatar-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.66rem;
  line-height: 1.5;
  text-align: center;
}

.avatar-note.ok {
  color: var(--green);
}

.avatar-note.error {
  color: #ff9a9a;
}

@media (max-width: 1100px) {
  .hero-layout {
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .avatar-card {
    width: 100%;
    max-width: 480px;
    margin-top: 8px;
  }
}

@media (max-width: 700px) {
  .hero {
    padding-bottom: 64px;
  }

  .avatar-card {
    max-width: none;
    padding: 14px;
  }

  .avatar-editor-body {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

  #avatar-preview {
    max-width: 96px;
  }
}

@media (max-width: 520px) {
  .avatar-editor-body {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
  }

  #avatar-preview {
    max-width: 82px;
  }

  .avatar-thumb,
  .avatar-atlas {
    display: none;
  }

  .avatar-color {
    width: 26px;
    height: 26px;
  }
}
