@font-face {
  font-family: "Coolvetica";
  src: url("coolvetica/coolvetica rg.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "ContourLine";
  src: url("contour_line/contour line.otf") format("opentype");
  font-display: swap;
}

:root {
  --body: "Coolvetica", "Trebuchet MS", sans-serif;
  --display: "ContourLine", "Arial Black", sans-serif;
  --ink: #fff8e8;
  --muted: rgba(255, 248, 232, .68);
  --dim: rgba(255, 248, 232, .46);
  --line: rgba(255, 248, 232, .18);
  --soft: rgba(255, 248, 232, .09);
  --panel: rgba(16, 18, 28, .82);
  --panel-strong: rgba(10, 12, 20, .96);
  --void: #070811;
  --paper: #fff8e8;
  --yellow: #ffe45e;
  --cyan: #5ef1ff;
  --pink: #ff5bce;
  --orange: #ff8a4c;
  --green: #7dff8e;
  --blue: #7c8cff;
  --live-bg: 1;
  --live-glow: 1;
  --live-shadow-blur: 80px;
  --live-banner-glow: 46px;
  --live-title-glow: 32px;
  --live-blur: 1;
  --live-saturation: 1;
  --live-contrast: 1;
  --live-card-scale: 1;
  --live-hero-scale: 1;
  --live-radius: 8px;
  --shadow: 0 26px var(--live-shadow-blur) rgba(0, 0, 0, .42);
  --radius: var(--live-radius);
  --app-width: 100vw;
  --app-height: 100vh;
  --mobile-scale: 1;
  --mx: 50vw;
  --my: 50vh;
}

body.theme-daylight {
  --ink: #1e1b17;
  --muted: rgba(30, 27, 23, .66);
  --dim: rgba(30, 27, 23, .45);
  --line: rgba(30, 27, 23, .16);
  --soft: rgba(30, 27, 23, .08);
  --panel: rgba(255, 248, 232, .82);
  --panel-strong: rgba(255, 248, 232, .96);
  --void: #f4ead6;
  --paper: #16120d;
  --yellow: #f7bd20;
  --cyan: #00aecd;
  --pink: #cc38a4;
  --orange: #e6672e;
  --green: #1c9e5c;
  --blue: #4e61e8;
}

body.theme-terminal {
  --ink: #eaffdc;
  --muted: rgba(234, 255, 220, .66);
  --dim: rgba(234, 255, 220, .42);
  --line: rgba(125, 255, 142, .24);
  --soft: rgba(125, 255, 142, .1);
  --panel: rgba(2, 16, 10, .84);
  --panel-strong: rgba(1, 12, 8, .96);
  --void: #010805;
  --paper: #eaffdc;
  --yellow: #dfff5c;
  --cyan: #60ffc8;
  --pink: #ff73dc;
  --orange: #ff8a57;
  --green: #7dff8e;
  --blue: #78a3ff;
}

body.theme-candy {
  --ink: #fff7fc;
  --muted: rgba(255, 247, 252, .7);
  --dim: rgba(255, 247, 252, .48);
  --line: rgba(255, 247, 252, .2);
  --soft: rgba(255, 247, 252, .1);
  --panel: rgba(41, 18, 45, .82);
  --panel-strong: rgba(28, 12, 34, .96);
  --void: #160b22;
  --paper: #fff7fc;
  --yellow: #ffe45e;
  --cyan: #80f7ff;
  --pink: #ff72d2;
  --orange: #ff9c64;
  --green: #99ffb0;
  --blue: #9d91ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(94, 241, 255, .24), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(255, 91, 206, .2), transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(255, 228, 94, .18), transparent 32%),
    linear-gradient(180deg, rgba(7, 8, 17, .1), var(--void) 76%),
    var(--void);
  font-family: var(--body);
  letter-spacing: 0;
  overflow-x: hidden;
}

body.theme-daylight {
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 174, 205, .24), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(204, 56, 164, .18), transparent 30%),
    radial-gradient(circle at 72% 82%, rgba(247, 189, 32, .24), transparent 32%),
    linear-gradient(180deg, rgba(244, 234, 214, .1), #f4ead6 76%),
    #f4ead6;
}

