:root {
  --accent: #e50922;
  --accent-2: #ff3b45;
  --ink: #07070a;
  --panel: rgba(12, 12, 16, 0.74);
  --panel-strong: rgba(18, 18, 23, 0.9);
  --stroke: rgba(255, 255, 255, 0.16);
  --text: #f7f7fb;
  --muted: #b9b9c6;
  --glass-blur: 24px;
}

* {
  box-sizing: border-box;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.title-accent {
  color: var(--accent-2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #030305;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.locked .desktop {
  filter: blur(10px) brightness(0.45);
  pointer-events: none;
  user-select: none;
}

body:not(.locked) {
  background:
    radial-gradient(circle at 62% 15%, rgba(229, 9, 34, 0.08), transparent 30%),
    linear-gradient(180deg, #050913 0%, #03050a 50%, #030305 100%);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 3, 5, 0.62);
  backdrop-filter: blur(18px);
}

body:not(.locked) .auth-gate {
  display: none;
}

.auth-panel {
  display: grid;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid rgba(255, 59, 69, 0.38);
  border-radius: 8px;
  background: rgba(8, 8, 12, 0.88);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62), 0 0 42px rgba(229, 9, 34, 0.18);
}

.auth-panel h1 {
  margin-bottom: 0;
  font-size: 52px;
}

.auth-panel p {
  color: #dbdbe4;
  line-height: 1.45;
}

.auth-logo {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  box-shadow: 0 0 32px rgba(229, 9, 34, 0.44);
}

.welcome-burst {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  gap: 18px;
  background:
    radial-gradient(circle at center, rgba(229, 9, 34, 0.32), transparent 34%),
    rgba(3, 3, 5, 0.84);
  color: #fff;
  text-align: center;
}

.welcome-burst img {
  width: 128px;
  height: 128px;
  border-radius: 32px;
  box-shadow: 0 0 70px rgba(229, 9, 34, 0.72);
}

.welcome-burst strong {
  display: block;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.95;
  text-shadow: 0 0 28px rgba(229, 9, 34, 0.75);
}

.auth-gate.unlocking .auth-panel {
  animation: authPanelExit 420ms ease forwards;
}

.auth-gate.unlocking .welcome-burst {
  display: grid;
  animation: welcomeIgnition 1450ms ease forwards;
}

@keyframes authPanelExit {
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
}

@keyframes welcomeIgnition {
  0% {
    opacity: 0;
    transform: scale(0.92);
    clip-path: circle(0% at 50% 50%);
  }
  22% {
    opacity: 1;
    clip-path: circle(38% at 50% 50%);
  }
  70% {
    opacity: 1;
    transform: scale(1);
    clip-path: circle(82% at 50% 50%);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
    clip-path: circle(115% at 50% 50%);
  }
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

input,
textarea {
  color: var(--text);
}

#wallpaper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 30% 30%, #520811, transparent 32%), #030305;
}

.desktop {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 18px;
  background: rgba(6, 6, 9, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--glass-blur));
}

.brand {
  font-weight: 800;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(229, 9, 34, 0.62);
}

.menu-button,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.menu-button:hover,
.status-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.menu-groups {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
}

.status-pill {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.06);
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  padding-top: 42px;
}

.side-rail {
  position: fixed;
  top: 42px;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-rows: repeat(8, 48px) 1fr;
  justify-items: center;
  gap: 8px;
  width: 64px;
  padding: 28px 8px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 4, 7, 0.58);
  backdrop-filter: blur(var(--glass-blur));
}

.rail-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d9d9e2;
  font-weight: 800;
}

.rail-button .ui-icon {
  width: 21px;
  height: 21px;
}

.rail-button:hover,
.rail-button.active {
  border-color: rgba(255, 59, 69, 0.4);
  background: linear-gradient(145deg, rgba(229, 9, 34, 0.86), rgba(95, 7, 18, 0.72));
  box-shadow: 0 16px 34px rgba(229, 9, 34, 0.22);
}

.rail-network {
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #f6f6fb;
  font-size: 11px;
}

.rail-network img {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  box-shadow: 0 0 20px rgba(229, 9, 34, 0.5);
}

.rail-network span {
  color: #39d275;
}

.dashboard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 16px;
  height: calc(100vh - 42px);
  padding: 28px 20px 20px 84px;
  overflow: hidden;
}

