/* VORDA vivid layer for the night portal. Loaded last; every rule carries the
   portal's own :root[data-theme=night] prefix so it wins by order, not by !important.
   Same material system as the launcher (vivid.css): emerald = act, diamond = info,
   each world keeps its own color through tiles, monitor and roadmap. */

:root[data-theme=night] {
  --vv-bg: #090e1c;
  --vv-panel: #121a33;
  --vv-panel-2: #0f162c;
  --vv-ring: #ffffff14;
  --p-font-display: var(--font-display);
  --p-font-body: var(--font-body);
  background: var(--vv-bg);
}
:root[data-theme=night] body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 620px at 78% -6%, #3a2c8f4d, transparent 62%),
    radial-gradient(900px 520px at 6% 18%, #0f6b4c2e, transparent 62%),
    var(--vv-bg);
}
.vv-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(#ffffff80 1px, transparent 1.6px) 0 0 / 140px 140px,
    radial-gradient(#b9e9ff66 1px, transparent 1.6px) 70px 90px / 190px 190px,
    radial-gradient(#ffe7a855 1.2px, transparent 1.8px) 30px 160px / 260px 260px;
  mask-image: linear-gradient(180deg, #000 0%, #0008 45%, transparent 85%);
  opacity: 0.55;
}

/* ---------- Header ---------- */
:root[data-theme=night] .top-header,
:root[data-theme=night] .top-header.compact {
  background: #0a0f1fcc;
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid #ffffff10;
}
:root[data-theme=night] .brand > span:last-child {
  font-family: var(--font-pixel);
  letter-spacing: 0;
  text-shadow: 2px 2px 0 #0b3a24, 0 0 18px #3ddc6f44;
}
:root[data-theme=night] .desktop-nav a {
  font-weight: 600;
  color: #c3cde6;
}
:root[data-theme=night] .desktop-nav a.active,
:root[data-theme=night] .desktop-nav a:hover {
  color: #fff;
}
:root[data-theme=night] .desktop-nav a::after,
:root[data-theme=night] .desktop-nav a.active:after {
  background: var(--mc-emerald);
  box-shadow: 0 0 10px var(--mc-emerald);
  height: 3px;
  border-radius: 0;
}

/* ---------- Buttons ---------- */
:root[data-theme=night] .button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  clip-path: var(--notch-clip);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #eef3ff;
  background: linear-gradient(180deg, #24335f 0%, #1a2547 100%);
  box-shadow:
    inset 0 -4px 0 #0b1330,
    inset 0 1px 0 #ffffff1c,
    inset 0 0 0 1px #34497f;
  transition:
    transform 160ms var(--ease-out-quint),
    filter 160ms ease,
    box-shadow 120ms ease;
}
:root[data-theme=night] .button.primary {
  color: var(--mc-emerald-ink);
  background: linear-gradient(180deg, var(--mc-emerald-hi) -60%, var(--mc-emerald) 48%);
  box-shadow:
    inset 0 -4px 0 var(--mc-emerald-lo),
    inset 0 2px 0 #ffffff70;
}
:root[data-theme=night] .button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, #ffffff66 50%, transparent 70%);
  transform: translateX(-130%);
  pointer-events: none;
}
:root[data-theme=night] .button:not(.primary)::after {
  background: linear-gradient(105deg, transparent 30%, #ffffff1f 50%, transparent 70%);
}
:root[data-theme=night] .button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06) saturate(1.08);
}
:root[data-theme=night] .button.primary:hover {
  background: linear-gradient(180deg, var(--mc-emerald-hi) -30%, var(--mc-emerald) 55%);
  box-shadow:
    inset 0 -4px 0 var(--mc-emerald-lo),
    inset 0 2px 0 #ffffff70;
}
:root[data-theme=night] .button:hover::after {
  transform: translateX(130%);
  transition: transform 700ms var(--ease-out-quint);
}
:root[data-theme=night] .button:active:not(:disabled) {
  transform: translateY(2px);
}
:root[data-theme=night] .button.primary:active {
  box-shadow:
    inset 0 -1px 0 var(--mc-emerald-lo),
    inset 0 2px 0 #ffffff40;
}
:root[data-theme=night] .button:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 3px #fff,
    inset 0 -5px 0 #0b1330;
}