body.reduced-chaos .aurora,
body.reduced-chaos .grid-fx,
body.reduced-chaos .cursor-beam,
body.reduced-chaos .ticker,
body.reduced-chaos .side-dock {
  opacity: .08;
  animation-play-state: paused;
}

::selection {
  color: #080a12;
  background: var(--yellow);
}

button,
a,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.fallback-icon {
  font-style: normal;
  font-size: .8rem;
}

.world-fx,
.aurora,
.grid-fx,
.cursor-beam,
.noise-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.world-fx {
  z-index: 0;
  overflow: hidden;
  filter: saturate(var(--live-saturation)) contrast(var(--live-contrast));
}

.aurora {
  opacity: calc(.78 * var(--live-bg));
  background:
    conic-gradient(from 210deg at 18% 10%, rgba(94, 241, 255, .28), transparent, rgba(255, 91, 206, .24), transparent, rgba(255, 228, 94, .2), rgba(94, 241, 255, .28)),
    conic-gradient(from 50deg at 80% 30%, rgba(124, 140, 255, .22), transparent, rgba(125, 255, 142, .2), transparent);
  filter: blur(4px);
  animation: auroraShift 22s ease-in-out infinite alternate;
}

.grid-fx {
  opacity: calc(.32 * var(--live-bg));
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 28px, rgba(255, 228, 94, .08) 28px 29px);
  background-size: 42px 42px, 42px 42px, auto;
  mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.84) 66%, transparent);
}

.cursor-beam {
  opacity: .4;
  background:
    linear-gradient(90deg, transparent calc(var(--mx) - 1px), rgba(94, 241, 255, .5) var(--mx), transparent calc(var(--mx) + 1px)),
    linear-gradient(0deg, transparent calc(var(--my) - 1px), rgba(255, 228, 94, .38) var(--my), transparent calc(var(--my) + 1px));
  mask-image: radial-gradient(circle at var(--mx) var(--my), #000, transparent 28%);
}

.noise-fx {
  opacity: .15;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,255,255,.05) 7px 8px);
}

@keyframes auroraShift {
  to {
    transform: scale(1.08) rotate(4deg) translateY(-2%);
  }
}

.top-shell {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(1340px, calc(100% - 28px));
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-strong) 90%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(calc(20px * var(--live-blur))) saturate(160%);
  transform: translateX(-50%);
}

.brand,
.main-nav,
.top-actions,
.hero-actions,
.spotlight-actions,
.filter-row,
.console-selects,
.view-toggle,
.project-actions,
.transport-row,
.queue-tools,
.flight-modes,
.drawer-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 225px;
  padding: 0 10px;
  text-decoration: none;
  text-transform: lowercase;
}

.brand-mark,
.icon-button,
.mini-button,
.contact-icon,
.side-dock button,
.mini-player button {
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.brand-mark {
  width: 48px;
  height: 48px;
  color: #080a12;
  background: linear-gradient(135deg, var(--yellow), var(--cyan), var(--pink));
  box-shadow: 0 0 34px rgba(94, 241, 255, .18);
}

.brand-text strong,
.brand-text small {
  display: block;
  line-height: 1;
}

.brand-text strong {
  font-size: 1.15rem;
  font-weight: 400;
}

.brand-text small {
  margin-top: 5px;
  color: var(--muted);
  font-size: .76rem;
}

.main-nav {
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  background: var(--soft);
  overflow-x: auto;
}

.main-nav button,
.icon-button,
.primary-button,
.soft-button,
.mini-button,
.filter-row button,
.view-toggle button,
.atlas-status button,
.project-actions a,
.project-actions button,
.control-button,
.queue-tools button,
.flight-modes button,
.drawer-actions a,
.drawer-actions button,
.command-list button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--soft);
  transition:
    transform .2s ease,
    background .2s ease,
    color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.main-nav button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border-color: transparent;
  color: var(--muted);
  text-transform: lowercase;
  white-space: nowrap;
}

.main-nav button:hover,
.main-nav button.active,
.icon-button:hover,
.icon-button.active,
.play-dot {
  color: #080a12;
  background: var(--yellow);
  border-color: transparent;
}

