:root {
  color-scheme: dark;
  --site-header-height: 50px;
  --bg: #0b0c0f;
  --nav-link: rgba(255, 255, 255, 0.68);
  --nav-link-hover: #fff;
  --background: 225 6% 5%;
  --foreground: 0 0% 98%;
  --card: 225 6% 7%;
  --card-foreground: 0 0% 98%;
  --muted: 225 4% 12%;
  --muted-foreground: 0 0% 63%;
  --border: 0 0% 20%;
  --radius: 0.75rem;
  --sidebar-width: 17.5rem;
  --sidebar-background: #111111;
  --sidebar-foreground: 0 0% 98%;
  --sidebar-border: 0 0% 14%;
  --sidebar-accent: #1a1a1a;
  --sidebar-accent-foreground: 0 0% 98%;
  --sidebar-muted: 0 0% 55%;
  --sidebar-active: #1a1a1a;
  --sidebar-search-bg: #161616;
  --profile-section-padding-y: 0;
  --profile-section-gap: 25px;
  /* title line + body gap + bar margin + progress bar (32px) */
  --profile-build-entry-height: calc(0.9375rem * 1.5 + 8px + 32px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: hsl(var(--foreground));
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.site-header {
  position: relative;
  z-index: 1001;
  height: var(--site-header-height);
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a,
.admin-header-link,
.settings-header-link {
  display: inline-flex;
  align-items: center;
  color: var(--nav-link);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.admin-header-link:hover,
.admin-header-link.is-active,
.settings-header-link:hover,
.settings-header-link.is-active {
  color: var(--nav-link-hover);
  background: rgba(255, 255, 255, 0.08);
}

.site-nav a:focus-visible,
.admin-header-link:focus-visible,
.settings-header-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.auth-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.auth-button.is-user {
  background: transparent;
  border-color: transparent;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

.auth-button.is-user:hover {
  background: transparent;
  border-color: transparent;
  opacity: 0.85;
}

.auth-button.is-error {
  background: #b91c1c;
  border-color: #ef4444;
}

.auth-button img {
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
  width: 24px;
  height: 24px;
}

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

.curator-header {
  height: 50px;
  background: #b91c1c;
  color: #fff;
  display: none;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid #7f1d1d;
}

.curator-header.is-visible {
  display: flex;
}

.curator-toggle {
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.curator-toggle:hover {
  background: rgba(0, 0, 0, 0.3);
}

.curator-toggle[aria-pressed="true"] {
  background: #7f1d1d;
  border-color: #fecaca;
}

.curator-toggle--grid[aria-pressed="true"] {
  background: #2563eb;
  border-color: #3b82f6;
}

.curator-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

body.remove-mode .gallery-item:not(.is-hidden) {
  cursor: crosshair;
  outline: 2px solid transparent;
  outline-offset: -2px;
}

body.remove-mode .gallery-item:not(.is-hidden):hover {
  outline-color: #ef4444;
}

.gallery-item.is-hidden,
.gallery-item.is-screenshot-filtered,
.gallery-item.is-build-render-filtered,
.gallery-item.is-tag-filtered,
.gallery-item.is-build-filtered,
.gallery-item.is-user-folder-filtered {
  display: none !important;
}

.gallery-user-folder-header {
  padding: 1.25rem 1.25rem 0.5rem;
}

.gallery-user-folder-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

.gallery-user-folder-title {
  margin: 0.35rem 0 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.gallery-user-folder-title a {
  color: inherit;
  text-decoration: none;
}

.gallery-user-folder-title a:hover {
  text-decoration: underline;
}

.gallery-user-folder-meta {
  margin: 0.35rem 0 0;
  opacity: 0.75;
}

body.is-user-builds-folder .gallery-sidebar-section {
  display: none;
}

/* Build page boot: layout before gallery-sidebar.js runs */
body.is-build-page .sidebar-inset {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.is-build-page #gallery-property-sidebar[hidden] {
  display: flex !important;
}

.gallery-footer {
  position: sticky;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  background: rgba(11, 12, 15, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.gallery-footer-toggle {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gallery-footer-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.gallery-footer-toggle[aria-pressed="true"] {
  background: rgba(88, 101, 242, 0.18);
  border-color: rgba(88, 101, 242, 0.45);
  color: #e8eaff;
}

.gallery-footer-toggle:focus-visible {
  outline: 2px solid rgba(88, 101, 242, 0.55);
  outline-offset: 2px;
}

body.grid-mode .gallery-item:not(.is-hidden) {
  overflow: hidden;
}

body.grid-mode .gallery-item:not(.is-hidden) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery {
  position: relative;
  width: 100%;
}

.gallery-item {
  position: absolute;
  display: block;
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  font: inherit;
  text-align: inherit;
  color: inherit;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

.edit-gallery-lead {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.sidebar-add-project-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px dashed hsl(var(--sidebar-border));
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.sidebar-add-project-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
  color: hsl(var(--sidebar-accent-foreground));
}

.sidebar-add-project-btn:disabled,
.sidebar-add-project-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-add-project-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.sidebar-add-project-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar-add-project-btn:hover:not(:disabled) .sidebar-add-project-icon {
  opacity: 1;
}

.sidebar-add-project-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sign-in-page {
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 96px;
}

.sign-in-card {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.sign-in-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 24px 0;
}

.sign-in-card-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sign-in-card-description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

.sign-in-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sign-in-alert {
  margin: 0;
  padding: 12px 14px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(185, 28, 28, 0.15);
  color: #fecaca;
  font-size: 0.875rem;
  line-height: 1.5;
}

.sign-in-alert[hidden] {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.btn-discord {
  background: #5865f2;
  color: #fff;
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sign-in-footer {
  margin: 0;
  text-align: center;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

#profile-gallery:not([hidden]),
#profile-hero:not([hidden]),
#history:not([hidden]),
#profile-challenges:not([hidden]),
#profile-properties:not([hidden]) {
  padding-top: var(--profile-section-padding-y);
  padding-bottom: var(--profile-section-padding-y);
}

#profile-gallery:not([hidden]) {
  margin-top: 0;
}

#profile-gallery:not([hidden]) ~ #history:not([hidden]),
#profile-gallery:not([hidden]) ~ #profile-challenges:not([hidden]),
#profile-gallery:not([hidden]) ~ #profile-properties:not([hidden]),
#profile-hero:not([hidden]) ~ #history:not([hidden]),
#profile-hero:not([hidden]) ~ #profile-challenges:not([hidden]),
#profile-hero:not([hidden]) ~ #profile-properties:not([hidden]),
#history:not([hidden]) ~ #profile-properties:not([hidden]) {
  margin-top: var(--profile-section-gap);
}

.profile-section-spacer {
  height: var(--profile-section-gap);
}

.profile-section-spacer[hidden] {
  display: none;
}

#profile-history-spacer:not([hidden]) + #profile-challenges:not([hidden]),
#profile-challenges-spacer:not([hidden]) + #profile-properties:not([hidden]) {
  margin-top: 0;
}

.profile-hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 8px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-hero-identity {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1 1 200px;
  min-width: 0;
}

.profile-hero-avatar {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-hero-body {
  flex: 1;
  min-width: 0;
}

.profile-hero-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.profile-hero-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  min-width: 0;
}

.profile-hero-name-row .profile-hero-name {
  flex: 1 1 auto;
}

.profile-hero-meta {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.profile-hero-stats {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: hsl(var(--foreground));
}

.profile-hero-joined {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

#profile-xp-bar {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 5px;
}

#profile-badges {
  flex-shrink: 0;
}

#profile-badges .leaderboard-badges {
  margin-top: 0;
}

.profile-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: rgba(255, 255, 255, 0.06);
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-settings:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.profile-empty {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px 96px;
  text-align: center;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

.profile-gallery {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  background: #000;
}

#profile-gallery .gallery {
  background: #000;
}

#profile-gallery .gallery-item {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  overflow: visible;
}

#profile-gallery .gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

#profile-gallery .gallery-placeholder {
  position: absolute;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 141px;
  border-radius: 0;
  background: #000;
}

body.grid-mode #profile-gallery .gallery-item:not(.is-hidden) {
  border-radius: 0;
  overflow: hidden;
}

body.grid-mode #profile-gallery .gallery-item:not(.is-hidden) img {
  border-radius: 0;
}

body.grid-mode #profile-gallery .gallery-placeholder {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

#profile-hero:not([hidden]) {
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--profile-section-gap);
  padding-left: 20px;
  padding-right: 20px;
  row-gap: 0;
}

.profile-history {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  scroll-margin-top: 24px;
}

.profile-section-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-section-title a {
  color: inherit;
  text-decoration: none;
}

.profile-section-title a:hover {
  color: #8ea1ff;
}

.profile-history-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-history-empty {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
  line-height: 1.6;
}

.profile-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-history-item {

.profile-properties-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-properties-item {
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: hsl(var(--foreground));
}
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: hsl(var(--foreground));
}

.profile-section-action {
  margin: 12px 0 0;
  padding: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8125rem;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.profile-section-action:hover {
  color: rgba(255, 255, 255, 0.72);
}

.profile-gallery:not([hidden]) {
  cursor: pointer;
}

#profile-gallery:not([hidden]) .gallery {
  cursor: default;
}

.gallery-item.is-profile-collapsed {
  display: none !important;
}

.profile-history-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.profile-history-lightbox[hidden] {
  display: none;
}

.profile-history-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.profile-history-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: 48px 24px 48px max(24px, min(22vw, 280px));
  pointer-events: none;
  outline: none;
}

.profile-history-lightbox-layout {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(20px, 3vh, 32px);
  width: min(400px, 100%);
  max-width: 400px;
  max-height: min(80vh, 720px);
}

.profile-history-lightbox-title {
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: hsl(var(--foreground));
  text-align: left;
}

.profile-history-lightbox-content {
  width: 100%;
  min-width: 0;
  max-height: min(calc(80vh - 4rem), 640px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-history-lightbox-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-history-lightbox-section-title {
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-align: left;
}

.profile-history-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  pointer-events: auto;
  width: auto;
  height: auto;
  padding: 8px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.profile-history-lightbox-close:hover {
  color: rgba(255, 255, 255, 0.65);
}

.profile-history-lightbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

.profile-history-lightbox-list .profile-history-item {
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--foreground));
}

@media (max-width: 720px) {
  .profile-history-lightbox-dialog {
    justify-content: center;
    padding: 48px 24px;
  }

  .profile-history-lightbox-layout {
    width: 100%;
    max-width: none;
    max-height: min(85vh, 720px);
  }

  .profile-history-lightbox-content {
    max-height: min(calc(85vh - 4rem), 640px);
  }
}

.profile-properties-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.profile-properties-lightbox[hidden] {
  display: none;
}

.profile-properties-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.profile-properties-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 48px 24px;
  pointer-events: none;
  outline: none;
}

.profile-properties-lightbox-layout {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(20px, 3vh, 32px);
  width: min(600px, 100%);
  max-width: 600px;
  max-height: min(80vh, 720px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.profile-properties-lightbox-title {
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: hsl(var(--foreground));
  text-align: left;
}

.profile-properties-lightbox-content {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.profile-properties-lightbox-list {
  width: 100%;
  min-width: 0;
}

.profile-properties-lightbox-content .profile-build-entry {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.profile-properties-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  pointer-events: auto;
  width: auto;
  height: auto;
  padding: 8px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.profile-properties-lightbox-close:hover {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 720px) {
  .profile-properties-lightbox-dialog {
    justify-content: center;
    padding: 48px 24px;
  }

  .profile-properties-lightbox-layout {
    width: 100%;
    max-width: none;
    max-height: min(85vh, 720px);
  }
}

.profile-challenges,
.profile-properties {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.profile-progress-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-progress-item {
  margin: 0;
  padding: 0;
}

#profile-challenges-list .profile-item-bar {
  margin-top: 0;
}

.profile-item-bar {
  margin-top: 8px;
}

.profile-build-entry {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 4px;
  margin: -4px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  width: calc(100% + 8px);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.profile-build-entry::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.15s ease;
}

.profile-build-entry:hover::after,
.profile-build-entry:focus-visible::after {
  background: rgba(0, 0, 0, 0.38);
}

.profile-build-entry:focus-visible {
  outline: 2px solid rgba(142, 161, 255, 0.55);
  outline-offset: 2px;
}

.profile-build-entry-thumb {
  flex-shrink: 0;
  align-self: flex-start;
  width: auto;
  height: var(--profile-build-entry-height);
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.profile-build-entry-thumb-empty {
  background: rgba(255, 255, 255, 0.06);
}

.profile-build-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-build-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-build-body .profile-item-bar {
  margin-top: 4px;
}

.profile-build-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: hsl(var(--foreground));
}

.profile-build-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1150;
}

.profile-build-lightbox[hidden] {
  display: none;
}

.profile-property-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.profile-property-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow-y: auto;
  pointer-events: auto;
  outline: none;
  -webkit-overflow-scrolling: touch;
}

.profile-property-lightbox-layout {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-height: min(100%, 100vh);
  width: 100%;
  padding-bottom: 48px;
}

.profile-property-lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--profile-section-gap);
  width: 100%;
  max-width: 80%;
  flex: 0 0 auto;
}

.profile-property-lightbox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex: 0 0 auto;
  padding: 48px 0 0;
}

