:root {
  --bg: #000000;
  --panel: #000000;
  --panel-soft: #0f0f10;
  --line: #262626;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --sidebar-width: 244px;
  --sidebar-collapsed: 78px;
}

@font-face {
  font-family: "RetroFunk";
  src: url("../library/retroworld/assets/retrofunk.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Bloq";
  src: url("../library/spotlight/assets/bloq.otf") format("opentype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Instrument Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body[data-theme="spotlight"] {
  font-family: "Bloq", "Instrument Sans", sans-serif;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.86)),
      url("../library/spotlight/assets/starlight.png") center top / cover no-repeat fixed;
}

body[data-theme="retroworld"] {
  background: #203d57;
}

body[data-theme="retroworld"],
body[data-theme="retroworld"] button,
body[data-theme="retroworld"] input,
body[data-theme="retroworld"] textarea,
body[data-theme="retroworld"] select {
  font-family: "RetroFunk", "Instrument Sans", sans-serif;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-overlay {
  display: none;
}

.mobile-menu-button {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 1rem 0.75rem 1.5rem;
  border-right: 1px solid var(--line);
  background: var(--panel);
  transition: width 220ms ease, padding 220ms ease;
}

.sidebar.is-collapsed {
  width: var(--sidebar-collapsed);
  padding-inline: 0.55rem;
  border-right-color: transparent;
  background: transparent;
  box-shadow: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
}

.icon-button,
.ghost-button,
.mobile-menu-button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.mobile-menu-button {
  position: fixed;
  left: 0.8rem;
  top: 0.8rem;
  z-index: 25;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  background: rgba(15, 15, 16, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  color: var(--text);
}

.mobile-menu-button span {
  position: absolute;
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu-button span:first-child {
  transform: translateY(-4px);
}

.mobile-menu-button span:last-child {
  transform: translateY(4px);
}

.sidebar-toggle {
  position: relative;
}

.sidebar-toggle span {
  position: absolute;
  width: 0.95rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 220ms ease;
}

.sidebar-toggle span:first-child {
  transform: translateY(-4px);
}

.sidebar-toggle span:last-child {
  transform: translateY(4px);
}

.sidebar.is-collapsed .sidebar-toggle span:first-child {
  transform: rotate(45deg);
}

.sidebar.is-collapsed .sidebar-toggle span:last-child {
  transform: rotate(-45deg);
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  height: 2.5rem;
  flex: 1;
  overflow: hidden;
}

.brand-image,
.nav-label {
  transition: opacity 180ms ease, transform 180ms ease;
}

.brand-image {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: auto;
  transform: translateY(-50%);
}

.brand-image-full {
  width: 170px;
  opacity: 1;
}

.brand-image-icon {
  width: 34px;
  opacity: 0;
  pointer-events: none;
}

.sidebar-nav {
  display: grid;
  gap: 0.2rem;
}

.sidebar-account-row {
  margin-top: auto;
  padding: 0.35rem 0.85rem 0;
}

.sidebar-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.sidebar-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
}

.sidebar-auth-image {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
}

.sidebar-auth-label {
  white-space: nowrap;
}

.sidebar.is-collapsed .sidebar-account-row {
  padding-inline: 0.15rem;
}

.sidebar.is-collapsed .sidebar-auth-button {
  width: 100%;
  min-width: 0;
  padding-inline: 0;
}

.sidebar.is-collapsed .sidebar-auth-label {
  display: none;
}

.sidebar.is-collapsed .sidebar-nav,
.sidebar.is-collapsed .sidebar-account-row {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
}

.nav-link:hover,
.nav-link.is-active {
  background: transparent;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
}

.nav-icon-image {
  display: block;
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
}

.nav-icon-plus {
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 300;
}

.sidebar.is-collapsed .brand-image-full,
.sidebar.is-collapsed .nav-label {
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
}

.sidebar.is-collapsed .brand {
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  overflow: visible;
}

.sidebar.is-collapsed .brand-image-icon {
  left: 0;
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

.profile-main {
  flex: 1;
  max-width: 1100px;
  padding: 1.75rem 2rem 3rem;
  --profile-card-background: var(--panel);
  --profile-card-border-color: var(--line);
  --profile-primary-text-color: var(--text);
  --profile-secondary-text-color: var(--muted);
  --profile-card-radius: 20px;
  --profile-card-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 38px rgba(0, 0, 0, 0.34);
}

.profile-hero,
.profile-summary,
.stats-grid,
.profile-actions,
.hero-social-links,
.detail-grid,
.highlight-grid,
.profile-posts-list {
  display: grid;
  gap: 1rem;
}

.profile-hero {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
}

.hero-social-links {
  display: none;
}

.profile-avatar {
  border: 1px solid var(--line);
  background: var(--panel);
}

.summary-card,
.detail-card,
.highlight-tile {
  border: 1px solid var(--profile-card-border-color);
  background: var(--profile-card-background);
  border-radius: var(--profile-card-radius);
  box-shadow: var(--profile-card-shadow);
}

.profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(135deg, #0e0f13, #16181d 62%, #0a0b0d);
  color: var(--muted);
  cursor: pointer;
}

.profile-avatar-image,
.profile-cover-image,
.highlight-image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar.has-image .profile-avatar-image,
.profile-cover-shell.has-image .profile-cover-image,
.highlight-tile.has-image .highlight-image {
  display: block;
}

.page-kicker,
.summary-label {
  margin: 0 0 0.5rem;
  color: var(--profile-secondary-text-color);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-intro h1,
.summary-card h2,
.detail-card h2 {
  margin: 0;
  color: var(--profile-primary-text-color);
}

.profile-handle,
.profile-copy,
.summary-card p,
.detail-card p,
.detail-list {
  color: var(--profile-secondary-text-color);
}

.profile-name,
.stat-value,
.profile-post-meta strong,
.profile-post-text,
.link-row,
.asset-placeholder,
.asset-action-button,
.ghost-button,
.field-input,
.page-editor-field input,
.page-editor-field select {
  color: var(--profile-primary-text-color);
}

.profile-handle,
.profile-copy,
.summary-card p,
.detail-card p,
.detail-list,
.stats-grid h3,
.profile-post-meta,
.link-row span,
.links-hidden-note,
.youtube-embed-empty,
.posts-copy,
.posts-empty,
.profile-save-status,
.page-editor-close,
.page-editor-field,
.page-editor-field small {
  color: var(--profile-secondary-text-color);
}

.profile-handle {
  margin: 0.5rem 0 0.75rem;
  font-size: 1rem;
}

.profile-copy {
  max-width: 620px;
  margin: 0;
  line-height: 1.65;
}

.profile-save-status {
  min-height: 1.25rem;
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
}

.connections-overlay {
  position: fixed;
  inset: 0;
  z-index: 39;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
}

.page-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 39;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
}

.page-editor-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 1rem;
  width: min(440px, 100vw);
  height: 100vh;
  padding: 1.25rem;
  border-left: 1px solid var(--profile-card-border-color);
  background: #050506;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.connections-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 1rem;
  width: min(420px, 100vw);
  height: 100vh;
  padding: 1.25rem;
  border-left: 1px solid var(--profile-card-border-color);
  background: #050506;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.page-editor-header,
.page-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.connections-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.connections-list {
  display: grid;
  gap: 0.85rem;
}

.connection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.95rem;
  border: 1px solid var(--profile-card-border-color);
  border-radius: calc(var(--profile-card-radius) - 2px);
  background: var(--profile-card-background);
  box-shadow: var(--profile-card-shadow);
}

.connection-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.connection-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(135deg, #0e0f13, #16181d 62%, #0a0b0d);
  color: var(--profile-secondary-text-color);
  background-size: cover;
  background-position: center;
}

.connection-avatar.has-image {
  color: transparent;
}

.connection-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.connection-copy strong {
  color: var(--profile-primary-text-color);
  font-size: 1.02rem;
}

.connection-handle,
.connection-role {
  margin: 0;
  color: var(--profile-secondary-text-color);
}

.connection-action-button {
  min-height: 40px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--profile-card-border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--profile-primary-text-color);
  cursor: pointer;
  font-weight: 600;
}

.connection-action-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.page-editor-section {
  display: grid;
  gap: 0.9rem;
}

.page-editor-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-editor-close {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.page-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.page-editor-field {
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.page-editor-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.page-editor-field input,
.page-editor-field select {
  width: 100%;
  height: 44px;
  padding: 0;
  border: 1px solid var(--profile-card-border-color);
  border-radius: 12px;
  background: transparent;
  color: var(--profile-primary-text-color);
}

.page-editor-field input[type="color"] {
  cursor: pointer;
}

.page-editor-field input[type="range"] {
  height: auto;
}

.page-editor-field small {
  color: var(--profile-secondary-text-color);
}

.profile-avatar-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  max-width: calc(100% - 2rem);
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--profile-primary-text-color);
}

.profile-actions {
  grid-auto-flow: column;
  justify-content: flex-start;
  margin-top: 1.1rem;
  gap: 1rem;
}

.profile-intro-card {
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-header-input {
  width: min(100%, 360px);
  min-width: 0;
  margin: 0.35rem 0 0;
}

.ghost-button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--profile-primary-text-color);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.editable-card {
  cursor: pointer;
}

.editable-card.is-editing-inline {
  cursor: default;
  border-color: #38383c;
}

.profile-intro-card.is-editing-inline [data-profile-name],
.profile-intro-card.is-editing-inline [data-profile-handle] {
  display: none;
}

.profile-main.is-public-view [data-settings-link] {
  display: none;
}

.profile-main.is-public-view .editable-card {
  cursor: default;
}

.profile-summary {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  margin-top: 1.5rem;
}

.summary-card,
.detail-card {
  padding: 1.15rem;
  border-radius: 20px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.5rem;
}

.stat-button {
  display: grid;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.stat-button h3,
.stat-button .stat-value {
  text-align: left;
}

.stats-grid h3 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.stat-value {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.profile-posts {
  margin-top: 1.2rem;
}

.wide-card {
  grid-column: span 2;
}

.posts-heading {
  display: grid;
  gap: 0.35rem;
}

.posts-copy,
.posts-empty {
  margin: 0;
}

.profile-posts-list {
  margin-top: 1rem;
}

.profile-post-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--profile-card-border-color);
  border-radius: calc(var(--profile-card-radius) - 4px);
  background: var(--profile-card-background);
  box-shadow: var(--profile-card-shadow);
}

.profile-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.profile-post-meta strong {
  color: var(--profile-primary-text-color);
}

.profile-post-text {
  margin: 0;
  line-height: 1.6;
  color: var(--profile-primary-text-color);
}

.profile-post-counts {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  color: var(--profile-secondary-text-color);
  font-size: 0.84rem;
}

.youtube-card {
  align-content: start;
}

.youtube-embed-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  margin-top: 0.85rem;
  border: 1px solid var(--profile-card-border-color);
  border-radius: calc(var(--profile-card-radius) - 2px);
  overflow: hidden;
  background: var(--profile-card-background);
  box-shadow: var(--profile-card-shadow);
}