.top-actions {
  justify-content: end;
  gap: 7px;
}

.icon-button,
.mini-button {
  width: 44px;
  height: 44px;
}

main {
  position: relative;
  z-index: 5;
  width: min(1340px, calc(100% - 28px));
  margin: 0 auto;
  padding: 108px 0 138px;
}

.site-announcement {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(840px, 100%);
  min-height: 42px;
  margin: 0 0 16px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 228, 94, .34);
  border-radius: var(--radius);
  color: #080a12;
  background: linear-gradient(90deg, var(--yellow), var(--cyan));
  box-shadow: 0 18px var(--live-banner-glow) rgba(255, 228, 94, .18);
  text-transform: lowercase;
}

.site-announcement[hidden] {
  display: none;
}

.hero,
.section {
  scroll-margin-top: 112px;
}

.hero {
  min-height: calc(100vh - 108px);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, .72fr);
  grid-template-areas:
    "copy spotlight"
    "modules modules";
  gap: 16px;
  align-items: end;
  padding: 36px 0 0;
}

.hero-copy {
  grid-area: copy;
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 610px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 31px;
  padding: 6px 11px;
  border: 1px solid rgba(94, 241, 255, .28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(94, 241, 255, .08);
  text-transform: lowercase;
}

h1 {
  display: grid;
  font-family: var(--display);
  font-size: clamp(5.6rem, 13vw, 13.5rem);
  font-weight: 400;
  line-height: .72;
  text-transform: lowercase;
  transform: scale(var(--live-hero-scale));
  transform-origin: left center;
}

h1 span:last-child {
  font-family: var(--body);
  color: var(--yellow);
  text-shadow:
    5px 0 0 rgba(255, 91, 206, .85),
    -5px 0 0 rgba(94, 241, 255, .8);
}

.hero-lede {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  line-height: 1.3;
}

.hero-actions,
.spotlight-actions,
.project-actions,
.transport-row,
.drawer-actions {
  flex-wrap: wrap;
  gap: 9px;
}

.primary-button,
.soft-button,
.control-button,
.project-actions a,
.project-actions button,
.drawer-actions a,
.drawer-actions button,
.queue-tools button,
.atlas-status button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
  text-transform: lowercase;
}

.primary-button,
.project-actions a,
.drawer-actions a {
  color: #080a12;
  background: var(--yellow);
  border-color: transparent;
}

.primary-button:hover,
.soft-button:hover,
.mini-button:hover,
.filter-row button:hover,
.filter-row button.active,
.view-toggle button:hover,
.view-toggle button.active,
.project-actions a:hover,
.project-actions button:hover,
.control-button:hover,
.control-button.active,
.queue-tools button:hover,
.queue-tools button.active,
.flight-modes button:hover,
.flight-modes button.active,
.drawer-actions a:hover,
.drawer-actions button:hover,
.atlas-status button:hover,
.command-list button:hover,
.command-list button.active {
  color: #080a12;
  background: var(--cyan);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(94, 241, 255, .16);
}

.spotlight {
  grid-area: spotlight;
  min-height: 610px;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(calc(18px * var(--live-blur))) saturate(150%);
}

.spotlight-toolbar,
.atlas-status,
.queue-tools,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spotlight-toolbar {
  min-height: 60px;
  padding: 8px 12px 8px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-transform: lowercase;
}

.spotlight-toolbar span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.spotlight-toolbar div {
  display: flex;
  gap: 6px;
}

.spotlight-card {
  display: grid;
  grid-template-rows: minmax(280px, 1fr) auto;
  min-height: 0;
}

.spotlight-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.spotlight-copy {
  display: grid;
  gap: 11px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(94, 241, 255, .1), transparent, rgba(255, 91, 206, .09)),
    var(--panel-strong);
}

.spotlight-copy span,
.track-meta span,
.module-card span,
.project-topline span,
.counter-grid span,
.instrument span,
.contact-card small,
.drawer-copy > span,
.drawer-stats span,
.queue-list span,
.atlas-status span,
.console-selects span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  text-transform: lowercase;
}

.spotlight-copy strong {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  line-height: .9;
  font-weight: 400;
  text-transform: lowercase;
}