.profile-property-lightbox-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: hsl(var(--foreground));
  text-align: left;
}

.profile-property-lightbox-author {
  flex: 0 0 auto;
  max-width: min(40%, 240px);
  text-align: right;
}

.profile-property-lightbox-author .profile-property-lightbox-section {
  align-items: flex-end;
  gap: 0;
}

.profile-property-lightbox-preview {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-height: min(52vh, 520px);
  min-height: 180px;
  background: #000;
}

.profile-property-lightbox-preview.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
}

.profile-property-lightbox-preview-empty {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
  pointer-events: none;
}

.profile-property-lightbox-preview-empty[hidden] {
  display: none !important;
}

.profile-property-lightbox-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(52vh, 520px);
  object-fit: cover;
}

.profile-property-lightbox-preview img[hidden] {
  display: none !important;
}

.profile-property-lightbox-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  border: none;
  background: rgba(0, 0, 0, 0);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.profile-property-lightbox-preview-overlay[hidden] {
  display: none !important;
}

.profile-property-lightbox-preview.has-view-all:hover .profile-property-lightbox-preview-overlay,
.profile-property-lightbox-preview.has-view-all:focus-within .profile-property-lightbox-preview-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.48);
}

.profile-property-lightbox-preview-overlay:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.48);
  outline: 2px solid rgba(142, 161, 255, 0.55);
  outline-offset: -2px;
}

