:root {
  --build-viewer-bg: #000000;
}

.builds-item:not(.is-hidden) {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

body.properties-page {
  background: var(--build-viewer-bg);
}

body.properties-page .gallery {
  background: var(--build-viewer-bg);
}

body.properties-page #builds-grid {
  position: relative;
  width: 100%;
}

body.properties-page .builds-item:not(.is-hidden) {
  position: absolute;
  overflow: hidden;
}

body.properties-page .builds-empty {
  background: var(--build-viewer-bg);
  color: rgba(255, 255, 255, 0.55);
}

.build-preview-viewer {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--build-viewer-bg);
  touch-action: none;
}

.build-preview-viewer.is-error {
  background:
    linear-gradient(135deg, hsl(var(--muted) / 0.7), hsl(var(--background))),
    repeating-linear-gradient(
      45deg,
      hsl(var(--border) / 0.35) 0,
      hsl(var(--border) / 0.35) 8px,
      transparent 8px,
      transparent 16px
    );
}

.schem-viewer-host {
  width: 100%;
  height: 100%;
}

.schem-viewer-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.build-fullscreen-btn,
.build-viewer-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.builds-item .build-fullscreen-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}

.build-viewer-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.build-viewer-toolbar--left {
  right: auto;
  left: 8px;
  flex-wrap: wrap;
  max-width: calc(100% - 16px);
}

.build-hdri-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
}

.build-hdri-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  user-select: none;
}

.build-hdri-select {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 0 14px 0 0;
  cursor: pointer;
  max-width: 140px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='rgba(255,255,255,0.72)' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.build-hdri-select:focus-visible {
  outline: none;
}

.build-hdri-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-hdri-select:disabled {
  opacity: 0.55;
  cursor: wait;
}

.build-hdri-select option {
  color: #111;
  background: #fff;
}

.hdri-current-bar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform: translateX(-50%);
  user-select: none;
}

#build-lightbox.is-open .hdri-current-bar,
body.build-edit-page .build-edit-shell .hdri-current-bar {
  display: inline-flex;
}

.hdri-current-bar.is-updated {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.hdri-cycle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.hdri-cycle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
}

.hdri-cycle-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 1px;
}

.hdri-cycle-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.hdri-current-label {
  min-width: 0;
  max-width: min(52vw, 320px);
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.build-bg-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
}

.build-bg-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  user-select: none;
}

.build-bg-swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.build-bg-swatch {
  appearance: none;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 3px;
  cursor: pointer;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.build-bg-swatch:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.build-bg-swatch.is-active {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.build-bg-hdri {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 214, 120, 0.95), rgba(255, 140, 60, 0.55) 45%, rgba(40, 72, 120, 0.9) 100%);
}

.build-bg-hdri.is-active {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.build-bg-swatch:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 1px;
}

.build-bg-custom {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.build-bg-custom-input {
  appearance: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}

.build-bg-custom-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.build-bg-custom-input::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.build-bg-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-bg-render-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  user-select: none;
}

.build-bg-render-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.build-bg-render-input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.build-bg-render-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-light-view-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  user-select: none;
}

.build-light-view-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.build-light-view-input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.build-light-view-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

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

.build-camera-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.build-camera-mode-btn:hover,
.build-camera-mode-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-camera-mode-btn[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.build-fov-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
}

.build-fov-control[hidden] {
  display: none !important;
}

.build-fov-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  user-select: none;
}

.build-fov-range {
  width: 72px;
  height: 4px;
  margin: 0;
  accent-color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.build-fov-value {
  min-width: 22px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.82);
  text-align: right;
}

.build-fov-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-view-preset-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
}

.build-view-preset-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  user-select: none;
}

.build-view-preset-select {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 0 14px 0 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='rgba(255,255,255,0.72)' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.build-view-preset-select:focus-visible {
  outline: none;
}

.build-view-preset-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-view-preset-select option {
  color: #111;
  background: #fff;
}

.build-roll-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
}

.build-roll-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  user-select: none;
}

.build-roll-range {
  width: 56px;
  height: 4px;
  margin: 0;
  accent-color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.build-roll-value {
  min-width: 26px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.82);
  text-align: right;
}

.build-roll-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-viewer-toolbar-btn {
  opacity: 1;
  pointer-events: auto;
}

.build-viewer-toolbar-btn[hidden],
#property-lightbox-set-view[hidden],
#property-lightbox-post-discord[hidden],
#property-lightbox-aspect-wrap[hidden] {
  display: none !important;
}

