:root {
  --bg: #020805;
  --green: #77b978;
  --green-soft: #5f9864;
  --green-dim: #395f3d;
  --green-faint: rgba(119, 185, 120, 0.12);
  --line: rgba(119, 185, 120, 0.58);
  --shadow: rgba(93, 165, 92, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(35, 64, 34, 0.2), transparent 42%),
    radial-gradient(circle at 50% 50%, transparent 0, transparent 70%, rgba(0, 0, 0, 0.74) 100%),
    linear-gradient(180deg, #010603, #000);
  color: var(--green);
  font-family: "IBM Plex Mono", "Courier New", Courier, monospace;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.terminal-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(24px, 4.8vw, 56px) clamp(18px, 5.6vw, 72px) 38px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(119, 185, 120, 0.022) 0,
      rgba(119, 185, 120, 0.022) 1px,
      transparent 2px,
      transparent 6px
    );
  text-shadow: 0 0 5px var(--shadow);
}

.terminal-shell::before,
.terminal-shell::after {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
}

.terminal-shell::before {
  border-radius: 28px;
  box-shadow:
    inset 0 0 36px rgba(0, 0, 0, 0.9),
    inset 0 0 110px rgba(0, 0, 0, 0.82);
}

.terminal-shell::after {
  background:
    linear-gradient(90deg, rgba(255, 60, 30, 0.016), rgba(72, 174, 82, 0.016), rgba(50, 88, 190, 0.014)),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.46) 100%);
  mix-blend-mode: screen;
  opacity: 0.75;
}

.crt-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(119, 185, 120, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 185, 120, 0.014) 1px, transparent 1px);
  background-size: 100% 4px, 5px 100%;
  opacity: 0.36;
}

.crt-noise::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0 41%, rgba(119, 185, 120, 0.055) 41.2%, transparent 41.6%),
    linear-gradient(180deg, transparent 0 72%, rgba(119, 185, 120, 0.035) 72.1%, transparent 72.5%);
  content: "";
  opacity: 0.48;
}

.topbar,
.hero,
.footer {
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1;
  white-space: nowrap;
}

.cursor {
  width: 9px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 9px var(--shadow);
  animation: blink 1s steps(2, start) infinite;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 3.2vw, 42px);
  color: var(--green-soft);
  font-size: clamp(12px, 1.2vw, 15px);
  line-height: 1;
}

.nav a {
  white-space: nowrap;
}

.hero {
  display: grid;
  flex: 1;
  justify-items: center;
  align-content: center;
  min-height: calc(100vh - 208px);
  padding: clamp(56px, 8vw, 84px) 0 42px;
}

.log-id {
  margin: 0 0 16px;
  color: var(--green-soft);
  font-size: clamp(14px, 1.5vw, 18px);
}

.signal-line {
  margin: 14px 0 0;
  color: var(--green-soft);
  font-size: clamp(12px, 1vw, 14px);
  text-align: center;
}

h1 {
  max-width: 100%;
  margin: 0;
  color: var(--green);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
}

.divider {
  width: 16px;
  height: 1px;
  margin: 22px 0 28px;
  background: var(--green);
  box-shadow: 0 0 8px var(--shadow);
}

.player {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.62),
    0 0 22px rgba(105, 255, 108, 0.08);
}

.stage {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9.8;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(140, 255, 138, 0.055), transparent 34%),
    rgba(0, 0, 0, 0.2);
  color: var(--green);
  cursor: pointer;
}

.signal-visual {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr;
  align-items: center;
  padding: 18px 22px;
  pointer-events: none;
}

.signal-visual::before,
.signal-visual::after {
  position: absolute;
  inset: 0;
  content: "";
}

.signal-visual::before {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(119, 185, 120, 0.13) 100%) 0 0 / 36px 100%,
    linear-gradient(0deg, transparent 0, transparent calc(100% - 1px), rgba(119, 185, 120, 0.1) 100%) 0 0 / 100% 28px;
  opacity: 0.38;
}

.signal-visual::after {
  inset: 0 auto 0 -42%;
  width: 42%;
  background:
    linear-gradient(90deg, transparent, rgba(119, 185, 120, 0.11), transparent),
    radial-gradient(circle at 52% 50%, rgba(119, 185, 120, 0.09), transparent 36%);
  opacity: 0.44;
  transform: translateX(0);
}