.dashboard-main {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) minmax(170px, 0.44fr);
  gap: 16px;
  min-width: 0;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(260px, 0.9fr) minmax(220px, 0.56fr);
  align-items: center;
  gap: 18px;
  min-height: 320px;
  padding: 36px;
  overflow: hidden;
  border: 1px solid rgba(229, 9, 34, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 63% 38%, rgba(229, 9, 34, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(46, 4, 13, 0.68), rgba(8, 8, 12, 0.72) 44%, rgba(18, 18, 23, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-panel::before {
  inset: 0;
  background-image:
    linear-gradient(115deg, transparent 0 44%, rgba(255, 59, 69, 0.14) 45%, transparent 46% 100%),
    linear-gradient(65deg, transparent 0 52%, rgba(255, 59, 69, 0.1) 53%, transparent 54% 100%);
  opacity: 0.44;
}

.hero-panel::after {
  top: 48px;
  right: 24%;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 59, 69, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px rgba(255, 59, 69, 0.05),
    0 0 0 92px rgba(255, 59, 69, 0.032),
    0 0 0 138px rgba(255, 59, 69, 0.02);
}

.hero-copy,
.signal-core,
.system-overview {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin-bottom: 20px;
  font-size: clamp(56px, 7vw, 92px);
}

.hero-copy h1 span {
  color: var(--accent-2);
  text-shadow: 0 0 34px rgba(229, 9, 34, 0.48);
}

.hero-text {
  max-width: 56ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.signal-core {
  display: grid;
  place-items: center;
  min-height: 260px;
}

.signal-core img {
  position: relative;
  z-index: 2;
  width: min(190px, 58%);
  aspect-ratio: 1;
  border-radius: 34px;
  filter: drop-shadow(0 0 38px rgba(229, 9, 34, 0.58));
}

.signal-ring {
  position: absolute;
  width: 68%;
  max-width: 340px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 59, 69, 0.22);
  border-radius: 50%;
}

.signal-ring.one {
  width: 38%;
  background: radial-gradient(circle, rgba(229, 9, 34, 0.18), transparent 62%);
}

.signal-ring.two {
  width: 55%;
  border-style: dashed;
}

.signal-ring.three {
  width: 80%;
  opacity: 0.58;
}

.system-overview,
.dash-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(13, 13, 18, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(var(--glass-blur));
}

.system-overview {
  align-self: center;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.system-overview dd {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.system-status {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.system-status span,
.activity-list span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39d275;
  box-shadow: 0 0 14px rgba(57, 210, 117, 0.6);
}

.system-status strong {
  color: #39d275;
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 16px;
  min-height: 0;
}

.dash-card {
  padding: 20px;
}

.activity-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
}

.activity-list strong {
  font-size: 13px;
}

.activity-list small {
  grid-column: 2;
}

.activity-list time {
  color: var(--muted);
  font-size: 12px;
}

.performance-card {
  display: grid;
  align-content: space-between;
  gap: 14px;
}

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

.meter-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: min(112px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #141419 0 57%, transparent 58%),
    conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255, 59, 69, 0.12) 0);
  box-shadow: 0 0 32px rgba(229, 9, 34, 0.12);
}

.meter-ring span {
  color: var(--muted);
  font-size: 12px;
}

.meter-ring strong {
  font-size: 22px;
}

.dashboard-side {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.now-playing-card,
.story-drafts-card {
  display: grid;
  gap: 12px;
  width: 100%;
  min-height: 126px;
  text-align: left;
}

.now-playing-card strong {
  font-size: 18px;
  line-height: 1.25;
}

.waveform {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 7px;
  height: 48px;
}

.waveform span {
  display: block;
  min-height: 10px;
  border-radius: 999px;
  background: linear-gradient(#ef1730, rgba(229, 9, 34, 0.16));
}

.waveform span:nth-child(2n) {
  height: 38px;
}

.waveform span:nth-child(2n + 1) {
  height: 24px;
}

.waveform span:nth-child(5) {
  height: 48px;
}

.player-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.player-row b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ef1730, #930918);
  color: #fff;
  box-shadow: 0 18px 42px rgba(229, 9, 34, 0.38);
}

.story-drafts-card strong {
  color: #fff;
  font-size: 54px;
  line-height: 0.88;
}

.story-drafts-card span {
  color: var(--muted);
}

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

.quick-grid button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.quick-grid .ui-icon {
  grid-row: span 2;
  align-self: center;
  color: var(--accent-2);
}

.quick-grid button:hover {
  border-color: rgba(255, 59, 69, 0.38);
  background: rgba(229, 9, 34, 0.12);
}

.quick-grid span {
  color: var(--muted);
  font-size: 11px;
}

.rebel-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 90px;
  overflow: hidden;
  border-color: rgba(229, 9, 34, 0.42);
}

.rebel-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -40px auto;
  width: 170px;
  height: 120px;
  background:
    radial-gradient(circle, rgba(255, 59, 69, 0.58) 1px, transparent 2px) 0 0 / 14px 14px,
    linear-gradient(135deg, transparent, rgba(229, 9, 34, 0.24));
  opacity: 0.5;
}

.rebel-card img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.rebel-card div {
  display: grid;
  gap: 3px;
}

.rebel-card strong {
  color: var(--accent-2);
  font-size: 20px;
}

.rebel-card span {
  color: var(--muted);
  font-size: 12px;
}

.window {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 20;
  display: none;
  width: min(760px, calc(100vw - 32px));
  min-height: 360px;
  min-width: 320px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 44px);
  resize: both;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(229, 9, 34, 0.08);
  backdrop-filter: blur(var(--glass-blur));
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 25;
  width: 30px;
  height: 30px;
  cursor: nwse-resize;
  touch-action: none;
}

