:root {
  color-scheme: dark;
  --bg: #02040a;
  --bg-2: #050b14;
  --text: #eefaff;
  --muted: #94aabd;
  --muted-2: #647889;
  --line: rgba(180, 240, 255, 0.18);
  --line-strong: rgba(180, 240, 255, 0.32);
  --panel: rgba(5, 14, 24, 0.78);
  --panel-strong: rgba(6, 17, 29, 0.94);
  --panel-alt: rgba(13, 26, 40, 0.92);
  --cyan: #2ceaff;
  --magenta: #ff4bd8;
  --green: #91ffd4;
  --hero-glow-a: transparent;
  --hero-glow-b: transparent;
  --warning: #ffd37a;
  --ready: #91ffd4;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 14%, var(--hero-glow-a), transparent 25%),
    radial-gradient(circle at 18% 34%, var(--hero-glow-b), transparent 30%),
    linear-gradient(180deg, #050816 0%, var(--bg) 58%, #010207 100%);
  color: var(--text);
}

body[data-hero-profile="ultraviolet"] {
  --hero-glow-a: transparent;
  --hero-glow-b: transparent;
  --cyan: #b26cff;
  --magenta: #ff4bdd;
  --green: #74f2ff;
}

body[data-hero-profile="toxic"] {
  --hero-glow-a: transparent;
  --hero-glow-b: transparent;
  --cyan: #58ffb7;
  --magenta: #d6ff3f;
  --green: #adff62;
}

body[data-hero-profile="hotline"] {
  --hero-glow-a: transparent;
  --hero-glow-b: transparent;
  --cyan: #ff8a2c;
  --magenta: #ff347f;
  --green: #ffe66d;
}

body[data-hero-profile="ice"] {
  --hero-glow-a: transparent;
  --hero-glow-b: transparent;
  --cyan: #78fff4;
  --magenta: #78a6ff;
  --green: #c8f7ff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(238, 250, 255, 0.2) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(44, 234, 255, 0.14) 0 1px, transparent 1.6px);
  background-size: 96px 96px, 151px 151px;
  opacity: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 40vh;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(2, 4, 10, 0.86));
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-size: 17px;
  font-weight: 780;
  text-decoration: none;
  text-shadow: 0 0 24px rgba(44, 234, 255, 0.18);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav a,
.site-footer a {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.nav a:first-child {
  color: var(--cyan);
}

main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  min-height: 540px;
  padding: 72px 0 44px;
  border-bottom: 1px solid var(--line);
}

.hero-dotfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: normal;
}

.hero-dotfield[hidden] {
  display: none;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(46px, 8.4vw, 104px);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(44, 234, 255, 0.22),
    0 0 52px rgba(255, 75, 216, 0.16);
}

.intro p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-profile-control {
  display: grid;
  gap: 8px;
  width: min(240px, 100%);
  justify-self: end;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-profile-control select {
  min-height: 34px;
  border-color: rgba(180, 240, 255, 0.24);
  background: rgba(4, 12, 20, 0.64);
  font-size: 12px;
}

.intro-aside {
  align-self: end;
  display: grid;
  gap: 12px;
}

.app-callout,
.splat-card,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 23, 38, 0.92), rgba(4, 12, 20, 0.82)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.app-callout {
  display: grid;
  gap: 10px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

.app-callout-disabled {
  cursor: default;
  opacity: 0.62;
  filter: saturate(0.62);
}

.app-callout strong {
  font-size: 22px;
  line-height: 1.05;
}

.app-callout span:last-child {
  color: #c5d6df;
  font-size: 14px;
  line-height: 1.45;
}

.app-callout .meta-label {
  color: var(--green);
}

.app-callout-disabled .meta-label {
  color: var(--muted-2);
}

.meta-label {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  padding: 22px 0;
}

.toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

select,
input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(4, 12, 20, 0.86);
  color: var(--text);
  font: inherit;
  text-transform: none;
  padding: 0 12px;
  outline: none;
}

select:focus,
input:focus,
.hero-profile-control select:focus,
.download-button:focus-visible,
.splat-card:focus-visible,
.app-callout:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(44, 234, 255, 0.18);
}

input::placeholder {
  color: var(--muted-2);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 0 52px;
}

.splat-card {
  display: grid;
  min-height: 310px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.splat-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 34px rgba(255, 75, 216, 0.1);
}

.poster {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 18px;
  background:
    radial-gradient(circle at 24% 30%, rgba(44, 234, 255, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 40%, rgba(255, 75, 216, 0.42) 0 1px, transparent 2px),
    linear-gradient(145deg, rgba(255, 75, 216, 0.12), rgba(44, 234, 255, 0.1)),
    var(--panel-alt);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  overflow: hidden;
}

.poster img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.poster-fallback {
  display: grid;
  gap: 7px;
}

.poster-fallback small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.splat-card-content {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.splat-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.splat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.metadata {
  display: grid;
  gap: 6px;
  margin-top: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.status {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 211, 122, 0.12);
  color: var(--warning);
  font-size: 12px;
  font-weight: 750;
}

.status.ready {
  background: rgba(145, 255, 212, 0.12);
  color: var(--ready);
}

.viewer-shell {
  width: min(1440px, calc(100% - 32px));
  min-height: calc(100vh - 88px);
  padding: 24px 0;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  min-height: calc(100vh - 126px);
}

.viewer-frame,
.viewer-placeholder {
  width: 100%;
  min-height: calc(100vh - 126px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #03070b;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.viewer-frame iframe {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 126px);
  border: 0;
}

.viewer-placeholder {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 30% 30%, rgba(44, 234, 255, 0.22), transparent 42%),
    radial-gradient(circle at 70% 54%, rgba(255, 75, 216, 0.18), transparent 34%),
    #03070b;
  color: var(--text);
  text-align: center;
}

.viewer-placeholder div {
  max-width: 540px;
}

.viewer-placeholder h1 {
  font-size: clamp(34px, 6vw, 68px);
}

.viewer-placeholder p {
  color: var(--muted);
  line-height: 1.6;
}

.detail-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
}

.detail-panel h1 {
  font-size: 34px;
  line-height: 1;
  text-transform: none;
}

.detail-panel h2 {
  margin: 6px 0 -4px;
  color: var(--cyan);
  font-size: 16px;
  line-height: 1.2;
}

.detail-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(44, 234, 255, 0.38);
  border-radius: 6px;
  background: rgba(44, 234, 255, 0.14);
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.download-button:hover {
  background: rgba(255, 75, 216, 0.16);
  border-color: rgba(255, 75, 216, 0.42);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  color: var(--muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .splat-card {
    transition: none;
  }

  .splat-card:hover {
    transform: none;
  }
}

@media (max-width: 920px) {
  .intro,
  .toolbar,
  .viewer-layout {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: 500px;
  }

  .hero-profile-control {
    justify-self: start;
  }

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

  .viewer-layout,
  .viewer-frame,
  .viewer-frame iframe,
  .viewer-placeholder {
    min-height: 58vh;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    gap: 11px;
  }

  .intro {
    min-height: 430px;
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(42px, 15vw, 68px);
  }

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