:root {
  --bg: #030404;
  --panel: #0a0c0d;
  --panel-2: #111416;
  --surface: rgba(12, 14, 15, .98);
  --surface-2: rgba(17, 20, 22, .98);
  --field: #090b0c;
  --field-text: #f6f7f8;
  --line: #222629;
  --text: #f6f7f8;
  --muted: #8f979f;
  --accent: #8b5cf6;
  --accent-2: #49b8ad;
  --glow-a: transparent;
  --glow-b: transparent;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
  --radius: 8px;
}

html,
body {
  min-width: 0;
  background: var(--bg);
}

body {
  padding-bottom: 92px;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

.hero {
  position: relative;
  top: 0;
  z-index: 60;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #050606;
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.hero .topbar {
  width: min(1680px, calc(100% - 40px));
  min-height: 54px;
  margin: 0 auto;
  padding: 9px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.brand-home {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.brand-home .brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, #fff);
  border-radius: 8px;
  background: var(--accent);
  box-shadow: none;
}

.brand-home h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.05;
}

.brand-home .sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.search-filter-panel {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(280px, 1.4fr) minmax(540px, 2fr);
  gap: 10px;
  margin: 0 auto 22px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
}

.search-filter-panel .searchbox,
.search-filter-panel .filters {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.search-filter-panel .searchbox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
}

.searchbox input {
  min-width: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
}

.searchbox .primary {
  min-width: 98px;
  min-height: 40px;
  border-radius: 999px;
}

.search-filter-panel .filters {
  display: grid;
  grid-template-columns: 1.2fr repeat(5, minmax(96px, 1fr));
  gap: 6px;
  padding: 3px;
}

.filters select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  padding-inline: 12px;
  text-overflow: ellipsis;
}

.filters select:first-child,
.filters select:last-child { border-radius: 999px; }

.app.container-xxl {
  width: min(1680px, 100%);
  max-width: none;
  padding: 30px 20px 52px;
}

.bottom-nav {
  position: fixed;
  right: auto;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 100;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 24px);
  gap: 4px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, #fff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .52);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-nav .navbtn {
  display: grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.bottom-nav .navbtn span { display: none; }

.bottom-nav .navbtn.active {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background: color-mix(in srgb, var(--accent) 17%, var(--panel));
  box-shadow: none;
  color: #fff;
}

.bottom-nav .navbtn::before,
.bottom-nav .navbtn::after { display: none; }

.bottom-nav .navbtn .ico {
  margin: 0;
  font-size: 18px;
}

.toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.toolbar .left,
.toolbar .right {
  gap: 6px;
  min-width: 0;
}

.btn,
.control,
.form-control,
select,
input,
textarea,
.select-btn {
  border-radius: 8px;
}

.btn {
  border-color: var(--line);
  border-radius: 999px;
  box-shadow: none;
}

.primary.btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.catalog-heading {
  display: flex;
  min-height: 84px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.catalog-heading span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
}

.catalog-heading h2 {
  margin: 5px 0 0;
  font-size: 38px;
  font-weight: 750;
  line-height: 1;
}

.catalog-heading .stats {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ghost.btn,
.smallbtn.btn,
.select-btn,
.control,
.form-control,
select,
input,
textarea {
  border-color: var(--line);
  background: var(--field);
}

.ghost.btn:hover,
.smallbtn.btn:hover,
.select-btn:hover {
  border-color: color-mix(in srgb, var(--accent-2) 55%, var(--line));
  background: var(--panel-2);
}

.grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 23px 13px;
}

.card {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.card:hover {
  background: transparent;
  box-shadow: none;
  transform: translateY(-2px);
}

.poster-wrap,
.poster,
.card .poster-wrap {
  overflow: hidden;
  border-radius: 8px;
}

.card .poster {
  aspect-ratio: 2 / 3;
  background: var(--panel);
  object-fit: cover;
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}

.card:hover .poster {
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
  filter: brightness(.86);
  transform: scale(1.012);
}

.card .info {
  padding: 9px 1px 4px;
}

.card .title {
  min-height: 0;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.card .meta {
  color: var(--muted);
  font-size: 10px;
}

.card .genres {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  overflow: hidden;
}

.card .genre,
.card .genres .tag,
.source-pill,
.api-chip,
.badge {
  border-radius: 999px;
}

.card .badges {
  inset: 7px 7px auto;
  gap: 5px;
}

.card .badge {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(4, 5, 5, .78) !important;
  color: rgba(255, 255, 255, .82);
  font-size: 8px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.card .genres .tag {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.card .genres .tag + .tag::before {
  content: "·";
  margin-right: 4px;
  color: #596168;
}

.card .actions {
  position: absolute;
  top: 8px;
  right: 7px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.card .actions .btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(4, 5, 5, .82);
  backdrop-filter: blur(10px);
}

@media (hover: hover) {
  .card .actions {
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
  }

  .card:hover .actions,
  .card:focus-within .actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.query-hints,
.infinite-status,
.empty,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.managed-ad-slot {
  position: relative;
  width: min(1100px, 100%);
  min-height: 108px;
  margin: 18px auto;
  padding: 20px 12px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.managed-ad-slot[hidden],
.managed-ad-slot:has(ins[data-ad-status="unfilled"]) {
  display: none !important;
}

.managed-ad-label {
  position: absolute;
  top: 5px;
  left: 10px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.managed-ad-frame,
.managed-ad-slot .adsbygoogle {
  display: block;
  width: 100%;
  min-height: 90px;
  border: 0;
  background: transparent;
}

.managed-house-ad {
  display: grid;
  width: 100%;
  min-height: 88px;
  place-items: center;
}

.managed-house-ad img {
  display: block;
  width: 100%;
  max-width: 970px;
  max-height: 180px;
  object-fit: contain;
}

.detail-inline-ad,
.episode-player-ad {
  width: min(980px, calc(100% - 32px));
}

.community-inline-ad {
  margin-block: 12px 18px;
}

body.theme-glass .managed-ad-slot {
  border-color: rgba(255, 255, 255, .72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .14)),
    rgba(255, 255, 255, .16);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .9),
    inset -1px -1px 0 rgba(80, 89, 108, .12),
    0 16px 44px rgba(67, 75, 94, .12);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.catalog-pagination-shell,
.community-pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 18px 0;
}

#libraryTab,
#communityTab,
#profileTab,
#settingsTab,
#routeTab {
  min-width: 0;
}

.settings-shell,
.profile-shell,
.community-page {
  width: min(1280px, 100%);
  margin: 0 auto;
}

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

.settings-panel,
.profile-panel,
.community-section,
.community-hero,
.public-profile-section,
.public-profile-hero {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-panel {
  min-width: 0;
  padding: 20px 0;
}

.episode-page,
.servers-container {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.server-group,
.episode-card,
.community-card,
.community-user-card,
.managed-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}

.settings-panel.sources-panel,
.settings-panel.profile-socials-panel,
.profile-panel {
  grid-column: 1 / -1;
}

.settings-panel h2,
.community-section h3,
.profile-panel h2 {
  font-size: 15px;
}

.setting-row {
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child { border-bottom: 0; }

.setting-row span,
.panel-copy {
  color: var(--muted);
  font-size: 11px;
}

.source-category-tabs,
.source-settings-tools {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.source-settings-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.source-setting {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
}

.library-view-toggle,
.segmented,
.mini-segment {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.managed-list-item,
.list-row,
.history-row {
  border-color: var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.community-page {
  display: grid;
  gap: 14px;
}

.community-hero {
  padding: 18px;
}

.community-hero h2 {
  margin: 4px 0;
  font-size: 22px;
}

.community-section {
  padding: 15px;
}

.community-grid,
.community-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 9px;
}

.community-card,
.community-user-card,
.community-user-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
}

.community-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.community-cover {
  width: 92px;
  min-height: 128px;
  border-radius: 5px 0 0 5px;
}

.community-title,
.community-user-card strong,
.community-owner span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-actions .btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.profile-overview,
.profile-grid-layout {
  gap: 12px;
}

.profile-hero-card,
.profile-side-panel,
.profile-metric,
.profile-data-card,
.profile-card {
  border-color: var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: none;
}

.profile-banner,
.public-profile-hero {
  min-height: 220px;
  background-position: center;
  background-size: cover;
}

.detail-modal,
.drawer-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .48);
}

.detail-modal-head {
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: var(--panel);
}

.route-page,
.media-page,
.episode-page {
  min-width: 0;
}

.episode-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
}

.server-group,
.servers-container {
  padding: 12px;
}

.toast {
  border-radius: 6px;
  background: var(--panel-2);
}

body.theme-light .hero,
body.theme-light .bottom-nav {
  background: rgba(255, 255, 255, .94);
}

body.theme-light .card:hover {
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}

body.theme-uiv2 .hero,
body.theme-uiv2 .bottom-nav {
  background: rgba(3, 3, 3, .95);
}

body.theme-glass .hero,
body.theme-glass .bottom-nav {
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  border-color: var(--glass-border);
  box-shadow: var(--glass-inset);
}

@media (max-width: 1180px) {
  .search-filter-panel {
    grid-template-columns: 1fr;
  }

  .search-filter-panel .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters select {
    border: 1px solid var(--line);
    border-radius: 999px;
  }

  .filters select:nth-child(3n),
  .filters select:nth-last-child(-n+3) {
    border: 1px solid var(--line);
    border-radius: 999px;
  }
}

@media (max-width: 760px) {
  body { padding-bottom: 82px; }

  .hero {
    position: relative;
  }

  .hero .topbar {
    width: calc(100% - 20px);
  }

  .search-filter-panel { width: 100%; }

  .brand-home .sub { display: none; }

  .search-filter-panel .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters select,
  .filters select:nth-child(3n),
  .filters select:nth-last-child(-n+3) {
    border: 1px solid var(--line);
    border-radius: 999px;
  }

  .filters select:nth-child(2n),
  .filters select:nth-last-child(-n+2) {
    border: 1px solid var(--line);
    border-radius: 999px;
  }

  .app.container-xxl {
    padding: 12px 10px 34px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar .left {
    width: 100%;
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .toolbar .left .select-btn {
    flex: 1 1 145px;
  }

  .toolbar .right {
    width: 100%;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

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

  .card .title { font-size: 11px; }
  .card .meta { font-size: 9px; }
  .card .genres { display: none; }
  .card .info { padding: 7px 4px 5px; }
  .card .actions { top: 42px; }

  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-panel.sources-panel,
  .settings-panel.profile-socials-panel,
  .profile-panel {
    grid-column: auto;
  }

  .source-settings-list {
    grid-template-columns: 1fr;
  }

  .community-grid,
  .community-user-grid {
    grid-template-columns: 1fr;
  }

  .community-section,
  .community-hero,
  .settings-panel {
    padding: 12px;
  }

  .profile-banner,
  .public-profile-hero {
    min-height: 170px;
  }
}

@media (max-width: 430px) {
  .catalog-heading {
    min-height: 68px;
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .catalog-heading h2 { font-size: 30px; }

  .search-filter-panel .searchbox {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .searchbox .primary {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .searchbox .primary span { display: none; }

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

  .bottom-nav .navbtn {
    width: 39px;
    min-width: 39px;
    height: 39px;
    min-height: 39px;
  }

  .community-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .community-cover {
    width: 78px;
    min-height: 112px;
  }
}

/* Community responsive workspace */
.community-section-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.community-section-title > div {
  min-width: 0;
}

.community-section-title > div > span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.community-section-icon {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}

.community-section-search {
  display: flex;
  width: min(340px, 100%);
  align-items: center;
  gap: 4px;
  margin: -4px 0 14px auto;
  padding-left: 12px;
}

.community-page .empty {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

.community-user-main strong,
.community-user-main small {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  #communityTab,
  #communityBox,
  .community-page {
    width: 100%;
  }

  .community-page {
    display: grid;
    gap: 0;
  }

  .community-hero {
    display: block;
    min-height: 0;
    margin-bottom: 8px;
    padding: 18px 16px 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 5%, var(--panel));
  }

  .community-hero .eyebrow {
    font-size: 8px;
  }

  .community-hero h2 {
    max-width: 330px;
    margin: 8px 0 6px;
    font-size: 28px;
    line-height: 1.03;
  }

  .community-hero p {
    max-width: 350px;
    font-size: 11px;
    line-height: 1.55;
  }

  .community-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .community-overview > div {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    min-width: 0;
    min-height: 54px;
    align-content: center;
    gap: 1px 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .community-overview > div:last-child {
    border-right: 1px solid var(--line);
  }

  .community-overview i {
    grid-row: 1 / span 2;
    font-size: 15px;
  }

  .community-overview strong {
    min-width: 0;
    font-size: 14px;
  }

  .community-overview span {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
  }

  .community-discovery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-bottom: 0;
  }

  .community-section,
  .community-discovery-grid .community-section {
    min-width: 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
  }

  .community-admin-section {
    padding-left: 0;
    border-top: 0;
    border-left: 0;
  }

  .community-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
  }

  .community-section-head h3 {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-section-head small {
    display: block;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-section-head > strong {
    width: 32px;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .community-section-search {
    width: 100%;
    min-width: 0;
    margin: 0 0 13px;
    flex-basis: auto;
  }

  .community-grid-compact {
    display: flex;
    width: 100%;
    gap: 9px;
    margin: 0;
    padding: 0 1px 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 1px;
  }

  .community-grid-compact > .community-card {
    width: min(280px, 82vw);
    flex: 0 0 min(280px, 82vw);
    grid-template-columns: 1fr;
    grid-template-rows: 132px minmax(0, 1fr);
    min-height: 260px;
  }

  .community-grid-compact > .community-card .community-cover {
    width: 100%;
    min-height: 132px;
    border-radius: 7px 7px 0 0;
  }

  .community-grid-compact > .empty {
    min-width: 100%;
    flex: 0 0 100%;
  }

  .community-user-rail {
    display: flex;
    width: 100%;
    gap: 8px;
    padding-bottom: 5px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .community-user-rail > .community-user-card {
    width: min(190px, 58vw);
    min-height: 126px;
    flex: 0 0 min(190px, 58vw);
    scroll-snap-align: start;
  }

  .community-user-rail > .empty {
    min-width: 100%;
    flex: 0 0 100%;
  }

  .community-lists-section .community-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .community-lists-section .community-card {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: minmax(138px, 1fr);
    min-height: 138px;
  }

  .community-lists-section .community-cover {
    width: 104px;
    min-height: 100%;
    padding: 10px;
    border-radius: 7px 0 0 7px;
  }

  .community-lists-section .community-cover strong,
  .community-lists-section .community-cover small {
    display: none;
  }

  .community-lists-section .community-card-body {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    height: 100%;
    gap: 5px;
    padding: 10px;
  }

  .community-lists-section .community-card-body p {
    min-height: 0;
    -webkit-line-clamp: 2;
  }

  .community-lists-section .community-card-meta {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
  }

  .community-lists-section .community-actions {
    display: flex;
    gap: 5px;
    overflow-x: auto;
  }

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

  .community-user-card {
    min-width: 0;
    min-height: 132px;
    padding: 16px 9px 11px;
  }

  .community-user-card img,
  .community-user-card .community-user-avatar {
    width: 48px;
    height: 48px;
  }

  .community-user-like {
    top: 7px;
    right: 7px;
  }

  .community-page .empty {
    display: grid;
    min-height: 86px;
    place-items: center;
    padding: 14px;
    border-style: solid;
    border-color: var(--line);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
  }

  .community-pager {
    align-items: center;
    padding: 14px 0 0;
  }
}

/* Final route surface precedence */
body.auth-locked #authGate .auth-card,
body.auth-locked.auth-checking #authGate .auth-card {
  display: grid;
  width: min(820px, 100%);
  grid-template-columns: minmax(240px, .8fr) minmax(280px, 1fr);
  justify-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 8px;
  text-align: left;
}

body.auth-locked.auth-checking #authGate .auth-card::after {
  display: none;
}

body.auth-locked #authGate .auth-mark,
body.auth-locked.auth-checking #authGate .auth-mark {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 46px;
  height: 46px;
  grid-row: auto;
  font-size: 18px;
}

.community-section-head .community-section-title > .community-section-icon {
  display: grid;
  margin: 0;
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 0;
}

.community-section-head .community-section-title > .community-section-icon i {
  font-size: inherit;
  line-height: 1;
}

body.auth-locked #authGate .auth-card-content h1,
body.auth-locked.auth-checking #authGate .auth-card-content h1 {
  margin: 0;
  font-size: 36px;
}

body.auth-locked #authGate .auth-card-content p,
body.auth-locked.auth-checking #authGate .auth-card-content p {
  max-width: 370px;
  margin: 0 0 4px;
  font-size: 11px;
}

.profile-overview {
  grid-template-columns: minmax(0, 1fr) 270px;
}

.profile-overview.has-profile-background {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-image: linear-gradient(rgba(4, 4, 7, .55), rgba(4, 4, 7, .82)), var(--profile-bg);
  background-position: center;
  background-size: cover;
}

.profile-hero-card,
.profile-metrics,
.public-profile-editor,
.profile-side-panel {
  border-radius: 8px;
}

.profile-banner {
  min-height: 220px;
  background-image: var(--profile-banner);
  background-position: center;
  background-size: cover;
}

.profile-hero-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.profile-metrics {
  grid-template-columns: 1fr;
}

.profile-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}

.public-profile-hero {
  min-height: 0;
  border-radius: 8px;
}

.public-profile-banner {
  min-height: 250px;
  background-color: var(--panel-2);
  background-image: var(--public-banner);
  background-position: center;
  background-size: cover;
}

@media (max-width: 900px) {
  .profile-overview,
  .profile-workspace,
  .public-profile-layout {
    grid-template-columns: 1fr;
  }

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

  .profile-metric {
    grid-template-columns: 1fr;
    min-height: 72px;
    justify-items: center;
    gap: 2px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .profile-metric:last-child {
    border-right: 0;
  }

  .profile-metric .bi,
  .profile-metric strong,
  .profile-metric span {
    grid-column: 1;
  }

  .profile-metric .bi { grid-row: 1; }
  .profile-metric strong { grid-row: 2; }
  .profile-metric span { grid-row: 3; }
}

@media (max-width: 700px) {
  body.auth-locked #authGate .auth-card,
  body.auth-locked.auth-checking #authGate .auth-card {
    grid-template-columns: 1fr;
    width: min(440px, 100%);
  }

  body.auth-locked #authGate .auth-card-content h1,
  body.auth-locked.auth-checking #authGate .auth-card-content h1 {
    font-size: 30px;
  }

  .profile-overview.has-profile-background,
  .public-profile-page.has-public-background {
    padding: 8px;
  }

  .profile-banner {
    min-height: 150px;
  }

  .profile-hero-content {
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 12px;
  }

  .profile-avatar {
    width: 74px;
    height: 74px;
    margin-top: -43px;
  }

  .profile-identity p,
  .profile-public-link {
    grid-column: 1 / -1;
  }

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

  .profile-metric,
  .profile-metric:last-child {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .profile-metric:nth-child(2n) {
    border-right: 0;
  }

  .profile-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .public-profile-banner {
    min-height: 150px;
  }

  .public-profile-identity {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 0 13px 14px;
  }

  .public-profile-avatar {
    width: 82px;
    height: 82px;
    margin-top: -38px;
  }

  .public-profile-actions {
    grid-column: 1 / -1;
  }

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

/* Settings workspace */
.settings-layout {
  display: grid;
  width: min(1320px, 100%);
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  margin: 0 auto;
}

.settings-index {
  position: sticky;
  top: 84px;
  display: grid;
  align-self: start;
  gap: 4px;
  padding: 10px 0;
}

.settings-index > span {
  padding: 0 10px 9px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.settings-index a {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 11px;
}

.settings-index a:hover,
.settings-index a:focus-visible {
  border-left-color: var(--accent);
  color: var(--text);
}

.settings-index i {
  color: var(--accent);
  font-size: 14px;
}

.settings-content {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.settings-content > .settings-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  scroll-margin-top: 82px;
}

.settings-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.settings-panel-head > span,
.settings-summary-icon {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--accent);
  font-size: 17px;
}

.settings-panel-head > div,
.credential-panel summary > div {
  min-width: 0;
}

.settings-panel-head small,
.credential-panel summary small,
.settings-font-block small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.settings-panel-head h2,
.credential-panel summary h2 {
  margin: 2px 0;
  font-size: 17px;
}

.settings-panel-head p,
.credential-panel summary p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

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

.settings-option-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.settings-group-head {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.settings-group-head > i {
  color: var(--accent);
  font-size: 17px;
}

.settings-group-head div {
  display: grid;
  min-width: 0;
}

.settings-group-head strong {
  font-size: 12px;
}

.settings-group-head span {
  color: var(--muted);
  font-size: 9px;
}

.settings-option-group .setting-row {
  min-height: 72px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.settings-option-group .setting-row:last-child {
  border-bottom: 0;
}

.settings-option-group .setting-row > div:first-child {
  min-width: 0;
}

.settings-option-group .setting-row strong {
  font-size: 11px;
}

.settings-option-group .setting-row span {
  font-size: 9px;
}

.settings-appearance .theme-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.settings-font-block {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.settings-font-block h3 {
  margin: 2px 0 0;
  font-size: 13px;
}

.settings-font-block .font-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-text-size {
  display: grid;
  align-content: start;
  gap: 6px;
}

.settings-text-size .mini-segment {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.credential-panel summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.credential-panel summary::-webkit-details-marker {
  display: none;
}

.settings-summary-chevron {
  justify-self: end;
  transition: transform .18s ease;
}

.credential-panel[open] .settings-summary-chevron {
  transform: rotate(180deg);
}

.credential-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.credential-panel .settings-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.source-settings-search {
  display: flex;
  min-width: min(310px, 100%);
  align-items: center;
  gap: 7px;
  padding-left: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.source-settings-search i {
  color: var(--muted);
}

.source-settings-search .form-control {
  border: 0;
  background: transparent;
}

.source-settings-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
}

.source-settings-heading h3 {
  margin: 0;
}

.source-settings-heading span {
  color: var(--muted);
  font-size: 9px;
}

.settings-content .source-settings-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: min(720px, 68vh);
  padding-right: 5px;
  overflow-y: auto;
}

.source-disabled-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-disabled-details[open] summary i {
  transform: rotate(180deg);
}

/* Personal profile workspace */
.profile-session {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 0 18px;
}

.profile-session-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.profile-session-status > div {
  display: grid;
  min-width: 0;
}

.profile-session-status small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.profile-session-status strong {
  font-size: 13px;
}

.profile-session-status span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-session-icon {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}

.profile-session-tools {
  display: flex;
  gap: 6px;
}

.profile-login-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(210px, .45fr) minmax(0, 1fr);
  max-width: none;
  gap: 10px;
  margin-top: 10px;
}

.profile-login-panel .auth-email-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.profile-guest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .45fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-guest-copy {
  padding: 34px;
}

.profile-guest-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px;
  color: var(--accent);
  font-size: 23px;
}

.profile-guest small,
.profile-guest-integrations small,
.profile-identity small,
.profile-editor-head small,
.profile-side-panel small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.profile-guest h3 {
  max-width: 480px;
  margin: 6px 0 8px;
  font-size: 28px;
}

.profile-guest p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.profile-guest-features {
  display: flex;
  gap: 7px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.profile-guest-features span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 9px;
}

.profile-guest-features i {
  color: var(--accent);
}

.profile-guest-integrations {
  padding: 24px;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.profile-guest-integrations h3,
.profile-side-panel h3 {
  margin: 3px 0 14px;
  font-size: 14px;
}

.profile-overview {
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 12px;
}

.profile-overview.has-profile-background {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-image: linear-gradient(rgba(4, 4, 7, .55), rgba(4, 4, 7, .82)), var(--profile-bg);
  background-position: center;
  background-size: cover;
}

.profile-hero-card,
.profile-metrics,
.public-profile-editor,
.profile-side-panel {
  border-radius: 8px;
}

.profile-banner {
  min-height: 220px;
  background-image: var(--profile-banner);
  background-position: center;
  background-size: cover;
}

.profile-hero-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  margin-top: -58px;
}

.profile-identity {
  min-width: 0;
}

.profile-identity h3 {
  margin: 3px 0 1px;
  font-size: 22px;
}

.profile-identity p {
  max-width: 720px;
  margin: 7px 0 0;
  font-size: 10px;
}

.profile-metrics {
  grid-template-columns: 1fr;
}

.profile-metric {
  min-height: 58px;
}

.profile-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}

.profile-editor-head,
.profile-editor-section-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.profile-editor-head > span {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  color: var(--accent);
}

.profile-editor-head h3 {
  margin: 2px 0;
  font-size: 17px;
}

.profile-editor-head p,
.profile-editor-section-head span {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.profile-editor-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.profile-editor-section-head {
  margin-bottom: 12px;
}

.profile-editor-section-head > i {
  color: var(--accent);
  font-size: 16px;
}

.profile-editor-section-head div {
  display: grid;
}

.profile-editor-section-head strong {
  font-size: 11px;
}

.profile-socials-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-socials-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
}

.profile-socials-panel summary span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-socials-panel summary i {
  color: var(--accent);
}

.profile-socials-panel .profile-form-grid {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 14px;
}

.profile-actions > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 9px;
}

.profile-side-panel {
  align-self: start;
}

.profile-side-heading {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Public profiles */
.public-profile-page {
  display: grid;
  width: min(1240px, 100%);
  gap: 14px;
  margin: 0 auto;
}

.public-profile-page.has-public-background {
  padding: 16px;
  border-radius: 8px;
  background-image: linear-gradient(rgba(3, 3, 6, .72), rgba(3, 3, 6, .94)), var(--public-profile-bg);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.public-profile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-profile-nav > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
}

.public-profile-hero {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.public-profile-banner {
  min-height: 250px;
  background-color: var(--panel-2);
  background-image: var(--public-banner);
  background-position: center;
  background-size: cover;
}

.public-profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding: 0 22px 20px;
}

.public-profile-avatar {
  width: 112px;
  height: 112px;
  margin-top: -58px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--panel);
}

.public-profile-avatar img,
.public-profile-avatar .avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.public-profile-main {
  min-width: 0;
  padding-top: 12px;
}

.public-profile-main h2 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin: 2px 0;
  font-size: 26px;
}

.public-profile-handle {
  color: var(--muted);
  font-size: 11px;
}

.public-profile-badges {
  display: flex;
  gap: 7px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.public-profile-actions {
  padding-bottom: 2px;
}

.public-profile-like {
  min-width: 64px;
  justify-content: center;
}

.public-profile-like.liked {
  color: #ef4444;
}

.public-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.public-profile-stats > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 62px;
  align-content: center;
  gap: 1px 7px;
  padding: 10px 16px;
  border-right: 1px solid var(--line);
}

.public-profile-stats > div:last-child {
  border-right: 0;
}

.public-profile-stats i {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
}

.public-profile-stats strong {
  font-size: 16px;
}

.public-profile-stats span {
  color: var(--muted);
  font-size: 9px;
}

.public-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}

.public-profile-feed {
  min-width: 0;
}

.public-profile-section {
  padding: 22px 0;
}

.public-profile-section-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.public-profile-section-head > span {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  color: var(--accent);
}

.public-profile-section-head small,
.public-profile-about small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.public-profile-section-head h3 {
  margin: 2px 0;
  font-size: 17px;
}

.public-profile-section-head p,
.public-profile-about p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.public-featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.public-profile-about {
  position: sticky;
  top: 84px;
  display: grid;
  align-self: start;
  gap: 0;
  border-top: 1px solid var(--line);
}

.public-profile-about section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.public-profile-about h3 {
  margin: 3px 0 7px;
  font-size: 15px;
}

.public-profile-about .public-socials {
  margin-top: 9px;
}

/* Contextual loading system */
.loading-state {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 320px;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 18px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.loading-visual {
  display: grid;
  min-width: 0;
  align-content: center;
}

.loading-copy {
  display: grid;
  gap: 3px;
}

.loading-copy small {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.loading-copy strong {
  color: var(--text);
  font-size: 15px;
}

.loading-copy span {
  color: var(--muted);
  font-size: 10px;
}

.loading-track,
.auth-progress {
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-2));
}

.loading-track span,
.auth-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loading-track 1.2s ease-in-out infinite;
}

.loading-catalog {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.loading-catalog i {
  display: grid;
  gap: 7px;
}

.loading-catalog b {
  aspect-ratio: 2 / 3;
  border-radius: 7px;
  background: var(--panel-2);
}

.loading-catalog span,
.loading-catalog small,
.loading-detail b,
.loading-player > b,
.loading-profile b,
.loading-collection b {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--panel-2);
}

.loading-catalog small {
  width: 62%;
  height: 6px;
}

.loading-detail {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
}

.loading-detail > i {
  aspect-ratio: 2 / 3;
  border-radius: 7px;
  background: var(--panel-2);
}

.loading-detail > span {
  display: grid;
  align-content: center;
  gap: 13px;
}

.loading-detail b:nth-child(1) {
  width: 68%;
  height: 22px;
}

.loading-detail b:nth-child(2) {
  width: 42%;
}

.loading-detail b:nth-child(3),
.loading-detail b:nth-child(4) {
  width: 88%;
}

.loading-player {
  display: grid;
  gap: 9px;
}

.loading-player > i {
  display: grid;
  min-height: 170px;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-2);
}

.loading-player > i span {
  width: 36px;
  height: 36px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}

.loading-player > b {
  width: 58%;
}

.loading-player > b:last-child {
  width: 34%;
}

.loading-profile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--panel-2);
}

.loading-profile > i {
  position: absolute;
  bottom: 22px;
  left: 22px;
  width: 64px;
  height: 64px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--panel);
}

.loading-profile > b {
  position: absolute;
  bottom: 50px;
  left: 102px;
  width: 38%;
}

.loading-profile > b:last-child {
  bottom: 31px;
  width: 24%;
}

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

.loading-collection i {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 82px;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.loading-collection span {
  width: 58px;
  height: 64px;
  border-radius: 6px;
  background: var(--panel-2);
}

.loading-pulse-mark {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  margin: auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-size: 22px;
}

.loading-pulse-mark span {
  position: absolute;
  inset: -10px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  border-radius: inherit;
  animation: loading-ring 1.5s ease-out infinite;
}

.loading-pulse-mark span:last-child {
  animation-delay: .5s;
}

.loading-state .loading-catalog b,
.loading-state .loading-catalog span,
.loading-state .loading-catalog small,
.loading-state .loading-detail > i,
.loading-state .loading-detail b,
.loading-state .loading-player > i,
.loading-state .loading-player > b,
.loading-state .loading-profile,
.loading-state .loading-collection span,
.loading-state .loading-collection b {
  background-image: linear-gradient(105deg, transparent 28%, color-mix(in srgb, var(--text) 8%, transparent) 48%, transparent 68%);
  background-size: 220% 100%;
  animation: loading-shimmer 1.4s linear infinite;
}

.community-page .loading-state {
  min-height: 112px;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-rows: 1fr 3px;
  gap: 10px 14px;
  align-items: center;
  padding: 13px;
}

.community-page .loading-state .loading-copy {
  align-self: center;
}

.community-page .loading-state .loading-track {
  grid-column: 1 / -1;
}

.community-page .loading-collection {
  grid-template-columns: repeat(3, 1fr);
}

.community-page .loading-collection i {
  display: block;
  min-height: 72px;
  padding: 0;
  border: 0;
}

.community-page .loading-collection span {
  width: 100%;
  height: 72px;
}

.community-page .loading-collection b {
  display: none;
}

.auth-gate {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 20px;
}

.auth-card,
body.auth-checking .auth-card {
  position: relative;
  display: grid;
  width: min(820px, 100%);
  grid-template-columns: minmax(240px, .8fr) minmax(280px, 1fr);
  justify-items: stretch;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

body.auth-checking .auth-card::after {
  display: none;
}

.auth-boot-visual {
  position: relative;
  min-height: 370px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.auth-boot-visual .auth-mark,
body.auth-checking .auth-boot-visual .auth-mark {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 3;
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.auth-boot-rings {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 190px;
  height: 190px;
  transform: translate(-50%, -50%);
}

.auth-boot-rings i {
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 50%;
  animation: auth-ring 2.8s ease-in-out infinite;
}

.auth-boot-rings i:nth-child(2) {
  inset: 24px;
  animation-delay: .28s;
}

.auth-boot-rings i:nth-child(3) {
  inset: 48px;
  animation-delay: .56s;
}

.auth-boot-posters {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  align-items: end;
}

.auth-boot-posters span {
  display: block;
  height: 104px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  transform: translateY(12px);
}

.auth-boot-posters span:nth-child(2) {
  height: 128px;
  transform: none;
}

.auth-card-content {
  display: grid;
  align-content: center;
  gap: 11px;
  padding: 34px;
}

.auth-kicker {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.auth-card-content h1,
body.auth-checking .auth-card-content h1 {
  margin: 0;
  font-size: 36px;
}

.auth-card-content p,
body.auth-checking .auth-card-content p {
  max-width: 370px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

body.auth-checking .auth-card-content {
  align-content: center;
}

body.auth-checking .auth-card-content #authGateLogin,
body.auth-checking .auth-card-content .auth-email-form,
body.auth-checking .auth-card-content #authGateStatus {
  display: none;
}

@keyframes loading-track {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(95%); }
  100% { transform: translateX(260%); }
}

@keyframes loading-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -40% 0; }
}

@keyframes loading-ring {
  from { opacity: .7; transform: scale(.72); }
  to { opacity: 0; transform: scale(1.16); }
}

@keyframes auth-ring {
  0%, 100% { opacity: .28; transform: scale(.92); }
  50% { opacity: .82; transform: scale(1); }
}

@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-index {
    position: sticky;
    top: 58px;
    z-index: 18;
    display: flex;
    padding: 7px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    backdrop-filter: blur(16px) saturate(130%);
  }

  .settings-index > span {
    display: none;
  }

  .settings-index a {
    min-width: max-content;
    border: 0;
    border-radius: 7px;
  }

  .settings-option-grid,
  .profile-workspace,
  .public-profile-layout {
    grid-template-columns: 1fr;
  }

  .settings-content .source-settings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-overview {
    grid-template-columns: 1fr;
  }

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

  .profile-metric {
    grid-template-columns: 1fr;
    min-height: 72px;
    justify-items: center;
    gap: 2px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .profile-metric:last-child {
    border-right: 0;
  }

  .profile-metric .bi,
  .profile-metric strong,
  .profile-metric span {
    grid-column: 1;
  }

  .profile-metric .bi { grid-row: 1; }
  .profile-metric strong { grid-row: 2; }
  .profile-metric span { grid-row: 3; }

  .profile-side-panel {
    position: static;
  }

  .public-profile-about {
    position: static;
    order: -1;
  }
}

@media (max-width: 700px) {
  .settings-content > .settings-panel {
    padding: 14px;
  }

  .settings-panel-head {
    align-items: flex-start;
  }

  .settings-appearance .theme-options {
    grid-template-columns: 1fr;
  }

  .settings-font-block {
    grid-template-columns: 1fr;
  }

  .settings-font-block .font-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .credential-fields,
  .settings-content .source-settings-list {
    grid-template-columns: 1fr;
  }

  .source-settings-heading {
    display: grid;
  }

  .profile-session {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .profile-session-tools {
    overflow-x: auto;
  }

  .profile-session-tools .btn {
    flex: 0 0 auto;
  }

  .profile-login-panel,
  .profile-login-panel .auth-email-form,
  .profile-guest {
    grid-template-columns: 1fr;
  }

  .profile-guest-copy {
    padding: 24px 18px;
  }

  .profile-guest h3 {
    font-size: 24px;
  }

  .profile-guest-integrations {
    padding: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .profile-overview.has-profile-background,
  .public-profile-page.has-public-background {
    padding: 8px;
  }

  .profile-banner {
    min-height: 150px;
  }

  .profile-hero-content {
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 12px;
  }

  .profile-avatar {
    width: 74px;
    height: 74px;
    margin-top: -43px;
  }

  .profile-identity h3 {
    font-size: 18px;
  }

  .profile-identity p,
  .profile-public-link {
    grid-column: 1 / -1;
  }

  .profile-public-link {
    width: fit-content;
    margin: 0;
  }

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

  .profile-metric {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .profile-metric:nth-child(2n) {
    border-right: 0;
  }

  .profile-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .public-profile-editor,
  .profile-side-panel {
    padding: 14px;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-grid .wide {
    grid-column: 1;
  }

  .profile-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .profile-actions > span {
    width: 100%;
  }

  .public-profile-nav > span {
    display: none;
  }

  .public-profile-banner {
    min-height: 150px;
  }

  .public-profile-identity {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 0 13px 14px;
  }

  .public-profile-avatar {
    width: 82px;
    height: 82px;
    margin-top: -38px;
  }

  .public-profile-main {
    padding-top: 10px;
  }

  .public-profile-main h2 {
    overflow-wrap: anywhere;
    font-size: 21px;
  }

  .public-profile-actions {
    grid-column: 1 / -1;
  }

  .public-profile-like {
    width: 100%;
  }

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

  .public-profile-stats > div {
    border-bottom: 1px solid var(--line);
  }

  .public-profile-stats > div:nth-child(2n) {
    border-right: 0;
  }

  .public-profile-stats > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .public-featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 7px;
  }

  .loading-state {
    min-height: 280px;
    padding: 18px;
  }

  .loading-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .loading-catalog i:nth-child(n + 4) {
    display: none;
  }

  .loading-detail {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 13px;
  }

  .auth-card,
  body.auth-checking .auth-card {
    grid-template-columns: 1fr;
    width: min(440px, 100%);
  }

  .auth-boot-visual {
    min-height: 155px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-boot-rings {
    width: 118px;
    height: 118px;
  }

  .auth-boot-posters {
    right: 12px;
    bottom: 10px;
    left: auto;
    width: 150px;
  }

  .auth-boot-posters span {
    height: 64px;
  }

  .auth-boot-posters span:nth-child(2) {
    height: 82px;
  }

  .auth-card-content {
    padding: 22px 18px;
  }

  .auth-card-content h1,
  body.auth-checking .auth-card-content h1 {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-track span,
  .auth-progress span,
  .loading-state *,
  .auth-boot-rings i {
    animation: none !important;
  }
}

/* Route architecture v3 */
:root {
  --line-strong: #393542;
  --accent-strong: #7c3aed;
  --accent-soft: rgba(139, 92, 246, .15);
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

body {
  background: var(--bg);
  color: var(--text);
}

.auth-gate {
  min-height: 100svh;
  background: var(--bg);
}

.auth-card {
  width: min(420px, 100%);
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  color: var(--text);
  font-size: 34px;
}

.auth-card p {
  color: var(--muted);
  font-size: 12px;
}

.auth-mark {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

body.auth-checking .auth-card {
  position: relative;
  display: grid;
  width: min(460px, calc(100vw - 28px));
  grid-template-columns: 48px minmax(0, 1fr);
  justify-items: start;
  gap: 3px 13px;
  overflow: hidden;
  padding: 16px;
  border-radius: 16px;
  text-align: left;
}

body.auth-checking .auth-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: boot-progress 1.35s cubic-bezier(.4, 0, .2, 1) infinite;
}

body.auth-checking .auth-mark {
  width: 48px;
  height: 48px;
  grid-row: 1 / span 2;
  font-size: 20px;
}

body.auth-checking .auth-card h1 {
  align-self: end;
  margin: 0;
  font-size: 17px;
}

body.auth-checking .auth-card p {
  align-self: start;
  max-width: none;
  margin: 0;
  font-size: 10px;
}

@keyframes boot-progress {
  0% { transform: scaleX(.08); opacity: .55; }
  62% { transform: scaleX(.78); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

.app.container-xxl {
  width: min(1660px, 100%);
  padding: 28px clamp(12px, 2vw, 32px) 60px;
}

.route-heading {
  display: flex;
  min-height: 92px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.route-heading > div {
  min-width: 0;
}

.route-heading span,
.detail-kicker,
.episodes-section > header span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.route-heading h2 {
  margin: 6px 0 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 760;
  line-height: 1;
}

.route-heading .stats {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.hero {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.hero .topbar {
  min-height: 58px;
}

.brand-home .brand-mark {
  border: 0;
  border-radius: 9px;
  background: var(--accent);
}

.brand-home .brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 5px;
}

.brand-home h1 {
  color: var(--text);
  font-size: 16px;
}

.brand-home .sub {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn,
.select-btn,
.control,
.form-control,
select,
input,
textarea {
  border-color: var(--line);
  background: var(--field);
  color: var(--text);
  box-shadow: none;
}

.btn {
  min-height: 38px;
  border-radius: 999px;
  font-weight: 650;
}

.btn:hover,
.btn:focus-visible,
.select-btn:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}

.primary.btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary.btn:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.btn.active,
.segmented .btn.active,
.mini-segment .btn.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent-soft);
  color: var(--text);
}

.bottom-nav {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .48);
}

.bottom-nav .navbtn {
  border: 0;
  background: transparent;
}

.bottom-nav .navbtn.active {
  border: 0;
  background: var(--accent);
}

/* Catalog */
.catalog-controls {
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.search-filter-panel {
  grid-template-columns: minmax(320px, 1.45fr) minmax(620px, 2fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.search-filter-panel .searchbox {
  min-height: 44px;
  border-color: var(--line);
  background: var(--field);
}

.searchbox input {
  min-height: 42px;
  padding-inline: 15px;
  color: var(--text);
}

.searchbox input::placeholder {
  color: var(--muted);
}

.searchbox .primary {
  min-height: 38px;
  margin: 2px;
}

.search-filter-panel .filters {
  grid-template-columns: 1.35fr repeat(5, minmax(100px, 1fr));
  gap: 6px;
  padding: 0;
}

.filters select {
  min-height: 44px;
  border-radius: 999px;
  padding-inline: 12px 28px;
}

.catalog-toolbar {
  min-height: 44px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.catalog-toolbar .btn {
  min-height: 34px;
  padding: 6px 11px;
}

.catalog-toolbar .select-btn {
  min-height: 34px;
  border-radius: 999px;
}

.catalog-toolbar .select-btn select {
  min-height: 32px;
  border: 0;
  background: transparent;
}

#results.grid,
#watchedBox.grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 24px 14px;
}

.card {
  min-width: 0;
}

.poster-wrap,
.poster,
.card .poster-wrap {
  border-radius: var(--radius-sm);
}

.card .poster {
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background: var(--panel);
}

.card .title {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.card .meta,
.card .genres .tag {
  color: var(--muted);
}

.card .actions .btn {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(5, 5, 7, .82);
  color: #fff;
}

.query-hints,
.infinite-status,
.empty,
.notice,
.community-empty,
.profile-empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
}

/* Library */
.library-heading {
  align-items: end;
}

.library-heading p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.library-heading .stats {
  align-self: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
}

.library-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0 18px;
  border-block: 1px solid var(--line);
}

.library-overview[hidden] {
  display: none;
}

.library-overview-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.library-overview-item:last-child {
  border-right: 0;
}

.library-overview-item > i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface);
  font-size: 16px;
}

.library-overview-item span {
  display: grid;
  min-width: 0;
}

.library-overview-item strong {
  font-size: 20px;
  line-height: 1;
}

.library-overview-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.library-workspace {
  display: block;
}

.library-navigation {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.library-toolbar {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.library-toolbar .left {
  display: flex;
  width: auto;
  gap: 4px;
  flex-wrap: wrap;
}

.library-toolbar .btn {
  width: auto;
  min-height: 38px;
  justify-content: center;
  border-color: transparent;
  border-radius: 999px;
  background: transparent;
}

.library-toolbar .btn i {
  width: 18px;
  text-align: center;
}

.library-toolbar .btn.active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.library-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.library-actions #newListBtn {
  min-height: 38px;
  border-radius: 999px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.library-view-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  width: 122px;
}

.library-view-toggle .btn {
  min-width: 0;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}

.library-view-toggle .btn span {
  display: none;
}

.library-content {
  min-width: 0;
}

.library-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.list-row,
.managed-list-item,
.history-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.list-row {
  position: relative;
  min-width: 0;
  min-height: 88px;
  overflow: hidden;
}

.list-row.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent-soft);
}

.list-row-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 9px 48px 9px 9px;
  border: 0;
  background: transparent;
  text-align: left;
}

.list-row-cover {
  display: block;
  width: 54px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--panel);
}

.list-row-cover-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 20px;
}

.list-row-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.list-row-copy small {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
}

.list-row-copy strong,
.list-row-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-copy strong {
  color: var(--text);
  font-size: 13px;
}

.list-row-copy span {
  color: var(--muted);
  font-size: 10px;
}

.list-row-arrow {
  color: var(--muted);
}

.list-row-delete {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  transform: translateY(-50%);
}

.list-detail-head {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.list-detail-title {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.list-detail-title > small {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.list-detail-title > span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.list-detail-title strong {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-detail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.list-visibility {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.list-visibility.is-public {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--accent);
  background: var(--accent-soft);
}

.list-detail-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.list-detail-actions .btn {
  min-height: 36px;
  border-radius: 999px;
}

.list-detail-actions .btn span {
  display: inline;
}

.managed-list,
.history-list {
  gap: 8px;
}

.managed-list-item {
  grid-template-columns: 66px minmax(0, 1fr) auto;
  padding: 9px;
}

.managed-list-item .history-poster {
  width: 66px;
  border-radius: var(--radius-sm);
}

.history-actions .btn span {
  display: none;
}

.history-actions .btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
}

.library-empty-state {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 128px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
}

.library-empty-state > i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 20px;
}

.library-empty-state > div {
  display: grid;
  gap: 4px;
}

.library-empty-state strong {
  color: var(--text);
  font-size: 14px;
}

.library-empty-state span {
  font-size: 11px;
}

/* Community */
.community-page {
  width: 100%;
  gap: 0;
}

.community-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  min-height: 110px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.community-hero .eyebrow {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
}

.community-hero h2 {
  margin: 7px 0 5px;
  font-size: clamp(28px, 4vw, 42px);
}

.community-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.community-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.community-overview > div {
  display: grid;
  grid-template-columns: auto 1fr;
  min-width: 86px;
  gap: 1px 7px;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
}

.community-overview > div:last-child {
  border-right: 0;
}

.community-overview i {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
}

.community-overview strong {
  font-size: 15px;
  line-height: 1;
}

.community-overview span {
  color: var(--muted);
  font-size: 9px;
}

.community-discovery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .45fr);
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.community-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.community-discovery-grid .community-section {
  border-bottom: 0;
}

.community-admin-section {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.community-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.community-section-head > div > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.community-section-head h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.community-section-head small {
  color: var(--muted);
  font-size: 10px;
}

.community-section-head > strong {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
}

.community-search {
  min-width: min(290px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
}

.community-search .control {
  min-height: 38px;
  border: 0;
  background: transparent;
}

.community-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
}

.community-grid-compact {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 5px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.community-grid-compact > * {
  width: min(300px, 78vw);
  flex: 0 0 min(300px, 78vw);
  scroll-snap-align: start;
}

.community-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 144px minmax(0, 1fr);
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.community-cover {
  display: grid;
  width: 100%;
  min-height: 144px;
  align-content: end;
  padding: 14px;
  border-radius: 0;
  background-position: center;
  background-size: cover;
}

.community-cover strong {
  color: #fff;
  font-size: 15px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}

.community-cover small {
  color: rgba(255, 255, 255, .78);
  font-size: 9px;
}

.community-card-body {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 7px;
  padding: 12px;
}

.community-card-body p {
  display: -webkit-box;
  min-height: 32px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.community-owner {
  color: var(--muted);
  font-size: 10px;
}

.community-card-meta {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.community-actions {
  margin-top: auto;
}

.community-actions .btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
}

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

.community-user-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 18px 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.community-user-main {
  display: grid;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.community-user-card img,
.community-user-card .community-user-avatar {
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 50%;
}

.community-user-card strong,
.community-user-card small {
  max-width: 100%;
}

.community-user-like {
  top: 10px;
  right: 10px;
}

.community-user-like.liked {
  color: #ef4444;
}

.community-user-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.community-admin-section .community-user-card {
  min-height: 104px;
}

/* Profile */
.profile-shell {
  display: grid;
  width: 100%;
  gap: 24px;
}

.profile-session {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0 20px;
  border-bottom: 1px solid var(--line);
}

.profile-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-icon {
  color: var(--accent);
  font-size: 30px;
}

.profile-card strong {
  font-size: 14px;
}

.profile-card span {
  color: var(--muted);
  font-size: 11px;
}

.profile-session .settings-actions {
  display: flex;
  margin: 0;
}

.profile-login-panel {
  grid-column: 1 / -1;
  max-width: 760px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.profile-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-overview.has-profile-background::before {
  display: none;
}

.profile-hero-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.profile-banner {
  min-height: 190px;
  border: 0;
  border-radius: 0;
  background: var(--panel-2);
}

.profile-hero-content {
  min-height: 112px;
  padding: 16px 18px 18px;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  margin-top: -54px;
  border: 4px solid var(--surface);
  border-radius: 50%;
}

.profile-identity h3 {
  font-size: 20px;
}

.profile-identity p {
  max-width: 660px;
  color: var(--muted);
}

.profile-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.profile-metric {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.profile-metric:last-child {
  border-bottom: 0;
}

.profile-metric .bi {
  grid-row: 1;
  color: var(--accent);
}

.profile-metric strong {
  grid-column: 3;
  font-size: 18px;
}

.profile-metric span {
  grid-column: 2;
  grid-row: 1;
}

.profile-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
  gap: 16px;
}

.public-profile-editor,
.profile-side-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.profile-form-grid {
  gap: 12px;
}

.profile-form-grid label,
.field label {
  color: var(--muted);
  font-size: 11px;
}

.profile-data-card {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.profile-data-card:last-child {
  border-bottom: 0;
}

/* Settings and theme system */
.settings-shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.settings-shell > .settings-panel:first-child {
  grid-column: span 7;
}

.settings-shell > .theme-panel {
  grid-column: span 5;
}

.settings-shell > .credential-panel {
  grid-column: span 5;
}

.settings-panel.sources-panel {
  grid-column: 1 / -1;
}

.settings-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.settings-panel h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.settings-panel summary {
  color: var(--text);
}

.setting-row {
  min-height: 64px;
  padding: 12px 0;
  border-color: var(--line);
}

.setting-row strong {
  color: var(--text);
  font-size: 13px;
}

.setting-row span,
.panel-copy {
  color: var(--muted);
  font-size: 11px;
}

.form-check-input {
  border-color: var(--line-strong);
  background-color: var(--panel-2);
}

.form-check-input:checked {
  border-color: var(--accent);
  background-color: var(--accent);
}

.theme-options {
  display: grid;
  width: 100%;
  max-height: none !important;
  grid-template-columns: 1fr;
  gap: 7px;
  overflow: visible !important;
}

.theme-option {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 20px;
  min-height: 76px;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.theme-option:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.theme-option.active {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  background: var(--accent-soft);
  box-shadow: none;
}

.theme-preview {
  position: relative;
  display: block;
  width: 72px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--preview-bg);
}

.theme-preview i {
  position: absolute;
  display: block;
  background: var(--preview-panel);
}

.theme-preview i:first-child {
  inset: 6px 44px 6px 6px;
}

.theme-preview i:nth-child(2) {
  inset: 7px 6px 28px 32px;
}

.theme-preview i:nth-child(3) {
  inset: 29px 6px 7px 32px;
  background: var(--preview-accent);
}

.theme-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.theme-copy > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.theme-copy strong {
  color: var(--text);
  font-size: 12px;
}

.theme-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-copy em {
  width: fit-content;
  margin: 0;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.theme-copy em[data-status="default"] {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  color: var(--accent-2);
}

.theme-check {
  color: var(--accent);
}

.font-options {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
}

.font-options .btn {
  min-width: 0;
  overflow: hidden;
  border: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-settings-tools {
  margin-bottom: 18px;
}

.source-search {
  border-color: var(--line);
  background: var(--field);
}

.source-category-tabs {
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.source-category-chip {
  border-color: var(--line);
  background: var(--field);
  color: var(--muted);
}

.source-category-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.source-settings-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: min(760px, 70vh);
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
}

.source-setting {
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: none;
}

.source-setting-icon {
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-2);
}

.source-pill {
  background: var(--panel-2);
  color: var(--muted);
}

/* Detail and playback routes */
#routeTab.has-route-backdrop::before {
  position: absolute;
  inset: 0 0 auto;
  height: min(580px, 64vw);
  background-position: center 18%;
}

#routeTab.has-route-backdrop::after {
  position: absolute;
  inset: 0 0 auto;
  height: min(590px, 66vw);
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 45%, color-mix(in srgb, var(--bg) 55%, transparent) 72%, var(--bg) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 18%, transparent), var(--bg) 96%);
}

.media-detail-page {
  position: relative;
  width: min(1420px, 100%);
  margin: 0 auto;
  gap: 0;
}

.media-detail-page:not(.has-backdrop) {
  padding-top: 58px;
}

.media-detail-page.has-backdrop {
  margin-inline: auto;
  padding: clamp(170px, 25vw, 330px) 0 30px;
  border-radius: 0;
}

.media-detail-nav {
  position: absolute;
  top: 24px;
  left: 0;
  z-index: 2;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.media-detail-nav .btn,
.detail-source-label {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(5, 5, 7, .74);
  color: #fff;
  backdrop-filter: blur(12px);
}

.detail-source-label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.media-detail-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 270px;
  gap: 26px;
  align-items: end;
}

.media-poster-shell {
  width: 190px;
}

.media-page-poster {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: 0 26px 64px rgba(0, 0, 0, .42);
}

.media-detail-content {
  min-width: 0;
  padding-bottom: 4px;
}

.detail-kicker {
  color: color-mix(in srgb, var(--text) 70%, transparent);
}

.media-page-title {
  max-width: 900px;
  margin: 8px 0 8px;
  color: var(--text);
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 780;
  line-height: .98;
}

.detail-original-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.media-detail-content .genres {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.media-detail-content .genres .tag {
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  color: var(--text);
  font-size: 9px;
}

.media-detail-content .synopsis {
  display: -webkit-box;
  max-width: 780px;
  margin: 14px 0;
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 82%, transparent);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.media-detail-content .modal-actions {
  margin-top: 16px;
}

.media-detail-content .modal-actions .btn {
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: blur(12px);
}

.media-facts {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(14px);
}

.media-facts .source-box {
  margin: 0;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.media-facts .info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.media-facts .info {
  min-width: 0;
  padding: 11px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.media-facts .info:nth-child(2n) {
  border-right: 0;
}

.media-facts .info:nth-last-child(-n+2) {
  border-bottom: 0;
}

.media-facts .info:hover {
  background: var(--panel-2);
  transform: none;
}

.media-facts .info b {
  color: var(--muted);
  font-size: 9px;
}

.media-facts .info b .bi {
  color: var(--accent-2);
}

.media-facts .info span {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-detail-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 28px;
  margin-top: 38px;
  align-items: start;
}

.media-detail-body > :only-child {
  grid-column: 1 / -1;
}

.episodes-section {
  min-width: 0;
  padding: 0;
  border: 0;
}

.episodes-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.episodes-section > header h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.episodes-section > header strong {
  color: var(--muted);
  font-size: 10px;
}

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

.episode-card {
  min-height: 72px;
  padding: 7px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.episode-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: var(--panel-2);
}

.episode-thumb,
.episode-thumb-fallback {
  border-radius: 5px;
}

.episode-card-info span {
  color: var(--text);
  font-size: 11px;
}

.media-trailer-panel {
  position: sticky;
  top: 78px;
  padding: 10px;
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.media-trailer-panel h3 {
  font-size: 13px;
}

.media-trailer-panel iframe {
  border-radius: var(--radius-sm);
}

.media-trailer--blurred iframe {
  filter: blur(20px) saturate(.45) brightness(.66);
  transform: scale(1.05);
  pointer-events: none;
}

.episode-page {
  width: min(1280px, 100%);
  margin: 0 auto;
  gap: 14px;
}

.episode-nav {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.episode-head {
  padding: 10px 0 0;
}

.episode-head h2 {
  font-size: clamp(26px, 4vw, 44px);
}

.player-toolbar {
  margin: 0;
}

.player-container {
  min-height: 260px;
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: #000;
}

.servers-container {
  padding: 0;
}

.server-group {
  padding: 14px 0;
  border-color: var(--line);
  border-radius: 0;
  background: transparent;
}

.server-buttons {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 7px;
}

.server-buttons .active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: none;
}

/* Public profile and route surfaces */
.public-profile-page {
  width: min(1240px, 100%);
  gap: 20px;
}

.public-profile-back {
  width: fit-content;
}

.public-profile-hero {
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.public-profile-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.detail-modal,
.drawer-panel,
.terms-dialog {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.detail-modal-head {
  border-color: var(--line);
  background: var(--panel);
}

.toast {
  border-color: var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
}

/* Theme-specific materials */
body.theme-glass {
  --glass-fill: rgba(255, 255, 255, .42);
  --glass-fill-strong: rgba(255, 255, 255, .68);
  --glass-edge: rgba(255, 255, 255, .88);
  --glass-edge-soft: rgba(255, 255, 255, .58);
  --glass-depth: rgba(67, 75, 94, .16);
  background: #edf1f6;
}

body.theme-glass::before {
  content: "";
  position: fixed;
  inset: -18vh -12vw;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(118deg, #f9fbfd 0 22%, #dbe4ef 22% 38%, #f4f7fa 38% 57%, #e5ddf2 57% 73%, #f7f9fc 73% 100%);
  filter: blur(54px) saturate(112%);
  transform: scale(1.08);
}

body.theme-glass::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .42;
  background:
    linear-gradient(112deg, transparent 0 30%, rgba(255, 255, 255, .74) 30% 31%, transparent 31% 62%, rgba(135, 112, 183, .10) 62% 63%, transparent 63%),
    linear-gradient(22deg, rgba(255, 255, 255, .44), transparent 48%);
}

body.theme-glass .catalog-controls,
body.theme-glass .settings-panel,
body.theme-glass .profile-hero-card,
body.theme-glass .profile-metrics,
body.theme-glass .public-profile-editor,
body.theme-glass .profile-side-panel,
body.theme-glass .community-card,
body.theme-glass .community-user-card,
body.theme-glass .list-row,
body.theme-glass .managed-list-item,
body.theme-glass .history-row,
body.theme-glass .media-facts,
body.theme-glass .media-trailer-panel,
body.theme-glass .bottom-nav {
  border-color: var(--glass-edge-soft);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .13), transparent 34%),
    linear-gradient(180deg, var(--glass-fill-strong), var(--glass-fill));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    inset 1px 0 0 rgba(255, 255, 255, .58),
    inset 0 -1px 0 rgba(99, 107, 123, .10),
    0 18px 48px var(--glass-depth);
  backdrop-filter: blur(28px) saturate(165%) brightness(1.04);
  -webkit-backdrop-filter: blur(28px) saturate(165%) brightness(1.04);
}

body.theme-glass .hero {
  border-color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .46);
  box-shadow: inset 0 -1px 0 rgba(104, 111, 127, .10);
  backdrop-filter: blur(34px) saturate(150%);
  -webkit-backdrop-filter: blur(34px) saturate(150%);
}

body.theme-glass .bottom-nav {
  border-color: var(--glass-edge);
  border-radius: 999px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .48) 52%, rgba(176, 153, 226, .18)),
    rgba(255, 255, 255, .50);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .42),
    inset 0 -1px 0 rgba(105, 112, 128, .12),
    inset 1px 0 0 rgba(255, 255, 255, .84),
    0 16px 48px rgba(63, 70, 87, .20);
}

body.theme-glass .btn,
body.theme-glass .select-btn,
body.theme-glass .filters select,
body.theme-glass .control,
body.theme-glass .form-control,
body.theme-glass input,
body.theme-glass select,
body.theme-glass textarea,
body.theme-glass .source-category-chip,
body.theme-glass .theme-option {
  border-color: rgba(255, 255, 255, .76);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .28)),
    rgba(255, 255, 255, .38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(93, 101, 118, .10);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

body.theme-glass .btn:hover,
body.theme-glass .select-btn:hover,
body.theme-glass .source-category-chip:hover,
body.theme-glass .theme-option:hover {
  border-color: rgba(255, 255, 255, .96);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .46)),
    rgba(255, 255, 255, .58);
}

body.theme-glass .primary.btn,
body.theme-glass .bottom-nav .navbtn.active,
body.theme-glass .source-category-chip.active {
  border-color: rgba(255, 255, 255, .34);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .22), transparent 42%),
    color-mix(in srgb, var(--accent) 78%, rgba(22, 14, 40, .68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .42),
    inset 0 -1px 0 rgba(35, 12, 70, .24),
    0 8px 24px rgba(87, 47, 168, .24);
}

body.theme-glass .card .poster,
body.theme-glass .media-page-poster,
body.theme-glass .community-cover,
body.theme-glass .profile-banner {
  border-color: rgba(255, 255, 255, .18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 18px 44px rgba(0, 0, 0, .30);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.theme-glass .catalog-controls,
  body.theme-glass .settings-panel,
  body.theme-glass .profile-hero-card,
  body.theme-glass .profile-metrics,
  body.theme-glass .public-profile-editor,
  body.theme-glass .profile-side-panel,
  body.theme-glass .community-card,
  body.theme-glass .community-user-card,
  body.theme-glass .list-row,
  body.theme-glass .managed-list-item,
  body.theme-glass .history-row,
  body.theme-glass .media-facts,
  body.theme-glass .media-trailer-panel,
  body.theme-glass .bottom-nav {
    background: rgba(246, 248, 252, .96);
  }
}

body.theme-light .hero {
  background: rgba(245, 245, 247, .92);
}

body.theme-light .bottom-nav {
  background: rgba(255, 255, 255, .94);
}

body.theme-light .card .actions .btn,
body.theme-light .media-detail-nav .btn,
body.theme-light .detail-source-label {
  color: #fff;
}

body.theme-uiv2 .route-heading h2,
body.theme-uiv2 .media-page-title,
body.theme-uiv2 .community-hero h2 {
  font-family: "Fjalla One", var(--ui-font);
  font-weight: 400;
}

@media (max-width: 1180px) {
  .search-filter-panel {
    grid-template-columns: 1fr;
  }

  .search-filter-panel .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .source-settings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-detail-hero {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .media-poster-shell {
    width: 170px;
  }

  .media-facts {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(240px, .8fr) 1fr;
  }

  .media-facts .source-box {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .library-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-overview-item:nth-child(2) {
    border-right: 0;
  }

  .library-overview-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .library-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .library-toolbar .left {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .library-toolbar .btn {
    width: auto;
    flex: 0 0 auto;
  }

  .library-actions {
    justify-content: space-between;
  }

  .library-view-toggle {
    width: 132px;
  }

  .profile-overview,
  .profile-grid-layout {
    grid-template-columns: 1fr;
  }

  .profile-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-metric {
    grid-template-columns: 1fr;
    justify-items: center;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .profile-metric:last-child {
    border-right: 0;
  }

  .profile-metric .bi,
  .profile-metric strong,
  .profile-metric span {
    grid-column: 1;
  }

  .profile-metric .bi { grid-row: 1; }
  .profile-metric strong { grid-row: 2; }
  .profile-metric span { grid-row: 3; }

  .settings-shell > .settings-panel:first-child,
  .settings-shell > .theme-panel,
  .settings-shell > .credential-panel {
    grid-column: 1 / -1;
  }

  .media-detail-body {
    grid-template-columns: 1fr;
  }

  .media-trailer-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .app.container-xxl {
    padding: 14px 10px 42px;
  }

  .route-heading {
    min-height: 74px;
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .route-heading h2 {
    font-size: 30px;
  }

  .catalog-controls {
    padding: 8px;
  }

  .search-filter-panel .filters {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filters select {
    width: 146px;
    flex: 0 0 146px;
  }

  .catalog-toolbar {
    align-items: flex-start;
  }

  .catalog-toolbar .left {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .catalog-toolbar .btn {
    flex: 0 0 auto;
  }

  .catalog-toolbar #gridBtn span,
  .catalog-toolbar #listBtn span,
  .catalog-toolbar #clearBtn span {
    display: none;
  }

  .catalog-toolbar #gridBtn,
  .catalog-toolbar #listBtn,
  .catalog-toolbar #clearBtn {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  #results.grid,
  #watchedBox.grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px 8px;
  }

  .community-section {
    padding: 22px 0;
  }

  .community-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
  }

  .community-overview {
    width: 100%;
  }

  .community-overview > div {
    min-width: 0;
    padding: 9px;
  }

  .community-discovery-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .community-admin-section {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .community-section-head {
    align-items: end;
    flex-flow: row wrap;
  }

  .community-search {
    width: 100%;
    flex-basis: 100%;
  }

  .community-grid,
  .community-user-grid {
    grid-template-columns: 1fr;
  }

  .community-grid-compact {
    display: flex;
  }

  .profile-session {
    grid-template-columns: 1fr;
  }

  .profile-session .settings-actions {
    flex-wrap: wrap;
  }

  .profile-overview {
    gap: 10px;
  }

  .profile-banner {
    min-height: 150px;
  }

  .profile-hero-content {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-public-link {
    margin-left: 0;
  }

  .source-settings-list {
    grid-template-columns: 1fr;
  }

  #routeTab.has-route-backdrop::before,
  #routeTab.has-route-backdrop::after {
    height: 260px;
  }

  .media-detail-page.has-backdrop {
    padding-top: 185px;
  }

  .media-detail-nav {
    top: 10px;
  }

  .media-detail-hero {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .media-poster-shell {
    width: 118px;
    grid-column: 1;
    grid-row: 1 / span 5;
  }

  .media-detail-content {
    display: contents;
  }

  .detail-kicker,
  .media-page-title,
  .detail-original-title,
  .media-detail-content .genres {
    grid-column: 2;
  }

  .media-page-title {
    margin-top: 6px;
    font-size: clamp(27px, 9vw, 40px);
  }

  .media-detail-content .genres {
    margin-top: 8px;
  }

  .media-detail-content .genres .tag:nth-child(n+5) {
    display: none;
  }

  .media-detail-content .synopsis {
    grid-column: 1 / -1;
    display: block;
    max-width: none;
    margin: 4px 0 0;
    overflow: visible;
    -webkit-line-clamp: 3;
  }

  .media-detail-content .modal-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-top: 8px;
  }

  .media-detail-content .modal-actions .btn {
    min-width: 0;
    min-height: 42px;
    justify-content: flex-start;
    padding: 8px 11px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .media-detail-content .modal-actions .btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .media-facts {
    grid-column: 1 / -1;
    display: block;
  }

  .media-facts .source-box {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .media-detail-body {
    gap: 20px;
    margin-top: 26px;
  }

  .episodes-grid {
    grid-template-columns: 1fr;
  }

  .episode-nav {
    gap: 5px;
  }

  .episode-nav .btn span {
    display: none;
  }

  .player-container {
    min-height: 190px;
  }
}

@media (max-width: 430px) {
  #results.grid,
  #watchedBox.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-heading {
    align-items: end;
  }

  .library-heading p {
    display: none;
  }

  .library-overview-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 11px 10px;
  }

  .library-overview-item > i {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .library-overview-item strong {
    font-size: 17px;
  }

  .library-toolbar .btn {
    min-height: 36px;
    min-width: 0;
    gap: 4px;
    padding-inline: 5px;
    font-size: 10px;
  }

  .library-toolbar .btn span {
    display: inline;
  }

  .library-toolbar .left {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }

  .library-toolbar .btn i {
    width: auto;
  }

  .library-actions #newListBtn span {
    display: inline;
  }

  .library-list-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-inline: -10px;
    padding-inline: 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .list-row {
    width: min(310px, calc(100vw - 46px));
    flex: 0 0 min(310px, calc(100vw - 46px));
    scroll-snap-align: start;
  }

  .list-detail-head {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
  }

  .list-detail-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .list-detail-actions .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .list-detail-actions .btn span {
    display: inline;
  }

  .managed-list-item,
  .history-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .managed-list-item .history-poster,
  .history-poster {
    width: 56px;
  }

  .profile-metrics {
    grid-template-columns: 1fr;
  }

  .profile-metric {
    grid-template-columns: 30px 1fr auto;
    justify-items: start;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-metric .bi { grid-column: 1; grid-row: 1; }
  .profile-metric span { grid-column: 2; grid-row: 1; }
  .profile-metric strong { grid-column: 3; grid-row: 1; }

  .settings-panel {
    padding: 14px;
  }

  .theme-option {
    grid-template-columns: 62px minmax(0, 1fr) 18px;
  }

  .theme-preview {
    width: 62px;
  }

  .font-options {
    grid-template-columns: 1fr;
  }

  .media-detail-hero {
    grid-template-columns: 102px minmax(0, 1fr);
    gap: 11px;
  }

  .media-poster-shell {
    width: 102px;
  }

  .media-page-title {
    font-size: clamp(24px, 8.8vw, 34px);
  }

  .media-facts {
    margin-top: 8px;
  }

  .episode-card {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .episode-thumb,
  .episode-thumb-fallback {
    width: 72px;
  }
}

@media (max-width: 700px) {
  #communityTab,
  #communityBox,
  .community-page {
    width: 100%;
  }

  .community-page {
    gap: 0;
  }

  .community-hero {
    display: block;
    min-height: 0;
    margin-bottom: 8px;
    padding: 18px 16px 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 5%, var(--panel));
  }

  .community-hero h2 {
    max-width: 330px;
    margin: 8px 0 6px;
    font-size: 28px;
    line-height: 1.03;
  }

  .community-hero p {
    max-width: 350px;
    font-size: 11px;
    line-height: 1.55;
  }

  .community-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .community-overview > div,
  .community-overview > div:last-child {
    grid-template-columns: 22px minmax(0, 1fr);
    min-width: 0;
    min-height: 54px;
    align-content: center;
    gap: 1px 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .community-overview span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .community-discovery-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-bottom: 0;
  }

  .community-section,
  .community-discovery-grid .community-section {
    min-width: 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
  }

  .community-admin-section {
    padding-left: 0;
    border-top: 0;
    border-left: 0;
  }

  .community-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
  }

  .community-section-head h3,
  .community-section-head small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-section-head > strong {
    width: 32px;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .community-section-search {
    width: 100%;
    min-width: 0;
    margin: 0 0 13px;
  }

  .community-grid-compact {
    display: flex;
    width: 100%;
    gap: 9px;
    margin: 0;
    padding: 0 1px 7px;
    overflow-x: auto;
  }

  .community-grid-compact > .community-card {
    width: min(280px, 82vw);
    flex: 0 0 min(280px, 82vw);
    grid-template-columns: 1fr;
    grid-template-rows: 132px minmax(0, 1fr);
    min-height: 260px;
  }

  .community-grid-compact > .community-card .community-cover {
    width: 100%;
    min-height: 132px;
    border-radius: 7px 7px 0 0;
  }

  .community-grid-compact > .empty {
    min-width: 100%;
    flex: 0 0 100%;
  }

  .community-user-rail {
    display: flex;
    width: 100%;
    gap: 8px;
    padding-bottom: 5px;
    overflow-x: auto;
  }

  .community-user-rail > .community-user-card {
    width: min(190px, 58vw);
    min-height: 126px;
    flex: 0 0 min(190px, 58vw);
  }

  .community-user-rail > .empty {
    min-width: 100%;
    flex: 0 0 100%;
  }

  .community-lists-section .community-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .community-lists-section .community-card {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: minmax(138px, 1fr);
    min-height: 138px;
  }

  .community-lists-section .community-cover {
    width: 104px;
    min-height: 100%;
    padding: 10px;
    border-radius: 7px 0 0 7px;
  }

  .community-lists-section .community-cover strong,
  .community-lists-section .community-cover small {
    display: none;
  }

  .community-lists-section .community-card-body {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    height: 100%;
    gap: 5px;
    padding: 10px;
  }

  .community-lists-section .community-actions {
    display: flex;
    gap: 5px;
    overflow-x: auto;
  }

  .community-user-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .community-user-card {
    min-width: 0;
    min-height: 132px;
    padding: 16px 9px 11px;
  }

  .community-user-card img,
  .community-user-card .community-user-avatar {
    width: 48px;
    height: 48px;
  }

  .community-page .empty {
    display: grid;
    min-height: 86px;
    place-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
  }

  .community-pager {
    align-items: center;
    padding: 14px 0 0;
  }
}

/* Route overrides must remain last. */

.profile-overview {
  grid-template-columns: minmax(0, 1fr) 270px;
}

.profile-banner {
  min-height: 220px;
  background-image: var(--profile-banner);
  background-position: center;
  background-size: cover;
}

.profile-hero-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.profile-metrics {
  grid-template-columns: 1fr;
}

.profile-workspace {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.public-profile-hero {
  min-height: 0;
  border-radius: 8px;
}

.public-profile-banner {
  min-height: 250px;
  background-image: var(--public-banner);
  background-position: center;
  background-size: cover;
}

@media (max-width: 900px) {
  .profile-overview,
  .profile-workspace,
  .public-profile-layout {
    grid-template-columns: 1fr;
  }

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

  .profile-metric {
    grid-template-columns: 1fr;
    min-height: 72px;
    justify-items: center;
    gap: 2px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .profile-metric:last-child {
    border-right: 0;
  }

  .profile-metric .bi,
  .profile-metric strong,
  .profile-metric span {
    grid-column: 1;
  }

  .profile-metric .bi { grid-row: 1; }
  .profile-metric strong { grid-row: 2; }
  .profile-metric span { grid-row: 3; }
}

@media (max-width: 700px) {
  .profile-banner {
    min-height: 150px;
  }

  .profile-hero-content {
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 12px;
  }

  .profile-avatar {
    width: 74px;
    height: 74px;
    margin-top: -43px;
  }

  .profile-identity p,
  .profile-public-link {
    grid-column: 1 / -1;
  }

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

  .profile-metric,
  .profile-metric:last-child {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .profile-metric:nth-child(2n) {
    border-right: 0;
  }

  .profile-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .public-profile-banner {
    min-height: 150px;
  }

  .public-profile-identity {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 0 13px 14px;
  }

  .public-profile-avatar {
    width: 82px;
    height: 82px;
    margin-top: -38px;
  }

  .public-profile-actions {
    grid-column: 1 / -1;
  }

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

#results > .loading-state,
#watchedBox > .loading-state,
#publicFeatured > .loading-state,
.servers-container > .loading-state {
  grid-column: 1 / -1;
}

body.theme-glass {
  --glass-bg: rgba(255, 255, 255, .46);
  --glass-bg-2: rgba(255, 255, 255, .72);
  --glass-bg-soft: rgba(238, 243, 249, .38);
  --glass-shine: rgba(255, 255, 255, .68);
  --glass-border: rgba(255, 255, 255, .82);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .92), inset 0 -1px 0 rgba(87, 96, 116, .08);
  --glass-blur: 28px;
}

body.theme-glass :is(
  .profile-metric,
  .profile-data-card,
  .profile-socials-panel,
  .community-section,
  .community-hero,
  .public-profile-section,
  .server-group
) {
  border-color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

body.theme-glass :is(
  .settings-option-group,
  .profile-editor-section,
  .public-profile-about,
  .profile-account-grid
) {
  border-color: rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .54);
}

body.theme-glass .settings-index {
  border-color: rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.profile-banner:not(.has-profile-banner),
.public-profile-banner:not(.has-public-banner) {
  background-image:
    linear-gradient(128deg, color-mix(in srgb, var(--accent) 18%, var(--panel-2)) 0 34%, transparent 34% 68%, color-mix(in srgb, var(--accent) 8%, var(--panel-2)) 68%),
    linear-gradient(35deg, var(--panel-2), color-mix(in srgb, var(--surface) 82%, var(--accent)));
}

body.theme-glass {
  --glass-bg: rgba(255, 255, 255, .20);
  --glass-bg-2: rgba(255, 255, 255, .42);
  --glass-bg-soft: rgba(224, 232, 243, .18);
  --glass-shine: rgba(255, 255, 255, .76);
  --glass-border: rgba(255, 255, 255, .74);
  --glass-inset:
    inset 1px 1px 0 rgba(255, 255, 255, .96),
    inset -1px -1px 0 rgba(78, 88, 108, .10),
    inset 10px -14px 30px -32px rgba(109, 40, 217, .72),
    inset -12px 10px 34px -34px rgba(37, 99, 235, .58);
  --glass-blur: 30px;
  background: #edf2f8;
}

body.theme-glass::before {
  inset: -8vh -6vw;
  background:
    linear-gradient(116deg, transparent 0 18%, rgba(132, 106, 190, .17) 18% 27%, transparent 27% 58%, rgba(79, 125, 181, .12) 58% 68%, transparent 68%),
    linear-gradient(28deg, #f9fbfe 0 22%, #dce6f1 22% 39%, #f4f7fb 39% 62%, #e5dff0 62% 76%, #fbfcfe 76%);
  filter: blur(16px) saturate(118%);
  transform: scale(1.03);
}

body.theme-glass::after {
  opacity: .74;
  background:
    repeating-linear-gradient(128deg, transparent 0 118px, rgba(255, 255, 255, .36) 118px 120px, transparent 120px 236px),
    linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 45%, rgba(122, 92, 177, .05));
}

body.theme-glass :is(
  .glass,
  .auth-card,
  .hero,
  .search-filter-panel,
  .toolbar,
  .bottom-nav,
  .settings-panel,
  .theme-option,
  .source-setting,
  .source-category-tabs,
  .drawer-panel,
  .detail-modal,
  .card,
  .list-row,
  .managed-list-item,
  .history-row,
  .profile-socials-panel,
  .profile-hero-card,
  .community-card,
  .community-user-card,
  .episode-page,
  .episode-card,
  .servers-container,
  .notice,
  .toast
) {
  border-color: var(--glass-border);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .10) 34%, rgba(226, 234, 246, .12) 68%, rgba(255, 255, 255, .32)),
    rgba(255, 255, 255, .18);
  background-clip: padding-box;
  box-shadow:
    var(--glass-inset),
    0 1px 2px rgba(50, 60, 78, .08),
    0 16px 42px rgba(55, 66, 88, .14);
  backdrop-filter: blur(var(--glass-blur)) saturate(185%) contrast(1.04);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(185%) contrast(1.04);
}

body.theme-glass :is(
  input,
  select,
  textarea,
  .form-control,
  .control,
  .ghost,
  .smallbtn,
  .linkbtn,
  .select-btn,
  .source-category-chip,
  .api-chip,
  .community-user-like,
  .mini-segment .btn
) {
  border-color: rgba(255, 255, 255, .70);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .10)),
    rgba(255, 255, 255, .16);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .90),
    inset -1px -1px 0 rgba(83, 94, 115, .10),
    0 6px 18px rgba(58, 70, 94, .10);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

body.theme-glass :is(
  .profile-metric,
  .profile-data-card,
  .settings-option-group,
  .profile-editor-section,
  .public-profile-about,
  .community-section,
  .public-profile-section,
  .server-group
) {
  border-color: rgba(255, 255, 255, .48);
  background:
    linear-gradient(125deg, rgba(255, 255, 255, .22), transparent 44%),
    rgba(255, 255, 255, .08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .62),
    inset 0 -1px 0 rgba(81, 92, 113, .06);
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
}

body.theme-glass .bottom-nav {
  border-color: rgba(255, 255, 255, .90);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .60), rgba(255, 255, 255, .16) 56%, rgba(139, 92, 246, .10)),
    rgba(255, 255, 255, .20);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .98),
    inset -1px -1px 0 rgba(76, 87, 108, .12),
    inset 12px -16px 34px -35px rgba(109, 40, 217, .85),
    0 14px 40px rgba(53, 64, 85, .18);
  backdrop-filter: blur(34px) saturate(190%);
  -webkit-backdrop-filter: blur(34px) saturate(190%);
}

body.theme-glass .bottom-nav .navbtn.active,
body.theme-glass .primary.btn,
body.theme-glass .source-category-chip.active {
  border-color: rgba(255, 255, 255, .66);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .36), transparent 46%),
    color-mix(in srgb, var(--accent) 74%, rgba(255, 255, 255, .18));
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .72),
    inset -1px -1px 0 rgba(60, 35, 112, .22),
    0 8px 20px rgba(109, 40, 217, .24);
}

body.theme-glass .settings-index {
  border: 1px solid rgba(255, 255, 255, .64);
  background: rgba(255, 255, 255, .14);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .78),
    0 10px 28px rgba(55, 67, 89, .10);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.settings-index {
  scrollbar-width: none;
}

.settings-index::-webkit-scrollbar {
  display: none;
}

/* Adult content protection */
.poster-wrap,
.media-poster-shell,
.modal-poster-shell,
.episode-card {
  overflow: hidden;
}

.poster--blurred-adult,
.adult-blur .poster,
.adult-blur .cover-fallback {
  filter: blur(16px) saturate(.52) brightness(.76);
  transform: scale(1.08);
}

.episode-thumb--blurred {
  filter: blur(20px) saturate(.48) brightness(.72);
  transform: scale(1.16);
}

#routeTab.adult-backdrop-blurred::before {
  filter: blur(28px) saturate(.42) brightness(.62);
  transform: scale(1.08);
  transform-origin: center top;
}

#routeTab.adult-backdrop-blurred::after {
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 78%, transparent) 48%, var(--bg) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 34%, transparent), var(--bg) 94%);
}

.detail-route-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.adult-protection-label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, #ef4444 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #450a0a 78%, transparent);
  color: #fecaca;
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.protection-setting {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 48%, var(--surface));
}

.protection-setting.is-disabled {
  opacity: .58;
}

/* Notifications */
.notification-stack {
  position: fixed;
  z-index: 1300;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(88px + env(safe-area-inset-bottom));
  display: grid;
  width: min(390px, calc(100vw - 28px));
  gap: 9px;
  pointer-events: none;
}

.app-notification {
  --notification-color: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  overflow: hidden;
  padding: 11px 42px 12px 11px;
  border: 1px solid color-mix(in srgb, var(--notification-color) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--text);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(14px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(22px) saturate(150%);
}

.app-notification.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notification-success { --notification-color: #22c55e; }
.notification-error { --notification-color: #ef4444; }
.notification-warning { --notification-color: #f59e0b; }
.notification-info { --notification-color: var(--accent); }

.notification-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--notification-color) 16%, transparent);
  color: var(--notification-color);
  font-size: 17px;
}

.notification-copy {
  min-width: 0;
}

.notification-copy strong,
.notification-copy p {
  display: block;
}

.notification-copy strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.notification-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.notification-action {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--notification-color) 16%, transparent);
  color: var(--notification-color);
  font: inherit;
  font-size: 10px;
  font-weight: 750;
}

.notification-close,
.install-prompt-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.notification-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--notification-color);
  transform-origin: left;
  animation: notificationProgress var(--notification-duration, 4200ms) linear forwards;
}

