:root {
  --bg: #0B0B0C;
  --active: #CBD3FF;
  --active-text: #133F7A;
  --active-icon: #809FC9;
  --border: #9BA1C2;
  --muted: #7D7D7D;
  --text: #FFFFFF;
  --panel: #111113;
  --panel-2: #171719;
  --danger: #ff5c69;
  --sidebar-width: 255px;
  --sidebar-collapsed-width: 76px;
  --topbar-height: 94px;
  --chat-width: 300px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-ui: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

body.modal-open { overflow: hidden; }

button,
input,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  transition: grid-template-columns 520ms var(--ease-out);
}

.sidebar {
  grid-row: 1 / 3;
  grid-column: 1;
  min-width: 0;
  padding: 0 14px 18px;
  background: var(--bg);
  overflow: hidden auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar { display: none; }

.brand-row {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

.icon-button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  transition: background-color 180ms ease, transform 220ms var(--ease-ui);
}

.icon-button:hover { background: #151517; }
.icon-button:active { transform: scale(.94); }
.icon-button svg { width: 30px; height: 30px; stroke: currentColor; }

.brand-link {
  width: 151px;
  height: 48px;
  display: flex;
  align-items: center;
  opacity: 1;
  transform: translateX(0) scale(1);
  transform-origin: left center;
  transition: opacity 300ms ease, transform 500ms var(--ease-out), width 500ms var(--ease-out), visibility 0ms linear 0ms;
}

.brand-link img {
  width: 151px;
  height: 48px;
  display: block;
}

.main-nav { display: grid; gap: 4px; }

.nav-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: var(--bg);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 180ms ease, color 180ms ease, padding 500ms var(--ease-out), transform 180ms ease;
}

.nav-item:hover:not(.active) { background: #141416; }
.nav-item:active { transform: scale(.985); }
.nav-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: currentColor;
  transition: color 180ms ease, transform 360ms var(--ease-out);
}

.nav-label {
  display: block;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 220ms ease, transform 460ms var(--ease-out);
}

.nav-item.active { background: var(--active); color: var(--active-text); }
.nav-item.active svg { color: var(--active-icon); }
.nav-button { width: 100%; }

.sidebar-rule {
  height: 2px;
  margin: 20px 0;
  background: #2c2c2f;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 180ms ease, transform 440ms var(--ease-out);
}

.recommended-block {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 220ms ease, transform 480ms var(--ease-out);
}

.recommended-block h2 {
  margin: 0 0 8px 3px;
  font-size: 16px;
  font-weight: 500;
}

.recommendations-empty {
  margin: 8px 3px 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.topbar {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding: 0 28px;
  background: var(--bg);
  z-index: 30;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.auth-actions-slot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-control {
  position: relative;
  width: 36px;
  height: 34px;
  flex: 0 0 auto;
  transition: width 480ms var(--ease-out);
}

.search-control.open { width: min(360px, 38vw); }

.search-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--bg);
  opacity: 0;
  transform: scaleX(.08);
  transform-origin: right center;
  pointer-events: none;
  transition: transform 480ms var(--ease-out), opacity 180ms ease, border-color 260ms ease;
}

.search-control.open .search-field {
  border-color: var(--border);
  opacity: 1;
  transform: scaleX(1);
  pointer-events: auto;
}

.search-field input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 45px 0 12px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 170ms ease, transform 360ms var(--ease-out);
}

.search-control.open .search-field input {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 110ms;
}

