:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: rgba(8, 13, 18, 0.94);
  --text: #f4fbff;
  --muted: #91a7b3;
  --cyan: #28e7ff;
  --green: #72ff9d;
  --pink: #ff4fd8;
  --amber: #ffd166;
  --line: rgba(40, 231, 255, 0.35);
  --nordic-silver: linear-gradient(135deg, #5f686a 0%, #e8f0f0 18%, #8c9799 38%, #f8ffff 52%, #6d7678 74%, #c4ced0 100%);
  --nordic-gold: linear-gradient(135deg, #6f5622 0%, #d8bd63 20%, #fff0a3 42%, #9a762d 62%, #f1d681 82%, #705220 100%);
  --nordic-iron: linear-gradient(135deg, #111414 0%, #323838 22%, #0a0b0b 52%, #596162 76%, #151818 100%);
}

* {
  box-sizing: border-box;
}

html,
body,
#app,
#hud {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", system-ui, sans-serif;
}

body.site-shell {
  position: relative;
  overflow: auto;
  background: #000;
}

body.site-shell #app {
  position: relative;
  z-index: 1;
  min-height: 100%;
}

body.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 68%, rgba(255, 79, 48, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.74)),
    url("./assets/glasses-2-red.png") center 62% / min(82vw, 1280px) auto no-repeat;
}

body.app-shell {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(40, 231, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}

button:hover {
  background: rgba(40, 231, 255, 0.18);
}

#hud {
  position: relative;
  overflow: hidden;
  background: #05070a;
}

#hud[data-theme="arc"] {
  background: #000;
}

#hud[data-theme="neon"] {
  background: #000;
}

#hud[data-theme="vector"] {
  background: #000;
}

#hud[data-theme="nordic"] {
  background:
    radial-gradient(circle at 50% 42%, rgba(185, 215, 223, 0.055), transparent 36%),
    linear-gradient(180deg, #050606, #000 68%);
}

#hud[data-theme="arc"]::before,
#hud[data-theme="arc"]::after,
#hud[data-theme="neon"]::before,
#hud[data-theme="neon"]::after,
#hud[data-theme="nordic"]::before,
#hud[data-theme="nordic"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

#hud[data-theme="arc"]::before {
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(126, 230, 255, 0.26) 8.1% 8.25%, transparent 8.35% 50%, rgba(18, 72, 156, 0.34) 50.1% 50.25%, transparent 50.35% 91%, rgba(126, 230, 255, 0.2) 91.1% 91.25%, transparent 91.35%),
    linear-gradient(0deg, transparent 0 18%, rgba(126, 230, 255, 0.18) 18.1% 18.25%, transparent 18.35% 64%, rgba(18, 72, 156, 0.24) 64.1% 64.25%, transparent 64.35%);
  opacity: 0;
}

#hud[data-theme="arc"]::after {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 14%, rgba(126, 230, 255, 0.12) 14.4% 14.7%, transparent 15% 26%, rgba(18, 72, 156, 0.14) 26.4% 26.7%, transparent 27%),
    repeating-linear-gradient(0deg, rgba(126, 230, 255, 0.04) 0 1px, transparent 1px 7px);
  mix-blend-mode: screen;
  opacity: 0;
}

#hud[data-theme="neon"]::before {
  background:
    linear-gradient(0deg, rgba(255, 75, 43, 0.34), rgba(255, 122, 47, 0.26) 1px, rgba(56, 232, 255, 0.2) 2px, transparent 7px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(255, 75, 43, 0.12), transparent 16% 84%, rgba(56, 232, 255, 0.05));
  background-size: 100% 100%, auto, auto;
  mix-blend-mode: screen;
  opacity: 0;
}

#hud[data-theme="neon"]::after {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255, 75, 43, 0.3) 12.1% 12.25%, transparent 12.4% 86%, rgba(56, 232, 255, 0.18) 86.1% 86.25%, transparent 86.4%),
    linear-gradient(0deg, transparent 0 14%, rgba(255, 106, 53, 0.18) 14.1% 14.25%, transparent 14.4% 86%, rgba(255, 154, 61, 0.18) 86.1% 86.25%, transparent 86.4%);
  opacity: 0;
}

#hud[data-theme="nordic"]::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92), rgba(210, 241, 252, 0.48) 18%, transparent 38%),
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.72), transparent 21%),
    radial-gradient(circle at 72% 34%, rgba(170, 220, 238, 0.62), transparent 24%),
    radial-gradient(circle at 45% 76%, rgba(230, 250, 255, 0.58), transparent 22%),
    radial-gradient(ellipse at 50% 50%, rgba(235, 252, 255, 0.86), rgba(151, 204, 222, 0.72) 42%, rgba(238, 252, 255, 0.84)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(106, 177, 205, 0.2));
  background-size:
    auto,
    auto,
    auto;
  opacity: 0;
  filter: saturate(1.08) contrast(1.08);
}

#hud[data-theme="nordic"]::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.52), rgba(220, 246, 255, 0.18) 18%, transparent 36%),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.9) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 36% 64%, rgba(230, 250, 255, 0.78) 0 1px, transparent 1.6px),
    radial-gradient(circle at 59% 31%, rgba(255, 255, 255, 0.82) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 78% 78%, rgba(215, 244, 255, 0.74) 0 1.3px, transparent 1.9px),
    radial-gradient(circle at 90% 16%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.6px);
  background-size:
    auto,
    160px 160px,
    210px 210px,
    180px 180px,
    230px 230px,
    170px 170px;
  opacity: 0;
}

#hud[data-theme="arc"].theme-booting::before {
  animation: arc-boot-lines 2.1s linear both;
}

#hud[data-theme="arc"].theme-booting::after {
  animation: arc-boot-reticle 3.3s ease-out both;
}

#hud[data-theme="neon"].theme-booting::before {
  animation: neon-scan-reveal 2.7s cubic-bezier(0.12, 0.82, 0.18, 1) both;
}

#hud[data-theme="neon"].theme-booting::after {
  animation: neon-frame-reveal 2.7s cubic-bezier(0.12, 0.82, 0.18, 1) both;
}

#hud[data-theme="nordic"].theme-booting::before {
  animation: nordic-ice-melt 2.4s cubic-bezier(0.12, 0.86, 0.18, 1) both;
}

#hud[data-theme="nordic"].theme-booting::after {
  animation: nordic-frost-cracks 2.2s ease-out both;
}

#hud.mirror {
  transform: scaleX(-1);
}

.site-page {
  min-height: 100%;
  padding: 28px;
}

.site-header,
.site-hero,
.site-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

.site-brand {
  color: #f4fbff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.site-nav a {
  color: rgba(244, 251, 255, 0.82);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
}

.site-nav a.active,
.site-nav a:hover {
  background: rgba(40, 231, 255, 0.08);
  color: #ffffff;
}

.site-nav-cta {
  border: 1px solid rgba(40, 231, 255, 0.35);
}

.site-hero {
  padding: 64px 0 40px;
}

.site-eyebrow {
  margin: 0 0 12px;
  color: #72ff9d;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.02;
}

.site-page--home .site-hero h1 {
  max-width: none;
  font-size: clamp(4rem, 11vw, 8.6rem);
  letter-spacing: 0;
}

.site-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(244, 251, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.65;
}

.site-copy-secondary {
  color: rgba(145, 167, 179, 0.96);
}

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.site-button-primary {
  background: rgba(40, 231, 255, 0.12);
  color: #f4fbff;
  border: 1px solid rgba(40, 231, 255, 0.36);
}

.site-button-secondary {
  background: transparent;
  color: rgba(244, 251, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding: 12px 0 56px;
}

.site-showcase {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 28px 0 84px;
}

.site-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.72fr);
  align-items: center;
  gap: 56px;
  margin-bottom: 88px;
}

.site-feature--left {
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.35fr);
}

.site-feature--left .site-feature-media {
  order: 2;
}

.site-feature--left .site-feature-copy {
  order: 1;
}

.site-feature-media {
  margin: 0;
  position: relative;
}

.site-feature--right .site-feature-media {
  transform: translateX(-2vw);
}

.site-feature--left .site-feature-media {
  transform: translateX(5vw);
}