@keyframes notificationProgress {
  to { transform: scaleX(0); }
}

/* Confirmations */
.app-confirm-dialog {
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}

.app-confirm-dialog.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-confirm-dialog::backdrop {
  background: rgba(2, 4, 8, .68);
  backdrop-filter: blur(8px);
}

.app-confirm-panel {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.app-confirm-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 19px;
}

.app-confirm-icon.danger {
  background: color-mix(in srgb, #ef4444 15%, transparent);
  color: #ef4444;
}

.app-confirm-copy {
  min-width: 0;
}

.app-confirm-copy > span {
  color: var(--accent-2);
  font-size: 8px;
  font-weight: 800;
}

.app-confirm-copy h2 {
  margin: 3px 0 6px;
  font-size: 18px;
}

.app-confirm-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.app-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 3px;
}

.app-confirm-actions .danger {
  border-color: color-mix(in srgb, #ef4444 42%, var(--line));
  background: #dc2626;
  color: #fff;
}

/* Install prompt */
.install-prompt {
  position: fixed;
  z-index: 1400;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  display: grid;
  width: min(560px, calc(100vw - 28px));
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px 16px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
  color: var(--text);
  opacity: 0;
  transform: translate(-50%, 24px) scale(.98);
  transition: opacity .24s ease, transform .24s ease;
  backdrop-filter: blur(28px) saturate(160%);
}

.install-prompt.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.install-app-icon {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .24), transparent 54%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 16px 36px color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 28px;
  font-weight: 850;
}

