:root {
  --ink: #151815;
  --ink-soft: #353a34;
  --paper: #eceee7;
  --paper-deep: #d2d6cd;
  --moss: #8dae37;
  --amber: #c7f04b;
  --signal: #f25f4c;
  --blue: #446a78;
  --line: rgba(31, 32, 28, 0.24);
  --window-chrome: #1e231f;
  --feature-panel: #303a2d;
  --receiver-panel: #1d231f;
  --archive-panel: #1d231f;
  --contact-panel: #344b43;
  --wallpaper-overlay:
    linear-gradient(90deg, rgba(7, 10, 8, 0.25), transparent 55%),
    linear-gradient(0deg, rgba(5, 8, 6, 0.42), transparent 40%);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42), 0 3px 12px rgba(0, 0, 0, 0.24);
  --bar-height: 34px;
  font-family: "Manrope", Arial, sans-serif;
  color: var(--ink);
  background: #0d100e;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

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

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  color: var(--paper);
  background:
    linear-gradient(rgba(14, 17, 14, 0.4), rgba(14, 17, 14, 0.92)),
    url("assets/rallypoint-gaming-room.png") center / cover;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.boot-screen::after,
.desktop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.boot-screen.is-complete {
  opacity: 0;
  visibility: hidden;
}

.boot-panel {
  width: min(560px, calc(100vw - 48px));
  position: relative;
  z-index: 1;
}

.boot-mark {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 38px;
  margin-bottom: 34px;
}

.boot-mark span {
  width: 5px;
  height: 14px;
  background: var(--amber);
  animation: boot-wave 1.2s ease-in-out infinite alternate;
}

.boot-mark span:nth-child(2) { height: 28px; animation-delay: -0.4s; }
.boot-mark span:nth-child(3) { height: 19px; animation-delay: -0.8s; }
.boot-mark span:nth-child(4) { height: 38px; animation-delay: -0.2s; }
.boot-mark span:nth-child(5) { height: 24px; animation-delay: -0.65s; }

@keyframes boot-wave {
  to { height: 8px; opacity: 0.5; }
}

.eyebrow {
  margin: 0 0 12px;
  font: 500 11px/1.4 "DM Mono", monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.boot-panel h1 {
  margin: 0 0 64px;
  font-size: clamp(56px, 9vw, 100px);
  line-height: 0.82;
  letter-spacing: 0;
}

.boot-readout {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font: 500 10px/1 "DM Mono", monospace;
}

.boot-track {
  height: 2px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.2);
}

.boot-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--amber);
  transition: width 120ms linear;
}

.enter-button {
  display: inline-flex;
  align-items: center;
  gap: 42px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--paper);
  background: rgba(14, 17, 14, 0.5);
  font: 500 11px/1 "DM Mono", monospace;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.enter-button:disabled {
  opacity: 0;
  pointer-events: none;
}

.enter-button:not(:disabled):hover {
  color: var(--ink);
  background: var(--paper);
}

.enter-button svg {
  width: 16px;
}

.boot-coordinates {
  position: absolute;
  right: 28px;
  bottom: 20px;
  margin: 0;
  font: 400 9px/1 "DM Mono", monospace;
  opacity: 0.7;
}

.desktop {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #101310 url("assets/rallypoint-gaming-room.png") center / cover no-repeat;
}

.wallpaper-shade {
  position: absolute;
  inset: 0;
  background: var(--wallpaper-overlay);
  transition: background 220ms ease;
}

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

.wallpaper-shade::before {
  inset: 34px 0 0;
  opacity: 0.12;
  background:
    repeating-linear-gradient(90deg, rgba(218, 241, 229, 0.16) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(218, 241, 229, 0.11) 0 1px, transparent 1px 80px);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 78%, transparent);
}

.wallpaper-shade::after {
  inset: 49px 14px 82px;
  border: 1px solid rgba(222, 239, 227, 0.09);
  border-top-color: rgba(199, 240, 75, 0.22);
}

.menu-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--bar-height);
  padding: 0 12px;
  color: #eee8d9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 20, 17, 0.78);
  backdrop-filter: blur(16px);
  font: 500 10px/1 "DM Mono", monospace;
}

.menu-bar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 12px;
  width: 74px;
  height: 1px;
  background: var(--amber);
  box-shadow: 82px 0 rgba(242, 95, 76, 0.8);
}

.brand-button,
.status-button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 0;
}

.brand-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(185, 65, 49, 0.14);
}

.station-code {
  opacity: 0.45;
}

.menu-center {
  opacity: 0.6;
}

.status-cluster {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 15px;
}

.status-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  text-decoration: none;
}

.status-button svg {
  width: 14px;
}

.signal-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.signal-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8ca379;
  box-shadow: 0 0 8px #8ca379;
}

