:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1117;
  color: #e6edf3;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #0d1117;
}

body[data-theme="light"] {
  background: #f6f8fa;
  color: #24292f;
}

body.auth-pending .app-header,
body.auth-pending main,
body.auth-pending .bottom-nav {
  display: none;
}

body.authenticated .auth-view {
  display: none;
}

button,
input,
select {
  font: inherit;
}

input[type="file"] {
  min-height: auto;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #f2cc60;
  color: #17130a;
  font-weight: 700;
}

button.secondary {
  background: #21262d;
  color: #e6edf3;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.danger-button {
  background: #da3633;
  color: #ffffff;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0 12px;
  background: #161b22;
  color: #e6edf3;
}

body[data-theme="light"] input,
body[data-theme="light"] select {
  border-color: #d0d7de;
  background: #ffffff;
  color: #24292f;
}

label {
  color: #8b949e;
  font-size: 0.9rem;
  font-weight: 700;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 16px 10px;
}

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

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #58a6ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2rem;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

h3 {
  margin: 24px 0 10px;
  color: #c9d1d9;
  font-size: 1rem;
}

main {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 10px 16px 96px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-title,
.toolbar,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-actions {
  margin-top: 18px;
}

.profile-actions button {
  flex: 1;
}

.profile-friends {
  margin-top: 26px;
}

.profile-friends .section-title {
  margin-bottom: 12px;
}

.social-panel {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #161b22;
}

.friend-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 8px;
}

.friend-section-title h4 {
  margin: 0;
  color: #c9d1d9;
  font-size: 0.9rem;
}

.subtle-count {
  color: #8b949e;
  font-size: 0.78rem;
  font-weight: 700;
}

.title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.collection-actions {
  width: 100%;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 6px;
}

.collection-actions .pill,
.collection-actions button {
  flex: 0 1 auto;
  min-width: 0;
}

.filter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.filter-header label {
  display: block;
  margin-bottom: 4px;
}

.filter-subtitle {
  margin: 0;
  color: #8b949e;
  font-size: 0.85rem;
}

.collection-filter-card {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #161b22;
}

.collection-filter-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.collection-filter-primary button,
.collection-filter-primary select,
.collection-filter-primary input {
  width: 100%;
}

.collection-filter-summary {
  margin-bottom: 12px;
}

.compact-toggle,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c9d1d9;
  font-size: 0.9rem;
}

.compact-toggle input,
.inline-check input {
  margin: 0;
}

.advanced-filter-grid {
  display: grid;
  gap: 10px;
}

.advanced-filter-panel {
  display: grid;
  gap: 10px;
  padding: 10px 0 0;
  border-top: 1px solid #30363d;
  margin-top: 10px;
}

.scan-toolbar {
  justify-content: center;
  margin-top: 12px;
}

.load-more-toolbar {
  justify-content: center;
  margin-top: 14px;
}

#scanToggleButton {
  width: min(220px, 100%);
}

.section-title {
  justify-content: space-between;
  margin-bottom: 16px;
}

.inline-form input {
  flex: 1;
}

.inline-form select {
  min-width: 140px;
}

.stack {
  display: grid;
  gap: 8px;
}

.hidden {
  display: none;
}

.auth-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px 16px;
}

.auth-panel {
  width: min(420px, 100%);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 18px;
  background: #161b22;
}

.auth-panel h2 {
  margin-bottom: 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #30363d;
}

.auth-tab {
  border-radius: 0;
  background: #0d1117;
  color: #8b949e;
}

.auth-tab.active {
  background: #f2cc60;
  color: #17130a;
}

.auth-form {
  margin-top: 12px;
}

.pill {
  border: 1px solid #30363d;
  border-radius: 999px;
  padding: 6px 10px;
  color: #8b949e;
  font-size: 0.8rem;
  white-space: nowrap;
}

.icon-button {
  width: 44px;
  padding: 0;
  background: #21262d;
  color: #e6edf3;
}

.profile-button {
  overflow: hidden;
  border-radius: 50%;
  aspect-ratio: 1;
}

.profile-button,
.avatar,
.large-avatar {
  position: relative;
  overflow: hidden;
}

.profile-button.has-image,
.avatar.has-image {
  border: 1px solid #30363d;
  background: transparent;
}

.profile-request-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #0d1117;
  border-radius: 999px;
  padding: 0 4px;
  background: #f85149;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

body[data-theme="light"] .profile-request-badge {
  border-color: #f6f8fa;
}

.avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--avatar-position-x, 50%) var(--avatar-position-y, 50%);
  transform: scale(var(--avatar-zoom, 1));
  transform-origin: var(--avatar-position-x, 50%) var(--avatar-position-y, 50%);
  pointer-events: none;
  max-width: none;
}

.large-avatar .avatar-image {
  width: 100%;
  height: 100%;
}

