/*
 * Frequency Atlas — Observatory redesign
 * Staging-only presentation layer, 2026-08-05.
 * The original application logic and data remain unchanged.
 */

:root {
  --bg: #0b0b0c;
  --bg-deep: #070708;
  --surface: #121214;
  --surface-2: #18181b;
  --surface-3: #202024;
  --border: rgba(238, 223, 191, 0.11);
  --border-bright: rgba(238, 223, 191, 0.24);
  --amber: #d7b978;
  --amber-bright: #f0d9a6;
  --amber-deep: #9a7942;
  --amber-glow: rgba(215, 185, 120, 0.18);
  --cyan: #9bb7b4;
  --cyan-glow: rgba(155, 183, 180, 0.16);
  --cream: #f3efe7;
  --muted: #9b978f;
  --muted-2: #625f59;
  --danger: #bd6b62;
  --success: #8eb89a;
  --display: "Cinzel", "Times New Roman", serif;
  --serif: "Cinzel", "Times New Roman", serif;
  --mono: "JetBrains Mono", monospace;
  --body: "Manrope", system-ui, sans-serif;
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.28);
  --shadow-deep: 0 32px 90px rgba(0, 0, 0, 0.5);
}

::selection {
  background: var(--amber);
  color: #12100c;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #3b3833 #0b0b0c;
}

html,
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
}

body {
  min-width: 320px;
  background-image:
    radial-gradient(circle at 82% -8%, rgba(215, 185, 120, 0.1), transparent 27rem),
    radial-gradient(circle at 10% 42%, rgba(128, 153, 151, 0.055), transparent 32rem),
    linear-gradient(180deg, #0e0e10 0%, #09090a 58%, #070708 100%);
  background-attachment: fixed;
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  opacity: 0.72;
}

body::after {
  opacity: 0.018;
  mix-blend-mode: soft-light;
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

:is(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 3px;
}

.app {
  isolation: isolate;
}

/* Header */
header {
  min-height: 84px;
  padding: 1rem clamp(1rem, 3vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.015);
}

.brand {
  gap: 0.95rem;
}

.brand-mark {
  width: 43px;
  height: 43px;
  border: 1px solid rgba(215, 185, 120, 0.7);
  box-shadow:
    inset 0 0 0 8px rgba(215, 185, 120, 0.025),
    0 0 0 1px rgba(0, 0, 0, 0.6);
}

.brand-mark::before {
  width: 5px;
  height: 5px;
  background: var(--amber-bright);
  box-shadow: 0 0 18px 3px rgba(215, 185, 120, 0.4);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(215, 185, 120, 0.2);
  border-radius: inherit;
  transform: rotate(28deg);
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.23em;
  color: #f6f1e8;
}

.brand-sub {
  margin-top: 0.35rem;
  font-size: 0.57rem;
  letter-spacing: 0.25em;
  color: #77736c;
}

.version-badge {
  margin-left: 0.55rem;
  padding: 0.16rem 0.42rem;
  border: 1px solid rgba(215, 185, 120, 0.35);
  border-radius: 99px;
  background: rgba(215, 185, 120, 0.08);
  color: var(--amber-bright);
  box-shadow: none;
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.version-badge:hover {
  border-color: rgba(240, 217, 166, 0.65);
  background: rgba(215, 185, 120, 0.14);
  color: #fff1cf;
}

.header-meta {
  gap: 1.35rem;
}

.header-meta .stat {
  color: #77736c;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.devices-btn {
  min-height: 42px;
  padding: 0.7rem 1.25rem;
  gap: 0.65rem;
  border: 1px solid rgba(215, 185, 120, 0.45);
  border-radius: 99px;
  background: rgba(215, 185, 120, 0.04);
  color: var(--amber-bright);
  box-shadow: none;
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.21em;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease,
    transform 180ms ease;
}

.devices-btn:hover {
  background: var(--amber-bright);
  border-color: var(--amber-bright);
  color: #17130d;
  box-shadow: none;
  transform: translateY(-1px);
}

/* Three-column atlas */
main {
  display: grid;
  grid-template-columns: 252px minmax(400px, 1fr) 430px;
  gap: clamp(1.1rem, 1.7vw, 2rem);
  width: min(100%, 1920px);
  max-width: 1920px;
  margin: 0 auto;
  padding: clamp(1.4rem, 2.3vw, 2.75rem) clamp(1rem, 3vw, 3.5rem) 3rem;
}

aside.sidebar {
  position: sticky;
  top: 108px;
  align-self: start;
  gap: 1rem;
}

.sidebar-section {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 25, 28, 0.92), rgba(15, 15, 17, 0.94));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.sidebar-section:last-child {
  background: rgba(255, 255, 255, 0.018);
}

.sidebar-title {
  margin: 0.1rem 0 0.95rem;
  color: var(--amber-bright);
  font-size: 0.57rem;
  font-weight: 500;
  letter-spacing: 0.25em;
}

.sidebar-title::after {
  background: linear-gradient(90deg, var(--border-bright), transparent);
}

.category-list {
  gap: 0.18rem;
  max-height: calc(100vh - 260px);
  padding-right: 0.25rem;
}

.category-item {
  min-height: 39px;
  padding: 0.57rem 0.72rem;
  border-radius: 8px;
  color: #bbb7ae;
  font-family: var(--body);
  font-size: 0.74rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.category-item:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.045);
  color: #f4efe6;
  transform: translateX(2px);
}

.category-item.active {
  border: 1px solid rgba(215, 185, 120, 0.28);
  background: linear-gradient(100deg, rgba(215, 185, 120, 0.2), rgba(215, 185, 120, 0.06));
  color: var(--amber-bright);
  font-weight: 600;
}

.category-item.active::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 10px var(--amber);
}