.site-feature-media img {
  display: block;
  width: min(100%, 980px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.site-feature-copy {
  max-width: 420px;
}

.site-feature-copy p {
  margin: 0;
  color: #fff4f0;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  line-height: 1.18;
  text-wrap: balance;
}

.site-rich-text {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 12px 0 56px;
}

.site-legal-section {
  width: min(760px, 100%);
  margin-bottom: 28px;
}

.site-legal-section h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.site-legal-section p,
.site-legal-section li {
  color: rgba(244, 251, 255, 0.82);
  line-height: 1.72;
  font-size: 1rem;
}

.site-legal-section p {
  margin: 0 0 12px;
}

.site-legal-section ul {
  margin: 0 0 12px 0;
  padding-left: 22px;
}

.site-legal-section li + li {
  margin-top: 8px;
}

.site-rich-text a {
  color: #f4fbff;
}

.site-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(7, 12, 18, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.site-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.site-card p {
  margin: 0;
  color: rgba(244, 251, 255, 0.72);
  line-height: 1.6;
}

@media (max-width: 720px) {
  body.site-shell::before {
    background:
      radial-gradient(circle at 50% 66%, rgba(255, 79, 48, 0.16), transparent 28%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.82)),
      url("./assets/glasses-2-red.png") center 40% / 120vw auto no-repeat;
  }

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

  .site-hero {
    padding-top: 40px;
  }

  .site-hero h1 {
    max-width: 100%;
  }

  .site-showcase {
    padding-top: 8px;
  }

  .site-feature,
  .site-feature--left {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 52px;
  }

  .site-feature--left .site-feature-media,
  .site-feature--right .site-feature-media {
    order: 1;
    transform: none;
  }

  .site-feature--left .site-feature-copy,
  .site-feature--right .site-feature-copy {
    order: 2;
  }

  .site-feature-copy {
    max-width: 100%;
  }
}

#hud[data-borderless-modules="true"] .module {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
}

#hud[data-borderless-modules="true"] .module::before,
#hud[data-borderless-modules="true"] .module::after {
  display: none !important;
}

#scan-grid,
#web-watermark,
#module-layer {
  position: absolute;
  inset: 0;
}

#scan-grid {
  pointer-events: none;
}

#web-watermark {
  display: none;
  z-index: 1;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='240' viewBox='0 0 420 240'%3E%3Cg transform='rotate(-24 210 120)'%3E%3Ctext x='24' y='142' fill='rgba(255,255,255,0.36)' font-family='Segoe UI, Arial, sans-serif' font-size='40' font-weight='700'%3EOpticHUD%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 240px;
  background-repeat: repeat;
  mix-blend-mode: screen;
}

#hud[data-web-watermarked="true"] #web-watermark {
  display: block;
}

.module {
  position: absolute;
  z-index: 10;
  container-type: size;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: 0 0 18px rgba(40, 231, 255, 0.18), inset 0 0 24px rgba(40, 231, 255, 0.07);
  user-select: none;
  touch-action: none;
}

#hud[data-theme="arc"] .module {
  background: linear-gradient(180deg, rgba(4, 22, 52, 0.46), rgba(0, 7, 18, 0.52) 54%, rgba(10, 46, 98, 0.34));
  border-width: 2px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transform: translateZ(0);
  will-change: transform, opacity;
}

#hud[data-theme="neon"] .module {
  border-width: 1px;
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 75, 43, 0.12), transparent 24% 76%, rgba(56, 232, 255, 0.04)),
    rgba(7, 3, 3, 0.24);
  clip-path: none;
  color: #eafcff;
  box-shadow: none;
  text-shadow: 0 0 10px rgba(56, 232, 255, 0.32);
  transform: translateZ(0);
  will-change: transform, opacity, filter;
}

#hud[data-theme="vector"] .module {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #dfffd2;
  text-shadow: 0 0 10px rgba(157, 255, 111, 0.16);
}

#hud[data-theme="vector"] .module::before,
#hud[data-theme="vector"] .module::after {
  display: none;
}

#hud[data-theme="vector"] .module-body {
  display: grid;
  width: 100%;
  height: 100%;
}

#hud[data-theme="nordic"] .module {
  border: 5px solid transparent;
  border-radius: 3px;
  background:
    linear-gradient(rgba(8, 9, 9, 0.82), rgba(8, 9, 9, 0.82)) padding-box,
    linear-gradient(135deg, #4f5657 0%, #eef7f7 12%, #798486 28%, #f8ffff 42%, #2d3334 58%, #c9d2d4 74%, #5f686a 100%) border-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 18% 82%, rgba(255, 255, 255, 0.035)),
    rgba(8, 9, 9, 0.76);
  box-shadow:
    0 0 0 1px rgba(255, 240, 163, 0.32),
    0 0 0 3px rgba(35, 38, 39, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.8),
    inset 0 0 0 2px rgba(201, 180, 122, 0.32),
    inset 0 0 22px rgba(0, 0, 0, 0.72),
    0 0 18px rgba(185, 215, 223, 0.1);
  color: #e5ecec;
  text-shadow: 0 1px 0 #000, 0 0 8px rgba(185, 215, 223, 0.28);
  transform: translateZ(0);
  will-change: opacity, filter;
}

#hud[data-theme="nordic"] .module::before,
#hud[data-theme="nordic"] .module::after {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 1;
  pointer-events: none;
}

#hud[data-theme="nordic"] .module::before {
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, #f4df91 0 3px, #141817 3px 5px, #8a6d2f 5px 8px) 12px 0 / calc(100% - 24px) 3px no-repeat,
    repeating-linear-gradient(45deg, #f4df91 0 3px, #141817 3px 5px, #8a6d2f 5px 8px) 12px 100% / calc(100% - 24px) 3px no-repeat,
    repeating-linear-gradient(135deg, #f4df91 0 3px, #141817 3px 5px, #8a6d2f 5px 8px) 0 12px / 3px calc(100% - 24px) no-repeat,
    repeating-linear-gradient(135deg, #f4df91 0 3px, #141817 3px 5px, #8a6d2f 5px 8px) 100% 12px / 3px calc(100% - 24px) no-repeat;
  opacity: 0.94;
  filter: drop-shadow(0 0 4px rgba(244, 223, 145, 0.26));
}

#hud[data-theme="nordic"] .module::after {
  display: none;
}

#hud[data-theme="nordic"] .module-body {
  position: relative;
  z-index: 2;
}

#hud[data-theme="neon"] .module::before {
  content: "CONNECTION 281.09.43";
  position: absolute;
  left: 10px;
  top: 7px;
  color: #ff4b2b;
  font-size: clamp(6px, 5cqw, 8px);
  font-weight: 900;
  line-height: 1;
  opacity: 0.76;
  pointer-events: none;
  text-shadow: 0 0 7px rgba(255, 75, 43, 0.65);
}

#hud[data-theme="neon"] .module::after {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(var(--module-color, #ff4b2b), var(--module-color, #ff4b2b)) 0 0 / 28px 2px no-repeat,
    linear-gradient(var(--module-color, #ff4b2b), var(--module-color, #ff4b2b)) 0 0 / 2px 28px no-repeat,
    linear-gradient(var(--module-color, #ff4b2b), var(--module-color, #ff4b2b)) 100% 100% / 28px 2px no-repeat,
    linear-gradient(var(--module-color, #ff4b2b), var(--module-color, #ff4b2b)) 100% 100% / 2px 28px no-repeat,
    linear-gradient(#ff9a3d, #ff9a3d) 100% 0 / 42px 2px no-repeat;
  opacity: 0.88;
  pointer-events: none;
  filter: drop-shadow(0 0 6px var(--module-color, #ff4b2b));
}

#hud[data-theme="arc"] .module--minimap,
#hud[data-theme="arc"] .module--shape-circle {
  clip-path: none;
}

#hud[data-theme="neon"] .module--minimap,
#hud[data-theme="neon"] .module--shape-circle {
  clip-path: none;
}

#hud[data-theme="nordic"] .module--minimap,
#hud[data-theme="nordic"] .module--shape-circle {
  border-radius: 3px;
}

#hud[data-theme="arc"].theme-booting .module {
  animation: arc-module-slide-in 1.55s cubic-bezier(0.18, 0.88, 0.22, 1) both;
}

#hud[data-theme="neon"].theme-booting .module {
  animation: neon-module-scan-in 1.95s cubic-bezier(0.12, 0.82, 0.18, 1) both;
}

#hud[data-theme="nordic"].theme-booting .module {
  animation: nordic-module-forge 1.8s ease-out both;
}

#hud[data-theme="arc"].theme-booting .module[data-id="minimap"] {
  animation-delay: 0.7s;
}

#hud[data-theme="neon"].theme-booting .module[data-id="compass"] {
  animation-delay: 0s;
}

#hud[data-theme="neon"].theme-booting .module[data-id="minimap"] {
  animation-delay: 0s;
}