.spotlight-copy p {
  color: var(--muted);
  line-height: 1.34;
}

.spotlight-actions a,
.spotlight-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--soft);
  text-decoration: none;
}

.spotlight-actions a {
  color: #080a12;
  background: var(--yellow);
  border-color: transparent;
}

.module-strip {
  grid-area: modules;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 12px;
  align-items: center;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  text-align: left;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

.module-card i,
.module-card svg {
  grid-row: span 2;
}

.module-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.18rem;
  font-weight: 400;
}

.module-card:hover,
.lab-panel:hover,
.project-card:hover {
  border-color: rgba(255, 228, 94, .5);
  transform: translateY(-4px) scale(var(--live-card-scale));
}

.section {
  padding-top: 90px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, 440px);
  gap: 22px;
  align-items: end;
  margin-bottom: 22px;
}

h2 {
  margin-top: 10px;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: .82;
  font-weight: 400;
  text-transform: lowercase;
}

.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.35;
}

.atlas-console {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.search-field.compact {
  min-height: 44px;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-field input::placeholder {
  color: var(--dim);
}

.filter-row {
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.filter-row button,
.view-toggle button,
.flight-modes button {
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  text-transform: lowercase;
}

.console-selects {
  justify-content: end;
  gap: 8px;
}

.console-selects label {
  display: grid;
  gap: 4px;
}

select {
  min-height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel-strong);
  outline: 0;
}

.view-toggle {
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.view-toggle button {
  width: 40px;
  padding: 0;
}

.atlas-status {
  min-height: 46px;
  margin-bottom: 14px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.atlas-status button {
  min-height: 34px;
  padding: 0 10px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.project-card {
  position: relative;
  grid-column: span 4;
  display: grid;
  grid-template-rows: 245px 1fr;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 16px 55px rgba(0,0,0,.25);
  transform: scale(var(--live-card-scale));
  transform-origin: center;
  transition: transform .22s ease, border-color .22s ease;
}

.project-card:nth-child(1),
.project-card:nth-child(4) {
  grid-column: span 6;
}

.project-list-mode .project-grid {
  grid-template-columns: 1fr;
}

.project-list-mode .project-card,
.project-list-mode .project-card:nth-child(1),
.project-list-mode .project-card:nth-child(4) {
  grid-column: 1;
  grid-template-columns: 320px 1fr;
  grid-template-rows: 1fr;
  min-height: 320px;
}

.project-image {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  background: var(--panel-strong);
}

.project-list-mode .project-image {
  min-height: 100%;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  transition: transform .45s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.06);
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 38%, rgba(0,0,0,.58)),
    linear-gradient(90deg, var(--accent, rgba(94, 241, 255, .22)), transparent 44%);
}

.project-image span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: var(--radius);
  color: #080a12;
  background: var(--yellow);
}

.project-copy {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 18px;
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.project-topline strong {
  color: var(--yellow);
  font-weight: 400;
}

.project-copy h3 {
  font-size: clamp(2rem, 3vw, 3.5rem);
  line-height: .9;
  font-weight: 400;
  text-transform: lowercase;
}

.project-copy p {
  color: var(--muted);
  line-height: 1.34;
}

.tag-row,
.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.drawer-tags span {
  min-height: 26px;
  padding: 5px 8px 4px;
  border-radius: 999px;
  color: #080a12;
  background: var(--yellow);
  font-size: .75rem;
  text-transform: lowercase;
}

.project-actions {
  margin-top: auto;
}

.accent-pink { --accent: rgba(255, 91, 206, .32); }
.accent-green { --accent: rgba(125, 255, 142, .3); }
.accent-blue { --accent: rgba(124, 140, 255, .3); }
.accent-yellow { --accent: rgba(255, 228, 94, .34); }
.accent-orange { --accent: rgba(255, 138, 76, .32); }

.empty-state {
  display: none;
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: var(--panel);
}

.empty-state.show {
  display: block;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.lab-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0,0,0,.23);
  transition: transform .22s ease, border-color .22s ease;
}

.panel-title {
  color: var(--muted);
  text-transform: lowercase;
}

.theme-swatches {
  display: grid;
  gap: 8px;
}

.theme-swatches button,
.check-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--soft);
  text-align: left;
}