.category-count {
  margin-left: auto;
  color: #7f7b74;
  font-family: var(--mono);
  font-size: 0.57rem;
}

.category-item.active .category-count {
  color: var(--amber-bright);
}

/* Editorial introduction */
.content {
  gap: 1rem;
  min-width: 0;
}

.atlas-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  min-height: 230px;
  padding: clamp(1.6rem, 2.5vw, 2.8rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 87% 18%, rgba(215, 185, 120, 0.13), transparent 15rem),
    linear-gradient(135deg, rgba(27, 27, 30, 0.95), rgba(13, 13, 15, 0.97));
  box-shadow: var(--shadow-soft);
}

.atlas-intro::before {
  content: "";
  position: absolute;
  right: -74px;
  top: -104px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(215, 185, 120, 0.16);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 42px rgba(215, 185, 120, 0.018),
    inset 0 0 0 82px rgba(215, 185, 120, 0.018);
}

.atlas-intro::after {
  content: "";
  position: absolute;
  right: 69px;
  top: 39px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 24px 5px rgba(215, 185, 120, 0.25);
}

.atlas-intro-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.atlas-kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.atlas-kicker span {
  width: 24px;
  height: 1px;
  background: var(--amber);
}

.atlas-intro h1 {
  margin: 0;
  color: #f5f0e7;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.4vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.atlas-intro h1 em {
  color: var(--amber-bright);
  font-weight: 400;
  font-style: italic;
}

.atlas-intro-copy > p {
  max-width: 650px;
  margin-top: 1.2rem;
  color: #aaa69e;
  font-size: 0.87rem;
  font-weight: 350;
  line-height: 1.75;
}

.atlas-index {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: end;
  gap: 1.4rem;
  padding: 0 0.3rem 0.1rem 1.5rem;
  border-left: 1px solid var(--border-bright);
}

.atlas-index div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 88px;
}