#hud[data-theme="neon"].theme-booting .module[data-id="nowPlaying"] {
  animation-delay: 0s;
}

#hud[data-theme="neon"].theme-booting .module[data-id="weather"],
#hud[data-theme="neon"].theme-booting .module[data-id="speed"],
#hud[data-theme="neon"].theme-booting .module[data-id="battery"] {
  animation-delay: 0s;
}

#hud[data-theme="arc"].theme-booting .module[data-id="compass"] {
  animation-delay: 0.95s;
}

#hud[data-theme="arc"].theme-booting .module[data-id="speed"] {
  animation-delay: 1.15s;
}

#hud[data-theme="arc"].theme-booting .module[data-id="battery"],
#hud[data-theme="arc"].theme-booting .module[data-id="weather"],
#hud[data-theme="arc"].theme-booting .module[data-id="nowPlaying"] {
  animation-delay: 1.45s;
}

.module.glow-breathe {
  animation: glow-breathe 2.8s ease-in-out infinite;
}

.module.glow-pulse::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: inherit;
  background: var(--module-color, var(--cyan));
  opacity: 0.12;
  filter: blur(16px);
  animation: glow-pulse 2.2s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%,
  100% {
    filter: drop-shadow(0 0 3px var(--module-color, var(--cyan)));
  }
  50% {
    filter: drop-shadow(0 0 16px var(--module-color, var(--cyan)));
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.08;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.24;
  }
}

.module--minimap {
  padding: 0;
  overflow: hidden;
}

.module--minimap.shape-circle {
  border-radius: 999px;
  aspect-ratio: 1;
}

.module--minimap.shape-square {
  border-radius: 8px;
}

.module--shape-circle {
  border-radius: 999px;
  aspect-ratio: 1;
}

.module--shape-circle:has(.speed-analog) {
  padding: 0;
  overflow: hidden;
}

.module--shape-square {
  border-radius: 8px;
}

.module.module--compass {
  padding: 10px 12px;
}

.module.editing {
  cursor: move;
}

.module-body {
  height: 100%;
}

#hud[data-runtime="android"][data-theme="arc"] .module:not([data-id="minimap"]):not([data-id="speed"]) .module-body,
#hud[data-runtime="android"][data-theme="neon"] .module:not([data-id="minimap"]) .module-body,
#hud[data-runtime="android"][data-theme="nordic"] .module:not([data-id="minimap"]) .module-body {
  height: 100%;
  box-sizing: border-box;
}

#hud[data-runtime="android"][data-theme="arc"] .module[data-id="weather"] .module-body,
#hud[data-runtime="android"][data-theme="arc"] .module[data-id="nowPlaying"] .module-body {
  padding: 12px 14px;
}

#hud[data-runtime="android"][data-theme="arc"] .module[data-id="compass"] .module-body {
  padding: 6px 8px 10px;
}

#hud[data-runtime="android"][data-theme="neon"] .module[data-id="speed"] .module-body,
#hud[data-runtime="android"][data-theme="neon"] .module[data-id="battery"] .module-body,
#hud[data-runtime="android"][data-theme="neon"] .module[data-id="weather"] .module-body,
#hud[data-runtime="android"][data-theme="neon"] .module[data-id="nowPlaying"] .module-body {
  padding: 12px 12px 12px;
}

#hud[data-runtime="android"][data-theme="neon"] .module[data-id="compass"] .module-body {
  padding: 8px 10px 10px;
}

#hud[data-runtime="android"][data-theme="nordic"] .module[data-id="speed"] .module-body,
#hud[data-runtime="android"][data-theme="nordic"] .module[data-id="battery"] .module-body,
#hud[data-runtime="android"][data-theme="nordic"] .module[data-id="weather"] .module-body,
#hud[data-runtime="android"][data-theme="nordic"] .module[data-id="nowPlaying"] .module-body {
  padding: 12px 14px;
}

#hud[data-runtime="android"][data-theme="nordic"] .module[data-id="compass"] .module-body {
  padding: 8px 12px 12px;
}

#hud[data-theme="custom"] .module.style-metallic-borders {
  border-width: 3px;
  position: absolute;
}

#hud[data-theme="custom"] .module.style-metallic-borders::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: inherit;
  background: var(--module-metallic-gradient) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

#hud[data-theme="custom"] .module.style-metallic-borders .module-body {
  position: relative;
  z-index: 1;
}

.now-playing {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  height: 100%;
}

.now-playing-icon {
  display: none;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--module-color, var(--cyan));
  font-size: clamp(22px, 22cqw, 30px);
  line-height: 1;
  text-shadow: 0 0 10px currentColor;
}

.now-playing-icon::before {
  content: "♫";
}

.now-playing-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.now-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.speed-digital {
  display: grid;
  height: 100%;
  place-content: center;
  text-align: center;
}

.module-value {
  font-size: clamp(24px, 34cqw, 72px);
  font-weight: 800;
  line-height: 1;
}

.battery-value {
  font-size: clamp(18px, 26cqw, 44px);
  font-weight: 800;
  line-height: 1;
}

.battery-value span {
  font-size: 0.48em;
  color: var(--muted);
}

.weather-display {
  display: grid;
  height: 100%;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.weather-value {
  font-size: clamp(20px, 24cqw, 44px);
}

.weather-symbol {
  position: relative;
  width: clamp(34px, 24cqw, 62px);
  aspect-ratio: 1;
  color: var(--module-color, var(--cyan));
  filter: drop-shadow(0 0 10px currentColor);
}

.weather-symbol::before,
.weather-symbol::after,
.weather-symbol span,
.weather-symbol span::before,
.weather-symbol span::after {
  content: "";
  position: absolute;
  display: block;
}

#hud[data-runtime="android"] .module-value {
  font-size: clamp(14px, 34cqw, 72px);
}

#hud[data-runtime="android"] .battery-value {
  font-size: clamp(12px, 26cqw, 44px);
}

#hud[data-runtime="android"] .weather-value {
  font-size: clamp(14px, 24cqw, 44px);
}

#hud[data-runtime="android"] .weather-symbol {
  width: clamp(22px, 24cqw, 62px);
}

#hud[data-runtime="android"] .ribbon-readout {
  font-size: clamp(8px, 16cqh, 15px);
}

#hud[data-runtime="android"] .now-title {
  font-size: clamp(11px, 13cqw, 30px);
}

.weather-sunny::before {
  inset: 22%;
  border-radius: 999px;
  background: #ffd94a;
  box-shadow: 0 0 18px rgba(255, 217, 74, 0.62);
}

.weather-sunny::after {
  inset: 5%;
  border-radius: 999px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 217, 74, 0.95) 0 8deg, transparent 8deg 22deg);
  mask: radial-gradient(circle, transparent 0 48%, #000 49% 58%, transparent 59%);
}

.weather-cloudy::before,
.weather-rainy::before {
  left: 13%;
  right: 8%;
  bottom: 24%;
  height: 34%;
  border-radius: 999px;
  background: #b8c6cf;
}

.weather-cloudy::after,
.weather-rainy::after {
  left: 24%;
  bottom: 34%;
  width: 35%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #d7e0e5;
  box-shadow: 21px 4px 0 -2px #aebbc4;
}

.weather-rainy::before,
.weather-rainy::after {
  background: #87939b;
}

.weather-rainy span::before,
.weather-rainy span::after {
  top: 66%;
  width: 2px;
  height: 28%;
  border-radius: 999px;
  background: #38e8ff;
  transform: rotate(14deg);
  box-shadow: 12px 0 0 #38e8ff, 24px 0 0 #38e8ff;
}

.weather-rainy span::before {
  left: 26%;
}

.weather-night::before {
  inset: 12% 18% 12% 24%;
  border-radius: 999px;
  background: #d9f3ff;
  box-shadow: 0 0 16px rgba(217, 243, 255, 0.62);
}

.weather-night::after {
  inset: 6% 8% 18% 38%;
  border-radius: 999px;
  background: #05070a;
}

#hud[data-theme="custom"] .module.style-metallic-weather .weather-symbol {
  color: #d4dee2;
  filter: drop-shadow(0 0 8px rgba(212, 222, 226, 0.38));
}

#hud[data-theme="custom"] .module.style-metallic-weather .weather-value {
  color: #edf4f5;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(185, 215, 223, 0.26);
}

#hud[data-theme="custom"] .module.style-metallic-weather .unit {
  color: #b8c4c7;
}

#hud[data-theme="custom"] .module.style-metallic-weather .weather-sunny::before {
  background: var(--nordic-gold);
  box-shadow: 0 0 14px rgba(216, 189, 99, 0.42);
}