/* ---------- Hero ---------- */
:root[data-theme=night] .portal-hero {
  isolation: isolate;
}
.vv-hero-fx {
  position: absolute;
  inset: -40px -6vw 0;
  z-index: 1;
  width: calc(100% + 12vw);
  height: calc(100% + 40px);
  pointer-events: none;
}
:root[data-theme=night] .portal-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 3.7vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: #fff;
  text-shadow:
    0 4px 0 #05091599,
    0 18px 50px #000a;
}
:root[data-theme=night] .portal-hero h1 span {
  color: transparent;
  background: linear-gradient(92deg, var(--mc-emerald-hi) 0%, var(--mc-diamond) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 4px 0 #0a3d2299) drop-shadow(0 0 24px #3ddc6f55);
}
:root[data-theme=night] .portal-hero-copy > p {
  color: #d7e0f5;
  font-size: clamp(15px, 1.25vw, 18px);
}
:root[data-theme=night] .portal-hero-actions > .button {
  min-height: 58px;
  padding: 16px 26px 19px;
  font-size: 15px;
}
:root[data-theme=night] .portal-text-button {
  color: var(--mc-diamond);
  font-weight: 700;
}
:root[data-theme=night] .portal-text-button svg {
  transition: translate 220ms var(--ease-out-quint);
}
:root[data-theme=night] .portal-text-button:hover svg {
  translate: 4px 0;
}
:root[data-theme=night] .portal-hero-meta {
  gap: 10px;
}
:root[data-theme=night] .portal-hero-meta > span {
  font: 400 11px/1.4 var(--font-pixel);
  color: #cfdcf7;
  padding: 7px 11px;
  background: #ffffff0b;
  box-shadow: inset 0 0 0 1px #ffffff1c;
  clip-path: var(--notch-clip);
  --notch: 3px;
}
:root[data-theme=night] .portal-hero-meta svg {
  color: var(--mc-emerald-hi);
}
:root[data-theme=night] .portal-hero-art:before {
  inset: 0 -4% 4%;
  background:
    radial-gradient(42% 40% at 52% 76%, #3ddc6f47, transparent 72%),
    radial-gradient(48% 52% at 54% 42%, #7a5cff4d, transparent 70%),
    radial-gradient(30% 30% at 78% 40%, #5ee2ff33, transparent 70%);
  animation: vv-breathe 7s ease-in-out infinite alternate;
}
:root[data-theme=night] .portal-hero-art > img {
  filter:
    drop-shadow(0 30px 26px #0008)
    saturate(1.12);
}

/* ---------- Section headings ---------- */
:root[data-theme=night] .portal-section-heading h2,
:root[data-theme=night] .portal-section-title h2,
:root[data-theme=night] .monitor-heading h2,
:root[data-theme=night] .strip-heading h2,
:root[data-theme=night] .feature-heading h1,
:root[data-theme=night] .portal-fullscreen-launcher h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}
:root[data-theme=night] .portal-section-heading h2,
:root[data-theme=night] .portal-section-title h2 {
  font-size: clamp(26px, 2.8vw, 40px);
}
:root[data-theme=night] .portal-inline-link {
  color: var(--mc-diamond);
  font-weight: 700;
}
:root[data-theme=night] .portal-inline-link svg {
  transition: translate 220ms var(--ease-out-quint);
}
:root[data-theme=night] .portal-inline-link:hover svg {
  translate: 4px 0;
}

/* ---------- World tiles ---------- */
:root[data-theme=night] .portal-world-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
:root[data-theme=night] .portal-world,
:root[data-theme=night] .vv-road-item,
:root[data-theme=night] .monitor-worlds > a {
  --w: var(--mc-diamond);
  --w-lo: var(--mc-diamond-lo);
}
:root[data-theme=night] :is(.portal-world[data-world-id="survival"], .vv-road-item[data-tone="copper"]),
:root[data-theme=night] .monitor-worlds > a[href$="survival"] {
  --w: var(--mc-copper);
  --w-lo: var(--mc-copper-lo);
}
:root[data-theme=night] :is(.portal-world[data-world-id="adventure"], .vv-road-item[data-tone="gold"]),
:root[data-theme=night] .monitor-worlds > a[href$="adventure"] {
  --w: var(--mc-gold);
  --w-lo: var(--mc-gold-lo);
}
:root[data-theme=night] :is(.portal-world[data-world-id="shelter"], .vv-road-item[data-tone="redstone"]),
:root[data-theme=night] .monitor-worlds > a[href$="shelter"] {
  --w: var(--mc-redstone);
  --w-lo: var(--mc-redstone-lo);
}
:root[data-theme=night] :is(.portal-world:is([data-world-id="naruto"],[data-world-id="naruto-modern"]), .vv-road-item[data-tone="sakura"]),
:root[data-theme=night] .monitor-worlds > a:is([href$="naruto"],[href$="naruto-modern"]) {
  --w: var(--mc-sakura);
  --w-lo: var(--mc-sakura-lo);
}
:root[data-theme=night] .vv-road-item[data-tone="emerald"] {
  --w: var(--mc-emerald);
  --w-lo: var(--mc-emerald-lo);
}
:root[data-theme=night] .vv-road-item[data-tone="amethyst"] {
  --w: var(--mc-amethyst);
  --w-lo: var(--mc-amethyst-lo);
}
:root[data-theme=night] .portal-world {
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--w) 12%, #131b33) 0%, #10172d 60%);
  box-shadow:
    inset 0 0 0 1px var(--vv-ring),
    0 16px 34px -24px #000;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition:
    transform 480ms var(--ease-out-quint),
    box-shadow 280ms ease;
}
:root[data-theme=night] .portal-world.is-tilting {
  transition-duration: 110ms, 280ms;
}
:root[data-theme=night] .portal-world::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  z-index: 4;
  background: var(--w);
  box-shadow: 0 0 16px var(--w);
  pointer-events: none;
}
:root[data-theme=night] .portal-world::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), #ffffff1c, transparent 45%);
  transition: opacity 280ms ease;
}
:root[data-theme=night] .portal-world:hover {
  --lift: -6px;
  border-color: transparent;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--w) 65%, transparent),
    0 26px 50px -22px color-mix(in srgb, var(--w) 70%, #000);
}
:root[data-theme=night] .portal-world:hover::after {
  opacity: 1;
}
:root[data-theme=night] .portal-world-art:after {
  background: linear-gradient(transparent, color-mix(in srgb, var(--w) 10%, #121a32));
}
:root[data-theme=night] .world-tile .portal-world-art > a > img,
:root[data-theme=night] .portal-world-art > img {
  transition:
    scale 800ms var(--ease-out-quint),
    filter 300ms ease;
}
:root[data-theme=night] .world-tile:hover .portal-world-art > a > img,
:root[data-theme=night] .portal-world:hover .portal-world-art > img {
  transform: none;
  scale: 1.07;
  filter: saturate(1.2) brightness(1.04);
}
:root[data-theme=night] .portal-world-kind {
  font: 400 11px/1.4 var(--font-pixel);
  color: color-mix(in srgb, var(--w) 75%, #fff);
}
:root[data-theme=night] .portal-world h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.5vw, 21px);
  letter-spacing: -0.01em;
}
:root[data-theme=night] .portal-world h3 a:hover {
  color: color-mix(in srgb, var(--w) 70%, #fff);
}
:root[data-theme=night] .tile-versions span {
  font: 400 11px/1.4 var(--font-digits);
  color: #d5e2ff;
  padding: 4px 8px;
  background: #ffffff0c;
  box-shadow: inset 0 0 0 1px #ffffff1c;
  border: 0;
  border-radius: 0;
  clip-path: var(--notch-clip);
  --notch: 2px;
}
:root[data-theme=night] .portal-world-bottom {
  border-top: 1px dashed #ffffff16;
}
:root[data-theme=night] .portal-world-bottom > span {
  font: 400 11px/1.4 var(--font-pixel);
  color: #8c9cc2;
}
:root[data-theme=night] .tile-open {
  color: var(--mc-emerald-hi);
  font-weight: 700;
}
:root[data-theme=night] .tile-open svg {
  transition: translate 220ms var(--ease-out-quint);
}
:root[data-theme=night] .portal-world:hover .tile-open svg {
  translate: 4px 0;
}
:root[data-theme=night] .tile-favorite {
  border-radius: 0;
  clip-path: var(--notch-clip);
  transition: transform 300ms var(--ease-spring), background 160ms ease;
}
:root[data-theme=night] .tile-favorite:hover {
  transform: scale(1.08);
}
:root[data-theme=night] .tile-favorite[aria-pressed="true"] svg {
  fill: var(--mc-gold);
  color: var(--mc-gold);
  filter: drop-shadow(0 0 6px #ffcb45aa);
}

/* Status chips: pixel label with a glowing block. */
:root[data-theme=night] .status {
  font: 400 10px/1.4 var(--font-pixel);
  border: 0;
  border-radius: 0;
  clip-path: var(--notch-clip);
  --notch: 3px;
  background: #0a1022d9;
  box-shadow: inset 0 0 0 1px #ffffff22;
  backdrop-filter: blur(8px);
}
:root[data-theme=night] .status i {
  width: 7px;
  height: 7px;
  border-radius: 0;
}
:root[data-theme=night] .status-online i {
  background: var(--mc-emerald);
  box-shadow: 0 0 8px var(--mc-emerald);
}
:root[data-theme=night] .status-testing i {
  background: var(--mc-gold);
  box-shadow: 0 0 8px var(--mc-gold);
}
:root[data-theme=night] .status-planned i {
  background: var(--mc-amethyst);
  box-shadow: 0 0 8px var(--mc-amethyst);
}
:root[data-theme=night] .status-offline i {
  background: #7c88a6;
}

/* ---------- Roadmap: how VORDA grows ---------- */
.vv-road {
  margin-top: clamp(56px, 7vw, 88px);
}
.vv-road-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.vv-road-head h2 {
  margin: 0;
  font: 800 clamp(26px, 2.8vw, 40px)/1.1 var(--font-display);
  letter-spacing: -0.025em;
  color: #fff;
}
.vv-road-head p {
  margin: 10px 0 0;
  color: #b5c2df;
  font-size: 15px;
  max-width: 52ch;
}
.vv-road-meter {
  display: grid;
  gap: 8px;
  min-width: min(320px, 100%);
}
.vv-road-meter strong {
  font: 400 12px/1.4 var(--font-pixel);
  color: var(--mc-emerald-hi);
}
.vv-road-bar {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 3px;
  padding: 4px;
  background: #060a16;
  box-shadow: inset 0 0 0 2px #1f2c50;
}
.vv-road-bar i {
  height: 12px;
  background: #1a2442;
}
.vv-road-bar i.on {
  background: linear-gradient(180deg, var(--mc-emerald-hi), var(--mc-emerald) 60%, var(--mc-emerald-lo));
  box-shadow: 0 0 6px #3ddc6f80;
  opacity: 0;
  transform: scaleY(0.3);
  transition:
    opacity 260ms ease,
    transform 380ms var(--ease-spring);
  transition-delay: calc(var(--i) * 45ms);
}
.vv-road.is-visible .vv-road-bar i.on {
  opacity: 1;
  transform: none;
}
.vv-road-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vv-road-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--w) 14%, #131b33), #10172d 70%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--w) 28%, transparent),
    inset 0 -4px 0 color-mix(in srgb, var(--w-lo) 55%, #050913);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 420ms ease,
    transform 520ms var(--ease-out-quint);
  transition-delay: calc(var(--i) * 70ms);
}
.vv-road.is-visible .vv-road-item {
  opacity: 1;
  transform: none;
}
.vv-road-item img {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 #0007) drop-shadow(0 0 12px color-mix(in srgb, var(--w) 45%, transparent));
}
.vv-road-item h3 {
  margin: 0;
  font: 700 15px/1.3 var(--font-display);
  color: #fff;
}
.vv-road-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #b5c2df;
}
.vv-road-state {
  align-self: flex-start;
  margin-top: auto;
  font: 400 10px/1.4 var(--font-pixel);
  padding: 5px 8px;
  clip-path: var(--notch-clip);
  --notch: 2px;
}
.vv-road-state.done {
  color: var(--mc-emerald-ink);
  background: var(--mc-emerald);
  box-shadow: inset 0 -2px 0 var(--mc-emerald-lo);
}
.vv-road-state.now {
  color: #2b1b00;
  background: var(--mc-gold);
  box-shadow: inset 0 -2px 0 var(--mc-gold-lo);
}
.vv-road-state.next {
  color: #d9ccff;
  background: #b685ff26;
  box-shadow: inset 0 0 0 1px #b685ff66;
}

/* ---------- Monitor, updates, launcher frame ---------- */
:root[data-theme=night] .server-monitor {
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--vv-panel), var(--vv-panel-2));
  box-shadow:
    inset 0 0 0 1px var(--vv-ring),
    0 24px 60px -36px #000;
}
:root[data-theme=night] .monitor-worlds > a {
  border-radius: 12px;
  transition: background 200ms ease, box-shadow 200ms ease;
}
:root[data-theme=night] .monitor-worlds > a:hover {
  background: color-mix(in srgb, var(--w) 10%, transparent);
  box-shadow: inset 3px 0 0 var(--w);
}
:root[data-theme=night] .monitor-world-name img {
  border-radius: 8px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--w) 45%, transparent);
}
:root[data-theme=night] .monitor-version {
  font: 400 11px/1.4 var(--font-digits);
}
:root[data-theme=night] .update-tile {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--vv-panel), var(--vv-panel-2));
  box-shadow: inset 0 0 0 1px var(--vv-ring);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition:
    transform 480ms var(--ease-out-quint),
    box-shadow 280ms ease;
}
:root[data-theme=night] .update-tile.is-tilting {
  transition-duration: 110ms, 280ms;
}
:root[data-theme=night] .update-tile:hover {
  --lift: -5px;
  box-shadow:
    inset 0 0 0 1px #5ee2ff59,
    0 24px 48px -24px #5ee2ff59;
}
:root[data-theme=night] .update-tile > a > img {
  transition: scale 800ms var(--ease-out-quint);
}
:root[data-theme=night] .update-tile:hover > a > img {
  transform: none;
  scale: 1.06;
}
:root[data-theme=night] .update-tile h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
:root[data-theme=night] .update-meta > span {
  font: 400 10px/1.4 var(--font-pixel);
  color: #2b1b00;
  background: var(--mc-gold);
  padding: 4px 7px;
  clip-path: var(--notch-clip);
  --notch: 2px;
  box-shadow: inset 0 -2px 0 var(--mc-gold-lo);
}
:root[data-theme=night] .portal-launcher-frame {
  border: 0;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px #ffffff1a,
    0 0 0 6px #3ddc6f14,
    0 40px 90px -40px #3ddc6f66,
    0 30px 80px -30px #7a5cff66;
}
:root[data-theme=night] .library-strip .strip-pack {
  transition: transform 420ms var(--ease-out-quint), box-shadow 260ms ease;
}
:root[data-theme=night] .library-strip .strip-pack:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 36px -18px #5ee2ff80;
}
:root[data-theme=night] .portal-footer-cta {
  color: var(--mc-emerald-hi);
  font-family: var(--font-display);
  font-weight: 800;
}
:root[data-theme=night] .home-help a {
  color: var(--mc-diamond);
}