.theme-swatches button.active,
.theme-swatches button:hover,
.check-row.done {
  color: #080a12;
  background: var(--yellow);
  border-color: transparent;
}

.theme-swatches span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--yellow), var(--cyan), var(--pink));
}

.status-lab p {
  color: var(--muted);
  line-height: 1.36;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.counter-grid div {
  min-height: 78px;
  padding: 12px;
  background: var(--panel-strong);
}

.counter-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.4rem;
  font-weight: 400;
}

.station-grid {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(360px, 1.15fr);
  gap: 14px;
}

.player-panel,
.queue-panel,
.radar-card,
.instrument-panel,
.contact-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(calc(18px * var(--live-blur))) saturate(150%);
}

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

.disc-wrap {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
}

.disc {
  width: min(320px, 80vw);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel-strong) 0 18px, var(--yellow) 19px 28px, transparent 29px),
    repeating-radial-gradient(circle at center, rgba(255,255,255,.13) 0 2px, transparent 2px 15px),
    conic-gradient(from 40deg, var(--pink), var(--cyan), var(--yellow), var(--orange), var(--green), var(--blue), var(--pink));
  box-shadow:
    inset 0 0 0 20px rgba(0,0,0,.28),
    0 28px 80px rgba(0,0,0,.36);
  animation: recordSpin 8s linear infinite;
}

.needle {
  position: absolute;
  right: 13%;
  top: 12%;
  width: 11px;
  height: 190px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--paper), var(--yellow));
  transform: rotate(28deg);
  transform-origin: top center;
  box-shadow: 0 10px 34px rgba(0,0,0,.3);
}

body.music-paused .disc {
  animation-play-state: paused;
}

@keyframes recordSpin {
  to {
    transform: rotate(360deg);
  }
}

.track-meta {
  display: grid;
  gap: 8px;
}

.track-meta strong {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: .9;
  font-weight: 400;
  text-transform: lowercase;
}

.progress-shell {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--soft);
}

.progress-shell div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--cyan), var(--pink));
}

.volume-control,
.altitude-slider {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--yellow);
}

.queue-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 650px;
}

.queue-tools {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.queue-tools .search-field {
  flex: 1;
}

.queue-list {
  max-height: 690px;
  overflow: auto;
}

.queue-list button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.queue-list button:hover,
.queue-list button.active {
  background: var(--soft);
}

.queue-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.queue-list .starred {
  color: var(--yellow);
}

.flight-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 14px;
}

.radar-card {
  display: grid;
  grid-template-rows: 1fr auto;
}

.radar-screen {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, transparent 0 20%, rgba(94, 241, 255, .18) 20.2% 20.5%, transparent 20.8% 38%, rgba(255, 228, 94, .16) 38.2% 38.5%, transparent 38.8% 54%, rgba(255, 91, 206, .12) 54.2% 54.4%, transparent 54.7%),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    rgba(0,0,0,.18);
  background-size: auto, 48px 48px, 48px 48px, auto;
}

.radar-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px dashed rgba(255, 248, 232, .22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.radar-ring.one {
  width: 340px;
  height: 340px;
}

.radar-ring.two {
  width: 520px;
  height: 520px;
}

.radar-sweep {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan));
  transform-origin: left center;
  animation: radarSweep 4.2s linear infinite;
}

@keyframes radarSweep {
  to {
    transform: rotate(360deg);
  }
}

.airport,
.plane-blip {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.airport {
  gap: 3px;
  min-width: 86px;
  padding: 10px;
}

.airport strong {
  font-weight: 400;
}

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

.airport-a {
  left: 11%;
  bottom: 16%;
}

.airport-b {
  right: 11%;
  top: 14%;
}

.plane-blip {
  left: 55%;
  top: 40%;
  width: 64px;
  height: 64px;
  color: #080a12;
  background: var(--yellow);
  box-shadow: 0 0 0 14px rgba(255, 228, 94, .15);
  animation: planeFloat 3.2s ease-in-out infinite;
}

@keyframes planeFloat {
  50% {
    transform: translate(12px, -10px) rotate(8deg);
  }
}

.flight-modes {
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.instrument-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}

.instrument,
.altitude-slider {
  min-height: 126px;
  padding: 16px;
  background: var(--panel-strong);
}

.instrument strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
  font-weight: 400;
}