#hud[data-theme="custom"] .module.style-metallic-weather .weather-sunny::after {
  background: repeating-conic-gradient(from 0deg, #f6e39a 0 8deg, transparent 8deg 22deg);
}

#hud[data-theme="custom"] .module.style-metallic-weather .weather-cloudy::before,
#hud[data-theme="custom"] .module.style-metallic-weather .weather-rainy::before,
#hud[data-theme="custom"] .module.style-metallic-weather .weather-cloudy::after,
#hud[data-theme="custom"] .module.style-metallic-weather .weather-rainy::after,
#hud[data-theme="custom"] .module.style-metallic-weather .weather-night::before {
  background: var(--nordic-silver);
}

.segmented-battery {
  display: none;
}

.arc-reactor-battery {
  display: grid;
  position: relative;
  min-height: 48px;
  place-items: center;
}

.arc-reactor-battery .reactor-ring,
.arc-reactor-battery .reactor-core,
.arc-reactor-battery .reactor-spokes {
  display: none;
}

#hud[data-theme="arc"] .module[data-id="battery"] {
  padding: 10px;
  border-radius: 999px;
  overflow: hidden;
}

#hud[data-theme="arc"] .module[data-id="battery"] .module-body {
  display: grid;
  height: 100%;
  place-items: center;
}

#hud[data-theme="arc"] .arc-reactor-battery {
  width: min(100%, 100cqh);
  aspect-ratio: 1;
  min-height: 0;
  opacity: calc(0.38 + var(--battery-level) * 0.0062);
  filter: drop-shadow(0 0 calc(5px + var(--battery-level) * 0.16px) rgba(185, 246, 255, 0.9));
}

#hud[data-theme="arc"] .arc-reactor-battery .reactor-ring,
#hud[data-theme="arc"] .arc-reactor-battery .reactor-core,
#hud[data-theme="arc"] .arc-reactor-battery .reactor-spokes {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

#hud[data-theme="arc"] .arc-reactor-battery .reactor-ring {
  border: 2px solid rgba(190, 249, 255, 0.78);
  background:
    conic-gradient(from 0deg, rgba(221, 253, 255, 0.92), rgba(18, 72, 156, 0.24), rgba(126, 230, 255, 0.88), rgba(18, 72, 156, 0.24), rgba(221, 253, 255, 0.92)),
    radial-gradient(circle, transparent 0 48%, rgba(40, 231, 255, 0.24) 49% 52%, transparent 53%);
  mask: radial-gradient(circle, transparent 0 54%, #000 55% 64%, transparent 65%);
}

#hud[data-theme="arc"] .arc-reactor-battery .reactor-core {
  inset: 22%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, calc(0.2 + var(--battery-level) * 0.008)) 0 16%, rgba(185, 246, 255, calc(0.18 + var(--battery-level) * 0.006)) 17% 42%, rgba(18, 72, 156, 0.16) 43% 62%, transparent 63%);
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, calc(0.08 + var(--battery-level) * 0.006)),
    0 0 calc(10px + var(--battery-level) * 0.28px) rgba(153, 244, 255, calc(0.16 + var(--battery-level) * 0.006));
}

#hud[data-theme="arc"] .arc-reactor-battery .reactor-spokes {
  inset: 12%;
  background: repeating-conic-gradient(from 0deg, rgba(225, 253, 255, 0.58) 0 2deg, transparent 2deg 24deg);
  mask: radial-gradient(circle, transparent 0 34%, #000 35% 43%, transparent 44%);
}

#hud[data-theme="arc"] .arc-reactor-battery .battery-value {
  z-index: 2;
  color: rgba(235, 254, 255, calc(0.46 + var(--battery-level) * 0.0054));
  font-size: clamp(18px, 22cqw, 36px);
  text-shadow: 0 0 calc(6px + var(--battery-level) * 0.12px) rgba(173, 246, 255, 0.8);
}

#hud[data-theme="arc"][data-runtime="android"] .arc-reactor-battery .battery-value {
  font-size: clamp(12px, 22cqw, 36px);
}

#hud[data-theme="arc"] .module[data-id="battery"] .unit,
#hud[data-theme="arc"] .module[data-id="battery"] .meter {
  display: none;
}

#hud[data-theme="nordic"] .module-value,
#hud[data-theme="nordic"] .battery-value {
  color: #e9eeee;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(185, 215, 223, 0.2);
  filter: none;
}

#hud[data-theme="nordic"] .unit,
#hud[data-theme="nordic"] .subtle {
  color: #b8c2c2;
  font-family: Georgia, "Times New Roman", serif;
}

#hud[data-theme="nordic"] .meter {
  height: 6px;
  border: 1px solid rgba(201, 180, 122, 0.34);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.8);
}

#hud[data-theme="nordic"] .meter span {
  background: var(--nordic-gold);
  box-shadow: 0 0 8px rgba(216, 189, 99, 0.32);
}

#hud[data-theme="nordic"] .module[data-id="battery"] .arc-reactor-battery {
  min-height: 58px;
}

#hud[data-theme="nordic"] .module[data-id="battery"] .battery-value {
  font-size: clamp(22px, 24cqw, 42px);
}

#hud[data-theme="nordic"][data-runtime="android"] .module[data-id="battery"] .battery-value {
  font-size: clamp(12px, 24cqw, 42px);
}

#hud[data-theme="neon"] .module-value {
  color: #ff9a3d;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 154, 61, 0.35), 2px 0 0 rgba(255, 75, 43, 0.2);
}

#hud[data-theme="neon"] .unit,
#hud[data-theme="neon"] .subtle {
  color: rgba(234, 252, 255, 0.76);
  text-transform: uppercase;
}

#hud[data-theme="neon"] .module[data-id="battery"] {
  border-color: rgba(255, 154, 61, 0.48);
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="battery"] {
  padding: 8px 8px 6px;
}

#hud[data-theme="neon"] .module[data-id="battery"]::before {
  content: "CELL";
  color: #ff9a3d;
}

#hud[data-theme="neon"] .module[data-id="battery"] .arc-reactor-battery {
  min-height: 0;
  place-items: start;
}

#hud[data-theme="neon"] .module[data-id="battery"] .battery-value {
  color: #ff9a3d;
  font-size: clamp(22px, 24cqw, 38px);
  text-shadow: 0 0 12px rgba(255, 154, 61, 0.46);
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="battery"] .battery-value {
  font-size: clamp(11px, 22cqw, 30px);
}

#hud[data-theme="neon"] .module[data-id="battery"] .arc-reactor-battery,
#hud[data-theme="neon"] .module[data-id="battery"] .meter {
  display: none;
}

#hud[data-theme="neon"] .module[data-id="battery"] .unit {
  font-size: clamp(8px, 7cqw, 10px);
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="battery"] .unit {
  font-size: clamp(5px, 5cqw, 7px);
  line-height: 1;
  margin-top: 0;
}

#hud[data-theme="neon"] .segmented-battery {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: end;
  gap: 3px;
  height: 42px;
  padding-top: 18px;
}

#hud[data-theme="neon"][data-runtime="android"] .segmented-battery {
  height: 22px;
  padding-top: 6px;
  gap: 2px;
}

#hud[data-theme="neon"] .segmented-battery span {
  display: block;
  height: 100%;
  border: 1px solid rgba(255, 154, 61, 0.35);
  background: rgba(255, 154, 61, 0.08);
}

#hud[data-theme="neon"] .segmented-battery span.active {
  background: #ff9a3d;
  box-shadow: 0 0 10px rgba(255, 154, 61, 0.58);
}

#hud[data-theme="vector"] .module[data-id="battery"] .module-body {
  align-content: end;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

#hud[data-theme="vector"] .module[data-id="battery"] .segmented-battery,
#hud[data-theme="vector"] .module[data-id="battery"] .meter {
  display: none;
}

#hud[data-theme="vector"] .module[data-id="battery"] .arc-reactor-battery {
  min-height: 0;
  display: block;
}

#hud[data-theme="vector"] .module[data-id="battery"] .reactor-ring,
#hud[data-theme="vector"] .module[data-id="battery"] .reactor-core,
#hud[data-theme="vector"] .module[data-id="battery"] .reactor-spokes {
  display: none;
}

#hud[data-theme="vector"] .module[data-id="battery"] .battery-value {
  display: block;
  font-size: clamp(18px, 22cqw, 30px);
}