.profile-build-images-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.profile-build-images-lightbox[hidden] {
  display: none;
}

.profile-build-images-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.profile-build-images-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 48px 24px;
  overflow-y: auto;
  pointer-events: auto;
  outline: none;
  -webkit-overflow-scrolling: touch;
}

.profile-build-images-lightbox-layout {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(20px, 3vh, 32px);
  width: min(960px, 100%);
  max-height: min(85vh, 900px);
}

.profile-build-images-lightbox-title {
  margin: 0;
  padding: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: hsl(var(--foreground));
  text-align: left;
}

.profile-build-images-lightbox-content {
  width: 100%;
  min-width: 0;
  max-height: min(calc(85vh - 6rem), 760px);
  overflow-y: auto;
}

.profile-build-images-lightbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.profile-build-images-lightbox-item {
  position: relative;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.profile-build-images-lightbox-item:hover,
.profile-build-images-lightbox-item:focus-visible {
  border-color: rgba(142, 161, 255, 0.45);
  transform: translateY(-1px);
}

.profile-build-images-lightbox-item:focus-visible {
  outline: 2px solid rgba(142, 161, 255, 0.55);
  outline-offset: 2px;
}

.profile-build-images-lightbox-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.profile-build-images-lightbox-empty {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
}

.profile-build-images-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  pointer-events: auto;
  width: auto;
  height: auto;
  padding: 8px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.profile-build-images-lightbox-close:hover {
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 720px) {
  .profile-build-images-lightbox-dialog {
    padding: 48px 16px;
  }

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

.profile-property-lightbox-progress {
  flex: 0 0 auto;
  width: 100%;
}

.profile-property-lightbox-progress .profile-item-bar {
  margin-top: 0;
}

.profile-property-lightbox-progress-stages {
  flex: 0 0 auto;
  width: 100%;
}

.profile-property-lightbox-details {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--profile-section-gap);
  text-align: left;
}

.profile-property-lightbox-details-loading,
.profile-property-lightbox-details-error {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.profile-property-lightbox-details-error {
  color: rgba(255, 120, 120, 0.9);
}

.profile-property-lightbox-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-property-lightbox-section-title {
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.profile-property-lightbox-section-body {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: hsl(var(--foreground));
}

.profile-property-lightbox-author-link,
.profile-property-lightbox-author-name {
  font-weight: 600;
  color: hsl(var(--foreground));
  text-decoration: none;
}

.profile-property-lightbox-author-link:hover {
  color: #8ea1ff;
}

.profile-property-lightbox-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-property-lightbox-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-property-lightbox-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
}

.profile-property-lightbox-stage.is-complete {
  color: hsl(var(--foreground));
}

.profile-property-lightbox-stage-marker {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1;
  color: #57f287;
}

.profile-property-lightbox-stage.is-complete .profile-property-lightbox-stage-marker {
  border-color: rgba(87, 242, 135, 0.45);
  background: rgba(87, 242, 135, 0.12);
}

.profile-property-lightbox-comments-empty {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
}

.profile-property-lightbox-comments-list {
  max-height: none;
  margin: 0;
}

.profile-property-lightbox-gallery-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.profile-property-lightbox-gallery-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #8ea1ff;
}

.profile-property-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  pointer-events: auto;
  width: auto;
  height: auto;
  padding: 8px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.profile-property-lightbox-close:hover {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 720px) {
  .profile-property-lightbox-header {
    padding: 48px 0 0;
    gap: 16px;
  }

  .profile-property-lightbox-author {
    max-width: min(45%, 180px);
  }
}

.leaderboard-badge--builder-applicant {
  border-color: rgba(87, 242, 135, 0.35);
  background: rgba(87, 242, 135, 0.12);
  color: #57f287;
}

.profile-footer {
  margin-top: var(--profile-section-gap);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
}

.site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px var(--profile-section-gap);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0 32px;
}

.site-footer-brand {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  width: 100%;
  margin-bottom: 28px;
}

.site-footer-name {
  display: inline-block;
  margin: 0;
  flex-shrink: 0;
  color: #fff;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.15s ease;
}

.site-footer-name:hover {
  color: #8ea1ff;
}

.site-footer-tagline {
  margin: 0 0 0 auto;
  flex: 0 0 auto;
  white-space: nowrap;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: right;
}

.site-footer-tagline a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.site-footer-tagline a:hover {
  color: #8ea1ff;
}

.site-footer-nav {
  grid-column: 1 / -1;
  min-width: 0;
  margin-bottom: 0;
  padding-bottom: var(--profile-section-gap);
}

.site-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-links a {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-footer-links a:hover {
  color: #fff;
}

.site-footer-lower {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 0;
}

.site-footer-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  margin-left: auto;
}

.site-footer-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: calc(var(--radius) - 2px);
  background: #5865f2;
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}