.resize-handle::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 13px;
  height: 13px;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 4px 4px 0 -2px rgba(229, 9, 34, 0.7);
}

.window.active {
  display: flex;
  flex-direction: column;
}

.window.focused {
  border-color: rgba(255, 59, 69, 0.5);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.58), 0 0 34px rgba(229, 9, 34, 0.18);
}

.window.maximized {
  left: 16px !important;
  top: 50px !important;
  width: calc(100vw - 32px) !important;
  max-height: calc(100vh - 76px);
  height: auto !important;
  resize: none;
}

.window.maximized .window-body {
  max-height: calc(100vh - 126px);
  overflow: auto;
}

.window.compact {
  width: min(430px, calc(100vw - 32px));
  min-height: 275px;
}

.window.wide {
  width: min(1120px, calc(100vw - 32px));
  min-height: 560px;
}

.window-chrome {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 7, 10, 0.44);
  cursor: grab;
  user-select: none;
}

.window-chrome:active {
  cursor: grabbing;
}

.window-chrome > span {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dedee8;
  font-size: 13px;
  font-weight: 650;
}

.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.light {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
}

.light.close {
  background: #ff453a;
}

.light.min {
  background: #ffb020;
}

.light.max {
  background: #30d158;
}

.window-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.welcome-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 26px;
  align-items: center;
  min-height: 320px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.96;
}

h2 {
  margin-bottom: 10px;
  font-size: 28px;
}

.lede {
  max-width: 50ch;
  color: #dbdbe4;
  font-size: 18px;
  line-height: 1.45;
}

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

.primary-action,
.secondary-action,
.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 7px;
  font-weight: 750;
}

.primary-action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--accent), #8d0715);
  box-shadow: 0 12px 28px rgba(229, 9, 34, 0.32);
}