.youtube-embed-frame {
  width: 100%;
  min-height: 230px;
  border: 0;
}

.youtube-embed-empty {
  display: grid;
  place-items: center;
  padding: 1.25rem;
  text-align: center;
}

.youtube-embed-empty p {
  margin: 0;
}

.profile-post-image {
  width: 100%;
  max-height: 460px;
  border-radius: 14px;
  object-fit: cover;
  background: #090909;
}

.detail-list {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
}

.detail-list li + li {
  margin-top: 0.45rem;
}

.link-row,
.field-input {
  display: flex;
  align-items: center;
  width: fit-content;
  min-width: 270px;
  max-width: 100%;
  min-height: 52px;
  padding: 0 1.05rem;
  border: 0;
  border-radius: calc(var(--profile-card-radius) - 2px);
  background: var(--profile-card-background);
  box-shadow: var(--profile-card-shadow);
}

.link-row {
  box-shadow: none;
}

.links-hidden-note {
  margin: 0 0 0.85rem;
}

.is-hidden {
  display: none !important;
}

.social-icon {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon-fill {
  fill: currentColor;
  stroke: none;
}

.link-row {
  gap: 0.75rem;
}

.link-row span {
  font-size: 0.95rem;
}

.link-row + .field-input,
.field-input + .link-row,
.link-row + .link-row,
.field-input + .field-input {
  margin-top: 0.8rem;
}

.field-input {
  display: flex;
  outline: none;
  padding-inline: 1rem;
}

.field-input:focus {
  box-shadow:
    var(--profile-card-shadow),
    0 0 0 1px #3a3a3a;
}

.preview-links-card {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.inline-editor-input.is-hidden,
.inline-editor-actions.is-hidden {
  display: none !important;
}

.editable-card.is-editing-inline .field-view,
.editable-card.is-editing-inline .detail-list,
.editable-card.is-editing-inline [data-profile-bio] {
  display: none;
}

.highlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.9rem;
}

.media-carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.media-carousel-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.media-carousel-button {
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.media-carousel-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.highlight-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 160px;
  border-radius: calc(var(--profile-card-radius) - 2px);
  overflow: hidden;
  color: var(--muted);
  background: var(--profile-card-background);
  cursor: pointer;
  box-shadow: var(--profile-card-shadow);
}

.asset-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.asset-actions {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 3;
  display: none;
  gap: 0.55rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 10, 11, 0.95);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.asset-actions.is-visible {
  display: grid;
}

.asset-action-button {
  min-width: 132px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  cursor: pointer;
}

.profile-main.is-public-view .asset-actions,
.profile-main.is-public-view .asset-placeholder,
.profile-main.is-public-view .profile-avatar-label,
.profile-main.is-public-view .profile-cover-label {
  display: none;
}

.profile-avatar.has-image .profile-avatar-label,
.profile-cover-shell.has-image .profile-cover-label,
.highlight-tile.has-image .asset-placeholder {
  display: none;
}

.profile-avatar:focus-visible,
.highlight-tile:focus-visible,
.editable-card:focus-visible {
  outline: 2px solid #3f3f46;
  outline-offset: 3px;
}

.field-textarea {
  min-height: 116px;
  resize: vertical;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--profile-card-border-color);
  border-radius: calc(var(--profile-card-radius) - 4px);
  background: var(--profile-card-background);
  box-shadow: var(--profile-card-shadow);
}

