/* Soundtracked web app */

:root {
  --bg: #000;
  --panel: #141414;
  --panel-2: #1f1f1f;
  --panel-3: #2a2a2a;
  --line: rgba(255, 255, 255, 0.1);
  --text: #fff;
  --soft: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.5);
  --yellow: #ffd60a;
  --pink: #ff375f;
  --red: #ff453a;
  --green: #30d158;
  --radius: 16px;
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
  --tabbar-h: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--yellow); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--yellow);
  color: #000;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: 22px;
  margin-right: auto;
}
.record {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid currentColor;
  display: grid;
  place-items: center;
  flex: none;
}
.record::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }

.topnav { display: flex; gap: 4px; }
.topnav a {
  color: rgba(0, 0, 0, 0.72);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
}
.topnav a:hover { color: #000; background: rgba(0, 0, 0, 0.08); }
.topnav a[aria-current="page"] { color: var(--yellow); background: #000; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  text-decoration: none;
  flex: none;
}
.icon-btn:hover { background: rgba(127, 127, 127, 0.16); }
.icon-btn svg { width: 24px; height: 24px; }
.badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2px solid var(--yellow);
}

/* Bottom tab bar on phones */
.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}
.tabbar nav { display: grid; grid-template-columns: repeat(4, 1fr); }
.tabbar a {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--faint);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 0;
  position: relative;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--yellow); }