.altitude-slider {
  grid-column: 1 / -1;
  display: grid;
  align-content: center;
}

body[data-flight="storm"] .radar-screen {
  background-color: rgba(255, 98, 79, .12);
}

body[data-flight="sunset"] .radar-screen {
  background-color: rgba(255, 138, 76, .12);
}

body[data-flight="approach"] .plane-blip {
  animation-duration: 1.8s;
}

.contact-banner {
  display: flex;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--panel-strong);
}

.contact-banner span {
  min-width: 100%;
  padding: 13px 18px;
  color: var(--yellow);
  white-space: nowrap;
  text-transform: lowercase;
  animation: marquee 18s linear infinite;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(360px, 1.18fr);
  border-radius: 0 0 var(--radius) var(--radius);
}

.contact-copy {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.contact-copy p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.35;
}

.contact-stack {
  display: grid;
}

.contact-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  min-height: 105px;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  text-decoration: none;
}

.contact-card:hover {
  background: var(--soft);
}

.contact-icon {
  width: 54px;
  height: 54px;
  color: #080a12;
  background: var(--cyan);
}

.contact-card:nth-child(2) .contact-icon {
  background: var(--pink);
}

.contact-card:nth-child(3) .contact-icon {
  background: var(--yellow);
}

.contact-card strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 400;
}

.side-dock {
  position: fixed;
  right: 15px;
  bottom: 94px;
  z-index: 66;
  display: grid;
  gap: 8px;
}

.side-dock button,
.mini-player button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel-strong);
}

.side-dock button:hover,
.mini-player button:hover {
  color: #080a12;
  background: var(--yellow);
  border-color: transparent;
}

.mini-player {
  position: fixed;
  left: 14px;
  bottom: 52px;
  z-index: 66;
  display: grid;
  grid-template-columns: auto minmax(0, 190px) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(calc(14px * var(--live-blur)));
}

.mini-player span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
}

.mini-player strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 64;
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-strong) 92%, transparent);
  backdrop-filter: blur(calc(14px * var(--live-blur)));
}

.ticker span {
  min-width: 100%;
  padding: 13px 18px;
  color: var(--muted);
  white-space: nowrap;
  text-transform: lowercase;
  animation: marquee 26s linear infinite;
}

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: 280px 1fr;
  width: min(500px, 100%);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: -24px 0 80px rgba(0,0,0,.38);
  transform: translateX(100%);
  transition: transform .28s ease;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(0,0,0,.5);
}

.drawer > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-copy {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  overflow: auto;
}

.drawer-copy h3 {
  font-size: 3.2rem;
  line-height: .9;
  font-weight: 400;
  text-transform: lowercase;
}

.drawer-copy p {
  color: var(--muted);
  line-height: 1.35;
}

.drawer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.drawer-stats div {
  padding: 12px;
  background: var(--panel);
}

.drawer-stats strong {
  display: block;
  margin-top: 6px;
  font-weight: 400;
}

.command-palette,
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  padding: 24px;
  background: rgba(0,0,0,.74);
}

.command-palette.open,
.preview-modal.open {
  display: grid;
}

.command-palette {
  place-items: start center;
  padding-top: 12vh;
}

.command-box {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.command-search {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.command-search input {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.1rem;
}

.command-list {
  display: grid;
  max-height: 410px;
  overflow: auto;
}

.command-list button {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
}

.live-panel {
  position: fixed;
  top: 104px;
  left: 16px;
  z-index: 118;
  display: grid;
  gap: 12px;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 136px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 228, 94, .12), transparent 36%, rgba(94, 241, 255, .12)),
    var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: auto;
  transform: translateX(calc(-100% - 32px));
  transition: transform .28s ease;
  backdrop-filter: blur(calc(18px * var(--live-blur))) saturate(160%);
}

.live-panel.open {
  transform: translateX(0);
}

.live-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.live-panel-head span,
.live-control label,
.live-control > span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  text-transform: lowercase;
}