.site-footer-discord:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.profile-footer button {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8125rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.profile-footer button:hover {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer-copyright {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.8125rem;
}

@media (max-width: 640px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 32px;
  }

  .site-footer-brand {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 24px;
  }

  .site-footer-tagline {
    margin-left: 0;
    flex: 0 1 auto;
    white-space: normal;
    text-align: left;
  }

  .site-footer-lower {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer-actions {
    align-items: center;
    justify-content: flex-end;
  }

  .site-footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 16px;
  }
}

.gallery {
  position: relative;
  width: 100%;
}

.gallery-item {
  position: absolute;
  display: block;
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  font: inherit;
  text-align: inherit;
  color: inherit;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

body.grid-mode .gallery-item:not(.is-hidden) {
  overflow: hidden;
}

body.grid-mode .gallery-item:not(.is-hidden) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 96px;
}

.settings-page h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-lead {
  margin: 0 0 32px;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  font-size: 0.9375rem;
}

.settings-section {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.settings-section h2 {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.settings-account {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-account img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.settings-account-name {
  margin: 0 0 2px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.settings-account-detail {
  margin: 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid hsl(var(--border));
}

.settings-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.settings-row-label {
  font-size: 0.9375rem;
}

.settings-row-value {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-align: right;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  cursor: pointer;
}

.settings-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #5865f2;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(185, 28, 28, 0.18);
  color: #fecaca;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-logout:hover {
  background: rgba(185, 28, 28, 0.32);
}

.settings-back {
  display: inline-block;
  margin-top: 24px;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 0.875rem;
}

.settings-back:hover {
  color: hsl(var(--foreground));
}

.team-page {
  min-height: calc(100vh - 50px);
  padding-bottom: 48px;
}

.team-page-title {
  padding-bottom: 8px;
}

.team-page-title .profile-hero-name {
  margin-bottom: 4px;
}

.team-list {
  max-width: 800px;
  margin-top: 32px;
  margin-right: auto;
  margin-left: max(0px, calc(50% - 480px));
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.team-member {
  width: 100%;
  margin: 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.team-member-link {
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.team-member-link:hover,
.team-member-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.04);
}

.lightbox-owner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.lightbox-owner-link:hover .lightbox-owner-name,
.lightbox-owner-link:focus-visible .lightbox-owner-name {
  text-decoration: underline;
}

.team-member .profile-hero-body {
  flex: 0 1 auto;
  min-width: 0;
}

.team-member .profile-hero-avatar {
  display: block;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.team-member .profile-hero-name {
  margin: 0 0 2px;
  font-size: 1.25rem;
}

.team-member-meta {
  margin: 0;
}

.team-error {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  padding: 12px 14px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(185, 28, 28, 0.15);
  color: #fecaca;
}

.team-error[hidden],
.team-list[hidden] {
  display: none;
}

.leaderboard-page {
  min-height: calc(100vh - 50px);
  padding-bottom: 48px;
}

.leaderboard-page-title {
  padding-bottom: 8px;
}

.leaderboard-page-title .profile-hero-name {
  margin-bottom: 4px;
}

.leaderboard-content {
  max-width: 880px;
  margin-top: 24px;
  margin-right: auto;
  margin-left: max(0px, calc(50% - 480px));
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.leaderboard-category-title {
  margin: 0 0 12px;
  padding: 0 20px;
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.leaderboard-category-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.leaderboard-member-divider {
  margin: 18px 20px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-member {
  padding: 0 20px 4px;
}

.leaderboard-member-header {
  margin-bottom: 10px;
}

.leaderboard-member-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.leaderboard-member-identity:hover .leaderboard-member-name,
.leaderboard-member-identity:focus-visible .leaderboard-member-name {
  text-decoration: underline;
}

.leaderboard-member-avatar {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
}

.leaderboard-member-heading {
  flex: 1;
  min-width: 0;
}

.leaderboard-member-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.leaderboard-member-name {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  min-width: 0;
}

.leaderboard-member-stats {
  margin: 0 0 2px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
}

.leaderboard-xp-bar {
  position: relative;
  width: 100%;
  height: 32px;
  border: 1px solid #3f4147;
  background: #2b2d31;
  box-sizing: border-box;
  border-radius: 9999px;
  overflow: hidden;
}

.leaderboard-xp-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 9999px;
  transition: width 0.25s ease;
}

.leaderboard-xp-bar-fill.leaderboard-xp-bar-fill--manager {
  background-color: #d40b2d;
}

.leaderboard-xp-bar-fill.leaderboard-xp-bar-fill--team-member,
.leaderboard-xp-bar-fill.leaderboard-xp-bar-fill--default {
  background-color: #5865f2;
}

.leaderboard-xp-bar-fill.leaderboard-xp-bar-fill--builder-applicant {
  background-color: #57f287;
}

.leaderboard-xp-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.leaderboard-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.leaderboard-badge--team {
  background: rgba(88, 101, 242, 0.18);
  color: #aeb4ff;
  border: 1px solid rgba(88, 101, 242, 0.35);
}

.leaderboard-badge--manager {
  background: rgba(212, 11, 45, 0.18);
  color: #ff9aab;
  border: 1px solid rgba(212, 11, 45, 0.35);
}

.leaderboard-error {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  padding: 12px 14px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(185, 28, 28, 0.15);
  color: #fecaca;
}

.leaderboard-error[hidden],
.leaderboard-content[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .leaderboard-member-name {
    font-size: 1.125rem;
  }

  .leaderboard-member-name-row,
  .profile-hero-name-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .leaderboard-badges,
  .profile-hero-name-row .leaderboard-badges {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── Builds: uses .gallery grid layout (see properties-viewer.css) ── */

body.properties-page {
  background: #000;
}

body.feed-page {
  background: #000;
}

body.not-found-page {
  background: #000;
}

.not-found-main {
  min-height: calc(100vh - var(--site-header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 96px;
  text-align: center;
}

.not-found-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  height: 140px;
  margin-bottom: 28px;
}

.not-found-code {
  position: relative;
  z-index: 1;
  font-size: clamp(4.5rem, 16vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #fff;
  text-shadow: 0 0 48px rgba(88, 101, 242, 0.35);
}

.not-found-block {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: not-found-float 6s ease-in-out infinite;
}

.not-found-block--1 {
  top: 18px;
  left: 12%;
  transform: rotate(-8deg);
}

.not-found-block--2 {
  bottom: 8px;
  right: 10%;
  width: 36px;
  height: 36px;
  animation-delay: -2s;
  transform: rotate(12deg);
}

.not-found-block--3 {
  top: 36px;
  right: 22%;
  width: 28px;
  height: 28px;
  opacity: 0.7;
  animation-delay: -4s;
  transform: rotate(-18deg);
}

@keyframes not-found-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--not-found-rotate, 0deg));
  }
  50% {
    transform: translateY(-10px) rotate(var(--not-found-rotate, 0deg));
  }
}

.not-found-block--1 {
  --not-found-rotate: -8deg;
}

.not-found-block--2 {
  --not-found-rotate: 12deg;
}

.not-found-block--3 {
  --not-found-rotate: -18deg;
}

.not-found-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.not-found-lead {
  max-width: 480px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.65;
  font-size: 1.05rem;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: min(100%, 420px);
}

.not-found-btn {
  width: auto;
  min-width: 160px;
  flex: 1 1 160px;
}

.not-found-path {
  margin: 28px 0 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.38);
}

.not-found-path code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  word-break: break-all;
}

.feed-main {
  min-height: calc(100vh - var(--site-header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.feed-title {
  width: 50%;
  margin: 0;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}

.builds-empty {
  padding: 48px 20px;
  text-align: center;
}

/* ── Projects: Pointsale-style sidebar (dark) ── */

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

.projects-app {
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid hsl(var(--sidebar-border));
  background: var(--sidebar-background);
  color: hsl(var(--sidebar-foreground));
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 14px 12px 10px;
  min-height: 48px;
}

.sidebar-title {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: hsl(var(--sidebar-muted));
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projects-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: hsl(var(--sidebar-muted));
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.projects-search-trigger:hover {
  background: var(--sidebar-accent);
  color: hsl(var(--sidebar-foreground));
}

.projects-search-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.sidebar-header-bar .projects-search-trigger {
  color: hsl(var(--muted-foreground));
}

.sidebar-header-bar .projects-search-trigger:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.sidebar-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 8px 12px;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 10px 12px 14px;
  border-top: 1px solid hsl(var(--sidebar-border));
  background: var(--sidebar-background);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-menu li {
  list-style: none;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: hsl(var(--sidebar-accent-foreground));
}

.sidebar-menu-item.is-active {
  background: var(--sidebar-active);
  color: hsl(var(--sidebar-accent-foreground));
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.sidebar-menu-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.sidebar-menu-icon {
  flex-shrink: 0;
  opacity: 0.65;
}

.sidebar-menu-item.is-active .sidebar-menu-icon,
.sidebar-menu-item:hover .sidebar-menu-icon {
  opacity: 1;
}

.sidebar-menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-build-folder {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-build-folder-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-build-folder-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
  color: hsl(var(--sidebar-accent-foreground));
}

.sidebar-build-folder-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.sidebar-build-folder-chevron {
  flex-shrink: 0;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.sidebar-build-folder.is-expanded .sidebar-build-folder-chevron {
  transform: rotate(90deg);
}

.sidebar-build-folder-count {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 1.25rem;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: hsl(var(--sidebar-muted));
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.sidebar-build-folder-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 22px;
  margin-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-build-folder:not(.is-expanded) .sidebar-build-folder-items,
.sidebar-build-folder-items[hidden] {
  display: none !important;
}

.sidebar-menu-item--nested {
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.projects-loading,
.projects-content-loading,
.projects-search-empty {
  margin: 8px 10px;
  font-size: 0.8125rem;
  color: hsl(var(--sidebar-muted));
}

.sidebar-inset {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.sidebar-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid hsl(var(--border));
  background: var(--bg);
  flex-shrink: 0;
}

.sidebar-header-separator {
  width: 1px;
  height: 16px;
  background: hsl(var(--border));
  flex-shrink: 0;
}

.breadcrumb {
  min-width: 0;
  overflow: hidden;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  min-width: 0;
}

.breadcrumb-link {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  white-space: nowrap;
}

.breadcrumb-link:hover {
  color: hsl(var(--foreground));
}

.breadcrumb-separator {
  display: flex;
  align-items: center;
  color: hsl(var(--muted-foreground));
  flex-shrink: 0;
}

.breadcrumb-page {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-inset-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.projects-app .sidebar-inset-content {
  width: 100%;
  padding: 24px 20px 40px;
  box-sizing: border-box;
}

.projects-app .sidebar-inset-content > * {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.projects-welcome {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100vh - 134px);
}

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

.projects-stat-card {
  min-height: 96px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.35);
}

.projects-stat-label {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.projects-stat-value {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.projects-panel {
  flex: 1;
}

.projects-panel--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.projects-panel-header {
  padding: 0 0 16px;
}

.projects-panel-title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.projects-panel-description {
  margin: 0;
  max-width: 640px;
  color: hsl(var(--muted-foreground));
  line-height: 1.65;
  font-size: 0.9375rem;
}

.projects-panel-meta {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  text-transform: capitalize;
}

.projects-panel-body {
  padding: 0;
}

.projects-panel-body--content {
  line-height: 1.7;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.88);
}

.projects-panel-body--content p {
  margin: 0 0 14px;
}

.projects-content-heading {
  margin: 28px 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
}

.projects-panel-body--content .projects-content-heading:first-child {
  margin-top: 0;
}

.projects-content-figure {
  margin: 16px 0 20px;
}

.projects-content-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
}

.projects-content-image--progressive {
  image-rendering: auto;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.projects-content-image--progressive:not(.is-full-res) {
  filter: blur(6px);
}

.projects-content-image--progressive.is-full-res {
  filter: none;
}

.projects-panel-empty {
  color: hsl(var(--muted-foreground));
  line-height: 1.65;
  font-size: 0.9375rem;
}

.projects-panel-empty p {
  margin: 0 0 12px;
}

.projects-checklist-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.projects-checklist-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.projects-checklist-heading {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.projects-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.projects-checklist-item {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.projects-checklist-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card));
  cursor: pointer;
}

.projects-checklist-delete {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 4px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.projects-checklist-item:hover .projects-checklist-delete,
.projects-checklist-item:focus-within .projects-checklist-delete {
  opacity: 1;
}

.projects-checklist-delete:hover:not(:disabled) {
  color: hsl(var(--destructive, 0 84% 60%));
  background: hsl(var(--muted) / 0.35);
  border-color: hsl(var(--border));
}

.projects-checklist-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.projects-checklist-vote {
  flex: 0 0 auto;
  align-self: center;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 34px;
  margin-right: 2px;
}

.projects-checklist-vote-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--muted-foreground));
  transition: opacity 0.15s ease;
}

.projects-checklist-vote-score.is-positive {
  color: hsl(142 71% 35%);
}

.projects-checklist-vote-score.is-negative {
  color: hsl(var(--destructive, 0 84% 60%));
}

.projects-checklist-vote-controls {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.projects-checklist-item:hover .projects-checklist-vote-score,
.projects-checklist-item:focus-within .projects-checklist-vote-score {
  opacity: 0;
}

.projects-checklist-item:hover .projects-checklist-vote-controls,
.projects-checklist-item:focus-within .projects-checklist-vote-controls {
  opacity: 1;
  pointer-events: auto;
}

.projects-checklist-vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.projects-checklist-vote-btn:hover:not(:disabled) {
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.35);
  border-color: hsl(var(--border));
}

.projects-checklist-vote-btn.is-active-up {
  color: hsl(142 71% 35%);
  background: hsl(142 71% 45% / 0.15);
  border-color: hsl(142 71% 45% / 0.35);
}

.projects-checklist-vote-btn.is-active-down {
  color: hsl(var(--destructive, 0 84% 60%));
  background: hsl(var(--destructive, 0 84% 60%) / 0.12);
  border-color: hsl(var(--destructive, 0 84% 60%) / 0.35);
}

.projects-checklist-vote-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.projects-checklist-vote-arrow {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.projects-checklist-checkbox {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: hsl(var(--primary));
}

.projects-checklist-text {
  line-height: 1.5;
  color: hsl(var(--foreground));
}

.projects-checklist-text.is-checked {
  color: hsl(var(--muted-foreground));
  text-decoration: line-through;
}

.projects-checklist-empty,
.projects-checklist-empty-item {
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
}

.projects-cta {
  width: auto;
  display: inline-flex;
}

.projects-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 100;
  max-width: min(90vw, 420px);
  text-align: center;
}

.projects-toast[hidden] {
  display: none;
}

.projects-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.projects-search-overlay[hidden] {
  display: none;
}

.projects-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.projects-search-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 12vh 24px 24px;
  height: 100%;
  pointer-events: none;
}

.projects-search-dialog-inner {
  pointer-events: auto;
  width: min(640px, 100%);
  max-height: min(76vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.projects-search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid hsl(var(--border));
  background: rgba(255, 255, 255, 0.02);
}

.projects-search-field-icon {
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
}

.projects-search-input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: hsl(var(--foreground));
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.projects-search-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.projects-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.projects-search-results .sidebar-menu-item {
  border-radius: calc(var(--radius) - 2px);
}

.projects-search-hint,
.projects-search-results .projects-search-empty {
  margin: 16px 12px;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

body.projects-search-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .projects-welcome-grid {
    grid-template-columns: 1fr;
  }

  .site-header-actions {
    gap: 8px;
  }

  .sidebar-layout {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    max-height: 42vh;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1px solid hsl(var(--sidebar-border));
  }

  .sidebar-inset {
    flex: 1;
    min-height: 0;
  }

  .sidebar-inset-content {
    padding: 12px;
  }

  .projects-app .sidebar-inset-content {
    padding: 16px 16px 32px;
  }
}

/* ── Gallery sidebar ── */

:root {
  --sidebar-width-collapsed: 3rem;
}

.gallery-app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.gallery-app > .curator-header,
body.gallery-app > .site-header {
  flex-shrink: 0;
}

.gallery-app .sidebar-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.gallery-app .app-sidebar {
  width: var(--sidebar-width);
  align-self: stretch;
  height: auto;
  max-height: none;
  position: relative;
  transition: width 0.2s ease;
}

html.gallery-sidebar-boot .gallery-app .app-sidebar {
  transition: none !important;
}

.gallery-app .sidebar-inset {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gallery-app .sidebar-inset .gallery {
  padding: 5px;
}

.sidebar-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: hsl(var(--sidebar-muted));
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.sidebar-collapse-toggle:hover {
  background: var(--sidebar-accent);
  color: hsl(var(--sidebar-foreground));
}

.sidebar-collapse-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.sidebar-layout.is-sidebar-collapsed .app-sidebar {
  width: var(--sidebar-width-collapsed);
}

.sidebar-layout.is-sidebar-collapsed .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}

.gallery-sidebar-section {
  margin-bottom: 14px;
}

.gallery-sidebar-section-label {
  margin: 0 0 8px;
  padding: 0 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--sidebar-muted));
}

.gallery-sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.gallery-sidebar-section-header .gallery-sidebar-section-label {
  margin: 0;
  padding: 0 4px;
}

.gallery-sidebar-tags-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid hsl(var(--sidebar-border));
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gallery-sidebar-tags-open:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
}

.gallery-sidebar-tags-open:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.gallery-sidebar-tags-open.is-filter-active {
  background: rgba(88, 101, 242, 0.2);
  border-color: rgba(88, 101, 242, 0.5);
  color: #e8eaff;
}

.gallery-sidebar-tag-active {
  margin-left: 6px;
  font-weight: 500;
  color: rgba(88, 101, 242, 0.9);
}

.gallery-sidebar-tag-active::before {
  content: "·";
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

.gallery-tags-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.gallery-tags-lightbox[hidden] {
  display: none;
}

.gallery-tags-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.gallery-tags-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 48px 24px;
  pointer-events: none;
  outline: none;
}

.gallery-tags-lightbox-layout {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(20px, 3vh, 32px);
  width: min(480px, 100%);
  max-width: 480px;
  max-height: min(80vh, 720px);
  min-height: 0;
}

.gallery-tags-lightbox-title {
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: hsl(var(--foreground));
  text-align: left;
}

.gallery-tags-lightbox-content {
  width: 100%;
  min-width: 0;
  max-height: min(calc(80vh - 5rem), 560px);
  overflow-y: auto;
}

.gallery-tags-lightbox-list {
  width: 100%;
}

.gallery-tags-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  pointer-events: auto;
  width: auto;
  height: auto;
  padding: 8px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.gallery-tags-lightbox-close:hover {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 720px) {
  .gallery-tags-lightbox-dialog {
    padding: 48px 20px;
  }

  .gallery-tags-lightbox-layout {
    width: 100%;
    max-width: none;
    max-height: min(85vh, 720px);
  }

  .gallery-tags-lightbox-content {
    max-height: min(calc(85vh - 4rem), 560px);
  }
}

.gallery-sidebar-empty {
  margin: 8px 10px;
  font-size: 0.8125rem;
  color: hsl(var(--sidebar-muted));
}

.gallery-sidebar-toggles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px 4px;
}

.gallery-sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gallery-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: hsl(var(--sidebar-accent-foreground));
}

.gallery-sidebar-toggle:focus-within {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.gallery-sidebar-toggle-input {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
}

.gallery-sidebar-toggle-input:checked {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.42);
}

.gallery-sidebar-toggle-input:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.gallery-sidebar-toggle-input:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.gallery-sidebar-toggle-label {
  line-height: 1.2;
}

.sidebar-layout.is-sidebar-collapsed .sidebar-title,
.sidebar-layout.is-sidebar-collapsed .gallery-sidebar-section-label,
.sidebar-layout.is-sidebar-collapsed .gallery-sidebar-section-header,
.sidebar-layout.is-sidebar-collapsed .gallery-sidebar-toggles,
.sidebar-layout.is-sidebar-collapsed .gallery-sidebar-empty,
.sidebar-layout.is-sidebar-collapsed .sidebar-menu-label,
.sidebar-layout.is-sidebar-collapsed .sidebar-build-folder-items,
.sidebar-layout.is-sidebar-collapsed .sidebar-build-folder-count {
  display: none;
}

/* ── Gallery build page right sidebar ── */

.gallery-app .sidebar-inset.has-build-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.gallery-build-view {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-items: stretch;
  align-self: stretch;
}

.gallery-build-content {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.gallery-build-page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.gallery-build-page-loading.is-content-only {
  position: absolute;
  inset: 0;
  z-index: 1300;
}

.gallery-build-page-loading.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: var(--build-viewer-bg);
}

.gallery-build-page-loading.site-page-loading.is-fullscreen {
  background: var(--bg);
}

body.is-site-page-loading {
  overflow: hidden;
}

.gallery-build-page-loading[hidden] {
  display: none !important;
}

.gallery-build-page-loading-progress {
  width: min(280px, 72vw);
}

.gallery-build-page-loading-progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.gallery-build-page-loading-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.85);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width;
}

.gallery-build-view > .gallery,
.gallery-build-content > .gallery {
  flex: 1 1 auto;
  min-width: 0;
}

.gallery-build-render-viewer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
}

.gallery-build-render-viewer[hidden] {
  display: none !important;
}

.gallery-build-render-viewer-image {
  max-width: calc(100% - 120px);
  max-height: calc(100% - 48px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.gallery-build-render-viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.gallery-build-render-viewer-close:hover {
  background: rgba(88, 101, 242, 0.75);
  border-color: rgba(88, 101, 242, 0.9);
}

.gallery-build-render-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gallery-build-render-viewer-nav:hover {
  background: rgba(88, 101, 242, 0.75);
  border-color: rgba(88, 101, 242, 0.9);
}

.gallery-build-render-viewer-nav--prev {
  left: 12px;
}

.gallery-build-render-viewer-nav--next {
  right: 12px;
}

.gallery-build-render-viewer-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gallery-property-sidebar.lightbox-panel,
.gallery-property-sidebar {
  flex: 0 0 360px;
  width: 360px;
  min-width: 360px;
  margin: 0;
  max-height: none;
  height: auto;
  min-height: 100%;
  align-self: stretch;
  position: static;
  top: auto;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  padding: 0;
}

.gallery-property-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 12px;
}

.gallery-property-sidebar-footer {
  flex-shrink: 0;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 12, 15, 0.35);
}

.gallery-property-sidebar-author-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 12px;
}

.gallery-property-sidebar-author {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.gallery-property-sidebar-author-readonly {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  padding: 8px 10px;
}

.gallery-property-sidebar-author-readonly.lightbox-owner-link,
.gallery-property-sidebar-author-readonly .lightbox-owner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.gallery-property-sidebar-author-readonly img,
.gallery-property-sidebar-author-avatar {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.gallery-property-sidebar-edit-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 40px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gallery-property-sidebar-edit-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.85);
}

.gallery-property-sidebar-edit-btn[hidden] {
  display: none !important;
}

.gallery-property-sidebar-edit-btn-icon {
  flex-shrink: 0;
}

.gallery-property-sidebar-title {
  margin: 0 0 8px;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
}

.gallery-property-sidebar-stats {
  margin: 0 0 14px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-property-sidebar-export {
  flex-shrink: 0;
  padding: 0 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 12, 15, 0.35);
}

.gallery-property-sidebar-export:has(.gallery-property-sidebar-export-btn[hidden]) {
  display: none;
}

.gallery-property-sidebar-export-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gallery-property-sidebar-export-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.92);
}

.gallery-property-sidebar-export-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.gallery-property-sidebar-export-btn[hidden] {
  display: none !important;
}
.gallery-item.is-build-preview {
  overflow: hidden;
  background: #000000;
  cursor: pointer;
}

.gallery-item.is-build-preview.is-loading {
  opacity: 0.72;
}

.gallery-item.is-build-preview .gallery-build-preview-canvas,
.gallery-item.is-build-preview .build-preview-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gallery-item.is-build-preview img.gallery-build-preview-static {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.gallery-viewer-open {
  overflow: hidden;
}

#build-lightbox.gallery-build-viewer-overlay.is-open {
  z-index: 1200;
}

.gallery-property-sidebar-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-property-sidebar-saved {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

.gallery-property-sidebar-rating:empty {
  display: none;
}

.gallery-property-sidebar-download[hidden] {
  display: none !important;
}

.gallery-property-sidebar-comments {
  margin-top: 0;
}

.gallery-property-sidebar-comments .lightbox-comments-list {
  max-height: min(220px, 28vh);
  margin-bottom: 12px;
}

.gallery-property-sidebar-comment-form textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
}

.gallery-property-sidebar-comment-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.22);
}