#hud[data-theme="vector"] .module[data-id="battery"] .unit {
  font-size: clamp(8px, 6cqw, 11px);
  line-height: 1;
}

#hud[data-theme="neon"] .meter {
  height: 5px;
  border-radius: 0;
  background: rgba(255, 75, 43, 0.22);
}

#hud[data-theme="neon"] .meter span {
  background: linear-gradient(90deg, #ff4b2b, #ff9a3d);
}

#hud[data-theme="vector"] .module-value,
#hud[data-theme="vector"] .battery-value,
#hud[data-theme="vector"] .ribbon-readout,
#hud[data-theme="vector"] .now-title {
  color: #b5ff8c;
  font-family: Bahnschrift, "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(157, 255, 111, 0.22);
}

#hud[data-theme="vector"] .unit,
#hud[data-theme="vector"] .subtle {
  color: rgba(207, 255, 192, 0.76);
  text-transform: uppercase;
}

.unit,
.subtle,
.hint,
.readout {
  color: var(--muted);
  font-size: clamp(10px, 7cqw, 14px);
}


.platform-debug {
  margin: 10px 0;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--green);
  border: 1px solid rgba(114, 255, 157, 0.24);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.compass-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.compass-strip strong {
  color: var(--green);
}

.ribbon-compass {
  display: grid;
  gap: 6px;
}

#hud[data-theme="arc"].theme-booting .module--compass .ribbon-track {
  animation: arc-compass-calibrate 3.15s cubic-bezier(0.12, 0.88, 0.16, 1) both;
}

#hud[data-theme="neon"] .module--compass {
  padding-block: 8px;
  border-color: rgba(255, 75, 43, 0.42);
  background: linear-gradient(90deg, transparent, rgba(255, 75, 43, 0.14) 50%, transparent);
}

#hud[data-theme="vector"] .module--compass {
  padding: 2px 0 0;
}

#hud[data-theme="nordic"] .module--compass {
  padding: 12px 18px;
  border-color: rgba(201, 180, 122, 0.62);
  background:
    linear-gradient(90deg, transparent, rgba(201, 180, 122, 0.16) 50%, transparent),
    var(--nordic-iron),
    rgba(7, 8, 8, 0.68);
}

#hud[data-theme="nordic"] .ribbon-track {
  border-color: rgba(201, 180, 122, 0.36);
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(201, 180, 122, 0.08) 28px 30px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 42%, rgba(0, 0, 0, 0.34)),
    rgba(0, 0, 0, 0.22);
}

#hud[data-theme="nordic"] .ribbon-center {
  width: 3px;
  background: var(--nordic-gold);
  box-shadow: 0 0 12px rgba(201, 180, 122, 0.68);
}

#hud[data-theme="nordic"] .ribbon-readout,
#hud[data-theme="nordic"] .ribbon-mark.cardinal {
  color: #f0dc8a;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 1px 0 #000, 0 0 7px rgba(216, 189, 99, 0.35);
}

#hud[data-theme="neon"] .module--compass::before {
  content: "NAV";
  left: 12px;
  top: 8px;
}

#hud[data-theme="neon"] .ribbon-track {
  border-color: rgba(255, 75, 43, 0.42);
  background:
    linear-gradient(90deg, transparent, rgba(255, 75, 43, 0.16) 49%, rgba(255, 154, 61, 0.2) 50%, rgba(255, 75, 43, 0.16) 51%, transparent),
    rgba(255, 75, 43, 0.04);
}

#hud[data-theme="neon"] .ribbon-center {
  background: #ff9a3d;
  box-shadow: 0 0 16px rgba(255, 154, 61, 0.9);
}

#hud[data-theme="neon"] .ribbon-readout,
#hud[data-theme="neon"] .ribbon-mark.cardinal {
  color: #ff9a3d;
}

#hud[data-theme="vector"] .ribbon-track {
  height: clamp(18px, 28cqh, 28px);
  border-top: 1px solid rgba(181, 255, 140, 0.46);
  border-bottom: 1px solid rgba(181, 255, 140, 0.24);
  background: linear-gradient(180deg, rgba(157, 255, 111, 0.08), transparent 58%, rgba(157, 255, 111, 0.04));
}

#hud[data-theme="vector"] .ribbon-mark i {
  background: rgba(181, 255, 140, 0.54);
}

#hud[data-theme="vector"] .ribbon-mark.major i,
#hud[data-theme="vector"] .ribbon-mark.cardinal {
  color: #b5ff8c;
}

#hud[data-theme="vector"] .ribbon-center {
  background: #9dff6f;
  box-shadow: 0 0 10px rgba(157, 255, 111, 0.4);
}

#hud[data-theme="vector"] .ribbon-readout {
  font-size: clamp(10px, 13cqh, 13px);
}

#hud[data-theme="neon"].theme-booting .module--compass .ribbon-track {
  animation: neon-compass-reveal 2.1s cubic-bezier(0.12, 0.82, 0.18, 1) both;
}

#hud[data-theme="arc"].theme-booting .module--compass .ribbon-track::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(40, 231, 255, 0.42), transparent);
  transform: translateX(-120%);
  animation: arc-compass-sweep 2.7s cubic-bezier(0.14, 0.9, 0.2, 1) both;
  pointer-events: none;
}

#hud[data-theme="arc"].theme-booting .module--compass .ribbon-center {
  animation: arc-compass-lock 3.15s ease-out both;
}

#hud[data-theme="arc"].theme-booting .module--compass .ribbon-readout {
  animation: arc-compass-readout-lock 3.15s ease-out both;
}

.ribbon-track {
  position: relative;
  height: clamp(24px, 42cqh, 38px);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ribbon-mark {
  position: absolute;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
}

.ribbon-mark i {
  display: block;
  width: 1px;
  height: 9px;
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.5);
}

.ribbon-mark.major i {
  height: 14px;
  background: currentColor;
}

.ribbon-mark.cardinal {
  color: var(--module-color, var(--cyan));
}

.ribbon-mark b {
  display: block;
  margin-top: 2px;
  font-size: clamp(9px, 12cqh, 12px);
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

.ribbon-center {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  background: var(--module-color, var(--cyan));
  box-shadow: 0 0 10px var(--module-color, var(--cyan));
}

.ribbon-readout {
  color: var(--module-color, var(--cyan));
  font-size: clamp(10px, 16cqh, 15px);
  font-weight: 700;
  text-align: center;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.minimap-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.04);
}

.minimap-frame.shape-circle {
  border-radius: 999px;
  aspect-ratio: 1;
}

.minimap-frame.shape-square {
  border-radius: 8px;
}

#hud[data-theme="arc"].theme-booting .minimap-frame::before {
  content: "";
  position: absolute;
  inset: 8%;
  z-index: 3;
  border: 1px solid rgba(40, 231, 255, 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 42%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(90deg, transparent 48%, rgba(40, 231, 255, 0.32) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(40, 231, 255, 0.24) 49% 51%, transparent 52%),
    repeating-radial-gradient(circle, transparent 0 20px, rgba(40, 231, 255, 0.24) 21px 22px),
    repeating-conic-gradient(from 0deg, rgba(40, 231, 255, 0.16) 0 10deg, transparent 10deg 22deg);
  box-shadow: inset 0 0 26px rgba(40, 231, 255, 0.3), 0 0 28px rgba(40, 231, 255, 0.35);
  animation: arc-globe-lock 3.2s cubic-bezier(0.16, 0.86, 0.22, 1) both;
  will-change: transform, opacity;
}

#hud[data-theme="neon"] .minimap-frame {
  border-radius: 0;
  background: rgba(5, 0, 0, 0.72);
}

#hud[data-theme="vector"] .module[data-id="minimap"] {
  padding: 0;
  border: 1px solid rgba(123, 255, 140, 0.54);
  background: rgba(0, 0, 0, 0.12);
}

#hud[data-theme="vector"] .minimap-frame {
  border-radius: 0;
  background: rgba(0, 18, 0, 0.18);
}

#hud[data-theme="vector"] .maplibregl-canvas {
  filter: saturate(0.52) contrast(1.1) brightness(0.76) hue-rotate(28deg);
}

#hud[data-theme="nordic"] .module[data-id="minimap"] {
  padding: 8px;
  border-color: rgba(185, 199, 201, 0.62);
}

#hud[data-theme="nordic"] .minimap-frame {
  border-radius: 2px;
  background:
    rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 0 0 0 3px rgba(201, 180, 122, 0.24),
    inset 0 0 22px rgba(0, 0, 0, 0.86);
}

#hud[data-theme="nordic"] .maplibregl-canvas {
  filter: saturate(0.72) contrast(1.16) brightness(0.8);
}