.install-prompt-copy {
  min-width: 0;
  padding-right: 24px;
}

.install-eyebrow {
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 800;
}

.install-prompt-copy h2 {
  margin: 3px 0 5px;
  font-size: 20px;
}

.install-prompt-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.install-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.install-steps > div {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
}

.install-steps i {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 17px;
}

.install-steps b {
  color: var(--text);
}

.install-prompt-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.theme-glass .app-notification,
body.theme-glass .install-prompt,
body.theme-glass .app-confirm-panel {
  border-color: rgba(255, 255, 255, .78);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .16)),
    rgba(255, 255, 255, .2);
  box-shadow:
    0 28px 72px rgba(67, 75, 94, .2),
    inset 1px 1px 0 rgba(255, 255, 255, .92),
    inset -1px -1px 0 rgba(80, 89, 108, .15);
  backdrop-filter: blur(34px) saturate(190%) contrast(1.04);
}

@media (max-width: 640px) {
  .managed-ad-slot,
  .detail-inline-ad,
  .episode-player-ad {
    width: 100%;
    min-height: 92px;
    margin: 12px auto;
    border-radius: 7px;
  }

  .notification-stack {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }

  .install-prompt {
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: calc(100vw - 18px);
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
  }

  .install-app-icon {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .install-prompt-copy h2 {
    font-size: 17px;
  }

  .install-steps {
    grid-template-columns: 1fr;
  }

  .install-steps > div {
    min-height: 42px;
  }

  .install-prompt-actions .btn {
    flex: 1 1 0;
  }

  .app-confirm-panel {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 15px;
  }

  .app-confirm-icon {
    width: 42px;
    height: 42px;
  }

  .app-confirm-actions .btn {
    flex: 1 1 0;
  }
}

/* Contextual loading V2 */
.loading-state {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 360px;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr);
  grid-template-rows: minmax(0, 1fr) 4px;
  gap: 24px 32px;
  align-items: stretch;
  overflow: hidden;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 94%, var(--accent) 6%);
}