.secondary-action,
.small-action {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.small-action {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.import-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.import-action input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.persistence-note {
  line-height: 1.45;
}

a.small-action {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.danger {
  color: #ffb8be;
}

.system-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.orbital-core {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 48%),
    conic-gradient(from 90deg, #ff3b45, #120105, #e50922, #09090d, #ff3b45);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 0 42px rgba(229, 9, 34, 0.22);
  font-size: 56px;
  font-weight: 900;
}

.logo-core {
  padding: 0;
  object-fit: cover;
  background: #030305;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div,
.domain-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

dt,
small,
.store-list span,
.domain-status span {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 750;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 18px;
}

.app-tile {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 118px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.app-tile:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.app-tile.is-open,
.menu-button.is-open,
.status-pill.is-open,
.rail-button.is-open,
.quick-grid button.is-open,
.now-playing-card.is-open,
.story-drafts-card.is-open {
  border-color: rgba(255, 59, 69, 0.4);
  background: rgba(229, 9, 34, 0.16);
}

.app-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2a2a31, #0a0a0d);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 26px rgba(0, 0, 0, 0.35);
  font-size: 24px;
  font-weight: 900;
}

.app-icon.music,
.app-icon.stories,
.app-icon.codex,
.app-icon.domain,
.app-icon.browser,
.app-icon.vault {
  background: linear-gradient(145deg, #ff3443, #700812);
}

.split-studio,
.writing-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1fr);
  gap: 28px;
}

.studio-form {
  display: grid;
  align-content: start;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input[type="text"],
input[type="file"],
textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(5, 5, 8, 0.58);
  outline: 0;
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.story-field textarea {
  min-height: 240px;
}

audio {
  width: 100%;
  margin-top: 8px;
}

.library-panel {
  min-height: 410px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.library-panel,
.vault-body {
  background:
    radial-gradient(circle at 50% 42%, rgba(229, 9, 34, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.045);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header h2 {
  margin: 0;
  font-size: 20px;
}

.media-list,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  max-height: 438px;
  overflow: auto;
  padding-right: 2px;
}

.media-item,
.character-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.media-item:hover,
.character-card:hover {
  border-color: rgba(255, 59, 69, 0.35);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.media-art,
.character-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(229, 9, 34, 0.6), rgba(0, 0, 0, 0.9));
  color: #fff;
  font-weight: 900;
}

.media-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  font-size: 28px;
}

.media-art img,
.character-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.media-copy h3,
.character-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.media-copy p,
.character-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 13px;
}

.media-copy .item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.character-card {
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 170px;
}

.character-art {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.character-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.character-copy p {
  max-height: 124px;
  overflow: auto;
  padding-right: 4px;
}

.empty-state {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 340px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(229, 9, 34, 0.13), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  color: var(--muted);
  text-align: center;
}

.library-panel .empty-state {
  min-height: 330px;
  border-style: dashed;
  background:
    linear-gradient(180deg, rgba(229, 9, 34, 0.04), rgba(229, 9, 34, 0.02)),
    radial-gradient(circle at 50% 70%, rgba(229, 9, 34, 0.16), transparent 38%);
}

.library-panel .empty-state::after,
.gallery-detail::after,
.vault-body::after {
  content: "";
  position: absolute;
  pointer-events: none;
  right: 0;
  bottom: 0;
  width: 45%;
  height: 36%;
  background:
    radial-gradient(circle, rgba(255, 59, 69, 0.45) 1px, transparent 2px) 0 0 / 13px 13px,
    linear-gradient(135deg, transparent, rgba(229, 9, 34, 0.18));
  opacity: 0.24;
}

.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(229, 9, 34, 0.34);
  border-radius: 50%;
  color: var(--accent-2);
  box-shadow: 0 0 38px rgba(229, 9, 34, 0.16);
}

.empty-state .empty-icon .ui-icon {
  width: 42px;
  height: 42px;
}

.empty-state strong {
  color: var(--text);
  font-size: 19px;
}

.empty-state p {
  max-width: 32ch;
  margin: 0;
}

.compat-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
}

.compat-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
}

.compat-tab {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.compat-tab.active {
  border-color: rgba(255, 59, 69, 0.52);
  background: rgba(229, 9, 34, 0.26);
}

.compat-panel {
  min-height: 260px;
}

.compat-panel p:not(.eyebrow) {
  color: #d5d5df;
  line-height: 1.5;
}

.compat-meter {
  height: 10px;
  margin: 22px 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
}

.compat-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ff7a45);
}

.file-type-grid,
.quick-links,
.history-list,
.vault-grid {
  display: grid;
  gap: 10px;
}

.file-type-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.file-type-grid button,
.quick-links button,
.history-list button {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.file-type-grid span,
.history-list small {
  color: var(--muted);
}

.browser-body,
.vault-body {
  position: relative;
  overflow: hidden;
}

.gallery-body {
  min-height: 520px;
  background:
    radial-gradient(circle at 50% 34%, rgba(229, 9, 34, 0.09), transparent 38%),
    rgba(255, 255, 255, 0.025);
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.56fr) minmax(420px, 1.44fr);
  gap: 16px;
  min-height: 0;
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-filter {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 750;
}

.gallery-filter.active,
.gallery-filter:hover {
  border-color: rgba(255, 59, 69, 0.45);
  background: rgba(229, 9, 34, 0.18);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-height: calc(100vh - 270px);
  overflow: auto;
}

.gallery-card {
  display: grid;
  gap: 10px;
  min-height: 156px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.gallery-card:hover,
.gallery-card.active {
  border-color: rgba(255, 59, 69, 0.45);
  background: rgba(229, 9, 34, 0.13);
}

.gallery-thumb {
  display: grid;
  place-items: center;
  height: 92px;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--accent-2);
  background:
    radial-gradient(circle at center, rgba(229, 9, 34, 0.16), transparent 58%),
    rgba(0, 0, 0, 0.18);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-detail {
  position: relative;
  min-height: 430px;
  max-height: calc(100vh - 270px);
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.gallery-detail img,
.vault-detail img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-detail p,
.vault-detail p,
.gallery-detail li,
.vault-detail li {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.chapter-list,
.playlist-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.chapter-list li,
.playlist-list li {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.story-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin: 0 8px 8px 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 59, 69, 0.24);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(229, 9, 34, 0.1);
  font-size: 12px;
  font-weight: 800;
}
  display: grid;
  gap: 16px;
}

.browser-toolbar,
.vault-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.browser-toolbar input {
  flex: 1;
}

.browser-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(180px, 0.45fr) minmax(240px, 0.65fr);
  gap: 18px;
  min-height: 340px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.browser-history {
  min-width: 0;
}

.history-list {
  max-height: 250px;
  overflow: auto;
}

.vault-toolbar {
  justify-content: space-between;
}

.vault-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 430px;
  overflow: auto;
}

.vault-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 210px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  text-align: left;
}