#hud[data-theme="neon"] .module[data-id="minimap"] {
  padding: 8px 8px 20px;
  border-color: rgba(56, 232, 255, 0.54);
  background: rgba(0, 18, 34, 0.2);
}

#hud[data-theme="neon"] .module[data-id="minimap"]::before {
  content: "AREA: SAFE";
  left: auto;
  right: 10px;
  top: auto;
  bottom: 7px;
  color: #38e8ff;
  font-size: clamp(8px, 5cqw, 11px);
  text-align: right;
}

#hud[data-theme="neon"] .maplibregl-canvas {
  filter: saturate(1.4) contrast(1.18) hue-rotate(142deg);
}

#hud[data-theme="neon"].theme-booting .minimap-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, transparent 0 24%, rgba(255, 75, 43, 0.58) 24.2% 24.7%, transparent 25% 74%, rgba(56, 232, 255, 0.54) 74.2% 74.7%, transparent 75%),
    linear-gradient(0deg, transparent 0 48%, rgba(255, 154, 61, 0.48) 48.2% 48.7%, transparent 49%),
    repeating-linear-gradient(0deg, rgba(56, 232, 255, 0.12) 0 2px, transparent 2px 10px);
  animation: neon-map-sync 2.45s cubic-bezier(0.12, 0.82, 0.18, 1) both;
  pointer-events: none;
}

#hud[data-theme="neon"].theme-booting .minimap-map {
  animation: neon-map-reveal 2.45s cubic-bezier(0.12, 0.82, 0.18, 1) both;
}

#hud[data-theme="neon"] .speed-digital {
  justify-items: start;
  place-content: end start;
  text-align: left;
}

#hud[data-theme="vector"] .module[data-id="speed"] .module-body {
  align-content: end;
  justify-items: start;
}

#hud[data-theme="vector"] .speed-digital {
  justify-items: start;
  align-content: end;
  text-align: left;
  gap: 2px;
}

#hud[data-theme="vector"] .speed-digital .module-value {
  font-size: clamp(24px, 34cqw, 46px);
}

#hud[data-theme="vector"] .module[data-id="speed"] .unit {
  font-size: clamp(9px, 8cqw, 13px);
  line-height: 1;
}

#hud[data-theme="nordic"] .module--shape-circle:has(.speed-analog) {
  padding: 0;
}

#hud[data-theme="nordic"] .speed-digital {
  justify-items: center;
  place-content: center;
}

#hud[data-theme="nordic"] .speed-digital .module-value {
  font-size: clamp(22px, 28cqw, 44px);
}

#hud[data-theme="nordic"][data-runtime="android"] .speed-digital .module-value {
  font-size: clamp(12px, 28cqw, 44px);
}

#hud[data-theme="nordic"] .speed-digital .unit {
  font-size: clamp(9px, 8cqw, 13px);
}

#hud[data-theme="nordic"] .speed-face {
  fill: rgba(10, 11, 11, 0.82);
  stroke: rgba(201, 180, 122, 0.46);
}

#hud[data-theme="nordic"] .speed-arc {
  stroke: #f0dc8a;
  filter: drop-shadow(0 0 5px rgba(216, 189, 99, 0.32));
}

#hud[data-theme="nordic"] .speed-tick,
#hud[data-theme="nordic"] .speed-number,
#hud[data-theme="nordic"] .speed-unit-label {
  fill: #e8f0f0;
  stroke: #b7c2c4;
  color: #e8f0f0;
  filter: drop-shadow(0 1px 0 #000);
}

#hud[data-theme="nordic"] .speed-needle {
  stroke: #f0dc8a;
  filter: drop-shadow(0 0 5px rgba(201, 180, 122, 0.55));
}

#hud[data-theme="nordic"] .speed-analog-readout {
  color: #e5ecec;
  font-family: Georgia, "Times New Roman", serif;
}

#hud[data-theme="neon"] .module[data-id="speed"] {
  border-color: rgba(255, 122, 47, 0.42);
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="speed"] {
  padding: 10px 10px 8px;
}

#hud[data-theme="neon"] .module[data-id="speed"]::before {
  content: "VELOCITY";
  color: #ff7a2f;
}

#hud[data-theme="neon"] .speed-digital .module-value {
  color: #ff7a2f;
  font-size: clamp(24px, 26cqw, 46px);
  text-shadow: 0 0 14px rgba(255, 122, 47, 0.45);
}

#hud[data-theme="neon"][data-runtime="android"] .speed-digital .module-value {
  font-size: clamp(14px, 22cqw, 30px);
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="speed"] .unit {
  font-size: clamp(6px, 5cqw, 8px);
}

#hud[data-theme="neon"] .module[data-id="weather"] {
  border-color: rgba(255, 106, 53, 0.46);
  background: rgba(8, 0, 0, 0.2);
  padding: 10px;
}

#hud[data-theme="vector"] .module[data-id="weather"] .module-body {
  align-content: start;
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="weather"] {
  padding: 8px 8px 10px;
}

#hud[data-theme="nordic"] .module[data-id="weather"] {
  border-color: rgba(185, 215, 223, 0.56);
}

#hud[data-theme="nordic"] .weather-display {
  grid-template-columns: auto 1fr;
}

#hud[data-theme="nordic"] .weather-value {
  font-size: clamp(20px, 22cqw, 38px);
}

#hud[data-theme="nordic"][data-runtime="android"] .weather-value {
  font-size: clamp(13px, 22cqw, 38px);
}

#hud[data-theme="nordic"] .weather-symbol {
  color: #b9d7df;
  filter: drop-shadow(0 0 8px rgba(185, 215, 223, 0.42));
}

#hud[data-theme="nordic"] .weather-sunny::before {
  background: var(--nordic-gold);
  box-shadow: 0 0 14px rgba(216, 189, 99, 0.42);
}

#hud[data-theme="nordic"] .weather-sunny::after {
  background: repeating-conic-gradient(from 0deg, #fff0a3 0 8deg, transparent 8deg 22deg);
}

#hud[data-theme="nordic"] .weather-cloudy::before,
#hud[data-theme="nordic"] .weather-rainy::before,
#hud[data-theme="nordic"] .weather-cloudy::after,
#hud[data-theme="nordic"] .weather-rainy::after,
#hud[data-theme="nordic"] .weather-night::before {
  background: var(--nordic-silver);
}

#hud[data-theme="vector"] .weather-display {
  grid-template-columns: 1fr;
  justify-items: end;
  align-content: start;
  gap: 4px;
  height: 100%;
  text-align: right;
}

#hud[data-theme="vector"] .weather-symbol {
  width: clamp(26px, 30cqw, 36px);
  color: #c8ffb2;
  filter: drop-shadow(0 0 6px rgba(157, 255, 111, 0.18));
}

#hud[data-theme="vector"] .weather-value {
  font-size: clamp(22px, 30cqw, 42px);
}

#hud[data-theme="vector"] .module[data-id="weather"] .unit {
  font-size: clamp(9px, 7cqw, 12px);
  line-height: 1.1;
}

#hud[data-theme="neon"] .module[data-id="weather"]::before {
  content: "WX";
}

#hud[data-theme="neon"] .module[data-id="weather"] .module-value {
  color: #ff6a35;
  font-size: clamp(16px, 17cqw, 28px);
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="weather"] .module-value {
  font-size: clamp(10px, 16cqw, 20px);
}

#hud[data-theme="neon"] .module[data-id="weather"] .weather-display {
  height: 100%;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: end;
  gap: 3px;
  text-align: center;
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="weather"] .weather-display {
  align-content: center;
  gap: 2px;
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="weather"] .unit {
  font-size: clamp(5px, 4cqw, 7px);
}

#hud[data-theme="neon"] .module[data-id="weather"] .weather-symbol {
  width: clamp(28px, 42cqw, 46px);
}

#hud[data-theme="neon"] .module[data-id="weather"] .unit {
  font-size: clamp(7px, 6cqw, 9px);
  line-height: 1.1;
}

#hud[data-theme="neon"] .module[data-id="nowPlaying"] {
  width: 76px !important;
  padding: 10px;
  border-color: rgba(255, 75, 43, 0.78);
  background:
    linear-gradient(90deg, rgba(255, 75, 43, 0.22), transparent 14% 86%, rgba(255, 75, 43, 0.16)),
    rgba(10, 2, 2, 0.48);
  box-shadow: 0 0 18px rgba(255, 75, 43, 0.14);
  overflow: hidden;
  transition: width 640ms cubic-bezier(0.16, 0.84, 0.22, 1), filter 640ms ease;
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="nowPlaying"] {
  padding: 8px;
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="nowPlaying"]::before {
  width: 26px;
  height: 26px;
  border-width: 2px;
}