.profile-panel {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #161b22;
}

.profile-panel h3 {
  margin: 0 0 4px;
}

.profile-panel p {
  margin: 0;
  color: #8b949e;
  font-size: 0.9rem;
}

.avatar {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #f2cc60;
  color: #17130a;
  font-size: 1.4rem;
  font-weight: 900;
}

.avatar-button {
  border: 0;
  padding: 0;
}

.large-avatar {
  display: grid;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: transparent;
  color: #17130a;
  font-size: 4rem;
  font-weight: 900;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.large-avatar:active {
  cursor: grabbing;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 4, 9, 0.56);
}

.settings-list {
  display: grid;
  gap: 18px;
}

.settings-group {
  display: grid;
  gap: 8px;
}

.settings-group > h3 {
  margin: 0;
  color: #58a6ff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #161b22;
}

.settings-row > button,
.settings-row > select,
.settings-control {
  width: 100%;
}

.settings-control {
  display: grid;
  gap: 8px;
}

.settings-row h3 {
  margin: 0 0 4px;
}

.settings-row h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.settings-row p {
  margin: 0;
  color: #8b949e;
  font-size: 0.9rem;
}

.danger-row {
  border-color: #7f1d1d;
}

.danger-group > h3 {
  color: #f85149;
}

body[data-theme="light"] .auth-panel,
body[data-theme="light"] .profile-panel,
body[data-theme="light"] .settings-row,
body[data-theme="light"] .collection-filter-card,
body[data-theme="light"] .recent-feed-copy,
body[data-theme="light"] .release-card,
body[data-theme="light"] .friend-card,
body[data-theme="light"] .feed-item,
body[data-theme="light"] .release-detail-hero,
body[data-theme="light"] .release-detail-card,
body[data-theme="light"] .release-detail-section,
body[data-theme="light"] .release-track-row,
body[data-theme="light"] .social-panel,
body[data-theme="light"] .recent-list-item,
body[data-theme="light"] .metrics article,
body[data-theme="light"] .modal-panel {
  border-color: #d0d7de;
  background: #ffffff;
}

body[data-theme="light"] .nav-button {
  background: #ffffff;
  color: #57606a;
}

body[data-theme="light"] .segmented-control {
  border-color: #d0d7de;
  background: #ffffff;
}

body[data-theme="light"] .bottom-nav {
  border-top-color: #d0d7de;
  background: #d8dee4;
}

body[data-theme="light"] .pill,
body[data-theme="light"] .settings-row p,
body[data-theme="light"] .profile-panel p,
body[data-theme="light"] .recent-feed-date,
body[data-theme="light"] .recent-feed-artist,
body[data-theme="light"] .recent-feed-format,
body[data-theme="light"] .recent-feed-copy small,
body[data-theme="light"] .feed-listener small,
body[data-theme="light"] .release-detail-artist,
body[data-theme="light"] .release-detail-card dt,
body[data-theme="light"] .release-track-row span,
body[data-theme="light"] .release-track-row strong,
body[data-theme="light"] .release-card p,
body[data-theme="light"] .friend-card p,
body[data-theme="light"] .friend-empty,
body[data-theme="light"] .metrics p {
  color: #57606a;
}

body[data-theme="light"] .friend-section-title h4 {
  color: #24292f;
}

body[data-theme="light"] .friend-identity strong,
body[data-theme="light"] .feed-listener strong,
body[data-theme="light"] .recent-feed-copy h4,
body[data-theme="light"] .release-detail-heading h3,
body[data-theme="light"] .release-detail-card h3,
body[data-theme="light"] .release-detail-section h3,
body[data-theme="light"] .release-detail-card dd,
body[data-theme="light"] .release-track-row p,
body[data-theme="light"] .friend-mini-card {
  color: #24292f;
}

body[data-theme="light"] .friend-card,
body[data-theme="light"] .friend-mini-card {
  border-color: #d0d7de;
  background: #f6f8fa;
}

body[data-theme="light"] .recent-feed-cover {
  border-color: #d0d7de;
}

body[data-theme="light"] .release-detail-pills span,
body[data-theme="light"] .release-detail-tags span {
  border-color: #d0d7de;
  background: #f6f8fa;
  color: #57606a;
}

@media (min-width: 720px) {
  .settings-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    align-items: center;
  }

  .collection-filter-primary {
    grid-template-columns: minmax(0, 1fr) 170px auto;
    align-items: center;
  }

  .advanced-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .friend-profile-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .friend-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.modal.hidden {
  display: none;
}

.modal-panel {
  width: min(420px, 100%);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  background: #161b22;
}

.release-detail-panel {
  width: min(860px, 100%);
  max-height: 86vh;
  overflow: auto;
}