.inline-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.85rem;
}

.inline-editor-actions .asset-action-button {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--profile-primary-text-color);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.youtube-card.is-editing-inline .youtube-embed-shell {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-main[data-theme="spotlight"] {
  max-width: 1280px;
}

.profile-main[data-theme="spotlight"] .page-kicker {
  display: none;
}

.profile-main[data-theme="spotlight"] h1,
.profile-main[data-theme="spotlight"] h2,
.profile-main[data-theme="spotlight"] h3,
.profile-main[data-theme="spotlight"] p,
.profile-main[data-theme="spotlight"] span,
.profile-main[data-theme="spotlight"] a,
.profile-main[data-theme="spotlight"] button,
.profile-main[data-theme="spotlight"] label,
.profile-main[data-theme="spotlight"] input,
.profile-main[data-theme="spotlight"] textarea {
  font-family: "Bloq", "Instrument Sans", sans-serif;
}

.profile-main[data-theme="spotlight"] .profile-hero {
  position: relative;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  padding: 0.9rem 1rem 1.25rem;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.profile-cover-shell {
  display: none;
}

.profile-cover-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--profile-primary-text-color);
  z-index: 1;
}

.profile-main[data-theme="spotlight"] .profile-cover-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 1080px);
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(10, 11, 15, 0.82);
  box-shadow: inset 0 -60px 120px rgba(0, 0, 0, 0.32);
}