.build-aspect-ratio-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.88);
}

.build-aspect-ratio-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  user-select: none;
}

.build-aspect-ratio-select {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 0 14px 0 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='rgba(255,255,255,0.72)' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.build-aspect-ratio-select:focus-visible {
  outline: none;
}

.build-aspect-ratio-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.82);
}

.build-aspect-ratio-select:disabled {
  opacity: 0.55;
  cursor: wait;
}

.build-aspect-ratio-select option {
  color: #111;
  background: #fff;
}

.build-viewer-toolbar-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.build-viewer-toolbar-btn.is-saved {
  border-color: rgba(120, 220, 140, 0.85);
  background: rgba(40, 120, 60, 0.72);
  color: rgba(210, 255, 220, 1);
  box-shadow: 0 0 0 2px rgba(120, 220, 140, 0.35);
}

.builds-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 20, 0.96);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 1100;
  max-width: min(90vw, 420px);
  text-align: center;
}

.builds-toast.is-success {
  border-color: rgba(120, 220, 140, 0.55);
  background: rgba(24, 48, 32, 0.96);
  color: rgba(210, 255, 220, 1);
}

.builds-toast.is-error {
  border-color: rgba(255, 120, 120, 0.55);
  background: rgba(48, 24, 24, 0.96);
  color: rgba(255, 210, 210, 1);
}

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

.build-viewer-toolbar-btn.is-posting {
  opacity: 0.55;
  cursor: wait;
}

.build-discord-btn.is-posting svg {
  animation: build-discord-pulse 1s ease-in-out infinite;
}

@keyframes build-discord-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.build-viewer-toolbar-btn.is-error {
  border-color: rgba(255, 120, 120, 0.55);
  color: rgba(255, 170, 170, 0.95);
}

.builds-item:hover .build-fullscreen-btn,
.builds-item:focus-within .build-fullscreen-btn,
.property-lightbox-viewer-stage .build-viewer-toolbar,
.property-lightbox-viewer-stage .build-viewer-toolbar--left,
.property-lightbox-viewer-stage .build-viewer-toolbar--right,
.property-lightbox-viewer-stage .build-viewer-toolbar--top-right {
  opacity: 1;
  pointer-events: auto;
}

.build-fullscreen-btn:hover,
.build-fullscreen-btn:focus-visible,
.build-viewer-toolbar-btn:hover,
.build-viewer-toolbar-btn:focus-visible {
  background: rgba(0, 0, 0, 0.82);
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.property-lightbox-viewer-stage .build-fullscreen-btn.is-active,
.build-fullscreen-btn.is-active,
.build-viewer-toolbar-btn.is-active {
  opacity: 1;
  pointer-events: auto;
}

#build-lightbox {
  overflow: hidden;
  inset: var(--site-header-height, 50px) 0 0 0;
}

#build-lightbox .lightbox-overlay {
  background: rgba(0, 0, 0, 0.95);
}

#build-lightbox .lightbox-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

#build-lightbox .lightbox-close {
  top: 12px;
  left: 12px;
  right: auto;
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--top-right {
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 24px);
}

#build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--left {
  top: auto;
  bottom: 12px;
  left: 12px;
  right: auto;
  max-width: min(calc(100% - 24px), 720px);
}

#build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--right {
  top: auto;
  bottom: 12px;
  right: 12px;
  left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 24px);
}

#build-lightbox .lightbox-close:hover {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(255, 255, 255, 0.22);
}

#build-lightbox .lightbox-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  width: 100%;
  min-width: 0;
  height: 100%;
  max-width: none;
  max-height: none;
  gap: 0;
  align-items: stretch;
  justify-content: flex-start;
}

#build-lightbox .property-lightbox-viewer-wrap {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--build-viewer-bg);
}

#build-lightbox .property-lightbox-viewer-canvas {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  position: relative;
  overflow: hidden;
  background: var(--build-viewer-bg);
}

.property-lightbox-capture-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  outline: 2px solid #fff;
  outline-offset: 0;
}

.property-lightbox-capture-overlay.is-dimmed {
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
}

.property-lightbox-capture-overlay[hidden] {
  display: none;
}

#build-lightbox .property-lightbox-viewer-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  max-width: 100%;
  max-height: 100%;
}

#build-lightbox .property-lightbox-viewer-frame {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#build-lightbox .property-lightbox-viewer {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: var(--build-viewer-bg);
  touch-action: none;
}

