/* Murglar Web — оформление */

:root {
  --bg: #0c0e14;
  --bg-soft: #12151d;
  --bg-soft2: rgba(255, 255, 255, 0.08);
  --panel: rgba(28, 30, 38, 0.55);
  --glass: rgba(255, 255, 255, 0.1);
  --stroke: rgba(255, 255, 255, 0.14);
  --stroke-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f6f8;
  --muted: #b7becc;
  --accent: #ffc44d;
  --accent-deep: #f08a2a;
  --danger: #ff7070;
  --radius: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  --glass-shadow:
    0 12px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(90% 55% at 8% -5%, rgba(96, 150, 255, 0.55), transparent 58%),
    radial-gradient(80% 50% at 100% 0%, rgba(255, 156, 72, 0.42), transparent 54%),
    radial-gradient(70% 45% at 60% 110%, rgba(176, 96, 255, 0.34), transparent 60%),
    #12151e;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error { color: var(--danger); font-size: 13px; }

audio { display: none; }

/* ───────────────────────── вход ───────────────────────── */

.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(22px + var(--safe-t)) 16px calc(22px + var(--safe-b));
}

.gate-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 440px;
  background: var(--glass-bg);
  background-color: rgba(48, 52, 68, 0.28);
  border: 1px solid var(--stroke-strong);
  border-radius: 32px;
  padding: 24px 22px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.gate-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #1a1500;
  background: linear-gradient(150deg, #ffe27a, var(--accent-deep));
  box-shadow: 0 12px 30px rgba(255, 176, 31, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}
.gate-logo svg { width: 28px; height: 28px; fill: currentColor; }

.gate-card h1 {
  margin: 0 0 8px;
  font-size: 27px;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.gate-card > p { margin: 8px 0 16px; color: var(--muted); font-size: 13.5px; }

.field { display: block; margin: 16px 0; }
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

input[type="password"],
input[type="text"],
input[type="url"],
input[type="search"] {
  width: 100%;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  color: var(--text);
  font-size: 16px; /* 16px — чтобы iOS не зумил */
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
  -webkit-appearance: none;
}
input[type="password"]:focus,
input[type="text"]:focus,
input[type="url"]:focus,
input[type="search"]:focus {
  border-color: rgba(255, 207, 63, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 207, 63, 0.12);
}
input::placeholder { color: #5d6477; }

.gate-help {
  margin: 12px 0;
  border-top: 1px solid var(--stroke);
  padding-top: 11px;
}
.gate-help summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}
.gate-help summary::-webkit-details-marker { display: none; }
.gate-help summary::before { content: "›"; display: inline-block; margin-right: 6px; transition: transform 0.16s; }
.gate-help[open] summary::before { transform: rotate(90deg); }
.gate-help p { margin: 10px 0; font-size: 13px; color: var(--muted); }
.gate-help a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(255, 207, 63, 0.35); }
.gate-help code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
  color: #e6e9f2;
}
.gate-steps { margin: 10px 0; padding-left: 20px; font-size: 13px; color: var(--muted); }
.gate-steps li { margin: 6px 0; }
.hint { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.gate-note { margin-top: 14px !important; font-size: 11.5px !important; opacity: 0.75; }

/* ───────────────────────── кнопки ───────────────────────── */

.btn {
  border: 1px solid var(--stroke-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(150deg, #ffe27a, var(--accent-deep));
  border-color: transparent;
  color: #1a1500;
  font-weight: 700;
  padding: 14px;
  font-size: 16px;
  box-shadow: 0 10px 26px rgba(255, 176, 31, 0.22);
}
.btn.small { padding: 7px 13px; font-size: 12.5px; border-radius: 999px; }
.btn.ghost { background: rgba(255, 255, 255, 0.05); color: #cfd4e0; }
.btn.accent {
  background: linear-gradient(150deg, #ffe27a, var(--accent-deep));
  color: #1a1500;
  border-color: transparent;
  font-weight: 700;
}
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; }

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.16s var(--ease), transform 0.12s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(0.92); background: rgba(255, 255, 255, 0.08); }

/* ───────────────────────── каркас ───────────────────────── */

.app {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  position: relative;
  isolation: isolate;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 8px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #1a1500;
  background: linear-gradient(150deg, #ffe27a, var(--accent-deep));
  box-shadow: 0 6px 18px rgba(255, 176, 31, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  flex: 0 0 auto;
}
.brand-mark svg { width: 17px; height: 17px; fill: currentColor; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.account-pill {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1a1500;
  background: linear-gradient(150deg, #ffe27a, var(--accent-deep));
  border-radius: 999px;
  padding: 5px 10px;
  box-shadow: 0 6px 16px rgba(240, 138, 42, 0.28);
}

.tabs {
  position: relative;
  display: flex;
  gap: 3px;
  margin: 0 14px 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 2px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.45s var(--ease), transform 0.45s var(--ease);
}
.tab.active {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}
.tab-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), opacity 0.3s var(--ease);
  pointer-events: none;
}
.tabs.pill-off .tab-pill { opacity: 0; }

.views {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.views::-webkit-scrollbar { width: 4px; }
.views::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 99px; }

.view {
  padding: 6px 14px 18px;
  max-width: 860px;
  margin: 0 auto;
  animation: view-in 0.48s var(--ease);
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.is-entering .track { animation: row-in 0.52s var(--ease) both; }
.is-entering .track:nth-child(1) { animation-delay: 0.02s; }
.is-entering .track:nth-child(2) { animation-delay: 0.05s; }
.is-entering .track:nth-child(3) { animation-delay: 0.08s; }
.is-entering .track:nth-child(4) { animation-delay: 0.11s; }
.is-entering .track:nth-child(5) { animation-delay: 0.14s; }
.is-entering .track:nth-child(6) { animation-delay: 0.17s; }
.is-entering .track:nth-child(7) { animation-delay: 0.2s; }
.is-entering .track:nth-child(n + 8) { animation-delay: 0.23s; }

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 12px;
}
.view-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.status {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  min-height: 16px;
}

/* ───────────────────────── поиск ───────────────────────── */

.search-bar {
  display: flex;
  gap: 8px;
  padding: 0 0 12px;
}
.search-bar input { flex: 1; min-width: 0; }

/* ───────────────────────── список треков ───────────────────────── */

.track-list { list-style: none; margin: 0; padding: 0; }

.track {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.12s var(--ease);
}
.track + .track { margin-top: 3px; }
.track:active { transform: scale(0.995); background: rgba(255, 255, 255, 0.05); }
.track.playing {
  background: linear-gradient(90deg, rgba(255, 207, 63, 0.14), rgba(255, 207, 63, 0.025));
  border-color: rgba(255, 207, 63, 0.22);
  box-shadow: inset 3px 0 0 var(--accent);
}
.track.playing .t-title { color: #ffe08a; }
.track.playing .t-cover { box-shadow: 0 0 0 1px rgba(255, 207, 63, 0.45); }

.t-cover-btn {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 11px;
}
.t-cover {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  object-fit: cover;
  background: #22252f;
  display: block;
}
.t-link {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.t-title {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-body { min-width: 0; }
.t-artist {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.t-actions { display: flex; align-items: center; gap: 2px; }
.t-dur {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-right: 2px;
}

.like-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #6f7788;
  font-size: 18px;
  line-height: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.16s var(--ease), transform 0.12s var(--ease), background 0.16s var(--ease);
}
.like-btn[data-liked="1"] { color: var(--accent); }
.like-btn:active { transform: scale(1.14); background: rgba(255, 255, 255, 0.06); }

/* ───────────────────────── плеер ───────────────────────── */

.player {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 8px 14px calc(8px + var(--safe-b));
  background: var(--glass-bg);
  background-color: rgba(48, 52, 68, 0.28);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px 28px 0 0;
  border-bottom: 0;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.player > .player-glow {
  position: absolute;
  left: 50%;
  top: -70px;
  width: 130%;
  height: 160px;
  transform: translateX(-50%);
  background: radial-gradient(55% 100% at 50% 100%, rgba(255, 199, 64, 0.2), transparent 70%);
  pointer-events: none;
}

.player-info {
  position: relative;
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}
.np-sub:not(:has(.np-link:not(:empty):not(.hidden), .np-quality:not(:empty))) { display: none; }
.np-cover {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  background: #22252f;
  flex: 0 0 auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.np-cover-btn {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  flex: 0 0 auto;
}
.np-text { flex: 1 1 auto; min-width: 0; }
.np-sub {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}
.np-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-similar { color: var(--accent); flex: 0 0 auto; font-weight: 700; }
.browse-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.browse-hero img {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  object-fit: cover;
  margin: 4px 0 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.album-card {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.album-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #22252f;
  display: block;
}
.album-card span {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-kinds { margin: 10px 0 12px; }
#radio-filter { margin: 4px 0 12px; }
.mix-head {
  margin: 16px 4px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
html.ios.has-system-volume .vol-row { display: flex; }
.np-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-artist {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.player-info .like-btn { width: 40px; height: 40px; font-size: 20px; flex: 0 0 auto; }

.seek {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 1px 0;
}
.time {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  width: 34px;
  text-align: center;
  flex: 0 0 auto;
}

/* ───────────────────────── ползунки ───────────────────────── */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 6px;
  margin: 0;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  background:
    linear-gradient(90deg, var(--accent) 0 var(--fill, 0%), rgba(255, 255, 255, 0.13) var(--fill, 0%) 100%);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s var(--ease);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: transparent;
}

input[type="range"].bipolar {
  background-image:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.42) calc(50% - 1px), rgba(255, 255, 255, 0.42) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 var(--lo, 50%), var(--accent) var(--lo, 50%) var(--hi, 50%), rgba(255, 255, 255, 0.12) var(--hi, 50%) 100%);
}

/* ───────────────────────── управление ───────────────────────── */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}
.ctrl {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #e6e9f2;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.16s var(--ease), color 0.16s var(--ease);
}
.ctrl svg { width: 24px; height: 24px; display: block; }
.ctrl.ghost { color: #9aa2b4; }
.ctrl.ghost[data-on="1"] { color: var(--accent); background: rgba(255, 207, 63, 0.1); }
.ctrl:active { transform: scale(0.9); background: rgba(255, 255, 255, 0.07); }

.ctrl.play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #1a1500;
  background: linear-gradient(160deg, #ffe27a, var(--accent-deep));
  box-shadow: 0 10px 26px rgba(255, 176, 31, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.ctrl.play svg { width: 22px; height: 22px; }
.ctrl.play:active { background: linear-gradient(160deg, #ffe27a, var(--accent-deep)); }
.ctrl.play .i-pause { display: none; }
.ctrl.play[data-playing="1"] .i-play { display: none; }
.ctrl.play[data-playing="1"] .i-pause { display: block; }

.ctrl[data-one="1"]::after {
  content: "1";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1500;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
}

.vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
html.ios .vol-row { display: none; }
.vol-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 auto;
}
.vol-icon svg { width: 19px; height: 19px; }
.vol-row input[type="range"] { height: 5px; }
.vol-row input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; }
.vol-row input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; }

.eq-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: #dfe3ee;
}
.eq-btn svg { width: 15px; height: 15px; }
.eq-btn svg circle { fill: var(--panel); }

#player-error { margin-top: 6px; }

/* ───────────────────────── эквалайзер ───────────────────────── */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(3, 5, 9, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  align-items: end;
  animation: sheet-fade 0.4s var(--ease);
}
@keyframes sheet-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  background: var(--glass-bg);
  background-color: rgba(40, 44, 58, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding: 8px 18px calc(18px + var(--safe-b));
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  animation: sheet-up 0.52s var(--ease);
}
@keyframes sheet-up {
  from { transform: translateY(110%); }
  to { transform: none; }
}

.sheet-grab {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  margin: 3px auto 12px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sheet-head h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.sheet-head .status { margin-top: 3px; }

.preset-group { margin-top: 16px; }
.preset-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.presets { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #dfe3ee;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.chip:active { transform: scale(0.96); }
.chip.ref { border-color: rgba(255, 168, 56, 0.35); }
.chip.active {
  background: linear-gradient(150deg, #ffe27a, var(--accent-deep));
  border-color: transparent;
  color: #1a1500;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(255, 176, 31, 0.24);
}

.eq-bands {
  display: grid;
  gap: 15px;
  margin: 20px 0 10px;
}
.eq-band {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 58px;
  gap: 12px;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
}
.eq-band > span { letter-spacing: 0.02em; display: grid; gap: 1px; }
.eq-band > span b { font-weight: 700; color: var(--text); font-size: 12px; }
.eq-band > span small { font-size: 10px; color: var(--muted); font-weight: 600; }
.eq-band output {
  text-align: right;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.eq-band input[type="range"] { height: 6px; }

.admin-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--stroke); }
.user-form { display: grid; gap: 8px; margin: 10px 0; }
.user-list { list-style: none; margin: 8px 0 16px; padding: 0; }
.user-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
}
.user-meta { display: grid; gap: 2px; min-width: 0; }
.user-meta b { font-size: 15px; }
.user-meta span { color: var(--muted); font-size: 12px; }
.user-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.user-edit { display: flex; gap: 8px; }
.user-edit input { flex: 1; min-width: 0; }
.np-quality {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.eq-note {
  min-height: 17px;
  margin: 4px 0 12px;
  font-size: 12px;
  line-height: 1.4;
}

/* ───────────────────────── десктоп ───────────────────────── */

@media (min-width: 760px) {
  body { padding: 18px 18px 0; }
  .app {
    max-width: 920px;
    height: calc(100dvh - 18px);
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    background: rgba(12, 14, 20, 0.55);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
  }
  .view { padding: 8px 22px 22px; }
  .tabs { margin-inline: 22px; }
  .topbar { padding-inline: 24px; }
  .player { padding-inline: 24px; }
  .track:hover { background: rgba(255, 255, 255, 0.045); }
  .track.playing:hover { background: linear-gradient(90deg, rgba(255, 207, 63, 0.16), rgba(255, 207, 63, 0.035)); }
  .gate-card { padding: 28px; }
}

.player::before,
.gate-card::before,
.sheet-card::before,
.tabs::before {
  content: "";
  position: absolute;
  inset: -30% 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.2) 48%, transparent 58%);
  transform: translateX(-60%);
  animation: sheen 9s var(--ease) infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes sheen {
  0%, 62% { transform: translateX(-60%); }
  82%, 100% { transform: translateX(60%); }
}
.player > :not(.player-glow),
.gate-card > *,
.sheet-card > * { position: relative; z-index: 1; }

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