.profile-main[data-theme="spotlight"] .profile-cover-shell.has-image {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.44));
}

.profile-main[data-theme="spotlight"] .profile-avatar {
  width: 176px;
  aspect-ratio: 1 / 1;
  margin-top: -72px;
  border-radius: 28px;
  z-index: 1;
}

.profile-main[data-theme="spotlight"] .profile-avatar-label {
  min-width: 0;
  width: calc(100% - 2rem);
  max-width: 180px;
  min-height: 46px;
  border-radius: 16px;
}

.profile-main[data-theme="spotlight"] .profile-intro {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-top: 0.7rem;
}

.profile-main[data-theme="spotlight"] .profile-intro h1 {
  font-size: 2.25rem;
}

.profile-main[data-theme="spotlight"] .profile-handle {
  margin: 0.35rem 0 0;
}

.profile-main[data-theme="spotlight"] .profile-copy {
  margin-top: 0.9rem;
}

.profile-main[data-theme="spotlight"] .hero-social-links {
  display: flex;
  order: 4;
  gap: 0.75rem;
  margin-top: 0.9rem;
  justify-content: center;
}

.profile-main[data-theme="spotlight"] .hero-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--profile-primary-text-color);
}

.profile-main[data-theme="spotlight"] .hero-social-link .social-icon {
  width: 20px;
  height: 20px;
}

.profile-main[data-theme="spotlight"] .hero-stats-grid {
  width: 100%;
  max-width: 380px;
  margin-top: 1rem;
  justify-items: center;
}