.is-playing .signal-visual::after {
  animation: signalSweep 5.2s linear infinite alternate;
}

.signal-bars {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  align-items: center;
  gap: 7px;
  width: min(76%, 420px);
  height: 44%;
  margin: 0 auto;
  opacity: 0.58;
}

.audio-emblem {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  width: auto;
  height: min(88%, 300px);
  aspect-ratio: 1;
  background-image: url("/public/images/audio-eagle.webp?v=20260702-2336");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  filter: brightness(0.72) contrast(1.05) saturate(0.88) drop-shadow(0 0 12px rgba(93, 165, 92, 0.26));
  opacity: 0.78;
}

.audio-emblem::before,
.audio-emblem::after {
  position: absolute;
  inset: 0;
  background: inherit;
  background-position: inherit;
  background-size: inherit;
  background-repeat: inherit;
  content: "";
  opacity: 0;
  mix-blend-mode: screen;
}

body:not(.signal-mode).is-playing .audio-emblem::before {
  animation: emblemGlitchA 3.8s steps(1, end) infinite;
}

body:not(.signal-mode).is-playing .audio-emblem::after {
  animation: emblemGlitchB 5.1s steps(1, end) infinite;
}

.signal-mode .audio-emblem {
  display: none;
}

.signal-mode .signal-bars {
  display: none;
}

body:not(.signal-mode) .signal-bars {
  display: none;
}

.signal-mode .terminal-stream {
  align-self: start;
  min-height: 0;
  height: 68%;
  max-height: none;
  border-top: 0;
  padding: 14px 0 18px;
}

body:not(.signal-mode) .terminal-stream {
  display: none;
}

.terminal-stream {
  position: relative;
  z-index: 3;
  display: block;
  align-self: stretch;
  width: 100%;
  min-height: 104px;
  max-height: 132px;
  overflow: hidden;
  border-top: 1px solid var(--green-faint);
  padding: 10px 0 0;
  color: var(--green-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  white-space: pre-wrap;
}

#terminalText {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body:not(.signal-mode) .terminal-stream {
  color: var(--green-dim);
}

.signal-bars span {
  display: block;
  height: 20%;
  min-height: 10px;
  border-top: 1px solid rgba(119, 185, 120, 0.52);
  border-bottom: 1px solid rgba(119, 185, 120, 0.38);
  background: rgba(119, 185, 120, 0.14);
  box-shadow: 0 0 8px rgba(93, 165, 92, 0.18);
  transform-origin: center;
}

.signal-bars span:nth-child(1) { height: 22%; }
.signal-bars span:nth-child(2) { height: 36%; }
.signal-bars span:nth-child(3) { height: 58%; }
.signal-bars span:nth-child(4) { height: 44%; }
.signal-bars span:nth-child(5) { height: 72%; }
.signal-bars span:nth-child(6) { height: 38%; }
.signal-bars span:nth-child(7) { height: 84%; }
.signal-bars span:nth-child(8) { height: 52%; }
.signal-bars span:nth-child(9) { height: 68%; }
.signal-bars span:nth-child(10) { height: 32%; }
.signal-bars span:nth-child(11) { height: 76%; }
.signal-bars span:nth-child(12) { height: 46%; }
.signal-bars span:nth-child(13) { height: 62%; }
.signal-bars span:nth-child(14) { height: 28%; }
.signal-bars span:nth-child(15) { height: 48%; }
.signal-bars span:nth-child(16) { height: 24%; }

body:not(.signal-mode).is-playing .signal-bars {
  opacity: 0.94;
}

body:not(.signal-mode).is-playing .signal-bars span {
  animation: signalPulse 1.25s steps(4, end) infinite;
}

body:not(.signal-mode).is-playing .signal-bars span:nth-child(2n) {
  animation-duration: 0.95s;
}

body:not(.signal-mode).is-playing .signal-bars span:nth-child(3n) {
  animation-duration: 1.55s;
}