#hud[data-theme="neon"][data-runtime="android"] .module[data-id="nowPlaying"]::after {
  background:
    radial-gradient(circle at 18px 50%, #38e8ff 0 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 18px) 50%, #38e8ff 0 4px, transparent 5px),
    linear-gradient(#ff4b2b, #ff4b2b) 0 0 / 18px 2px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 0 0 / 2px 18px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 100% 100% / 18px 2px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 100% 100% / 2px 18px no-repeat;
}

#hud[data-theme="nordic"] .module[data-id="nowPlaying"] {
  border-color: rgba(174, 183, 184, 0.58);
}

#hud[data-theme="nordic"] .now-playing {
  display: grid;
  height: 100%;
  align-content: center;
  gap: 5px;
}

#hud[data-theme="nordic"] .now-title {
  color: #e9eeee;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 10cqw, 26px);
  font-weight: 700;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(185, 215, 223, 0.2);
  filter: none;
}

#hud[data-theme="nordic"][data-runtime="android"] .now-title {
  font-size: clamp(11px, 10cqw, 26px);
}

#hud[data-theme="neon"] .module[data-id="nowPlaying"]::before {
  content: "";
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 3px solid #38e8ff;
  border-bottom: 0;
  border-radius: 20px 20px 8px 8px;
  color: #38e8ff;
  opacity: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(56, 232, 255, 0.52);
}

#hud[data-theme="neon"] .module[data-id="nowPlaying"]::after {
  background:
    radial-gradient(circle at 26px 50%, #38e8ff 0 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 26px) 50%, #38e8ff 0 5px, transparent 6px),
    linear-gradient(#ff4b2b, #ff4b2b) 0 0 / 26px 2px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 0 0 / 2px 26px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 100% 100% / 26px 2px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 100% 100% / 2px 26px no-repeat;
}

#hud[data-theme="neon"] .module[data-id="nowPlaying"].track-changing {
  width: var(--now-playing-open-width, 360px) !important;
  filter: drop-shadow(0 0 12px rgba(255, 75, 43, 0.26));
}

#hud[data-theme="neon"] .module[data-id="nowPlaying"].track-changing::before {
  content: "NOW PLAYING";
  left: 18px;
  top: 12px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: #ff4b2b;
  font-size: clamp(8px, 4cqw, 12px);
  transform: none;
  box-shadow: none;
}

#hud[data-theme="neon"] .module[data-id="nowPlaying"].track-changing::after {
  background:
    linear-gradient(#ff4b2b, #ff4b2b) 0 0 / 42px 2px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 0 0 / 2px 42px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 100% 100% / 42px 2px no-repeat,
    linear-gradient(#ff4b2b, #ff4b2b) 100% 100% / 2px 42px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(255, 75, 43, 0.18) 9px 11px, transparent 11px 18px);
}

#hud[data-theme="neon"] .now-playing {
  display: grid;
  height: 100%;
  align-content: end;
  gap: 8px;
  padding-top: 20px;
  min-width: 260px;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 420ms ease 120ms, transform 520ms cubic-bezier(0.16, 0.84, 0.22, 1) 80ms;
}

#hud[data-theme="neon"][data-runtime="android"] .now-playing {
  min-width: 0;
  gap: 6px;
  padding-top: 18px;
}

#hud[data-theme="neon"] .track-changing .now-playing {
  opacity: 1;
  transform: translateX(0);
}

#hud[data-theme="neon"] .now-title {
  color: #38e8ff;
  font-size: clamp(18px, 10cqw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(56, 232, 255, 0.55);
}

#hud[data-theme="neon"][data-runtime="android"] .now-title {
  font-size: clamp(11px, 10cqw, 30px);
}

#hud[data-theme="custom"][data-typography="arc"] .module-value,
#hud[data-theme="custom"][data-typography="arc"] .battery-value,
#hud[data-theme="custom"][data-typography="arc"] .ribbon-readout,
#hud[data-theme="custom"][data-typography="arc"] .speed-analog-readout,
#hud[data-theme="custom"][data-typography="arc"] .now-title {
  font-family: Bahnschrift, "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

#hud[data-theme="custom"][data-typography="neon"] .module-value,
#hud[data-theme="custom"][data-typography="neon"] .battery-value,
#hud[data-theme="custom"][data-typography="neon"] .ribbon-readout,
#hud[data-theme="custom"][data-typography="neon"] .now-title {
  font-family: "Arial Black", "Segoe UI", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
}

#hud[data-theme="custom"][data-typography="nordic"] .module-value,
#hud[data-theme="custom"][data-typography="nordic"] .battery-value,
#hud[data-theme="custom"][data-typography="nordic"] .unit,
#hud[data-theme="custom"][data-typography="nordic"] .subtle,
#hud[data-theme="custom"][data-typography="nordic"] .now-title,
#hud[data-theme="custom"][data-typography="nordic"] .ribbon-readout,
#hud[data-theme="custom"][data-typography="nordic"] .ribbon-mark.cardinal,
#hud[data-theme="custom"][data-typography="nordic"] .speed-number,
#hud[data-theme="custom"][data-typography="nordic"] .speed-unit-label,
#hud[data-theme="custom"][data-typography="nordic"] .speed-analog-readout {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

#hud[data-theme="arc"].theme-booting .minimap-map {
  animation: arc-map-reveal 3.1s ease-out both;
  will-change: transform, opacity;
}

#hud[data-theme="custom"] .module[data-id="nowPlaying"].style-dynamic-now-playing {
  width: 76px !important;
  overflow: hidden;
  transition: width 640ms cubic-bezier(0.16, 0.84, 0.22, 1), filter 640ms ease;
}

#hud[data-theme="custom"] .module[data-id="nowPlaying"].style-dynamic-now-playing .now-playing {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
}

#hud[data-theme="vector"] .module[data-id="nowPlaying"] .module-body {
  align-content: end;
}

#hud[data-theme="vector"] .now-playing {
  grid-template-columns: 1fr;
  align-content: end;
  justify-items: start;
  min-width: 0;
  gap: 3px;
}

#hud[data-theme="vector"] .now-playing-icon,
#hud[data-theme="vector"] .now-playing-meta .unit:last-child {
  display: none;
}

#hud[data-theme="vector"] .now-playing-meta {
  display: grid;
  gap: 2px;
}

#hud[data-theme="vector"] .now-title {
  font-size: clamp(11px, 8cqw, 18px);
}

#hud[data-theme="vector"] .module[data-id="nowPlaying"] .unit {
  font-size: clamp(8px, 6cqw, 11px);
}

#hud[data-theme="custom"] .module[data-id="nowPlaying"].style-dynamic-now-playing .now-playing-icon {
  display: grid;
}

#hud[data-theme="custom"] .module[data-id="nowPlaying"].style-dynamic-now-playing .now-playing-meta {
  min-width: 220px;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 420ms ease 120ms, transform 520ms cubic-bezier(0.16, 0.84, 0.22, 1) 80ms;
}

#hud[data-theme="custom"] .module[data-id="nowPlaying"].style-dynamic-now-playing.track-changing {
  width: var(--now-playing-open-width, 320px) !important;
}

#hud[data-theme="custom"] .module[data-id="nowPlaying"].style-dynamic-now-playing.track-changing .now-playing {
  grid-template-columns: auto 1fr;
  justify-items: stretch;
}

#hud[data-theme="custom"] .module[data-id="nowPlaying"].style-dynamic-now-playing.track-changing .now-playing-meta {
  opacity: 1;
  transform: translateX(0);
}

.speed-analog {
  display: grid;
  position: relative;
  height: 100%;
  place-items: center;
  gap: 2px;
}

.speed-analog svg {
  width: min(100%, 100cqh);
  height: min(86%, 86cqw);
  overflow: visible;
}

.module--shape-circle .speed-analog svg {
  width: 100%;
  height: 100%;
  padding: 4px;
}

.speed-face {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.5;
}

.speed-arc {
  fill: none;
  stroke: var(--module-color, var(--cyan));
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.85;
}

.speed-arc-bg {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 5;
  opacity: 1;
}

.speed-tick {
  stroke: rgba(255, 255, 255, 0.58);
  stroke-linecap: round;
}

.speed-tick.minor {
  stroke-width: 1;
  opacity: 0.6;
}