.build-discord-btn.is-discord-confirm {
  border-color: rgba(120, 220, 140, 0.85);
  background: rgba(40, 120, 60, 0.72);
  color: rgba(210, 255, 220, 1);
  box-shadow: 0 0 0 2px rgba(120, 220, 140, 0.35);
}

#build-lightbox .property-lightbox-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  text-align: center;
  background: var(--build-viewer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#build-lightbox .gallery-property-sidebar.lightbox-panel {
  flex: 0 0 360px;
  width: 360px;
  min-width: 360px;
  max-height: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
}

#build-lightbox .gallery-property-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 12px;
  background: hsl(var(--card));
}

#build-lightbox .gallery-property-sidebar-renders {
  flex-shrink: 0;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: hsl(var(--card));
  max-height: 45%;
  overflow-y: auto;
}

#build-lightbox .gallery-property-sidebar-renders .build-discord-section {
  margin: 0;
}

#build-lightbox .gallery-property-sidebar-renders .build-discord-section-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

#build-lightbox .lightbox-panel {
  flex: 0 0 360px;
  width: 360px;
  min-width: 360px;
  max-height: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  padding: 48px 18px 18px;
}

.build-preview-viewer:fullscreen,
.build-preview-viewer:-webkit-full-screen,
#property-lightbox-viewer:fullscreen,
#property-lightbox-viewer:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  border: none;
}

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

.build-discord-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.build-discord-section-header h3 {
  margin: 0;
}

.build-discord-first-only-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.build-discord-first-only-control:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.build-discord-first-only-control:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.build-discord-first-only-control:has(:checked) {
  background: rgba(88, 101, 242, 0.16);
  border-color: rgba(88, 101, 242, 0.42);
  color: #e8eaff;
}

.build-discord-first-only-input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #5865f2;
  cursor: pointer;
}

.build-discord-first-only-label {
  white-space: nowrap;
}

.property-lightbox-discord-renders {
  column-count: 2;
  column-gap: 8px;
}

.property-lightbox-discord-renders.is-loading,
.property-lightbox-discord-renders.is-empty {
  column-count: 1;
  display: block;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.build-discord-render {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 8px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.build-discord-render.is-gallery-preview {
  outline: 2px solid #5865F2;
  outline-offset: -2px;
}

.build-discord-render img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.build-discord-render-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.build-discord-render:hover .build-discord-render-delete,
.build-discord-render:focus-within .build-discord-render-delete {
  opacity: 1;
  pointer-events: auto;
}

.build-discord-render-delete:hover {
  background: rgba(220, 53, 69, 0.92);
}

.build-discord-render-delete:disabled {
  opacity: 0.55;
  cursor: wait;
}

.build-discord-render-delete svg {
  display: block;
}

.property-lightbox-discord-renders.is-sortable .build-discord-render {
  cursor: grab;
  touch-action: none;
}

.property-lightbox-discord-renders.is-sortable .build-discord-render:active {
  cursor: grabbing;
}

.build-discord-render.is-dragging {
  opacity: 0.45;
}

.build-discord-render.is-drop-before {
  box-shadow: inset 0 0 0 2px rgba(88, 101, 242, 0.95);
}

.build-discord-render.is-drop-after {
  box-shadow: inset 0 0 0 2px rgba(88, 101, 242, 0.95);
}

.property-lightbox-discord-renders.is-reordering {
  opacity: 0.72;
  pointer-events: none;
}

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

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

#property-lightbox-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;
  margin: -2px -4px;
}

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

#property-lightbox-title.lightbox-owner-name.is-editable:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.property-author-picker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  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: hsl(var(--foreground));
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.property-author-picker:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.property-author-picker.is-unconfirmed {
  border-color: rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.08);
}

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

.property-author-picker-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.property-author-picker-hint {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.property-author-picker.is-unconfirmed .property-author-picker-hint {
  color: rgba(250, 204, 21, 0.92);
}

.build-author-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.build-author-overlay[hidden] {
  display: none;
}

.build-author-overlay-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 20px 28px;
  pointer-events: auto;
}

.build-author-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.build-author-overlay-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.build-author-overlay-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.06);
  color: hsl(var(--foreground));
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.build-author-overlay-search-wrap {
  margin-bottom: 12px;
}

.build-author-search {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.06);
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 1rem;
}

.build-author-search:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.build-author-status {
  margin: 12px 0;
  color: rgba(255, 255, 255, 0.55);
}