body:not(.signal-mode) .signal-bars span {
  border-top-color: rgba(119, 185, 120, 0.68);
  border-bottom-color: rgba(119, 185, 120, 0.5);
  background: rgba(119, 185, 120, 0.22);
  box-shadow: 0 0 12px rgba(93, 165, 92, 0.28);
}

.signal-mode .signal-visual::after {
  opacity: 0.24;
}

.icon-stack {
  display: grid;
  place-items: center;
  color: var(--green);
  filter: drop-shadow(0 0 7px var(--shadow));
}

.icon-stack svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.stage-icon {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  width: 72px;
  height: 72px;
  transition: opacity 160ms ease;
}

.signal-mode .stage-icon {
  opacity: 0;
}

body:not(.signal-mode).is-playing .stage-icon {
  opacity: 0;
}

body:not(.signal-mode).is-playing .stage:focus-visible .stage-icon {
  opacity: 1;
}

.stage-icon .icon-play {
  transform: translateX(2px);
}

.stage-icon .icon-pause,
.control-icon .icon-pause,
.sound-icon .icon-volume-off {
  display: none;
}

.stage-icon.paused .icon-play,
.control-icon.paused .icon-play,
.sound-icon.muted .icon-volume {
  display: none;
}

.stage-icon.paused .icon-pause,
.control-icon.paused .icon-pause,
.sound-icon.muted .icon-volume-off {
  display: block;
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, 30px) 44px minmax(90px, 1fr) 48px 30px 72px;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 0 18px;
}

.control-button,
.mute,
.mode {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  text-shadow: inherit;
}

.control-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  border: 1px solid transparent;
  padding: 0;
}

.control-icon,
.sound-icon {
  width: 24px;
  height: 24px;
}

.time {
  color: var(--green-soft);
  font-size: 13px;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
  background: transparent;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -5.5px;
  border: 1px solid var(--green);
  border-radius: 0;
  background: var(--green);
  box-shadow: 0 0 8px var(--shadow);
  appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--line);
}

input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 1px solid var(--green);
  border-radius: 0;
  background: var(--green);
}

.mute {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
}

.mute.muted .sound-icon {
  color: var(--green-soft);
}

.loop-button.active {
  border-color: var(--green);
  background: rgba(119, 185, 120, 0.12);
  color: var(--green);
  box-shadow: inset 0 0 10px rgba(93, 165, 92, 0.16), 0 0 8px rgba(93, 165, 92, 0.18);
}

.loop-button.active::after {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 4px;
  height: 4px;
  background: var(--green);
  box-shadow: 0 0 6px var(--shadow);
  content: "";
}

.loop-button:not(.active) {
  color: var(--green-dim);
}

.mode-row {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 4vw, 46px);
  margin-top: 30px;
  color: var(--green-soft);
}

.mode {
  padding: 0;
  font-size: 14px;
  color: var(--green-soft);
}

.mode.active {
  color: var(--green);
}

.console-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(520px, 1.42fr) minmax(250px, 0.82fr);
  align-items: center;
  gap: clamp(18px, 2vw, 28px);
  width: min(1240px, 100%);
  margin-top: clamp(34px, 5vw, 56px);
}

.player-column {
  position: relative;
  display: block;
  align-self: center;
  min-width: 0;
}

.player-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 9px 12px;
  color: var(--green-soft);
  font-size: 13px;
  text-align: left;
}

.fullscreen-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green-dim);
  cursor: pointer;
}

.fullscreen-button:hover,
.fullscreen-button.active {
  color: var(--green);
}

.fullscreen-icon {
  width: 24px;
  height: 24px;
}

.fullscreen-icon .icon-minimize {
  display: none;
}

.fullscreen-button.active .icon-expand {
  display: none;
}

.fullscreen-button.active .icon-minimize {
  display: block;
}

.player-column:fullscreen {
  display: grid;
  align-content: center;
  width: 100vw;
  height: 100vh;
  padding: clamp(22px, 5vw, 72px);
  background: #020805;
}

.player-column:fullscreen .player-label,
.player-column:fullscreen .player,
.player-column:fullscreen .mode-row {
  width: min(980px, 92vw);
  justify-self: center;
}

.player-column:fullscreen .stage {
  aspect-ratio: 16 / 8.2;
}