.profile-main[data-theme="spotlight"] .hero-stats-grid > div,
.profile-main[data-theme="spotlight"] .hero-stats-grid .stat-button {
  justify-items: center;
  text-align: center;
}

.profile-main[data-theme="spotlight"] .hero-stats-grid h3,
.profile-main[data-theme="spotlight"] .hero-stats-grid .stat-value {
  text-align: center;
}

.profile-main[data-theme="spotlight"] .hero-stats-grid h3 {
  width: 100%;
}

.profile-main[data-theme="spotlight"] .hero-stats-grid .stat-value {
  width: 100%;
}

.profile-main[data-theme="spotlight"] .profile-actions {
  order: 5;
  justify-content: center;
}

.profile-main[data-theme="spotlight"] .detail-grid {
  grid-template-columns: 1fr;
  justify-items: center;
}

.profile-main[data-theme="spotlight"] .youtube-card {
  width: min(100%, 780px);
}

.profile-main[data-theme="spotlight"] .summary-card,
.profile-main[data-theme="spotlight"] .detail-card,
.profile-main[data-theme="spotlight"] .highlight-tile {
  background: rgba(0, 0, 0, 0.8);
}

.profile-main[data-theme="spotlight"] [data-media-card] {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-main[data-theme="spotlight"] > .profile-summary {
  display: none;
}

.profile-main[data-theme="defaultstate"] > .profile-summary {
  display: none;
}

.profile-main[data-theme="spotlight"] [data-links-card] {
  display: none;
}

.profile-main[data-theme="spotlight"] [data-media-carousel-controls] {
  display: inline-flex;
}

.profile-main[data-theme="spotlight"] [data-media-carousel] {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    align-items: stretch;
    margin-top: 1rem;
    padding-inline: calc(50% - min(180px, 36vw));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: calc(50% - min(180px, 36vw));
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

.profile-main[data-theme="spotlight"] [data-media-carousel]::-webkit-scrollbar {
  display: none;
}

.profile-main[data-theme="spotlight"] [data-media-carousel] .highlight-tile {
    flex: 0 0 min(360px, 72vw);
    width: min(360px, 72vw);
    min-height: auto;
    max-height: 420px;
    aspect-ratio: 3 / 4;
    margin-right: -3.75rem;
    scroll-snap-align: center;
    transform: scale(0.9);
    opacity: 0.42;
    filter: saturate(0.7) brightness(0.72);
    transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease, box-shadow 180ms ease;
    z-index: 1;
  }

  .profile-main[data-theme="spotlight"] [data-media-carousel] .highlight-tile.is-active {
    transform: scale(1);
    opacity: 1;
    filter: none;
    z-index: 3;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
  }

  .profile-main[data-theme="spotlight"] [data-media-carousel] .highlight-tile.is-prev,
  .profile-main[data-theme="spotlight"] [data-media-carousel] .highlight-tile.is-next {
    opacity: 0.72;
    filter: saturate(0.82) brightness(0.82);
    z-index: 2;
  }

  .profile-main[data-theme="spotlight"] [data-media-carousel] .highlight-tile.is-distant {
    opacity: 0.18;
    filter: saturate(0.45) brightness(0.5);
  }

.profile-main[data-theme="retroworld"] {
  max-width: 1320px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  grid-template-areas:
    "hero hero"
    "detail posts";
  align-items: start;
  gap: 1.2rem;
}

.profile-main[data-theme="retroworld"] .page-kicker {
  display: none;
}

.profile-main[data-theme="retroworld"] > .profile-hero {
  grid-area: hero;
}

.profile-main[data-theme="retroworld"] > .profile-summary {
  display: none;
}

.profile-main[data-theme="retroworld"] > .detail-grid {
  grid-area: detail;
  margin-top: 0;
  grid-template-columns: 1fr;
  align-content: start;
}

.profile-main[data-theme="retroworld"] > .profile-posts {
  grid-area: posts;
  margin-top: 0;
  align-self: start;
}

.profile-main[data-theme="retroworld"] .profile-hero {
  grid-template-columns: 200px 1fr;
  gap: 1.2rem;
  padding: 1.2rem;
  border-radius: 28px;
  border: 3px solid #fbcb3e;
  background: #912a2d;
  box-shadow: 8px 8px 0 #203d57;
}

.profile-main[data-theme="retroworld"] .profile-avatar {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  border: 3px solid #fbcb3e;
  background: #357d77;
  box-shadow: 6px 6px 0 #203d57;
}

.profile-main[data-theme="retroworld"] .profile-avatar-label {
  width: 100%;
  max-width: 164px;
  min-height: 42px;
  border-radius: 999px;
  border: 2px solid #fbcb3e;
  background: #f8e2b9;
  color: #203d57;
  font-weight: 700;
}

.profile-main[data-theme="retroworld"] .profile-intro {
  align-self: center;
}

.profile-main[data-theme="retroworld"] .profile-intro h1 {
  font-family: "RetroFunk", "Instrument Sans", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  letter-spacing: 0.02em;
  color: #f8e2b9;
}

.profile-main[data-theme="retroworld"] .profile-handle {
  margin-top: 0.35rem;
  color: #fbcb3e;
  font-weight: 700;
}

.profile-main[data-theme="retroworld"] .profile-copy {
  max-width: 760px;
  margin-top: 0.95rem;
  color: #f8e2b9;
}

.profile-main[data-theme="retroworld"] .profile-copy-editor {
  max-width: 760px;
  min-height: 120px;
  margin-top: 0.95rem;
}

.profile-main[data-theme="retroworld"] .hero-social-links {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
}

.profile-main[data-theme="retroworld"] .hero-stats-grid {
  max-width: 620px;
  margin-top: 1.05rem;
}

.profile-main[data-theme="retroworld"] .hero-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid #fbcb3e;
  border-radius: 14px;
  background: #357d77;
  color: #f8e2b9;
}

.profile-main[data-theme="retroworld"] .hero-social-link .social-icon {
  width: 22px;
  height: 22px;
}

.profile-main[data-theme="retroworld"] .profile-actions {
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.profile-main[data-theme="retroworld"] .stats-card {
  align-content: start;
}

.profile-main[data-theme="retroworld"] .stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.35rem;
}

.profile-main[data-theme="retroworld"] .stats-grid h3 {
  color: #f8e2b9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-main[data-theme="retroworld"] .hero-stats-grid .stat-button,
.profile-main[data-theme="retroworld"] .hero-stats-grid > div {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.profile-main[data-theme="retroworld"] .hero-stats-grid .stat-button {
  cursor: pointer;
}

.profile-main[data-theme="retroworld"] .youtube-card {
  order: 1;
}

.profile-main[data-theme="retroworld"] .wide-card {
  grid-column: auto;
}

.profile-main[data-theme="retroworld"] .detail-grid .wide-card {
  order: 2;
}

.profile-main[data-theme="retroworld"] .ghost-button,
.profile-main[data-theme="retroworld"] .action-button,
.profile-main[data-theme="retroworld"] .profile-edit-button,
.profile-main[data-theme="retroworld"] .profile-save-button,
.profile-main[data-theme="retroworld"] .profile-cancel-button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fbcb3e;
  font-family: "RetroFunk", "Instrument Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.profile-main[data-theme="retroworld"] .summary-card,
.profile-main[data-theme="retroworld"] .detail-card,
.profile-main[data-theme="retroworld"] .highlight-tile {
  border: 3px solid #fbcb3e;
  border-radius: 24px;
  background: #912a2d;
  box-shadow: 6px 6px 0 #203d57;
}

.profile-main[data-theme="retroworld"] [data-links-card] {
  display: none;
}

.profile-main[data-theme="retroworld"] .summary-label {
  color: #fbcb3e;
  font-weight: 700;
}

.profile-main[data-theme="retroworld"] .link-row {
  border: 2px solid #fbcb3e;
  background: #357d77;
  color: #f8e2b9;
  font-weight: 700;
}

.profile-main[data-theme="retroworld"] .youtube-embed-shell,
.profile-main[data-theme="retroworld"] .youtube-embed-frame,
.profile-main[data-theme="retroworld"] .profile-post-card {
  border: 2px solid #fbcb3e;
  border-radius: 24px;
  box-shadow: none;
}

.profile-main[data-theme="retroworld"] .youtube-embed-shell {
  min-height: 300px;
}

.profile-main[data-theme="retroworld"] .highlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 190px;
}

.profile-main[data-theme="retroworld"] .highlight-tile:first-child {
  grid-row: span 2;
}

.profile-main[data-theme="retroworld"] .highlight-tile {
  min-height: 190px;
}

.profile-main[data-theme="retroworld"] .profile-posts > .detail-card {
  min-height: 100%;
}

.profile-main[data-theme="retroworld"] .profile-posts-list {
  margin-top: 0.8rem;
  gap: 0.85rem;
}

.profile-main[data-theme="retroworld"] .profile-post-card {
  background: #203d57;
}

.profile-main[data-theme="retroworld"] .profile-post-meta,
.profile-main[data-theme="retroworld"] .profile-post-counts {
  color: #f8e2b9;
}

.profile-main[data-theme="retroworld"] .stat-value {
  font-family: "RetroFunk", "Instrument Sans", sans-serif;
  font-size: 2.1rem;
  letter-spacing: 0.02em;
  color: #f8e2b9;
}

.profile-main[data-theme="retroworld"] .posts-empty,
.profile-main[data-theme="retroworld"] .youtube-embed-empty p {
  color: #f8e2b9;
}

@media (max-width: 980px) {
  .profile-hero,
  .profile-summary,
  .detail-grid,
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-column: auto;
  }

  .profile-main[data-theme="retroworld"] {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "detail"
      "posts";
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    z-index: 30;
    width: 100%;
    height: auto;
    padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.35);
    transition: none;
  }

  .sidebar.is-collapsed {
    width: 100%;
    height: auto;
    padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.35);
  }

  .sidebar.is-collapsed .sidebar-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .brand-row,
  .sidebar-account-row {
    display: none;
  }

  .sidebar-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .nav-link {
    justify-content: center;
    min-height: 56px;
    padding: 0.55rem 0.25rem;
    border-radius: 16px;
  }

  .nav-label {
    display: none;
  }

  .nav-icon {
    width: 2.1rem;
    height: 2.1rem;
  }

  .nav-icon-image {
    width: 1.45rem;
    height: 1.45rem;
  }

  .profile-main {
    padding: 1rem 1rem calc(6.5rem + env(safe-area-inset-bottom));
  }

  .profile-actions {
    grid-auto-flow: column;
    grid-template-columns: repeat(3, minmax(0, max-content));
    justify-content: flex-start;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    position: relative;
    z-index: 2;
  }

  .profile-actions .ghost-button {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.2rem 0.15rem;
  }

  .page-editor-drawer {
    width: 100vw;
    padding: 1rem;
  }

  .connections-drawer {
    width: 100vw;
    padding: 1rem;
  }

  .connection-card {
    grid-template-columns: 1fr;
  }

  .page-editor-grid {
    grid-template-columns: 1fr;
  }

  .detail-card:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.2rem;
  }

  .detail-card:first-child .summary-label {
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  .detail-card:first-child .link-row {
    width: fit-content;
    min-width: 0;
  }

  .detail-card:first-child .field-input {
    min-height: 44px;
  }

  .asset-actions {
    left: 0.75rem;
    right: 0.75rem;
  }

  .inline-editor-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-main[data-theme="retroworld"] .profile-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .profile-main[data-theme="retroworld"] .profile-avatar {
    max-width: 190px;
  }

  .profile-main[data-theme="retroworld"] .profile-intro {
    width: 100%;
  }

  .profile-main[data-theme="retroworld"] .profile-intro h1 {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
    line-height: 1;
  }

  .profile-main[data-theme="retroworld"] .hero-social-links {
    flex-wrap: wrap;
  }

  .profile-main[data-theme="retroworld"] .profile-actions {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, max-content));
    gap: 0.65rem;
    overflow: visible;
    padding-bottom: 0;
  }

  .profile-main[data-theme="retroworld"] .ghost-button,
  .profile-main[data-theme="retroworld"] .action-button,
  .profile-main[data-theme="retroworld"] .profile-edit-button,
  .profile-main[data-theme="retroworld"] .profile-save-button,
  .profile-main[data-theme="retroworld"] .profile-cancel-button {
    min-height: auto;
    padding: 0;
    white-space: nowrap;
  }

  .profile-main[data-theme="spotlight"] [data-media-carousel] .highlight-tile {
      flex-basis: min(280px, calc(100vw - 5rem));
      width: min(280px, calc(100vw - 5rem));
      max-height: 360px;
      margin-right: -2.5rem;
    }

    .profile-main[data-theme="spotlight"] [data-media-carousel] {
      padding-inline: calc(50% - min(140px, 32vw));
      scroll-padding-inline: calc(50% - min(140px, 32vw));
    }
  }