@keyframes vv-breathe {
  from {
    opacity: 0.75;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (max-width: 1100px) {
  .vv-road-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .vv-road-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vv-road-meter {
    min-width: 100%;
  }
  :root[data-theme=night] .portal-hero-actions > .button {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 460px) {
  .vv-road-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .vv-road-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 6px;
    padding: 16px;
  }
  .vv-road-item img {
    grid-row: span 3;
  }
  .vv-road-state {
    margin-top: 4px;
  }
}

:root[data-theme=night].portal-motion-paused .portal-hero-art:before,
:root[data-theme=night].portal-motion-paused .vv-hero-fx {
  animation-play-state: paused;
}
:root[data-theme=night].portal-motion-paused .vv-hero-fx {
  visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  :root[data-theme=night] .portal-hero-art:before {
    animation: none;
  }
  .vv-hero-fx {
    display: none;
  }
  :root[data-theme=night] :is(.portal-world, .update-tile) {
    transform: none !important;
  }
  .vv-road-item,
  .vv-road-bar i.on {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.vv-road-item img[src$="nav-library.png"] {
  filter: brightness(1.7) saturate(1.2) drop-shadow(0 4px 0 #0007);
}

:root[data-theme=night] .vv-road-item[data-tone="diamond"] {
  --w: var(--mc-diamond);
  --w-lo: var(--mc-diamond-lo);
}

/* ---------- What the launcher does ---------- */
:root[data-theme=night] .vl-features { position: relative; z-index: 2; display: grid; gap: 22px; margin-block: 8px 46px; }
.vl-head h2 { margin: 0; font: 800 clamp(26px, 3vw, 40px) / 1.1 var(--font-display); letter-spacing: -0.02em; color: #fff; text-shadow: 0 3px 0 #0008; }
.vl-head p { margin: 8px 0 0; max-width: 60ch; color: #b9c4de; font-size: 16px; line-height: 1.55; }
.vl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vl-card { --w: var(--mc-gold); position: relative; display: grid; align-content: start; gap: 10px; padding: 22px; border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--w) 12%, #141d38), #0f1730 75%); box-shadow: inset 0 0 0 1px #ffffff14, inset 0 3px 0 var(--w), 0 24px 50px -36px #000; transition: translate 260ms var(--ease-out-quint), box-shadow 200ms ease; }
.vl-card:hover { translate: 0 -4px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w) 55%, transparent), inset 0 3px 0 var(--w), 0 30px 60px -36px color-mix(in srgb, var(--w) 60%, #000); }
.vl-card[data-tone="copper"] { --w: var(--mc-copper); }
.vl-card[data-tone="emerald"] { --w: var(--mc-emerald); }
.vl-card[data-tone="diamond"] { --w: var(--mc-diamond); }
.vl-card[data-tone="redstone"] { --w: var(--mc-redstone); }
.vl-card[data-tone="amethyst"] { --w: var(--mc-amethyst); }
.vl-card .pixel-icon { width: 40px; height: 40px; filter: drop-shadow(0 4px 0 #0009) drop-shadow(0 0 14px color-mix(in srgb, var(--w) 45%, transparent)); }
.vl-card h3 { margin: 0; font: 700 18px/1.25 var(--font-display); color: #fff; }
.vl-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #c3cde6; }
.vl-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 12px; margin: 0; padding: 16px; list-style: none; border-radius: 18px; background: #0d1530; box-shadow: inset 0 0 0 1px #ffffff12; }
.vl-steps li { display: flex; align-items: center; gap: 12px; }
.vl-steps b { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; font: 400 18px/1 var(--font-digits); color: var(--mc-emerald-ink); background: linear-gradient(180deg, var(--mc-emerald-hi) -40%, var(--mc-emerald) 60%); clip-path: var(--notch-clip); --notch: 3px; box-shadow: inset 0 -3px 0 var(--mc-emerald-lo); }
.vl-steps strong { display: block; color: #fff; }
.vl-steps small { display: block; font-size: 13px; color: #9fb0d6; }
@media (max-width: 1000px) { .vl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vl-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .vl-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .vl-card { transition: none; } }

/* ---------- Launcher sign-in confirmation ---------- */
.vl-link { width: min(440px, calc(100vw - 32px)); padding: 28px; color: #fff; text-align: center; background: #111931; border: 0; border-radius: 20px; box-shadow: inset 0 0 0 1px #ffffff18, inset 0 3px 0 var(--mc-gold), 0 40px 80px #000c; }
.vl-link::backdrop { background: #050914c7; backdrop-filter: blur(3px); }
.vl-link h2 { margin: 0 0 14px; font: 800 22px/1.2 var(--font-display); }
.vl-link-code { display: inline-block; margin-bottom: 16px; padding: 10px 18px; font: 400 32px/1 var(--font-digits); letter-spacing: 0.12em; color: var(--mc-gold); background: #0b1228; clip-path: var(--notch-clip); --notch: 4px; box-shadow: inset 0 0 0 2px var(--mc-gold); }
.vl-link p { margin: 0 0 16px; line-height: 1.55; color: #c9d2ea; }
.vl-link-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; font-size: 20px; color: #9fb0d6; background: none; border: 0; cursor: pointer; }
.vl-link-done { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--mc-emerald-hi) !important; }
.vl-link-error { color: #ffb3bd !important; }
:root[data-theme=night] .portal-hero-copy p { max-width: 46ch; }
/* Pixel icons are filled squares: the site-wide svg stroke must not outline them. */
:root[data-theme=night] svg.pixel-icon { stroke: none; }

/* ---------- Hero: the real VORDA Launcher (replaces the character art) ---------- */
/* The launcher takes the hero's right column, so it can never cover the copy, and stays flat so its text is sharp. */
:root[data-theme=night] .portal-hero:has(.hero-launcher) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  column-gap: clamp(28px, 3.4vw, 64px);
}
:root[data-theme=night] .portal-hero-art.hero-launcher {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  width: min(100%, 780px);
  height: auto;
  margin: 76px 0;
  translate: none;
  z-index: 1;
}
:root[data-theme=night] .hero-launcher:before { inset: -18% -12%; }
/* One easing for everything here: a long, soft settle with no bounce. */
.hero-launcher { --ease-soft: cubic-bezier(0.22, 1, 0.36, 1); }
/* The window rises into place once, when the page opens. */
@keyframes ls-rise {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
}
@keyframes ls-glow-in {
  from { opacity: 0; }
}
.ls-window {
  position: relative;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #0b1019;
  box-shadow:
    0 0 0 1px #8bd5ff2b,
    0 30px 70px -22px #000e,
    0 0 60px -16px #3ddc6f38,
    0 0 120px -30px #7a5cff48;
  animation: ls-rise 1300ms var(--ease-soft) 120ms backwards;
  transition: translate 1000ms var(--ease-soft), box-shadow 1000ms var(--ease-soft);
}
/* The glow behind it fades up with the window, then keeps the hero's slow breathing. */
:root[data-theme=night] .hero-launcher:before {
  animation: ls-glow-in 1800ms ease 300ms backwards, vv-breathe 7s ease-in-out 2100ms infinite alternate;
}
.ls-shot { display: block; width: 100%; height: auto; }
/* A light sweep crosses the glass when the window lifts. */
.ls-window::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #ffffff1c 47%, #ffffff08 54%, transparent 62%);
  translate: -110% 0;
}
.hero-launcher:hover .ls-window {
  translate: 0 -6px;
  box-shadow:
    0 0 0 1px #8bd5ff55,
    0 44px 90px -24px #000f,
    0 0 80px -12px #3ddc6f5c,
    0 0 150px -24px #7a5cff6b;
}
.hero-launcher:hover .ls-window::after { translate: 110% 0; transition: translate 1600ms var(--ease-soft) 150ms; }

/* Perks: pointing at the window lets them surface one by one above and below it — out of focus and transparent at
   first, settling into place over most of a second. Leaving fades them out together, just as softly. A short wait
   before they start keeps a pointer that only passes over the window from setting them off. */
.ls-perks { margin: 0; padding: 0; list-style: none; }
.ls-perk {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 48%;
  padding: 9px 14px 9px 9px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.25;
  color: #eaf2ff;
  background: linear-gradient(180deg, #13223a, #0d1828);
  box-shadow: 0 0 0 1px #ffffff1c, inset 0 1px 0 #ffffff12, 0 16px 34px -10px #000d;
  opacity: 0;
  translate: 0 var(--from);
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 450ms ease, translate 600ms var(--ease-soft), filter 450ms ease;
}
.ls-perk-1, .ls-perk-2 { bottom: 100%; --from: 10px; --to: -14px; }
.ls-perk-3, .ls-perk-4 { top: 100%; --from: -10px; --to: 14px; }
.ls-perk-1, .ls-perk-3 { left: 5%; }
.ls-perk-2, .ls-perk-4 { right: 5%; }
.hero-launcher:hover .ls-perk {
  --wait: calc(var(--i) * 100ms + 120ms);
  opacity: 1;
  translate: 0 var(--to);
  filter: blur(0);
  pointer-events: auto;
  transition:
    opacity 700ms ease var(--wait),
    translate 1000ms var(--ease-soft) var(--wait),
    filter 700ms ease var(--wait);
}
.ls-perk b { display: block; font: 700 13.5px/1.2 var(--font-display); color: #fff; }
.ls-perk small { display: block; margin-top: 2px; font-size: 11.5px; color: #9fb2cb; }
.ls-perk-icon {
  --tone: var(--mc-emerald-hi);
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 38%, transparent);
}
.ls-perk-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ls-perk-2 .ls-perk-icon { --tone: var(--mc-diamond); }
.ls-perk-3 .ls-perk-icon { --tone: #c9a6ff; }
.ls-perk-4 .ls-perk-icon { --tone: var(--mc-gold); }
/* Touch screens cannot point at the window: the perks are simply there. */
@media (hover: none) {
  .ls-perk { opacity: 1; translate: 0 var(--to); filter: none; pointer-events: auto; }
}

/* ---------- News: launcher version history (a timeline of released versions) ---------- */
.ln-versions { margin-top: clamp(40px, 6vw, 72px); }
.ln-head h2 { margin: 12px 0 8px; font: 800 clamp(24px, 2.8vw, 34px)/1.1 var(--font-display); color: #fff; }
.ln-head p { max-width: 62ch; margin: 0 0 22px; line-height: 1.6; color: #b8c4dc; }
.ln-list { position: relative; display: grid; gap: 10px; margin: 0; padding: 0 0 0 28px; list-style: none; }
.ln-list::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: linear-gradient(var(--mc-emerald-hi), var(--mc-diamond) 35%, #ffffff12); }
.ln-item { position: relative; }
.ln-item::before { content: ''; position: absolute; left: -26px; top: 20px; width: 12px; height: 12px; border-radius: 3px; background: #0b1019; box-shadow: inset 0 0 0 2px var(--mc-diamond); }
.ln-item:first-child::before { background: var(--mc-emerald); box-shadow: 0 0 14px #3ddc6f99; }
.ln-item details { overflow: hidden; border-radius: 14px; background: #101a2b; box-shadow: inset 0 0 0 1px #ffffff14; transition: box-shadow 200ms ease, background 200ms ease; }
.ln-item details:hover { box-shadow: inset 0 0 0 1px #ffffff26; }
.ln-item details[open] { background: #111d31; box-shadow: inset 0 0 0 1px #5ee2ff40; }
.ln-item summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; list-style: none; cursor: pointer; }
.ln-item summary::-webkit-details-marker { display: none; }
.ln-item summary::after { content: ''; flex-shrink: 0; width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid #8fa3bf; border-bottom: 2px solid #8fa3bf; rotate: 45deg; translate: 0 -2px; transition: rotate 200ms ease, translate 200ms ease; }
.ln-item details[open] summary::after { rotate: 225deg; translate: 0 2px; }
.ln-item summary:focus-visible { outline: 2px solid var(--mc-diamond); outline-offset: -2px; border-radius: 14px; }
.ln-ver { min-width: 64px; font: 400 18px/1 var(--font-digits); color: #fff; }
.ln-tag { padding: 4px 8px; border-radius: 6px; font: 700 11px/1 var(--font-display); color: #04260f; background: var(--mc-emerald); }
.ln-sum { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; color: #b8c4dc; white-space: nowrap; text-overflow: ellipsis; }
.ln-count { flex-shrink: 0; font-size: 12.5px; color: #7f93b0; }
.ln-item ul { display: grid; gap: 14px; margin: 0; padding: 2px 18px 18px 92px; list-style: none; }
.ln-item ul strong { display: block; font: 700 15px/1.3 var(--font-display); color: #fff; }
.ln-item ul p { max-width: 76ch; margin: 4px 0 0; font-size: 14.5px; line-height: 1.6; color: #c3cde6; }
@media (max-width: 650px) {
  .ln-sum { display: none; }
  .ln-count { margin-left: auto; }
  .ln-item ul { padding-left: 16px; }
}

/* Download page: one real launcher screen, still. Someone who came to download needs the button, not a show. */
.dl-still {
  width: 94%;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #0b1019;
  box-shadow: 0 0 0 1px #8bd5ff2e, 0 34px 80px -22px #000e, 0 0 70px -14px #3ddc6f33, 0 0 130px -30px #7a5cff40;
}
.dl-still img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .dl-still { width: 100%; }
}

@media (max-width: 1200px) {
  :root[data-theme=night] .portal-hero:has(.hero-launcher) { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
}
@media (max-width: 1000px) and (min-width: 651px) {
  :root[data-theme=night] .portal-hero-art.hero-launcher { margin: 40px 0; }
  .ls-perks { display: none; }
}
@media (max-width: 650px) {
  :root[data-theme=night] .portal-hero-art.hero-launcher { width: 100%; margin: 26px 0 0; justify-self: stretch; }
  .ls-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  .ls-perk, .hero-launcher:hover .ls-perk { position: static; max-width: none; padding: 9px 10px 9px 8px; opacity: 1; translate: none; filter: none; pointer-events: auto; transition: none; }
  .ls-perk small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ls-window, :root[data-theme=night] .hero-launcher:before { animation: none; }
  .ls-window, .ls-perk, .hero-launcher:hover .ls-perk { transition: none; }
  .ls-perk { filter: none; }
  .hero-launcher:hover .ls-window { translate: none; }
  .ls-window::after { display: none; }
}
:root[data-theme=night].portal-motion-paused .ls-window { animation: none; }

/* ---------- Scroll reveal (site-motion.mjs) ---------- */
/* Hidden only while the script is running with motion allowed (html.vv-reveal); without it everything just shows.
   An animation, not a transition, so the blocks' own hover lifts keep working once they are in. */
@keyframes rv-up {
  from { opacity: 0; translate: 0 26px; }
}
/* Only blocks that wait for the visitor are hidden: data-rv="seen" were on screen at load and simply stay. */
html.vv-reveal [data-rv=""]:not(.rv-in) { opacity: 0; }
html.vv-reveal [data-rv].rv-in { animation: rv-up 1000ms cubic-bezier(0.22, 1, 0.36, 1) var(--rv-wait, 0ms) backwards; }

/* ---------- Pointer light on the feature cards ---------- */
.vl-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(380px circle at var(--lx, 50%) var(--ly, 0%), color-mix(in srgb, var(--w) 22%, transparent), transparent 55%);
  transition: opacity 500ms ease;
}
.vl-card.is-lit::after { opacity: 1; }
.vl-card > * { position: relative; z-index: 1; }

/* ---------- Download bar after the hero ---------- */
.vv-sticky {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 8px 8px 18px;
  border-radius: 16px;
  background: #0d1530ee;
  box-shadow: inset 0 0 0 1px #ffffff1c, 0 18px 50px -12px #000e, 0 0 50px -18px #3ddc6f66;
  backdrop-filter: blur(12px);
  opacity: 0;
  translate: -50% calc(100% + 30px);
  pointer-events: none;
  transition: opacity 500ms ease, translate 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.vv-sticky.is-on { opacity: 1; translate: -50% 0; pointer-events: auto; }
.vv-sticky-text { display: grid; gap: 1px; white-space: nowrap; }
.vv-sticky-text b { font: 700 14px/1.2 var(--font-display); color: #fff; }
.vv-sticky-text small { font-size: 12px; color: #9fb2cb; }
.vv-sticky .button { min-height: 42px; padding-inline: 20px; }
@media (max-width: 560px) {
  /* Leaves room for the round help button on the right. */
  .vv-sticky { left: 12px; right: 76px; bottom: 12px; justify-content: space-between; translate: 0 calc(100% + 24px); }
  .vv-sticky.is-on { translate: 0 0; }
  .vv-sticky-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vv-sticky { transition: opacity 200ms ease; }
}
@media print { .vv-sticky { display: none; } }

/* ---------- Phone: send the download link to a computer ---------- */
.vv-send {
  width: min(420px, calc(100vw - 24px));
  padding: 26px 22px 20px;
  color: #fff;
  text-align: center;
  background: #111931;
  border: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px #ffffff18, inset 0 3px 0 var(--mc-emerald), 0 40px 80px #000c;
}
.vv-send::backdrop { background: #050813b8; backdrop-filter: blur(4px); }
.vv-send h2 { margin: 0 24px 8px; font: 800 20px/1.2 var(--font-display); }
.vv-send p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; color: #c3cde6; }
.vv-send-list { display: grid; gap: 8px; }
.vv-send-list .button { justify-content: center; width: 100%; }
.vv-send-link { display: block; margin-top: 14px; font-size: 12.5px; color: #7f93b0; }
/* A download arrow on «Отправить ссылку на ПК» would promise a file. */
a[data-phone-label] > svg { display: none; }
.vv-send-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; font-size: 22px; color: #9fb0d6; background: none; border: 0; cursor: pointer; }

/* ---------- Help button on phones: just the mascot, so it no longer covers the text ---------- */
@media (max-width: 560px) {
  .help-launch[aria-expanded="false"] { min-height: 52px; padding: 8px; gap: 0; }
  .help-launch[aria-expanded="false"] > span:last-of-type { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Documents in the footer and real prices on «Поддержать» (legal pages: /legal/*) ---------- */
:root[data-theme=night] .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 12.5px; }
:root[data-theme=night] .footer-legal a { color: #9fb2cb; text-decoration: none; }
:root[data-theme=night] .footer-legal a:hover { color: #fff; text-decoration: underline; }
.donate-price { display: block; margin: 2px 0 6px; font: 800 17px/1.2 var(--font-display); color: #fff; }
:root[data-theme=night] .footer-req { margin: 10px 0 0; color: #7f93b0; font-size: 12px; line-height: 1.6; }

/* Вход в лаунчер по коду: код вводится руками со своего экрана (защита от фишинга ссылкой #link=). */
.vl-link-type { display: grid; gap: 6px; margin: 12px 0 6px; font-size: 14px; }
.vl-link-type input { padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(0, 0, 0, .25); color: inherit; font: 600 18px/1 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.vl-link-hint { font-size: 13px; opacity: .8; margin: 4px 0 12px; }