.player-column:fullscreen .mode-row {
  position: static;
  margin-top: 22px;
  transform: none;
}

.track-list-panel,
.track-card {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
  min-height: 344px;
  height: 344px;
  align-self: center;
}

.panel-label {
  border-bottom: 1px solid var(--green-faint);
  padding: 12px 16px;
  color: var(--green-soft);
  font-size: 13px;
}

.track-list {
  display: grid;
  gap: 0;
  max-height: 295px;
  margin: 0;
  padding: 10px 0;
  overflow: auto;
  list-style: none;
  scrollbar-color: var(--green-dim) rgba(0, 0, 0, 0.34);
  scrollbar-width: thin;
}

.track-list::-webkit-scrollbar {
  width: 8px;
}

.track-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.34);
  border-left: 1px solid var(--green-faint);
}

.track-list::-webkit-scrollbar-thumb {
  background: var(--green-dim);
  border: 1px solid rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 6px var(--shadow);
}

.track-list::-webkit-scrollbar-thumb:hover {
  background: var(--green-soft);
}

.track-row {
  display: grid;
  grid-template-columns: 14px 28px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-left: 3px solid transparent;
  padding: 0 16px 0 13px;
  background: transparent;
  color: var(--green-soft);
  text-align: left;
  cursor: pointer;
}

.track-row .track-marker {
  color: transparent;
}

.track-row.active .track-marker {
  color: var(--green);
}

.track-row:hover,
.track-row.active {
  background: var(--green-faint);
  color: var(--green);
}

.track-row.active {
  border-left-color: var(--green);
}

.track-row .track-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-row .track-time {
  text-align: right;
}

.track-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  text-align: left;
}

.track-card.log-expanded .dossier-grid,
.track-card.log-expanded h2 + .card-divider {
  display: none;
}

.track-card.log-expanded h2 {
  margin-bottom: 10px;
}

.track-card.log-expanded .log-fragment {
  flex: 1;
}

.card-log {
  margin: 0 0 8px;
  color: var(--green-soft);
  font-size: 14px;
}

.track-card h2 {
  margin: 0;
  color: var(--green);
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.card-divider {
  width: 16px;
  height: 1px;
  margin: 18px 0;
  background: var(--green);
}

.track-card dl,
.dossier-grid {
  display: grid;
  gap: 8px;
  margin: 0;
}

.track-card dl div,
.dossier-grid div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

.track-card dt,
.track-card dd {
  margin: 0;
  font-size: 13px;
}

.track-card dt {
  color: var(--green-dim);
}

.track-card dd {
  color: var(--green-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-fragment {
  min-height: 0;
  padding-right: 4px;
  color: var(--green-soft);
  overflow: hidden;
}

.track-card.log-expanded .log-fragment {
  overflow: auto;
  scrollbar-color: var(--green-dim) rgba(0, 0, 0, 0.34);
  scrollbar-width: thin;
}

.track-card.log-expanded .log-fragment::-webkit-scrollbar {
  width: 7px;
}

.track-card.log-expanded .log-fragment::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.34);
}

.track-card.log-expanded .log-fragment::-webkit-scrollbar-thumb {
  background: var(--green-dim);
  border: 1px solid rgba(0, 0, 0, 0.72);
}

.fragment-label {
  margin: 0;
  color: var(--green-dim);
  font-size: 12px;
}

.fragment-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  background: #020805;
}

#cardFragment {
  display: -webkit-box;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.track-card.log-expanded #cardFragment {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: pre-line;
  -webkit-line-clamp: unset;
}

.log-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  cursor: pointer;
  text-align: right;
  white-space: nowrap;
}

.footer {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(260px, 1.4fr) minmax(170px, 0.7fr);
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--green-soft);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.45;
}

.footer p {
  margin: 0;
}

.footer-brand {
  color: var(--green-dim);
  font-size: 11px;
  letter-spacing: 0;
}

.footer-brand p:first-child {
  color: var(--green-soft);
  font-size: 12px;
  font-weight: 600;
}