.gallery-property-sidebar-actions {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.gallery-property-sidebar-vote-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.gallery-property-sidebar-vote-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

.gallery-property-sidebar-vote-btn.is-active-up {
  background: rgba(34, 197, 94, 0.35);
}

.gallery-property-sidebar-vote-btn.is-active-down {
  background: rgba(239, 68, 68, 0.35);
}

.gallery-property-sidebar-vote-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gallery-property-sidebar-vote-arrow {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.gallery-property-sidebar-comment-submit {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: #5865f2;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gallery-property-sidebar-comment-submit:hover {
  background: #4752c4;
}

.gallery-property-sidebar-comment-submit[hidden] {
  display: none !important;
}

.gallery-property-sidebar[hidden] {
  display: none !important;
}

.sidebar-inset.has-build-view .gallery-build-content > .gallery {
  width: 100%;
}

@media (max-width: 1100px) {
  .gallery-build-view {
    flex-direction: column;
  }

  .gallery-property-sidebar.lightbox-panel,
  .gallery-property-sidebar {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    position: static;
    align-self: auto;
    border: none;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-inset.has-build-view .gallery-build-content > .gallery {
    width: 100%;
  }
}

#gallery-property-sidebar-title.gallery-property-sidebar-title.is-editable {
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease;
}

#gallery-property-sidebar-title.gallery-property-sidebar-title.is-editable:hover {
  background: rgba(255, 255, 255, 0.08);
}

#gallery-property-sidebar-title.gallery-property-sidebar-title[contenteditable="true"] {
  cursor: text;
  outline: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 4px;
}