.live-panel-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: .95;
  text-transform: lowercase;
}

.live-section {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}

.live-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.live-section-title span {
  color: var(--muted);
  font-size: .75rem;
  text-transform: lowercase;
}

.live-section-title strong {
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: lowercase;
}

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

.preset-grid button,
.live-toggles button {
  min-width: 0;
}

.preset-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--soft);
  text-transform: lowercase;
}

.preset-grid button:hover {
  color: #080a12;
  background: var(--cyan);
  border-color: transparent;
}

.live-sync {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(94, 241, 255, .28);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(94, 241, 255, .08);
}

.live-sync span {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.25;
}

.live-control {
  display: grid;
  gap: 7px;
}

.live-control input[type="text"],
.live-control textarea,
.live-control select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(0,0,0,.18);
  outline: 0;
}

.live-control input[type="text"],
.live-control select {
  min-height: 42px;
  padding: 0 12px;
}

.live-control textarea {
  resize: vertical;
  min-height: 82px;
  padding: 10px 12px;
}

.live-control input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

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

.live-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

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

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

.live-toggles button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--soft);
  text-transform: lowercase;
}

.live-toggles button:hover,
.live-toggles button.active,
.live-actions button:hover {
  color: #080a12;
  background: var(--yellow);
  border-color: transparent;
}

body.live-wide .project-card,
body.live-wide .project-card:nth-child(1),
body.live-wide .project-card:nth-child(4) {
  grid-column: span 6;
}

body.live-invert main,
body.live-invert .top-shell,
body.live-invert .mini-player,
body.live-invert .side-dock,
body.live-invert .ticker {
  filter: hue-rotate(150deg) saturate(1.25) contrast(1.05);
}

body.live-compact .top-shell {
  width: min(920px, calc(100% - 28px));
  grid-template-columns: auto 1fr auto;
}

body.live-compact .brand-text small,
body.live-compact .main-nav span {
  display: none;
}

body.live-compact .brand {
  min-width: auto;
}

body.live-compact .main-nav button {
  min-width: 50px;
}

body.live-scanlines .noise-fx {
  opacity: .34;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(94, 241, 255, .07) 18px 19px);
}

body.live-party .aurora {
  animation-duration: 8s;
  filter: blur(3px) saturate(1.55);
}

body.live-party h1 span:last-child {
  text-shadow:
    9px 0 0 rgba(255, 91, 206, .9),
    -9px 0 0 rgba(94, 241, 255, .9),
    0 0 var(--live-title-glow) rgba(255, 228, 94, .34);
}

body.live-party .brand-mark,
body.live-party .primary-button {
  animation: partyPulse 1.6s ease-in-out infinite alternate;
}

body.live-hide-lab #lab,
body.live-hide-station #station,
body.live-hide-flight #flight,
body.live-hide-mini .mini-player,
body.live-hide-ticker .ticker {
  display: none;
}

@keyframes partyPulse {
  to {
    filter: hue-rotate(45deg) saturate(1.25);
    transform: translateY(-2px) scale(1.03);
  }
}

.keypad-panel {
  position: fixed;
  right: 16px;
  top: 104px;
  z-index: 118;
  display: grid;
  gap: 12px;
  width: min(350px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(94, 241, 255, .12), transparent 40%, rgba(255, 228, 94, .12)),
    var(--panel-strong);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 32px));
  transition: transform .28s ease;
  backdrop-filter: blur(calc(18px * var(--live-blur))) saturate(160%);
}

.keypad-panel.open {
  transform: translateX(0);
}

.keypad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.keypad-head span,
.keypad-display span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  text-transform: lowercase;
}

.keypad-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: .95;
  text-transform: lowercase;
}

.keypad-display {
  display: grid;
  gap: 7px;
}

.keypad-display input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(0,0,0,.18);
  outline: 0;
}

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

.key-grid button,
.code-chips button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--soft);
  text-transform: lowercase;
}

.key-grid button:hover,
.code-chips button:hover {
  color: #080a12;
  background: var(--yellow);
  border-color: transparent;
}

.code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.code-chips button {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0 10px;
}

.preview-modal {
  place-items: center;
}