.speed-tick.mid {
  stroke-width: 1.5;
  opacity: 0.78;
}

.speed-tick.major {
  stroke: var(--module-color, var(--cyan));
  stroke-width: 2.4;
  opacity: 1;
}

.speed-number {
  fill: rgba(244, 251, 255, 0.9);
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.speed-unit-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
  text-transform: uppercase;
}

.speed-needle {
  stroke: var(--module-color, var(--cyan));
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--module-color, var(--cyan)));
}

.speed-hub-outer {
  fill: rgba(0, 0, 0, 0.92);
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1.5;
}

.speed-hub {
  fill: var(--module-color, var(--cyan));
}

.speed-analog-readout {
  color: var(--module-color, var(--cyan));
  font-size: clamp(11px, 10cqw, 18px);
  font-weight: 800;
  line-height: 1;
}

.module--shape-circle .speed-analog-readout {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  width: 70%;
  text-align: center;
}

.speed-analog-readout span {
  color: var(--muted);
  font-size: 0.7em;
}

.resize-handle {
  display: none;
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(255, 255, 255, 0.34) 46% 54%, transparent 55%),
    linear-gradient(135deg, transparent 0 62%, rgba(255, 255, 255, 0.34) 63% 71%, transparent 72%);
  cursor: nwse-resize;
}

.module.editing .resize-handle {
  display: block;
}

.minimap-map {
  position: absolute;
  inset: 0;
}

.minimap-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.map-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
}

.map-search-overlay.hidden {
  display: none;
}

.map-search-dialog {
  display: grid;
  width: min(520px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 36px));
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(40, 231, 255, 0.34);
  border-radius: 8px;
  background: rgba(8, 13, 18, 0.97);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.58), 0 0 28px rgba(40, 231, 255, 0.14);
  padding: 14px;
}

.map-search-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-search-dialog h2 {
  margin: 0;
  font-size: 18px;
}

.map-search-dialog input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: #2b3036;
  border-radius: 6px;
  padding: 10px;
}

.map-search-results {
  display: grid;
  max-height: min(420px, calc(100vh - 190px));
  gap: 6px;
  overflow: auto;
}

.map-search-result {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(40, 231, 255, 0.08);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-drop {
  display: grid;
  min-height: 82px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.now-playing {
  display: grid;
  align-content: center;
  height: 100%;
  gap: 6px;
}

.now-title {
  color: var(--module-color, var(--cyan));
  font-size: clamp(16px, 13cqw, 30px);
  font-weight: 800;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.panel {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 50;
  width: min(360px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.45);
}

.panel.hidden {
  display: none;
}

.panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel h1 {
  margin: 0;
  font-size: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
}

.tab.active {
  border-color: var(--cyan);
  background: rgba(40, 231, 255, 0.18);
}

.tab-page {
  display: none;
  padding: 14px;
}

.tab-page.active {
  display: grid;
  gap: 12px;
}

.theme-list {
  display: grid;
  gap: 10px;
}

.theme-card {
  display: grid;
  gap: 4px;
  text-align: left;
}

.theme-card span {
  color: var(--text);
  font-weight: 800;
}

.theme-card small {
  color: var(--muted);
}

.theme-card.active {
  border-color: var(--amber);
  background: rgba(255, 209, 102, 0.14);
}

.theme-locked .display-tools,
.theme-locked .color-tools,
.theme-locked .glow-tools,
.theme-locked .style-tools,
.theme-locked [data-page="layout"] {
  opacity: 0.48;
}

.tab-page label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tab-page input[type="checkbox"] {
  width: auto;
}

.display-tools {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.setting-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.setting-group p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.setting-group input[type="radio"] {
  width: auto;
}

.destination-controls {
  display: grid;
  gap: 8px;
}

.destination-controls input {
  grid-column: 1 / -1;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px;
}

.destination-controls .button-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.destination-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.destination-result {
  text-align: left;
}

.color-tools {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.style-tools {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.style-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.style-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.style-select {
  justify-content: space-between;
}

.style-select select {
  min-width: 140px;
}

.color-picker {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.color-wheel {
  position: relative;
  width: min(230px, 68vw);
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: #05070a;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.24), 0 0 22px rgba(255, 255, 255, 0.08);
  touch-action: none;
}

.color-wheel:hover {
  background: #05070a;
}

.color-wheel canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.color-wheel-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.color-picker-meta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.color-mode-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.color-mode-controls button.active {
  border-color: var(--cyan);
  background: rgba(40, 231, 255, 0.18);
}

.gradient-controls {
  display: grid;
  gap: 6px;
}

.gradient-controls.hidden,
.color-target.hidden {
  display: none;
}

.color-target {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.color-target.active {
  border-color: var(--cyan);
  background: rgba(40, 231, 255, 0.18);
}

.color-chip {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  box-shadow: 0 0 10px currentColor;
}

.module-color-list {
  display: grid;
  gap: 6px;
}

.glow-tools,
.module-glow-list {
  display: grid;
  gap: 8px;
}

.glow-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.glow-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.glow-row select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: #2b3036;
  border-radius: 6px;
  padding: 7px;
}

.glow-row select option {
  color: var(--text);
  background: #2b3036;
}

.gear {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 40;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 20px;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
}

#scene-list {
  display: grid;
  gap: 8px;
}

@keyframes arc-boot-lines {
  0% {
    opacity: 0;
  }
  7% {
    opacity: 0.62;
  }
  10% {
    opacity: 0.28;
  }
  15% {
    opacity: 0.72;
  }
  22% {
    opacity: 0.34;
  }
  31% {
    opacity: 0.56;
  }
  46% {
    opacity: 0.46;
  }
  63% {
    opacity: 0.28;
  }
  100% {
    opacity: 0;
  }
}

@keyframes arc-boot-reticle {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  18% {
    opacity: 0.38;
  }
  54% {
    opacity: 0.22;
    transform: scale(1.04);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes arc-module-slide-in {
  0% {
    opacity: 0;
    transform: translate3d(var(--boot-from-x), var(--boot-from-y), 0) scale(0.82);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes arc-globe-lock {
  0% {
    opacity: 0;
    transform: rotate(-18deg) scale(0.52);
  }
  18% {
    opacity: 1;
  }
  64% {
    opacity: 1;
    transform: rotate(126deg) scale(0.96);
  }
  100% {
    opacity: 0;
    transform: rotate(180deg) scale(1.32);
  }
}

@keyframes arc-map-reveal {
  0%,
  44% {
    opacity: 0;
    transform: scale(0.58);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes arc-compass-calibrate {
  0% {
    opacity: 0.2;
    transform: scaleX(0.6);
  }
  18% {
    opacity: 0.7;
    transform: scaleX(1.02);
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes arc-compass-sweep {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  14% {
    opacity: 0.65;
  }
  54% {
    opacity: 0.45;
    transform: translateX(40%);
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes arc-compass-lock {
  0%,
  72% {
    opacity: 0.35;
    transform: translateX(-50%) scaleY(0.7);
  }
  84% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1.25);
    box-shadow: 0 0 22px var(--module-color, var(--cyan));
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes arc-compass-readout-lock {
  0%,
  62% {
    opacity: 0;
    letter-spacing: 0;
  }
  78% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
    letter-spacing: 0;
  }
}

@keyframes neon-scan-reveal {
  0% {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
  }
  15% {
    opacity: 0.62;
  }
  82% {
    opacity: 0.42;
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes neon-frame-reveal {
  0% {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
  }
  18% {
    opacity: 0.26;
  }
  82% {
    opacity: 0.18;
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes neon-module-scan-in {
  0% {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    filter: blur(4px) brightness(1.25);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0) brightness(1);
  }
}

@keyframes neon-compass-reveal {
  0% {
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes neon-map-sync {
  0% {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
  }
  72% {
    opacity: 0.54;
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes neon-map-reveal {
  0% {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes nordic-ice-melt {
  0% {
    opacity: 0.96;
    transform: scale(1);
    filter: saturate(1.08) contrast(1.1) blur(0);
  }
  38% {
    opacity: 0.74;
    transform: scale(1.025);
    filter: saturate(1.12) contrast(1.12) blur(1px);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
    filter: saturate(1.1) contrast(1.18) blur(10px);
  }
}

@keyframes nordic-frost-cracks {
  0% {
    opacity: 0.64;
    transform: scale(1);
  }
  50% {
    opacity: 0.34;
    transform: scale(1.06);
  }
  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes nordic-module-forge {
  0% {
    opacity: 0;
    filter: blur(5px) brightness(1.4);
  }
  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
  }
}