.sidebar-layout.is-sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding-inline: 8px;
}

.sidebar-layout.is-sidebar-collapsed .sidebar-content {
  padding-inline: 6px;
}

.sidebar-layout.is-sidebar-collapsed .sidebar-menu-item {
  justify-content: center;
  padding-inline: 8px;
}

@media (max-width: 768px) {
  .gallery-app .app-sidebar {
    width: 100%;
    height: auto;
    max-height: 42vh;
    position: static;
  }

  .sidebar-layout.is-sidebar-collapsed .app-sidebar {
    width: 100%;
    max-height: 56px;
    overflow: hidden;
  }

  .sidebar-layout.is-sidebar-collapsed .sidebar-content,
  .sidebar-layout.is-sidebar-collapsed .sidebar-footer {
    display: none;
  }

  .sidebar-layout.is-sidebar-collapsed .sidebar-title {
    display: block;
  }
}

/* Admin page */
.admin-app {
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.admin-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
  max-width: 420px;
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.35);
}

.admin-search-icon {
  flex-shrink: 0;
  opacity: 0.55;
}

.admin-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: hsl(var(--foreground));
  font: inherit;
  outline: none;
}

.admin-search-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.admin-result-count {
  margin: 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.admin-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card) / 0.35);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: hsl(var(--muted) / 0.65);
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  white-space: nowrap;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-table tr.is-hidden-row {
  opacity: 0.65;
}