.search-field input::placeholder { color: #a8a8ad; opacity: 1; }
.search-field input::-webkit-search-cancel-button,
.search-field input::-webkit-search-decoration,
.search-field input::-webkit-search-results-button,
.search-field input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.search-trigger {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 3;
  width: 36px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 220ms var(--ease-ui);
}

.search-trigger:hover { background: #151517; }
.search-trigger:active { transform: scale(.92); }
.search-trigger svg { width: 20px; height: 20px; }
.search-control.open .search-trigger,
.search-control.open .search-trigger:hover,
.search-control.open .search-trigger:focus-visible {
  background: transparent;
  color: var(--active-icon);
}
.search-control.open .search-trigger:active { transform: none; }

.search-results {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #0d0d0f;
  transform-origin: top right;
  animation: dropdown-in 180ms var(--ease-out);
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, padding-left 220ms var(--ease-out);
}

.search-result:hover,
.search-result:focus-visible { padding-left: 13px; background: #171719; outline: none; }
.search-result-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; background: #18181b; }
.search-result-icon svg { width: 16px; height: 16px; }
.search-result-copy { min-width: 0; }
.search-result-copy strong { display: block; font-size: 14px; font-weight: 600; }
.search-result-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.search-empty { padding: 12px; color: var(--muted); font-size: 13px; }

.text-button,
.primary-button,
.account-trigger {
  height: 34px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms var(--ease-ui), border-color 180ms ease;
}

.text-button {
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #fff;
}
.text-button:hover { background: #151517; }
.text-button:active { transform: scale(.97); }

.primary-button {
  border: 0;
  background: var(--active);
  color: var(--active-text);
  font-weight: 500;
}
.primary-button.compact { padding: 0 16px; }
.primary-button:hover { background: #d7ddff; }
.primary-button:active { transform: scale(.98); }

.account-trigger {
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 5px;
  border: 1px solid transparent;
  background: transparent;
}
.account-trigger:hover { background: #151517; }
.account-trigger svg { width: 16px; height: 16px; color: var(--muted); }
.account-avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--active);
  color: var(--active-text);
  font-size: 12px;
  font-weight: 800;
}
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }

.page {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 12px 28px 34px 14px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 280ms ease, transform 420ms var(--ease-out), padding 520ms var(--ease-out);
}

.page.page-enter { opacity: 1; transform: translateY(0); }
.page::-webkit-scrollbar { width: 8px; }
.page::-webkit-scrollbar-track { background: transparent; }
.page::-webkit-scrollbar-thumb { background: #2d2d31; border-radius: 10px; }

.home-grid,
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--chat-width);
  gap: 14px;
  align-items: start;
}

.home-grid {
  align-items: start;
  grid-template-rows: auto auto;
}

.home-featured {
  grid-column: 1;
  grid-row: 1;
}

.home-categories {
  grid-column: 1;
  grid-row: 2;
}
.home-featured,
.home-categories,
.main-column { min-width: 0; }
.home-categories { grid-column: 1; }

.featured-player,
.live-player {
  width: 100%;
  aspect-ratio: 16 / 6.7;
  min-height: 240px;
  max-height: 390px;
  border-radius: 5px;
  background: #0f0f11;
  overflow: hidden;
}

.live-player { aspect-ratio: 16 / 7.15; max-height: 500px; }

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 12px;
}
.home-section-header h1 { margin: 0; font-size: 19px; font-weight: 700; }
.home-section-header button { border: 0; background: transparent; color: #fff; font-size: 12px; cursor: pointer; padding: 5px; }
.home-section-header button:hover { color: var(--active); }

.category-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(116px, 1fr);
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 6px;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.category-row::-webkit-scrollbar { width: 0; height: 0; display: none; }

.category-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 5px;
}

.category-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 5px;
  background: #161618;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 240ms ease;
}

.category-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1);
  transition: transform 520ms var(--ease-out), filter 260ms ease;
}

.category-card:hover .category-cover { box-shadow: inset 0 0 0 1px var(--active); }
.category-card:hover .category-cover img { transform: scale(1.045); filter: brightness(1.04); }