.friend-profile-panel {
  width: min(820px, 100%);
  max-height: 86vh;
  overflow: auto;
}

.release-detail-shell {
  display: grid;
  gap: 16px;
}

.release-detail-hero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #0d1117;
}

.release-detail-cover {
  width: 132px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #30363d;
}

.release-detail-cover.placeholder {
  display: block;
}

.release-detail-heading {
  min-width: 0;
}

.release-detail-heading h3 {
  margin: 0;
  color: #f0f6fc;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.release-detail-artist {
  margin: 6px 0 0;
  color: #c9d1d9;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.release-detail-pills,
.release-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.release-detail-pills {
  margin-top: 12px;
}

.release-detail-pills span,
.release-detail-tags span {
  border: 1px solid #30363d;
  border-radius: 999px;
  padding: 5px 9px;
  color: #c9d1d9;
  background: #161b22;
  font-size: 0.78rem;
  font-weight: 700;
}

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

.release-detail-card,
.release-detail-section {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #0d1117;
}

.release-detail-card h3,
.release-detail-section h3 {
  margin: 0 0 10px;
  color: #f0f6fc;
  font-size: 0.94rem;
}

.release-detail-card dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.release-detail-card dl div {
  display: grid;
  gap: 2px;
}

.release-detail-card dt {
  color: #8b949e;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.release-detail-card dd {
  margin: 0;
  color: #e6edf3;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.release-detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.release-detail-section-title h3 {
  margin: 0;
}

.release-track-list {
  display: grid;
  gap: 6px;
}

.release-track-row {
  display: grid;
  grid-template-columns: minmax(36px, auto) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 7px 9px;
  background: #161b22;
}

.release-track-row span,
.release-track-row strong {
  color: #8b949e;
  font-size: 0.78rem;
  font-weight: 800;
}

.release-track-row p {
  margin: 0;
  color: #e6edf3;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.scan-output {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.feed-title-row {
  margin-top: 18px;
  margin-bottom: 10px;
}

.feed-title-row h3 {
  margin: 0;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(62px, 1fr));
  overflow: hidden;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #0d1117;
}

.segmented-control button {
  min-height: 34px;
  border-radius: 0;
  padding: 0 10px;
  background: transparent;
  color: #8b949e;
  font-size: 0.8rem;
}

.segmented-control button.active {
  background: #f2cc60;
  color: #17130a;
}

.recent-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.recent-feed-group {
  display: grid;
  gap: 10px;
}

.recent-feed-date {
  font-size: 0.82rem;
  color: #8b949e;
  text-transform: uppercase;
}

.recent-feed-group-list {
  display: grid;
  gap: 12px;
}

.recent-feed-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px;
  background: #161b22;
}

.recent-feed-cover {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  border-radius: 6px;
  background: #30363d;
  object-fit: cover;
}

.recent-feed-copy {
  min-width: 0;
  padding: 2px 2px 0;
}

.recent-feed-artist,
.recent-feed-format,
.recent-feed-copy small {
  margin: 0;
  color: #8b949e;
}

.recent-feed-copy h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #f0f6fc;
}

.recent-feed-format {
  font-size: 0.82rem;
}

.recent-feed-copy small {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
}

.recent-feed-list-view {
  gap: 8px;
}

.recent-list-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 8px;
  background: #161b22;
}

.recent-list-item .recent-feed-cover {
  width: 52px;
  aspect-ratio: 1;
}

.recent-list-item h4 {
  margin-bottom: 2px;
  font-size: 0.94rem;
}

.recent-list-item time {
  color: #8b949e;
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}

.feed-item {
  display: grid;
  gap: 10px;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px;
  background: #161b22;
}

.feed-listener,
.feed-release {
  display: grid;
  align-items: center;
  gap: 10px;
}

.feed-listener {
  grid-template-columns: 34px minmax(0, 1fr);
}

.feed-listener strong {
  display: block;
  color: #f0f6fc;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.feed-listener small {
  display: block;
  margin-top: 2px;
  color: #8b949e;
  font-size: 0.78rem;
}

.feed-release {
  grid-template-columns: 64px minmax(0, 1fr);
}

.feed-release .recent-feed-cover {
  width: 64px;
  aspect-ratio: 1;
}

.scan-manual-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.friend-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.scan-manual-form input,
.scan-manual-form button,
.friend-search-form input,
.friend-search-form button {
  width: 100%;
}

.scan-result-card {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #161b22;
}

.scan-result-card.hint {
  border-color: #38404a;
  background: #0d1117;
}

.scan-result-card.error {
  border-color: #f85149;
  background: rgba(248, 81, 73, 0.1);
}

.scan-error-text {
  border-color: #f85149;
  color: #ff7b72;
}

.scan-result-card p,
.scan-result-card small {
  margin: 0;
  color: #8b949e;
}