.admin-cell-thumb img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-cell-filename {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.admin-cell-tags {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-cell-id {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.admin-cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

.admin-action-btn,
.admin-action-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.admin-action-btn {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  color: hsl(var(--foreground));
}

.admin-action-btn:hover {
  background: hsl(var(--muted) / 0.7);
}

.admin-action-link {
  border: 1px solid transparent;
  color: hsl(var(--primary));
}

.admin-action-link:hover {
  text-decoration: underline;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-shrink: 0;
  padding: 8px 0;
}

.admin-page-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  color: hsl(var(--foreground));
  font: inherit;
  cursor: pointer;
}

.admin-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-page-info {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.admin-loading,
.admin-empty {
  margin: 24px 16px;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.admin-readonly-note {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8125rem;
}

.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(20, 20, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.admin-toast[hidden] {
  display: none;
}

.admin-settings-panel {
  padding: 4px 0 24px;
}

.admin-settings-header {
  margin-bottom: 20px;
}

.admin-settings-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 600;
}

.admin-settings-meta {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat-card {
  padding: 14px 16px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.25);
}

.admin-stat-label {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stat-value {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.admin-settings-controls {
  margin-bottom: 24px;
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
}

.admin-hidden-section h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.admin-hidden-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.admin-hidden-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.2);
}

.admin-hidden-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.admin-hidden-empty {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

/* Global builds list page */
.properties-list-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.properties-list-main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.properties-list-header {
  margin-bottom: 24px;
}

.properties-list-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.properties-list-header-text {
  min-width: 0;
}

.properties-list-light-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  cursor: pointer;
  user-select: none;
}

.properties-list-light-view-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
}

.properties-list-light-view-input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}

.properties-list-light-view:focus-within {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25);
}

.properties-list-light-view-input:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 640px) {
  .properties-list-header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .properties-list-light-view {
    align-self: flex-start;
  }
}