.vault-card .vault-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vault-card .vault-card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--accent-2);
  background: rgba(229, 9, 34, 0.11);
}

.vault-card .vault-card-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.vault-card:hover {
  border-color: rgba(255, 59, 69, 0.42);
  background: rgba(229, 9, 34, 0.12);
}

.vault-card h3 {
  margin: 0;
}

.vault-card span {
  color: var(--accent-2);
  font-weight: 800;
}

.vault-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #dedee8;
  font-size: 13px;
  line-height: 1.4;
}

.empty-vault {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.empty-vault .ui-icon {
  color: var(--accent-2);
}

.compact-empty {
  min-height: 110px;
}

.vault-browser {
  display: grid;
  grid-template-columns: minmax(230px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 430px;
}

.vault-browser[hidden],
.vault-grid[hidden] {
  display: none;
}

.vault-column,
.vault-detail {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.vault-item-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.vault-item-list button {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  text-align: left;
}

.vault-item-list button:hover {
  border-color: rgba(255, 59, 69, 0.42);
}

.vault-detail {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
}

.vault-preview-art {
  display: grid;
  place-items: center;
  width: min(260px, 100%);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(229, 9, 34, 0.6), rgba(0, 0, 0, 0.9));
  color: #fff;
  font-size: 32px;
  font-weight: 900;
}

.vault-preview-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vault-long-text {
  max-height: 230px;
  overflow: auto;
  white-space: pre-wrap;
}

pre {
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  color: #f6d2d5;
}

.finder-layout {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
}

.finder-layout aside,
.file-list,
.store-list,
.settings-list,
.domain-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.finder-layout aside button,
.file-list button,
.store-list article,
.settings-list label,
.domain-status,
.control-grid button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.finder-layout aside button,
.file-list button,
.control-grid button {
  text-align: left;
}

.terminal-body {
  padding: 0;
}

.terminal-body pre {
  min-height: 235px;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: #f4f4f7;
  background: #070709;
}

.terminal-body span {
  color: var(--accent-2);
}

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

.control-grid button {
  display: grid;
  justify-content: stretch;
  min-height: 72px;
}

.control-grid strong {
  color: var(--accent-2);
}

.domain-panel h2 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.settings-list input[type="range"] {
  accent-color: var(--accent);
}

.settings-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.settings-list input[type="color"] {
  width: 44px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

/* Command Center dashboard refresh */
.menu-bar {
  height: 88px;
  padding: 0 36px;
  gap: 28px;
  background: rgba(5, 8, 16, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(229, 9, 34, 0.09);
}

.brand {
  min-width: 200px;
  height: 56px;
  padding: 0;
  gap: 18px;
  font-size: 24px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.menu-groups {
  gap: 22px;
}

.menu-button {
  height: 40px;
  padding: 0;
  gap: 9px;
  color: #f0f1f7;
  font-size: 17px;
  font-weight: 650;
}

.menu-button .ui-icon {
  width: 22px;
  height: 22px;
  color: #a6adbd;
}

.menu-button:hover {
  color: #fff;
  background: transparent;
}

.status-cluster {
  gap: 18px;
}

.status-pill {
  height: 43px;
  min-width: 76px;
  justify-content: center;
  padding: 0 18px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #f5f5fb;
  font-size: 16px;
}

.battery-pill {
  gap: 12px;
}

.battery-pill i,
.rail-version i,
.dashboard-footer i,
.performance-card small span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16c970;
  box-shadow: 0 0 0 3px rgba(22, 201, 112, 0.14), 0 0 16px rgba(22, 201, 112, 0.7);
}

.notification-pill {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #aeb4c2;
}

.notification-pill b {
  position: absolute;
  top: -8px;
  right: -9px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #fff;
  font-size: 12px;
}

.avatar-pill {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 18px;
}

.stage {
  padding-top: 88px;
}

.side-rail {
  top: 88px;
  width: 242px;
  grid-template-rows: repeat(8, 64px) 1fr auto;
  align-items: start;
  justify-items: stretch;
  gap: 0;
  padding: 40px 16px 18px;
  background: rgba(5, 8, 16, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.rail-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border-radius: 10px;
  color: #e8ebf3;
  font-size: 18px;
  font-weight: 650;
}

.rail-button .ui-icon {
  width: 25px;
  height: 25px;
  color: #b6bdcc;
}

.rail-button:hover,
.rail-button.active {
  background: linear-gradient(135deg, rgba(159, 12, 33, 0.86), rgba(49, 8, 20, 0.92));
  border-color: rgba(255, 59, 69, 0.42);
  box-shadow: 0 16px 36px rgba(229, 9, 34, 0.2);
}

.rail-button.active .ui-icon,
.rail-button:hover .ui-icon {
  color: #fff;
}

.rail-network {
  align-self: end;
  justify-self: stretch;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 14px;
  align-items: center;
  justify-items: start;
  min-height: 94px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.rail-network img {
  grid-row: span 2;
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.rail-network strong {
  font-size: 17px;
}

.rail-network span {
  font-size: 13px;
}

.rail-network::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #aab0be;
  border-bottom: 2px solid #aab0be;
  transform: rotate(45deg);
}

.rail-version {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  color: var(--muted);
  font-size: 14px;
}

.rail-version i {
  width: 12px;
  height: 12px;
  background: var(--accent-2);
  box-shadow: 0 0 16px rgba(255, 59, 69, 0.62);
}

.dashboard {
  grid-template-columns: minmax(0, 1fr) 450px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px 24px;
  height: calc(100vh - 88px);
  padding: 28px 20px 18px 262px;
  background:
    radial-gradient(circle at 68% 0%, rgba(229, 9, 34, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(6, 9, 18, 0.82), rgba(3, 5, 10, 0.88));
}

.dashboard-main {
  grid-template-rows: minmax(430px, 1fr) 335px;
  gap: 22px;
}

.hero-panel {
  grid-template-columns: minmax(430px, 0.9fr) minmax(320px, 1fr) 288px;
  gap: 26px;
  min-height: 430px;
  padding: 40px 44px;
  border-color: rgba(255, 59, 69, 0.24);
  background:
    radial-gradient(circle at 58% 38%, rgba(255, 59, 69, 0.16), transparent 24%),
    linear-gradient(115deg, rgba(46, 5, 16, 0.8), rgba(10, 11, 18, 0.86) 42%, rgba(6, 9, 17, 0.9));
}

.hero-panel::before {
  background-image:
    linear-gradient(100deg, transparent 0 42%, rgba(255, 59, 69, 0.12) 43%, transparent 44% 100%),
    radial-gradient(circle at 55% 42%, rgba(255, 59, 69, 0.45) 1px, transparent 2px);
  background-size: auto, 76px 76px;
}

.hero-panel::after {
  top: 82px;
  right: 30%;
  width: 285px;
  height: 285px;
  box-shadow:
    0 0 0 52px rgba(255, 59, 69, 0.045),
    0 0 0 104px rgba(255, 59, 69, 0.03),
    0 0 0 160px rgba(255, 59, 69, 0.018);
}

.release-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 136px;
  height: 34px;
  margin-bottom: 36px;
  border: 1px solid rgba(255, 59, 69, 0.36);
  border-radius: 999px;
  background: rgba(229, 9, 34, 0.08);
  color: var(--accent-2);
}

.hero-copy h1 {
  margin-bottom: 26px;
  font-size: clamp(72px, 5.8vw, 112px);
  letter-spacing: 0;
}

.hero-copy .lede {
  margin-bottom: 20px;
  font-size: 21px;
  font-weight: 800;
}

.hero-text {
  max-width: 500px;
  font-size: 17px;
}

.hero-actions {
  gap: 16px;
  margin-top: 34px;
  max-width: 380px;
}

.hero-actions .primary-action,
.hero-actions .secondary-action {
  min-width: 168px;
  min-height: 54px;
  font-size: 16px;
}

.signal-core {
  min-height: 360px;
}

.signal-core img {
  width: min(235px, 68%);
  border-radius: 38px;
  box-shadow: 0 26px 82px rgba(0, 0, 0, 0.44);
}

.signal-ring.one {
  width: 44%;
}

.signal-ring.two {
  width: 66%;
}

.signal-ring.three {
  width: 92%;
}

.system-overview,
.dash-card {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(8, 12, 22, 0.76);
}

.system-overview {
  padding: 22px;
}

.system-overview dl {
  display: grid;
  gap: 0;
}

.system-overview dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.system-overview dl div:first-child {
  border-top: 0;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.06fr);
  gap: 28px;
}

.dash-card {
  padding: 28px;
}

.activity-list {
  gap: 0;
}

.activity-list li {
  min-height: 78px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.activity-list span.danger-dot {
  background: var(--accent-2);
  box-shadow: 0 0 14px rgba(255, 59, 69, 0.6);
}

.activity-list strong {
  font-size: 17px;
}

.activity-list small,
.activity-list time {
  font-size: 15px;
}

.activity-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #f4f4f8;
  font-weight: 700;
}

.performance-card {
  gap: 22px;
}

.performance-rings {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  align-items: center;
  gap: 34px;
}

.meter-ring {
  width: min(142px, 100%);
}

.meter-ring::after {
  content: "";
  width: 128px;
  height: 24px;
  margin-top: 16px;
  background: linear-gradient(90deg, transparent 0 6%, rgba(255, 59, 69, 0.42) 7% 9%, transparent 10% 18%, rgba(255, 59, 69, 0.34) 19% 21%, transparent 22% 100%);
  opacity: 0.9;
}

.meter-ring strong {
  font-size: 34px;
}

.performance-card small {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}

.dashboard-side {
  gap: 16px;
}

.now-playing-card {
  position: relative;
  min-height: 252px;
}

.now-playing-card .eyebrow,
.story-drafts-card .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f4f4f9;
}

.now-playing-card .eyebrow .ui-icon,
.story-drafts-card .eyebrow .ui-icon {
  color: var(--accent-2);
}

.now-playing-card strong {
  font-size: 19px;
}

.heart-mark {
  position: absolute;
  top: 28px;
  right: 30px;
  color: #cbd0dc;
  font-size: 28px;
  font-style: normal;
}

.waveform {
  grid-template-columns: repeat(12, 1fr);
  height: 74px;
  gap: 9px;
}

.waveform span {
  min-height: 12px;
}

.waveform span:nth-child(3n) {
  height: 64px;
}

.waveform span:nth-child(3n + 1) {
  height: 42px;
}

.waveform span:nth-child(3n + 2) {
  height: 28px;
}

.player-row b {
  width: 58px;
  height: 58px;
}

.story-drafts-card {
  position: relative;
  min-height: 194px;
  overflow: hidden;
}

.story-drafts-card::after {
  content: "";
  position: absolute;
  right: 40px;
  bottom: 18px;
  width: 110px;
  height: 90px;
  border: 1px solid rgba(255, 59, 69, 0.12);
  border-radius: 12px;
  opacity: 0.6;
}

.story-drafts-card strong {
  font-size: 58px;
}

.story-drafts-card small {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 750;
}

.quick-card {
  min-height: 244px;
}

.quick-grid {
  gap: 10px;
}

.quick-grid button {
  min-height: 74px;
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.1);
}

.quick-grid strong {
  font-size: 17px;
}

.quick-grid span {
  font-size: 14px;
}

.quick-grid .ui-icon {
  width: 28px;
  height: 28px;
}

.rebel-card {
  min-height: 160px;
  padding: 28px;
  background:
    radial-gradient(circle at 78% 42%, rgba(255, 59, 69, 0.42), transparent 28%),
    linear-gradient(135deg, rgba(80, 6, 20, 0.42), rgba(8, 12, 22, 0.82));
}

.rebel-card::after {
  inset: 0 0 0 auto;
  width: 55%;
  height: 100%;
  opacity: 0.85;
}

.rebel-card strong {
  color: var(--accent-2);
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rebel-card span {
  display: block;
  margin: 10px 0 18px;
  font-size: 16px;
}

.dashboard-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.dashboard-footer span:last-child {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-footer strong {
  color: #35d47b;
}

.dashboard-footer .ui-icon {
  width: 17px;
  height: 17px;
}

@media (max-width: 1700px) {
  .menu-bar {
    gap: 18px;
    padding: 0 24px;
  }

  .brand {
    min-width: 185px;
  }

  .menu-groups {
    gap: 14px;
  }

  .status-cluster {
    gap: 10px;
  }

  .side-rail {
    width: 220px;
    padding-inline: 14px;
  }

  .dashboard {
    grid-template-columns: minmax(0, 1fr) 410px;
    padding-left: 238px;
  }

  .dashboard-main {
    grid-template-rows: minmax(350px, 1fr) 270px;
  }

  .hero-panel {
    grid-template-columns: minmax(315px, 1fr) minmax(210px, 0.62fr);
    min-height: 350px;
    padding: 34px;
  }

  .signal-core {
    min-height: 270px;
  }

  .signal-core img {
    width: min(190px, 58%);
  }

  .system-overview {
    position: absolute;
    right: 28px;
    bottom: 24px;
    width: 280px;
    padding: 18px;
  }

  .system-overview dl div {
    min-height: 45px;
  }

  .release-pill {
    height: 30px;
    margin-bottom: 12px;
  }

  .hero-copy h1 {
    margin-bottom: 12px;
    font-size: 58px;
  }

  .hero-copy .lede {
    margin-bottom: 8px;
    font-size: 17px;
  }

  .hero-text {
    max-width: 390px;
    font-size: 16px;
    line-height: 1.35;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 14px;
  }

  .hero-actions .primary-action,
  .hero-actions .secondary-action {
    min-width: 162px;
    min-height: 42px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }

  .dash-card {
    padding: 22px;
  }

  .performance-rings {
    gap: 14px;
  }

  .meter-ring {
    width: 104px;
  }

  .meter-ring strong {
    font-size: 28px;
  }

  .meter-ring::after {
    width: 96px;
    margin-top: 9px;
  }

  .now-playing-card {
    min-height: 188px;
  }

  .story-drafts-card {
    min-height: 142px;
  }

  .story-drafts-card strong {
    font-size: 44px;
  }

  .quick-card {
    min-height: 188px;
  }

  .quick-grid button {
    min-height: 62px;
  }

  .rebel-card {
    min-height: 112px;
  }

  .waveform {
    height: 52px;
  }

  .player-row b {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 1700px) and (max-height: 940px) {
  .dashboard {
    overflow: auto;
  }

  .dashboard-main {
    grid-template-rows: 350px 270px;
  }
}

@media (max-width: 900px) {
  .menu-bar {
    height: auto;
    min-height: 78px;
    flex-wrap: wrap;
    align-content: center;
    gap: 8px 12px;
    padding: 10px 14px;
  }

  .brand {
    min-width: 0;
    flex: 1 0 auto;
    height: 34px;
    gap: 10px;
    font-size: 18px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .menu-groups {
    display: none;
  }

  .status-cluster {
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    order: 2;
  }

  .status-pill {
    min-width: 0;
    height: 32px;
    padding: 0 9px;
    border-radius: 8px;
    font-size: 12px;
  }

  .notification-pill,
  .avatar-pill {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
  }

  .notification-pill b {
    top: -6px;
    right: -5px;
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .stage {
    padding-top: 92px;
  }

  .side-rail {
    position: fixed;
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: 54px;
    gap: 4px;
    width: auto;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(5, 8, 16, 0.94);
    backdrop-filter: blur(18px);
  }

  .rail-button {
    justify-content: center;
    gap: 0;
    height: 42px;
    padding: 0;
    border-radius: 10px;
  }

  .rail-button span,
  .rail-network,
  .rail-version {
    display: none;
  }

  .dashboard {
    grid-template-columns: 1fr;
    height: calc(100vh - 92px);
    padding: 14px 14px 78px;
    overflow: auto;
  }

  .dashboard-main,
  .hero-panel,
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
    padding: 24px;
  }

  .signal-core {
    min-height: 190px;
  }

  .system-overview {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
  }

  .dashboard-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .window,
  .window.compact,
  .window.wide {
    left: 16px !important;
    top: 58px !important;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 84px);
  }

  .window-body {
    max-height: calc(100vh - 126px);
    overflow: auto;
  }

  .welcome-body,
  .split-studio,
  .writing-layout,
  .compat-layout,
  .finder-layout,
  .browser-shell,
  .vault-grid,
  .vault-browser {
    grid-template-columns: 1fr;
  }

  .browser-toolbar,
  .vault-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .app-grid,
  .card-grid,
  .media-list,
  .control-grid,
  .file-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .auth-gate {
    justify-items: start;
    padding: 16px;
    overflow: auto;
  }

  .auth-panel {
    width: min(340px, calc(100vw - 32px));
    max-width: 100%;
    padding: 24px 18px;
    overflow: hidden;
  }

  .auth-panel h1 {
    font-size: 44px;
  }

  .auth-panel p,
  .auth-panel small,
  .auth-panel label,
  .auth-panel input,
  .auth-panel button {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .auth-panel p {
    width: 100%;
    white-space: normal;
  }

  .menu-bar {
    min-height: 104px;
    padding: 8px;
  }

  .brand {
    min-width: 0;
    height: 30px;
    font-size: 16px;
  }

  .status-cluster {
    display: grid;
    grid-template-columns: minmax(70px, 1fr) auto auto auto auto auto;
    width: 100%;
  }

  .status-pill {
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }

  .status-pill:nth-child(2) {
    display: none;
  }

  .notification-pill,
  .avatar-pill {
    width: 30px;
    height: 30px;
  }

  .stage {
    padding-top: 104px;
  }

  .dashboard {
    height: calc(100vh - 104px);
    padding: 10px 10px 74px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-actions .primary-action,
  .hero-actions .secondary-action {
    width: 100%;
  }

  .performance-rings,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .app-grid,
  .card-grid,
  .media-list,
  .control-grid,
  .file-type-grid {
    grid-template-columns: 1fr;
  }

  .character-card {
    grid-template-columns: 1fr;
  }

  .window,
  .window.compact,
  .window.wide {
    left: 8px !important;
    top: 112px !important;
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 128px);
  }

  .window-body {
    padding: 16px;
  }
}