.scan-result-card strong {
  display: block;
  margin: 6px 0;
  color: #f2cc60;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.release-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px;
  background: #161b22;
}

.friend-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 9px;
  background: #0d1117;
}

.friend-card h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.96rem;
}

.friend-card p {
  margin: 6px 0 0;
  color: #8b949e;
  font-size: 0.88rem;
}

.friend-avatar {
  position: relative;
  display: grid;
  width: 44px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #f2cc60;
  color: #17130a;
  font-weight: 900;
}

.friend-avatar.small {
  width: 34px;
}

.friend-avatar.has-image {
  border: 1px solid #30363d;
  background: transparent;
}

.friend-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin-top: 6px;
  border: 1px solid #30363d;
  border-radius: 999px;
  padding: 0 9px;
  color: #f2cc60;
  font-size: 0.78rem;
  font-weight: 800;
}

.friend-status.muted {
  color: #8b949e;
}

.friend-empty {
  margin: 0;
  border: 1px dashed #30363d;
  border-radius: 8px;
  padding: 12px;
  color: #8b949e;
  font-size: 0.88rem;
  text-align: center;
}

.friend-identity {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.friend-identity strong,
.friend-identity small {
  display: block;
  overflow-wrap: anywhere;
}

.friend-identity strong {
  color: #e6edf3;
  font-size: 0.96rem;
}

.friend-identity small {
  margin-top: 2px;
  color: #8b949e;
  font-size: 0.76rem;
  font-weight: 700;
}

.friend-identity.private-profile {
  cursor: default;
}

.friend-card-body:empty {
  display: none;
}

.friend-profile-header {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.friend-profile-header h3 {
  margin: 0 0 4px;
}

.friend-profile-header p {
  margin: 0 0 10px;
  color: #8b949e;
}

.friend-profile-avatar {
  position: relative;
  display: grid;
  width: 76px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #f2cc60;
  color: #17130a;
  font-size: 1.8rem;
  font-weight: 900;
}

.friend-profile-avatar.has-image {
  border: 1px solid #30363d;
  background: transparent;
}

.friend-profile-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.friend-mini-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.friend-mini-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 46px;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 6px 8px;
  background: #0d1117;
  color: #e6edf3;
  text-align: left;
}

.friend-mini-card span:last-child {
  overflow-wrap: anywhere;
}

.release-card.compact-card {
  grid-template-columns: 1fr auto;
}

.cover {
  width: 56px;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #30363d;
  object-fit: cover;
}

.release-card h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.release-card p {
  margin: 0;
  color: #8b949e;
  font-size: 0.88rem;
}

.release-card small {
  display: block;
  margin-top: 4px;
  color: #8b949e;
  font-size: 0.78rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.actions button,
.actions select {
  flex: 1 1 96px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metrics article {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  background: #161b22;
}

.metrics span {
  display: block;
  margin-bottom: 4px;
  color: #f2cc60;
  font-size: 1.6rem;
  font-weight: 800;
}

.metrics p {
  margin: 0;
  color: #8b949e;
  font-size: 0.8rem;
}

#scannerPreview {
  width: 100%;
  max-height: 54vh;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #010409;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-top: 1px solid #3a424d;
  background: #242b34;
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 20;
  min-width: 56px;
  min-height: 44px;
  border-radius: 999px;
  background: #f2cc60;
  color: #17130a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

body[data-theme="light"] .back-to-top {
  background: #d29922;
  color: #ffffff;
}

.nav-button {
  min-height: 64px;
  border-radius: 0;
  background: #14191f;
  color: #8b949e;
  font-size: 0.82rem;
}

.nav-button.active {
  color: #f2cc60;
}

@media (max-width: 640px) {
  .release-detail-panel {
    max-height: 92vh;
    padding: 12px;
  }

  .release-detail-hero,
  .release-detail-grid {
    grid-template-columns: 1fr;
  }

  .release-detail-cover {
    width: min(220px, 100%);
    margin: 0 auto;
  }

  .release-detail-heading h3 {
    font-size: 1.16rem;
  }

  .release-track-row {
    grid-template-columns: minmax(34px, auto) minmax(0, 1fr);
  }

  .release-track-row strong {
    grid-column: 2;
    justify-self: start;
  }
}

@media (min-width: 760px) {
  .app-header {
    width: min(960px, 100%);
    margin: 0 auto;
    padding-inline: 16px;
  }

  .scan-manual-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .friend-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .bottom-nav {
    right: auto;
    left: 50%;
    width: min(640px, calc(100% - 32px));
    transform: translateX(-50%);
    bottom: 16px;
    overflow: hidden;
    border: 1px solid #30363d;
    border-radius: 8px;
  }

  .back-to-top {
    right: max(16px, calc(50% - 320px + 16px));
    bottom: 96px;
  }
}