.properties-list-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.properties-list-subtitle {
  margin: 8px 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
}

.builds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.properties-list-entry {
  text-decoration: none;
  color: inherit;
}

.properties-list-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.properties-list-header-row .profile-build-text {
  flex: 1;
  min-width: 0;
}

.properties-list-header-row .profile-build-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.properties-list-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  max-width: 45%;
}

.properties-list-owner-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.properties-list-owner-avatar-empty {
  display: inline-block;
  background: hsl(var(--muted));
}

.properties-list-owner-name {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.properties-list-owner-name:hover {
  color: hsl(var(--foreground));
  text-decoration: underline;
}

.properties-list-meta {
  margin: 4px 0 6px;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.properties-list-error {
  color: hsl(var(--destructive, 0 84% 60%));
}

/* Thumbnail fills full row height (content column may include meta line). */
.builds-list .profile-build-entry {
  align-items: stretch;
}

.builds-list .profile-build-entry-thumb {
  align-self: stretch;
  flex-shrink: 0;
  width: calc(var(--profile-build-entry-height) * 16 / 9);
  min-width: 72px;
  height: auto;
  aspect-ratio: unset;
}


.properties-list-item {
  position: relative;
}

.properties-list-delete {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.15s ease, background 0.15s ease;
}

.properties-list-item:hover .properties-list-delete,
.properties-list-item:focus-within .properties-list-delete {
  opacity: 1;
  pointer-events: auto;
}

.properties-list-delete:hover {
  background: rgba(220, 53, 69, 0.92);
}

.properties-list-delete:disabled {
  opacity: 0.55;
  cursor: wait;
}

.properties-list-delete svg {
  display: block;
}

.properties-list-item.is-deleting {
  opacity: 0.45;
  pointer-events: none;
}

.builds-list .profile-build-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.statistics-page {
  min-height: calc(100vh - 50px);
  padding-bottom: 48px;
}

.statistics-page-title {
  padding-bottom: 8px;
}

.statistics-controls {
  max-width: 880px;
  margin: 8px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.statistics-range-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.62);
}

.statistics-range-select {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
}

.statistics-summary {
  max-width: 880px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.statistics-summary-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.statistics-summary-label {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.58);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.statistics-summary-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
}

.statistics-chart-wrap {
  max-width: 880px;
  height: 420px;
  margin: 24px auto 0;
  padding: 0 20px;
}

.statistics-updated {
  max-width: 880px;
  margin: 12px auto 0;
  padding: 0 20px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

.statistics-error[hidden],
.statistics-summary[hidden],
.statistics-chart-wrap[hidden],
.statistics-updated[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .statistics-summary {
    grid-template-columns: 1fr;
  }

  .statistics-chart-wrap {
    height: 320px;
  }
}

.sidebar-menu-link {
  text-decoration: none;
  color: inherit;
}

.career-economy-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--site-header-height, 56px));
  background: var(--bg);
}

.career-economy-page-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid hsl(var(--border));
  background: var(--bg);
}

.career-economy-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.career-economy-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px 24px;
}

.career-economy-chart-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card) / 0.35);
}

.career-economy-chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.career-economy-chart-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.career-economy-chart-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.career-economy-chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 360px;
}

.career-economy-chart-empty {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.career-economy-chart-empty[hidden],
#economy-chart[hidden] {
  display: none;
}

.career-economy-content .admin-table-wrap {
  flex: 1;
  min-height: 320px;
}

.career-economy-intro h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
}

.career-economy-intro p {
  margin: 0;
  max-width: 72ch;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

.career-economy-header-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.career-economy-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
  padding: 16px;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card) / 0.35);
}

.career-economy-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}

.career-economy-control-group-paths {
  flex: 1 1 320px;
  min-width: min(100%, 320px);
}

.career-economy-control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.career-economy-control-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.career-economy-balance-field {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 160px;
  padding: 8px 10px;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--muted) / 0.25);
}

.career-economy-currency {
  color: hsl(var(--muted-foreground));
}

.career-economy-balance-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  font: inherit;
}

.career-economy-path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.career-economy-path-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--muted) / 0.25);
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.career-economy-path-btn:hover {
  background: hsl(var(--muted) / 0.45);
}

.career-economy-path-btn.is-active {
  border-color: rgba(88, 101, 242, 0.65);
  background: rgba(88, 101, 242, 0.14);
}

.career-economy-path-name {
  font-weight: 600;
}

.career-economy-primary-btn,
.career-economy-secondary-btn,
.career-economy-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: calc(var(--radius) - 2px);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.career-economy-primary-btn {
  border: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.career-economy-secondary-btn,
.career-economy-inline-btn {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.35);
  color: hsl(var(--foreground));
}

.career-economy-inline-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.career-economy-stats {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.career-economy-stats div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.875rem;
}

.career-economy-stats dt {
  margin: 0;
  color: hsl(var(--muted-foreground));
}

.career-economy-stats dd {
  margin: 0;
  font-weight: 600;
}

.career-economy-stats .is-positive {
  color: #6ee7a8;
}

.career-economy-stats .is-negative,
.career-economy-delta.is-negative {
  color: #f87171;
}

.career-economy-delta.is-positive {
  color: #6ee7a8;
}

.career-economy-input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 0.8125rem;
}

.career-economy-input:focus {
  outline: none;
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.25);
}

.career-economy-day-input {
  width: 64px;
  text-align: center;
}

.career-economy-label-input {
  min-width: 220px;
}

.career-economy-amount-input {
  width: 110px;
}

.career-economy-notes-input {
  min-width: 180px;
}

.career-economy-running {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.career-economy-table tr.is-in-path {
  background: rgba(88, 101, 242, 0.08);
}

.career-economy-table th,
.career-economy-table td {
  border-bottom: none;
  vertical-align: middle;
}

.career-economy-table thead tr,
.career-economy-table tbody tr {
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}

.career-economy-table .career-economy-input,
.career-economy-table select.career-economy-input {
  display: block;
  height: 32px;
  box-sizing: border-box;
  line-height: 1.2;
}

.career-economy-table .admin-cell-actions {
  align-items: center;
  min-height: 32px;
}

.career-economy-path-count {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.career-economy-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

@media (max-width: 960px) {
  .career-economy-page-header,
  .career-economy-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .career-economy-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .career-economy-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .career-economy-controls {
    flex-direction: column;
  }

  .career-economy-chart-canvas-wrap {
    height: 280px;
  }

  .career-economy-label-input,
  .career-economy-notes-input {
    min-width: 140px;
  }
}