.loading-state::before {
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--text) 3%, transparent);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.loading-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 252px;
  align-items: center;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
}

.loading-visual {
  width: 100%;
  align-content: center;
}

.loading-signal {
  position: absolute;
  top: 13px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.loading-signal > i,
.loading-status-list span > i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--line-strong);
}

.loading-signal > i {
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent);
  animation: loading-signal 1.25s ease-in-out infinite;
}

.loading-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 7px;
}

.loading-copy > small {
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
}

.loading-copy > strong {
  max-width: 380px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.06;
}

.loading-copy > span {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.loading-status-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.loading-status-list > span {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.loading-status-list > span.is-active {
  color: var(--text);
}

.loading-status-list > span.is-active > i {
  background: var(--accent);
  animation: loading-status 1.1s ease-in-out infinite;
}

.loading-track {
  grid-column: 1 / -1;
  align-self: end;
}

.loading-catalog {
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  align-items: end;
  gap: clamp(8px, 1.4vw, 16px);
  padding-top: 18px;
}

.loading-catalog i {
  display: grid;
  min-width: 0;
  gap: 8px;
  animation: loading-card-float 2.2s ease-in-out infinite;
}

.loading-catalog i:nth-child(2n) {
  animation-delay: -.65s;
}

.loading-catalog i:nth-child(3n) {
  animation-delay: -1.1s;
}

.loading-catalog i.is-featured {
  transform: translateY(-12px);
}

.loading-catalog b {
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-sm);
}

.loading-catalog span,
.loading-catalog small {
  width: 88%;
}

.loading-catalog small {
  width: 56%;
}

.loading-detail {
  display: grid;
  grid-template-columns: minmax(110px, 28%) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  padding: 22px 2%;
}

.loading-detail > i {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.loading-detail > span {
  display: grid;
  min-width: 0;
  gap: 13px;
}

.loading-detail > span > b:nth-child(1) {
  width: 78%;
  height: 28px;
}

.loading-detail > span > b:nth-child(2) {
  width: 48%;
  height: 10px;
}

.loading-detail > span > b:nth-child(n + 3) {
  width: 94%;
  height: 8px;
}

.loading-detail > span > em {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.loading-detail > span > em small {
  width: 54px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.loading-player {
  display: grid;
  gap: 12px;
}

.loading-player > i {
  display: grid;
  min-height: 205px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.loading-play-ring {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  animation: loading-ring-spin 1.7s linear infinite;
}

.loading-play-ring::before {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--accent);
  content: "";
}

.loading-player > em {
  display: flex;
  gap: 8px;
}

.loading-player > em b {
  width: 92px;
  height: 28px;
  border-radius: 999px;
}

.loading-profile {
  position: relative;
  display: grid;
  min-height: 220px;
  align-content: end;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.loading-profile > span {
  position: absolute;
  inset: 0 0 42%;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-2));
}

.loading-profile > i {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border: 5px solid var(--panel);
  border-radius: 50%;
  background: var(--surface);
}

.loading-profile > b {
  position: relative;
  width: 48%;
  height: 10px;
  margin-bottom: 8px;
}

.loading-profile > b:nth-of-type(2) {
  width: 30%;
  height: 7px;
}

.loading-profile > em {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 7px;
}

.loading-profile > em small {
  width: 54px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

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

.loading-collection i {
  display: grid;
  min-width: 0;
  min-height: 184px;
  grid-template-rows: minmax(0, 1fr) 9px 7px;
  gap: 9px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.loading-collection span {
  width: 100%;
  height: auto;
  border-radius: 0;
}

.loading-collection b,
.loading-collection small {
  width: calc(100% - 18px);
  margin: 0 9px;
}

.loading-collection small {
  height: 7px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: var(--panel-2);
}

.loading-state :is(
  .loading-catalog b,
  .loading-catalog span,
  .loading-catalog small,
  .loading-detail > i,
  .loading-detail b,
  .loading-player > i,
  .loading-player > em b,
  .loading-profile,
  .loading-profile > i,
  .loading-profile > b,
  .loading-collection span,
  .loading-collection b,
  .loading-collection small
) {
  background-image: linear-gradient(105deg, transparent 28%, color-mix(in srgb, var(--text) 9%, transparent) 48%, transparent 68%);
  background-size: 220% 100%;
  animation: loading-shimmer 1.45s linear infinite;
}

/* Community V4 */
.community-page {
  display: grid;
  width: 100%;
  gap: 0;
}

.community-hero {
  display: grid;
  min-height: 238px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .62fr);
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
  padding: clamp(30px, 5vw, 66px) 0;
  border-bottom: 1px solid var(--line);
}

.community-hero-copy {
  min-width: 0;
}

.community-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
}

.community-hero .eyebrow i {
  font-size: 14px;
}

.community-hero h2 {
  max-width: 760px;
  margin: 12px 0 10px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
}

.community-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.community-overview {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.community-overview > div {
  display: grid;
  min-width: 0;
  min-height: 70px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.community-overview > div:last-child {
  border-bottom: 0;
}

.community-overview > div > i {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 17px;
}

.community-overview > div > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.community-overview strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.community-overview small {
  color: var(--muted);
  font-size: 10px;
}

.community-section {
  min-width: 0;
  padding: clamp(26px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}

.community-section-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.community-section-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.community-section-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 18px;
}

.community-section-title > div {
  min-width: 0;
}

.community-section-title > div > span {
  display: block;
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .13em;
}

.community-section-head h3 {
  margin: 0;
  font-size: 20px;
}

.community-section-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.community-section-head > strong {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-size: 12px;
}

.community-section-head-with-search {
  align-items: end;
}

.community-search {
  display: flex;
  width: min(340px, 100%);
  min-width: 240px;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
}

.community-search > i {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 15px;
}

.community-search .control {
  width: 100%;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.community-grid-compact {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  padding: 2px 1px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.community-grid-compact > * {
  width: min(320px, 78vw);
  flex: 0 0 min(320px, 78vw);
  scroll-snap-align: start;
}

.community-card {
  display: grid;
  min-width: 0;
  grid-template-rows: 164px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease;
}

.community-card:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  transform: translateY(-2px);
}

.community-cover {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 164px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px;
  overflow: hidden;
  border-radius: 0;
  background-position: center;
  background-size: cover;
}

.community-cover-count {
  position: absolute;
  top: 11px;
  right: 11px;
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 8, 12, .62);
  font-size: 10px;
  backdrop-filter: blur(10px);
}

.community-cover-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.community-cover-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  text-overflow: ellipsis;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .85);
  white-space: nowrap;
}

.community-cover-copy small {
  color: rgba(255, 255, 255, .76);
  font-size: 9px;
}

.community-card-body {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(34px, 1fr) auto;
  gap: 11px;
  padding: 14px;
}

.community-card-heading {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.community-title {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-owner {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.community-owner span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-card-body > p {
  display: -webkit-box;
  min-height: 34px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.community-card-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.community-card-meta {
  display: flex;
  min-width: 0;
  gap: 10px;
  padding: 0;
  border: 0;
}

.community-card-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.community-card-meta .liked {
  color: #ef4444;
}

.community-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
}

.community-actions .btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
}

.community-actions .liked {
  color: #ef4444;
}

.community-people-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, .3fr);
  gap: clamp(24px, 4vw, 48px);
}

.community-people-layout > .community-section {
  border-bottom: 0;
}

.community-admin-section {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.community-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.community-user-card {
  display: grid;
  min-width: 0;
  min-height: 142px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease;
}

.community-user-card:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  transform: translateY(-2px);
}

.community-user-card-top {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.community-user-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  text-align: left;
}

.community-avatar-shell {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.community-user-card img,
.community-user-card .community-user-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0;
  place-items: center;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 50%;
  object-fit: cover;
}

.community-avatar-shell > .public-verified-check {
  position: absolute;
  right: -1px;
  bottom: -1px;
  padding: 2px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface);
  font-size: 16px;
}

.community-user-identity {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.community-user-identity strong,
.community-user-identity small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-user-identity strong {
  color: var(--text);
  font-size: 13px;
}

.community-user-identity small {
  color: var(--muted);
  font-size: 9px;
}

.community-user-like {
  position: static;
  display: inline-flex;
  min-width: 44px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--field);
  font-size: 12px;
}

.community-user-like > i {
  font-size: 17px;
}

.community-user-like.liked {
  border-color: color-mix(in srgb, #ef4444 34%, var(--line));
  color: #ef4444;
  background: color-mix(in srgb, #ef4444 8%, var(--field));
}

.community-user-open {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.community-user-open > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-user-open > i {
  color: var(--accent);
  font-size: 14px;
}

.community-user-rail {
  display: grid;
  gap: 10px;
}

.community-user-rail .community-user-card {
  min-height: 130px;
}

.community-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 20px;
}

.community-pager > span {
  min-width: 52px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.community-pager .btn {
  min-height: 40px;
}

.community-page .loading-state {
  min-height: 190px;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr);
  grid-template-rows: minmax(0, 1fr) 3px;
  gap: 14px 20px;
  padding: 14px;
}

.community-page .loading-stage {
  min-height: 158px;
  padding: 14px;
}

.community-page .loading-copy > strong {
  font-size: 18px;
}

.community-page .loading-copy > span {
  font-size: 10px;
}

.community-page .loading-status-list {
  margin-top: 8px;
}

.community-page .loading-status-list > span {
  min-height: 25px;
}

.community-page .loading-signal {
  display: none;
}

.community-page .loading-collection {
  height: 126px;
}

.community-page .loading-collection i {
  min-height: 126px;
}

.community-page .loading-profile {
  min-height: 132px;
}

body.theme-glass .community-hero {
  padding-right: clamp(18px, 3vw, 38px);
  padding-left: clamp(18px, 3vw, 38px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .16);
  box-shadow: var(--glass-inset), 0 18px 42px rgba(60, 70, 90, .12);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

@keyframes loading-signal {
  0%,
  100% { opacity: .45; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes loading-status {
  0%,
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 25%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

@keyframes loading-card-float {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes loading-ring-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .loading-state {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr);
    gap: 20px;
  }

  .loading-catalog {
    grid-template-columns: repeat(4, minmax(58px, 1fr));
  }

  .loading-catalog i:nth-child(n + 5) {
    display: none;
  }

  .community-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .community-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .community-overview > div {
    min-height: 68px;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 10px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .community-overview > div:last-child {
    border-right: 0;
  }

  .community-overview > div > i {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .community-people-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .community-admin-section {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .community-user-rail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .community-user-rail > .community-user-card {
    width: min(270px, 74vw);
    flex: 0 0 min(270px, 74vw);
  }
}

@media (max-width: 700px) {
  .loading-state {
    min-height: 430px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 228px auto 3px;
    gap: 17px;
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .loading-stage {
    min-height: 228px;
    padding: 14px;
  }

  .loading-copy {
    padding: 2px 3px;
  }

  .loading-copy > strong {
    font-size: 24px;
  }

  .loading-status-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 10px;
    border: 0;
  }

  .loading-status-list > span {
    min-height: 44px;
    align-items: flex-start;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 8px;
    line-height: 1.35;
  }

  .loading-status-list > span > i {
    margin-top: 2px;
  }

  .loading-catalog {
    gap: 8px;
  }

  .loading-detail {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 22px 0 4px;
  }

  .loading-player > i {
    min-height: 168px;
  }

  .community-hero {
    min-height: 0;
    margin: 0;
    padding: 28px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  body.theme-glass .community-hero {
    padding: 22px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
  }

  .community-hero h2 {
    max-width: 430px;
    margin: 10px 0 8px;
    font-size: clamp(30px, 10vw, 42px);
  }

  .community-hero p {
    font-size: 11px;
    line-height: 1.55;
  }

  .community-overview {
    gap: 0;
    margin-top: 2px;
  }

  .community-overview > div {
    display: grid;
    min-height: 76px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
    padding: 9px 5px;
    text-align: center;
  }

  .community-overview > div > i {
    width: 32px;
    height: 32px;
  }

  .community-overview > div > span {
    justify-items: center;
  }

  .community-overview strong {
    font-size: 17px;
  }

  .community-overview small {
    max-width: 88px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-section {
    padding: 24px 0;
  }

  .community-section-head,
  .community-section-head-with-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
  }

  .community-section-head-with-search .community-search {
    grid-column: 1 / -1;
  }

  .community-section-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 16px;
  }

  .community-section-head .community-section-title > .community-section-icon {
    font-size: 16px;
  }

  .community-section-head h3 {
    font-size: 18px;
  }

  .community-section-head small {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-search {
    width: 100%;
    min-width: 0;
    min-height: 46px;
  }

  .community-grid-compact {
    margin-right: calc(var(--page-pad, 16px) * -1);
    padding-right: var(--page-pad, 16px);
  }

  .community-grid-compact > .community-card {
    width: min(292px, 80vw);
    flex-basis: min(292px, 80vw);
  }

  .community-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .community-lists-section .community-card {
    min-height: 166px;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: 1fr;
  }

  .community-lists-section .community-cover {
    min-height: 100%;
    padding: 10px;
  }

  .community-lists-section .community-cover-count {
    top: 8px;
    right: 8px;
    min-height: 25px;
    padding: 0 8px;
  }

  .community-lists-section .community-cover-copy strong,
  .community-lists-section .community-cover-copy small {
    display: none;
  }

  .community-lists-section .community-card-body {
    gap: 7px;
    padding: 11px;
  }

  .community-card-footer {
    align-items: flex-end;
  }

  .community-card-meta {
    display: grid;
    gap: 4px;
  }

  .community-actions {
    max-width: 88px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .community-actions .btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .community-user-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .community-user-card {
    min-height: 168px;
    gap: 11px;
    padding: 12px;
  }

  .community-user-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 7px;
  }

  .community-user-main {
    display: grid;
    min-width: 0;
    justify-items: start;
    gap: 8px;
  }

  .community-avatar-shell,
  .community-user-card img,
  .community-user-card .community-user-avatar {
    width: 54px;
    height: 54px;
  }

  .community-user-like {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
  }

  .community-user-like span {
    display: none;
  }

  .community-user-open {
    min-height: 38px;
  }

  .community-page .loading-state {
    min-height: 310px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 158px auto 3px;
    gap: 12px;
  }

  .community-page .loading-stage {
    min-height: 158px;
  }

  .community-page .loading-status-list {
    display: none;
  }
}

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

  .community-user-card-top,
  .community-user-main {
    display: flex;
  }

  .community-user-like span {
    display: inline;
  }

  .community-user-like {
    width: auto;
    min-width: 44px;
    padding: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-state *,
  .community-card,
  .community-user-card {
    animation: none !important;
    transition: none !important;
  }
}

body.onboarding-open {
  overflow: hidden;
}

html:has(body.onboarding-open) {
  overflow: hidden;
}

.onboarding-gate {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(18px, 4vw, 48px);
  overflow-x: hidden;
  overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 91%, #151022);
  isolation: isolate;
}

.onboarding-gate[hidden] {
  display: none;
}

.onboarding-ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: clamp(16px, 3vw, 42px);
  padding: 7vh 5vw;
  opacity: .22;
  overflow: hidden;
  pointer-events: none;
}

.onboarding-ambient span {
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.onboarding-ambient span:nth-child(2) {
  transform: translateY(12vh);
  background: color-mix(in srgb, var(--accent-2) 8%, transparent);
}

.onboarding-ambient span:nth-child(3) {
  transform: translateY(-9vh);
}

.onboarding-panel {
  box-sizing: border-box;
  width: min(940px, 100%);
  max-width: 100%;
  min-height: min(700px, calc(100dvh - 40px));
  display: grid;
  grid-template-rows: auto auto auto minmax(250px, 1fr) auto auto;
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--accent));
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 34px 100px rgba(0, 0, 0, .46), inset 0 1px rgba(255, 255, 255, .08);
}

body.theme-glass .onboarding-gate {
  background: rgba(235, 239, 248, .78);
  backdrop-filter: blur(30px) saturate(125%);
  -webkit-backdrop-filter: blur(30px) saturate(125%);
}

body.theme-glass .onboarding-panel {
  border-color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 30px 90px rgba(54, 61, 79, .2), inset 0 1px 0 rgba(255, 255, 255, .95);
  backdrop-filter: blur(36px) saturate(145%);
  -webkit-backdrop-filter: blur(36px) saturate(145%);
}

.onboarding-head,
.onboarding-brand,
.onboarding-actions,
.onboarding-source-summary > div {
  display: flex;
  align-items: center;
}

.onboarding-head {
  justify-content: space-between;
}

.onboarding-brand {
  gap: 12px;
}

.onboarding-brand > div {
  display: grid;
  gap: 2px;
}

.onboarding-brand b {
  font-size: 16px;
}

.onboarding-brand small,
.onboarding-source-summary small {
  color: var(--muted);
  font-size: 12px;
}

.onboarding-mark,
.onboarding-logout {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 13px;
}

.onboarding-mark {
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.onboarding-logout {
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.onboarding-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: clamp(26px, 5vh, 48px) 0 0;
}

.onboarding-progress::before,
.onboarding-progress > i {
  position: absolute;
  top: 16px;
  left: 10%;
  width: 80%;
  height: 2px;
  content: "";
  background: var(--line);
}

.onboarding-progress > i {
  width: 0;
  max-width: 80%;
  background: var(--accent);
  transform-origin: left;
  transition: width .32s ease;
}

.onboarding-progress > span {
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
}

.onboarding-progress b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  font-size: 12px;
}

.onboarding-progress em {
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.onboarding-progress span.active {
  color: var(--text);
}

.onboarding-progress span.active b {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.onboarding-progress span.current b {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}

.onboarding-copy {
  max-width: 630px;
  padding: clamp(24px, 4vh, 38px) 0 18px;
}

.onboarding-copy > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.onboarding-copy h1 {
  margin: 7px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.onboarding-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.onboarding-steps {
  min-height: 0;
}

.onboarding-step {
  animation: onboarding-enter .28s ease;
}

.onboarding-step[hidden] {
  display: none;
}

@keyframes onboarding-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.onboarding-fields,
.onboarding-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.onboarding-fields label,
.onboarding-social-grid label {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.onboarding-fields .wide {
  grid-column: 1 / -1;
}

.onboarding-fields label > span,
.onboarding-social-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.onboarding-fields label > span em {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

.onboarding-fields input,
.onboarding-fields textarea,
.onboarding-social-grid input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--panel-2);
  color: var(--text);
}

.onboarding-fields textarea {
  min-height: 104px;
  resize: vertical;
}

.onboarding-fields input:focus,
.onboarding-fields textarea:focus,
.onboarding-social-grid input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.onboarding-fields label > small {
  color: var(--muted);
  font-size: 10px;
}

.onboarding-username {
  position: relative;
}

.onboarding-username i {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted);
  font-style: normal;
  transform: translateY(-50%);
}

.onboarding-username input {
  padding-left: 34px;
}

.onboarding-social-grid label {
  position: relative;
  grid-template-columns: 22px 110px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 7px 8px 7px 14px;
  border-bottom: 1px solid var(--line);
}

.onboarding-social-grid label > i {
  color: var(--accent);
  font-size: 17px;
}

.onboarding-social-grid input {
  min-height: 42px;
}

.onboarding-source-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.onboarding-source-summary > div {
  gap: 12px;
}

.onboarding-source-summary > div > i {
  color: var(--accent);
  font-size: 22px;
}

.onboarding-source-summary span {
  display: grid;
  gap: 2px;
}

.onboarding-source-summary button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.onboarding-source-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  max-height: 330px;
  padding-right: 5px;
  overflow: auto;
}

.onboarding-source-group {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
}

.onboarding-source-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.onboarding-source-group > header span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.onboarding-source-group > header i { color: var(--accent); }
.onboarding-source-group > header b { color: var(--text); }

.onboarding-source-group > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.onboarding-source {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-2) 90%, transparent);
  cursor: pointer;
}

.onboarding-source:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--panel-2));
}

.onboarding-source-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--panel);
  color: var(--accent);
}

.onboarding-source-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.onboarding-source > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.onboarding-source b,
.onboarding-source small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboarding-source b {
  font-size: 12px;
}

.onboarding-source small {
  color: var(--muted);
  font-size: 10px;
}

.onboarding-source input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.onboarding-source > i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: transparent;
}

.onboarding-source input:checked + i {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.onboarding-source:has(input:disabled) {
  opacity: .48;
  cursor: not-allowed;
}

.onboarding-appearance {
  display: grid;
  gap: 14px;
  max-height: 390px;
  padding-right: 5px;
  overflow: auto;
}

.onboarding-preference-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}

.onboarding-preference-block > header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.onboarding-preference-block > header > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.onboarding-preference-block > header > div { display: grid; gap: 2px; }
.onboarding-preference-block header b { font-size: 12px; }
.onboarding-preference-block header small { color: var(--muted); font-size: 10px; }

.onboarding-theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.onboarding-font-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

.onboarding-choice-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.onboarding-preference-block:first-child .onboarding-choice-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.onboarding-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}

.onboarding-toggle-card > span:first-child { display: flex; align-items: center; gap: 10px; }
.onboarding-toggle-card > span:first-child > i { color: var(--accent); font-size: 20px; }
.onboarding-toggle-card > span:first-child > span { display: grid; gap: 2px; }
.onboarding-toggle-card b { font-size: 12px; }
.onboarding-toggle-card small { color: var(--muted); font-size: 10px; }

.onboarding-adult-mode {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 250px;
  padding: clamp(22px, 5vw, 44px);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 20px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, var(--panel-2)), var(--panel));
}