.tabbar .badge { top: 0; right: calc(50% - 22px); border-color: #000; }

/* ---------- Layout ---------- */

main.view {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px calc(80px + var(--tabbar-h));
  min-height: calc(100vh - var(--header-h));
}
.narrow { max-width: 720px; margin-inline: auto; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.page-head h1 { margin: 0; margin-right: auto; }
h1 { font-family: var(--display); font-weight: 900; font-stretch: 110%; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 16px; }
h2.section-title {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 108%;
  font-size: 26px;
  color: var(--yellow);
  margin: 0;
  line-height: 1.2;
}
.section { display: grid; gap: 14px; margin-bottom: 38px; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-row a, .link-btn { color: var(--yellow); font-weight: 800; text-decoration: none; background: none; border: 0; padding: 0; font-size: 15px; }
.link-btn:hover, .section-row a:hover { text-decoration: underline; }
.muted { color: var(--soft); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap-row { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--yellow);
  font-weight: 800;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  margin-bottom: 16px;
}

/* ---------- Buttons & inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-primary { background: var(--yellow); color: #000; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-dark { background: var(--panel-3); color: var(--text); }
.btn-dark:hover { background: #333; }
.btn-outline { background: transparent; color: var(--yellow); box-shadow: inset 0 0 0 1.5px var(--yellow); }
.btn-outline.on { background: var(--yellow); color: #000; }
.btn-danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.btn-danger.solid { background: var(--red); color: #fff; box-shadow: none; }
.btn-block { width: 100%; }
.btn-small { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn svg { width: 18px; height: 18px; }

.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 800; font-size: 14px; color: var(--soft); }
.input, textarea.input, select.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
}
.input:focus { border-color: var(--yellow); }
textarea.input { resize: vertical; min-height: 110px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.input-icon .input { padding-left: 42px; }
.hint { font-size: 13px; color: var(--faint); }
.error { color: var(--red); font-weight: 700; }
.success { color: var(--green); font-weight: 700; }

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--panel-2);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--soft);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 14px;
}
.segmented button[aria-pressed="true"] { background: var(--yellow); color: #000; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.chip:hover { background: rgba(255, 255, 255, 0.18); }
.chip.on { background: var(--yellow); color: #000; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }

/* ---------- Cards & rows ---------- */

.card { background: var(--panel); border-radius: var(--radius); padding: 16px; }
.card-link { display: block; color: inherit; text-decoration: none; border-radius: var(--radius); transition: background 0.15s; }
.card-link:hover { background: var(--panel-2); }

.cover {
  width: var(--s, 70px);
  height: var(--s, 70px);
  border-radius: 10px;
  object-fit: cover;
  background: var(--panel-3);
  flex: none;
}
.cover-ph {
  width: var(--s, 70px);
  height: var(--s, 70px);
  border-radius: 10px;
  flex: none;
  background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.7);
}
.cover-ph svg { width: 40%; height: 40%; }

.activity {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--panel);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
}
.activity:hover { background: var(--panel-2); }
.activity .who { color: var(--soft); font-size: 14px; }
.activity .title { font-weight: 800; font-size: 18px; line-height: 1.25; }
.activity .artist { color: var(--soft); }
.activity .review { color: var(--soft); font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chev { color: var(--faint); }
.chev svg { width: 18px; height: 18px; }

.stars { display: inline-flex; gap: 1px; color: var(--yellow); line-height: 1; white-space: nowrap; }
.stars .off { color: rgba(255, 255, 255, 0.2); }
.stars .half { position: relative; color: rgba(255, 255, 255, 0.2); }
.stars .half::before { content: "★"; position: absolute; inset: 0; width: 50%; overflow: hidden; color: var(--yellow); }
.heart { color: var(--pink); }

.shelf { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shelf > * { scroll-snap-align: start; }
.tile { width: 150px; flex: none; color: inherit; text-decoration: none; display: grid; gap: 6px; align-content: start; }
.tile .cover, .tile .cover-ph { --s: 150px; border-radius: 12px; }
.tile .t { font-weight: 800; font-size: 14px; line-height: 1.25; }
.tile .a { font-size: 13px; color: var(--soft); }
.tile .m { font-size: 12px; color: var(--yellow); font-weight: 700; }
.tile:hover .t { text-decoration: underline; }
.tile.small { width: 104px; }
.tile.small .cover, .tile.small .cover-ph { --s: 104px; }

.skeleton { background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.list { display: grid; gap: 4px; }
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}
a.list-row:hover, button.list-row:hover { background: var(--panel); }
button.list-row { width: 100%; background: none; border: 0; text-align: left; }
.list-row .t { font-weight: 800; }
.list-row .s { color: var(--soft); font-size: 14px; }
.list-row .g { color: var(--yellow); font-size: 12px; font-weight: 800; }
.rank { width: 34px; text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--faint); flex: none; }
.rank.top { color: var(--yellow); }

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

.empty { text-align: center; padding: 48px 16px; display: grid; gap: 10px; justify-items: center; color: var(--soft); }
.empty svg { width: 44px; height: 44px; color: var(--yellow); }
.empty h3 { margin: 0; color: var(--text); font-size: 20px; }

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 214, 10, 0.25);
  border-top-color: var(--yellow);
  animation: spin 0.8s linear infinite;
  margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Avatars ---------- */

.avatar {
  width: var(--s, 40px);
  height: var(--s, 40px);
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  color: #000;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: calc(var(--s, 40px) * 0.42);
  overflow: hidden;
}

/* ---------- Music detail ---------- */

.detail-hero { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: end; margin-bottom: 32px; }
.detail-hero .cover { --s: 260px; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.detail-hero .kind { color: var(--yellow); font-weight: 800; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.detail-hero h1 { margin: 6px 0 4px; font-size: clamp(30px, 4.6vw, 48px); }
.detail-hero .artist { font-size: 20px; color: var(--soft); }
.detail-hero .artist a { color: inherit; }
.community { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.community b { color: var(--yellow); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 32px; align-items: start; }

.rate-card { background: var(--panel); border-radius: 20px; padding: 22px; display: grid; gap: 18px; }
.rate-card h2 { margin: 0; font-size: 22px; }

.star-input { display: inline-flex; gap: 4px; touch-action: none; user-select: none; cursor: pointer; }
.star-input .s { position: relative; width: 44px; height: 44px; font-size: 44px; line-height: 44px; color: rgba(255, 255, 255, 0.18); }
.star-input .s::before { content: "★"; position: absolute; inset: 0; }
.star-input .s.full::before { color: var(--yellow); }
.star-input .s.half::after { content: "★"; position: absolute; inset: 0; width: 50%; overflow: hidden; color: var(--yellow); }
.star-input:focus-visible { outline-offset: 6px; }

.love-btn { border: 0; background: var(--panel-3); color: var(--soft); border-radius: 999px; padding: 10px 16px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.love-btn.on { background: rgba(255, 55, 95, 0.18); color: var(--pink); }
.love-btn svg { width: 18px; height: 18px; }

.tracklist { counter-reset: t; display: grid; gap: 2px; }
.track { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 15px; }
.track:hover { background: var(--panel); }
.track .n { color: var(--faint); font-variant-numeric: tabular-nums; text-align: right; }
.track .d { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 14px; }
.track.fav { background: rgba(255, 214, 10, 0.1); }
.track.fav .n { color: var(--yellow); }

.review-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px; background: var(--panel); border-radius: 16px; color: inherit; text-decoration: none; }
a.review-card:hover { background: var(--panel-2); }
.review-card .name { font-weight: 800; }
.review-card .date { color: var(--faint); font-size: 13px; }
.review-card .text { color: rgba(255, 255, 255, 0.88); white-space: pre-wrap; word-break: break-word; }
.review-card .tags { color: rgba(255, 214, 10, 0.85); font-size: 13px; }
.review-card .counts { display: flex; gap: 14px; color: var(--faint); font-size: 13px; font-weight: 700; }

/* ---------- Review detail ---------- */

.comment { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment .name { font-weight: 800; }
.comment .time { color: var(--faint); font-size: 12px; }
.comment .text { white-space: pre-wrap; word-break: break-word; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 48px; height: 48px; }

/* ---------- Profile ---------- */

.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 28px; }
.profile-head .avatar { --s: 112px; }
.profile-head h1 { margin: 0; }
.handle { color: var(--soft); font-weight: 700; }
.bio { margin: 8px 0 0; color: rgba(255, 255, 255, 0.86); white-space: pre-wrap; }
.numbers { display: flex; gap: 22px; margin-top: 12px; }
.numbers a, .numbers div { color: inherit; text-decoration: none; }
.numbers b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.numbers span { color: var(--soft); font-size: 13px; }
.photo-wrap { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; }
.photo-wrap .cam { position: absolute; right: 2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: #000; display: grid; place-items: center; border: 3px solid #000; }
.photo-wrap .cam svg { width: 16px; height: 16px; }

.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--panel); border-radius: 16px; padding: 16px; display: grid; gap: 4px; }
.stat svg { width: 22px; height: 22px; color: var(--yellow); }
.stat b { font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--soft); font-size: 13px; }

.mixtape-cover { width: var(--s, 150px); height: var(--s, 150px); border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; flex: none; background: var(--panel-3); }
.mixtape-cover.one { grid-template-columns: 1fr; }
.mixtape-cover img { width: 100%; height: 100%; object-fit: cover; }
.mixtape-cover.empty-tape { grid-template-columns: 1fr; place-items: center; background: linear-gradient(135deg, #ffd60a, #ff9f0a); color: rgba(0, 0, 0, 0.8); }
.mixtape-cover.empty-tape svg { width: 40%; height: 40%; }
.new-tile { width: 150px; height: 150px; border-radius: 14px; border: 2px dashed var(--yellow); display: grid; place-items: center; color: var(--yellow); }
.new-tile svg { width: 36px; height: 36px; }

/* ---------- Notifications ---------- */

.notif { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px; border-radius: 16px; color: inherit; text-decoration: none; }
.notif:hover { background: var(--panel); }
.notif.new { background: rgba(255, 214, 10, 0.08); }
.notif .av { position: relative; }
.notif .kind { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #000; color: #000; }
.notif .kind svg { width: 11px; height: 11px; }
.notif .quote { color: var(--soft); font-size: 14px; }
.notif .time { color: var(--faint); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.notif .time .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }

/* ---------- Menus, dialogs, toasts ---------- */

.menu-wrap { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  z-index: 40;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 11px 12px; border-radius: 10px; font-weight: 700; text-align: left; }
.menu button:hover { background: var(--panel-3); }
.menu button.danger { color: var(--red); }
.menu svg { width: 18px; height: 18px; }

dialog.sheet {
  border: 0;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  border-radius: 22px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(3px); }
.sheet-inner { padding: 22px; display: grid; gap: 16px; max-height: calc(100vh - 48px); overflow-y: auto; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h2 { margin: 0; margin-right: auto; font-size: 21px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--tabbar-h));
  transform: translateX(-50%);
  background: var(--text);
  color: #000;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  z-index: 60;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* ---------- Auth ---------- */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: radial-gradient(700px 400px at 50% 0%, rgba(255, 214, 10, 0.14), transparent 70%), #000;
}
.auth-card { width: min(420px, 100%); display: grid; gap: 16px; }
.auth-card .brand { display: grid; justify-items: center; gap: 10px; margin-bottom: 8px; text-align: center; }
.auth-card .brand .record { width: 64px; height: 64px; border-width: 6px; color: var(--yellow); }
.auth-card .brand .record::after { width: 20px; height: 20px; }
.auth-card .brand h1 { color: var(--yellow); margin: 0; font-size: 38px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn { background: #fff; color: #000; }
.google-btn svg { width: 18px; height: 18px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .record { width: 72px; height: 72px; border-width: 7px; color: var(--yellow); animation: spin 1.6s linear infinite; }
.boot .record::after { width: 22px; height: 22px; }

/* ---------- Settings ---------- */

.settings-group { background: var(--panel); border-radius: 16px; overflow: hidden; }
.settings-group h3 { margin: 0; padding: 14px 16px 6px; font-size: 13px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.setting { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font-weight: 700; }
.setting:first-of-type { border-top: 0; }
a.setting:hover, button.setting:hover { background: var(--panel-2); }
.setting svg { width: 20px; height: 20px; color: var(--yellow); flex: none; }
.setting .v { margin-left: auto; color: var(--soft); font-weight: 500; }
.setting.danger { color: var(--red); }
.setting.danger svg { color: var(--red); }

.edit-item { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--panel-2); border-radius: 12px; }
.edit-item .cover { --s: 44px; border-radius: 8px; }
.edit-item .icon-btn { width: 34px; height: 34px; color: var(--soft); }
.edit-item .icon-btn svg { width: 18px; height: 18px; }
.edit-item.dragging { opacity: 0.4; }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-3); transition: background 0.15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + span { background: var(--yellow); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 180px 1fr; gap: 20px; }
  .detail-hero .cover { --s: 180px; }
}

@media (max-width: 700px) {
  :root { --header-h: 56px; --tabbar-h: 64px; }
  .topnav { display: none; }
  .tabbar { display: block; }
  .logo { font-size: 20px; }
  main.view { padding-top: 20px; padding-inline: 16px; }
  .detail-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .detail-hero .cover { --s: min(240px, 70vw); }
  .profile-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .numbers { justify-content: center; }
  .name-row { justify-content: center; }
  .name-row .grow { display: none; }
  .profile-actions { justify-content: center; }
  .stat-cards { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; }
  .stat b { font-size: 22px; }
  .tile { width: 132px; }
  .tile .cover, .tile .cover-ph { --s: 132px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .star-input .s { width: 40px; height: 40px; font-size: 40px; line-height: 40px; }
  .activity .title { font-size: 16px; }
  .activity .cover { --s: 64px; }
}

/* ---------- Welcome (logged-out) screen ---------- */

.auth.welcome {
  grid-template-columns: minmax(0, 460px) minmax(0, 400px);
  justify-content: center;
  align-content: center;
  gap: 32px 72px;
}
.welcome-pitch { display: grid; gap: 28px; justify-items: center; text-align: center; }
.pitch-text h2 { font-family: var(--display); font-weight: 900; font-stretch: 115%; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin: 0 0 10px; color: var(--yellow); }
.pitch-text p { margin: 0 auto 8px; max-width: 30em; color: var(--soft); }
.pitch-phone {
  width: 250px; border-radius: 36px; padding: 9px; transform: rotate(-3deg);
  background: linear-gradient(145deg, #3a3628, #15130d);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.pp-top { background: var(--yellow); color: #000; border-radius: 28px 28px 0 0; padding: 26px 14px 12px; display: flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 900; font-size: 17px; }
.pp-top .record { width: 20px; height: 20px; border-width: 2px; }
.pp-top .record::after { width: 6px; height: 6px; }
.pp-body { background: #000; border-radius: 0 0 28px 28px; padding: 10px; display: grid; gap: 8px; text-align: left; }
.pp-card { display: grid; grid-template-columns: 46px 1fr; gap: 9px; align-items: center; background: #1d1d1d; border-radius: 12px; padding: 8px; }
.pp-cover { width: 46px; height: 46px; border-radius: 8px; }
.pp-card small { display: block; color: rgba(255, 255, 255, 0.6); font-size: 10px; }
.pp-card b { display: block; font-size: 12px; }
.pp-card em { font-style: normal; color: var(--yellow); font-size: 11px; letter-spacing: 1px; }
.welcome-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; font-size: 13px; color: var(--faint); margin-top: 12px; }
.welcome-links a { color: var(--soft); text-decoration: none; }
.welcome-links a:hover { color: var(--yellow); }
@media (max-width: 860px) {
  .auth.welcome { grid-template-columns: minmax(0, 420px); }
  .welcome-pitch { order: 2; }
  .pitch-phone { display: none; }
  .auth-card { order: 1; }
  .welcome-links { order: 3; }
}

/* ---------- Landing page (signed out) ---------- */

.landing { background: #0b0b0b; min-height: 100vh; }

.l-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 22px 24px;
}
.l-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 26px; letter-spacing: -0.01em; }
.l-logo .record { width: 32px; height: 32px; color: var(--yellow); }
.l-nav nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; }
.l-nav nav a, .l-nav nav button {
  background: none; border: 0; padding: 6px 0; color: rgba(255, 255, 255, 0.85);
  font: 700 15px var(--font); text-decoration: none;
}
.l-nav nav button[data-auth="signup"] { padding: 8px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--yellow); color: var(--yellow); }
.l-nav nav button[data-auth="signup"]:hover { background: var(--yellow); color: #000; }
.l-nav nav a:hover, .l-nav nav button:hover { color: var(--yellow); }

.l-hero { position: relative; min-height: min(760px, 92vh); display: grid; align-items: end; overflow: hidden; background: #111; }
.l-wall { position: absolute; inset: -10%; }
.l-wall-grid {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px;
  transform: rotate(-8deg) scale(1.12); transform-origin: center;
  animation: l-drift 60s linear infinite alternate;
}
.l-wall-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; filter: saturate(1.1); }
@keyframes l-drift { to { transform: rotate(-8deg) scale(1.12) translateX(-6%); } }
.l-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,11,0.8) 0%, rgba(11,11,11,0.25) 28%, rgba(11,11,11,0.5) 60%, #0b0b0b 100%),
    radial-gradient(ellipse at 50% 80%, rgba(0,0,0,0.55), transparent 70%);
}
.l-hero-text { position: relative; z-index: 2; text-align: center; padding: 0 20px 64px; max-width: 980px; margin: 0 auto; }
.l-hero h1 {
  font-family: var(--display); font-weight: 900; font-stretch: 125%; font-size: clamp(38px, 6.4vw, 78px);
  line-height: 0.98; letter-spacing: -0.035em; margin: 0 0 18px; color: #fff; text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,0.55);
}
.l-hero h1 span { color: var(--yellow); }
.l-lede { margin: 0 auto 28px; max-width: 34em; color: rgba(255,255,255,0.86); font-size: clamp(17px, 2vw, 20px); line-height: 1.5; }
.l-cta {
  border: 0; border-radius: 999px; background: var(--yellow); color: #000;
  font: 800 17px var(--font); padding: 16px 30px;
  box-shadow: 0 10px 30px rgba(255, 214, 10, 0.25);
}
.l-cta:hover { filter: brightness(1.07); }
.l-sub { margin: 18px 0 0; color: rgba(255,255,255,0.72); font-size: 16px; }

.l-section { max-width: 1180px; margin: 0 auto; padding: 56px 24px 8px; }
.l-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.14); padding-bottom: 8px; margin-bottom: 18px; }
.l-row-head h2 { margin: 0; font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 24px; letter-spacing: -0.01em; color: var(--yellow); }
.l-row-head span { font-size: 13px; color: var(--faint); }

.l-posters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.l-poster button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset; }
.l-poster img, .l-ph { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.l-rank { position: absolute; left: 8px; top: 8px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 6px; background: rgba(0,0,0,0.72); color: var(--yellow); font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.l-hover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 12px; text-align: left; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.88)); opacity: 0; transition: opacity 0.15s; }
.l-hover b { font-size: 14px; line-height: 1.2; color: #fff; }
.l-hover small { color: rgba(255,255,255,0.7); font-size: 12px; }
.l-hover em { font-style: normal; color: var(--yellow); font-weight: 800; font-size: 12px; margin-top: 4px; }
.l-poster button:hover .l-hover, .l-poster button:focus-visible .l-hover { opacity: 1; }
.l-poster button:hover { box-shadow: 0 0 0 3px var(--yellow); }

.l-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.l-feature { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; background: #1a1a1a; border-radius: 8px; padding: 20px; }
.l-ficon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,214,10,0.12); color: var(--yellow); }
.l-ficon svg { width: 22px; height: 22px; }
.l-feature h3 { margin: 0 0 4px; font-size: 17px; }
.l-feature p { margin: 0; color: var(--soft); font-size: 14.5px; line-height: 1.5; }

.l-closing { text-align: center; padding-top: 72px; padding-bottom: 40px; }
.l-closing h2 { font-family: var(--display); font-weight: 900; font-stretch: 125%; font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -0.03em; margin: 0 0 22px; }
.l-closing p { color: var(--soft); margin: 18px 0 0; }

.l-footer { max-width: 1180px; margin: 40px auto 0; padding: 28px 24px 48px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--faint); font-size: 13px; }
.l-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.l-footer a { color: var(--soft); text-decoration: none; }
.l-footer a:hover { color: var(--yellow); }
.l-footer p { margin: 0; }

.auth-dialog { width: min(440px, calc(100vw - 32px)); }
.auth-dialog .auth-card { width: auto; position: relative; padding: 28px 26px; }
.auth-close { position: absolute; top: 10px; right: 10px; color: var(--soft); }
.auth-dialog .brand h1 { font-size: 30px; }

@media (max-width: 900px) {
  .l-posters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .l-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-wall-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 600px) {
  .l-nav { padding: 16px; }
  .l-logo { font-size: 20px; }
  .l-logo .record { width: 26px; height: 26px; }
  .l-nav nav a[href="/about"], .l-nav nav a[href="#trending"], .l-nav nav button[data-auth="signup"] { display: none; }
  .l-row-head span { display: none; }
  .l-nav nav { gap: 4px 14px; }
  .l-nav nav a, .l-nav nav button { font-size: 14px; }
  .l-hero { min-height: 620px; }
  .l-hero-text { padding-bottom: 44px; }
  .l-wall-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .l-posters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .l-features { grid-template-columns: 1fr; }
  .l-section { padding: 40px 16px 4px; }
  .l-cta { font-size: 16px; padding: 14px 24px; }
}
@media (prefers-reduced-motion: reduce) { .l-wall-grid { animation: none; } }