.atlas-index strong {
  color: #ece4d4;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.atlas-index span {
  max-width: 86px;
  color: #6f6b65;
  font-family: var(--mono);
  font-size: 0.49rem;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Search and result controls */
.search-bar {
  min-height: 58px;
  padding: 0 1.15rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(25, 25, 28, 0.86);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.search-bar:focus-within {
  border-color: rgba(215, 185, 120, 0.62);
  box-shadow: 0 0 0 3px rgba(215, 185, 120, 0.08);
}

.search-bar svg {
  color: var(--amber);
}

.search-bar input {
  padding: 1rem 0.85rem;
  color: var(--cream);
  font-family: var(--body);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.search-bar input::placeholder {
  color: #6e6a64;
}

.results-meta {
  min-height: 35px;
  padding: 0 0.3rem;
  color: #77736c;
  font-size: 0.56rem;
  letter-spacing: 0.19em;
}

.results-meta strong {
  color: var(--amber-bright);
  font-weight: 600;
}

/* Frequency cards */
.freq-grid {
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 0.8rem;
}

.freq-card {
  min-height: 192px;
  padding: 1.25rem 1.25rem 1.12rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(150deg, rgba(28, 28, 31, 0.96), rgba(17, 17, 19, 0.96));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  content-visibility: auto;
  contain: layout style paint;
  contain-intrinsic-size: 192px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease,
    box-shadow 220ms ease;
}

.freq-card::before {
  left: 1.25rem;
  top: auto;
  bottom: 0;
  width: 30px;
  height: 1px;
  background: var(--amber-bright);
  transform: scaleX(0);
  transform-origin: left;
}

.freq-card::after {
  content: "↗";
  position: absolute;
  right: 1.1rem;
  top: 1.1rem;
  color: rgba(215, 185, 120, 0);
  font-family: var(--body);
  font-size: 0.85rem;
  transition: color 220ms ease, transform 220ms ease;
}

.freq-card:hover {
  border-color: rgba(215, 185, 120, 0.31);
  background: linear-gradient(150deg, rgba(34, 33, 32, 0.98), rgba(18, 18, 20, 0.98));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

.freq-card:hover::before,
.freq-card.active::before {
  transform: scaleX(1);
}

.freq-card:hover::after,
.freq-card.active::after {
  color: var(--amber);
  transform: translate(2px, -2px);
}

.freq-card.active {
  border-color: rgba(215, 185, 120, 0.65);
  background:
    radial-gradient(circle at 100% 0, rgba(215, 185, 120, 0.1), transparent 9rem),
    linear-gradient(150deg, #23211e, #151517);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(215, 185, 120, 0.07);
}

.freq-card-hz {
  margin-bottom: 0.75rem;
  color: var(--amber-bright);
  font-family: var(--serif);
  font-size: 1.95rem;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.freq-card-hz .unit {
  margin-left: 0.3rem;
  color: #777169;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.freq-card-name {
  margin-bottom: 0.48rem;
  color: #eeebe4;
  font-family: var(--body);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.freq-card-desc {
  min-height: 3.3em;
  margin-bottom: 0.9rem;
  color: #88847d;
  font-size: 0.7rem;
  font-weight: 350;
  line-height: 1.62;
}

.freq-card-tag {
  padding: 0;
  border: 0;
  color: #8ca6a3;
  font-size: 0.49rem;
  letter-spacing: 0.18em;
  opacity: 0.82;
}

/* Listening console */
.player-panel {
  top: 108px;
  max-height: calc(100vh - 130px);
  border: 1px solid rgba(215, 185, 120, 0.16);
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(23, 23, 25, 0.98), rgba(11, 11, 12, 0.99));
  box-shadow: var(--shadow-deep);
}

.panel-header {
  min-height: 54px;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.012);
}

.panel-header-title {
  color: var(--amber-bright);
  font-size: 0.57rem;
  font-weight: 500;
  letter-spacing: 0.25em;
}

.panel-header-meta {
  color: #77736c;
  font-size: 0.54rem;
  letter-spacing: 0.15em;
}

.panel-header-meta .led {
  width: 5px;
  height: 5px;
}

.now-playing {
  position: relative;
  padding: 1.35rem 1.35rem 1.25rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(215, 185, 120, 0.035), transparent 55%);
}

.now-playing::after {
  content: "";
  position: absolute;
  right: -75px;
  bottom: -115px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(215, 185, 120, 0.1);
  border-radius: 50%;
  box-shadow: inset 0 0 0 36px rgba(215, 185, 120, 0.015);
}

.now-playing-label {
  color: #77736c;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
}

.now-playing-name {
  position: relative;
  z-index: 1;
  margin-bottom: 0.85rem;
  color: #e8e4dd;
  font-family: var(--body);
  font-size: 0.87rem;
  font-weight: 500;
}

.now-playing-hz {
  position: relative;
  z-index: 1;
  color: var(--amber-bright);
  font-family: var(--serif);
  font-size: clamp(2.3rem, 3vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  text-shadow: 0 0 35px rgba(215, 185, 120, 0.14);
}

.now-playing-hz .unit {
  color: #706b64;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.visualizer-wrap {
  aspect-ratio: 1.6;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at center, rgba(215, 185, 120, 0.04), transparent 58%),
    #09090a;
}

.visualizer-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.viz-mode-tabs {
  gap: 0.15rem;
  padding: 0.4rem;
  border-bottom: 1px solid var(--border);
  background: #0c0c0e;
}

.viz-mode-tab {
  padding: 0.58rem 0.25rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #6e6a64;
  font-size: 0.48rem;
  letter-spacing: 0.12em;
}

.viz-mode-tab:hover {
  color: #d9d4ca;
  background: rgba(255, 255, 255, 0.03);
}

.viz-mode-tab.active {
  border-color: rgba(215, 185, 120, 0.2);
  border-bottom-color: rgba(215, 185, 120, 0.2);
  background: rgba(215, 185, 120, 0.09);
  color: var(--amber-bright);
}

.controls {
  gap: 1rem;
  padding: 1.25rem 1.35rem 1.4rem;
}

.transport {
  gap: 0.9rem;
}

.play-btn {
  width: 54px;
  height: 54px;
  border: 1px solid var(--amber-bright);
  background: var(--amber-bright);
  color: #14110d;
  box-shadow: 0 9px 24px rgba(215, 185, 120, 0.14);
}

.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 34px rgba(215, 185, 120, 0.26);
}

.play-btn:disabled {
  border-color: #363431;
  background: #2a2927;
  color: #716e68;
}

.transport-info {
  color: #77736c;
  font-size: 0.61rem;
}

.transport-info .status {
  color: #ded9cf;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
}

.control-label {
  color: #77736c;
  font-size: 0.52rem;
}

.control-label .value {
  color: var(--amber-bright);
}

input[type="range"] {
  height: 2px;
  border: 0;
  background: #32302c;
}

input[type="range"]::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #16130e;
  background: var(--amber-bright);
  box-shadow: 0 0 0 1px var(--amber-bright), 0 0 16px rgba(215, 185, 120, 0.3);
}

.wave-select {
  gap: 0.35rem;
}

.wave-btn {
  padding: 0.55rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: #77736c;
  font-size: 0.52rem;
}

.wave-btn:hover {
  border-color: var(--border-bright);
  color: #ded9cf;
}

.wave-btn.active {
  border-color: rgba(215, 185, 120, 0.28);
  background: rgba(215, 185, 120, 0.11);
  color: var(--amber-bright);
  font-weight: 500;
}

/* Floating quick access */
.quick-access-fab {
  bottom: 1.7rem;
  right: 1.7rem;
  width: 52px;
  height: 52px;
  min-height: 52px;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(240, 217, 166, 0.5);
  border-radius: 99px;
  background: rgba(20, 18, 15, 0.9);
  backdrop-filter: blur(16px);
  color: var(--amber-bright);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255,255,255,0.025);
  animation: none;
  font-size: 0;
  font-weight: 500;
  letter-spacing: 0.2em;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.quick-access-fab::after {
  content: "Quick access";
  position: absolute;
  right: calc(100% + 0.65rem);
  top: 50%;
  padding: 0.55rem 0.72rem;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  background: rgba(14, 14, 16, 0.96);
  color: var(--amber-bright);
  font-family: var(--mono);
  font-size: 0.51rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(5px, -50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.quick-access-fab:hover::after,
.quick-access-fab:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.quick-access-fab:hover {
  background: var(--amber-bright);
  color: #16120d;
  transform: translateY(-2px);
}

.quick-access-fab svg {
  width: 15px;
  height: 15px;
}

/* Modal and drawers */
.modal-overlay {
  background: rgba(5, 5, 6, 0.82);
  backdrop-filter: blur(18px);
}

.modal {
  max-width: 720px;
  border: 1px solid rgba(215, 185, 120, 0.2);
  border-radius: 22px;
  background: linear-gradient(145deg, #1a1a1d, #101012);
  box-shadow: var(--shadow-deep);
}

.modal-header {
  min-height: 72px;
  padding: 1.25rem 1.5rem;
  border-color: var(--border);
}

.modal-title {
  color: #f0ebe2;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.modal-close,
.drawer-close {
  border-color: var(--border);
  border-radius: 50%;
  color: #8c8881;
}

.modal-body {
  padding: 1.4rem 1.5rem 1.6rem;
}

.emergency-note {
  padding: 1rem 1.1rem;
  border-color: rgba(189, 107, 98, 0.25);
  border-radius: 12px;
  background: rgba(189, 107, 98, 0.055);
  color: #aaa59d;
  font-size: 0.72rem;
}

.emergency-note strong {
  color: #d6948c;
}

.quick-grid {
  gap: 0.65rem;
}

.quick-item {
  min-height: 118px;
  padding: 1.15rem 0.8rem;
  border-color: var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.018);
}

.quick-item:hover {
  border-color: rgba(215, 185, 120, 0.42);
  background: rgba(215, 185, 120, 0.05);
  transform: translateY(-2px);
}

.quick-item-name {
  font-family: var(--body);
  font-size: 0.74rem;
}

.quick-item-hz {
  color: var(--amber-bright);
  font-size: 0.6rem;
}

.cat-drawer {
  border-top-color: rgba(215, 185, 120, 0.45);
  background: #151517;
}

.drawer-item {
  border-radius: 10px;
  color: #bab6ad;
  font-family: var(--body);
  font-size: 0.82rem;
}

.drawer-item.active {
  background: rgba(215, 185, 120, 0.13);
  color: var(--amber-bright);
}

/* Footer */
.site-footer {
  width: min(100%, 1920px);
  max-width: 1920px;
  padding: 1rem clamp(1rem, 3vw, 3.5rem) 3rem;
}

.silent-notice {
  border-color: rgba(215, 185, 120, 0.16);
  border-radius: 12px;
  background: rgba(215, 185, 120, 0.035);
  color: #8f8b84;
  font-size: 0.73rem !important;
}

.silent-notice::before {
  filter: grayscale(1);
  opacity: 0.7;
}

.footer-disclaimer,
.shop-link {
  color: #68645e !important;
  font-size: 0.69rem !important;
}

.shop-link {
  border-color: var(--border);
}

.shop-link a {
  border-color: var(--amber-deep);
  color: var(--amber);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: #37342f;
}

::-webkit-scrollbar-thumb:hover {
  background: #524d45;
}

/* Medium desktop */
@media (max-width: 1450px) {
  main {
    grid-template-columns: 226px minmax(360px, 1fr) 390px;
  }

  .atlas-index {
    display: none;
  }

  .freq-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

@media (max-width: 1200px) {
  main {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  aside.sidebar {
    display: none;
  }

  .mobile-cat-pills {
    display: flex;
    gap: 0.45rem;
    margin: 0;
    padding: 0.2rem 0 0.35rem;
  }

  .cat-pill {
    padding: 0.55rem 0.9rem;
    border-color: var(--border);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.022);
    color: #aaa69e;
    font-family: var(--body);
    font-size: 0.66rem;
  }

  .cat-pill.active {
    border-color: rgba(215, 185, 120, 0.28);
    background: rgba(215, 185, 120, 0.12);
    color: var(--amber-bright);
  }

  .player-panel {
    top: 104px;
  }

  .visualizer-wrap {
    aspect-ratio: 1.45;
    max-height: none;
  }
}

@media (max-width: 980px) {
  main {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .atlas-intro {
    min-height: 205px;
  }

  .atlas-intro h1 {
    font-size: clamp(2.3rem, 6vw, 3.4rem);
  }

  .freq-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  header {
    min-height: 70px;
    padding: 0.75rem 1rem;
  }

  .brand {
    gap: 0.65rem;
  }

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

  .brand-name {
    font-size: 0.75rem;
    letter-spacing: 0.17em;
  }

  .brand-sub {
    margin-top: 0.22rem;
    font-size: 0.46rem;
  }

  .version-badge {
    display: none;
  }

  .devices-btn {
    width: 39px;
    height: 39px;
    min-height: 0;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
  }

  .devices-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .devices-btn svg {
    width: 14px;
    height: 14px;
  }

  main {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 0.9rem 0.85rem calc(106px + env(safe-area-inset-bottom, 0px));
  }

  .content {
    gap: 0.8rem;
  }

  .atlas-intro {
    display: block;
    min-height: 220px;
    padding: 1.5rem;
    border-radius: 18px;
  }

  .atlas-intro::before {
    right: -135px;
    top: -85px;
  }

  .atlas-intro::after {
    right: 16px;
    top: 56px;
  }

  .atlas-kicker {
    margin-bottom: 0.9rem;
    font-size: 0.49rem;
  }

  .atlas-intro h1 {
    max-width: 290px;
    font-size: clamp(2.45rem, 13vw, 3.45rem);
  }

  .atlas-intro-copy > p {
    max-width: 88%;
    margin-top: 1rem;
    font-size: 0.75rem;
    line-height: 1.68;
  }

  .atlas-index {
    display: none;
  }

  .search-bar {
    min-height: 54px;
    border-radius: 13px;
  }

  .results-meta {
    padding: 0;
  }

  .mobile-cat-pills {
    display: none;
  }

  .filter-toggle {
    border-color: rgba(215, 185, 120, 0.32);
    border-radius: 99px;
    background: rgba(215, 185, 120, 0.08);
    color: var(--amber-bright);
    box-shadow: none;
    font-size: 0.55rem;
  }

  .freq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
  }

  .freq-card {
    min-height: 168px;
    padding: 1rem;
    border-radius: 14px;
  }

  .freq-card::before {
    left: 1rem;
  }

  .freq-card::after {
    display: none;
  }

  .freq-card-hz {
    font-size: 1.55rem;
  }

  .freq-card-name {
    font-size: 0.73rem;
  }

  .freq-card-desc {
    font-size: 0.62rem;
  }

  .player-panel {
    border: 0;
    border-radius: 22px 22px 0 0;
    background: #0d0d0f;
  }

  .panel-header {
    background: rgba(13, 13, 15, 0.9);
    backdrop-filter: blur(18px);
  }

  .visualizer-wrap {
    aspect-ratio: 1.3;
    max-height: 40vh;
  }

  .mobile-mini-player {
    margin: 0.55rem;
    margin-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(215, 185, 120, 0.23);
    border-radius: 16px;
    background: rgba(18, 18, 20, 0.92);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.52);
  }

  .mini-viz {
    border-color: var(--border);
    background: #09090a;
  }

  .mini-name {
    color: #e6e1d8;
    font-family: var(--body);
    font-size: 0.72rem;
  }

  .mini-meta {
    color: var(--amber);
    font-size: 0.52rem;
  }

  .mini-play,
  .mini-expand,
  .mobile-sheet-close {
    width: 36px;
    height: 36px;
    border-color: var(--border-bright);
  }

  .mini-play {
    border-color: var(--amber-bright);
    background: var(--amber-bright);
    color: #14110d;
  }

  .quick-access-fab {
    right: 1rem;
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: auto;
    min-height: 43px;
    padding: 0.72rem 1rem;
    font-size: 0.51rem;
  }

  .quick-access-fab::after {
    display: none;
  }

  .modal-overlay {
    padding: 0.75rem;
  }

  .modal {
    border-radius: 18px;
  }

  .site-footer {
    padding: 0 0.85rem calc(7.5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 410px) {
  .atlas-intro h1 {
    font-size: 2.55rem;
  }

  .freq-card {
    min-height: 158px;
    padding: 0.9rem;
  }

  .freq-card-hz {
    font-size: 1.35rem;
  }

  .freq-card-desc {
    -webkit-line-clamp: 2;
  }
}

@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;
  }
}