.preview-modal figure {
  position: relative;
  width: min(1040px, 100%);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-modal img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #000;
}

.preview-modal figcaption {
  min-height: 48px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-transform: lowercase;
}

.preview-modal .icon-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,.56);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  z-index: 130;
  min-width: 220px;
  max-width: calc(100% - 32px);
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel-strong);
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 22px);
  transition: opacity .22s ease, transform .22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.mobile-device {
  min-height: var(--app-height);
  overscroll-behavior-x: none;
}

body.mobile-device main {
  width: min(calc(var(--app-width) - 20px), 1340px);
  padding-bottom: calc(126px + env(safe-area-inset-bottom, 0px));
}

body.mobile-device .top-shell {
  width: min(calc(var(--app-width) - 20px), 1340px);
  padding-top: max(8px, env(safe-area-inset-top, 0px));
}

body.mobile-device .hero {
  min-height: max(680px, calc(var(--app-height) - 32px));
}

body.mobile-device h1 {
  font-size: clamp(3.8rem, 22vw, 6.4rem);
  max-width: 100%;
}

body.mobile-device .spotlight,
body.mobile-device .queue-panel,
body.mobile-device .radar-screen {
  min-height: min(620px, calc(var(--app-height) * .72));
}

body.mobile-device .project-card {
  transform: none;
}

body.mobile-device .project-card:hover {
  transform: translateY(-3px);
}

body.mobile-device .drawer,
body.mobile-device .command-palette,
body.mobile-device .preview-modal {
  min-height: var(--app-height);
}

body.mobile-device .live-panel,
body.mobile-device .keypad-panel {
  top: max(12px, env(safe-area-inset-top, 0px));
  right: 10px;
  left: 10px;
  width: auto;
  max-height: calc(var(--app-height) - 24px - env(safe-area-inset-bottom, 0px));
}

body.mobile-device .live-panel {
  transform: translateY(calc(-100% - 28px));
}

body.mobile-device .live-panel.open {
  transform: translateY(0);
}

body.mobile-device .keypad-panel {
  transform: translateY(calc(-100% - 28px));
}

body.mobile-device .keypad-panel.open {
  transform: translateY(0);
}

body.mobile-device .mini-player {
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
}

body.mobile-device .ticker {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: start;
  }

  .hero,
  .section-head,
  .atlas-console,
  .station-grid,
  .flight-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "copy"
      "spotlight"
      "modules";
  }

  .hero-copy,
  .spotlight {
    min-height: auto;
  }

  .module-strip,
  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(4) {
    grid-column: span 6;
  }

  .contact-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 780px) {
  .top-shell {
    position: relative;
    top: auto;
    left: auto;
    width: min(100% - 20px, 1340px);
    margin: 10px auto 0;
    transform: none;
  }

  .brand {
    min-width: 0;
  }

  .brand-text small {
    display: none;
  }

  main {
    width: min(100% - 20px, 1340px);
    padding-top: 18px;
  }

  .project-grid,
  .project-list-mode .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(4),
  .project-list-mode .project-card,
  .project-list-mode .project-card:nth-child(1),
  .project-list-mode .project-card:nth-child(4) {
    grid-column: 1;
    grid-template-columns: 1fr;
    grid-template-rows: 245px 1fr;
    min-height: auto;
  }

  .module-strip,
  .lab-grid,
  .instrument-panel,
  .drawer-stats {
    grid-template-columns: 1fr;
  }

  .console-selects {
    justify-content: start;
  }

  .radar-screen {
    min-height: 460px;
  }

  .mini-player {
    right: 10px;
    left: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .side-dock {
    display: none;
  }
}

@media (max-width: 520px) {
  .top-actions .icon-button,
  .icon-button,
  .mini-button {
    width: 40px;
    height: 40px;
  }

  .main-nav button span {
    display: none;
  }

  .hero-actions,
  .transport-row,
  .filter-row,
  .queue-tools {
    align-items: stretch;
  }

  .primary-button,
  .soft-button,
  .control-button,
  .queue-tools button,
  .filter-row button {
    flex: 1 1 auto;
  }

  .contact-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .contact-card > svg,
  .contact-card > i {
    display: none;
  }

  .drawer {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
