:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #171a20;
  --panel-2: #20242c;
  --line: #313743;
  --text: #f2f4f8;
  --muted: #a8b0bf;
  --soft: #778194;
  --mint: #64e0bd;
  --pink: #ff77a9;
  --amber: #f4c96a;
  --danger: #ff7171;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(100, 224, 189, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(255, 119, 169, 0.15), transparent 30rem),
    var(--bg);
  color: var(--text);
}

.origiloid-privacy {
  position: fixed;
  right: 16px;
  bottom: 12px;
  z-index: 20;
  color: var(--muted);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-underline-offset: 3px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 92px;
}

.top-panel {
  padding: 18px 0 10px;
}

.brand-row {
  display: grid;
  grid-template-columns: 48px 1fr 42px;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(100, 224, 189, 0.4);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(100, 224, 189, 0.28), rgba(255, 119, 169, 0.2));
  color: #ffffff;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.search-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 32, 0.86);
  box-shadow: var(--shadow);
}

.site-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10, 12, 16, 0.72);
}

.site-switcher a {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.site-switcher a:hover,
.site-switcher a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.site-switcher a.active {
  color: #07110e;
  background: var(--mint);
}

.search-card label,
.settings label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
}

input,
select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101319;
  color: var(--text);
}

input {
  height: 48px;
  padding: 0 13px;
}

select {
  height: 38px;
  padding: 0 30px 0 10px;
}

.search-row button,
.dialog-actions button {
  border: 0;
  border-radius: 8px;
  background: var(--mint);
  color: #06110d;
  font-weight: 900;
}

.search-row button {
  font-size: 24px;
}

.quick-tags {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.quick-tags button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 12px;
}

.filter-block,
.toggle {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.filter-block span,
.toggle span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-block select {
  width: 100%;
}

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

.toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--mint);
}

.toggle span {
  margin: 0;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.tabs button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 900;
}

.tabs button.active {
  border-color: rgba(100, 224, 189, 0.75);
  background: rgba(100, 224, 189, 0.16);
  color: var(--text);
}

.status {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.song-list {
  display: grid;
  gap: 10px;
}

.song-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 32, 0.9);
}

.thumb {
  position: relative;
  width: 84px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(100, 224, 189, 0.28), rgba(244, 201, 106, 0.18), rgba(255, 119, 169, 0.2));
}

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

.score-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--mint);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
}

.song-main {
  min-width: 0;
}

.song-title {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.28;
}

.song-meta,
.reason {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 800;
}

.chip.hot {
  background: rgba(255, 119, 169, 0.16);
  color: #ffc0d7;
}

.chip.good {
  background: rgba(100, 224, 189, 0.16);
  color: #b7ffe9;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  margin-top: 8px;
}

.open-link,
.save-button {
  display: grid;
  place-items: center;
  height: 38px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 900;
}

.open-link {
  background: #ffffff;
  color: #12151a;
}

.save-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.save-button.saved {
  border-color: rgba(244, 201, 106, 0.65);
  color: var(--amber);
}

.ad-slot {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: min(calc(100% - 32px), 448px);
  height: 52px;
  border: 1px dashed #596272;
  border-radius: 8px;
  background: rgba(14, 16, 20, 0.94);
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.hidden {
  display: none;
}

dialog {
  width: min(calc(100% - 28px), 440px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.settings {
  padding: 16px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.settings p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settings input {
  width: 100%;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.dialog-actions button {
  height: 42px;
}

#clearKey {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 28px;
  }
}