.onboarding-adult-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 30px;
}

.onboarding-adult-copy > span { color: var(--accent); font-size: 9px; font-weight: 900; }
.onboarding-adult-copy h2 { margin: 6px 0 8px; font-size: 26px; }
.onboarding-adult-copy p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.6; }

.onboarding-adult-switch { display: grid; justify-items: center; gap: 8px; cursor: pointer; }
.onboarding-adult-switch input { position: absolute; opacity: 0; }
.onboarding-adult-switch > span { position: relative; width: 62px; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
.onboarding-adult-switch > span::after { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); content: ''; transition: transform .2s ease, background .2s ease; }
.onboarding-adult-switch input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.onboarding-adult-switch input:checked + span::after { background: var(--accent); transform: translateX(28px); }
.onboarding-adult-switch b { font-size: 10px; }

.onboarding-adult-note {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.onboarding-adult-note i { color: var(--accent); }

.onboarding-source-empty {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.onboarding-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(244, 63, 94, .34);
  border-radius: 10px;
  background: rgba(244, 63, 94, .1);
  color: #fb7185;
  font-size: 12px;
}

.onboarding-actions {
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.onboarding-actions .btn {
  min-height: 46px;
  padding-inline: 17px;
}

.onboarding-lock {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

.onboarding-lock i {
  color: var(--accent-2);
}

.onboarding-spin {
  animation: onboarding-spin .8s linear infinite;
}

@keyframes onboarding-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .onboarding-gate {
    place-items: start center;
    padding: 0;
  }

  .onboarding-panel {
    width: 100%;
    min-height: 100dvh;
    padding: 20px 16px max(18px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .onboarding-progress {
    margin-top: 24px;
  }

  .onboarding-copy {
    padding: 25px 0 17px;
  }

  .onboarding-copy h1 {
    font-size: 30px;
  }

  .onboarding-fields,
  .onboarding-social-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .onboarding-social-grid label {
    grid-template-columns: 22px 90px minmax(0, 1fr);
  }

  .onboarding-source-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: 330px;
  }

  .onboarding-source-group > div,
  .onboarding-preference-grid,
  .onboarding-theme-options,
  .onboarding-font-options {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .onboarding-adult-mode {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    min-height: 0;
    padding: 20px;
  }

  .onboarding-adult-icon { width: 58px; height: 58px; font-size: 24px; }
  .onboarding-adult-copy { grid-column: 1 / -1; grid-row: 2; }
  .onboarding-adult-switch { grid-column: 2; grid-row: 1; }
  .onboarding-adult-note { grid-column: 1 / -1; grid-row: 3; }

  .onboarding-lock {
    display: none;
  }

  .onboarding-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 16px -16px -18px;
    padding: 13px 16px max(14px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .onboarding-actions .primary {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .onboarding-progress em { display: none; }
  .onboarding-progress { margin-bottom: 2px; }
}

/* Final responsive corrections */
.community-people-layout,
.community-users-section,
.community-admin-section,
.community-user-grid,
.community-user-rail {
  min-width: 0;
}

.community-admin-section {
  overflow: hidden;
}

.community-user-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
  padding-bottom: 0;
}

.community-user-card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.community-user-card-top,
.community-user-main,
.community-user-identity {
  max-width: 100%;
}

.community-user-main {
  flex: 1 1 auto;
}

.community-user-like {
  align-self: start;
}

.public-profile-page {
  position: relative;
  gap: 14px;
}

.public-profile-page.has-public-background {
  padding: clamp(10px, 2vw, 18px);
  background-attachment: scroll;
}

.public-profile-hero {
  position: relative;
  display: grid;
  min-height: clamp(300px, 34vw, 430px);
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.public-profile-banner {
  position: absolute;
  z-index: -2;
  inset: 0;
  min-height: 0;
  background-color: var(--panel-2);
  background-image: var(--public-banner);
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
}

.public-profile-banner::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 3, 7, .8), rgba(3, 3, 7, .28) 62%, rgba(3, 3, 7, .52)),
    linear-gradient(180deg, rgba(3, 3, 7, .08) 25%, rgba(3, 3, 7, .92) 100%);
  content: "";
}

.public-profile-identity {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2.5vw, 24px);
  padding: clamp(110px, 18vw, 210px) clamp(18px, 3vw, 34px) clamp(20px, 3vw, 32px);
}

.public-profile-avatar {
  width: 112px;
  height: 112px;
  margin: 0;
  border-color: rgba(255, 255, 255, .72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

.public-profile-main {
  align-self: center;
  padding: 0;
}

.public-profile-main h2,
.public-profile-main .eyebrow {
  color: #fff;
}

.public-profile-handle,
.public-profile-hero .public-profile-joined {
  color: rgba(255, 255, 255, .72);
}

.public-profile-actions {
  align-self: end;
  padding: 0;
}

.public-profile-hero .public-profile-like {
  min-height: 42px;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(8, 8, 13, .58);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.public-profile-stats {
  margin: 0;
}

.public-profile-layout {
  align-items: start;
}

.loading-kind-profile .loading-stage {
  padding: clamp(22px, 4vw, 42px);
}

.loading-kind-profile .loading-visual {
  display: grid;
  width: 100%;
  place-items: center;
}

.loading-kind-profile .loading-profile {
  width: min(520px, 100%);
  min-height: 246px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .community-user-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .community-user-rail > .community-user-card {
    width: 100%;
    flex: initial;
  }

  .public-profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-profile-about {
    position: static;
    order: -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
  }

  .public-profile-about section {
    min-width: 0;
    padding: 16px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .public-profile-about section:last-child {
    border-right: 0;
  }
}

@media (max-width: 700px) {
  .community-user-grid,
  .community-user-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .community-user-card {
    min-height: 128px;
  }

  .community-user-card-top,
  .community-user-main {
    display: flex;
  }

  .community-user-like {
    width: auto;
    min-width: 44px;
    padding: 0 10px;
  }

  .community-user-like span {
    display: inline;
  }

  .public-profile-page.has-public-background {
    padding: 8px;
  }

  .public-profile-hero {
    min-height: 344px;
    border-radius: var(--radius-md);
  }

  .public-profile-identity {
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 112px 14px 15px;
  }

  .public-profile-avatar {
    width: 78px;
    height: 78px;
    margin: 0;
  }

  .public-profile-main h2 {
    font-size: clamp(21px, 7vw, 28px);
  }

  .public-profile-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .public-profile-like {
    width: 100%;
  }

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

  .public-profile-about {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-profile-about section,
  .public-profile-about section:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .public-profile-about section:last-child {
    border-bottom: 0;
  }

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

  .loading-kind-profile {
    min-height: 458px;
    grid-template-rows: 224px auto 3px;
  }

  .loading-kind-profile .loading-stage {
    min-height: 224px;
    padding: 12px;
  }

  .loading-kind-profile .loading-profile {
    min-height: 196px;
  }

  .notification-stack {
    bottom: calc(78px + env(safe-area-inset-bottom));
    gap: 6px;
  }

  .app-notification {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding: 10px 38px 11px 10px;
  }

  .notification-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .notification-copy strong {
    font-size: 11px;
  }

  .notification-copy p {
    font-size: 10px;
    line-height: 1.4;
  }

  .notification-action {
    grid-column: 2;
    width: fit-content;
  }
}