.footer-brief {
  max-width: 620px;
  justify-self: center;
  color: var(--green-dim);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.footer-desktop-break {
  display: block;
}

.loop {
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

.loop p {
  display: inline-flex;
  align-items: center;
}

.rss {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: 10px;
}

.rss svg {
  width: 24px;
  height: 24px;
  fill: var(--green);
  filter: drop-shadow(0 0 4px var(--shadow));
}

@media (min-width: 900px) {
  .terminal-shell {
    padding: 24px clamp(32px, 4vw, 56px) 22px;
  }

  .topbar {
    min-height: 34px;
  }

  .hero {
    min-height: auto;
    padding: 30px 0 26px;
  }

  .log-id {
    margin-bottom: 10px;
    font-size: 14px;
  }

  .signal-line {
    margin-top: 10px;
    font-size: 12px;
  }

  h1 {
    font-size: clamp(28px, 3.1vw, 40px);
  }

  .divider {
    margin: 14px 0 20px;
  }

  .stage {
    aspect-ratio: 16 / 8.6;
  }

  .stage-icon {
    width: 60px;
    height: 60px;
  }

  .terminal-stream {
    min-height: 92px;
    max-height: 112px;
    padding-top: 8px;
    font-size: 11px;
  }

  .controls {
    min-height: 52px;
    padding: 0 14px;
  }

  .player-label {
    padding: 8px 11px;
    font-size: 12px;
  }

  .mode-row {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    width: max-content;
    margin-top: 0;
    transform: translateX(-50%);
  }

  .console-layout {
    margin-top: 24px;
    margin-bottom: 48px;
  }

  .track-list-panel,
  .track-card {
    min-height: 302px;
    height: 302px;
  }

  .panel-label {
    padding: 10px 14px;
  }

  .track-list {
    max-height: 254px;
    padding: 8px 0;
  }

  .track-row {
    min-height: 30px;
  }

  .track-card {
    padding: 17px;
  }

  .card-divider {
    margin: 14px 0;
  }

  .footer {
    padding-top: 12px;
  }
}

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

@keyframes signalPulse {
  0% {
    transform: scaleY(0.62);
  }

  35% {
    transform: scaleY(1.2);
  }

  70% {
    transform: scaleY(0.82);
  }

  100% {
    transform: scaleY(1);
  }
}

@keyframes signalSweep {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(338%);
  }
}

@keyframes emblemGlitchA {
  0%,
  84%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
  }

  85% {
    opacity: 0.34;
    transform: translate(5px, -1px);
    clip-path: inset(22% 0 61% 0);
  }

  87% {
    opacity: 0.22;
    transform: translate(-4px, 2px);
    clip-path: inset(58% 0 28% 0);
  }
}

@keyframes emblemGlitchB {
  0%,
  69%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
  }

  70% {
    opacity: 0.24;
    transform: translate(-6px, 1px);
    clip-path: inset(34% 0 50% 0);
  }

  72% {
    opacity: 0.18;
    transform: translate(3px, -2px);
    clip-path: inset(68% 0 18% 0);
  }
}

@media (max-width: 760px) {
  .terminal-shell {
    padding: 22px 18px 28px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 14px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px 18px;
  }

  .hero {
    min-height: auto;
    padding: 46px 0 52px;
  }

  .controls {
    grid-template-columns: 28px 28px 28px 28px 1fr 44px;
    grid-template-areas:
      "prev play next loop . ."
      "current seek seek seek seek duration";
    gap: 8px 6px;
    padding: 10px 14px 12px;
  }

  #prevButton {
    grid-area: prev;
  }

  #playButton {
    grid-area: play;
  }

  #nextButton {
    grid-area: next;
  }

  #loopButton {
    grid-area: loop;
  }

  #currentTime {
    grid-area: current;
  }

  #seek {
    grid-area: seek;
  }

  #duration {
    grid-area: duration;
    text-align: right;
  }

  .control-button {
    width: 28px;
  }

  .mute,
  .volume {
    display: none;
  }

  .footer {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-brief {
    justify-self: start;
    text-align: left;
  }

  .footer-desktop-break {
    display: none;
  }

  .loop {
    justify-content: flex-start;
    text-align: left;
  }

  .console-layout {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
  }

  .player-column {
    order: -1;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 28px;
  }

  .brand {
    white-space: normal;
  }

  .mode-row {
    align-items: center;
    flex-direction: column;
    gap: 12px;
  }
}