.desktop-icons {
  position: absolute;
  z-index: 5;
  top: 64px;
  left: 18px;
  display: grid;
  gap: 17px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.desktop.icons-hidden .desktop-icons {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

.desktop-icon {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 74px;
  padding: 0;
  border: 0;
  color: #f4f0e6;
  background: transparent;
  font: 500 10px/1.2 "DM Mono", monospace;
  text-shadow: 0 1px 3px #000;
  cursor: pointer;
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  transition: transform 160ms ease;
}

.desktop-icon:hover .icon-tile {
  transform: translateY(-3px);
}

.icon-tile svg { width: 20px; }
.icon-tile.ochre { color: var(--ink); background: #b8dc45; }
.icon-tile.red { background: #c94e42; }
.icon-tile.paper { color: var(--ink); background: #d9ddd4; }
.icon-tile.green { background: #536848; }
.icon-tile.ink { background: #202522; }
.icon-tile.blue { background: #416779; }

.app-window {
  --x: 27vw;
  --y: 14vh;
  position: absolute;
  z-index: 10;
  top: var(--y);
  left: var(--x);
  display: none;
  width: min(760px, calc(100vw - 160px));
  min-width: 360px;
  max-height: calc(100dvh - 104px);
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(214, 231, 219, 0.42);
  border-top-color: rgba(231, 244, 234, 0.68);
  background: var(--paper);
  box-shadow: var(--shadow);
  animation: window-in 180ms ease-out;
}

.app-window.is-open {
  display: block;
}

.app-window.is-focused {
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(233, 227, 211, 0.4);
}

@keyframes window-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
}

.window-large {
  width: min(900px, calc(100vw - 210px));
}

.window-bar {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  height: 31px;
  padding: 0 10px;
  color: #eae4d7;
  background:
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(255, 255, 255, 0.025) 31px 32px),
    var(--window-chrome);
  box-shadow: inset 0 -1px rgba(199, 240, 75, 0.18);
  font: 500 9px/1 "DM Mono", monospace;
  text-align: center;
  cursor: grab;
  user-select: none;
}

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

.window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.window-controls button,
.window-controls span {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #72736c;
  cursor: pointer;
}

.window-controls .window-close { background: #bf5745; }
.window-controls .window-minimize { background: #d19a4a; }
.window-grip { justify-self: end; opacity: 0.36; }

.window-content {
  overflow: auto;
  max-height: calc(100dvh - 170px);
}

.window-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 13px;
  border-top: 1px solid var(--line);
  font: 400 8px/1 "DM Mono", monospace;
  color: #67685f;
}

.welcome-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  min-height: 470px;
}

.welcome-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 52px 48px 42px;
  border-right: 1px solid var(--line);
}

.welcome-copy h2,
.logbook h2,
.workbench h2,
.contact h2 {
  margin: 0;
  font-size: clamp(38px, 4vw, 60px);
  line-height: 0.98;
  letter-spacing: 0;
}

.welcome-copy h2 em {
  color: var(--signal);
  font-family: Georgia, serif;
  font-weight: 400;
}

.lead {
  max-width: 500px;
  margin: 25px 0 0;
  color: #505148;
  font-size: 14px;
  line-height: 1.7;
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 38px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 43px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  font: 500 10px/1 "DM Mono", monospace;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.primary-action:hover {
  color: var(--ink);
  background: transparent;
}

.primary-action svg { width: 14px; }

.text-action {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font: 500 10px/1 "DM Mono", monospace;
  cursor: pointer;
}

.on-air-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  color: var(--paper);
  background: var(--feature-panel);
}

.on-air-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 9px/1 "DM Mono", monospace;
}

.on-air-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e05743;
  box-shadow: 0 0 8px rgba(224, 87, 67, 0.8);
  animation: blink 1.5s step-end infinite;
}

@keyframes blink { 50% { opacity: 0.3; } }

.waveform {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 102px;
  margin: 54px 0 48px;
}

.waveform span {
  flex: 1;
  height: 30%;
  background: #b2a987;
  animation: level 1.25s ease-in-out infinite alternate;
}

.waveform span:nth-child(3n) { height: 85%; animation-delay: -0.2s; }
.waveform span:nth-child(4n) { height: 55%; animation-delay: -0.7s; }
.waveform span:nth-child(5n) { height: 100%; animation-delay: -1s; }

@keyframes level { to { transform: scaleY(0.35); } }

.now-playing {
  display: grid;
  gap: 9px;
  margin-top: auto;
}

.now-playing span,
.now-playing small {
  font: 400 8px/1.3 "DM Mono", monospace;
  opacity: 0.72;
}

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

.round-play {
  position: absolute;
  right: 25px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.round-play svg { width: 15px; }

.news-window {
  width: min(880px, calc(100vw - 420px));
  min-width: 680px;
}

.news-layout {
  min-height: 520px;
  padding: 20px;
  background:
    linear-gradient(rgba(42, 45, 40, 0.045) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--paper);
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.news-header .eyebrow { margin: 0; color: #65685f; font-size: 8px; }

.news-masthead {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-masthead > div { display: grid; gap: 3px; }
.news-masthead strong { font-size: 14px; }
.news-masthead small { color: #686b62; font: 500 7px/1 "DM Mono", monospace; }
.news-signal {
  width: 5px;
  height: 31px;
  background: var(--amber);
  box-shadow: 7px 0 var(--signal), 14px 0 var(--blue);
}

.news-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.news-filters button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  color: #65685f;
  background: transparent;
  font: 500 8px/1 "DM Mono", monospace;
  cursor: pointer;
}

.news-filters button:hover { color: var(--ink); border-color: var(--line); }
.news-filters button.is-active { color: var(--paper); border-color: var(--ink); background: var(--ink); }

.news-feature {
  display: grid;
  grid-template-columns: minmax(245px, 0.95fr) minmax(0, 1.15fr);
  min-height: 226px;
  border: 1px solid var(--line);
  background: rgba(245, 246, 240, 0.7);
}

.news-feature-image {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 226px;
  padding: 15px;
  overflow: hidden;
  color: #f4f5ef;
  background:
    linear-gradient(135deg, rgba(8, 13, 10, 0.08), rgba(8, 13, 10, 0.78)),
    url("assets/rallypoint-gaming-room.png") center / cover;
}

.news-feature-image::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.news-feature-image span,
.news-feature-image small {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 5px 7px;
  background: rgba(15, 21, 17, 0.78);
  font: 500 8px/1 "DM Mono", monospace;
}

.news-feature-image small { color: #d7ddd6; font-size: 7px; }

.news-feature-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 25px 21px;
}

.news-feature-copy .eyebrow { margin-bottom: 10px; color: #676a61; font-size: 8px; }
.news-feature-copy h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.02;
}
.news-feature-copy h2 em {
  display: block;
  margin-top: 3px;
  color: var(--signal);
  font-family: Georgia, serif;
  font-weight: 400;
}
.news-feature-copy > p:not(.eyebrow) {
  margin: 13px 0 0;
  color: #55584f;
  font-size: 11px;
  line-height: 1.55;
}
.news-feature-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 17px;
}
.news-feature-actions .primary-action { min-height: 36px; }

.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 12px;
  margin-top: 12px;
}

.news-stories {
  display: grid;
  border: 1px solid var(--line);
}

.news-story {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 246, 240, 0.62);
  transition: background 140ms ease;
}

.news-story:last-child { border-bottom: 0; }
.news-story:hover { background: #f5f6ef; }
.news-story.is-hidden { display: none; }
.news-story > svg { width: 14px; color: #767970; }
.news-story-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #162016;
  background: var(--amber);
}
.news-story-icon.coral { color: #fff; background: var(--signal); }
.news-story-icon.blue { color: #fff; background: var(--blue); }
.news-story-icon svg { width: 16px; }
.news-story div { min-width: 0; }
.news-story small { color: #73766c; font: 500 7px/1 "DM Mono", monospace; }
.news-story h3 { margin: 5px 0 3px; font-size: 11px; line-height: 1.25; }
.news-story p { margin: 0; color: #686b62; font-size: 9px; line-height: 1.4; }

.news-live-desk {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 244px;
  padding: 16px;
  overflow: hidden;
  color: var(--paper);
  background:
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 255, 255, 0.025) 38px 39px),
    var(--feature-panel);
  transition: opacity 140ms ease;
}

.news-live-desk.is-muted { opacity: 0.42; }
.news-live-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 7px/1 "DM Mono", monospace;
}
.news-live-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 9px var(--signal);
  animation: blink 1.5s step-end infinite;
}
.news-live-mark { width: 34px; height: 34px; margin: 25px 0 20px; color: var(--amber); }
.news-live-desk > div:not(.news-live-label) { display: grid; gap: 6px; }
.news-live-desk small,
.news-live-desk span { color: #adb5aa; font: 500 7px/1 "DM Mono", monospace; }
.news-live-desk strong { font-size: 15px; line-height: 1.3; }
.news-live-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  color: inherit;
  background: transparent;
  font: 500 8px/1 "DM Mono", monospace;
  cursor: pointer;
}
.news-live-button svg { width: 12px; }
.news-live-desk .round-play { right: 15px; bottom: 14px; width: 34px; height: 34px; }

.tuner-window {
  --x: 29vw;
  --y: 18vh;
  width: min(640px, calc(100vw - 180px));
}

.receiver {
  padding: 33px;
  color: #e2dccb;
  background: var(--receiver-panel);
}

.receiver-head,
.receiver-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 500 9px/1 "DM Mono", monospace;
}

.receiver-led {
  color: #aabf8e;
}

.frequency-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 12px;
}

.frequency-display strong {
  color: #c7f04b;
  font: 400 clamp(72px, 10vw, 116px)/1 "DM Mono", monospace;
  text-shadow: 0 0 22px rgba(199, 240, 75, 0.18);
}

.frequency-display span {
  font: 500 12px/1 "DM Mono", monospace;
  opacity: 0.55;
}

.tuner-scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 23px 0 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  background: repeating-linear-gradient(90deg, transparent 0 19px, rgba(255, 255, 255, 0.22) 19px 20px) top / auto 11px no-repeat;
  font: 400 8px/1 "DM Mono", monospace;
  opacity: 0.75;
}

.tuner-scale i {
  position: absolute;
  top: -5px;
  left: 25.8%;
  width: 2px;
  height: 24px;
  background: var(--signal);
  box-shadow: 0 0 7px rgba(185, 65, 49, 0.9);
}

input[type="range"] {
  width: 100%;
  height: 2px;
  margin: 20px 0 29px;
  accent-color: var(--amber);
  cursor: pointer;
}

.receiver-controls {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.receiver-power {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.receiver-power svg { width: 17px; }
.receiver-power.is-on svg { color: #c86951; filter: drop-shadow(0 0 4px #c86951); }

.meter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meter {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 20px;
}

.meter i {
  width: 4px;
  height: 30%;
  background: #909583;
}

.meter i:nth-child(2) { height: 45%; }
.meter i:nth-child(3) { height: 60%; }
.meter i:nth-child(4) { height: 75%; }
.meter i:nth-child(5) { height: 90%; background: #b7914f; }
.meter i:nth-child(6) { height: 100%; background: #ad5748; opacity: 0.35; }

.frequency-note {
  margin: 24px 0 0;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #b8b5aa;
  font: 400 10px/1.5 "DM Mono", monospace;
}

.log-window {
  --x: 23vw;
  --y: 11vh;
  width: min(780px, calc(100vw - 170px));
}

.logbook {
  padding: 40px 42px 26px;
  background:
    linear-gradient(rgba(55, 54, 47, 0.07) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--paper);
}

.logbook-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 35px;
}

.logbook h2,
.workbench h2,
.contact h2 {
  font-size: clamp(32px, 4vw, 48px);
}

.log-filters {
  display: flex;
  gap: 3px;
}

.log-filters button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  font: 500 9px/1 "DM Mono", monospace;
  cursor: pointer;
}

.log-filters button.is-active {
  color: var(--paper);
  background: var(--ink);
}

.log-entries {
  border-top: 1px solid var(--ink);
}

.log-entries article {
  display: grid;
  grid-template-columns: 60px 1fr 22px;
  gap: 20px;
  align-items: start;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}

.log-entries article.is-hidden { display: none; }
.log-entries time { font: 500 10px/1.4 "DM Mono", monospace; }
.log-entries article > div { display: grid; gap: 5px; }
.log-entries span { font: 400 8px/1 "DM Mono", monospace; color: #77756b; }
.log-entries h3 { margin: 0; font-size: 16px; }
.log-entries p { margin: 0; color: #66665e; font-size: 11px; line-height: 1.5; }
.log-entries svg { width: 15px; }

.archive-window {
  --x: 27vw;
  --y: 10vh;
  width: min(720px, calc(100vw - 160px));
}

.archive {
  color: #e3e7de;
  background: var(--archive-panel);
}

.archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 27px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.archive-toolbar h2 {
  margin: 0;
  font-size: 28px;
}

.archive-toolbar button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.archive-toolbar svg { width: 15px; }

.tape-list {
  max-height: 345px;
  overflow: auto;
}

.tape {
  display: grid;
  grid-template-columns: 30px 80px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 27px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tape:hover,
.tape.is-active {
  background: rgba(213, 139, 59, 0.11);
}

.tape > span,
.tape small {
  font: 400 9px/1 "DM Mono", monospace;
  opacity: 0.55;
}

.tape > i {
  height: 20px;
  opacity: 0.45;
  background: repeating-linear-gradient(90deg, #a69f8b 0 2px, transparent 2px 5px);
}

.tape strong {
  font-size: 13px;
}

.archive-player {
  display: grid;
  grid-template-columns: 38px 1fr 140px 42px;
  align-items: center;
  gap: 13px;
  padding: 17px 22px;
  color: var(--ink);
  background: #cfc7b5;
}

.archive-player > button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.archive-player svg { width: 14px; }
.archive-player > div:nth-child(2) { display: grid; gap: 4px; }
.archive-player span { font: 400 7px/1 "DM Mono", monospace; }
.archive-player strong { font-size: 11px; }
.archive-player time { font: 400 9px/1 "DM Mono", monospace; }
.mini-progress { height: 2px; background: rgba(27, 29, 26, 0.25); }
.mini-progress i { display: block; width: 18%; height: 100%; background: var(--signal); }

.studio-window {
  --x: 20vw;
  --y: 15vh;
  width: min(830px, calc(100vw - 160px));
}

.workbench {
  padding: 39px;
}

.workbench-title {
  margin-bottom: 30px;
}

.project-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.project-strip article {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.project-strip article:last-child { border-right: 0; }
.project-strip article > span { font: 400 8px/1 "DM Mono", monospace; color: #727269; }
.project-strip h3 { margin: 30px 0 10px; font-size: 19px; }
.project-strip p { margin: 0; color: #606158; font-size: 11px; line-height: 1.55; }
.project-status { display: flex; align-items: center; gap: 7px; margin-top: auto; font: 500 8px/1 "DM Mono", monospace; }
.project-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--moss); }
.project-status.amber i { background: var(--amber); }

.contact-window {
  --x: 24vw;
  --y: 11vh;
  width: min(760px, calc(100vw - 150px));
}

.discord-window {
  --x: calc(100vw - 378px);
  --y: 9vh;
  width: 350px;
  min-width: 350px;
}

.discord-content {
  height: min(500px, calc(100dvh - 151px));
  overflow: hidden;
  background: #202225;
}

.discord-content iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
}

.contact-copy {
  padding: 44px 37px;
  color: #eee7d7;
  background: var(--contact-panel);
}

.contact-copy p:not(.eyebrow) {
  margin: 26px 0;
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.75;
}

.contact-copy a {
  color: inherit;
  font: 500 10px/1 "DM Mono", monospace;
}

.contact form {
  display: grid;
  gap: 15px;
  padding: 35px;
}

.contact label {
  display: grid;
  gap: 6px;
  font: 500 8px/1 "DM Mono", monospace;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 12px/1.4 "Manrope", sans-serif;
  resize: vertical;
}

.contact textarea {
  min-height: 70px;
}

.projects-window {
  --x: 12vw;
  --y: 9vh;
  width: min(930px, calc(100vw - 230px));
}

.projects-content {
  position: relative;
  min-height: 530px;
  padding: 30px;
  background:
    linear-gradient(rgba(42, 45, 40, 0.045) 1px, transparent 1px) 0 0 / 100% 30px,
    var(--paper);
}

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.projects-header .eyebrow { color: #666a61; font-size: 8px; }
.projects-header h2 {
  margin: 0;
  font-size: 36px;
  line-height: 0.98;
}

.projects-counter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.projects-counter strong { color: var(--signal); font: 500 38px/0.8 "DM Mono", monospace; }
.projects-counter span { color: #686b63; font: 500 7px/1.35 "DM Mono", monospace; }

.project-filters {
  display: flex;
  gap: 4px;
  margin: 24px 0 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.project-filters button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  color: #666a61;
  background: transparent;
  font: 500 8px/1 "DM Mono", monospace;
  cursor: pointer;
}
.project-filters button:hover { color: var(--ink); border-color: var(--line); }
.project-filters button.is-active { color: var(--paper); border-color: var(--ink); background: var(--ink); }

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

.project-card {
  display: flex;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(246, 247, 241, 0.78);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(21, 24, 21, 0.7);
  background: #f7f8f3;
}
.project-card.is-featured { border-top: 3px solid var(--amber); }
.project-card-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  color: #d8e1da;
  background:
    repeating-linear-gradient(135deg, transparent 0 16px, rgba(255, 255, 255, 0.025) 16px 17px),
    #27312b center / cover;
}
.project-card-visual.has-image { background-position: center; background-size: cover; }
.project-card-visual > svg { width: 34px; }
.project-card-visual small {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 5px 6px;
  color: #151815;
  background: var(--amber);
  font: 500 7px/1 "DM Mono", monospace;
}
.project-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 0;
  color: #74776e;
  font: 500 7px/1 "DM Mono", monospace;
  text-transform: uppercase;
}
.project-card-copy {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}
.project-card-copy strong { font-size: 14px; }
.project-card-copy > span {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  color: #60645b;
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding: 0 12px 13px;
}
.project-card-tags small,
.project-tags span {
  padding: 4px 6px;
  color: #54584f;
  border: 1px solid var(--line);
  font: 500 7px/1 "DM Mono", monospace;
}
.project-empty { margin: 40px 0; color: #686c63; text-align: center; font: 500 9px/1 "DM Mono", monospace; }
.project-empty.is-hidden { display: none; }

.project-detail {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: none;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  overflow: auto;
  background: var(--paper);
}
.project-detail.is-open { display: grid; }
.project-detail-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(16, 20, 17, 0.78);
  font: 500 8px/1 "DM Mono", monospace;
  cursor: pointer;
}
.project-detail-close svg { width: 13px; }
.project-detail-image {
  display: grid;
  place-items: center;
  min-height: 530px;
  color: #dce5de;
  background:
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(255, 255, 255, 0.025) 20px 21px),
    #27312b center / cover no-repeat;
}
.project-detail-image svg { width: 62px; }
.project-detail-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 55px 40px 36px;
}
.project-detail-meta { display: flex; gap: 7px; }
.project-detail-meta span {
  padding: 5px 7px;
  color: #656960;
  border: 1px solid var(--line);
  font: 500 7px/1 "DM Mono", monospace;
  text-transform: uppercase;
}
.project-detail-copy h2 { margin: 26px 0 18px; font-size: 38px; line-height: 1; }
.project-prose {
  width: 100%;
  color: #555a51;
  font-size: 12px;
  line-height: 1.72;
}
.project-prose > :first-child { margin-top: 0; }
.project-prose > :last-child { margin-bottom: 0; }
.project-prose h1,
.project-prose h2,
.project-prose h3 {
  margin: 30px 0 12px;
  color: var(--ink);
  line-height: 1.12;
}
.project-prose h1 { font-size: 24px; }
.project-prose h2 { font-size: 19px; }
.project-prose h3 { font-size: 15px; }
.project-prose p { margin: 0 0 15px; }
.project-prose ul,
.project-prose ol { display: grid; gap: 7px; margin: 0 0 18px; padding-left: 20px; }
.project-prose li::marker { color: var(--signal); }
.project-prose a { color: var(--ink); text-decoration-color: var(--signal); text-underline-offset: 3px; }
.project-prose blockquote {
  margin: 18px 0;
  padding: 3px 0 3px 14px;
  border-left: 3px solid var(--amber);
  color: #696d64;
}
.project-prose code {
  padding: 2px 4px;
  color: #e5f3e8;
  background: #252c27;
  font: 500 10px/1.5 "DM Mono", monospace;
}
.project-prose pre {
  margin: 16px 0 20px;
  padding: 14px;
  overflow-x: auto;
  color: #dce8df;
  border: 1px solid #3c463f;
  background: #202622;
}
.project-prose pre code { padding: 0; background: transparent; }
.project-prose img { display: block; max-width: 100%; height: auto; margin: 18px 0; border: 1px solid var(--line); }
.project-prose table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: 10px; }
.project-prose th,
.project-prose td { padding: 8px; border: 1px solid var(--line); text-align: left; }
.project-prose th { color: var(--ink); background: rgba(31, 36, 32, 0.06); }
.project-prose hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 25px; }
.project-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 30px; }
.project-detail-actions a {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 40px;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
  font: 500 9px/1 "DM Mono", monospace;
}
.project-detail-actions a.project-action-primary { color: #151815; border-color: var(--amber); background: var(--amber); }
.project-detail-actions svg { width: 13px; }

.contact form .primary-action {
  justify-self: start;
  margin-top: 4px;
}

.form-status {
  min-height: 14px;
  margin: 0;
  color: var(--moss);
  font: 500 9px/1.4 "DM Mono", monospace;
}

.dock {
  position: absolute;
  z-index: 101;
  left: 50%;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  padding: 6px;
  border: 1px solid rgba(216, 236, 223, 0.25);
  border-top-color: rgba(232, 247, 237, 0.42);
  background: rgba(17, 23, 20, 0.84);
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.dock:empty { display: none; }

.dock button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  color: #ebe5d5;
  border-bottom: 2px solid var(--dock-color, rgba(255, 255, 255, 0.16));
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.dock button:hover {
  z-index: 2;
  transform: translateY(-5px);
  color: #fff;
  background: color-mix(in srgb, var(--dock-color, #fff) 24%, rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 18px color-mix(in srgb, var(--dock-color, #fff) 28%, transparent);
}

.dock button::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 5px 7px;
  transform: translateX(-50%);
  color: var(--ink);
  background: var(--paper);
  font: 500 8px/1 "DM Mono", monospace;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.dock button:hover::before { opacity: 1; }
.dock button.is-running::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
}

.dock svg { width: 18px; }
.dock > span { width: 1px; height: 28px; margin: 0 2px; background: rgba(255, 255, 255, 0.18); }

.ambient-panel {
  position: absolute;
  z-index: 110;
  right: 17px;
  bottom: 72px;
  display: none;
  width: min(430px, calc(100vw - 34px));
  max-height: calc(100dvh - 120px);
  padding: 14px;
  overflow-y: auto;
  color: var(--paper);
  border: 1px solid rgba(218, 237, 224, 0.28);
  border-top-color: rgba(234, 247, 238, 0.48);
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255, 255, 255, 0.018) 47px 48px),
    rgba(19, 24, 21, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.ambient-panel.is-open { display: block; }
.ambient-header {
  display: grid;
  grid-template-columns: 48px 1fr 30px;
  align-items: center;
  gap: 12px;
}
.album-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #111;
  background: var(--track-color, var(--signal));
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 180ms ease;
}
.album-mark svg { width: 21px; }
.ambient-copy { display: grid; gap: 4px; }
.ambient-copy span,
.ambient-copy small { color: #98a29a; font: 500 7px/1 "DM Mono", monospace; }
.ambient-copy strong { font-size: 13px; }
.ambient-panel button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.ambient-panel button:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); }
.ambient-panel button svg { width: 15px; }
.ambient-panel input { margin: 0; accent-color: var(--track-color, var(--amber)); }

.ambient-progress { margin: 18px 0 10px; }
.ambient-progress input { width: 100%; height: 18px; cursor: pointer; }
.ambient-progress > div {
  display: flex;
  justify-content: space-between;
  color: #89928b;
  font: 500 7px/1 "DM Mono", monospace;
}

.ambient-transport {
  display: grid;
  grid-template-columns: 34px 42px 34px 1fr;
  align-items: center;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ambient-transport .ambient-play {
  width: 40px;
  height: 40px;
  color: #111;
  border-color: var(--track-color, var(--amber));
  border-radius: 50%;
  background: var(--track-color, var(--amber));
}
.ambient-transport .ambient-play:hover { color: #111; background: var(--track-color, var(--amber)); filter: brightness(1.08); }
.ambient-volume {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
}
.ambient-volume svg { width: 14px; color: #929b93; }
.ambient-volume input { width: 100%; min-width: 0; }

.ambient-playlist { display: grid; margin-top: 8px; }
.ambient-panel .ambient-track {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: auto;
  min-height: 48px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}
.ambient-panel .ambient-track:last-child { border-bottom: 0; }
.ambient-panel .ambient-track:hover { border-color: rgba(255, 255, 255, 0.08); }
.ambient-panel .ambient-track.is-active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 2px 0 var(--track-color, var(--amber));
}
.ambient-track > span:first-child,
.ambient-track time { color: #7f8881; font: 500 8px/1 "DM Mono", monospace; }
.ambient-track > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.ambient-track strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ambient-track small { color: #89928b; font: 500 7px/1 "DM Mono", monospace; }
.ambient-panel > footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px -14px -14px;
  padding: 9px 14px;
  color: #7f8981;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.16);
  font: 500 7px/1.2 "DM Mono", monospace;
}
.ambient-panel > footer svg { width: 12px; color: var(--amber); }

.desktop-note {
  position: absolute;
  z-index: 3;
  right: 30px;
  top: 60px;
  width: 145px;
  padding: 15px 15px 12px;
  transform: rotate(2.5deg);
  color: #37352f;
  background: #dbe685;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}

.desktop-note span,
.desktop-note small {
  font: 500 7px/1 "DM Mono", monospace;
}

.desktop-note strong {
  display: block;
  margin: 14px 0 20px;
  font-size: 21px;
  line-height: 0.95;
}

.custom-window-small { width: min(480px, calc(100vw - 150px)); }
.custom-window-medium { width: min(650px, calc(100vw - 170px)); }
.custom-window-large { width: min(820px, calc(100vw - 190px)); }

.custom-app-content {
  min-height: 360px;
  padding: 34px;
  border-top: 4px solid var(--app-color);
  background:
    linear-gradient(rgba(42, 45, 40, 0.05) 1px, transparent 1px) 0 0 / 100% 30px,
    var(--paper);
}

.custom-app-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.custom-app-identity > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.custom-app-identity svg { width: 20px; }
.custom-app-identity > div { display: grid; gap: 5px; }
.custom-app-identity small {
  color: #6e7168;
  font: 500 8px/1 "DM Mono", monospace;
}
.custom-app-identity strong {
  font: 500 9px/1 "DM Mono", monospace;
}

.custom-app-content h2 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
}

.custom-app-description {
  max-width: 640px;
  margin: 18px 0 28px;
  color: #5d6158;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}

.custom-app-cta {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 15px;
  color: #151815;
  border: 1px solid #151815;
  background: var(--app-color);
  text-decoration: none;
  font: 500 10px/1 "DM Mono", monospace;
}

.custom-app-cta svg { width: 14px; }

.custom-app-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.custom-app-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 42px;
  padding: 0 15px;
  color: #151815;
  border: 1px solid var(--app-color);
  background: var(--app-color);
  text-decoration: none;
  font: 500 10px/1 "DM Mono", monospace;
}

.custom-app-button.is-secondary {
  color: var(--ink);
  border-color: var(--ink);
  background: transparent;
}

.custom-app-button:hover { filter: brightness(1.08); }
.custom-app-button svg { width: 14px; }

.custom-media-frame {
  width: 100%;
  min-height: 300px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: #0d0f0d;
  aspect-ratio: 16 / 9;
}

.custom-media-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
}

.custom-link-list {
  display: grid;
  margin-top: 26px;
  border-top: 1px solid var(--ink);
}

.custom-link-list a {
  display: grid;
  grid-template-columns: 1fr 20px;
  align-items: center;
  min-height: 52px;
  padding: 0 6px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 13px;
}

.custom-link-list a:hover { padding-left: 12px; background: rgba(30, 34, 30, 0.05); }
.custom-link-list svg { width: 15px; }

.custom-checklist {
  display: grid;
  margin-top: 26px;
  border-top: 1px solid var(--ink);
}

.custom-checklist label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.custom-checklist input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--app-color);
}

.custom-checklist input:checked + span {
  color: #81847d;
  text-decoration: line-through;
}

.custom-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.custom-stat-grid article {
  display: grid;
  gap: 14px;
  min-height: 110px;
  padding: 18px;
  background: var(--paper);
}

.custom-stat-grid span {
  color: #777a72;
  font: 500 8px/1 "DM Mono", monospace;
  text-transform: uppercase;
}

.custom-stat-grid strong {
  font-size: 25px;
}

.custom-app-empty {
  margin: 26px 0 0;
  padding: 28px;
  color: #777a72;
  border: 1px dashed var(--line);
  font: 400 10px/1 "DM Mono", monospace;
  text-align: center;
}

.folder-window {
  width: min(620px, calc(100vw - 170px));
}

.folder-content {
  min-height: 350px;
  padding: 28px;
  border-top: 4px solid var(--folder-color);
  background: var(--paper);
}

.folder-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 28px;
}

.folder-heading > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.folder-heading svg { width: 20px; }
.folder-heading h2 { margin: 0; font-size: 25px; }

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

.folder-shortcut {
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 108px;
  padding: 12px 6px;
  color: var(--ink);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.folder-shortcut:hover {
  border-color: var(--line);
  background: rgba(30, 34, 30, 0.05);
}

.folder-shortcut > span {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
}

.folder-shortcut svg { width: 21px; }
.folder-shortcut strong {
  width: 100%;
  overflow: hidden;
  font: 500 9px/1.35 "DM Mono", monospace;
  text-align: center;
  text-overflow: ellipsis;
}

html[data-theme="ember"] {
  --paper: #f0ebe4;
  --paper-deep: #d8cec3;
  --moss: #b25d3d;
  --signal: #ffbf5f;
  --blue: #576d73;
  --window-chrome: #2b211d;
  --feature-panel: #493329;
  --receiver-panel: #261d19;
  --archive-panel: #251d1a;
  --contact-panel: #5a392c;
  --wallpaper-overlay:
    linear-gradient(90deg, rgba(31, 12, 5, 0.3), transparent 60%),
    linear-gradient(0deg, rgba(35, 12, 5, 0.5), transparent 44%);
}

html[data-theme="ice"] {
  --paper: #edf1f0;
  --paper-deep: #cdd7d6;
  --moss: #3c8992;
  --signal: #f06c58;
  --blue: #4a7585;
  --window-chrome: #172326;
  --feature-panel: #263d40;
  --receiver-panel: #172326;
  --archive-panel: #182528;
  --contact-panel: #2e5055;
  --wallpaper-overlay:
    linear-gradient(90deg, rgba(4, 22, 28, 0.32), transparent 58%),
    linear-gradient(0deg, rgba(4, 22, 28, 0.48), transparent 42%);
}

html[data-theme="arcade"] {
  --paper: #f4f0e6;
  --paper-deep: #d8d0bf;
  --moss: #00a88b;
  --signal: #ff477e;
  --blue: #426f93;
  --window-chrome: #211d2b;
  --feature-panel: #31493d;
  --receiver-panel: #201d28;
  --archive-panel: #201e28;
  --contact-panel: #31584f;
  --wallpaper-overlay:
    linear-gradient(90deg, rgba(20, 7, 31, 0.28), transparent 60%),
    linear-gradient(0deg, rgba(4, 25, 20, 0.46), transparent 42%);
}

html[data-theme="mono"] {
  --paper: #ededeb;
  --paper-deep: #d0d0cc;
  --moss: #626762;
  --signal: #a4aaa4;
  --blue: #5f6666;
  --window-chrome: #202320;
  --feature-panel: #373c37;
  --receiver-panel: #202420;
  --archive-panel: #202320;
  --contact-panel: #414641;
  --wallpaper-overlay:
    linear-gradient(rgba(12, 13, 12, 0.25), rgba(12, 13, 12, 0.58));
}

html[data-theme="mono"] .desktop {
  filter: grayscale(1);
}

.context-menu {
  position: fixed;
  z-index: 500;
  display: none;
  width: 264px;
  padding: 7px;
  color: #eff1e9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(22, 26, 23, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  transform-origin: top left;
  animation: context-in 120ms ease-out;
}

.context-menu.is-open {
  display: block;
}

@keyframes context-in {
  from { opacity: 0; transform: scale(0.97); }
}

.context-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 9px;
}

.context-profile > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #151815;
  background: var(--amber);
}

.context-profile svg {
  width: 16px;
}

.context-profile > div {
  display: grid;
  gap: 4px;
}

.context-profile strong {
  font-size: 10px;
}

.context-profile small,
.theme-flyout > p {
  color: rgba(239, 241, 233, 0.5);
  font: 400 7px/1 "DM Mono", monospace;
}

.context-divider {
  height: 1px;
  margin: 5px 4px;
  background: rgba(255, 255, 255, 0.11);
}

.context-item {
  display: grid;
  grid-template-columns: 22px 1fr auto 14px;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  padding: 0 8px;
  color: inherit;
  border: 0;
  border-radius: 2px;
  background: transparent;
  text-align: left;
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
}

.context-item:not(.has-submenu) {
  grid-template-columns: 22px 1fr auto;
}

.context-item:hover,
.context-item.is-active {
  color: #151815;
  background: var(--amber);
}

.context-item > svg {
  width: 14px;
}

.context-item > small {
  color: rgba(239, 241, 233, 0.42);
  font: 400 8px/1 "DM Mono", monospace;
}

.context-item:hover > small,
.context-item.is-active > small {
  color: rgba(21, 24, 21, 0.58);
}

.context-admin {
  color: var(--amber);
}

.theme-flyout {
  position: absolute;
  top: 51px;
  left: calc(100% + 8px);
  display: none;
  width: 238px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(22, 26, 23, 0.98);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.theme-flyout.is-open {
  display: block;
}

.context-menu.flyout-left .theme-flyout {
  right: calc(100% + 8px);
  left: auto;
}

.theme-flyout > p {
  margin: 4px 6px 8px;
}

.theme-flyout > button {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 47px;
  padding: 5px 6px;
  color: inherit;
  border: 0;
  border-radius: 2px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.theme-flyout > button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-flyout > button.is-active::after {
  content: "";
  position: absolute;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.theme-flyout > button > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.theme-flyout strong {
  font-size: 10px;
}

.theme-flyout small {
  color: rgba(239, 241, 233, 0.48);
  font: 400 7px/1 "DM Mono", monospace;
}

.theme-swatch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 46px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-swatch i { display: block; }
.signal-swatch i:nth-child(1) { background: #c7f04b; }
.signal-swatch i:nth-child(2) { background: #303a2d; }
.signal-swatch i:nth-child(3) { background: #eceee7; }
.ember-swatch i:nth-child(1) { background: #ff7a4f; }
.ember-swatch i:nth-child(2) { background: #493329; }
.ember-swatch i:nth-child(3) { background: #f0ebe4; }
.ice-swatch i:nth-child(1) { background: #66d9e8; }
.ice-swatch i:nth-child(2) { background: #263d40; }
.ice-swatch i:nth-child(3) { background: #edf1f0; }
.arcade-swatch i:nth-child(1) { background: #ffca3a; }
.arcade-swatch i:nth-child(2) { background: #ff477e; }
.arcade-swatch i:nth-child(3) { background: #00a88b; }
.mono-swatch i:nth-child(1) { background: #efefed; }
.mono-swatch i:nth-child(2) { background: #777b77; }
.mono-swatch i:nth-child(3) { background: #202320; }

@media (max-width: 800px) {
  .menu-bar { grid-template-columns: 1fr auto; }
  .menu-center,
  .station-code,
  .signal-status { display: none; }
  .desktop-icons {
    top: 54px;
    left: 10px;
    grid-template-columns: repeat(3, 72px);
    gap: 17px 4px;
  }
  .desktop-note { display: none; }
  .app-window,
  .window-large,
  .tuner-window,
  .log-window,
  .archive-window,
  .studio-window,
  .contact-window,
  .projects-window,
  .discord-window {
    top: 44px !important;
    left: 8px !important;
    width: calc(100vw - 16px);
    min-width: 0;
    max-height: calc(100dvh - 112px);
  }
  .custom-app-window {
    top: 44px !important;
    left: 8px !important;
    width: calc(100vw - 16px);
  }
  .folder-window {
    top: 44px !important;
    left: 8px !important;
    width: calc(100vw - 16px);
  }
  .window-content {
    max-height: calc(100dvh - 174px);
  }
  .window-bar {
    grid-template-columns: 75px 1fr 40px;
  }
  .news-window {
    min-width: 0;
  }
  .news-layout {
    padding: 16px;
  }
  .news-feature {
    grid-template-columns: 1fr;
  }
  .news-feature-image {
    min-height: 180px;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-live-desk {
    min-height: 220px;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-detail {
    grid-template-columns: 1fr;
  }
  .project-detail-image {
    min-height: 250px;
  }
  .project-detail-copy {
    min-height: 360px;
    padding: 36px 24px 28px;
  }
  .welcome-layout,
  .contact {
    grid-template-columns: 1fr;
  }
  .welcome-copy {
    min-height: 360px;
    padding: 35px 25px;
    border-right: 0;
  }
  .on-air-card {
    min-height: 270px;
  }
  .waveform {
    margin: 30px 0;
  }
  .window-footer {
    display: none;
  }
  .discord-content {
    height: calc(100dvh - 143px);
  }
  .logbook {
    padding: 30px 22px 20px;
  }
  .logbook-head {
    align-items: start;
    flex-direction: column;
  }
  .log-entries article {
    grid-template-columns: 48px 1fr 16px;
    gap: 12px;
  }
  .archive-player {
    grid-template-columns: 38px 1fr 42px;
  }
  .archive-player .mini-progress {
    display: none;
  }
  .project-strip {
    grid-template-columns: 1fr;
  }
  .project-strip article {
    min-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .project-strip article:last-child {
    border-bottom: 0;
  }
  .workbench {
    padding: 30px 22px;
  }
  .dock {
    max-width: calc(100vw - 18px);
    overflow-x: auto;
  }
  .dock button {
    flex: 0 0 40px;
  }
  .ambient-panel {
    left: 8px;
    right: 8px;
    bottom: 74px;
    width: auto;
    max-height: calc(100dvh - 126px);
  }
  .custom-app-content {
    min-height: 340px;
    padding: 27px 23px;
  }
  .folder-content { padding: 24px 18px; }
  .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .context-menu {
    max-height: calc(100dvh - 16px);
    overflow: auto;
  }
  .theme-flyout {
    position: static;
    width: 100%;
    margin: 4px 0;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
  }
  .context-menu.flyout-left .theme-flyout {
    right: auto;
  }
}

@media (max-width: 500px) {
  .boot-panel h1 { margin-bottom: 48px; }
  .desktop-icons { grid-template-columns: repeat(2, 72px); }
  .welcome-copy h2 { font-size: 38px; }
  .welcome-actions { align-items: flex-start; flex-direction: column; gap: 14px; }
  .news-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .news-filters { overflow-x: auto; }
  .news-filters button { flex: 0 0 auto; }
  .news-feature-copy { padding: 21px 18px; }
  .news-feature-copy h2 { font-size: 27px; }
  .news-feature-actions { align-items: flex-start; flex-direction: column; gap: 12px; }
  .news-story { grid-template-columns: 34px minmax(0, 1fr); }
  .news-story > svg { display: none; }
  .projects-content { padding: 22px 16px; }
  .projects-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  .projects-header h2 { font-size: 31px; }
  .projects-counter { padding-left: 0; border-left: 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-detail-copy h2 { font-size: 31px; }
  .receiver { padding: 25px 18px; }
  .frequency-display strong { font-size: 64px; }
  .tape { grid-template-columns: 24px 48px 1fr auto; gap: 9px; padding: 14px 15px; }
  .contact-copy,
  .contact form { padding: 30px 23px; }
  .custom-stat-grid { grid-template-columns: 1fr; }
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-media-frame, .custom-media-frame iframe { min-height: 220px; }
}

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