.category-card h3 {
  margin: 7px 3px 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.25;
}
.category-card p { margin: 3px 3px 0; color: #aaa; font-size: 11px; white-space: nowrap; }
.tags { display: flex; gap: 4px; margin: 5px 3px 0; overflow: hidden; }
.tag,
.live-tag {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #35353a;
  color: #f3f3f4;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-panel {
  height: calc(100vh - var(--topbar-height) - 28px);
  min-height: 360px;
  display: grid;
  grid-template-rows: 39px minmax(0, 1fr) 40px;
  gap: 5px;
}

.home-chat { height: auto; min-height: 0; }
.home-grid .home-chat {
  grid-column: 2;
  grid-row: 1;
  height: auto;
  min-height: 0;
  max-height: none;
  align-self: stretch;
}

.chat-header,
.chat-messages,
.chat-compose {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  font-weight: 700;
}
.chat-header svg { width: 18px; height: 18px; }

.chat-messages {
  min-height: 0;
  overflow: hidden auto;
  padding: 10px 8px;
  scrollbar-width: thin;
  scrollbar-color: #343438 transparent;
}

.chat-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.chat-message {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.35;
  animation: chat-in 260ms var(--ease-out);
}
@keyframes chat-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.badge-dot { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; background: #242428; font-size: 10px; font-weight: 700; }
.chat-message strong { font-weight: 700; }
.chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) 36px; overflow: hidden; }
.chat-compose input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 0 11px; background: transparent; color: #fff; font-size: 13px; }
.chat-compose input::placeholder { color: #8f8f94; }
.chat-compose button { display: grid; place-items: center; border: 0; border-left: 1px solid #222226; background: #111113; cursor: pointer; }
.chat-compose button:hover { background: #19191c; }
.chat-compose button svg { width: 18px; height: 18px; }

.live-details { padding: 18px 0 0; }
.live-title { margin: 0 0 17px; font-size: 23px; font-weight: 500; line-height: 1.25; }
.creator-row { display: flex; align-items: center; gap: 14px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--active); color: var(--active-text); font-weight: 800; }
.creator-meta { min-width: 0; }
.creator-name-line { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.creator-name-line strong { font-size: 20px; font-weight: 500; }
.creator-separator { color: #fff; font-size: 13px; }
.followers { font-size: 15px; }
.creator-category { margin-top: 2px; color: var(--muted); font-size: 17px; }
.live-tags { display: flex; gap: 10px; margin-top: 11px; }
.live-tag { height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); font-size: 13px; }
.creator-actions { display: grid; grid-template-columns: minmax(150px, 187px) minmax(150px, 187px); gap: 9px; margin-top: 10px; }
.creator-action { height: 40px; border: 0; border-radius: 5px; background: var(--active); color: var(--active-text); cursor: pointer; transition: background-color 180ms ease, transform 180ms var(--ease-ui); }
.creator-action.secondary { border: 1px solid var(--border); background: var(--bg); color: #fff; }
.creator-action:hover { background: #d8ddff; }
.creator-action.secondary:hover { background: #151517; }
.creator-action:active { transform: scale(.985); }

.browse-shell { min-height: 100%; }
.browse-shell > h1 { margin: 0 0 24px; font-size: 28px; font-weight: 700; }
.browse-tabs { display: flex; align-items: center; gap: 8px; }
.browse-tab {
  position: relative;
  padding: 8px 10px 15px;
  border: 0;
  background: transparent;
  color: #d4d4d8;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
  transition: color 180ms ease;
}
.browse-tab:hover { color: #fff; }
.browse-tab.active { color: var(--active); }
.browse-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--active);
  animation: tab-line 240ms var(--ease-out);
}
@keyframes tab-line { from { transform: scaleX(.25); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.browse-rule { height: 1px; background: #303034; }
.browse-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 30px 0 20px;
}
.tag-search {
  width: min(430px, 42vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #4a4a50;
  border-radius: 5px;
  transition: border-color 180ms ease;
}
.tag-search:focus-within { border-color: var(--border); }
.tag-search svg { width: 20px; height: 20px; color: #d8d8dc; }
.tag-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; }
.tag-search input::placeholder { color: #a1a1a7; }
.browse-filter-group { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.browse-filter-group > span { font-size: 14px; font-weight: 650; }
.select-wrap {
  position: relative;
  height: 40px;
  min-width: 142px;
  display: flex;
  align-items: center;
  border-radius: 5px;
  background: #171719;
}
.select-wrap.wide { min-width: 220px; }
.select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 34px 0 12px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.select-wrap select option { background: #171719; color: #fff; }
.select-wrap svg { position: absolute; right: 10px; width: 18px; height: 18px; pointer-events: none; }
.browse-content { min-height: 360px; }
.browse-empty { min-height: 310px; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.browse-category-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px 10px; }
.browse-category-grid .category-card h3 { font-size: 15px; }
.browse-category-grid .category-card p { font-size: 12px; }

.simple-page { max-width: 900px; padding: 12px 0; }
.simple-page h1 { margin: 0 0 8px; font-size: 28px; }
.simple-page p { margin: 0; color: var(--muted); }

.auth-modal[hidden] { display: none; }
.auth-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.73); opacity: 0; transition: opacity 200ms ease; }
.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(500px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  padding: 28px 30px 26px;
  border: 1px solid #34343a;
  border-radius: 7px;
  background: #141416;
  box-shadow: 0 26px 80px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition: opacity 200ms ease, transform 320ms var(--ease-out);
  scrollbar-width: thin;
}
.auth-modal.open .auth-backdrop { opacity: 1; }
.auth-modal.open .auth-dialog { opacity: 1; transform: translateY(0) scale(1); }
.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: #232327;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms var(--ease-ui);
}
.auth-close:hover { background: #2d2d32; }
.auth-close:active { transform: scale(.94); }
.auth-close svg { width: 20px; height: 20px; }
.auth-brand { height: 52px; display: flex; align-items: center; margin-bottom: 14px; }
.auth-brand img { width: 124px; height: auto; }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid #3a3a3f; margin-bottom: 26px; }
.auth-tab {
  position: relative;
  padding: 12px 0 15px;
  border: 0;
  background: transparent;
  color: #d5d5d8;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab:hover { color: #fff; }
.auth-tab.active { color: var(--active); }
.auth-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--active); }
.auth-form { display: grid; gap: 16px; }
.auth-form > label { display: grid; gap: 7px; }
.auth-form label > span:first-child { font-size: 14px; font-weight: 650; }
.auth-form input:not([type="checkbox"]),
.password-wrap {
  width: 100%;
  height: 44px;
  border: 1px solid #595960;
  border-radius: 5px;
  background: #0d0d0f;
  transition: border-color 180ms ease;
}
.auth-form input:not([type="checkbox"]) { padding: 0 12px; outline: 0; color: #fff; }
.auth-form input:not([type="checkbox"]):focus { border-color: var(--border); }
.password-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 42px; overflow: hidden; }
.password-wrap:focus-within { border-color: var(--border); }
.password-wrap input { height: 100% !important; border: 0 !important; border-radius: 0 !important; }
.password-wrap button { border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.password-wrap button:hover { background: #18181b; }
.password-wrap button svg { width: 19px; height: 19px; }
.terms-row { grid-template-columns: 22px minmax(0, 1fr) !important; align-items: center; gap: 10px !important; }
.terms-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--active); }
.terms-row span { font-size: 13px !important; font-weight: 500 !important; color: #d2d2d6; }
.auth-submit {
  position: relative;
  height: 46px;
  margin-top: 2px;
  border: 0;
  border-radius: 5px;
  background: var(--active);
  color: var(--active-text);
  font-weight: 750;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms var(--ease-ui), opacity 180ms ease;
}
.auth-submit:hover { background: #d9deff; }
.auth-submit:active { transform: scale(.985); }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-submit.loading::after { content: ''; position: absolute; right: 16px; top: 50%; width: 15px; height: 15px; margin-top: -8px; border: 2px solid rgba(19,63,122,.28); border-top-color: var(--active-text); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-error { padding: 10px 12px; border: 1px solid rgba(255,92,105,.45); border-radius: 5px; background: rgba(255,92,105,.08); color: #ff9aa4; font-size: 13px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: #9b9ba1; font-size: 12px; }
.auth-divider::before,
.auth-divider::after { content: ''; height: 1px; flex: 1; background: #3a3a3f; }
.ghost-auth-button {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #55555c;
  border-radius: 5px;
  background: #19191c;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease-ui);
}
.ghost-auth-button:hover { background: #212125; border-color: var(--border); }
.ghost-auth-button:active { transform: scale(.988); }
.ghost-auth-button svg { width: 20px; height: 20px; }

.verify-view { text-align: center; }
.verify-view .auth-brand { justify-content: center; margin-top: 10px; }
.verify-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 18px 0; padding: 4px 0; border: 0; background: transparent; color: #b5b5bb; cursor: pointer; }
.verify-back:hover { color: #fff; }
.verify-back svg { width: 17px; height: 17px; }
.verify-view h1 { margin: 0 0 8px; font-size: 24px; }
.verify-view > p { margin: 0 0 22px; color: #aaa; line-height: 1.5; }
.verify-view > p strong { color: #fff; font-weight: 600; }
.verify-form { display: grid; gap: 16px; }
.code-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-inputs input {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  min-width: 0;
  border: 1px solid #5b5b62;
  border-radius: 5px;
  outline: 0;
  background: #0d0d0f;
  color: #fff;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.code-inputs input:focus { border-color: var(--active); background: #111116; }
.resend-button { margin-top: 16px; border: 0; background: transparent; color: var(--active); cursor: pointer; }
.resend-button:disabled { color: var(--muted); cursor: default; }

.account-menu {
  position: fixed;
  z-index: 500;
  width: 230px;
  padding: 6px;
  border: 1px solid #3c3c42;
  border-radius: 6px;
  background: #121214;
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
  animation: dropdown-in 180ms var(--ease-out);
}
.account-menu-head { padding: 10px 10px 12px; border-bottom: 1px solid #2d2d31; }
.account-menu-head strong,
.account-menu-head span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-head strong { font-size: 14px; }
.account-menu-head span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.account-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; margin-top: 5px; border: 0; border-radius: 4px; background: transparent; color: #fff; cursor: pointer; text-align: left; }
.account-menu button:hover { background: #1c1c20; }
.account-menu button svg { width: 17px; height: 17px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 2000;
  max-width: min(420px, calc(100vw - 28px));
  padding: 10px 14px;
  border: 1px solid #3d3d43;
  border-radius: 5px;
  background: #151517;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 280ms var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body.sidebar-collapsed .app-shell { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr); }
body.sidebar-collapsed .brand-link {
  width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-24px) scale(.92);
  transition: opacity 230ms ease, transform 500ms var(--ease-out), width 500ms var(--ease-out), visibility 0ms linear 320ms;
}
body.sidebar-collapsed .nav-item { padding-left: 14px; padding-right: 14px; }
body.sidebar-collapsed .nav-label { opacity: 0; transform: translateX(-12px); }
body.sidebar-collapsed .nav-item svg { transform: scale(1.04); }
body.sidebar-collapsed .sidebar-rule,
body.sidebar-collapsed .recommended-block { opacity: 0; transform: translateX(-18px); pointer-events: none; }
body.sidebar-collapsed .page { padding-left: 14px; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 220px; --chat-width: 280px; }
  .browse-category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .browse-controls { align-items: flex-start; }
  .browse-filter-group { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 930px) {
  :root { --sidebar-width: 76px; --chat-width: 280px; }
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .brand-link,
  .nav-label,
  .sidebar-rule,
  .recommended-block { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .topbar { padding-right: 16px; }
  .page { padding-right: 16px; }
  .browse-controls { display: grid; }
  .tag-search { width: 100%; }
  .browse-filter-group { justify-content: flex-start; }
  .browse-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --topbar-height: 68px; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { grid-column: 1; padding: 0 12px; }
  .page { grid-column: 1; padding: 10px 12px 90px; }
  .home-grid,
  .live-grid { grid-template-columns: 1fr; }
  .home-categories { grid-column: 1; }
  .home-chat { height: 330px !important; max-height: none !important; }
  .chat-panel { height: 430px; }
  .featured-player,
  .live-player { min-height: 0; aspect-ratio: 16 / 9; }
  .category-row { grid-auto-columns: 125px; }
  .account-name { display: none; }
  .search-control.open { width: min(250px, 50vw); }
  .browse-shell > h1 { font-size: 25px; }
  .browse-controls { padding-top: 20px; }
  .browse-filter-group { display: grid; grid-template-columns: auto 1fr; width: 100%; }
  .select-wrap,
  .select-wrap.wide { min-width: 0; width: 100%; }
  .browse-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-dialog { padding: 24px 18px 22px; }
}

@media (max-width: 520px) {
  .primary-button.compact { padding: 0 10px; }
  .text-button { padding: 0 5px; }
  .auth-actions-slot { gap: 5px; }
  .account-actions { gap: 7px; }
  .search-control.open { position: fixed; left: 12px; right: 12px; top: 17px; width: auto; z-index: 80; }
  .browse-tabs { gap: 0; }
  .browse-tab { font-size: 14px; }
  .browse-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creator-actions { grid-template-columns: 1fr 1fr; }
  .live-title { font-size: 20px; }
}

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

/* CHIRP HOME CHAT — EXACT PLAYER HEIGHT */
.home-grid {
  align-items: start !important;
}

.home-grid .home-featured {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.home-grid .home-categories {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.home-grid .home-chat {
  grid-column: 2;
  grid-row: 1;
  align-self: start !important;

  /* Safe fallback until JS measures the player */
  height: 240px !important;
  min-height: 0 !important;
  max-height: 390px !important;

  overflow: hidden;
}

.home-grid .home-chat .chat-messages {
  min-height: 0;
}

/* CHIRP HOME CHAT — EXACT PLAYER HEIGHT */
.home-grid {
  align-items: start !important;
}

.home-grid .home-featured {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.home-grid .home-categories {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.home-grid .home-chat {
  grid-column: 2;
  grid-row: 1;
  align-self: start !important;

  /* Safe fallback until JS measures the player */
  height: 240px !important;
  min-height: 0 !important;
  max-height: 390px !important;

  overflow: hidden;
}

.home-grid .home-chat .chat-messages {
  min-height: 0;
}

/* CHIRP_REAL_CREATOR_CORE_V5 */

/* Home has no featured stream yet, so its chat is intentionally display-only. */
.home-chat-idle {
  grid-template-rows: 39px minmax(0, 1fr) !important;
}

.home-chat-idle .chat-messages {
  padding: 0;
  overflow: hidden;
}

/* Real creator discovery in the sidebar. */
.recommended-list {
  display: grid;
  gap: 3px;
}

.recommended-creator {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 3px;
  border-radius: 5px;
  transition: background-color 180ms ease, transform 260ms var(--ease-out);
}

.recommended-creator:hover {
  background: #151517;
}

.recommended-creator:active {
  transform: scale(.985);
}

.recommended-avatar,
.following-avatar,
.creator-profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--active);
  color: var(--active-text);
  font-weight: 800;
  user-select: none;
}

.recommended-avatar {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.recommended-copy,
.following-copy {
  min-width: 0;
}

.recommended-copy strong,
.recommended-copy span,
.following-copy strong,
.following-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommended-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.recommended-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

/* Account-backed creator channel page. */
.creator-profile-page {
  width: min(980px, 100%);
  padding-top: 10px;
}

.creator-loading {
  min-height: 120px;
}

.creator-profile-head {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.creator-profile-avatar {
  width: 68px;
  height: 68px;
  font-size: 24px;
}

.creator-profile-copy {
  min-width: 0;
}

.creator-profile-page .creator-name-line {
  gap: 8px;
}

.creator-profile-page .creator-name-line strong {
  font-size: 24px;
  font-weight: 650;
}

.creator-profile-subline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.creator-profile-category {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-profile-follow {
  min-width: 150px;
  height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 5px;
  background: var(--active);
  color: var(--active-text);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 220ms var(--ease-ui), opacity 180ms ease;
}

.creator-profile-follow:hover {
  background: #d8ddff;
}

.creator-profile-follow.following {
  border: 1px solid var(--border);
  background: var(--bg);
  color: #fff;
}

.creator-profile-follow.following:hover {
  background: #151517;
}

.creator-profile-follow:active {
  transform: scale(.985);
}

.creator-profile-follow:disabled {
  opacity: .58;
  cursor: wait;
}

.creator-profile-rule {
  height: 1px;
  margin: 22px 0;
  background: #2c2c2f;
}

.creator-profile-body {
  max-width: 700px;
}

.creator-bio,
.creator-offline-copy {
  margin: 0;
  line-height: 1.6;
}

.creator-bio {
  color: #d7d7da;
}

.creator-offline-copy {
  color: var(--muted);
}

.creator-bio + .creator-offline-copy {
  margin-top: 14px;
}

/* Real following list. */
.following-page {
  width: min(900px, 100%);
  padding-top: 10px;
}

.following-page > h1 {
  margin: 0 0 22px;
  font-size: 28px;
}

.following-list {
  display: grid;
}

.following-creator {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 11px 6px;
  border-bottom: 1px solid #27272a;
  transition: background-color 180ms ease, padding-left 280ms var(--ease-out);
}

.following-creator:hover {
  padding-left: 10px;
  background: #101012;
}

.following-avatar {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.following-copy strong {
  font-size: 15px;
  font-weight: 650;
}

.following-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.following-creator > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 240ms var(--ease-out), color 180ms ease;
}

.following-creator:hover > svg {
  color: #fff;
  transform: translateX(2px);
}

.following-empty {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .creator-profile-head {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .creator-profile-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .creator-profile-follow {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* CHIRP_ACCOUNT_CREATOR_CORE_V6 */

.account-avatar.has-image,
.recommended-avatar.has-image,
.following-avatar.has-image,
.creator-profile-avatar.has-image,
.account-profile-avatar.has-image {
  overflow: hidden;
  background: #161618;
}

.account-avatar.has-image img,
.recommended-avatar.has-image img,
.following-avatar.has-image img,
.creator-profile-avatar.has-image img,
.account-profile-avatar.has-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-page {
  padding-top: 0;
}

.account-dashboard {
  width: min(980px, 100%);
  padding: 6px 4px 60px;
}

.account-loading {
  min-height: 220px;
}

.account-dashboard-head {
  margin-bottom: 34px;
}

.account-dashboard-head > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.account-dashboard-head h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.account-setting-row {
  min-height: 146px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: 28px 0;
}

.account-setting-divider {
  height: 1px;
  background: #2c2c2f;
}

.account-setting-copy {
  min-width: 0;
}

.account-setting-copy h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.account-setting-copy > p {
  max-width: 620px;
  margin: 8px 0 0;
  color: #a8a8ad;
  font-size: 14px;
  line-height: 1.55;
}

.account-identity {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.account-identity strong {
  font-size: 14px;
  font-weight: 650;
}

.account-identity span {
  max-width: 620px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-profile-avatar {
  position: relative;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #36363a;
  border-radius: 50%;
  background: var(--active);
  color: var(--active-text);
  font-size: 28px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 180ms ease, transform 280ms var(--ease-out), filter 180ms ease;
}

.account-profile-avatar:hover {
  border-color: var(--border);
  filter: brightness(.92);
}

.account-profile-avatar:active {
  transform: scale(.97);
}

.account-primary-action,
.account-secondary-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 240ms var(--ease-ui), opacity 180ms ease;
}

.account-primary-action {
  border: 0;
  background: var(--active);
  color: var(--active-text);
}

.account-primary-action:hover:not(:disabled) {
  background: #d8ddff;
}

.account-secondary-action {
  border: 1px solid var(--border);
  background: var(--bg);
  color: #fff;
}

.account-secondary-action:hover {
  background: #151517;
}

.account-primary-action:active:not(:disabled),
.account-secondary-action:active {
  transform: scale(.985);
}

.account-primary-action svg,
.account-secondary-action svg {
  width: 18px;
  height: 18px;
}

.disabled-action {
  opacity: .46;
  cursor: not-allowed;
}

.account-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #c9c9ce;
  font-size: 12px;
}

.account-status-line > span:last-child > span {
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--active);
}

.muted-status {
  color: var(--muted);
}

.muted-status svg {
  width: 14px;
  height: 14px;
}

.stream-connect-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(0 0 0 / 0%);
  opacity: 0;
  transition: background-color 240ms ease, opacity 240ms ease;
}

.stream-connect-backdrop.show {
  background: rgb(0 0 0 / 72%);
  opacity: 1;
}

.stream-connect-card {
  width: min(580px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: 28px;
  border: 1px solid #3d3d42;
  border-radius: 7px;
  background: #151517;
  box-shadow: 0 26px 80px rgb(0 0 0 / 42%);
  transform: translateY(14px) scale(.985);
  transition: transform 360ms var(--ease-out);
  scrollbar-width: thin;
}

.stream-connect-backdrop.show .stream-connect-card {
  transform: translateY(0) scale(1);
}

.stream-connect-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.stream-connect-head > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stream-connect-head h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.stream-connect-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: #242427;
  cursor: pointer;
  transition: background-color 180ms ease, transform 220ms var(--ease-ui);
}

.stream-connect-close:hover {
  background: #303034;
}

.stream-connect-close:active {
  transform: scale(.94);
}

.stream-connect-close svg {
  width: 20px;
  height: 20px;
}

.stream-service-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 26px 0 20px;
}

.stream-service-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--active);
  color: var(--active-text);
}

.stream-service-icon svg {
  width: 23px;
  height: 23px;
}

.stream-service-row strong,
.stream-service-row span {
  display: block;
}

.stream-service-row strong {
  font-size: 15px;
}

.stream-service-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.stream-steps {
  margin: 0 0 24px;
  padding-left: 20px;
  color: #c9c9ce;
  font-size: 13px;
  line-height: 1.7;
}

.stream-steps li + li {
  margin-top: 4px;
}

.stream-field + .stream-field {
  margin-top: 18px;
}

.stream-field > label {
  display: block;
  margin-bottom: 7px;
  color: #e7e7ea;
  font-size: 12px;
  font-weight: 650;
}

.stream-locked-field,
.stream-key-row code {
  min-height: 43px;
  border: 1px solid #45454b;
  border-radius: 5px;
  background: #0f0f10;
}

.stream-locked-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.stream-locked-field svg {
  width: 16px;
  height: 16px;
}

.stream-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.stream-key-row code {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  overflow: hidden;
  color: #d7d7db;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-key-row > button,
.stream-copy-key {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 180ms ease, transform 220ms var(--ease-ui), opacity 180ms ease;
}

.stream-key-row > button {
  border: 0;
  background: var(--active);
  color: var(--active-text);
}

.stream-copy-key {
  margin-top: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: #fff;
}

.stream-key-row > button:hover:not(:disabled) {
  background: #d8ddff;
}

.stream-copy-key:hover {
  background: #1d1d20;
}

.stream-key-row > button:active:not(:disabled),
.stream-copy-key:active {
  transform: scale(.985);
}

.stream-key-row > button:disabled {
  opacity: .55;
  cursor: wait;
}

.stream-key-row svg,
.stream-copy-key svg {
  width: 16px;
  height: 16px;
}

.stream-connect-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #313136;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .account-dashboard {
    padding-bottom: 32px;
  }

  .account-setting-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
  }

  .account-profile-actions {
    flex-wrap: wrap;
  }

  .account-profile-row .account-profile-actions {
    justify-content: flex-start;
  }

  .account-primary-action,
  .account-secondary-action {
    width: 100%;
  }

  .account-profile-avatar {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .stream-connect-backdrop {
    padding: 10px;
    align-items: end;
  }

  .stream-connect-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 22px 18px;
    border-radius: 7px 7px 0 0;
  }

  .stream-key-row {
    grid-template-columns: 1fr;
  }
}

/* CHIRP_ACCOUNT_REDESIGN_V7 */

.account-page { padding-top: 0 !important; }

.account-v7 {
  width: min(1040px, 100%);
  padding: 8px 6px 72px;
}

.account-v7-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

.account-v7-kicker,
.account-v7-section-head > span,
.stream-connect-v7-head > div > span {
  display: block;
  color: #7d7d7d;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
}

.account-v7-head h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: .98;
  letter-spacing: -.045em;
}

.account-v7-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px 0 30px;
  border-top: 1px solid #29292c;
  border-bottom: 1px solid #29292c;
}

.account-v7-avatar {
  position: relative;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid #39393d;
  border-radius: 50%;
  background: #cbd3ff;
  color: #133f7a;
  font-size: 28px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 180ms ease, transform 260ms var(--ease-out), filter 180ms ease;
}

.account-v7-avatar.has-image { background: #161618; }

.account-v7-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-v7-avatar:hover {
  border-color: #9ba1c2;
  filter: brightness(.94);
}

.account-v7-avatar:active { transform: scale(.975); }

.account-v7-identity {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.account-v7-identity strong {
  overflow: hidden;
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-v7-identity span {
  overflow: hidden;
  color: #7d7d7d;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-v7-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-v7-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 5px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 220ms var(--ease-out), opacity 180ms ease;
}

.account-v7-action.primary {
  border: 1px solid #cbd3ff;
  background: #cbd3ff;
  color: #133f7a;
}

.account-v7-action.secondary {
  border: 1px solid #3b3b40;
  background: transparent;
  color: #fff;
}

.account-v7-action.primary:hover:not(:disabled) {
  background: #d8ddff;
  border-color: #d8ddff;
}

.account-v7-action.secondary:hover:not(:disabled) {
  border-color: #6c7087;
  background: #151517;
}

.account-v7-action:active:not(:disabled) { transform: scale(.985); }

.account-v7-action svg {
  width: 16px;
  height: 16px;
}

.account-v7-section { padding-top: 42px; }

.account-v7-section-head { margin-bottom: 14px; }

.account-v7-section-head h2 {
  margin: 6px 0 0;
  font-size: 22px;
  letter-spacing: -.025em;
}

.account-v7-tool-list { border-top: 1px solid #29292c; }

.account-v7-tool {
  min-height: 112px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #29292c;
}

.account-v7-tool-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #343438;
  border-radius: 5px;
  color: #cbd3ff;
}

.account-v7-tool-icon svg {
  width: 20px;
  height: 20px;
}

.account-v7-tool-copy { min-width: 0; }

.account-v7-tool-copy > strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.account-v7-tool-copy > p {
  max-width: 600px;
  margin: 5px 0 0;
  color: #8d8d92;
  font-size: 13px;
  line-height: 1.45;
}

.account-v7-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: #b9b9be;
  font-size: 11px;
}

.account-v7-status > span {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #7d7d7d;
}

.account-v7-status.live > span { background: #cbd3ff; }

.account-v7-status.disabled { color: #6e6e73; }

.account-v7-action.disabled-action {
  opacity: .42;
  cursor: not-allowed;
}

.stream-connect-v7-backdrop {
  background: rgb(0 0 0 / 0%);
  opacity: 0;
}

.stream-connect-v7-backdrop.show {
  background: rgb(0 0 0 / 76%);
  opacity: 1;
}

.stream-connect-v7 {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px;
  border: 1px solid #333337;
  border-radius: 7px;
  background: #111112;
  box-shadow: 0 28px 90px rgb(0 0 0 / 48%);
  transform: translateY(16px) scale(.985);
  transition: transform 360ms var(--ease-out);
}

.stream-connect-v7-backdrop.show .stream-connect-v7 {
  transform: translateY(0) scale(1);
}

.stream-connect-v7-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.stream-connect-v7-head h2 {
  margin: 6px 0 0;
  font-size: 27px;
  letter-spacing: -.035em;
}

.stream-connect-v7-head p {
  margin: 7px 0 0;
  color: #85858a;
  font-size: 13px;
}

.stream-connect-v7-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid #343438;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 220ms var(--ease-out);
}

.stream-connect-v7-close:hover {
  border-color: #5c6073;
  background: #19191b;
}

.stream-connect-v7-close:active { transform: scale(.96); }

.stream-connect-v7-close svg {
  width: 18px;
  height: 18px;
}

.stream-connect-v7-provider {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 14px 0;
  border-top: 1px solid #29292c;
  border-bottom: 1px solid #29292c;
}

.stream-connect-v7-provider-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #cbd3ff;
  color: #133f7a;
}

.stream-connect-v7-provider-icon svg {
  width: 20px;
  height: 20px;
}

.stream-connect-v7-provider strong,
.stream-connect-v7-provider span {
  display: block;
}

.stream-connect-v7-provider strong { font-size: 14px; }

.stream-connect-v7-provider span {
  margin-top: 3px;
  color: #7d7d7d;
  font-size: 11px;
}

.stream-connect-v7-provider > svg {
  width: 18px;
  height: 18px;
  color: #809fc9;
}

.stream-connect-v7-unavailable {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #343438;
  border-radius: 5px;
  background: #0b0b0c;
}

.stream-connect-v7-unavailable-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #cbd3ff;
}

.stream-connect-v7-unavailable-icon svg {
  width: 21px;
  height: 21px;
}

.stream-connect-v7-unavailable strong {
  display: block;
  font-size: 14px;
}

.stream-connect-v7-unavailable p {
  margin: 6px 0 0;
  color: #8b8b90;
  font-size: 12px;
  line-height: 1.55;
}

.stream-connect-v7-next {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.stream-connect-v7-next > span {
  color: #7d7d7d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.stream-connect-v7-next > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #c6c6cb;
  font-size: 12px;
}

.stream-connect-v7-next svg {
  width: 16px;
  height: 16px;
  color: #809fc9;
}

.stream-connect-v7-done {
  width: 100%;
  min-height: 42px;
  margin-top: 26px;
  border: 0;
  border-radius: 5px;
  background: #cbd3ff;
  color: #133f7a;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  transition: background-color 180ms ease, transform 220ms var(--ease-out);
}

.stream-connect-v7-done:hover { background: #d8ddff; }

.stream-connect-v7-done:active { transform: scale(.988); }

@media (max-width: 760px) {
  .account-v7 { padding-bottom: 36px; }

  .account-v7-profile {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .account-v7-profile-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .account-v7-tool {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .account-v7-tool > .account-v7-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .stream-connect-v7-backdrop {
    padding: 10px;
    align-items: end;
  }

  .stream-connect-v7 {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 22px 18px;
    border-radius: 7px 7px 0 0;
  }
}