.build-author-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  pointer-events: auto;
}

.build-author-option {
  width: 100%;
  margin: 0;
  padding: 0 20px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  text-align: left;
  transition: background 0.15s ease;
}

.build-author-option:hover,
.build-author-option:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.build-author-option.is-selected {
  box-shadow: inset 0 0 0 1px rgba(88, 101, 242, 0.75);
  background: rgba(88, 101, 242, 0.12);
}

.build-author-option-body {
  flex: 1 1 auto;
  min-width: 0;
}

.build-author-option-name {
  margin: 0 0 2px;
  font-size: 1.25rem;
  font-weight: 700;
}

.build-author-option-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
}

.build-author-option-avatar {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.build-author-option-avatar--unknown {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  #build-lightbox .lightbox-dialog {
    overflow-y: auto;
  }

  #build-lightbox .lightbox-main {
    flex-direction: column;
    height: auto;
    min-height: 100%;
    max-height: none;
    overflow: hidden;
  }

  #build-lightbox .property-lightbox-viewer-wrap {
    flex: 0 0 auto;
    width: 100%;
    height: min(52vh, 480px);
    min-height: 280px;
  }

  #build-lightbox .property-lightbox-viewer-canvas {
    flex: 1 1 auto;
  }

  #build-lightbox .property-lightbox-viewer-stage {
    max-width: 100%;
  }

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

  #build-lightbox .gallery-property-sidebar-scroll {
    padding: 18px 18px 12px;
  }

  #build-lightbox .gallery-property-sidebar-renders {
    max-height: none;
  }

  #build-lightbox .lightbox-panel {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px;
  }

  #build-lightbox .lightbox-close {
    top: 8px;
    left: 8px;
    right: auto;
  }

  #build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--left,
  #build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--right {
    bottom: 8px;
  }

  #build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--top-right {
    top: 8px;
    right: 8px;
  }

  #build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--left {
    left: 8px;
    max-width: calc(100% - 16px);
  }

  #build-lightbox .property-lightbox-viewer-stage .build-viewer-toolbar--right {
    right: 8px;
  }
}

body.build-edit-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--build-viewer-bg);
  overflow: hidden;
}

body.build-edit-page .site-header {
  flex-shrink: 0;
}

.build-edit-main {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--site-header-height, 50px));
  overflow: hidden;
}

body.build-edit-page #build-lightbox.build-edit-shell {
  position: static;
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  height: auto;
  overflow: hidden;
  inset: auto;
  z-index: auto;
}

body.build-edit-page #build-lightbox.build-edit-shell .lightbox-main {
  flex: 1 1 0%;
  display: flex;
  flex-direction: row;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-width: none;
  max-height: none;
  gap: 0;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-wrap,
body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-canvas,
body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-stage,
body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-frame,
body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer,
body.build-edit-page #build-lightbox.build-edit-shell .gallery-property-sidebar.lightbox-panel {
  /* Reuse lightbox layout rules */
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-wrap {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--build-viewer-bg);
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-canvas {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  position: relative;
  overflow: hidden;
  background: var(--build-viewer-bg);
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-frame,
body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--build-viewer-bg);
  touch-action: none;
}

body.build-edit-page #build-lightbox.build-edit-shell .gallery-property-sidebar.lightbox-panel {
  flex: 0 0 360px;
  width: 360px;
  min-width: 360px;
  max-height: none;
  height: auto;
  align-self: stretch;
  margin: 0;
  border-radius: 0;
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-stage .build-viewer-toolbar--top-right {
  top: 12px;
  right: 12px;
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-stage .build-viewer-toolbar--left {
  top: auto;
  bottom: 12px;
  left: 12px;
  right: auto;
  max-width: min(calc(100% - 24px), 720px);
}

body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-stage .build-viewer-toolbar--right {
  top: auto;
  bottom: 12px;
  right: 12px;
  left: auto;
}

@media (max-width: 900px) {
  body.build-edit-page #build-lightbox.build-edit-shell .lightbox-main {
    flex-direction: column;
    flex: 1 1 0%;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  body.build-edit-page #build-lightbox.build-edit-shell .property-lightbox-viewer-wrap {
    flex: 1 1 0%;
    width: 100%;
    min-height: 280px;
    height: auto;
  }

  body.build-edit-page #build-lightbox.build-edit-shell .gallery-property-sidebar.lightbox-panel {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 0.1);
  }
}
